1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-26 11:40:48 +03:00
This commit is contained in:
Denis Shakhov 2013-05-04 21:10:22 +07:00
parent 0adcdc97b1
commit e3ff284acc
104 changed files with 2504 additions and 1817 deletions

View file

@ -525,7 +525,7 @@ class ActionBlog extends Action {
if($oBlog->getType()=='close') {
$aBlogUsersInvited=$this->Blog_GetBlogUsersByBlogId($oBlog->getId(),ModuleBlog::BLOG_USER_ROLE_INVITE,null);
$this->Viewer_Assign('aBlogUsersInvited',$aBlogUsersInvited['collection']);
$this->Viewer_AddBlock('right','actions/ActionBlog/invited.tpl');
$this->Viewer_AddBlock('right','blocks/block.blogInvite.tpl');
}
}
/**

View file

@ -86,7 +86,10 @@ class ActionStream extends Action {
if (!$this->oUserCurrent) {
return parent::EventNotFound();
}
$this->Viewer_AddBlock('right','streamConfig');
$this->Viewer_AddBlock('right','activitySettings');
$this->Viewer_AddBlock('right','activityFriends');
$this->Viewer_AddBlock('right','activityUsers');
/**
* Читаем события
*/

View file

@ -16,12 +16,12 @@
*/
/**
* Блок настройки ленты активности
* Блок выбора друзей для чтения в ленте активности
*
* @package blocks
* @since 1.0
*/
class BlockStreamConfig extends Block {
class BlockActivityFriends extends Block {
/**
* Запуск обработки
*/
@ -33,10 +33,8 @@ class BlockStreamConfig extends Block {
/**
* Получаем и прогружаем необходимые переменные в шаблон
*/
$aTypesList = $this->Stream_getTypesList($oUserCurrent->getId());
$this->Viewer_Assign('aStreamTypesList', $aTypesList);
$aUserSubscribes = $this->Stream_getUserSubscribes($oUserCurrent->getId());
$aFriends = $this->User_getUsersFriend($oUserCurrent->getId());
$aUserSubscribes = $this->Stream_getUserSubscribes($oUserCurrent->getId());
$this->Viewer_Assign('aStreamSubscribedUsers', $aUserSubscribes);
$this->Viewer_Assign('aStreamFriends', $aFriends['collection']);
}

View file

@ -0,0 +1,40 @@
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
* Блок настройки ленты активности
*
* @package blocks
* @since 1.0
*/
class BlockActivitySettings extends Block {
/**
* Запуск обработки
*/
public function Exec() {
/**
* пользователь авторизован?
*/
if ($oUserCurrent = $this->User_getUserCurrent()) {
/**
* Получаем и прогружаем необходимые переменные в шаблон
*/
$aTypesList = $this->Stream_getTypesList($oUserCurrent->getId());
$this->Viewer_Assign('aStreamTypesList', $aTypesList);
}
}
}

View file

@ -0,0 +1,42 @@
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
* Блок выбора пользователей для чтения в ленте активности
*
* @package blocks
* @since 1.0
*/
class BlockActivityUsers extends Block {
/**
* Запуск обработки
*/
public function Exec() {
/**
* пользователь авторизован?
*/
if ($oUserCurrent = $this->User_getUserCurrent()) {
/**
* Получаем и прогружаем необходимые переменные в шаблон
*/
$aFriends = $this->User_getUsersFriend($oUserCurrent->getId());
$aUserSubscribes = $this->Stream_getUserSubscribes($oUserCurrent->getId());
$this->Viewer_Assign('aStreamSubscribedUsers', $aUserSubscribes);
$this->Viewer_Assign('aStreamFriends', $aFriends['collection']);
}
}
}

View file

@ -21,7 +21,7 @@
* @package blocks
* @since 1.1
*/
class BlockBlogCategory extends Block {
class BlockBlogCategories extends Block {
/**
* Запуск обработки
*/

View file

@ -21,7 +21,7 @@
* @package blocks
* @since 1.1
*/
class BlockBlogNavigator extends Block {
class BlockBlogNav extends Block {
/**
* Запуск обработки
*/

View file

@ -0,0 +1,42 @@
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
* Блок настройки списка пользователей в ленте
*
* @package blocks
* @since 1.0
*/
class BlockUserfeedFriends extends Block {
/**
* Запуск обработки
*/
public function Exec() {
/**
* Пользователь авторизован?
*/
if ($oUserCurrent = $this->User_getUserCurrent()) {
/**
* Получаем необходимые переменные и прогружаем в шаблон
*/
$aFriends = $this->User_getUsersFriend($oUserCurrent->getId());
$aUserSubscribes = $this->Userfeed_getUserSubscribes($oUserCurrent->getId());
$this->Viewer_Assign('aUserfeedSubscribedUsers', $aUserSubscribes['users']);
$this->Viewer_Assign('aUserfeedFriends', $aFriends['collection']);
}
}
}

View file

@ -33,8 +33,8 @@ class BlockUserfeedUsers extends Block {
/**
* Получаем необходимые переменные и прогружаем в шаблон
*/
$aUserSubscribes = $this->Userfeed_getUserSubscribes($oUserCurrent->getId());
$aFriends = $this->User_getUsersFriend($oUserCurrent->getId());
$aUserSubscribes = $this->Userfeed_getUserSubscribes($oUserCurrent->getId());
$this->Viewer_Assign('aUserfeedSubscribedUsers', $aUserSubscribes['users']);
$this->Viewer_Assign('aUserfeedFriends', $aFriends['collection']);
}

View file

@ -426,16 +426,16 @@ $config['block']['rule_index_blog'] = array(
);
$config['block']['rule_index'] = array(
'action' => array( 'index' ),
'blocks' => array( 'right' => array('blogNavigator'=>array('priority'=>500)) ),
'blocks' => array( 'right' => array('blogNav'=>array('priority'=>500)) ),
);
$config['block']['rule_topic_type'] = array(
'action' => array(
'link' => array('add','edit'),
'question' => array('add','edit'),
'topic' => array('add','edit'),
'photoset' => array('add','edit')
'photoset' => array('add','edit')
),
'blocks' => array( 'right' => array('blocks/block.blogInfo.tpl') ),
'blocks' => array( 'right' => array('blocks/block.blogInfo.tpl', 'blocks/block.blogInfoNote.tpl') ),
);
$config['block']['rule_people'] = array(
'action' => array( 'people' ),
@ -455,7 +455,7 @@ $config['block']['rule_tag'] = array(
);
$config['block']['rule_blogs'] = array(
'action' => array( 'blogs' ),
'blocks' => array( 'right' => array('blogCategory') ),
'blocks' => array( 'right' => array('blogCategories') ),
);
$config['block']['userfeedBlogs'] = array(
@ -470,6 +470,7 @@ $config['block']['userfeedUsers'] = array(
'action' => array('feed'),
'blocks' => array(
'right' => array(
'userfeedFriends'=> array(),
'userfeedUsers'=> array()
)
)

View file

@ -1,162 +1,38 @@
/**
* Блоки
*/
var ls = ls || {};
/**
* Динамическая подгрузка блоков
*/
ls.blocks = (function ($) {
/**
* Опции
*/
this.options = {
active: 'active',
loader: DIR_STATIC_SKIN + '/images/loader.gif',
type: {
stream_comment: {
url: aRouter['ajax']+'stream/comment/'
},
stream_topic: {
url: aRouter['ajax']+'stream/topic/'
},
blogs_top: {
url: aRouter['ajax']+'blogs/top/'
},
blogs_join: {
url: aRouter['ajax']+'blogs/join/'
},
blogs_self: {
url: aRouter['ajax']+'blogs/self/'
}
}
};
this.init = function() {
// Заменяет навигацию на выпадающий список если пунктов больше
// определенного значения
// TODO: Вынести в отдельный функционал
var tabs = $('#js-stream-tabs'),
dropdown = $('#js-stream-dropdown');
/**
* Метод загрузки содержимого блока
*/
this.load = function(obj, block, params){
var type = $(obj).data('type');
ls.hook.marker('loadBefore');
if(!type) return;
type=block+'_'+type;
params=$.extend(true,{},this.options.type[type].params || {},params || {});
var content = $('.js-block-'+block+'-content');
this.showProgress(content);
$('.js-block-'+block+'-item').removeClass(this.options.active);
$(obj).addClass(this.options.active);
ls.ajax(this.options.type[type].url, params, function(result){
var args = [content,result];
ls.hook.marker('onLoadBefore');
this.onLoad.apply(this,args);
}.bind(this));
};
/**
* Переключает вкладки в блоке, без использования Ajax
* @param obj
* @param block
*/
this.switchTab = function(obj, block) {
/**
* Если вкладку передаем как строчку - значение data-type
*/
if (typeof(obj)=='string') {
$('.js-block-'+block+'-item').each(function(k,v){
if ($(v).data('type')==obj) {
obj=v;
return;
}
});
}
/**
* Если не нашли такой вкладки
*/
if (typeof(obj)=='string') {
return false;
if ($('#js-stream-tabs li').length >= 3) {
tabs.hide();
dropdown.show();
}
$('.js-block-'+block+'-item').removeClass(this.options.active);
$(obj).addClass(this.options.active);
$('.js-block-'+block+'-content').hide();
$('.js-block-'+block+'-content').each(function(k,v){
if ($(v).data('type')==$(obj).data('type')) {
$(v).show();
}
});
ls.hook.run('ls_blocks_switch_tab_after',[obj, block],this);
return true;
};
/**
* Отображение процесса загрузки
*/
this.showProgress = function(content) {
content.height(content.height());
content.empty().css({'background': 'url(' + this.options.loader + ') no-repeat center top', 'min-height': 70});
};
/**
* Обработка результатов загрузки
*/
this.onLoad = function(content,result) {
$(this).trigger('loadSuccessful',arguments);
content.empty().css({'background': 'none', 'height': 'auto', 'min-height': 0});
if (result.bStateError) {
ls.msg.error(null, result.sMsg);
} else {
content.html(result.sText);
ls.hook.run('ls_block_onload_html_after',arguments,this);
}
};
this.getCurrentItem = function(block) {
if ($('.js-block-'+block+'-nav').is(':visible')) {
return $('.js-block-'+block+'-nav').find('.js-block-'+block+'-item.'+this.options.active);
} else {
return $('.js-block-'+block+'-dropdown-items').find('.js-block-'+block+'-item.'+this.options.active);
}
};
this.initSwitch = function(block) {
$('.js-block-'+block+'-item').click(function(){
ls.blocks.switchTab(this, block);
return false;
});
};
this.init = function(block,params) {
params=params || {};
$('.js-block-'+block+'-item').click(function(){
ls.blocks.load(this, block);
return false;
});
if (params.group_items) {
this.initNavigation(block,params.group_min);
}
var $this=this;
$('.js-block-'+block+'-update').click(function(){
// Кнопка обновления блока
$('#js-stream-update').on('click', function () {
((tabs.is(':visible')) ? tabs : $('#js-dropdown-menu-stream')).find('li.active').tab('activate');
$(this).addClass('active');
ls.blocks.load($this.getCurrentItem(block), block);
setTimeout( function() { $(this).removeClass('active'); }.bind(this), 600 );
});
};
this.initNavigation = function(block,count) {
count=count || 3;
if ($('.js-block-'+block+'-nav').find('li').length >= count) {
$('.js-block-'+block+'-nav').hide();
$('.js-block-'+block+'-dropdown').show();
} else {
// Transform nav to dropdown
$('.js-block-'+block+'-nav').show();
$('.js-block-'+block+'-dropdown').hide();
}
ls.hook.run('ls_blocks_init_navigation_after',[block,count],this);
// Сохраняем высоту блока при переключении табов
$('.js-block-nav ' + $.fn.tab.settings.tabSelector).tab('option', {
onActivate: function () {
this.$pane.css('height', this.$pane.height());
},
onActivated: function () {
this.$pane.css('height', 'auto');
}
});
};
return this;

View file

@ -43,14 +43,20 @@ ls.favourite = (function ($) {
if (result.bStateError) {
ls.msg.error(null, result.sMsg);
} else {
var counter = $('#fav_count_' + type + '_'+idTarget);
ls.msg.notice(null, result.sMsg);
this.objFavourite.removeClass(this.options.active);
if (result.bState) {
this.objFavourite.addClass(this.options.active);
this.showTags(type,idTarget);
} else {
this.hideTags(type,idTarget);
}
result.iCount > 0 ? counter.show().text(result.iCount) : counter.hide();
ls.hook.run('ls_favourite_toggle_after',[idTarget,objFavourite,type,params,result],this);
}
}.bind(this));

View file

@ -35,7 +35,6 @@ jQuery(document).ready(function($) {
/**
* IE
* TODO: Check browser
*/
// эмуляция border-sizing в IE

View file

@ -1,14 +1,62 @@
/**
* Активность
*/
var ls = ls || {};
ls.stream =( function ($) {
this.isBusy = false;
this.dateLast = null;
this.subscribe = function (iTargetUserId) {
var url = aRouter['stream']+'subscribe/';
var params = {'id':iTargetUserId};
this.options = {
selectors: {
userList: 'js-activity-block-users',
userListId: 'activity-block-users',
inputId: 'activity-block-users-input',
noticeId: 'activity-block-users-notice',
userListItemId: 'activity-block-users-item-'
},
elements: {
userItem: function (element) {
return $('<li id="' + ls.stream.options.selectors.userListItemId + element.uid + '">' +
'<input type="checkbox" ' +
'class="input-checkbox" ' +
'data-user-id="' + element.uid + '" ' +
'checked="checked" />' +
'<a href="' + element.user_web_path + '">' + element.user_login + '</a>' +
'</li>');
}
}
}
/**
* Init
*/
this.init = function () {
var self = this;
$('.' + this.options.selectors.userList).on('change', 'input[type=checkbox]', function () {
var userId = $(this).data('user-id');
$(this).prop('checked') ? self.subscribe(userId) : self.unsubscribe(userId);
});
$('#' + this.options.selectors.inputId).keydown(function (event) {
event.which == 13 && ls.stream.appendUser();
});
};
/**
* Подписаться на пользователя
* @param {Number} iUserId ID пользователя
*/
this.subscribe = function (iUserId) {
var self = this,
url = aRouter['stream'] + 'subscribe/',
params = { 'id': iUserId };
ls.hook.marker('subscribeBefore');
ls.ajax(url, params, function(data) {
if (data.bStateError) {
ls.msg.error(data.sMsgTitle,data.sMsg);
@ -19,11 +67,17 @@ ls.stream =( function ($) {
});
};
this.unsubscribe = function (iId) {
var url = aRouter['stream']+'unsubscribe/';
var params = {'id':iId};
/**
* Отписаться от пользователя
* @param {Number} iUserId ID пользователя
*/
this.unsubscribe = function (iUserId) {
var self = this,
url = aRouter['stream'] + 'unsubscribe/',
params = { 'id': iUserId };
ls.hook.marker('unsubscribeBefore');
ls.ajax(url, params, function(data) {
if (!data.bStateError) {
ls.msg.notice(data.sMsgTitle,data.sMsg);
@ -32,6 +86,43 @@ ls.stream =( function ($) {
});
};
/**
* Подписаться на пользователя
*/
this.appendUser = function() {
var self = this,
sLogin = $('#' + self.options.selectors.inputId).val();
if ( ! sLogin ) return;
ls.hook.marker('appendUserBefore');
ls.ajax(aRouter['stream'] + 'subscribeByLogin/', { 'login' : sLogin }, function(data) {
if ( ! data.bStateError ) {
var checkbox = $('.' + self.options.selectors.userList).find('input[data-user-id=' + data.uid + ']');
$('#' + self.options.selectors.noticeId).remove();
if (checkbox.length) {
if (checkbox.prop("checked")) {
ls.msg.error(ls.lang.get('error'), ls.lang.get('stream_subscribes_already_subscribed'));
} else {
checkbox.prop("checked", true);
ls.msg.notice(data.sMsgTitle,data.sMsg);
}
} else {
$('#' + self.options.selectors.inputId).autocomplete('close').val('');
$('#' + self.options.selectors.userListId).show().append(self.options.elements.userItem(data));
ls.msg.notice(data.sMsgTitle,data.sMsg);
}
ls.hook.run('ls_stream_append_user_after',[checkbox.length,data]);
} else {
ls.msg.error(data.sMsgTitle, data.sMsg);
}
});
};
this.switchEventType = function (iType) {
var url = aRouter['stream']+'switchEventType/';
var params = {'type':iType};
@ -45,37 +136,6 @@ ls.stream =( function ($) {
});
};
this.appendUser = function() {
var sLogin = $('#stream_users_complete').val();
if (!sLogin) return;
var url = aRouter['stream']+'subscribeByLogin/';
var params = {'login':sLogin};
ls.hook.marker('appendUserBefore');
ls.ajax(url, params, function(data) {
if (!data.bStateError) {
$('#stream_no_subscribed_users').remove();
var checkbox = $('#strm_u_'+data.uid);
if (checkbox.length) {
if (checkbox.attr('checked')) {
ls.msg.error(ls.lang.get('error'),ls.lang.get('stream_subscribes_already_subscribed'));
} else {
checkbox.attr('checked', 'on');
ls.msg.notice(data.sMsgTitle,data.sMsg);
}
} else {
var liElement=$('<li><input type="checkbox" class="streamUserCheckbox input-checkbox" id="strm_u_'+data.uid+'" checked="checked" onClick="if ($(this).get(\'checked\')) {ls.stream.subscribe('+data.uid+')} else {ls.stream.unsubscribe('+data.uid+')}" /> <a href="'+data.user_web_path+'">'+data.user_login+'</a></li>');
$('#stream_block_users_list').append(liElement);
ls.msg.notice(data.sMsgTitle,data.sMsg);
}
ls.hook.run('ls_stream_append_user_after',[checkbox.length,data]);
} else {
ls.msg.error(data.sMsgTitle,data.sMsg);
}
});
};
this.getMore = function () {
if (this.isBusy) {
return;

View file

@ -1,8 +1,44 @@
/**
* Лента
*/
var ls = ls || {};
ls.userfeed =( function ($) {
ls.userfeed = (function ($) {
this.isBusy = false;
this.options = {
selectors: {
userList: 'js-userfeed-block-users',
userListId: 'userfeed-block-users',
inputId: 'userfeed-block-users-input',
noticeId: 'userfeed-block-users-notice',
userListItemId: 'userfeed-block-users-item-'
},
elements: {
userItem: function (element) {
return ls.stream.options.elements.userItem(element);
}
}
}
/**
* Init
*/
this.init = function () {
var self = this;
$('.' + this.options.selectors.userList).on('change', 'input[type=checkbox]', function () {
var userId = $(this).data('user-id');
$(this).prop('checked') ? self.subscribe('users', userId) : self.unsubscribe('users', userId);
});
$('#' + this.options.selectors.inputId).keydown(function (event) {
event.which == 13 && ls.userfeed.appendUser();
});
};
this.subscribe = function (sType, iId) {
var url = aRouter['feed']+'subscribe/';
var params = {'type':sType, 'id':iId};
@ -30,30 +66,32 @@ ls.userfeed =( function ($) {
}
this.appendUser = function() {
var sLogin = $('#userfeed_users_complete').val();
if (!sLogin) return;
var url = aRouter['feed']+'subscribeByLogin/';
var params = {'login':sLogin};
var self = this,
sLogin = $('#' + self.options.selectors.inputId).val();
if ( ! sLogin ) return;
ls.hook.marker('appendUserBefore');
ls.ajax(url, params, function(data) {
ls.ajax(aRouter['feed']+'subscribeByLogin/', {'login':sLogin}, function(data) {
if (data.bStateError) {
ls.msg.error(data.sMsgTitle,data.sMsg);
} else {
$('#userfeed_no_subscribed_users').remove();
var checkbox = $('#usf_u_'+data.uid);
var checkbox = $('.' + self.options.selectors.userList).find('input[data-user-id=' + data.uid + ']');
$('#' + self.options.selectors.noticeId).remove();
if (checkbox.length) {
if (checkbox.attr('checked')) {
if (checkbox.prop('checked')) {
ls.msg.error(data.lang_error_title,data.lang_error_msg);
return;
} else {
checkbox.attr('checked', 'on');
checkbox.prop('checked', true);
ls.msg.notice(data.sMsgTitle,data.sMsg);
}
} else {
var liElement=$('<li><input type="checkbox" class="userfeedUserCheckbox input-checkbox" id="usf_u_'+data.uid+'" checked="checked" onClick="if ($(this).get(\'checked\')) {ls.userfeed.subscribe(\'users\','+data.uid+')} else {ls.userfeed.unsubscribe(\'users\','+data.uid+')}" /><a href="'+data.user_web_path+'">'+data.user_login+'</a></li>');
$('#userfeed_block_users_list').append(liElement);
$('#' + self.options.selectors.inputId).autocomplete('close').val('');
$('#' + self.options.selectors.userListId).append(self.options.elements.userItem(data));
ls.msg.notice(data.sMsgTitle,data.sMsg);
}
}

View file

@ -31,6 +31,8 @@ var ls = ls || {};
var self = this,
dropdown = this.$tab.closest('ul').parent('li');
typeof this.options.onActivate === 'function' && $.proxy(this.options.onActivate, this)();
this.$tab
.addClass('active')
.closest($.fn.tab.settings.tabsSelector)
@ -46,16 +48,22 @@ var ls = ls || {};
this.$pane.empty().addClass('loading');
ls.ajax(this.options.url, this.options.params, function (result) {
self.$pane.removeClass('loading');
if (result.bStateError) {
ls.msg.error('Error', result.sMsg);
} else {
self.$pane.removeClass('loading').html(result[self.options.ajaxVar]);
self.$pane.html(result[self.options.ajaxVar]);
}
typeof self.options.onActivated === 'function' && $.proxy(self.options.onActivated, self)();
}, {
error: function () {
ls.msg.error('Error', 'Please try again later');
}
});
} else {
typeof this.options.onActivated === 'function' && $.proxy(this.options.onActivated, this)();
}
}
};
@ -73,7 +81,15 @@ var ls = ls || {};
}
if (typeof options === 'string') {
if (options === "option") {
if (value) object.options[variable] = value; else returnValue = object.options[variable];
if (value) {
object.options[variable] = value;
} else {
if (typeof variable === "object") {
$.extend(object.options, variable);
} else {
returnValue = object.options[variable];
}
}
} else {
object[options]();
}
@ -92,7 +108,9 @@ var ls = ls || {};
target: false,
ajaxVar: 'sText',
url: false,
params: {}
params: {},
onActivate: false,
onActivated: false
};
@ -111,9 +129,4 @@ var ls = ls || {};
$(this).tab('activate');
e.preventDefault();
});
// Init
$(document).ready(function($) {
$($.fn.tab.settings.tabSelector).tab();
});
})(jQuery);

View file

@ -1,4 +1,3 @@
{include file='header.tpl' nav='blog'}
{include file='topic_list.tpl'}
{include file='footer.tpl'}
{include file='footer.tpl'}

View file

@ -1,35 +0,0 @@
<section class="block">
<header class="block-header">
<h3>{$aLang.blog_admin_user_add_header}</h3>
</header>
<div class="block-content">
<form onsubmit="return ls.blog.addInvite({$oBlogEdit->getId()});">
<p>
<label for="blog_admin_user_add">{$aLang.blog_admin_user_add_label}:</label>
<input type="text" id="blog_admin_user_add" name="add" class="input-text input-width-full autocomplete-users-sep" />
</p>
</form>
<br />
<h3>{$aLang.blog_admin_user_invited}:</h3>
<div id="invited_list_block">
{if $aBlogUsersInvited}
<ul id="invited_list">
{foreach from=$aBlogUsersInvited item=oBlogUser}
{assign var='oUser' value=$oBlogUser->getUser()}
<li id="blog-invite-remove-item-{$oBlogEdit->getId()}-{$oUser->getId()}">
<a href="{$oUser->getUserWebPath()}" class="user">{$oUser->getLogin()}</a> -
<a href="#" onclick="return ls.blog.repeatInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_readd}</a>
<a href="#" onclick="return ls.blog.removeInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_remove}</a>
</li>
{/foreach}
</ul>
{/if}
<span id="blog-invite-empty" class="notice-empty" {if $aBlogUsersInvited}style="display: none"{/if}>{$aLang.blog_admin_user_add_empty}</span>
</div>
</div>
</section>

View file

@ -3,5 +3,4 @@
<h2 class="page-header">{$aLang.comments_all}</h2>
{include file='comment_list.tpl'}
{include file='footer.tpl'}
{include file='footer.tpl'}

View file

@ -1,28 +1,6 @@
{hook run='people_sidebar_begin'}
<section class="block">
<header class="block-header">
<h3>{$aLang.user_stats}</h3>
</header>
<div class="block-content">
<ul>
<li>{$aLang.user_stats_all}: <strong>{$aStat.count_all}</strong></li>
<li>{$aLang.user_stats_active}: <strong>{$aStat.count_active}</strong></li>
<li>{$aLang.user_stats_noactive}: <strong>{$aStat.count_inactive}</strong></li>
</ul>
<br />
<ul>
<li>{$aLang.user_stats_sex_man}: <strong>{$aStat.count_sex_man}</strong></li>
<li>{$aLang.user_stats_sex_woman}: <strong>{$aStat.count_sex_woman}</strong></li>
<li>{$aLang.user_stats_sex_other}: <strong>{$aStat.count_sex_other}</strong></li>
</ul>
</div>
</section>
{include file="blocks/block.usersStatistics.tpl"}
{insert name="block" block='tagsCountry'}
{insert name="block" block='tagsCity'}

View file

@ -1,14 +1,8 @@
{assign var="sidebarPosition" value='left'}
{include file='header.tpl'}
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='navs/nav.profile_favourite.tpl'}
{include file='comment_list.tpl'}
{include file='footer.tpl'}

View file

@ -8,8 +8,7 @@
{include file='navs/nav.profile_favourite.tpl'}
{if $oUserCurrent and $oUserCurrent->getId()==$oUserProfile->getId()}
{$aBlockParams.user=$oUserProfile}
{insert name="block" block=tagsFavouriteTopic params=$aBlock.params}
{insert name="block" block=tagsFavouriteTopic params={$aBlockParams.user=$oUserProfile}}
{/if}
{include file='topic_list.tpl'}

View file

@ -2,104 +2,18 @@
{include file='modals/modal.profile_photo_upload.tpl'}
<section class="block block-type-profile">
<div class="profile-photo-wrapper">
<div class="status {if $oUserProfile->isOnline()}status-online{else}status-offline{/if}">{if $oUserProfile->isOnline()}{$aLang.user_status_online}{else}{$aLang.user_status_offline}{/if}</div>
<a href="{$oUserProfile->getUserWebPath()}"><img src="{$oUserProfile->getProfileFotoPath()}" alt="photo" class="profile-photo" id="foto-img" /></a>
</div>
{if $sAction=='settings' and $oUserCurrent and $oUserCurrent->getId() == $oUserProfile->getId()}
<script type="text/javascript">
jQuery(function($){
$('#foto-upload').file({ name:'foto' }).choose(function(e, input) {
ls.user.uploadFoto(null,input);
});
});
</script>
<p class="upload-photo">
<a href="#" id="foto-upload" class="link-dotted">{if $oUserCurrent->getProfileFoto()}{$aLang.settings_profile_photo_change}{else}{$aLang.settings_profile_photo_upload}{/if}</a>&nbsp;&nbsp;&nbsp;
<a href="#" id="foto-remove" class="link-dotted" onclick="return ls.user.removeFoto();" style="{if !$oUserCurrent->getProfileFoto()}display:none;{/if}">{$aLang.settings_profile_foto_delete}</a>
</p>
{/if}
</section>
{if $oUserCurrent && $oUserCurrent->getId()!=$oUserProfile->getId()}
<script type="text/javascript">
jQuery(function($){
ls.lang.load({lang_load name="profile_user_unfollow,profile_user_follow"});
});
</script>
<section class="block block-type-profile-actions">
<div class="block-content">
<ul class="profile-actions" id="profile_actions">
{include file='actions/ActionProfile/friend_item.tpl' oUserFriend=$oUserProfile->getUserFriend()}
<li><a href="{router page='talk'}add/?talk_users={$oUserProfile->getLogin()}">{$aLang.user_write_prvmsg}</a></li>
<li>
<a href="#" onclick="ls.user.followToggle(this, {$oUserProfile->getId()}); return false;" class="{if $oUserProfile->isFollow()}followed{/if}">
{if $oUserProfile->isFollow()}{$aLang.profile_user_unfollow}{else}{$aLang.profile_user_follow}{/if}
</a>
</li>
</ul>
</div>
</section>
{/if}
{include file='blocks/block.profilePhoto.tpl'}
{if $oUserCurrent && $oUserCurrent->getId() != $oUserProfile->getId()}
<section class="block block-type-profile-note">
{if $oUserNote}
<script type="text/javascript">
ls.usernote.sText = {json var = $oUserNote->getText()};
</script>
{/if}
{include file='blocks/block.profileActions.tpl'}
{/if}
<div id="usernote-note" class="profile-note" {if !$oUserNote}style="display: none;"{/if}>
<p id="usernote-note-text">
{if $oUserNote}
{$oUserNote->getText()}
{/if}
</p>
<ul class="actions">
<li><a href="#" onclick="return ls.usernote.showForm();" class="link-dotted">{$aLang.user_note_form_edit}</a></li>
<li><a href="#" onclick="return ls.usernote.remove({$oUserProfile->getId()});" class="link-dotted">{$aLang.user_note_form_delete}</a></li>
</ul>
</div>
<div id="usernote-form" style="display: none;">
<p><textarea rows="4" cols="20" id="usernote-form-text" class="input-text input-width-full"></textarea></p>
<button type="submit" onclick="return ls.usernote.save({$oUserProfile->getId()});" class="button button-primary">{$aLang.user_note_form_save}</button>
<button type="submit" onclick="return ls.usernote.hideForm();" class="button">{$aLang.user_note_form_cancel}</button>
</div>
<a href="#" onclick="return ls.usernote.showForm();" id="usernote-button-add" class="link-dotted" {if $oUserNote}style="display:none;"{/if}>{$aLang.user_note_add}</a>
</section>
{if $oUserCurrent && $oUserCurrent->getId() != $oUserProfile->getId()}
{include file='blocks/block.profileNote.tpl'}
{/if}
{hook run='profile_sidebar_menu_before' oUserProfile=$oUserProfile}
<section class="block block-type-profile-nav">
<ul class="nav nav-pills nav-stacked">
{hook run='profile_sidebar_menu_item_first' oUserProfile=$oUserProfile}
<li {if $sAction=='profile' && ($aParams[0]=='whois' or $aParams[0]=='')}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='wall'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}wall/">{$aLang.user_menu_profile_wall}{if ($iCountWallUser)>0} ({$iCountWallUser}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='created'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}created/topics/">{$aLang.user_menu_publication}{if ($iCountCreated)>0} ({$iCountCreated}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='favourites'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/topics/">{$aLang.user_menu_profile_favourites}{if ($iCountFavourite)>0} ({$iCountFavourite}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='friends'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}friends/">{$aLang.user_menu_profile_friends}{if ($iCountFriendsUser)>0} ({$iCountFriendsUser}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='stream'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}stream/">{$aLang.user_menu_profile_stream}</a></li>
{if $oUserCurrent and $oUserCurrent->getId() == $oUserProfile->getId()}
<li {if $sAction=='talk'}class="active"{/if}><a href="{router page='talk'}">{$aLang.talk_menu_inbox}{if $iUserCurrentCountTalkNew} ({$iUserCurrentCountTalkNew}){/if}</a></li>
<li {if $sAction=='settings'}class="active"{/if}><a href="{router page='settings'}">{$aLang.settings_menu}</a></li>
{/if}
{hook run='profile_sidebar_menu_item_last' oUserProfile=$oUserProfile}
</ul>
</section>
{include file='blocks/block.profileNav.tpl'}
{hook run='profile_sidebar_end' oUserProfile=$oUserProfile}
{hook run='profile_sidebar_end' oUserProfile=$oUserProfile}

View file

@ -4,29 +4,22 @@
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='navs/nav.talk.tpl'}
<section class="block">
<header class="block-header">
<h3>{$aLang.talk_blacklist_title}</h3>
</header>
<form onsubmit="return ls.talk.addToBlackList();">
<p><label for="talk_blacklist_add">{$aLang.talk_balcklist_add_label}:</label>
<input type="text" id="talk_blacklist_add" name="add" class="input-text input-width-full autocomplete-users-sep" /></p>
</form>
<div class="block-content">
<form onsubmit="return ls.talk.addToBlackList();">
<p><label for="talk_blacklist_add">{$aLang.talk_balcklist_add_label}:</label>
<input type="text" id="talk_blacklist_add" name="add" class="input-text input-width-full autocomplete-users-sep" /></p>
</form>
<div id="black_list_block">
{if $aUsersBlacklist}
<ul class="list" id="black_list">
{foreach from=$aUsersBlacklist item=oUser}
<li id="blacklist_item_{$oUser->getId()}_area"><a href="{$oUser->getUserWebPath()}" class="user">{$oUser->getLogin()}</a> - <a href="#" id="blacklist_item_{$oUser->getId()}" class="delete">{$aLang.blog_delete}</a></li>
{/foreach}
</ul>
{/if}
</div>
<div id="black_list_block">
{if $aUsersBlacklist}
<ul class="list" id="black_list">
{foreach from=$aUsersBlacklist item=oUser}
<li id="blacklist_item_{$oUser->getId()}_area"><a href="{$oUser->getUserWebPath()}" class="user">{$oUser->getLogin()}</a> - <a href="#" id="blacklist_item_{$oUser->getId()}" class="delete">{$aLang.blog_delete}</a></li>
{/foreach}
</ul>
{/if}
</div>
</div>
</section>
{include file='footer.tpl'}

View file

@ -1,31 +1,26 @@
<section class="block block-type-foldable block-type-talk-search">
<header class="block-header">
<h3><a href="#" class="link-dotted" onclick="jQuery('#block_talk_search_content').toggle(); return false;">{$aLang.talk_filter_title}</a></h3>
</header>
{* TODO: Slider *}
<a href="#" class="link-dotted" onclick="jQuery('#block_talk_search_content').toggle(); return false;">{$aLang.talk_filter_title}</a></h3>
<div class="block-content" id="block_talk_search_content" {if $_aRequest.submit_talk_filter}style="display:block;" {/if}>
<form action="{router page='talk'}" method="GET" name="talk_filter_form">
<p><label for="talk_filter_sender">{$aLang.talk_filter_label_sender}:</label>
<input type="text" id="talk_filter_sender" name="sender" value="{$_aRequest.sender}" class="input-text input-width-full" />
<small class="note">{$aLang.talk_filter_notice_sender}</small></p>
<form action="{router page='talk'}" method="GET" name="talk_filter_form" id="block_talk_search_content" {if $_aRequest.submit_talk_filter}style="display:block;"{/if}>
<p><label for="talk_filter_sender">{$aLang.talk_filter_label_sender}:</label>
<input type="text" id="talk_filter_sender" name="sender" value="{$_aRequest.sender}" class="input-text input-width-full" />
<small class="note">{$aLang.talk_filter_notice_sender}</small></p>
<p><label for="talk_filter_keyword">{$aLang.talk_filter_label_keyword}:</label>
<input type="text" id="talk_filter_keyword" name="keyword" value="{$_aRequest.keyword}" class="input-text input-width-full" />
<small class="note">{$aLang.talk_filter_notice_keyword}</small></p>
<p><label for="talk_filter_keyword">{$aLang.talk_filter_label_keyword}:</label>
<input type="text" id="talk_filter_keyword" name="keyword" value="{$_aRequest.keyword}" class="input-text input-width-full" />
<small class="note">{$aLang.talk_filter_notice_keyword}</small></p>
<p><label for="talk_filter_keyword_text">{$aLang.talk_filter_label_keyword_text}:</label>
<input type="text" id="talk_filter_keyword_text" name="keyword_text" value="{$_aRequest.keyword_text}" class="input-text input-width-full" />
<small class="note">{$aLang.talk_filter_notice_keyword}</small></p>
<p><label for="talk_filter_keyword_text">{$aLang.talk_filter_label_keyword_text}:</label>
<input type="text" id="talk_filter_keyword_text" name="keyword_text" value="{$_aRequest.keyword_text}" class="input-text input-width-full" />
<small class="note">{$aLang.talk_filter_notice_keyword}</small></p>
<p><label for="talk_filter_start">{$aLang.talk_filter_label_date}:</label>
<input type="text" id="talk_filter_start" name="start" value="{$_aRequest.start}" style="width: 43%" class="input-text date-picker" readonly="readonly" /> &mdash;
<input type="text" id="talk_filter_end" name="end" value="{$_aRequest.end}" style="width: 43%" class="input-text date-picker" readonly="readonly" /></p>
<p><label for="talk_filter_start">{$aLang.talk_filter_label_date}:</label>
<input type="text" id="talk_filter_start" name="start" value="{$_aRequest.start}" style="width: 43%" class="input-text date-picker" readonly="readonly" /> &mdash;
<input type="text" id="talk_filter_end" name="end" value="{$_aRequest.end}" style="width: 43%" class="input-text date-picker" readonly="readonly" /></p>
<p><label for="talk_filter_favourite"><input type="checkbox" {if $_aRequest.favourite}checked="checked" {/if} class="input-checkbox" name="favourite" value="1" id="talk_filter_favourite" />
{$aLang.talk_filter_label_favourite}</label></p>
<p><label for="talk_filter_favourite"><input type="checkbox" {if $_aRequest.favourite}checked="checked" {/if} class="input-checkbox" name="favourite" value="1" id="talk_filter_favourite" />
{$aLang.talk_filter_label_favourite}</label></p>
<input type="submit" name="submit_talk_filter" value="{$aLang.talk_filter_submit}" class="button button-primary" />
<input type="submit" name="" value="{$aLang.talk_filter_submit_clear}" class="button" onclick="return ls.talk.clearFilter();" />
</form>
</div>
</section>
<input type="submit" name="submit_talk_filter" value="{$aLang.talk_filter_submit}" class="button button-primary" />
<input type="submit" name="" value="{$aLang.talk_filter_submit_clear}" class="button" onclick="return ls.talk.clearFilter();" />
</form>

View file

@ -1,26 +1,23 @@
<section class="block block-type-foldable block-type-talk-friends">
<header class="block-header">
<h3><a href="#" class="link-dotted" onclick="jQuery('#block_talk_friends_content').toggle(); return false;">{$aLang.block_friends}</a></h3>
</header>
{* TODO: Slider *}
<div class="block-content" id="block_talk_friends_content">
{if $aUsersFriend}
<ul class="list" id="friends">
{foreach from=$aUsersFriend item=oFriend}
<li>
<input id="talk_friend_{$oFriend->getId()}" type="checkbox" name="friend[{$oFriend->getId()}]" class="input-checkbox" />
<label for="talk_friend_{$oFriend->getId()}" id="talk_friend_{$oFriend->getId()}_label">{$oFriend->getLogin()}</label>
</li>
{/foreach}
</ul>
<footer>
<a href="#" id="friend_check_all">{$aLang.block_friends_check}</a> |
<a href="#" id="friend_uncheck_all">{$aLang.block_friends_uncheck}</a>
</footer>
{else}
<div class="notice-empty">{$aLang.block_friends_empty}</div>
{/if}
</div>
</section>
<a href="#" class="link-dotted" onclick="jQuery('#block_talk_friends_content').toggle(); return false;">{$aLang.block_friends}</a>
<div id="block_talk_friends_content">
{if $aUsersFriend}
<ul class="list" id="friends">
{foreach from=$aUsersFriend item=oFriend}
<li>
<input id="talk_friend_{$oFriend->getId()}" type="checkbox" name="friend[{$oFriend->getId()}]" class="input-checkbox" />
<label for="talk_friend_{$oFriend->getId()}" id="talk_friend_{$oFriend->getId()}_label">{$oFriend->getLogin()}</label>
</li>
{/foreach}
</ul>
<footer>
<a href="#" id="friend_check_all">{$aLang.block_friends_check}</a> |
<a href="#" id="friend_uncheck_all">{$aLang.block_friends_uncheck}</a>
</footer>
{else}
<div class="notice-empty">{$aLang.block_friends_empty}</div>
{/if}
</div>

View file

@ -0,0 +1,39 @@
{**
* Выбор друзей для чтения в ленте активности
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.stream_block_users_friends}{/block}
{block name='type'}activity{/block}
{block name='content'}
{if $oUserCurrent}
<small class="note">{$aLang.stream_settings_note_follow_friend}</small>
{if count($aStreamFriends)}
<ul class="user-list-mini max-height-200 js-activity-block-users">
{foreach from=$aStreamFriends item=oUser}
{assign var=iUserId value=$oUser->getId()}
<li id="activity-block-users-item-{$iUserId}">
<input class="input-checkbox"
type="checkbox"
{if isset($aStreamSubscribedUsers.$iUserId)}checked="checked"{/if}
data-user-id="{$iUserId}" />
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/foreach}
</ul>
{else}
<small class="note">{$aLang.stream_no_subscribed_users}</small>
{/if}
{/if}
{/block}

View file

@ -0,0 +1,39 @@
{**
* Блок настройки ленты активности
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.stream_block_config_title}{/block}
{block name='type'}activity{/block}
{block name='content'}
{if $oUserCurrent}
<small class="note">{$aLang.stream_settings_note_filter}</small>
<ul class="activity-settings-filter">
{foreach from=$aStreamEventTypes key=sType item=aEventType}
{if !($oConfig->get('module.stream.disable_vote_events') && substr($sType, 0, 4) == 'vote')}
<li>
<label>
<input class="streamEventTypeCheckbox input-checkbox"
type="checkbox"
id="strn_et_{$sType}"
{if in_array($sType, $aStreamTypesList)}checked="checked"{/if}
onClick="ls.stream.switchEventType('{$sType}')" />
{assign var=langKey value="stream_event_type_`$sType`"}
{$aLang.$langKey}
</label>
</li>
{/if}
{/foreach}
</ul>
{/if}
{/block}

View file

@ -0,0 +1,44 @@
{**
* Выбор пользователей для чтения в ленте активности
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.stream_block_users_title}{/block}
{block name='type'}activity{/block}
{block name='content'}
{if $oUserCurrent}
<small class="note">{$aLang.stream_settings_note_follow_user}</small>
<p><input type="text" id="activity-block-users-input" autocomplete="off" placeholder="{$aLang.stream_block_config_append}" class="autocomplete-users input-text input-width-full" /></p>
{if $aStreamSubscribedUsers}
<ul id="activity-block-users" class="user-list-mini max-height-200 js-activity-block-users">
{foreach from=$aStreamSubscribedUsers item=oUser}
{assign var=iUserId value=$oUser->getId()}
{if !isset($aStreamFriends.$iUserId)}
<li id="activity-block-users-item-{$iUserId}">
<input class="input-checkbox"
type="checkbox"
checked="checked"
data-user-id="{$iUserId}" />
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/if}
{/foreach}
</ul>
{else}
<ul id="activity-block-users" style="display: none;"></ul>
<p id="activity-block-users-notice">{$aLang.stream_no_subscribed_users}</p>
{/if}
{/if}
{/block}

View file

@ -0,0 +1,52 @@
{**
* Базовый шаблон блоков
*
* Доступные опции:
* noHeader (bool) - Не выводить шапку блока
* noNav (bool) - Не выводить навигацию
* noContent (bool) - Не выводить контент
* noFooter (bool) - Не выводить подвал блока
*}
{block name='options'}{/block}
<div class="block block-type-{block name='type'}default{/block} {block name='class'}{/block}" id="{block name='id'}{/block}" {block name='attributes'}{/block}>
{* Header *}
{if !$noHeader}
<header class="block-header">
<h3 class="block-title">{block name='title'}No title{/block}</h3>
{block name='header_end'}{/block}
</header>
{/if}
{block name='header_after'}{/block}
{* Navigation *}
{if !$noNav}
<nav class="block-nav">
{block name='nav'}No nav{/block}
</nav>
{/if}
{block name='nav_after'}{/block}
{* Content *}
{if !$noContent}
<div class="block-content">
{block name='content'}No content{/block}
</div>
{/if}
{block name='content_after'}{/block}
{* Footer *}
{if !$noFooter}
<footer class="block-footer">
{block name='footer'}No footer{/block}
</footer>
{/if}
{block name='footer_after'}{/block}
</div>

View file

@ -1,23 +1,37 @@
{if $oTopic}
{assign var="oBlog" value=$oTopic->getBlog()}
{if $oBlog->getType()!='personal'}
<section class="block block-type-blog">
<header class="block-header">
<h3><a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape:'html'}</a></h3>
</header>
{**
* Краткая информация о блоге на странице топика
*
* @styles css/blocks.css
*}
<div class="block-content">
<span id="blog_user_count_{$oBlog->getId()}">{$oBlog->getCountUser()}</span> {$oBlog->getCountUser()|declension:$aLang.reader_declension:'russian'}<br />
{$oBlog->getCountTopic()} {$oBlog->getCountTopic()|declension:$aLang.topic_declension:'russian'}
<br />
<br />
{if $oUserCurrent and $oUserCurrent->getId()!=$oBlog->getOwnerId()}
<button type="submit" class="button button-primary {if $oBlog->getUserIsJoin()}active{/if}" id="blog-join" data-only-text="1" onclick="ls.blog.toggleJoin(this,{$oBlog->getId()}); return false;">{if $oBlog->getUserIsJoin()}{$aLang.blog_leave}{else}{$aLang.blog_join}{/if}</button>&nbsp;&nbsp;
{/if}
<a href="{router page='rss'}blog/{$oBlog->getUrl()}/" class="rss">RSS</a>
</div>
</section>
{/if}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var="oBlog" value=$oTopic->getBlog()}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{if $oTopic && $oBlog->getType() != 'personal'}
{block name='title'}<a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape:'html'}</a>{/block}
{block name='class'}block-type-blog{/block}
{block name='content'}
<span id="blog_user_count_{$oBlog->getId()}">{$oBlog->getCountUser()}</span>
{$oBlog->getCountUser()|declension:$aLang.reader_declension:'russian'}<br />
{$oBlog->getCountTopic()} {$oBlog->getCountTopic()|declension:$aLang.topic_declension:'russian'}
<br />
<br />
{if $oUserCurrent and $oUserCurrent->getId() != $oBlog->getOwnerId()}
<button type="submit"
class="button button-primary {if $oBlog->getUserIsJoin()}active{/if}"
id="blog-join"
data-only-text="1"
onclick="ls.blog.toggleJoin(this,{$oBlog->getId()}); return false;">{if $oBlog->getUserIsJoin()}{$aLang.blog_leave}{else}{$aLang.blog_join}{/if}</button>&nbsp;&nbsp;
{/if}
<a href="{router page='rss'}blog/{$oBlog->getUrl()}/" class="rss">RSS</a>
{/block}
{/if}

View file

@ -0,0 +1,34 @@
{**
* Категории блогов
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.block_category_blog}{/block}
{block name='type'}blog-categories{/block}
{block name='header_end'}
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
<a href="{router page="admin"}blogcategory/" title="{$aLang.admin_list_blogcategory}" class="icon-cog blog-categories-admin"></a>
{/if}
{/block}
{block name='content'}
{if $aBlogCategories}
<ul class="blog-category-list">
<li {if !$oBlogCategoryCurrent}class="active"{/if}><a href="{router page='blogs'}">{$aLang.block_category_blog_all} ({$iCountBlogsAll})</a></li>
{foreach from=$aBlogCategories item=oCategory}
<li {if $oBlogCategoryCurrent and $oBlogCategoryCurrent->getId()==$oCategory->getId()}class="active"{/if}><a style="margin-left: {$oCategory->getLevel()*20}px;" href="{$oCategory->getUrlWeb()}">{$oCategory->getTitle()|escape:'html'} ({$oCategory->getCountBlogs()})</a></li>
{/foreach}
</ul>
{else}
No categories {* TODO: Language *}
{/if}
{/block}

View file

@ -1,21 +0,0 @@
{if $aBlogCategories}
<section class="block block-type-blog-categories">
<header class="block-header">
<h3>{$aLang.block_category_blog}</h3>
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
<a href="{router page="admin"}blogcategory/" title="{$aLang.admin_list_blogcategory}" class="icon-cog blog-categories-admin"></a>
{/if}
</header>
<div class="block-content">
<ul class="blog-category-list">
<li {if !$oBlogCategoryCurrent}class="active"{/if}><a href="{router page='blogs'}">{$aLang.block_category_blog_all} ({$iCountBlogsAll})</a></li>
{foreach from=$aBlogCategories item=oCategory}
<li {if $oBlogCategoryCurrent and $oBlogCategoryCurrent->getId()==$oCategory->getId()}class="active"{/if}><a style="margin-left: {$oCategory->getLevel()*20}px;" href="{$oCategory->getUrlWeb()}">{$oCategory->getTitle()|escape:'html'} ({$oCategory->getCountBlogs()})</a></li>
{/foreach}
</ul>
</div>
</section>
{/if}

View file

@ -1,20 +1,15 @@
<section class="block">
<header class="block-header">
<h3>{$aLang.block_blog_info}</h3>
</header>
<div class="block-content">
<p id="block_blog_info" class="text"></p>
</div>
</section>
{**
* Информация о блоге показываемая при создании топика
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
<section class="block">
<header class="block-header">
<h3>{$aLang.block_blog_info_note}</h3>
</header>
<div class="block-content">
<p>{$aLang.block_blog_info_note_text}</p>
</div>
</section>
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.block_blog_info}{/block}
{block name='content'}<p id="block_blog_info" class="text"></p>{/block}

View file

@ -0,0 +1,15 @@
{**
* Подсказка отображаемая при создании топика
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.block_blog_info_note}{/block}
{block name='content'}{$aLang.block_blog_info_note_text}{/block}

View file

@ -0,0 +1,46 @@
{**
* Приглашение пользователей в закрытый блог.
* Выводится на странице администрирования пользователей закрытого блога.
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.blog_admin_user_add_header}{/block}
{block name='type'}blog-invite{/block}
{block name='content'}
<form onsubmit="return ls.blog.addInvite({$oBlogEdit->getId()});">
<p>
<label for="blog_admin_user_add">{$aLang.blog_admin_user_add_label}:</label>
<input type="text" id="blog_admin_user_add" name="add" class="input-text input-width-full autocomplete-users-sep" />
</p>
</form>
<br />
<h3>{$aLang.blog_admin_user_invited}:</h3>
<div id="invited_list_block">
{if $aBlogUsersInvited}
<ul id="invited_list">
{foreach from=$aBlogUsersInvited item=oBlogUser}
{assign var='oUser' value=$oBlogUser->getUser()}
<li id="blog-invite-remove-item-{$oBlogEdit->getId()}-{$oUser->getId()}">
<a href="{$oUser->getUserWebPath()}" class="user">{$oUser->getLogin()}</a> -
<a href="#" onclick="return ls.blog.repeatInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_readd}</a>
<a href="#" onclick="return ls.blog.removeInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_remove}</a>
</li>
{/foreach}
</ul>
{/if}
<span id="blog-invite-empty" class="notice-empty" {if $aBlogUsersInvited}style="display: none"{/if}>{$aLang.blog_admin_user_add_empty}</span>
</div>
{/block}

View file

@ -0,0 +1,37 @@
{**
* Навигация по блогам с возможностью выбрать категорию и блог из этой категории
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.block_blog_navigator}{/block}
{block name='type'}blog-navigation{/block}
{block name='content'}
{if $aNavigatorBlogCategories}
<p><select id="blog-navigator-category" class="width-full blog-navigator-categories" onchange="ls.blog.loadBlogsByCategory($(this).val());">
<option value="0">{$aLang.blog_category}</option>
{foreach from=$aNavigatorBlogCategories item=oCategoryItem}
<option style="margin-left: {$oCategoryItem->getLevel()*20}px;" value="{$oCategoryItem->getId()}">{$oCategoryItem->getTitle()|escape:'html'}</option>
{/foreach}
</select></p>
<p><select id="blog-navigator-blog" class="width-full" disabled>
<option value="0">{$aLang.blog}</option>
{foreach from=$aNavigatorBlogs item=oBlogItem}
<option value="{$oBlogItem->getId()}" data-url="{$oBlogItem->getUrlFull()}">{$oBlogItem->getTitle()|escape:'html'}</option>
{/foreach}
</select></p>
<button onclick="ls.blog.navigatorGoSelectBlog();" class="button" id="blog-navigator-button" disabled>{$aLang.block_blog_navigator_button}</button>
{else}
No categories {* TODO: Language *}
{/if}
{/block}

View file

@ -1,26 +0,0 @@
{if $aNavigatorBlogCategories}
<section class="block block-type-blog-navigation">
<header class="block-header">
<h3>{$aLang.block_blog_navigator}</h3>
</header>
<div class="block-content">
<select id="blog-navigator-category" class="width-full blog-navigator-categories" onchange="ls.blog.loadBlogsByCategory($(this).val());">
<option value="0">{$aLang.blog_category}</option>
{foreach from=$aNavigatorBlogCategories item=oCategoryItem}
<option style="margin-left: {$oCategoryItem->getLevel()*20}px;" value="{$oCategoryItem->getId()}">{$oCategoryItem->getTitle()|escape:'html'}</option>
{/foreach}
</select>
<br/><br/>
<select id="blog-navigator-blog" class="width-full" disabled>
<option value="0">{$aLang.blog}</option>
{foreach from=$aNavigatorBlogs item=oBlogItem}
<option value="{$oBlogItem->getId()}" data-url="{$oBlogItem->getUrlFull()}">{$oBlogItem->getTitle()|escape:'html'}</option>
{/foreach}
</select>
<br/><br/>
<button onclick="ls.blog.navigatorGoSelectBlog();" class="button" id="blog-navigator-button" disabled>{$aLang.block_blog_navigator_button}</button>
</div>
</section>
{/if}

View file

@ -1,27 +1,31 @@
<div class="block" id="block_blogs">
<header class="block-header">
<h3>{$aLang.block_blogs}</h3>
<div class="block-update js-block-blogs-update"></div>
</header>
<div class="block-content">
<ul class="nav nav-pills js-block-blogs-nav">
<li class="active js-block-blogs-item" data-type="top"><a href="#">{$aLang.block_blogs_top}</a></li>
{if $oUserCurrent}
<li class="js-block-blogs-item" data-type="join"><a href="#">{$aLang.block_blogs_join}</a></li>
<li class="js-block-blogs-item" data-type="self"><a href="#">{$aLang.block_blogs_self}</a></li>
{/if}
</ul>
<div class="js-block-blogs-content">
{$sBlogsTop}
</div>
{**
* Блок со списоком блогов
*
* @styles css/blocks.css
*}
<footer>
<a href="{router page='blogs'}">{$aLang.block_blogs_all}</a>
</footer>
{extends file='blocks/block.aside.base.tpl'}
{block name='title'}{$aLang.block_blogs}{/block}
{block name='type'}blogs{/block}
{block name='nav'}
<ul class="nav nav-pills js-block-nav" data-type="tabs">
<li data-type="tab" data-option-url="{router page='ajax'}blogs/top" data-option-target="js-tab-pane-blogs" class="active"><a href="#">{$aLang.block_blogs_top}</a></li>
{if $oUserCurrent}
<li data-type="tab" data-option-url="{router page='ajax'}blogs/join" data-option-target="js-tab-pane-blogs"><a href="#">{$aLang.block_blogs_join}</a></li>
<li data-type="tab" data-option-url="{router page='ajax'}blogs/self" data-option-target="js-tab-pane-blogs"><a href="#">{$aLang.block_blogs_self}</a></li>
{/if}
</ul>
{/block}
{block name='content'}
<div id="js-tab-pane-blogs">
{$sBlogsTop}
</div>
</div>
{/block}
{block name='footer'}
<a href="{router page='blogs'}">{$aLang.block_blogs_all}</a>
{/block}

View file

@ -1,3 +1,10 @@
{**
* Блок со списоком блогов
* Список блогов
*
* @styles css/blocks.css
*}
<ul class="item-list">
{foreach from=$aBlogs item=oBlog}
<li>

View file

@ -0,0 +1,35 @@
{**
* Меню пользователя ("Добавить в друзья", "Написать письмо" и т.д.)
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noHeader' value=true}
{assign var='noNav' value=true}
{assign var='noContent' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='type'}profile-actions{/block}
{block name='content_after'}
<script type="text/javascript">
jQuery(function($){
ls.lang.load({lang_load name="profile_user_unfollow,profile_user_follow"});
});
</script>
<ul class="profile-actions" id="profile_actions">
{include file='actions/ActionProfile/friend_item.tpl' oUserFriend=$oUserProfile->getUserFriend()}
<li><a href="{router page='talk'}add/?talk_users={$oUserProfile->getLogin()}">{$aLang.user_write_prvmsg}</a></li>
<li>
<a href="#" onclick="ls.user.followToggle(this, {$oUserProfile->getId()}); return false;" class="{if $oUserProfile->isFollow()}followed{/if}">
{if $oUserProfile->isFollow()}{$aLang.profile_user_unfollow}{else}{$aLang.profile_user_follow}{/if}
</a>
</li>
</ul>
{/block}

View file

@ -0,0 +1,36 @@
{**
* Блок с навигацией по профилю пользователя
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noHeader' value=true}
{assign var='noNav' value=true}
{assign var='noContent' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='type'}profile-nav{/block}
{block name='content_after'}
<ul class="nav nav-pills nav-stacked">
{hook run='profile_sidebar_menu_item_first' oUserProfile=$oUserProfile}
<li {if $sAction=='profile' && ($aParams[0]=='whois' or $aParams[0]=='')}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='wall'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}wall/">{$aLang.user_menu_profile_wall}{if ($iCountWallUser)>0} ({$iCountWallUser}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='created'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}created/topics/">{$aLang.user_menu_publication}{if ($iCountCreated)>0} ({$iCountCreated}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='favourites'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/topics/">{$aLang.user_menu_profile_favourites}{if ($iCountFavourite)>0} ({$iCountFavourite}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='friends'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}friends/">{$aLang.user_menu_profile_friends}{if ($iCountFriendsUser)>0} ({$iCountFriendsUser}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='stream'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}stream/">{$aLang.user_menu_profile_stream}</a></li>
{if $oUserCurrent and $oUserCurrent->getId() == $oUserProfile->getId()}
<li {if $sAction=='talk'}class="active"{/if}><a href="{router page='talk'}">{$aLang.talk_menu_inbox}{if $iUserCurrentCountTalkNew} ({$iUserCurrentCountTalkNew}){/if}</a></li>
<li {if $sAction=='settings'}class="active"{/if}><a href="{router page='settings'}">{$aLang.settings_menu}</a></li>
{/if}
{hook run='profile_sidebar_menu_item_last' oUserProfile=$oUserProfile}
</ul>
{/block}

View file

@ -0,0 +1,45 @@
{**
* Блок с заметкой о пользователе
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noHeader' value=true}
{assign var='noNav' value=true}
{assign var='noContent' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='type'}profile-note{/block}
{block name='content_after'}
{if $oUserNote}
<script type="text/javascript">
ls.usernote.sText = {json var = $oUserNote->getText()};
</script>
{/if}
<div id="usernote-note" class="profile-note" {if !$oUserNote}style="display: none;"{/if}>
<p id="usernote-note-text">
{if $oUserNote}
{$oUserNote->getText()}
{/if}
</p>
<ul class="actions">
<li><a href="#" onclick="return ls.usernote.showForm();" class="link-dotted">{$aLang.user_note_form_edit}</a></li>
<li><a href="#" onclick="return ls.usernote.remove({$oUserProfile->getId()});" class="link-dotted">{$aLang.user_note_form_delete}</a></li>
</ul>
</div>
<div id="usernote-form" style="display: none;">
<p><textarea rows="4" cols="20" id="usernote-form-text" class="input-text input-width-full"></textarea></p>
<button type="submit" onclick="return ls.usernote.save({$oUserProfile->getId()});" class="button button-primary">{$aLang.user_note_form_save}</button>
<button type="submit" onclick="return ls.usernote.hideForm();" class="button">{$aLang.user_note_form_cancel}</button>
</div>
<a href="#" onclick="return ls.usernote.showForm();" id="usernote-button-add" class="link-dotted" {if $oUserNote}style="display:none;"{/if}>{$aLang.user_note_add}</a>
{/block}

View file

@ -0,0 +1,38 @@
{**
* Блок с фотографией пользователя в профиле
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noHeader' value=true}
{assign var='noNav' value=true}
{assign var='noContent' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='type'}profile-photo{/block}
{block name='content_after'}
<div class="profile-photo-wrapper">
<div class="status {if $oUserProfile->isOnline()}status-online{else}status-offline{/if}">{if $oUserProfile->isOnline()}{$aLang.user_status_online}{else}{$aLang.user_status_offline}{/if}</div>
<a href="{$oUserProfile->getUserWebPath()}"><img src="{$oUserProfile->getProfileFotoPath()}" alt="photo" class="profile-photo" id="foto-img" /></a>
</div>
{if $sAction=='settings' and $oUserCurrent and $oUserCurrent->getId() == $oUserProfile->getId()}
<script type="text/javascript">
jQuery(function($){
$('#foto-upload').file({ name:'foto' }).choose(function(e, input) {
ls.user.uploadFoto(null,input);
});
});
</script>
<p class="upload-photo">
<a href="#" id="foto-upload" class="link-dotted">{if $oUserCurrent->getProfileFoto()}{$aLang.settings_profile_photo_change}{else}{$aLang.settings_profile_photo_upload}{/if}</a>&nbsp;&nbsp;&nbsp;
<a href="#" id="foto-remove" class="link-dotted" onclick="return ls.user.removeFoto();" style="{if !$oUserCurrent->getProfileFoto()}display:none;{/if}">{$aLang.settings_profile_foto_delete}</a>
</p>
{/if}
{/block}

View file

@ -1,36 +1,58 @@
<section class="block block-type-stream">
<header class="block-header">
<h3><a href="{router page='comments'}" title="{$aLang.block_stream_comments_all}">{$aLang.block_stream}</a></h3>
<div class="block-update js-block-stream-update"></div>
</header>
{**
* Прямой эфир
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noContent' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}<a href="{router page='comments'}" title="{$aLang.block_stream_comments_all}">{$aLang.block_stream}</a>{/block}
{block name='type'}stream{/block}
{* Кнопка обновления *}
{block name='header_end'}
<div class="block-update" id="js-stream-update"></div>
{/block}
{* Навигация *}
{block name='nav'}
{hook run='block_stream_nav_item' assign="sItemsHook"}
<div class="block-content">
<ul class="nav nav-pills js-block-stream-nav" {if $sItemsHook}style="display: none;"{/if}>
<li class="active js-block-stream-item" data-type="comment"><a href="#">{$aLang.block_stream_comments}</a></li>
<li class="js-block-stream-item" data-type="topic"><a href="#">{$aLang.block_stream_topics}</a></li>
{$sItemsHook}
</ul>
<div
class="dropdown dropdown-toggle js-block-stream-dropdown js-dropdown-default"
data-type="dropdown-toggle"
data-option-target="js-dropdown-stream"
data-option-change-text="true"
{if !$sItemsHook}style="display: none;"{/if}>{$aLang.block_stream_comments}</div>
<ul class="dropdown-menu js-block-stream-dropdown-items" id="js-dropdown-stream">
<li class="active js-block-stream-item" data-type="comment"><a href="#">{$aLang.block_stream_comments}</a></li>
<li class="js-block-stream-item" data-type="topic"><a href="#">{$aLang.block_stream_topics}</a></li>
{$sItemsHook}
</ul>
<div class="js-block-stream-content">
{$sStreamComments}
</div>
</div>
</section>
<ul class="nav nav-pills js-block-nav" data-type="tabs" id="js-stream-tabs" {if $sItemsHook}style="display: none;"{/if}>
<li data-type="tab" data-option-url="{router page='ajax'}stream/comment" data-option-target="js-tab-pane-stream" class="active"><a href="#">{$aLang.block_stream_comments}</a></li>
<li data-type="tab" data-option-url="{router page='ajax'}stream/topic" data-option-target="js-tab-pane-stream"><a href="#">{$aLang.block_stream_topics}</a></li>
{$sItemsHook}
</ul>
{**
* Выпадающее меню
* Показывается если в меню что выше пунктов больше установленного значения (по умолчанию - 2)
*}
<div
class="dropdown dropdown-toggle js-dropdown-default"
id="js-stream-dropdown"
data-type="dropdown-toggle"
data-option-target="js-dropdown-menu-stream"
data-option-change-text="true"
{if !$sItemsHook}style="display: none;"{/if}><span data-type="dropdown-text">{$aLang.block_stream_comments}</span></div>
<ul class="dropdown-menu js-block-nav" id="js-dropdown-menu-stream" data-type="tabs">
<li class="active" data-type="tab" data-option-url="{router page='ajax'}stream/comment" data-option-target="js-tab-pane-stream"><a href="#">{$aLang.block_stream_comments}</a></li>
<li data-type="tab" data-option-url="{router page='ajax'}stream/topic" data-option-target="js-tab-pane-stream"><a href="#">{$aLang.block_stream_topics}</a></li>
{$sItemsHook}
</ul>
{/block}
{* Контент *}
{block name='content_after'}
<div id="js-tab-pane-stream">
{$sStreamComments}
</div>
{/block}

View file

@ -1,107 +0,0 @@
{if $oUserCurrent}
{literal}
<script type="text/javascript">
jQuery(document).ready( function() {
jQuery('#stream_users_complete').keydown(function (event) {
if (event.which == 13) {
ls.stream.appendUser()
}
});
});
</script>
{/literal}
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.stream_block_config_title}</h3>
</header>
<div class="block-content">
<small class="note">{$aLang.stream_settings_note_filter}</small>
<ul class="activity-settings-filter">
{foreach from=$aStreamEventTypes key=sType item=aEventType}
{if !($oConfig->get('module.stream.disable_vote_events') && substr($sType, 0, 4) == 'vote')}
<li>
<label>
<input class="streamEventTypeCheckbox input-checkbox"
type="checkbox"
id="strn_et_{$sType}"
{if in_array($sType, $aStreamTypesList)}checked="checked"{/if}
onClick="ls.stream.switchEventType('{$sType}')" />
{assign var=langKey value="stream_event_type_`$sType`"}
{$aLang.$langKey}
</label>
</li>
{/if}
{/foreach}
</ul>
</div>
</section>
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.stream_block_users_title}</h3>
</header>
<div class="block-content">
<small class="note">{$aLang.stream_settings_note_follow_user}</small>
<p><input type="text" id="stream_users_complete" autocomplete="off" class="autocomplete-users input-text input-width-200" />
<a href="javascript:ls.stream.appendUser()" class="button">{$aLang.stream_block_config_append}</a></p>
{if count($aStreamSubscribedUsers)}
<ul id="stream_block_users_list" class="max-height-200">
{foreach from=$aStreamSubscribedUsers item=oUser}
{assign var=iUserId value=$oUser->getId()}
{if !isset($aStreamFriends.$iUserId)}
<li><input class="streamUserCheckbox input-checkbox"
type="checkbox"
id="strm_u_{$iUserId}"
checked="checked"
onClick="if (jQuery(this).prop('checked')) { ls.stream.subscribe({$iUserId}) } else { ls.stream.unsubscribe({$iUserId}) } " />
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/if}
{/foreach}
</ul>
{else}
<ul id="stream_block_users_list"></ul>
<p id="stream_no_subscribed_users">{$aLang.stream_no_subscribed_users}</p>
{/if}
</div>
</section>
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.stream_block_users_friends}</h3>
</header>
<div class="block-content">
<small class="note">{$aLang.stream_settings_note_follow_friend}</small>
{if count($aStreamFriends)}
<ul class="stream-settings-friends max-height-200">
{foreach from=$aStreamFriends item=oUser}
{assign var=iUserId value=$oUser->getId()}
<li><input class="streamUserCheckbox input-checkbox"
type="checkbox"
id="strm_u_{$iUserId}"
{if isset($aStreamSubscribedUsers.$iUserId)} checked="checked"{/if}
onClick="if (jQuery(this).prop('checked')) { ls.stream.subscribe({$iUserId}) } else { ls.stream.unsubscribe({$iUserId}) } " />
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/foreach}
</ul>
{else}
<small class="note">{$aLang.stream_no_subscribed_users}</small>
{/if}
</div>
</section>
{/if}

View file

@ -1,25 +1,33 @@
<ul class="item-list">
{foreach from=$aComments item=oComment name="cmt"}
{assign var="oUser" value=$oComment->getUser()}
{assign var="oTopic" value=$oComment->getTarget()}
{assign var="oBlog" value=$oTopic->getBlog()}
<li class="js-title-comment" title="{$oComment->getText()|strip_tags|trim|truncate:100:'...'|escape:'html'}">
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getLogin()}</a> &rarr;
<a href="{$oBlog->getUrlFull()}" class="blog-name">{$oBlog->getTitle()|escape:'html'}</a> &rarr;
<a href="{if $oConfig->GetValue('module.comment.nested_per_page')}{router page='comments'}{else}{$oTopic->getUrl()}#comment{/if}{$oComment->getId()}">{$oTopic->getTitle()|escape:'html'}</a>
<p>
<time datetime="{date_format date=$oComment->getDate() format='c'}">{date_format date=$oComment->getDate() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}</time> |
{$oTopic->getCountComment()} {$oTopic->getCountComment()|declension:$aLang.comment_declension:'russian'}
</p>
</li>
{/foreach}
</ul>
{**
* Прямой эфир
* Топики отсортированные по времени последнего комментария
*
* @styles css/blocks.css
*}
<div class="block-content">
<ul class="item-list">
{foreach from=$aComments item=oComment name="cmt"}
{assign var="oUser" value=$oComment->getUser()}
{assign var="oTopic" value=$oComment->getTarget()}
{assign var="oBlog" value=$oTopic->getBlog()}
<li class="js-title-comment" title="{$oComment->getText()|strip_tags|trim|truncate:100:'...'|escape:'html'}">
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getLogin()}</a> &rarr;
<a href="{$oBlog->getUrlFull()}" class="blog-name">{$oBlog->getTitle()|escape:'html'}</a> &rarr;
<a href="{if $oConfig->GetValue('module.comment.nested_per_page')}{router page='comments'}{else}{$oTopic->getUrl()}#comment{/if}{$oComment->getId()}">{$oTopic->getTitle()|escape:'html'}</a>
<p>
<time datetime="{date_format date=$oComment->getDate() format='c'}">{date_format date=$oComment->getDate() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}</time> |
{$oTopic->getCountComment()} {$oTopic->getCountComment()|declension:$aLang.comment_declension:'russian'}
</p>
</li>
{/foreach}
</ul>
</div>
<footer>
<footer class="block-footer">
<a href="{router page='comments'}">{$aLang.block_stream_comments_all}</a> | <a href="{router page='rss'}allcomments/">RSS</a>
</footer>

View file

@ -1,25 +1,32 @@
<ul class="item-list">
{foreach from=$oTopics item=oTopic name="cmt"}
{assign var="oUser" value=$oTopic->getUser()}
{assign var="oBlog" value=$oTopic->getBlog()}
<li class="js-title-topic" title="{$oTopic->getText()|strip_tags|trim|truncate:150:'...'|escape:'html'}">
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getLogin()}</a> &rarr;
<a href="{$oBlog->getUrlFull()}" class="blog-name">{$oBlog->getTitle()|escape:'html'}</a> &rarr;
<a href="{$oTopic->getUrl()}">{$oTopic->getTitle()|escape:'html'}</a>
<p>
<time datetime="{date_format date=$oTopic->getDate() format='c'}">{date_format date=$oTopic->getDateAdd() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}</time> |
{$oTopic->getCountComment()} {$oTopic->getCountComment()|declension:$aLang.comment_declension:'russian'}
</p>
</li>
{/foreach}
</ul>
{**
* Прямой эфир
* Последние топики
*
* @styles css/blocks.css
*}
<div class="block-content">
<ul class="item-list">
{foreach from=$oTopics item=oTopic name="cmt"}
{assign var="oUser" value=$oTopic->getUser()}
{assign var="oBlog" value=$oTopic->getBlog()}
<li class="js-title-topic" title="{$oTopic->getText()|strip_tags|trim|truncate:150:'...'|escape:'html'}">
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getLogin()}</a> &rarr;
<a href="{$oBlog->getUrlFull()}" class="blog-name">{$oBlog->getTitle()|escape:'html'}</a> &rarr;
<a href="{$oTopic->getUrl()}">{$oTopic->getTitle()|escape:'html'}</a>
<p>
<time datetime="{date_format date=$oTopic->getDate() format='c'}">{date_format date=$oTopic->getDateAdd() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}</time> |
{$oTopic->getCountComment()} {$oTopic->getCountComment()|declension:$aLang.comment_declension:'russian'}
</p>
</li>
{/foreach}
</ul>
</div>
<footer>
<footer class="block-footer">
<a href="{router page='index'}new/">{$aLang.block_stream_topics_all}</a> | <a href="{router page='rss'}new/">RSS</a>
</footer>
</footer>

View file

@ -1,24 +1,36 @@
<section class="block">
<header class="block-header">
<h3>{$aLang.block_tags}</h3>
</header>
{**
* Теги
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.block_tags}{/block}
{block name='type'}tags{/block}
{block name='nav'}
<ul class="nav nav-pills" data-type="tabs">
<li class="active" data-type="tab" data-option-target="js-tab-pane-all"><a href="#">{$aLang.topic_favourite_tags_block_all}</a></li>
{if $oUserCurrent}
<li data-type="tab" data-option-target="js-tab-pane-my"><a href="#">{$aLang.topic_favourite_tags_block_user}</a></li>
{/if}
{hook run='block_tags_nav_item'}
</ul>
{/block}
{block name='content'}
<form action="" method="GET" class="js-tag-search-form search-tags">
<input type="text" name="tag" placeholder="{$aLang.block_tags_search}" value="" class="input-text input-width-full autocomplete-tags js-tag-search" />
</form>
<div class="block-content">
<ul class="nav nav-pills">
<li class="active js-block-tags-item" data-type="all"><a href="#">{$aLang.topic_favourite_tags_block_all}</a></li>
{if $oUserCurrent}
<li class="js-block-tags-item" data-type="user"><a href="#">{$aLang.topic_favourite_tags_block_user}</a></li>
{/if}
{hook run='block_tags_nav_item'}
</ul>
<form action="" method="GET" class="js-tag-search-form search-tags">
<input type="text" name="tag" placeholder="{$aLang.block_tags_search}" value="" class="input-text input-width-full autocomplete-tags js-tag-search" />
</form>
<div class="js-block-tags-content" data-type="all">
<div data-type="tab-content">
<div class="tab-pane" data-type="tab-pane" id="js-tab-pane-all" style="display: block">
{if $aTags}
<ul class="tag-cloud word-wrap">
{foreach from=$aTags item=oTag}
@ -31,17 +43,17 @@
</div>
{if $oUserCurrent}
<div class="js-block-tags-content" data-type="user" style="display: none;">
<div class="tab-pane" data-type="tab-pane" id="js-tab-pane-my">
{if $aTagsUser}
<ul class="tag-cloud word-wrap">
{foreach from=$aTagsUser item=oTag}
<li><a class="tag-size-{$oTag->getSize()}" href="{router page='tag'}{$oTag->getText()|escape:'url'}/">{$oTag->getText()|escape:'html'}</a></li>
{/foreach}
</ul>
{else}
{else}
<div class="notice-empty">{$aLang.block_tags_empty}</div>
{/if}
</div>
{/if}
</div>
</section>
{/block}

View file

@ -1,16 +1,26 @@
{if $aCityList && count($aCityList)>0}
<section class="block">
<header class="block-header">
<h3>{$aLang.block_city_tags}</h3>
</header>
<div class="block-content">
<ul class="tag-cloud word-wrap">
{foreach from=$aCityList item=oCity}
<li><a class="tag-size-{$oCity->getSize()}" href="{router page='people'}city/{$oCity->getId()}/">{$oCity->getName()|escape:'html'}</a></li>
{/foreach}
</ul>
</div>
</section>
{/if}
{**
* Список городов в которых проживают пользователи
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.block_city_tags}{/block}
{block name='content'}
{if $aCityList && count($aCityList) > 0}
<ul class="tag-cloud word-wrap">
{foreach from=$aCityList item=oCity}
<li><a class="tag-size-{$oCity->getSize()}" href="{router page='people'}city/{$oCity->getId()}/">{$oCity->getName()|escape:'html'}</a></li>
{/foreach}
</ul>
{else}
No cities {* Language *}
{/if}
{/block}

View file

@ -1,16 +1,24 @@
{if $aCountryList && count($aCountryList)>0}
<section class="block">
<header class="block-header">
<h3>{$aLang.block_country_tags}</h3>
</header>
<div class="block-content">
<ul class="tag-cloud word-wrap">
{foreach from=$aCountryList item=oCountry}
<li><a class="tag-size-{$oCountry->getSize()}" href="{router page='people'}country/{$oCountry->getId()}/">{$oCountry->getName()|escape:'html'}</a></li>
{/foreach}
</ul>
</div>
</section>
{/if}
{**
* Список стран в которых проживают пользователи
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.block_country_tags}{/block}
{block name='content'}
{if $aCountryList && count($aCountryList) > 0}
<ul class="tag-cloud word-wrap">
{foreach from=$aCountryList item=oCountry}
<li><a class="tag-size-{$oCountry->getSize()}" href="{router page='people'}country/{$oCountry->getId()}/">{$oCountry->getName()|escape:'html'}</a></li>
{/foreach}
</ul>
{/if}
{/block}

View file

@ -1,19 +1,17 @@
<section class="block block-type-foldable block-type-favourite-topic">
<header class="block-header">
<h3><a href="#" class="link-dotted" onclick="jQuery('#block_favourite_topic_content').toggle(); return false;">{$aLang.topic_favourite_tags_block}</a></h3>
</header>
{* TODO: Slider *}
<a href="#" class="link-dotted" onclick="jQuery('#block_favourite_topic_content').toggle(); return false;">{$aLang.topic_favourite_tags_block}</a>
<div class="block-content" id="block_favourite_topic_content">
<ul class="nav nav-pills">
<li class="active js-block-favourite-topic-tags-item" data-type="all"><a href="#">{$aLang.topic_favourite_tags_block_all}</a></li>
<li class="js-block-favourite-topic-tags-item" data-type="user"><a href="#">{$aLang.topic_favourite_tags_block_user}</a></li>
<div id="block_favourite_topic_content">
<ul class="nav nav-pills" data-type="tabs">
<li class="active" data-type="tab" data-option-target="js-tab-pane-tags-favourite-all"><a href="#">{$aLang.topic_favourite_tags_block_all}</a></li>
<li data-type="tab" data-option-target="js-tab-pane-tags-favourite-my"><a href="#">{$aLang.topic_favourite_tags_block_user}</a></li>
{hook run='block_favourite_topic_tags_nav_item'}
</ul>
<div class="js-block-favourite-topic-tags-content" data-type="all">
{hook run='block_favourite_topic_tags_nav_item'}
</ul>
<div data-type="tab-content">
<div class="tab-pane" data-type="tab-pane" id="js-tab-pane-tags-favourite-all" style="display: block;">
{if $aFavouriteTopicTags}
<ul class="tag-cloud word-wrap">
{foreach from=$aFavouriteTopicTags item=oTag}
@ -25,7 +23,7 @@
{/if}
</div>
<div class="js-block-favourite-topic-tags-content" data-type="user" style="display: none;">
<div class="tab-pane" data-type="tab-pane" id="js-tab-pane-tags-favourite-my">
{if $aFavouriteTopicUserTags}
<ul class="tag-cloud word-wrap">
{foreach from=$aFavouriteTopicUserTags item=oTag}
@ -37,4 +35,4 @@
{/if}
</div>
</div>
</section>
</div>

View file

@ -1,27 +1,35 @@
{if $oUserCurrent}
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.userfeed_block_blogs_title}</h3>
</header>
<div class="block-content">
<small class="note">{$aLang.userfeed_settings_note_follow_blogs}</small>
{**
* Выбор блогов для чтения в ленте
*
* @styles css/blocks.css
*}
{if count($aUserfeedBlogs)}
<ul class="stream-settings-blogs">
{foreach from=$aUserfeedBlogs item=oBlog}
{assign var=iBlogId value=$oBlog->getId()}
<li><input class="userfeedBlogCheckbox input-checkbox"
type="checkbox"
{if isset($aUserfeedSubscribedBlogs.$iBlogId)} checked="checked"{/if}
onClick="if (jQuery(this).prop('checked')) { ls.userfeed.subscribe('blogs',{$iBlogId}) } else { ls.userfeed.unsubscribe('blogs',{$iBlogId}) } " />
<a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape:'html'}</a>
</li>
{/foreach}
</ul>
{else}
<small class="notice-empty">{$aLang.userfeed_no_blogs}</small>
{/if}
</div>
</section>
{/if}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.userfeed_block_blogs_title}{/block}
{block name='type'}activity{/block}
{block name='content'}
<small class="note">{$aLang.userfeed_settings_note_follow_blogs}</small>
{if count($aUserfeedBlogs)}
<ul class="stream-settings-blogs">
{foreach from=$aUserfeedBlogs item=oBlog}
{assign var=iBlogId value=$oBlog->getId()}
<li><input class="userfeedBlogCheckbox input-checkbox"
type="checkbox"
{if isset($aUserfeedSubscribedBlogs.$iBlogId)} checked="checked"{/if}
onClick="if (jQuery(this).prop('checked')) { ls.userfeed.subscribe('blogs',{$iBlogId}) } else { ls.userfeed.unsubscribe('blogs',{$iBlogId}) } " />
<a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape:'html'}</a>
</li>
{/foreach}
</ul>
{else}
<small class="notice-empty">{$aLang.userfeed_no_blogs}</small>
{/if}
{/block}

View file

@ -0,0 +1,36 @@
{**
* Выбор друзей для чтения в ленте
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.userfeed_block_users_friends}{/block}
{block name='type'}activity{/block}
{if $oUserCurrent && count($aUserfeedFriends)}
{block name='content'}
<small class="note">{$aLang.userfeed_settings_note_follow_friend}</small>
<ul class="user-list-mini max-height-200 js-userfeed-block-users">
{foreach from=$aUserfeedFriends item=oUser}
{assign var=iUserId value=$oUser->getId()}
<li id="userfeed-block-users-item-{$iUserId}">
<input class="input-checkbox"
type="checkbox"
data-user-id="{$iUserId}"
{if isset($aUserfeedSubscribedUsers.$iUserId)} checked="checked"{/if} />
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/foreach}
</ul>
{/block}
{/if}

View file

@ -1,76 +1,45 @@
{**
* Выбор пользователей для чтения в ленте
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.userfeed_block_users_title}{/block}
{block name='type'}activity{/block}
{if $oUserCurrent}
{literal}
<script language="JavaScript" type="text/javascript">
jQuery(document).ready( function() {
jQuery('#userfeed_users_complete').keydown(function (event) {
if (event.which == 13) {
ls.userfeed.appendUser()
}
});
});
</script>
{/literal}
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.userfeed_block_users_title}</h3>
</header>
{block name='content'}
<small class="note">{$aLang.userfeed_settings_note_follow_user}</small>
<div class="block-content">
<small class="note">{$aLang.userfeed_settings_note_follow_user}</small>
<div class="stream-settings-userlist">
<p><input type="text" id="userfeed-block-users-input" autocomplete="off" placeholder="{$aLang.userfeed_block_users_append}" class="autocomplete-users input-text input-width-full" /></p>
<div class="stream-settings-userlist">
<p><input type="text" id="userfeed_users_complete" autocomplete="off" class="autocomplete-users input-text input-width-200" />
<a href="javascript:ls.userfeed.appendUser()" class="button">{$aLang.userfeed_block_users_append}</a></p>
{if count($aUserfeedSubscribedUsers)}
<ul id="userfeed_block_users_list" class="max-height-200">
{foreach from=$aUserfeedSubscribedUsers item=oUser}
{assign var=iUserId value=$oUser->getId()}
{if !isset($aUserfeedFriends.$iUserId)}
<li><input class="userfeedUserCheckbox input-checkbox"
type="checkbox"
id="usf_u_{$iUserId}"
checked="checked"
onClick="if (jQuery(this).prop('checked')) { ls.userfeed.subscribe('users',{$iUserId}) } else { ls.userfeed.unsubscribe('users',{$iUserId}) } " />
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/if}
{/foreach}
</ul>
{else}
<ul id="userfeed_block_users_list"></ul>
{/if}
</div>
</div>
</section>
{if count($aUserfeedFriends)}
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.userfeed_block_users_friends}</h3>
</header>
<div class="block-content">
<small class="note">{$aLang.userfeed_settings_note_follow_friend}</small>
<ul class="stream-settings-friends max-height-200">
{foreach from=$aUserfeedFriends item=oUser}
{if count($aUserfeedSubscribedUsers)}
<ul id="userfeed-block-users" class="user-list-mini max-height-200 js-userfeed-block-users">
{foreach from=$aUserfeedSubscribedUsers item=oUser}
{assign var=iUserId value=$oUser->getId()}
<li><input class="userfeedUserCheckbox input-checkbox"
type="checkbox"
id="usf_u_{$iUserId}"
{if isset($aUserfeedSubscribedUsers.$iUserId)} checked="checked"{/if}
onClick="if (jQuery(this).prop('checked')) { ls.userfeed.subscribe('users',{$iUserId}) } else { ls.userfeed.unsubscribe('users',{$iUserId}) } " />
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{if !isset($aUserfeedFriends.$iUserId)}
<li id="userfeed-block-users-item-{$iUserId}">
<input class="input-checkbox"
type="checkbox"
checked="checked"
data-user-id="{$iUserId}" />
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/if}
{/foreach}
</ul>
</div>
</section>
{/if}
</ul>
{else}
<ul id="userfeed_block_users_list"></ul>
{/if}
</div>
{/block}
{/if}

View file

@ -0,0 +1,30 @@
{**
* Статистика по пользователям
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.user_stats}{/block}
{block name='content'}
<ul>
<li>{$aLang.user_stats_all}: <strong>{$aStat.count_all}</strong></li>
<li>{$aLang.user_stats_active}: <strong>{$aStat.count_active}</strong></li>
<li>{$aLang.user_stats_noactive}: <strong>{$aStat.count_inactive}</strong></li>
</ul>
<br />
<ul>
<li>{$aLang.user_stats_sex_man}: <strong>{$aStat.count_sex_man}</strong></li>
<li>{$aLang.user_stats_sex_woman}: <strong>{$aStat.count_sex_woman}</strong></li>
<li>{$aLang.user_stats_sex_other}: <strong>{$aStat.count_sex_other}</strong></li>
</ul>
{/block}

View file

@ -74,11 +74,14 @@
{/foreach}
{else}
<tr>
<td colspan="3">
<td colspan="4">
{* TODO: Fix error message *}
{if $sBlogsEmptyList}
{$sBlogsEmptyList}
{else}
{/if}
{if !$aBlogs && !$sBlogsEmptyList}
{$aLang.blog_by_category_empty}
{/if}
</td>
</tr>

View file

@ -1,69 +1,107 @@
/* -------------------------------------------------------------------
БЛОКИ
------------------------------------------------------------------- */
/**
* Blocks
*/
.block { background: #fafafa; margin-bottom: 30px; border-radius: 3px; }
.block:last-child { margin-bottom: 0; }
.sidebar-left .block { margin-bottom: 10px; }
.block .text { font-size: 13px; line-height: 18px; }
/**
* Base
*/
.block { background: #fafafa; margin-bottom: 30px; border-radius: 3px; }
.block:last-child { margin-bottom: 0; }
.block .block-header { padding: 13px 20px; background: #f5f5f5; border-top: 1px solid #eee; position: relative; }
.block .block-header h3 { font-size: 16px; line-height: 1em; font-weight: normal; }
.block .block-header h3 a { text-decoration: none; color: #333; }
.block .block-header h3 a.link-dotted { color: #5055B2; }
.block .block-content { padding: 20px; }
.block footer { margin-top: 15px; font-size: 12px; }
.block .text { font-size: 13px; line-height: 18px; }
.block .max-height-200 { overflow: auto; max-height: 200px; position: relative; }
.block .loading { min-height: 100px; background-image: url(../images/loader.gif); background-position: 50% 45px; }
.block .max-height-200 { overflow: auto; max-height: 200px; _height: expression( this.scrollHeight > 200 ? "200px" : "auto" ); position: relative; }
/* Header */
.block-header { padding: 13px 15px; background: #f5f5f5; border-top: 1px solid #eee; position: relative; }
.block-header .block-title { font-size: 16px; line-height: 1em; font-weight: normal; }
/* Nav */
.block-nav { padding: 15px; border-bottom: 1px solid #eee; }
.block-nav .nav,
.block-nav .dropdown { margin-bottom: 0; }
/* Block Type - Stream */
.block .block-update { position: absolute; top: 13px; right: 15px; width: 16px; height: 16px; background: url(../images/update.gif) no-repeat; cursor: pointer; }
.block .block-update.active { background-position: -16px 0; }
/* Content */
.block-content { padding: 15px; }
/* Footer */
.block-footer { border-top: 1px solid #eee; padding: 15px 20px; font-size: 12px; }
/* Block Type - Activity Settings */
.block.block-type-activity p { margin-bottom: 15px; }
.block.block-type-activity ul li { margin-bottom: 5px; }
.block.block-type-activity .note { display: block; margin-bottom: 15px; color: #aaa; }
/* Update button */
.block-update { position: absolute; top: 13px; right: 15px; width: 16px; height: 16px; background: url(../images/update.gif) no-repeat; cursor: pointer; }
.block-update.active { background-position: -16px 0; }
/**
* @type stream
* @file blocks/block.stream.tpl
* @file blocks/block.stream_comment.tpl
* @file blocks/block.stream_topic.tpl
*/
.block-type-stream .block-content { padding: 0; }
/* Block Type - Profile */
.block.block-type-profile { background: none; border: none; padding: 0; }
.block.block-type-profile .profile-photo-wrapper { position: relative; min-height: 50px; }
.block.block-type-profile .profile-photo { vertical-align: top; }
.block.block-type-profile .status { position: absolute; top: 5px; left: 5px; padding: 0 5px; border-radius: 2px; font-size: 11px; }
.block.block-type-profile .status.status-online { background: #B7BC1C; color: #fff; }
.block.block-type-profile .status.status-offline { background: #333; color: #fff; opacity: .5; filter: alpha(opacity=50); }
.block.block-type-profile .upload-photo { padding: 7px 10px 10px; background: #f7f7f7; }
/**
* @type blogs
* @file blocks/block.blogs.tpl
*/
.block-type-blogs .block-content { padding: 0; }
.block.block-type-profile-note { background: #F1F7AF; border: 1px solid #E1EA83; padding: 15px; }
.block.block-type-profile-note p { margin-bottom: 10px; }
.block.block-type-profile-note .actions { margin-bottom: 0; }
/**
* @type blog categories
* @file blocks/block.blogCategories.tpl
*/
.block-type-blog-categories .block-header .blog-categories-admin { position: absolute; top: 13px; right: 13px; }
.block.block-type-profile-nav { padding: 0; background: none; }
.block-type-blog-categories li a { display: block; margin-bottom: 1px; padding: 5px 9px; }
.block-type-blog-categories li.active a { color: #fff; text-decoration: none; background: #5560D5; }
.block.block-type-profile-actions .block-content { padding: 10px 15px; }
.block.block-type-profile-actions ul li { margin-bottom: 5px; }
.block.block-type-profile-actions ul li:last-child { margin-bottom: 0; }
.block.block-type-profile-actions ul li a.followed { color: #f00; }
/**
* @type blog navigation
* @file blocks/block.blogNav.tpl
*/
.block-type-blog-navigation p { margin-bottom: 15px; }
.block-type-blog-navigation .blog-navigator-categories option:first-child { color: #aaa; }
/**
* @type profile
* @file blocks/block.profilePhoto.tpl
*/
.block-type-profile-photo { background: none; border: none; padding: 0; }
.block-type-profile-photo .profile-photo-wrapper { position: relative; min-height: 50px; }
.block-type-profile-photo .profile-photo { vertical-align: top; }
/* Block Type - Foldable */
.block.block-type-foldable { background: none; }
.block.block-type-foldable .block-header { background: none; border: none; padding: 0 0 10px; }
.block.block-type-foldable .block-content { display: none; background: #fafafa; }
.block-type-profile-photo .status { position: absolute; top: 5px; left: 5px; padding: 1px 7px; font-size: 11px; }
.block-type-profile-photo .status.status-online { background: #B7BC1C; color: #fff; }
.block-type-profile-photo .status.status-offline { background: #333; color: #fff; opacity: .5; filter: alpha(opacity=50); }
.block.block-type-talk-search { margin-bottom: 10px; }
.block.block-type-talk-friends { margin-bottom: 10px; }
.block-type-profile-photo .upload-photo { padding: 7px 10px 10px; background: #f7f7f7; }
/**
* @type profile note
* @file blocks/block.profileNote.tpl
*/
.block-type-profile-note { background: #F1F7AF; border: 1px solid #E1EA83; padding: 15px; }
.block-type-profile-note p { margin-bottom: 10px; }
.block-type-profile-note .actions { margin-bottom: 0; }
/* Block Type - Blog Categories */
.block.block-type-blog-categories .block-header .blog-categories-admin { position: absolute; top: 13px; right: 13px; }
/**
* @type profile nav
* @file blocks/block.profileNav.tpl
*/
.block-type-profile-nav { padding: 0; background: none; }
.block.block-type-blog-categories li a { display: block; margin-bottom: 1px; padding: 5px 9px; }
.block.block-type-blog-categories li.active a { color: #fff; text-decoration: none; background: #5560D5; }
/**
* @type profile actions
* @file blocks/block.profileActions.tpl
*/
.block-type-profile-actions .block-content { padding: 10px 15px; }
.block-type-profile-actions ul li { margin-bottom: 5px; }
.block-type-profile-actions ul li:last-child { margin-bottom: 0; }
.block-type-profile-actions ul li a.followed { color: #f00; }
/* Block Type - Blog Navigation */
.block.block-type-blog-navigation .blog-navigator-categories option:first-child { color: #aaa; }
/**
* @type activity
* @file blocks/block.activityX.tpl
*/
.block-type-activity p { margin-bottom: 15px; }
.block-type-activity ul li { margin-bottom: 5px; }
.block-type-activity .note { display: block; margin-bottom: 15px; color: #aaa; }

View file

@ -102,11 +102,12 @@
/* Item List
---------------------------------------------------- */
.item-list { border-top: 1px solid #eee; }
.item-list li { min-height: 51px; padding: 7px 0 10px 58px; border-bottom: 1px solid #eee; position: relative; zoom: 1; }
.item-list { }
.item-list li { min-height: 51px; padding: 17px 15px 20px 75px; border-top: 1px solid #eee; position: relative; zoom: 1; background: #fff; }
.item-list li:first-child { border: none; }
.item-list li p { padding-top: 2px; font-size: 11px; }
.item-list li a { text-decoration: none; }
.item-list li .avatar { position: absolute; top: 10px; left: 0; margin-right: 10px; }
.item-list li .avatar { position: absolute; top: 20px; left: 15px; margin-right: 10px; }
.item-list li .author { font-weight: bold; color: #333; }
.item-list li .blog-name { font-weight: bold; }

View file

@ -19,8 +19,8 @@
<li><a href="{router page='login'}exit/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.exit}</a></li>
{else}
{hook run='userbar_item'}
<li><a href="{router page='login'}" class="js-login-form-show">{$aLang.user_login_submit}</a></li>
<li><a href="#" class="js-registration-form-show">{$aLang.registration_submit}</a></li>
<li><a href="{router page='login'}" data-type="modal-toggle" data-option-target="modal-login" onclick="jQuery('[data-option-target=tab-pane-login]').tab('activate');">{$aLang.user_login_submit}</a></li>
<li><a href="#" data-type="modal-toggle" data-option-target="modal-login" onclick="jQuery('[data-option-target=tab-pane-registration]').tab('activate');">{$aLang.registration_submit}</a></li>
{/if}
</ul>

View file

@ -91,36 +91,19 @@ jQuery(document).ready(function($){
/**
* Blocks
*/
ls.blocks.init('stream',{group_items: true, group_min: 3});
ls.blocks.init('blogs');
ls.blocks.initSwitch('tags');
ls.blocks.initSwitch('upload-img');
ls.blocks.initSwitch('favourite-topic-tags');
ls.blocks.initSwitch('popup-login');
ls.blocks.init();
/**
* Auth modal
* Activity
*/
$('.js-registration-form-show').click(function(){
if ($('[data-option-target=tab-pane-registration]').length) {
$('#modal-login').modal('option', 'onShow', function () { $('[data-option-target=tab-pane-registration]').tab('activate') });
$('#modal-login').modal('show');
} else {
window.location=aRouter.registration;
}
return false;
});
ls.stream.init();
$('.js-login-form-show').click(function(){
if ($('[data-option-target=tab-pane-login]').length) {
$('#modal-login').modal('option', 'onShow', function () { $('[data-option-target=tab-pane-login]').tab('activate') });
$('#modal-login').modal('show');
} else {
window.location=aRouter.login;
}
return false;
});
/**
* Userfeed
*/
ls.userfeed.init();
/**
@ -136,7 +119,9 @@ jQuery(document).ready(function($){
});
// Поиск по тегам
/**
* Tag search
*/
$('.js-tag-search-form').submit(function(){
var val=$(this).find('.js-tag-search').val();
if (val) {
@ -146,18 +131,15 @@ jQuery(document).ready(function($){
});
// комментарии
/**
* Comments
*/
ls.comments.options.folding = false;
ls.comments.init();
// избранное
ls.hook.add('ls_favourite_toggle_after',function(idTarget,objFavourite,type,params,result){
$('#fav_count_'+type+'_'+idTarget).text((result.iCount>0) ? result.iCount : '');
});
/****************
* TALK
/**
* Talk
*/
// Добавляем или удаляем друга из списка получателей
@ -196,7 +178,9 @@ jQuery(document).ready(function($){
});
// Help-tags link
/**
* Editor help
*/
$('.js-tags-help-link').click(function(){
var target=ls.registry.get('tags-help-target-id');
if (!target || !$('#'+target).length) {
@ -212,17 +196,6 @@ jQuery(document).ready(function($){
return false;
});
/**
* IE
* TODO: Check browser
*/
// эмуляция border-sizing в IE
var inputs = $('input.input-text, textarea');
ls.ie.bordersizing(inputs);
// эмуляция placeholder'ов в IE
inputs.placeholder();
// Хук конца инициализации javascript-составляющих шаблона
ls.hook.run('ls_template_init_end',[],window);

View file

@ -20,6 +20,7 @@
{block name='header_after'}{/block}
{if !$noContent}
<div class="modal-content">
{block name='content'}{/block}
@ -28,6 +29,7 @@
{block name='content_after'}{/block}
{if !$noFooter}
<div class="modal-footer">
{block name='footer'}{/block}
@ -36,7 +38,7 @@
<button type="button" class="button" data-type="modal-close">{$aLang.favourite_form_tags_button_cancel}</button>
{/if}
</div>
{block name='footer_after'}{/block}
{/if}
{block name='footer_after'}{/block}
</div>

View file

@ -154,7 +154,7 @@
<li class="topic-info-author"><a rel="author" href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a></li>
<li class="topic-info-favourite">
<div onclick="return ls.favourite.toggle({$oTopic->getId()},this,'topic');" class="favourite {if $oUserCurrent && $oTopic->getIsFavourite()}active{/if}"></div>
<span class="favourite-count" id="fav_count_topic_{$oTopic->getId()}">{$oTopic->getCountFavourite()}</span>
<span class="favourite-count" id="fav_count_topic_{$oTopic->getId()}" {if ! $oTopic->getCountFavourite()}style="display: none"{/if}>{$oTopic->getCountFavourite()}</span>
</li>
<li class="topic-info-share"><a href="#" class="icon-share js-popover-default" title="{$aLang.topic_share}" data-type="popover-toggle" data-option-target="topic_share_{$oTopic->getId()}"></a></li>

View file

@ -1,38 +0,0 @@
<section class="block">
<header class="block-header">
<h3>{$aLang.blog_admin_user_add_header}</h3>
</header>
<div class="block-content">
<form onsubmit="return ls.blog.addInvite({$oBlogEdit->getId()});">
<p>
<label for="blog_admin_user_add">{$aLang.blog_admin_user_add_label}:</label>
<input type="text" id="blog_admin_user_add" name="add" class="input-text input-width-full autocomplete-users-sep" />
</p>
</form>
<br />
<h3>{$aLang.blog_admin_user_invited}:</h3>
<div id="invited_list_block">
{if $aBlogUsersInvited}
<ul id="invited_list">
{foreach from=$aBlogUsersInvited item=oBlogUser}
{assign var='oUser' value=$oBlogUser->getUser()}
<li id="blog-invite-remove-item-{$oBlogEdit->getId()}-{$oUser->getId()}">
<span class="user-avatar user-avatar-n">
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</span> -
<a href="#" onclick="return ls.blog.repeatInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_readd}</a>
<a href="#" onclick="return ls.blog.removeInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_remove}</a>
</li>
{/foreach}
</ul>
{/if}
<span id="blog-invite-empty" class="notice-empty" {if $aBlogUsersInvited}style="display: none"{/if}>{$aLang.blog_admin_user_add_empty}</span>
</div>
</div>
</section>

View file

@ -1,28 +1,6 @@
{hook run='people_sidebar_begin'}
<section class="block">
<header class="block-header">
<h3>{$aLang.user_stats}</h3>
</header>
<div class="block-content">
<ul>
<li>{$aLang.user_stats_all}: <strong>{$aStat.count_all}</strong></li>
<li>{$aLang.user_stats_active}: <strong>{$aStat.count_active}</strong></li>
<li>{$aLang.user_stats_noactive}: <strong>{$aStat.count_inactive}</strong></li>
</ul>
<br />
<ul>
<li>{$aLang.user_stats_sex_man}: <strong>{$aStat.count_sex_man}</strong></li>
<li>{$aLang.user_stats_sex_woman}: <strong>{$aStat.count_sex_woman}</strong></li>
<li>{$aLang.user_stats_sex_other}: <strong>{$aStat.count_sex_other}</strong></li>
</ul>
</div>
</section>
{include file='blocks/block.usersStatistics.tpl'}
{insert name="block" block='tagsCountry'}
{insert name="block" block='tagsCity'}

View file

@ -1,104 +1,18 @@
{hook run='profile_sidebar_begin' oUserProfile=$oUserProfile}
{include file='modals/modal.profile_photo_upload.tpl'}
<section class="block block-type-profile">
<div class="profile-photo-wrapper">
<div class="status {if $oUserProfile->isOnline()}status-online{else}status-offline{/if}">{if $oUserProfile->isOnline()}{$aLang.user_status_online}{else}{$aLang.user_status_offline}{/if}</div>
<a href="{$oUserProfile->getUserWebPath()}"><img src="{$oUserProfile->getProfileFotoPath()}" alt="photo" class="profile-photo" id="foto-img" /></a>
</div>
{if $sAction=='settings' and $oUserCurrent and $oUserCurrent->getId() == $oUserProfile->getId()}
<script type="text/javascript">
jQuery(function($){
$('#foto-upload').file({ name:'foto' }).choose(function(e, input) {
ls.user.uploadFoto(null,input);
});
});
</script>
<p class="upload-photo">
<a href="#" id="foto-upload" class="link-dotted">{if $oUserCurrent->getProfileFoto()}{$aLang.settings_profile_photo_change}{else}{$aLang.settings_profile_photo_upload}{/if}</a>&nbsp;&nbsp;&nbsp;
<a href="#" id="foto-remove" class="link-dotted" onclick="return ls.user.removeFoto();" style="{if !$oUserCurrent->getProfileFoto()}display:none;{/if}">{$aLang.settings_profile_foto_delete}</a>
</p>
{/if}
</section>
{include file='blocks/block.profilePhoto.tpl'}
{hook run='profile_sidebar_menu_before' oUserProfile=$oUserProfile}
<section class="block block-type-profile-nav">
<ul class="nav nav-profile">
{hook run='profile_sidebar_menu_item_first' oUserProfile=$oUserProfile}
<li {if $sAction=='profile' && ($aParams[0]=='whois' or $aParams[0]=='')}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='wall'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}wall/">{$aLang.user_menu_profile_wall}{if ($iCountWallUser)>0} ({$iCountWallUser}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='created'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}created/topics/">{$aLang.user_menu_publication}{if ($iCountCreated)>0} ({$iCountCreated}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='favourites'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/topics/">{$aLang.user_menu_profile_favourites}{if ($iCountFavourite)>0} ({$iCountFavourite}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='friends'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}friends/">{$aLang.user_menu_profile_friends}{if ($iCountFriendsUser)>0} ({$iCountFriendsUser}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='stream'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}stream/">{$aLang.user_menu_profile_stream}</a></li>
{if $oUserCurrent and $oUserCurrent->getId() == $oUserProfile->getId()}
<li {if $sAction=='talk'}class="active"{/if}><a href="{router page='talk'}">{$aLang.talk_menu_inbox}{if $iUserCurrentCountTalkNew} ({$iUserCurrentCountTalkNew}){/if}</a></li>
<li {if $sAction=='settings'}class="active"{/if}><a href="{router page='settings'}">{$aLang.settings_menu}</a></li>
{/if}
{hook run='profile_sidebar_menu_item_last' oUserProfile=$oUserProfile}
</ul>
</section>
{include file='blocks/block.profileNav.tpl'}
{hook run='profile_sidebar_end' oUserProfile=$oUserProfile}
{if $oUserCurrent && $oUserCurrent->getId() != $oUserProfile->getId()}
{include file='blocks/block.profileNote.tpl'}
{/if}
{if $oUserCurrent && $oUserCurrent->getId() != $oUserProfile->getId()}
<section class="block block-type-profile-note">
{if $oUserNote}
<script type="text/javascript">
ls.usernote.sText = {json var = $oUserNote->getText()};
</script>
{/if}
<div id="usernote-note" class="profile-note" {if !$oUserNote}style="display: none;"{/if}>
<p id="usernote-note-text">
{if $oUserNote}
{$oUserNote->getText()}
{/if}
</p>
<ul class="actions">
<li><a href="#" onclick="return ls.usernote.showForm();" class="link-dotted">{$aLang.user_note_form_edit}</a></li>
<li><a href="#" onclick="return ls.usernote.remove({$oUserProfile->getId()});" class="link-dotted">{$aLang.user_note_form_delete}</a></li>
</ul>
</div>
<div id="usernote-form" style="display: none;">
<p><textarea rows="4" cols="20" id="usernote-form-text" class="input-text input-width-full"></textarea></p>
<button type="submit" onclick="return ls.usernote.save({$oUserProfile->getId()});" class="button button-primary">{$aLang.user_note_form_save}</button>
<button type="submit" onclick="return ls.usernote.hideForm();" class="button">{$aLang.user_note_form_cancel}</button>
</div>
<a href="#" onclick="return ls.usernote.showForm();" id="usernote-button-add" class="link-dotted" {if $oUserNote}style="display:none;"{/if}>{$aLang.user_note_add}</a>
</section>
{/if}
{if $oUserCurrent && $oUserCurrent->getId()!=$oUserProfile->getId()}
<script type="text/javascript">
jQuery(function($){
ls.lang.load({lang_load name="profile_user_unfollow,profile_user_follow"});
});
</script>
<section class="block block-type-profile-actions">
<div class="block-content">
<ul class="profile-actions" id="profile_actions">
{include file='actions/ActionProfile/friend_item.tpl' oUserFriend=$oUserProfile->getUserFriend()}
<li><a href="{router page='talk'}add/?talk_users={$oUserProfile->getLogin()}">{$aLang.user_write_prvmsg}</a></li>
<li>
<a href="#" onclick="ls.user.followToggle(this, {$oUserProfile->getId()}); return false;" class="{if $oUserProfile->isFollow()}followed{/if}">
{if $oUserProfile->isFollow()}{$aLang.profile_user_unfollow}{else}{$aLang.profile_user_follow}{/if}
</a>
</li>
</ul>
</div>
</section>
{/if}
{include file='blocks/block.profileActions.tpl'}
{/if}

View file

@ -0,0 +1,40 @@
{**
* Выбор друзей для чтения в ленте активности
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.stream_block_users_friends}{/block}
{block name='type'}activity{/block}
{block name='content'}
{if $oUserCurrent}
<small class="note">{$aLang.stream_settings_note_follow_friend}</small>
{if count($aStreamFriends)}
<ul class="user-list-mini max-height-200 js-activity-block-users">
{foreach from=$aStreamFriends item=oUser}
{assign var=iUserId value=$oUser->getId()}
<li id="activity-block-users-item-{$iUserId}">
<input class="input-checkbox"
type="checkbox"
{if isset($aStreamSubscribedUsers.$iUserId)}checked="checked"{/if}
data-user-id="{$iUserId}" />
<a href="{$oUser->getUserWebPath()}" title="{$oUser->getLogin()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/foreach}
</ul>
{else}
<small class="note">{$aLang.stream_no_subscribed_users}</small>
{/if}
{/if}
{/block}

View file

@ -0,0 +1,39 @@
{**
* Блок настройки ленты активности
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.stream_block_config_title}{/block}
{block name='type'}activity{/block}
{block name='content'}
{if $oUserCurrent}
<small class="note">{$aLang.stream_settings_note_filter}</small>
<ul class="activity-settings-filter">
{foreach from=$aStreamEventTypes key=sType item=aEventType}
{if !($oConfig->get('module.stream.disable_vote_events') && substr($sType, 0, 4) == 'vote')}
<li>
<label>
<input class="streamEventTypeCheckbox input-checkbox"
type="checkbox"
id="strn_et_{$sType}"
{if in_array($sType, $aStreamTypesList)}checked="checked"{/if}
onClick="ls.stream.switchEventType('{$sType}')" />
{assign var=langKey value="stream_event_type_`$sType`"}
{$aLang.$langKey}
</label>
</li>
{/if}
{/foreach}
</ul>
{/if}
{/block}

View file

@ -0,0 +1,50 @@
{**
* Выбор пользователей для чтения в ленте активности
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.stream_block_users_title}{/block}
{block name='type'}activity{/block}
{block name='content'}
{if $oUserCurrent}
<small class="note">{$aLang.stream_settings_note_follow_user}</small>
<div class="search-form-wrapper">
<div class="search-input-wrapper">
<input type="text" id="activity-block-users-input" autocomplete="off" placeholder="{$aLang.stream_block_config_append}" class="autocomplete-users input-text input-width-full" />
<div onclick="ls.stream.appendUser();" class="input-submit"></div>
</div>
</div>
{if $aStreamSubscribedUsers}
<ul id="activity-block-users" class="user-list-mini max-height-200 js-activity-block-users">
{foreach from=$aStreamSubscribedUsers item=oUser}
{assign var=iUserId value=$oUser->getId()}
{if !isset($aStreamFriends.$iUserId)}
<li id="activity-block-users-item-{$iUserId}">
<input class="input-checkbox"
type="checkbox"
checked="checked"
data-user-id="{$iUserId}" />
<a href="{$oUser->getUserWebPath()}" title="{$oUser->getLogin()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/if}
{/foreach}
</ul>
{else}
<ul id="activity-block-users" style="display: none;"></ul>
<p id="activity-block-users-notice">{$aLang.stream_no_subscribed_users}</p>
{/if}
{/if}
{/block}

View file

@ -0,0 +1,52 @@
{**
* Базовый шаблон блоков
*
* Доступные опции:
* noHeader (bool) - Не выводить шапку блока
* noNav (bool) - Не выводить навигацию
* noContent (bool) - Не выводить контент
* noFooter (bool) - Не выводить подвал блока
*}
{block name='options'}{/block}
<div class="block block-type-{block name='type'}default{/block} {block name='class'}{/block}" id="{block name='id'}{/block}" {block name='attributes'}{/block}>
{* Header *}
{if !$noHeader}
<header class="block-header">
<h3 class="block-title">{block name='title'}No title{/block}</h3>
{block name='header_end'}{/block}
</header>
{/if}
{block name='header_after'}{/block}
{* Navigation *}
{if !$noNav}
<nav class="block-nav">
{block name='nav'}No nav{/block}
</nav>
{/if}
{block name='nav_after'}{/block}
{* Content *}
{if !$noContent}
<div class="block-content">
{block name='content'}No content{/block}
</div>
{/if}
{block name='content_after'}{/block}
{* Footer *}
{if !$noFooter}
<footer class="block-footer">
{block name='footer'}No footer{/block}
</footer>
{/if}
{block name='footer_after'}{/block}
</div>

View file

@ -1,22 +1,34 @@
{if $oTopic}
{assign var="oBlog" value=$oTopic->getBlog()}
{if $oBlog->getType()!='personal'}
<section class="block block-type-blog">
<header class="block-header">
<h3><a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape:'html'}</a></h3>
</header>
{**
* Краткая информация о блоге на странице топика
*
* @styles css/blocks.css
*}
<div class="block-content">
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var="oBlog" value=$oTopic->getBlog()}
{assign var='noNav' value=true}
{/block}
{if $oTopic && $oBlog->getType() != 'personal'}
{block name='title'}<a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape:'html'}</a>{/block}
{block name='class'}block-type-blog{/block}
{block name='content'}
<span id="blog_user_count_{$oBlog->getId()}">{$oBlog->getCountUser()}</span> {$oBlog->getCountUser()|declension:$aLang.reader_declension:'russian'}<br />
{$oBlog->getCountTopic()} {$oBlog->getCountTopic()|declension:$aLang.topic_declension:'russian'}
</div>
{/block}
<footer>
{if $oUserCurrent and $oUserCurrent->getId()!=$oBlog->getOwnerId()}
<button type="submit" class="button button-small" id="blog-join" data-only-text="1" onclick="ls.blog.toggleJoin(this,{$oBlog->getId()}); return false;">{if $oBlog->getUserIsJoin()}{$aLang.blog_leave}{else}{$aLang.blog_join}{/if}</button>
{/if}
<a href="{router page='rss'}blog/{$oBlog->getUrl()}/" class="rss">RSS</a>
</footer>
</section>
{/if}
{block name='footer'}
{if $oUserCurrent and $oUserCurrent->getId() != $oBlog->getOwnerId()}
<button type="submit"
class="button button-small"
id="blog-join"
data-only-text="1"
onclick="ls.blog.toggleJoin(this,{$oBlog->getId()}); return false;">{if $oBlog->getUserIsJoin()}{$aLang.blog_leave}{else}{$aLang.blog_join}{/if}</button>
{/if}
<a href="{router page='rss'}blog/{$oBlog->getUrl()}/" class="rss">RSS</a>
{/block}
{/if}

View file

@ -0,0 +1,34 @@
{**
* Категории блогов
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.block_category_blog}{/block}
{block name='type'}blog-categories{/block}
{block name='header_end'}
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
<a href="{router page="admin"}blogcategory/" title="{$aLang.admin_list_blogcategory}" class="icon-cog blog-categories-admin"></a>
{/if}
{/block}
{block name='content'}
{if $aBlogCategories}
<ul class="blog-category-list">
<li {if !$oBlogCategoryCurrent}class="active"{/if}><a href="{router page='blogs'}">{$aLang.block_category_blog_all} ({$iCountBlogsAll})</a></li>
{foreach from=$aBlogCategories item=oCategory}
<li {if $oBlogCategoryCurrent and $oBlogCategoryCurrent->getId()==$oCategory->getId()}class="active"{/if}><a style="margin-left: {$oCategory->getLevel()*20}px;" href="{$oCategory->getUrlWeb()}">{$oCategory->getTitle()|escape:'html'} ({$oCategory->getCountBlogs()})</a></li>
{/foreach}
</ul>
{else}
No categories {* TODO: Language *}
{/if}
{/block}

View file

@ -1,21 +0,0 @@
{if $aBlogCategories}
<section class="block block-type-blog-categories">
<header class="block-header">
<h3>{$aLang.block_category_blog}</h3>
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
<a href="{router page="admin"}blogcategory/" title="{$aLang.admin_list_blogcategory}" class="icon-cog blog-categories-admin"></a>
{/if}
</header>
<div class="block-content">
<ul class="blog-category-list">
<li {if !$oBlogCategoryCurrent}class="active"{/if}><a href="{router page='blogs'}">{$aLang.block_category_blog_all} ({$iCountBlogsAll})</a></li>
{foreach from=$aBlogCategories item=oCategory}
<li {if $oBlogCategoryCurrent and $oBlogCategoryCurrent->getId()==$oCategory->getId()}class="active"{/if}><a style="margin-left: {$oCategory->getLevel()*20}px;" href="{$oCategory->getUrlWeb()}">{$oCategory->getTitle()|escape:'html'} ({$oCategory->getCountBlogs()})</a></li>
{/foreach}
</ul>
</div>
</section>
{/if}

View file

@ -1,20 +1,15 @@
<section class="block">
<header class="block-header">
<h3>{$aLang.block_blog_info}</h3>
</header>
<div class="block-content">
<p id="block_blog_info" class="text"></p>
</div>
</section>
{**
* Информация о блоге показываемая при создании топика
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
<section class="block">
<header class="block-header">
<h3>{$aLang.block_blog_info_note}</h3>
</header>
<div class="block-content">
<p>{$aLang.block_blog_info_note_text}</p>
</div>
</section>
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.block_blog_info}{/block}
{block name='content'}<p id="block_blog_info" class="text"></p>{/block}

View file

@ -0,0 +1,15 @@
{**
* Подсказка отображаемая при создании топика
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.block_blog_info_note}{/block}
{block name='content'}{$aLang.block_blog_info_note_text}{/block}

View file

@ -0,0 +1,46 @@
{**
* Приглашение пользователей в закрытый блог.
* Выводится на странице администрирования пользователей закрытого блога.
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.blog_admin_user_add_header}{/block}
{block name='type'}blog-invite{/block}
{block name='content'}
<form onsubmit="return ls.blog.addInvite({$oBlogEdit->getId()});" class="mb-15">
<label for="blog_admin_user_add">{$aLang.blog_admin_user_add_label}:</label>
<input type="text" id="blog_admin_user_add" name="add" class="input-text input-width-full autocomplete-users-sep" />
</form>
{$aLang.blog_admin_user_invited}:
<div id="invited_list_block">
{if $aBlogUsersInvited}
<ul id="invited_list">
{foreach from=$aBlogUsersInvited item=oBlogUser}
{assign var='oUser' value=$oBlogUser->getUser()}
<li id="blog-invite-remove-item-{$oBlogEdit->getId()}-{$oUser->getId()}">
<span class="user-avatar user-avatar-n">
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</span> -
<a href="#" onclick="return ls.blog.repeatInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_readd}</a>
<a href="#" onclick="return ls.blog.removeInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_remove}</a>
</li>
{/foreach}
</ul>
{/if}
<span id="blog-invite-empty" class="notice-empty" {if $aBlogUsersInvited}style="display: none"{/if}>{$aLang.blog_admin_user_add_empty}</span>
</div>
{/block}

View file

@ -0,0 +1,37 @@
{**
* Навигация по блогам с возможностью выбрать категорию и блог из этой категории
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noFooter' value=true}
{assign var='noNav' value=true}
{/block}
{block name='title'}{$aLang.block_blog_navigator}{/block}
{block name='type'}blog-navigation{/block}
{block name='content'}
{if $aNavigatorBlogCategories}
<p><select id="blog-navigator-category" class="width-full blog-navigator-categories" onchange="ls.blog.loadBlogsByCategory($(this).val());">
<option value="0">{$aLang.blog_category}</option>
{foreach from=$aNavigatorBlogCategories item=oCategoryItem}
<option style="margin-left: {$oCategoryItem->getLevel()*20}px;" value="{$oCategoryItem->getId()}">{$oCategoryItem->getTitle()|escape:'html'}</option>
{/foreach}
</select></p>
<p><select id="blog-navigator-blog" class="width-full" disabled>
<option value="0">{$aLang.blog}</option>
{foreach from=$aNavigatorBlogs item=oBlogItem}
<option value="{$oBlogItem->getId()}" data-url="{$oBlogItem->getUrlFull()}">{$oBlogItem->getTitle()|escape:'html'}</option>
{/foreach}
</select></p>
<button onclick="ls.blog.navigatorGoSelectBlog();" class="button" id="blog-navigator-button" disabled>{$aLang.block_blog_navigator_button}</button>
{else}
No categories {* TODO: Language *}
{/if}
{/block}

View file

@ -1,26 +0,0 @@
{if $aNavigatorBlogCategories}
<section class="block block-type-blog-navigation">
<header class="block-header">
<h3>{$aLang.block_blog_navigator}</h3>
</header>
<div class="block-content">
<select id="blog-navigator-category" class="width-full blog-navigator-categories" onchange="ls.blog.loadBlogsByCategory($(this).val());">
<option value="0">{$aLang.blog_category}</option>
{foreach from=$aNavigatorBlogCategories item=oCategoryItem}
<option style="margin-left: {$oCategoryItem->getLevel()*20}px;" value="{$oCategoryItem->getId()}">{$oCategoryItem->getTitle()|escape:'html'}</option>
{/foreach}
</select>
<br/><br/>
<select id="blog-navigator-blog" class="width-full" disabled>
<option value="0">{$aLang.blog}</option>
{foreach from=$aNavigatorBlogs item=oBlogItem}
<option value="{$oBlogItem->getId()}" data-url="{$oBlogItem->getUrlFull()}">{$oBlogItem->getTitle()|escape:'html'}</option>
{/foreach}
</select>
<br/><br/>
<button onclick="ls.blog.navigatorGoSelectBlog();" class="button" id="blog-navigator-button" disabled>{$aLang.block_blog_navigator_button}</button>
</div>
</section>
{/if}

View file

@ -1,28 +1,31 @@
<div class="block block-type-blogs" id="block_blogs">
<header class="block-header sep">
<h3>{$aLang.block_blogs}</h3>
<div class="block-update js-block-blogs-update"></div>
<ul class="nav nav-pills js-block-blogs-nav">
<li class="active js-block-blogs-item" data-type="top"><a href="#">{$aLang.block_blogs_top}</a></li>
{if $oUserCurrent}
<li class="js-block-blogs-item" data-type="join"><a href="#">{$aLang.block_blogs_join}</a></li>
<li class="js-block-blogs-item" data-type="self"><a href="#">{$aLang.block_blogs_self}</a></li>
{/if}
</ul>
</header>
<div class="block-content">
<div class="js-block-blogs-content">
{$sBlogsTop}
</div>
{**
* Блок со списоком блогов
*
* @styles css/blocks.css
*}
<footer>
<a href="{router page='blogs'}">{$aLang.block_blogs_all}</a>
</footer>
{extends file='blocks/block.aside.base.tpl'}
{block name='title'}{$aLang.block_blogs}{/block}
{block name='type'}blogs{/block}
{block name='nav'}
<ul class="nav nav-pills js-block-nav" data-type="tabs">
<li data-type="tab" data-option-url="{router page='ajax'}blogs/top" data-option-target="js-tab-pane-blogs" class="active"><a href="#">{$aLang.block_blogs_top}</a></li>
{if $oUserCurrent}
<li data-type="tab" data-option-url="{router page='ajax'}blogs/join" data-option-target="js-tab-pane-blogs"><a href="#">{$aLang.block_blogs_join}</a></li>
<li data-type="tab" data-option-url="{router page='ajax'}blogs/self" data-option-target="js-tab-pane-blogs"><a href="#">{$aLang.block_blogs_self}</a></li>
{/if}
</ul>
{/block}
{block name='content'}
<div id="js-tab-pane-blogs">
{$sBlogsTop}
</div>
</div>
{/block}
{block name='footer'}
<a href="{router page='blogs'}">{$aLang.block_blogs_all}</a>
{/block}

View file

@ -1,3 +1,10 @@
{**
* Блок со списоком блогов
* Список блогов
*
* @styles css/blocks.css
*}
<ul class="block-blog-list">
{foreach from=$aBlogs item=oBlog}
<li>

View file

@ -0,0 +1,34 @@
{**
* Меню пользователя ("Добавить в друзья", "Написать письмо" и т.д.)
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noHeader' value=true}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='type'}profile-actions{/block}
{block name='content'}
<script type="text/javascript">
jQuery(function($){
ls.lang.load({lang_load name="profile_user_unfollow,profile_user_follow"});
});
</script>
<ul class="profile-actions" id="profile_actions">
{include file='actions/ActionProfile/friend_item.tpl' oUserFriend=$oUserProfile->getUserFriend()}
<li><a href="{router page='talk'}add/?talk_users={$oUserProfile->getLogin()}">{$aLang.user_write_prvmsg}</a></li>
<li>
<a href="#" onclick="ls.user.followToggle(this, {$oUserProfile->getId()}); return false;" class="{if $oUserProfile->isFollow()}followed{/if}">
{if $oUserProfile->isFollow()}{$aLang.profile_user_unfollow}{else}{$aLang.profile_user_follow}{/if}
</a>
</li>
</ul>
{/block}

View file

@ -0,0 +1,36 @@
{**
* Блок с навигацией по профилю пользователя
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noHeader' value=true}
{assign var='noNav' value=true}
{assign var='noContent' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='type'}profile-nav{/block}
{block name='content_after'}
<ul class="nav nav-profile">
{hook run='profile_sidebar_menu_item_first' oUserProfile=$oUserProfile}
<li {if $sAction=='profile' && ($aParams[0]=='whois' or $aParams[0]=='')}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='wall'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}wall/">{$aLang.user_menu_profile_wall}{if ($iCountWallUser)>0} ({$iCountWallUser}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='created'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}created/topics/">{$aLang.user_menu_publication}{if ($iCountCreated)>0} ({$iCountCreated}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='favourites'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/topics/">{$aLang.user_menu_profile_favourites}{if ($iCountFavourite)>0} ({$iCountFavourite}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='friends'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}friends/">{$aLang.user_menu_profile_friends}{if ($iCountFriendsUser)>0} ({$iCountFriendsUser}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='stream'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}stream/">{$aLang.user_menu_profile_stream}</a></li>
{if $oUserCurrent and $oUserCurrent->getId() == $oUserProfile->getId()}
<li {if $sAction=='talk'}class="active"{/if}><a href="{router page='talk'}">{$aLang.talk_menu_inbox}{if $iUserCurrentCountTalkNew} ({$iUserCurrentCountTalkNew}){/if}</a></li>
<li {if $sAction=='settings'}class="active"{/if}><a href="{router page='settings'}">{$aLang.settings_menu}</a></li>
{/if}
{hook run='profile_sidebar_menu_item_last' oUserProfile=$oUserProfile}
</ul>
{/block}

View file

@ -0,0 +1,45 @@
{**
* Блок с заметкой о пользователе
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noHeader' value=true}
{assign var='noNav' value=true}
{assign var='noContent' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='type'}profile-note{/block}
{block name='content_after'}
{if $oUserNote}
<script type="text/javascript">
ls.usernote.sText = {json var = $oUserNote->getText()};
</script>
{/if}
<div id="usernote-note" class="profile-note" {if !$oUserNote}style="display: none;"{/if}>
<p id="usernote-note-text">
{if $oUserNote}
{$oUserNote->getText()}
{/if}
</p>
<ul class="actions">
<li><a href="#" onclick="return ls.usernote.showForm();" class="link-dotted">{$aLang.user_note_form_edit}</a></li>
<li><a href="#" onclick="return ls.usernote.remove({$oUserProfile->getId()});" class="link-dotted">{$aLang.user_note_form_delete}</a></li>
</ul>
</div>
<div id="usernote-form" style="display: none;">
<p><textarea rows="4" cols="20" id="usernote-form-text" class="input-text input-width-full"></textarea></p>
<button type="submit" onclick="return ls.usernote.save({$oUserProfile->getId()});" class="button button-primary">{$aLang.user_note_form_save}</button>
<button type="submit" onclick="return ls.usernote.hideForm();" class="button">{$aLang.user_note_form_cancel}</button>
</div>
<a href="#" onclick="return ls.usernote.showForm();" id="usernote-button-add" class="link-dotted" {if $oUserNote}style="display:none;"{/if}>{$aLang.user_note_add}</a>
{/block}

View file

@ -0,0 +1,38 @@
{**
* Блок с фотографией пользователя в профиле
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noHeader' value=true}
{assign var='noNav' value=true}
{assign var='noContent' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='type'}profile-photo{/block}
{block name='content_after'}
<div class="profile-photo-wrapper">
<div class="status {if $oUserProfile->isOnline()}status-online{else}status-offline{/if}">{if $oUserProfile->isOnline()}{$aLang.user_status_online}{else}{$aLang.user_status_offline}{/if}</div>
<a href="{$oUserProfile->getUserWebPath()}"><img src="{$oUserProfile->getProfileFotoPath()}" alt="photo" class="profile-photo" id="foto-img" /></a>
</div>
{if $sAction=='settings' and $oUserCurrent and $oUserCurrent->getId() == $oUserProfile->getId()}
<script type="text/javascript">
jQuery(function($){
$('#foto-upload').file({ name:'foto' }).choose(function(e, input) {
ls.user.uploadFoto(null,input);
});
});
</script>
<p class="upload-photo">
<a href="#" id="foto-upload" class="link-dotted">{if $oUserCurrent->getProfileFoto()}{$aLang.settings_profile_photo_change}{else}{$aLang.settings_profile_photo_upload}{/if}</a>&nbsp;&nbsp;&nbsp;
<a href="#" id="foto-remove" class="link-dotted" onclick="return ls.user.removeFoto();" style="{if !$oUserCurrent->getProfileFoto()}display:none;{/if}">{$aLang.settings_profile_foto_delete}</a>
</p>
{/if}
{/block}

View file

@ -1,37 +1,60 @@
<section class="block block-type-stream">
{**
* Прямой эфир
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noContent' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}<a href="{router page='comments'}" title="{$aLang.block_stream_comments_all}">{$aLang.block_stream}</a>{/block}
{block name='type'}stream{/block}
{* Кнопка обновления *}
{block name='header_end'}
<div class="block-update" id="js-stream-update"></div>
{/block}
{* Навигация *}
{block name='nav'}
{hook run='block_stream_nav_item' assign="sItemsHook"}
<header class="block-header sep">
<h3><a href="{router page='comments'}" title="{$aLang.block_stream_comments_all}">{$aLang.block_stream}</a></h3>
<div class="block-update js-block-stream-update"></div>
<ul class="nav nav-pills js-block-stream-nav" {if $sItemsHook}style="display: none;"{/if}>
<li class="active js-block-stream-item" data-type="comment"><a href="#">{$aLang.block_stream_comments}</a></li>
<li class="js-block-stream-item" data-type="topic"><a href="#">{$aLang.block_stream_topics}</a></li>
{$sItemsHook}
</ul>
<div class="dropdown js-block-stream-dropdown js-block-stream-dropdown-trigger js-dropdown-default"
data-type="dropdown-toggle"
data-option-target="js-dropdown-stream-nav"
data-option-change-text="true"
{if !$sItemsHook}style="display: none;"{/if}>
<ul class="nav nav-pills js-block-nav" data-type="tabs" id="js-stream-tabs" {if $sItemsHook}style="display: none;"{/if}>
<li data-type="tab" data-option-url="{router page='ajax'}stream/comment" data-option-target="js-tab-pane-stream" class="active"><a href="#">{$aLang.block_stream_comments}</a></li>
<li data-type="tab" data-option-url="{router page='ajax'}stream/topic" data-option-target="js-tab-pane-stream"><a href="#">{$aLang.block_stream_topics}</a></li>
<span data-type="dropdown-text">{$aLang.block_stream_comments}</span>
<i class="icon-synio-arrows"></i>
</div>
<ul class="dropdown-menu js-block-stream-dropdown-items" id="js-dropdown-stream-nav">
<li class="active js-block-stream-item" data-type="comment"><a href="#">{$aLang.block_stream_comments}</a></li>
<li class="js-block-stream-item" data-type="topic"><a href="#">{$aLang.block_stream_topics}</a></li>
{$sItemsHook}
</ul>
</header>
{$sItemsHook}
</ul>
<div class="block-content">
<div class="js-block-stream-content">
{$sStreamComments}
</div>
</div>
</section>
{**
* Выпадающее меню
* Показывается если в меню что выше пунктов больше установленного значения (по умолчанию - 2)
*}
<div
class="dropdown dropdown-toggle js-dropdown-default"
id="js-stream-dropdown"
data-type="dropdown-toggle"
data-option-target="js-dropdown-menu-stream"
data-option-change-text="true"
{if !$sItemsHook}style="display: none;"{/if}><span data-type="dropdown-text">{$aLang.block_stream_comments}</span></div>
<ul class="dropdown-menu js-block-nav" id="js-dropdown-menu-stream" data-type="tabs">
<li class="active" data-type="tab" data-option-url="{router page='ajax'}stream/comment" data-option-target="js-tab-pane-stream"><a href="#">{$aLang.block_stream_comments}</a></li>
<li data-type="tab" data-option-url="{router page='ajax'}stream/topic" data-option-target="js-tab-pane-stream"><a href="#">{$aLang.block_stream_topics}</a></li>
{$sItemsHook}
</ul>
{/block}
{* Контент *}
{block name='content_after'}
<div id="js-tab-pane-stream">
{$sStreamComments}
</div>
{/block}

View file

@ -1,111 +0,0 @@
{if $oUserCurrent}
{literal}
<script type="text/javascript">
jQuery(document).ready( function() {
jQuery('#stream_users_complete').keydown(function (event) {
if (event.which == 13) {
ls.stream.appendUser()
}
});
});
</script>
{/literal}
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.stream_block_config_title}</h3>
</header>
<div class="block-content">
<small class="note">{$aLang.stream_settings_note_filter}</small>
<ul class="activity-settings-filter">
{foreach from=$aStreamEventTypes key=sType item=aEventType}
{if !($oConfig->get('module.stream.disable_vote_events') && substr($sType, 0, 4) == 'vote')}
<li>
<label>
<input class="streamEventTypeCheckbox input-checkbox"
type="checkbox"
id="strn_et_{$sType}"
{if in_array($sType, $aStreamTypesList)}checked="checked"{/if}
onClick="ls.stream.switchEventType('{$sType}')" />
{assign var=langKey value="stream_event_type_`$sType`"}
{$aLang.$langKey}
</label>
</li>
{/if}
{/foreach}
</ul>
</div>
</section>
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.stream_block_users_friends}</h3>
</header>
<div class="block-content">
<small class="note">{$aLang.stream_settings_note_follow_friend}</small>
{if count($aStreamFriends)}
<ul class="stream-settings-friends user-list-mini max-height-200">
{foreach from=$aStreamFriends item=oUser}
{assign var=iUserId value=$oUser->getId()}
<li><input class="streamUserCheckbox input-checkbox"
type="checkbox"
id="strm_u_{$iUserId}"
{if isset($aStreamSubscribedUsers.$iUserId)} checked="checked"{/if}
onClick="if (jQuery(this).prop('checked')) { ls.stream.subscribe({$iUserId}) } else { ls.stream.unsubscribe({$iUserId}) } " />
<a href="{$oUser->getUserWebPath()}" title="{$oUser->getLogin()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/foreach}
</ul>
{else}
<small class="note">{$aLang.stream_no_subscribed_users}</small>
{/if}
</div>
</section>
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.stream_block_users_title}</h3>
</header>
<div class="block-content">
<div class="search-form-wrapper">
<div class="search-input-wrapper">
<input type="text" id="stream_users_complete" autocomplete="off" placeholder="{$aLang.stream_block_config_append}" class="autocomplete-users input-text input-width-full" />
<div onclick="ls.stream.appendUser();" class="input-submit"></div>
</div>
</div>
{if count($aStreamSubscribedUsers)}
<ul id="stream_block_users_list" class="user-list-mini max-height-200">
{foreach from=$aStreamSubscribedUsers item=oUser}
{assign var=iUserId value=$oUser->getId()}
{if !isset($aStreamFriends.$iUserId)}
<li><input class="streamUserCheckbox input-checkbox"
type="checkbox"
id="strm_u_{$iUserId}"
checked="checked"
onClick="if (jQuery(this).prop('checked')) { ls.stream.subscribe({$iUserId}) } else { ls.stream.unsubscribe({$iUserId}) } " />
<a href="{$oUser->getUserWebPath()}" title="{$oUser->getLogin()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/if}
{/foreach}
</ul>
{else}
<ul id="stream_block_users_list"></ul>
<p id="stream_no_subscribed_users">{$aLang.stream_no_subscribed_users}</p>
{/if}
</div>
</section>
{/if}

View file

@ -1,23 +1,31 @@
<ul class="latest-list">
{foreach from=$aComments item=oComment name="cmt"}
{assign var="oUser" value=$oComment->getUser()}
{assign var="oTopic" value=$oComment->getTarget()}
{assign var="oBlog" value=$oTopic->getBlog()}
<li class="js-title-comment" title="{$oComment->getText()|strip_tags|trim|truncate:100:'...'|escape:'html'}">
<p>
<a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getLogin()}</a>
<time datetime="{date_format date=$oComment->getDate() format='c'}" title="{date_format date=$oComment->getDate() format="j F Y, H:i"}">
{date_format date=$oComment->getDate() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
</time>
</p>
<a href="{if $oConfig->GetValue('module.comment.nested_per_page')}{router page='comments'}{else}{$oTopic->getUrl()}#comment{/if}{$oComment->getId()}" class="stream-topic">{$oTopic->getTitle()|escape:'html'}</a>
<span class="block-item-comments"><i class="icon-synio-comments-small"></i>{$oTopic->getCountComment()}</span>
</li>
{/foreach}
</ul>
{**
* Прямой эфир
* Топики отсортированные по времени последнего комментария
*
* @styles css/blocks.css
*}
<div class="block-content">
<ul class="latest-list">
{foreach from=$aComments item=oComment name="cmt"}
{assign var="oUser" value=$oComment->getUser()}
{assign var="oTopic" value=$oComment->getTarget()}
{assign var="oBlog" value=$oTopic->getBlog()}
<li class="js-title-comment" title="{$oComment->getText()|strip_tags|trim|truncate:100:'...'|escape:'html'}">
<p>
<a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getLogin()}</a>
<time datetime="{date_format date=$oComment->getDate() format='c'}" title="{date_format date=$oComment->getDate() format="j F Y, H:i"}">
{date_format date=$oComment->getDate() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
</time>
</p>
<a href="{if $oConfig->GetValue('module.comment.nested_per_page')}{router page='comments'}{else}{$oTopic->getUrl()}#comment{/if}{$oComment->getId()}" class="stream-topic">{$oTopic->getTitle()|escape:'html'}</a>
<span class="block-item-comments"><i class="icon-synio-comments-small"></i>{$oTopic->getCountComment()}</span>
</li>
{/foreach}
</ul>
</div>
<footer>
<footer class="block-footer">
<a href="{router page='comments'}">{$aLang.block_stream_comments_all}</a> · <a href="{router page='rss'}allcomments/">RSS</a>
</footer>

View file

@ -1,24 +1,31 @@
<ul class="latest-list">
{foreach from=$oTopics item=oTopic name="cmt"}
{assign var="oUser" value=$oTopic->getUser()}
{assign var="oBlog" value=$oTopic->getBlog()}
<li class="js-title-topic" title="{$oTopic->getText()|strip_tags|trim|truncate:150:'...'|escape:'html'}">
<p>
<a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getLogin()}</a>
<time datetime="{date_format date=$oTopic->getDateAdd() format='c'}" title="{date_format date=$oTopic->getDateAdd() format="j F Y, H:i"}">
{date_format date=$oTopic->getDateAdd() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
</time>
</p>
<a href="{$oBlog->getUrlFull()}" class="stream-blog">{$oBlog->getTitle()|escape:'html'}</a> &rarr;
<a href="{$oTopic->getUrl()}" class="stream-topic">{$oTopic->getTitle()|escape:'html'}</a>
<span class="block-item-comments"><i class="icon-synio-comments-small"></i>{$oTopic->getCountComment()}</span>
</li>
{/foreach}
</ul>
{**
* Прямой эфир
* Последние топики
*
* @styles css/blocks.css
*}
<div class="block-content">
<ul class="latest-list">
{foreach from=$oTopics item=oTopic name="cmt"}
{assign var="oUser" value=$oTopic->getUser()}
{assign var="oBlog" value=$oTopic->getBlog()}
<li class="js-title-topic" title="{$oTopic->getText()|strip_tags|trim|truncate:150:'...'|escape:'html'}">
<p>
<a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getLogin()}</a>
<time datetime="{date_format date=$oTopic->getDateAdd() format='c'}" title="{date_format date=$oTopic->getDateAdd() format="j F Y, H:i"}">
{date_format date=$oTopic->getDateAdd() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
</time>
</p>
<a href="{$oBlog->getUrlFull()}" class="stream-blog">{$oBlog->getTitle()|escape:'html'}</a> &rarr;
<a href="{$oTopic->getUrl()}" class="stream-topic">{$oTopic->getTitle()|escape:'html'}</a>
<span class="block-item-comments"><i class="icon-synio-comments-small"></i>{$oTopic->getCountComment()}</span>
</li>
{/foreach}
</ul>
</div>
<footer>
<footer class="block-footer">
<a href="{router page='index'}new/">{$aLang.block_stream_topics_all}</a> · <a href="{router page='rss'}new/">RSS</a>
</footer>
</footer>

View file

@ -1,27 +1,39 @@
<section class="block block-type-tags">
<header class="block-header sep">
<h3>{$aLang.block_tags}</h3>
<ul class="nav nav-pills">
<li class="active js-block-tags-item" data-type="all"><a href="#">{$aLang.topic_favourite_tags_block_all}</a></li>
{if $oUserCurrent}
<li class="js-block-tags-item" data-type="user"><a href="#">{$aLang.topic_favourite_tags_block_user}</a></li>
{/if}
{**
* Теги
*
* @styles css/blocks.css
*}
{hook run='block_tags_nav_item'}
</ul>
</header>
<div class="block-content">
<form action="" method="GET" class="js-tag-search-form search-form-wrapper">
<div class="search-input-wrapper">
<input type="text" name="tag" placeholder="{$aLang.block_tags_search}" value="" class="input-text input-width-full autocomplete-tags js-tag-search" />
<div class="input-submit" onclick="jQuery('.js-tag-search-form').submit()"></div>
</div>
</form>
{extends file='blocks/block.aside.base.tpl'}
<div class="js-block-tags-content" data-type="all">
{block name='options'}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.block_tags}{/block}
{block name='type'}tags{/block}
{block name='nav'}
<ul class="nav nav-pills" data-type="tabs">
<li class="active" data-type="tab" data-option-target="js-tab-pane-all"><a href="#">{$aLang.topic_favourite_tags_block_all}</a></li>
{if $oUserCurrent}
<li data-type="tab" data-option-target="js-tab-pane-my"><a href="#">{$aLang.topic_favourite_tags_block_user}</a></li>
{/if}
{hook run='block_tags_nav_item'}
</ul>
{/block}
{block name='content'}
<form action="" method="GET" class="js-tag-search-form search-form-wrapper">
<div class="search-input-wrapper">
<input type="text" name="tag" placeholder="{$aLang.block_tags_search}" value="" class="input-text input-width-full autocomplete-tags js-tag-search" />
<div class="input-submit" onclick="jQuery('.js-tag-search-form').submit()"></div>
</div>
</form>
<div data-type="tab-content">
<div class="tab-pane" data-type="tab-pane" id="js-tab-pane-all" style="display: block">
{if $aTags}
<ul class="tag-cloud word-wrap">
{foreach from=$aTags item=oTag}
@ -34,17 +46,17 @@
</div>
{if $oUserCurrent}
<div class="js-block-tags-content" data-type="user" style="display: none;">
<div class="tab-pane" data-type="tab-pane" id="js-tab-pane-my">
{if $aTagsUser}
<ul class="tag-cloud word-wrap">
{foreach from=$aTagsUser item=oTag}
<li><a class="tag-size-{$oTag->getSize()}" href="{router page='tag'}{$oTag->getText()|escape:'url'}/">{$oTag->getText()|escape:'html'}</a></li>
{/foreach}
</ul>
{else}
{else}
<div class="notice-empty">{$aLang.block_tags_empty}</div>
{/if}
</div>
{/if}
</div>
</section>
{/block}

View file

@ -1,16 +1,26 @@
{if $aCityList && count($aCityList)>0}
<section class="block">
<header class="block-header">
<h3>{$aLang.block_city_tags}</h3>
</header>
<div class="block-content">
<ul class="tag-cloud word-wrap">
{foreach from=$aCityList item=oCity}
<li><a class="tag-size-{$oCity->getSize()}" href="{router page='people'}city/{$oCity->getId()}/">{$oCity->getName()|escape:'html'}</a></li>
{/foreach}
</ul>
</div>
</section>
{/if}
{**
* Список городов в которых проживают пользователи
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.block_city_tags}{/block}
{block name='content'}
{if $aCityList && count($aCityList) > 0}
<ul class="tag-cloud word-wrap">
{foreach from=$aCityList item=oCity}
<li><a class="tag-size-{$oCity->getSize()}" href="{router page='people'}city/{$oCity->getId()}/">{$oCity->getName()|escape:'html'}</a></li>
{/foreach}
</ul>
{else}
No cities {* Language *}
{/if}
{/block}

View file

@ -1,16 +1,24 @@
{if $aCountryList && count($aCountryList)>0}
<section class="block">
<header class="block-header">
<h3>{$aLang.block_country_tags}</h3>
</header>
<div class="block-content">
<ul class="tag-cloud word-wrap">
{foreach from=$aCountryList item=oCountry}
<li><a class="tag-size-{$oCountry->getSize()}" href="{router page='people'}country/{$oCountry->getId()}/">{$oCountry->getName()|escape:'html'}</a></li>
{/foreach}
</ul>
</div>
</section>
{/if}
{**
* Список стран в которых проживают пользователи
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.block_country_tags}{/block}
{block name='content'}
{if $aCountryList && count($aCountryList) > 0}
<ul class="tag-cloud word-wrap">
{foreach from=$aCountryList item=oCountry}
<li><a class="tag-size-{$oCountry->getSize()}" href="{router page='people'}country/{$oCountry->getId()}/">{$oCountry->getName()|escape:'html'}</a></li>
{/foreach}
</ul>
{/if}
{/block}

View file

@ -1,27 +1,35 @@
{if $oUserCurrent}
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.userfeed_block_blogs_title}</h3>
</header>
<div class="block-content">
<small class="note">{$aLang.userfeed_settings_note_follow_blogs}</small>
{**
* Выбор блогов для чтения в ленте
*
* @styles css/blocks.css
*}
{if count($aUserfeedBlogs)}
<ul class="stream-settings-blogs">
{foreach from=$aUserfeedBlogs item=oBlog}
{assign var=iBlogId value=$oBlog->getId()}
<li><input class="userfeedBlogCheckbox input-checkbox"
type="checkbox"
{if isset($aUserfeedSubscribedBlogs.$iBlogId)} checked="checked"{/if}
onClick="if (jQuery(this).prop('checked')) { ls.userfeed.subscribe('blogs',{$iBlogId}) } else { ls.userfeed.unsubscribe('blogs',{$iBlogId}) } " />
<a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape:'html'}</a>
</li>
{/foreach}
</ul>
{else}
<small class="notice-empty">{$aLang.userfeed_no_blogs}</small>
{/if}
</div>
</section>
{/if}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.userfeed_block_blogs_title}{/block}
{block name='type'}activity{/block}
{block name='content'}
<small class="note">{$aLang.userfeed_settings_note_follow_blogs}</small>
{if count($aUserfeedBlogs)}
<ul class="stream-settings-blogs">
{foreach from=$aUserfeedBlogs item=oBlog}
{assign var=iBlogId value=$oBlog->getId()}
<li><input class="userfeedBlogCheckbox input-checkbox"
type="checkbox"
{if isset($aUserfeedSubscribedBlogs.$iBlogId)} checked="checked"{/if}
onClick="if (jQuery(this).prop('checked')) { ls.userfeed.subscribe('blogs',{$iBlogId}) } else { ls.userfeed.unsubscribe('blogs',{$iBlogId}) } " />
<a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape:'html'}</a>
</li>
{/foreach}
</ul>
{else}
<small class="notice-empty">{$aLang.userfeed_no_blogs}</small>
{/if}
{/block}

View file

@ -0,0 +1,37 @@
{**
* Выбор друзей для чтения в ленте
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.userfeed_block_users_friends}{/block}
{block name='type'}activity{/block}
{if $oUserCurrent && count($aUserfeedFriends)}
{block name='content'}
<small class="note">{$aLang.userfeed_settings_note_follow_friend}</small>
<ul class="user-list-mini max-height-200 js-userfeed-block-users">
{foreach from=$aUserfeedFriends item=oUser}
{assign var=iUserId value=$oUser->getId()}
<li id="userfeed-block-users-item-{$iUserId}">
<input class="input-checkbox"
type="checkbox"
data-user-id="{$iUserId}"
{if isset($aUserfeedSubscribedUsers.$iUserId)} checked="checked"{/if} />
<a href="{$oUser->getUserWebPath()}" title="{$oUser->getLogin()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/foreach}
</ul>
{/block}
{/if}

View file

@ -1,82 +1,51 @@
{**
* Выбор пользователей для чтения в ленте
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.userfeed_block_users_title}{/block}
{block name='type'}activity{/block}
{if $oUserCurrent}
{literal}
<script language="JavaScript" type="text/javascript">
jQuery(document).ready( function() {
jQuery('#userfeed_users_complete').keydown(function (event) {
if (event.which == 13) {
ls.userfeed.appendUser()
}
});
});
</script>
{/literal}
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.userfeed_block_users_title}</h3>
</header>
{block name='content'}
<small class="note">{$aLang.userfeed_settings_note_follow_user}</small>
<div class="block-content">
<small class="note">{$aLang.userfeed_settings_note_follow_user}</small>
<div class="stream-settings-userlist">
<div class="search-form-wrapper">
<div class="search-input-wrapper">
<input type="text" id="userfeed_users_complete" autocomplete="off" placeholder="{$aLang.userfeed_block_users_append}" class="autocomplete-users input-text input-width-full" />
<div onclick="ls.userfeed.appendUser();" class="input-submit"></div>
</div>
<div class="stream-settings-userlist">
<div class="search-form-wrapper">
<div class="search-input-wrapper">
<input type="text" id="userfeed-block-users-input" autocomplete="off" placeholder="{$aLang.userfeed_block_users_append}" class="autocomplete-users input-text input-width-full" />
<div onclick="ls.userfeed.appendUser();" class="input-submit"></div>
</div>
{if count($aUserfeedSubscribedUsers)}
<ul id="userfeed_block_users_list" class="user-list-mini max-height-200">
{foreach from=$aUserfeedSubscribedUsers item=oUser}
{assign var=iUserId value=$oUser->getId()}
{if !isset($aUserfeedFriends.$iUserId)}
<li><input class="userfeedUserCheckbox input-checkbox"
type="checkbox"
id="usf_u_{$iUserId}"
checked="checked"
onClick="if (jQuery(this).prop('checked')) { ls.userfeed.subscribe('users',{$iUserId}) } else { ls.userfeed.unsubscribe('users',{$iUserId}) } " />
<a href="{$oUser->getUserWebPath()}" title="{$oUser->getLogin()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/if}
{/foreach}
</ul>
{else}
<ul id="userfeed_block_users_list"></ul>
{/if}
</div>
</div>
</section>
{if count($aUserfeedFriends)}
<section class="block block-type-activity">
<header class="block-header">
<h3>{$aLang.userfeed_block_users_friends}</h3>
</header>
<div class="block-content">
<small class="note">{$aLang.userfeed_settings_note_follow_friend}</small>
<ul class="user-list-mini stream-settings-friends max-height-200">
{foreach from=$aUserfeedFriends item=oUser}
{if count($aUserfeedSubscribedUsers)}
<ul id="userfeed-block-users" class="user-list-mini max-height-200 js-userfeed-block-users">
{foreach from=$aUserfeedSubscribedUsers item=oUser}
{assign var=iUserId value=$oUser->getId()}
<li><input class="userfeedUserCheckbox input-checkbox"
type="checkbox"
id="usf_u_{$iUserId}"
{if isset($aUserfeedSubscribedUsers.$iUserId)} checked="checked"{/if}
onClick="if (jQuery(this).prop('checked')) { ls.userfeed.subscribe('users',{$iUserId}) } else { ls.userfeed.unsubscribe('users',{$iUserId}) } " />
<a href="{$oUser->getUserWebPath()}" title="{$oUser->getLogin()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{if !isset($aUserfeedFriends.$iUserId)}
<li id="userfeed-block-users-item-{$iUserId}">
<input class="input-checkbox"
type="checkbox"
checked="checked"
data-user-id="{$iUserId}" />
<a href="{$oUser->getUserWebPath()}" title="{$oUser->getLogin()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
</li>
{/if}
{/foreach}
</ul>
</div>
</section>
{/if}
</ul>
{else}
<ul id="userfeed_block_users_list"></ul>
{/if}
</div>
{/block}
{/if}

View file

@ -0,0 +1,30 @@
{**
* Статистика по пользователям
*
* @styles css/blocks.css
*}
{extends file='blocks/block.aside.base.tpl'}
{block name='options'}
{assign var='noNav' value=true}
{assign var='noFooter' value=true}
{/block}
{block name='title'}{$aLang.user_stats}{/block}
{block name='content'}
<ul>
<li>{$aLang.user_stats_all}: <strong>{$aStat.count_all}</strong></li>
<li>{$aLang.user_stats_active}: <strong>{$aStat.count_active}</strong></li>
<li>{$aLang.user_stats_noactive}: <strong>{$aStat.count_inactive}</strong></li>
</ul>
<br />
<ul>
<li>{$aLang.user_stats_sex_man}: <strong>{$aStat.count_sex_man}</strong></li>
<li>{$aLang.user_stats_sex_woman}: <strong>{$aStat.count_sex_woman}</strong></li>
<li>{$aLang.user_stats_sex_other}: <strong>{$aStat.count_sex_other}</strong></li>
</ul>
{/block}

View file

@ -82,10 +82,13 @@
{else}
<tr>
<td colspan="5">
{* TODO: Fix error message *}
{if $sBlogsEmptyList}
{$sBlogsEmptyList}
{else}
{/if}
{if !$aBlogs && !$sBlogsEmptyList}
{$aLang.blog_by_category_empty}
{/if}
</td>
</tr>

View file

@ -1,80 +1,48 @@
/* -------------------------------------------------------------------
БЛОКИ
------------------------------------------------------------------- */
/**
* Blocks
*/
.block { padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px dotted #dce1e6; }
.block:last-child { margin-bottom: 0; border: none; }
.sidebar-left .block { margin-bottom: 10px; }
/**
* Base
*/
.block { padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px dotted #dce1e6; }
.block:last-child { margin-bottom: 0; border: none; }
.block .block-header { position: relative; margin-bottom: 4px; padding-bottom: 16px; }
.block .block-header.sep { background: url(../images/block-sep.png) 0 100% no-repeat; }
.block .block-header h3 { font-size: 22px; line-height: 1em; font-weight: normal; font-family: 'PT Sans', sans-serif; }
.block .block-header h3 a { text-decoration: none; color: #333; }
.block .block-header h3 a.link-dotted { color: #5055B2; }
.block .block-header .dropdown { margin: 0; }
.block .block-content { }
.block footer { margin-top: 15px; font-size: 11px; color: #b9c2c2; }
.block footer a { color: #727a90; }
.block .loading { min-height: 100px; background-image: url(../images/loader-circle.gif); background-position: 50% 0; }
.block .max-height-200 { overflow: auto; max-height: 200px; position: relative; }
.block .max-height-200 { overflow: auto; max-height: 200px; _height: expression( this.scrollHeight > 200 ? "200px" : "auto" ); position: relative; }
/* Header */
.block .block-header { position: relative; margin-bottom: 15px; }
.block .block-header .block-title { font-size: 22px; line-height: 1em; font-weight: normal; font-family: 'PT Sans', sans-serif; }
.block .block-header .block-title a { text-decoration: none; color: #333; }
.block .nav.nav-pills { margin-bottom: 0; padding-top: 15px; }
.block .nav.nav-pills a { text-decoration: none; border-bottom: 1px dotted #727a90; }
.block .nav.nav-pills li.active a { border: none; }
/* Nav */
.block-nav { margin-bottom: 5px; padding: 0 0 16px; background: url(../images/block-sep.png) 0 100% no-repeat; }
.block-nav .nav,
.block-nav .dropdown { margin-bottom: 0; }
.block-nav .nav.nav-pills li a { text-decoration: none; border-bottom: 1px dotted #727a90; }
.block-nav .nav.nav-pills li.active a { border: none; }
/* Block Type - Stream */
.block .block-update { position: absolute; bottom: 18px; right: 5px; width: 20px; height: 20px; background: url(../images/icons-synio.png) 0 -200px no-repeat; cursor: pointer; }
.block .block-update:hover { background-position: -20px -200px; }
.block .block-update.active { background-position: -40px -200px; }
/* Content */
.block .block-content { }
.block.block-type-stream .block-content .latest-list { }
.block.block-type-stream .block-content .latest-list li { margin-bottom: 15px; color: #818189; }
.block.block-type-stream .block-content .latest-list p { font-size: 11px; }
.block.block-type-stream .block-content .latest-list .stream-topic { text-decoration: underline; }
.block.block-type-stream .block-content .latest-list .stream-blog { color: #4128B1; }
.block.block-type-stream .block-content .latest-list .stream-blog:hover { color: #f00; }
.block.block-type-stream .block-content .latest-list .author { color: #4c4c4c; text-decoration: underline; }
.block.block-type-stream .block-content .latest-list .author:hover { color: #f00; }
.block.block-type-stream .block-content .latest-list .block-item-comments { font-size: 11px; text-decoration: none; color: #818189; white-space: nowrap; }
.block.block-type-stream .block-content .latest-list .block-item-comments i { position: relative; top: 3px; margin-right: 2px; }
/* Footer */
.block footer { margin-top: 15px; font-size: 11px; color: #b9c2c2; }
.block footer a { color: #727a90; }
/* Block Type - Activity Settings */
.block.block-type-activity p { margin-bottom: 15px; }
.block.block-type-activity ul li { }
.block.block-type-activity ul.stream-settings-blogs li { margin-bottom: 3px; }
.block.block-type-activity .note { display: block; margin-bottom: 15px; color: #aaa; }
/* Block Type - Profile */
.block.block-type-profile { background: none; border: none; padding: 0; }
.block.block-type-profile .profile-photo-wrapper { position: relative; min-height: 50px; }
.block.block-type-profile .profile-photo { vertical-align: top; max-width: 240px; }
.block.block-type-profile .status { position: absolute; top: 10px; left: 0; padding: 0 0 0 10px; font-size: 11px; line-height: 18px; height: 20px; }
.block.block-type-profile .status:before { content: ''; position: absolute; top: 0; right: -20px; width: 0; height: 0; border-width: 10px; border-style: solid; border-color: #333; border-color: #333 transparent #333 #333; }
.block.block-type-profile .status.status-online { background: #8961e4; color: #fff; }
.block.block-type-profile .status.status-online:before { border-color: #8961e4 transparent #8961e4 #8961e4; }
.block.block-type-profile .status.status-offline { background: #fff; color: #333; opacity: .5; filter: alpha(opacity=50); }
.block.block-type-profile .status.status-offline:before { border-color: #fff transparent #fff #fff; }
.block.block-type-profile .upload-photo { padding: 10px 30px 15px 30px; background: #f8fbfe; font-size: 11px; }
.block.block-type-profile .upload-photo a { color: #727a90; border-color: #727a90; }
.block.block-type-profile-note { border: 2px solid #ffe25d; padding: 15px; border-radius: 5px; }
.block.block-type-profile-note p { margin-bottom: 10px; }
.block.block-type-profile-note .actions { margin-bottom: 0; font-size: 11px; }
.block.block-type-profile-note .actions a { color: #275ec2; border-color: #275ec2; }
.block.block-type-profile-note .actions a:hover { color: #f00; border-color: #f00; }
.block.block-type-profile-nav { padding: 0; background: none; border: none; }
.block.block-type-profile-actions { border: none; }
.block.block-type-profile-actions .block-content { padding: 0 0 0 30px; }
.block.block-type-profile-actions ul li { margin-bottom: 5px; font-size: 11px; }
.block.block-type-profile-actions ul li:last-child { margin-bottom: 0; }
.block.block-type-profile-actions ul li a { color: #727a90; }
.block.block-type-profile-actions ul li a:hover { color: #f00; }
.block.block-type-profile-actions ul li a.followed { color: #f00; }
/* Update button */
.block-update {
position: absolute;
bottom: -36px;
right: 5px;
width: 20px;
height: 20px;
background: url(../images/icons-synio.png) 0 -200px no-repeat;
cursor: pointer;
}
.block-update:hover { background-position: -20px -200px; }
.block-update.active { background-position: -40px -200px; }
/* Block Type - Foldable */
@ -86,15 +54,89 @@
.block.block-type-talk-friends { margin-bottom: 10px; }
/* Block Type - Blogs */
.block.block-type-blogs .block-blog-list li { margin-bottom: 10px; background: url(../images/dots.png) 0% 14px repeat-x; position: relative; padding-right: 50px; }
.block.block-type-blogs .block-blog-list li a { background: #fff; padding-right: 5px; }
.block.block-type-blogs .block-blog-list li i { background-color: #fff; position: relative; top: -2px; }
.block.block-type-blogs .block-blog-list li strong { position: absolute; top: 0; right: 0; background: #fff; padding-left: 2px; font-weight: normal; font-size: 11px; }
/**
* @type stream
* @file blocks/block.stream.tpl
* @file blocks/block.stream_comment.tpl
* @file blocks/block.stream_topic.tpl
*/
.block-type-stream .latest-list { }
.block-type-stream .latest-list li { margin-bottom: 15px; color: #818189; }
.block-type-stream .latest-list p { font-size: 11px; }
.block-type-stream .latest-list .stream-topic { text-decoration: underline; }
.block-type-stream .latest-list .stream-blog { color: #4128B1; }
.block-type-stream .latest-list .stream-blog:hover { color: #f00; }
.block-type-stream .latest-list .author { color: #4c4c4c; text-decoration: underline; }
.block-type-stream .latest-list .author:hover { color: #f00; }
.block-type-stream .latest-list .block-item-comments { font-size: 11px; text-decoration: none; color: #818189; white-space: nowrap; }
.block-type-stream .latest-list .block-item-comments i { position: relative; top: 3px; margin-right: 2px; }
/**
* @type blogs
* @file blocks/block.blogs.tpl
*/
.block-type-blogs .block-blog-list li { margin-bottom: 10px; background: url(../images/dots.png) 0% 14px repeat-x; position: relative; padding-right: 50px; }
.block-type-blogs .block-blog-list li a { background: #fff; padding-right: 5px; }
.block-type-blogs .block-blog-list li i { background-color: #fff; position: relative; top: -2px; }
.block-type-blogs .block-blog-list li strong { position: absolute; top: 0; right: 0; background: #fff; padding-left: 2px; font-weight: normal; font-size: 11px; }
/* Block Type - Blogs */
.block.block-type-blog {
/**
* @type tags
* @file blocks/block.tags.tpl
*/
.block.block-type-tags .search-form-wrapper { margin-bottom: 15px; }
/**
* @type activity
* @file blocks/block.activityX.tpl
*/
.block-type-activity p { margin-bottom: 15px; }
.block-type-activity .note { display: block; margin-bottom: 15px; color: #aaa; }
.block-type-activity .activity-settings-filter li { margin-bottom: 5px; }
/**
* @type profile
* @file blocks/block.profilePhoto.tpl
*/
.block-type-profile-photo { background: none; border: none; padding: 0; }
.block-type-profile-photo .profile-photo-wrapper { position: relative; min-height: 50px; }
.block-type-profile-photo .profile-photo { vertical-align: top; max-width: 240px; }
.block-type-profile-photo .status { position: absolute; top: 10px; left: 0; padding: 0 0 0 10px; font-size: 11px; line-height: 18px; height: 20px; }
.block-type-profile-photo .status:before { content: ''; position: absolute; top: 0; right: -20px; width: 0; height: 0; border-width: 10px; border-style: solid; border-color: #333; border-color: #333 transparent #333 #333; }
.block-type-profile-photo .status.status-online { background: #8961e4; color: #fff; }
.block-type-profile-photo .status.status-online:before { border-color: #8961e4 transparent #8961e4 #8961e4; }
.block-type-profile-photo .status.status-offline { background: #fff; color: #333; opacity: .5; filter: alpha(opacity=50); }
.block-type-profile-photo .status.status-offline:before { border-color: #fff transparent #fff #fff; }
.block-type-profile-photo .upload-photo { padding: 10px 30px 15px 30px; background: #f8fbfe; font-size: 11px; }
.block-type-profile-photo .upload-photo a { color: #727a90; border-color: #727a90; }
/**
* @type profile note
* @file blocks/block.profileNote.tpl
*/
.block-type-profile-note { border: 2px solid #ffe25d; padding: 15px; border-radius: 5px; }
.block-type-profile-note p { margin-bottom: 10px; }
.block-type-profile-note .actions { margin-bottom: 0; font-size: 11px; }
.block-type-profile-note .actions a { color: #275ec2; border-color: #275ec2; }
.block-type-profile-note .actions a:hover { color: #f00; border-color: #f00; }
.block.block-type-profile-nav { padding: 0; background: none; border: none; }
.block.block-type-profile-actions { border: none; }
.block.block-type-profile-actions .block-content { padding: 0 0 0 30px; }
.block.block-type-profile-actions ul li { margin-bottom: 5px; font-size: 11px; }
.block.block-type-profile-actions ul li:last-child { margin-bottom: 0; }
.block.block-type-profile-actions ul li a { color: #727a90; }
.block.block-type-profile-actions ul li a:hover { color: #f00; }
.block.block-type-profile-actions ul li a.followed { color: #f00; }
/**
* @type blog
* @file blocks/block.blog.tpl
*/
.block-type-blog {
border-radius: 5px;
padding: 10px;
border-bottom: none;
@ -107,27 +149,32 @@
background: linear-gradient(top, #ffffff 0%,#f9fbfb 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9fbfb',GradientType=0 );
}
.block.block-type-blog .block-header { margin-bottom: 0; padding: 0 7px 10px; }
.block.block-type-blog .block-header h3 { font-size: 19px; }
.block.block-type-blog .block-header h3 a { color: #275ec2; text-decoration: underline; }
.block.block-type-blog .block-content { padding: 0 7px; }
.block.block-type-blog footer { font-size: 11px; }
.block.block-type-blog footer button { }
.block.block-type-blog footer a { color: #727a90; margin-left: 7px; }
.block-type-blog .block-header { margin-bottom: 0; padding: 0 7px 10px; }
.block-type-blog .block-header .block-title { font-size: 19px; }
.block-type-blog .block-header .block-title a { color: #275ec2; text-decoration: underline; }
.block-type-blog .block-header .block-title a:hover { color: #f00; }
/* Block Type - Tags */
.block.block-type-tags .search-form-wrapper { margin-bottom: 15px; }
.block-type-blog .block-content { padding: 0 7px; }
.block-type-blog .block-footer { font-size: 11px; }
.block-type-blog .block-footer a { color: #727a90; margin-left: 7px; }
.block-type-blog .block-footer a:hover { color: #f00; }
/* Block Type - Blog Categories */
.block.block-type-blog-categories .block-header .blog-categories-admin { position: absolute; top: 7px; right: 0; opacity: .3; }
.block.block-type-blog-categories .block-header .blog-categories-admin:hover { opacity: 1; }
/**
* @type blog categories
* @file blocks/block.blogCategories.tpl
*/
.block-type-blog-categories .block-header .blog-categories-admin { position: absolute; top: 7px; right: 0; opacity: .3; }
.block-type-blog-categories .block-header .blog-categories-admin:hover { opacity: 1; }
.block.block-type-blog-categories li { margin-bottom: 3px; }
.block.block-type-blog-categories li a { display: block; margin-bottom: 1px; padding: 5px 10px; border-radius: 3px; }
.block.block-type-blog-categories li.active a { color: #fff; text-decoration: none; background: #3ABCFF; }
.block-type-blog-categories li { margin-bottom: 3px; }
.block-type-blog-categories li a { display: block; margin-bottom: 1px; padding: 5px 10px; border-radius: 3px; }
.block-type-blog-categories li.active a { color: #fff; text-decoration: none; background: #3ABCFF; }
/* Block Type - Blog Navigation */
.block.block-type-blog-navigation .blog-navigator-categories option:first-child { color: #aaa; }
/**
* @type blog navigation
* @file blocks/block.blogNav.tpl
*/
.block-type-blog-navigation p { margin-bottom: 15px; }
.block-type-blog-navigation .blog-navigator-categories option:first-child { color: #aaa; }

View file

@ -61,8 +61,9 @@
{else}
<ul class="auth">
{hook run='userbar_item'}
<li><a href="{router page='registration'}" class="js-registration-form-show">{$aLang.registration_submit}</a></li>
<li><a href="{router page='login'}" class="js-login-form-show">{$aLang.user_login_submit}</a></li>
<li><a href="{router page='registration'}" data-type="modal-toggle" data-option-target="modal-login" onclick="jQuery('[data-option-target=tab-pane-registration]').tab('activate');">{$aLang.registration_submit}</a></li>
<li><a href="{router page='login'}" data-type="modal-toggle" data-option-target="modal-login" onclick="jQuery('[data-option-target=tab-pane-login]').tab('activate');">{$aLang.user_login_submit}</a></li>
</ul>
{/if}

View file

@ -141,36 +141,25 @@ jQuery(document).ready(function($){
/**
* Blocks
*/
ls.blocks.init('stream',{group_items: true, group_min: 3});
ls.blocks.init('blogs');
ls.blocks.initSwitch('tags');
ls.blocks.initSwitch('upload-img');
ls.blocks.initSwitch('favourite-topic-tags');
ls.blocks.initSwitch('popup-login');
ls.blocks.init();
/**
* Auth modal
* Activity
*/
$('.js-registration-form-show').click(function(){
if ($('[data-option-target=tab-pane-registration]').length) {
$('#modal-login').modal('option', 'onShow', function () { $('[data-option-target=tab-pane-registration]').tab('activate') });
$('#modal-login').modal('show');
} else {
window.location=aRouter.registration;
}
return false;
});
ls.stream.init();
$('.js-login-form-show').click(function(){
if ($('[data-option-target=tab-pane-login]').length) {
$('#modal-login').modal('option', 'onShow', function () { $('[data-option-target=tab-pane-login]').tab('activate') });
$('#modal-login').modal('show');
} else {
window.location=aRouter.login;
}
return false;
});
/**
* Userfeed
*/
ls.userfeed.init();
/**
* Comments
*/
ls.comments.init();
/**
@ -195,68 +184,6 @@ jQuery(document).ready(function($){
return false;
});
// блоки
ls.hook.add('ls_blocks_init_navigation_after',function(block,count){
if ($('.js-block-'+block+'-nav').find('li').length >= count) {
$('.js-block-'+block+'-dropdown-items').css({ 'top': $('.js-block-'+block+'-dropdown-trigger').offset().top + 25 });
}
});
// комментарии
ls.comments.init();
// It will be deleted soon
// TODO: Delete
ls.blocks.initNavigation = function(block,count) {
count=count || 3;
if ($('.js-block-'+block+'-nav').find('li').length >= count) {
$('.js-block-'+block+'-nav').hide();
$('.js-block-'+block+'-dropdown').show();
// Dropdown
var trigger = $('.js-block-'+block+'-dropdown-trigger');
var menu = $('.js-block-'+block+'-dropdown-items');
menu.appendTo('body').css({'display': 'none'});
trigger.click(function(){
var pos = $(this).offset();
menu.css({ 'left': pos.left, 'top': pos.top + 30, 'z-index': 2100 });
menu.slideToggle();
$(this).toggleClass('opened');
return false;
});
menu.find('a').click(function(){
trigger.removeClass('opened').find('a').text( $(this).text() );
menu.slideToggle();
});
// Hide menu
$(document).click(function(){
trigger.removeClass('opened');
menu.slideUp();
});
$('body').on('click', '.js-block-'+block+'-dropdown-trigger, .js-block-'+block+'-dropdown-items', function(e) {
e.stopPropagation();
});
$(window).resize(function(){
menu.css({ 'left': $('.js-block-'+block+'-dropdown-trigger').offset().left });
});
} else {
// Transform nav to dropdown
$('.js-block-'+block+'-nav').show();
$('.js-block-'+block+'-dropdown').hide();
}
ls.hook.run('ls_blocks_init_navigation_after',[block,count],this);
};
// избранное
ls.hook.add('ls_favourite_toggle_after',function(idTarget,objFavourite,type,params,result){
var favCount = $('#fav_count_'+type+'_'+idTarget);
favCount.text(result.iCount);
result.iCount > 0 ? favCount.show() : favCount.hide();
});
// вступление в блог
ls.hook.add('ls_blog_toggle_join_after',function(idBlog,result){
if (!this.data('onlyText')) {
@ -411,8 +338,6 @@ jQuery(document).ready(function($){
$('.talk-search').toggleClass('opened'); return false;
};
ls.blocks.options.loader = DIR_STATIC_SKIN + '/images/loader-circle.gif';
ls.blog.toggleInfo = function() {
if ($('#blog-mini').is(':visible')) {
$('#blog-mini').hide();
@ -468,6 +393,7 @@ jQuery(document).ready(function($){
});
}
// TODO: load deprecated jQuery 1.9
$(window).load(function () {
navMainGroup();
});

View file

@ -0,0 +1,14 @@
(function($) {
"use strict";
ls.stream.options.elements.userItem = function (element) {
return $('<li id="' + ls.stream.options.selectors.activityBlockUsersItemId + element.uid + '">' +
'<input type="checkbox" ' +
'class="input-checkbox" ' +
'data-user-id="' + element.uid + '" ' +
'checked="checked" /> ' +
'<a href="' + element.user_web_path + '"><img src="' + element.user_avatar_48 + '" /></a> ' +
'<a href="' + element.user_web_path + '">' + element.user_login + '</a>' +
'</li>');
}
})(jQuery);

Some files were not shown because too many files have changed in this diff Show more