mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 11:40:48 +03:00
Оптимизация активности, мелкие исправления
This commit is contained in:
parent
3a73428e9a
commit
6a94180c3d
|
@ -160,7 +160,7 @@ class ActionStream extends Action {
|
|||
/**
|
||||
* Необходимо передать последний просмотренный ID событий
|
||||
*/
|
||||
$iFromId = getRequestStr('last_id');
|
||||
$iFromId = getRequestStr('iLastId');
|
||||
if (!$iFromId) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
|
@ -172,7 +172,7 @@ class ActionStream extends Action {
|
|||
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||
$oViewer->Assign('sDateLast', getRequestStr('date_last'));
|
||||
$oViewer->Assign('sDateLast', getRequestStr('sDateLast'));
|
||||
if (count($aEvents)) {
|
||||
$oEvenLast=end($aEvents);
|
||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||
|
@ -195,7 +195,7 @@ class ActionStream extends Action {
|
|||
/**
|
||||
* Необходимо передать последний просмотренный ID событий
|
||||
*/
|
||||
$iFromId = getRequestStr('last_id');
|
||||
$iFromId = getRequestStr('iLastId');
|
||||
if (!$iFromId) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
|
@ -207,7 +207,7 @@ class ActionStream extends Action {
|
|||
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||
$oViewer->Assign('sDateLast', getRequestStr('date_last'));
|
||||
$oViewer->Assign('sDateLast', getRequestStr('sDateLast'));
|
||||
if (count($aEvents)) {
|
||||
$oEvenLast=end($aEvents);
|
||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||
|
@ -230,12 +230,12 @@ class ActionStream extends Action {
|
|||
/**
|
||||
* Необходимо передать последний просмотренный ID событий
|
||||
*/
|
||||
$iFromId = getRequestStr('last_id');
|
||||
$iFromId = getRequestStr('iLastId');
|
||||
if (!$iFromId) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
}
|
||||
if (!($oUser=$this->User_GetUserById(getRequestStr('user_id')))) {
|
||||
if (!($oUser=$this->User_GetUserById(getRequestStr('iUserId')))) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ class ActionStream extends Action {
|
|||
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||
$oViewer->Assign('sDateLast', getRequestStr('date_last'));
|
||||
$oViewer->Assign('sDateLast', getRequestStr('sDateLast'));
|
||||
if (count($aEvents)) {
|
||||
$oEvenLast=end($aEvents);
|
||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||
|
|
|
@ -110,7 +110,7 @@ class ActionUserfeed extends Action {
|
|||
*/
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aTopics', $aTopics);
|
||||
$this->Viewer_AssignAjax('result', $oViewer->Fetch('topic_list.tpl'));
|
||||
$this->Viewer_AssignAjax('result', $oViewer->Fetch('topics/topic_list.tpl'));
|
||||
$this->Viewer_AssignAjax('topics_count', count($aTopics));
|
||||
|
||||
if (count($aTopics)) {
|
||||
|
|
|
@ -2,7 +2,14 @@
|
|||
* Text
|
||||
*/
|
||||
|
||||
.text { font-size: 15px; line-height: 1.6em; overflow: hidden; zoom: 1; }
|
||||
.text { font-size: 15px; line-height: 1.6em; }
|
||||
|
||||
|
||||
/* Clearfix */
|
||||
.text:before,
|
||||
.text:after { content: ""; display: table; }
|
||||
.text:after { clear: both; }
|
||||
.text { zoom: 1; }
|
||||
|
||||
|
||||
/* Links */
|
||||
|
|
|
@ -6,11 +6,12 @@ var ls = ls || {};
|
|||
|
||||
ls.stream =( function ($) {
|
||||
this.isBusy = false;
|
||||
this.dateLast = null;
|
||||
this.sDateLast = null;
|
||||
|
||||
this.options = {
|
||||
selectors: {
|
||||
userList: 'js-activity-block-users',
|
||||
getMoreButton: 'activity-get-more',
|
||||
userListId: 'activity-block-users',
|
||||
inputId: 'activity-block-users-input',
|
||||
noticeId: 'activity-block-users-notice',
|
||||
|
@ -41,6 +42,10 @@ ls.stream =( function ($) {
|
|||
$(this).prop('checked') ? self.subscribe(userId) : self.unsubscribe(userId);
|
||||
});
|
||||
|
||||
$('#' + this.options.selectors.getMoreButton).on('click', function () {
|
||||
self.getMore(this);
|
||||
});
|
||||
|
||||
$('#' + this.options.selectors.inputId).keydown(function (event) {
|
||||
event.which == 13 && ls.stream.appendUser();
|
||||
});
|
||||
|
@ -136,83 +141,45 @@ ls.stream =( function ($) {
|
|||
});
|
||||
};
|
||||
|
||||
this.getMore = function () {
|
||||
if (this.isBusy) {
|
||||
return;
|
||||
}
|
||||
var lastId = $('#stream_last_id').val();
|
||||
if (!lastId) return;
|
||||
$('#stream_get_more').addClass('stream_loading');
|
||||
/**
|
||||
* Подгрузка событий
|
||||
* @param {Object} oGetMoreButton Кнопка
|
||||
*/
|
||||
this.getMore = function (oGetMoreButton) {
|
||||
if (this.isBusy) return;
|
||||
|
||||
var $oGetMoreButton = $(oGetMoreButton),
|
||||
$oLastId = $('#activity-last-id');
|
||||
iLastId = $oLastId.val();
|
||||
|
||||
if ( ! iLastId ) return;
|
||||
|
||||
$oGetMoreButton.addClass('loading');
|
||||
this.isBusy = true;
|
||||
|
||||
var url = aRouter['stream']+'get_more/';
|
||||
var params = {'last_id':lastId,'date_last':this.dateLast};
|
||||
var params = $.extend({}, {
|
||||
'iLastId': iLastId,
|
||||
'sDateLast': this.sDateLast
|
||||
}, ls.tools.getDataOptions($oGetMoreButton, 'param'));
|
||||
|
||||
var url = aRouter['stream'] + 'get_more' + (params.type ? '_' + params.type : '') + '/';
|
||||
|
||||
ls.hook.marker('getMoreBefore');
|
||||
|
||||
ls.ajax(url, params, function(data) {
|
||||
if (!data.bStateError && data.events_count) {
|
||||
$('#stream-list').append(data.result);
|
||||
$('#stream_last_id').attr('value', data.iStreamLastId);
|
||||
if ( ! data.bStateError && data.events_count ) {
|
||||
$('#activity-event-list').append(data.result);
|
||||
$oLastId.attr('value', data.iStreamLastId);
|
||||
}
|
||||
if (!data.events_count) {
|
||||
$('#stream_get_more').hide();
|
||||
|
||||
if ( ! data.events_count) {
|
||||
$oGetMoreButton.hide();
|
||||
}
|
||||
$('#stream_get_more').removeClass('stream_loading');
|
||||
ls.hook.run('ls_stream_get_more_after',[lastId, data]);
|
||||
this.isBusy = false;
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
this.getMoreAll = function () {
|
||||
if (this.isBusy) {
|
||||
return;
|
||||
}
|
||||
var lastId = $('#stream_last_id').val();
|
||||
if (!lastId) return;
|
||||
$('#stream_get_more').addClass('stream_loading');
|
||||
this.isBusy = true;
|
||||
$oGetMoreButton.removeClass('loading');
|
||||
|
||||
var url = aRouter['stream']+'get_more_all/';
|
||||
var params = {'last_id':lastId,'date_last':this.dateLast};
|
||||
ls.hook.run('ls_stream_get_more_after',[iLastId, data]);
|
||||
|
||||
ls.hook.marker('getMoreAllBefore');
|
||||
ls.ajax(url, params, function(data) {
|
||||
if (!data.bStateError && data.events_count) {
|
||||
$('#stream-list').append(data.result);
|
||||
$('#stream_last_id').attr('value', data.iStreamLastId);
|
||||
}
|
||||
if (!data.events_count) {
|
||||
$('#stream_get_more').hide();
|
||||
}
|
||||
$('#stream_get_more').removeClass('stream_loading');
|
||||
ls.hook.run('ls_stream_get_more_all_after',[lastId, data]);
|
||||
this.isBusy = false;
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
this.getMoreByUser = function (iUserId) {
|
||||
if (this.isBusy) {
|
||||
return;
|
||||
}
|
||||
var lastId = $('#stream_last_id').val();
|
||||
if (!lastId) return;
|
||||
$('#stream_get_more').addClass('stream_loading');
|
||||
this.isBusy = true;
|
||||
|
||||
var url = aRouter['stream']+'get_more_user/';
|
||||
var params = {'last_id':lastId, user_id: iUserId,'date_last':this.dateLast};
|
||||
|
||||
ls.hook.marker('getMoreByUserBefore');
|
||||
ls.ajax(url, params, function(data) {
|
||||
if (!data.bStateError && data.events_count) {
|
||||
$('#stream-list').append(data.result);
|
||||
$('#stream_last_id').attr('value', data.iStreamLastId);
|
||||
}
|
||||
if (!data.events_count) {
|
||||
$('#stream_get_more').hide();
|
||||
}
|
||||
$('#stream_get_more').removeClass('stream_loading');
|
||||
ls.hook.run('ls_stream_get_more_by_user_after',[lastId, iUserId, data]);
|
||||
this.isBusy = false;
|
||||
}.bind(this));
|
||||
};
|
||||
|
|
|
@ -104,7 +104,7 @@ ls.userfeed = (function ($) {
|
|||
}
|
||||
var lastId = $('#userfeed_last_id').val();
|
||||
if (!lastId) return;
|
||||
$('#userfeed_get_more').addClass('userfeed_loading');
|
||||
$('#userfeed_get_more').addClass('loading');
|
||||
this.isBusy = true;
|
||||
|
||||
var url = aRouter['feed']+'get_more/';
|
||||
|
@ -119,7 +119,7 @@ ls.userfeed = (function ($) {
|
|||
if (!data.topics_count) {
|
||||
$('#userfeed_get_more').hide();
|
||||
}
|
||||
$('#userfeed_get_more').removeClass('userfeed_loading');
|
||||
$('#userfeed_get_more').removeClass('loading');
|
||||
ls.hook.run('ls_userfeed_get_more_after',[lastId, data]);
|
||||
this.isBusy = false;
|
||||
}.bind(this));
|
||||
|
|
|
@ -79,7 +79,7 @@ ls.wall = (function ($) {
|
|||
} else {
|
||||
return false;
|
||||
}
|
||||
$('#wall-button-next').addClass('loader');
|
||||
$('#wall-button-next').addClass('loading');
|
||||
this.load(idLess,'',function(result) {
|
||||
if (result.bStateError) {
|
||||
ls.msg.error(null, result.sMsg);
|
||||
|
@ -95,7 +95,7 @@ ls.wall = (function ($) {
|
|||
}
|
||||
ls.hook.run('ls_wall_loadnext_after',[idLess, result]);
|
||||
}
|
||||
$('#wall-button-next').removeClass('loader');
|
||||
$('#wall-button-next').removeClass('loading');
|
||||
}.bind(this));
|
||||
return false;
|
||||
};
|
||||
|
@ -147,7 +147,7 @@ ls.wall = (function ($) {
|
|||
} else {
|
||||
return false;
|
||||
}
|
||||
$('#wall-reply-button-next-' + iPid).addClass('loader');
|
||||
$('#wall-reply-button-next-' + iPid).addClass('loading');
|
||||
this.loadReply(idLess,'',iPid,function(result) {
|
||||
if (result.bStateError) {
|
||||
ls.msg.error(null, result.sMsg);
|
||||
|
@ -163,7 +163,7 @@ ls.wall = (function ($) {
|
|||
}
|
||||
ls.hook.run('ls_wall_loadreplynext_after',[iPid, idLess, result]);
|
||||
}
|
||||
$('#wall-reply-button-next-' + iPid).removeClass('loader');
|
||||
$('#wall-reply-button-next-' + iPid).removeClass('loading');
|
||||
}.bind(this));
|
||||
return false;
|
||||
};
|
||||
|
|
|
@ -9,16 +9,5 @@
|
|||
|
||||
<h3 class="profile-page-header">{$aLang.user_menu_profile_stream}</h3>
|
||||
|
||||
{if count($aStreamEvents)}
|
||||
<ul class="stream-list" id="stream-list">
|
||||
{include file='actions/ActionStream/events.tpl'}
|
||||
</ul>
|
||||
|
||||
{if !$bDisableGetMoreButton}
|
||||
<input type="hidden" id="stream_last_id" value="{$iStreamLastId}" />
|
||||
<a class="stream-get-more" id="stream_get_more" href="javascript:ls.stream.getMoreByUser({$oUserProfile->getId()})">{$aLang.stream_get_more} ↓</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.stream_no_events}
|
||||
{/if}
|
||||
{include file='actions/ActionStream/event_list.tpl' sActivityType='user' sActivityParams="data-param-i-user-id=\"{$oUserProfile->getId()}\""}
|
||||
{/block}
|
|
@ -39,8 +39,8 @@
|
|||
</div>
|
||||
|
||||
{if $iCountWall - count($aWall)}
|
||||
<a href="#" onclick="return ls.wall.loadNext();" id="wall-button-next" class="wall-more">
|
||||
<span class="wall-more-inner">{$aLang.wall_load_more} (<span id="wall-count-next">{$iCountWall-count($aWall)}</span>)</span>
|
||||
</a>
|
||||
<div onclick="return ls.wall.loadNext();" id="wall-button-next" class="get-more">
|
||||
{$aLang.wall_load_more} (<span id="wall-count-next">{$iCountWall-count($aWall)}</span>)
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
|
@ -37,7 +37,7 @@
|
|||
</div>
|
||||
|
||||
{if count($aReplyWall) < $oWall->getCountReply()}
|
||||
<a href="#" onclick="return ls.wall.loadReplyNext({$oWall->getId()});" id="wall-reply-button-next-{$oWall->getId()}" class="wall-more wall-more-reply">
|
||||
<a href="#" onclick="return ls.wall.loadReplyNext({$oWall->getId()});" id="wall-reply-button-next-{$oWall->getId()}" class="get-more get-more-wall-comments">
|
||||
<span class="wall-more-inner">
|
||||
{$aLang.wall_load_reply_more}
|
||||
<span id="wall-reply-count-next-{$oWall->getId()}">{$oWall->getCountReply()}</span>
|
||||
|
|
|
@ -12,16 +12,5 @@
|
|||
{block name='layout_page_title'}{$aLang.stream_menu}{/block}
|
||||
|
||||
{block name='layout_content'}
|
||||
{if count($aStreamEvents)}
|
||||
<ul class="stream-list" id="stream-list">
|
||||
{include file='actions/ActionStream/events.tpl'}
|
||||
</ul>
|
||||
|
||||
{if !$bDisableGetMoreButton}
|
||||
<input type="hidden" id="stream_last_id" value="{$iStreamLastId}" />
|
||||
<a class="stream-get-more" id="stream_get_more" href="javascript:ls.stream.getMoreAll()">{$aLang.stream_get_more} ↓</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.stream_no_events}
|
||||
{/if}
|
||||
{include file='actions/ActionStream/event_list.tpl' sActivityType='all'}
|
||||
{/block}
|
21
templates/skin/developer/actions/ActionStream/event_list.tpl
Normal file
21
templates/skin/developer/actions/ActionStream/event_list.tpl
Normal file
|
@ -0,0 +1,21 @@
|
|||
{**
|
||||
* Список событий активности
|
||||
*
|
||||
* sActivityParams Дополнительные параметры активности
|
||||
* sActivityType Тип активности
|
||||
* all Вся активность
|
||||
* user Активность пользователя
|
||||
*}
|
||||
|
||||
{if count($aStreamEvents)}
|
||||
<ul class="activity-event-list" id="activity-event-list">
|
||||
{include file='actions/ActionStream/events.tpl'}
|
||||
</ul>
|
||||
|
||||
{if ! $bDisableGetMoreButton}
|
||||
<input type="hidden" id="activity-last-id" value="{$iStreamLastId}" />
|
||||
<div class="get-more" id="activity-get-more" data-param-type="{$sActivityType}" {$sActivityParams}>{$aLang.stream_get_more}</div>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.stream_no_events}
|
||||
{/if}
|
|
@ -4,12 +4,16 @@
|
|||
|
||||
{if count($aStreamEvents)}
|
||||
{foreach from=$aStreamEvents item=oStreamEvent}
|
||||
{assign var=oTarget value=$oStreamEvent->getTarget()}
|
||||
{$oTarget = $oStreamEvent->getTarget()}
|
||||
{$oUser = $oStreamEvent->getUser()}
|
||||
{$bUserIsMale = $oUser->getProfileSex() != 'woman'}
|
||||
|
||||
|
||||
{* Дата группы событий *}
|
||||
{if {date_format date=$oStreamEvent->getDateAdded() format="j F Y"} != $sDateLast}
|
||||
{assign var=sDateLast value={date_format date=$oStreamEvent->getDateAdded() format="j F Y"}}
|
||||
{$sDateLast = {date_format date=$oStreamEvent->getDateAdded() format="j F Y"}}
|
||||
|
||||
<li class="stream-header-date">
|
||||
<li class="activity-date">
|
||||
{if {date_format date=$smarty.now format="j F Y"} == $sDateLast}
|
||||
{$aLang.today}
|
||||
{else}
|
||||
|
@ -19,51 +23,136 @@
|
|||
{/if}
|
||||
|
||||
|
||||
{assign var=oUser value=$oStreamEvent->getUser()}
|
||||
<li class="activity-event activity-event-type-{$oStreamEvent->getEventType()}">
|
||||
{* Аватар *}
|
||||
<a href="{$oUser->getUserWebPath()}">
|
||||
<img src="{$oUser->getProfileAvatarPath(48)}" alt="{$oUser->getLogin()}" class="activity-event-avatar" />
|
||||
</a>
|
||||
|
||||
<li class="stream-item stream-item-type-{$oStreamEvent->getEventType()}">
|
||||
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
|
||||
<span class="date" title="{date_format date=$oStreamEvent->getDateAdded()}">{date_format date=$oStreamEvent->getDateAdded() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}</span>
|
||||
{* Дата *}
|
||||
<time datetime="{date_format date=$oStreamEvent->getDateAdded() format='c'}"
|
||||
class="activity-event-date"
|
||||
title="{date_format date=$oStreamEvent->getDateAdded()}">
|
||||
{date_format date=$oStreamEvent->getDateAdded() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
|
||||
</time>
|
||||
|
||||
{* Логин *}
|
||||
<a href="{$oUser->getUserWebPath()}"><strong>{$oUser->getLogin()}</strong></a>
|
||||
|
||||
{*
|
||||
* Текст события
|
||||
*}
|
||||
{if $oStreamEvent->getEventType() == 'add_topic'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_topic} {else} {$aLang.stream_list_event_add_topic_female} {/if}
|
||||
{* Добавлен топик *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_topic}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_topic_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrl()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'add_comment'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_comment} {else} {$aLang.stream_list_event_add_comment_female} {/if}
|
||||
{* Добавлен комментарий *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_comment}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_comment_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getTarget()->getUrl()}#comment{$oTarget->getId()}">{$oTarget->getTarget()->getTitle()|escape:'html'}</a>
|
||||
{assign var=sTextEvent value=$oTarget->getText()|strip_tags|truncate:200}
|
||||
|
||||
{$sTextEvent = $oTarget->getText()}
|
||||
|
||||
{if trim($sTextEvent)}
|
||||
<div class="stream-comment-preview">{$sTextEvent}</div>
|
||||
<div class="activity-event-text text">{$sTextEvent}</div>
|
||||
{/if}
|
||||
{elseif $oStreamEvent->getEventType() == 'add_blog'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_blog} {else} {$aLang.stream_list_event_add_blog_female} {/if}
|
||||
{* Создан блог *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_blog}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_blog_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrlFull()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'vote_blog'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_vote_blog} {else} {$aLang.stream_list_event_vote_blog_female} {/if}
|
||||
{* Проголосовали за блог *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_vote_blog}
|
||||
{else}
|
||||
{$aLang.stream_list_event_vote_blog_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrlFull()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'vote_topic'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_vote_topic} {else} {$aLang.stream_list_event_vote_topic_female} {/if}
|
||||
{* Проголосовали за топик *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_vote_topic}
|
||||
{else}
|
||||
{$aLang.stream_list_event_vote_topic_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrl()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'vote_comment'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_vote_comment} {else} {$aLang.stream_list_event_vote_comment_female} {/if}
|
||||
{* Проголосовали за комментарий *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_vote_comment}
|
||||
{else}
|
||||
{$aLang.stream_list_event_vote_comment_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getTarget()->getUrl()}#comment{$oTarget->getId()}">{$oTarget->getTarget()->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'vote_user'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_vote_user} {else} {$aLang.stream_list_event_vote_user_female} {/if}
|
||||
{* Проголосовали за пользователя *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_vote_user}
|
||||
{else}
|
||||
{$aLang.stream_list_event_vote_user_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUserWebPath()}">{$oTarget->getLogin()}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'join_blog'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_join_blog} {else} {$aLang.stream_list_event_join_blog_female} {/if}
|
||||
{* Вступили в блог *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_join_blog}
|
||||
{else}
|
||||
{$aLang.stream_list_event_join_blog_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrlFull()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'add_friend'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_friend} {else} {$aLang.stream_list_event_add_friend_female} {/if}
|
||||
{* Добавили в друзья *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_friend}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_friend_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUserWebPath()}">{$oTarget->getLogin()}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'add_wall'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_wall} {else} {$aLang.stream_list_event_add_wall_female} {/if}
|
||||
{* Написали на стене *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_wall}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_wall_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrlWall()}">{$oTarget->getWallUser()->getLogin()}</a>
|
||||
{assign var=sTextEvent value=$oTarget->getText()|strip_tags|truncate:200}
|
||||
|
||||
{$sTextEvent = $oTarget->getText()}
|
||||
|
||||
{if trim($sTextEvent)}
|
||||
<div class="stream-comment-preview">{$sTextEvent}</div>
|
||||
<div class="activity-event-text text">{$sTextEvent}</div>
|
||||
{/if}
|
||||
{else}
|
||||
{hook run="stream_list_event_`$oStreamEvent->getEventType()`" oStreamEvent=$oStreamEvent}
|
||||
|
@ -72,9 +161,7 @@
|
|||
{/foreach}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
ls.stream.dateLast = {json var=$sDateLast};
|
||||
});
|
||||
<script>
|
||||
ls.stream.sDateLast = {json var=$sDateLast};
|
||||
</script>
|
||||
{/if}
|
|
@ -11,16 +11,5 @@
|
|||
{block name='layout_page_title'}{$aLang.stream_menu}{/block}
|
||||
|
||||
{block name='layout_content'}
|
||||
{if count($aStreamEvents)}
|
||||
<ul class="stream-list" id="stream-list">
|
||||
{include file='actions/ActionStream/events.tpl'}
|
||||
</ul>
|
||||
|
||||
{if !$bDisableGetMoreButton}
|
||||
<input type="hidden" id="stream_last_id" value="{$iStreamLastId}" />
|
||||
<a class="stream-get-more" id="stream_get_more" href="javascript:ls.stream.getMore()">{$aLang.stream_get_more} ↓</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.stream_no_events}
|
||||
{/if}
|
||||
{include file='actions/ActionStream/event_list.tpl' sActivityType=''}
|
||||
{/block}
|
|
@ -15,7 +15,7 @@
|
|||
{if !$bDisableGetMoreButton}
|
||||
<div id="userfeed_loaded_topics"></div>
|
||||
<input type="hidden" id="userfeed_last_id" value="{$iUserfeedLastId}" />
|
||||
<a class="stream-get-more" id="userfeed_get_more" href="javascript:ls.userfeed.getMore()">{$aLang.userfeed_get_more} ↓</a>
|
||||
<div class="get-more" id="userfeed_get_more" onclick="ls.userfeed.getMore()">{$aLang.userfeed_get_more} ↓</div>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.userfeed_no_events}
|
||||
|
|
21
templates/skin/developer/css/activity.css
Normal file
21
templates/skin/developer/css/activity.css
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Активность
|
||||
*
|
||||
* @template actions/ActionStream/*.tpl
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Список событий
|
||||
*/
|
||||
.activity-event-list { margin: 0 0 20px; }
|
||||
.activity-date { font-size: 15px; font-weight: bold; margin-top: 35px; padding-bottom: 5px; border-bottom: 1px solid #eee; }
|
||||
|
||||
|
||||
/**
|
||||
* Событие
|
||||
*/
|
||||
.activity-event { margin-bottom: 5px; min-height: 48px; background: #fafafa; padding: 15px 15px 15px 75px; position: relative; }
|
||||
.activity-event-avatar { position: absolute; top: 15px; left: 15px; }
|
||||
.activity-event-date { display: block; color: #999; }
|
||||
.activity-event-text { padding: 10px 15px; background: #fff; border: 1px solid #eee; border-bottom-color: #ddd; margin-top: 10px; font-size: 13px; }
|
|
@ -72,31 +72,6 @@ a:hover { color: #058; }
|
|||
|
||||
|
||||
|
||||
/* Userfeed
|
||||
---------------------------------------------------- */
|
||||
.userfeed-get-more {display:block; width:90%; margin:0px auto; text-align:center; height:2.5em; padding-top:1em;}
|
||||
.userfeed-get-more:hover { background: #f0f7fd;}
|
||||
.userfeed_loading {background: #F7F7F7 url(../images/loader.gif) no-repeat center;}
|
||||
|
||||
|
||||
|
||||
/* Stream
|
||||
---------------------------------------------------- */
|
||||
.stream-get-more { display: block; text-align: center; padding: 12px 0; background: #fafafa; color: #aaa; border-top: 1px solid #eee; text-decoration: none; }
|
||||
.stream-get-more:hover { background: #f0f7fd; }
|
||||
.stream_loading { background: #f7f7f7 url(../images/loader.gif) no-repeat center; }
|
||||
.stream-comment-preview { padding: 5px 10px; background: #f3f3f3; margin-top: 5px; }
|
||||
|
||||
.stream-list { margin: 0 0 20px; }
|
||||
.stream-list li.stream-item { margin-bottom: 5px; min-height: 48px; _height: 48px; background: #fafafa; padding: 10px 15px 10px 70px; position: relative; }
|
||||
.stream-list li.stream-item .avatar { position: absolute; top: 10px; left: 10px; }
|
||||
.stream-list li.stream-item .date { display: block; color: #999; }
|
||||
.stream-list li.stream-item a { text-decoration: none; }
|
||||
.stream-list li.stream-item a:hover { text-decoration: underline; }
|
||||
.stream-list li.stream-header-date { font-size: 12px; color: #777; margin-top: 30px; padding-bottom: 5px; border-bottom: 1px solid #eee; }
|
||||
|
||||
|
||||
|
||||
/* Userfields
|
||||
---------------------------------------------------- */
|
||||
.userfield-list { width: 450px; }
|
||||
|
|
|
@ -125,4 +125,22 @@
|
|||
background: url(../images/icons.png) -168px 0 no-repeat;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.user.inactive { color: #aaa; }
|
||||
.user.inactive { color: #aaa; }
|
||||
|
||||
|
||||
/**
|
||||
* More
|
||||
*/
|
||||
.get-more {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 12px 0;
|
||||
margin-top: 30px;
|
||||
background: #fafafa;
|
||||
color: #aaa;
|
||||
border-top: 1px solid #eee;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.get-more:hover { background: #f7f7f7; color: #555; }
|
||||
.get-more.loading { background: #f7f7f7 url(../images/loader.gif) 50% 50% no-repeat; text-indent: -9999px; }
|
|
@ -18,10 +18,6 @@
|
|||
.comment.wall-comment-reply { min-height: 0; padding-left: 48px; }
|
||||
.comment.wall-comment-reply .comment-avatar { width: 30px; height: 30px; }
|
||||
|
||||
.wall-more { display: block; background: #f7f7f7; text-align: center; padding: 7px 0; font-size: 11px; margin-bottom: 2px; }
|
||||
.wall-more:hover { background: #eee; }
|
||||
.wall-more.wall-more-reply { margin-left: 25px; }
|
||||
.wall-more.loader { background: #fafafa url(../images/loader.gif) 50% 50% no-repeat; }
|
||||
.wall-more.loader .wall-more-inner { visibility: hidden; }
|
||||
.wall-note { margin-bottom: 20px; font-family: Verdana, sans-serif; }
|
||||
|
||||
.wall-note { margin-bottom: 20px; font-family: Verdana, sans-serif; }
|
||||
.get-more.get-more-wall-comments { border: none; margin: 0 0 2px 25px; }
|
|
@ -46,6 +46,7 @@ $config['head']['default']['css'] = array_merge(Config::Get('head.default.css'),
|
|||
"___path.static.skin___/css/modals.css",
|
||||
"___path.static.skin___/css/profile.css",
|
||||
"___path.static.skin___/css/wall.css",
|
||||
"___path.static.skin___/css/activity.css",
|
||||
"___path.static.skin___/css/jquery.notifier.css",
|
||||
"___path.static.skin___/themes/___view.theme___/style.css",
|
||||
"___path.static.skin___/css/print.css",
|
||||
|
|
|
@ -4,23 +4,7 @@
|
|||
|
||||
{extends file='layout.base.tpl'}
|
||||
|
||||
{block name='layout_options'}
|
||||
{$sNav = 'people'}
|
||||
{/block}
|
||||
|
||||
{block name='layout_content'}
|
||||
{include file='actions/ActionProfile/profile_top.tpl'}
|
||||
|
||||
{if count($aStreamEvents)}
|
||||
<ul class="stream-list" id="stream-list">
|
||||
{include file='actions/ActionStream/events.tpl'}
|
||||
</ul>
|
||||
|
||||
{if ! $bDisableGetMoreButton}
|
||||
<input type="hidden" id="stream_last_id" value="{$iStreamLastId}" />
|
||||
<a class="stream-get-more" id="stream_get_more" href="javascript:ls.stream.getMoreByUser({$oUserProfile->getId()})">{$aLang.stream_get_more} ↓</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.stream_no_events}
|
||||
{/if}
|
||||
{include file='actions/ActionStream/event_list.tpl' sActivityType='user' sActivityParams="data-param-i-user-id=\"{$oUserProfile->getId()}\""}
|
||||
{/block}
|
|
@ -46,7 +46,9 @@
|
|||
{include file='actions/ActionProfile/wall_items.tpl'}
|
||||
</div>
|
||||
|
||||
{if $iCountWall-count($aWall)}
|
||||
<a href="#" onclick="return ls.wall.loadNext();" id="wall-button-next" class="stream-get-more"><span class="wall-more-inner">{$aLang.wall_load_more} (<span id="wall-count-next">{$iCountWall-count($aWall)}</span>)</span></a>
|
||||
{if $iCountWall - count($aWall)}
|
||||
<div onclick="return ls.wall.loadNext();" id="wall-button-next" class="get-more">
|
||||
{$aLang.wall_load_more} (<span id="wall-count-next">{$iCountWall-count($aWall)}</span>)
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
|
@ -34,7 +34,7 @@
|
|||
{if $aReplyWall}
|
||||
<div class="wall-item-replies" id="wall-item-replies-{$oWall->getId()}">
|
||||
{if count($aReplyWall) < $oWall->getCountReply()}
|
||||
<a href="#" onclick="return ls.wall.loadReplyNext({$oWall->getId()});" id="wall-reply-button-next-{$oWall->getId()}" class="wall-more-reply">
|
||||
<a href="#" onclick="return ls.wall.loadReplyNext({$oWall->getId()});" id="wall-reply-button-next-{$oWall->getId()}" class="get-more get-more-wall-comments">
|
||||
<span class="wall-more-inner">{$aLang.wall_load_reply_more} <span id="wall-reply-count-next-{$oWall->getId()}">{$oWall->getCountReply()}</span> {$oWall->getCountReply()|declension:$aLang.comment_declension:'russian'}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
|
|
@ -5,23 +5,12 @@
|
|||
{extends file='layout.base.tpl'}
|
||||
|
||||
{block name='layout_options'}
|
||||
{$sNav = 'stream'}
|
||||
{$bNoSidebar = true}
|
||||
{$sNav = 'stream'}
|
||||
{/block}
|
||||
|
||||
{block name='layout_page_title'}{$aLang.stream_menu}{/block}
|
||||
|
||||
{block name='layout_content'}
|
||||
{if count($aStreamEvents)}
|
||||
<ul class="stream-list" id="stream-list">
|
||||
{include file='actions/ActionStream/events.tpl'}
|
||||
</ul>
|
||||
|
||||
{if !$bDisableGetMoreButton}
|
||||
<input type="hidden" id="stream_last_id" value="{$iStreamLastId}" />
|
||||
<a class="stream-get-more" id="stream_get_more" href="javascript:ls.stream.getMoreAll()">{$aLang.stream_get_more} ↓</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.stream_no_events}
|
||||
{/if}
|
||||
{include file='actions/ActionStream/event_list.tpl' sActivityType='all'}
|
||||
{/block}
|
21
templates/skin/synio/actions/ActionStream/event_list.tpl
Normal file
21
templates/skin/synio/actions/ActionStream/event_list.tpl
Normal file
|
@ -0,0 +1,21 @@
|
|||
{**
|
||||
* Список событий активности
|
||||
*
|
||||
* sActivityParams Дополнительные параметры активности
|
||||
* sActivityType Тип активности
|
||||
* all Вся активность
|
||||
* user Активность пользователя
|
||||
*}
|
||||
|
||||
{if count($aStreamEvents)}
|
||||
<ul class="activity-event-list" id="activity-event-list">
|
||||
{include file='actions/ActionStream/events.tpl'}
|
||||
</ul>
|
||||
|
||||
{if ! $bDisableGetMoreButton}
|
||||
<input type="hidden" id="activity-last-id" value="{$iStreamLastId}" />
|
||||
<div class="get-more" id="activity-get-more" data-param-type="{$sActivityType}" {$sActivityParams}>{$aLang.stream_get_more}</div>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.stream_no_events}
|
||||
{/if}
|
|
@ -4,12 +4,16 @@
|
|||
|
||||
{if count($aStreamEvents)}
|
||||
{foreach from=$aStreamEvents item=oStreamEvent}
|
||||
{assign var=oTarget value=$oStreamEvent->getTarget()}
|
||||
{$oTarget = $oStreamEvent->getTarget()}
|
||||
{$oUser = $oStreamEvent->getUser()}
|
||||
{$bUserIsMale = $oUser->getProfileSex() != 'woman'}
|
||||
|
||||
|
||||
{* Дата группы событий *}
|
||||
{if {date_format date=$oStreamEvent->getDateAdded() format="j F Y"} != $sDateLast}
|
||||
{assign var=sDateLast value={date_format date=$oStreamEvent->getDateAdded() format="j F Y"}}
|
||||
{$sDateLast = {date_format date=$oStreamEvent->getDateAdded() format="j F Y"}}
|
||||
|
||||
<li class="stream-header-date">
|
||||
<li class="activity-date">
|
||||
{if {date_format date=$smarty.now format="j F Y"} == $sDateLast}
|
||||
{$aLang.today}
|
||||
{else}
|
||||
|
@ -18,61 +22,148 @@
|
|||
</li>
|
||||
{/if}
|
||||
|
||||
{assign var=oUser value=$oStreamEvent->getUser()}
|
||||
|
||||
<li class="stream-item stream-item-type-{$oStreamEvent->getEventType()}">
|
||||
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
|
||||
<li class="activity-event activity-event-type-{$oStreamEvent->getEventType()}">
|
||||
{* Аватар *}
|
||||
<a href="{$oUser->getUserWebPath()}">
|
||||
<img src="{$oUser->getProfileAvatarPath(48)}" alt="{$oUser->getLogin()}" class="activity-event-avatar" />
|
||||
</a>
|
||||
|
||||
<p class="info"><a href="{$oUser->getUserWebPath()}"><strong>{$oUser->getLogin()}</strong></a> ·
|
||||
<span class="date" title="{date_format date=$oStreamEvent->getDateAdded()}">{date_format date=$oStreamEvent->getDateAdded() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}</span></p>
|
||||
<p class="activity-event-info">
|
||||
{* Логин *}
|
||||
<a href="{$oUser->getUserWebPath()}"><strong>{$oUser->getLogin()}</strong></a> ·
|
||||
|
||||
|
||||
{* Дата *}
|
||||
<time datetime="{date_format date=$oStreamEvent->getDateAdded() format='c'}"
|
||||
class="activity-event-date"
|
||||
title="{date_format date=$oStreamEvent->getDateAdded()}">
|
||||
{date_format date=$oStreamEvent->getDateAdded() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
|
||||
</time>
|
||||
</p>
|
||||
|
||||
{*
|
||||
* Текст события
|
||||
*}
|
||||
{if $oStreamEvent->getEventType() == 'add_topic'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_topic} {else} {$aLang.stream_list_event_add_topic_female} {/if}
|
||||
{* Добавлен топик *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_topic}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_topic_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrl()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'add_comment'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_comment} {else} {$aLang.stream_list_event_add_comment_female} {/if}
|
||||
{* Добавлен комментарий *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_comment}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_comment_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getTarget()->getUrl()}#comment{$oTarget->getId()}">{$oTarget->getTarget()->getTitle()|escape:'html'}</a>
|
||||
{assign var=sTextEvent value=$oTarget->getText()|strip_tags|truncate:200}
|
||||
|
||||
{$sTextEvent = $oTarget->getText()}
|
||||
|
||||
{if trim($sTextEvent)}
|
||||
<div class="stream-comment-preview">{$sTextEvent}</div>
|
||||
<div class="activity-event-text text">{$sTextEvent}</div>
|
||||
{/if}
|
||||
{elseif $oStreamEvent->getEventType() == 'add_blog'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_blog} {else} {$aLang.stream_list_event_add_blog_female} {/if}
|
||||
{* Создан блог *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_blog}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_blog_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrlFull()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'vote_blog'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_vote_blog} {else} {$aLang.stream_list_event_vote_blog_female} {/if}
|
||||
{* Проголосовали за блог *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_vote_blog}
|
||||
{else}
|
||||
{$aLang.stream_list_event_vote_blog_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrlFull()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'vote_topic'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_vote_topic} {else} {$aLang.stream_list_event_vote_topic_female} {/if}
|
||||
{* Проголосовали за топик *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_vote_topic}
|
||||
{else}
|
||||
{$aLang.stream_list_event_vote_topic_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrl()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'vote_comment'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_vote_comment} {else} {$aLang.stream_list_event_vote_comment_female} {/if}
|
||||
{* Проголосовали за комментарий *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_vote_comment}
|
||||
{else}
|
||||
{$aLang.stream_list_event_vote_comment_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getTarget()->getUrl()}#comment{$oTarget->getId()}">{$oTarget->getTarget()->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'vote_user'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_vote_user} {else} {$aLang.stream_list_event_vote_user_female} {/if}
|
||||
{* Проголосовали за пользователя *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_vote_user}
|
||||
{else}
|
||||
{$aLang.stream_list_event_vote_user_female}
|
||||
{/if}
|
||||
|
||||
<span class="user-avatar user-avatar-n">
|
||||
<a href="{$oTarget->getUserWebPath()}"><img src="{$oTarget->getProfileAvatarPath(24)}" alt="avatar" /></a>
|
||||
<a href="{$oTarget->getUserWebPath()}">{$oTarget->getLogin()}</a>
|
||||
</span>
|
||||
{elseif $oStreamEvent->getEventType() == 'join_blog'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_join_blog} {else} {$aLang.stream_list_event_join_blog_female} {/if}
|
||||
{* Вступили в блог *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_join_blog}
|
||||
{else}
|
||||
{$aLang.stream_list_event_join_blog_female}
|
||||
{/if}
|
||||
|
||||
<a href="{$oTarget->getUrlFull()}">{$oTarget->getTitle()|escape:'html'}</a>
|
||||
{elseif $oStreamEvent->getEventType() == 'add_friend'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_friend} {else} {$aLang.stream_list_event_add_friend_female} {/if}
|
||||
{* Добавили в друзья *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_friend}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_friend_female}
|
||||
{/if}
|
||||
|
||||
<span class="user-avatar user-avatar-n">
|
||||
<a href="{$oTarget->getUserWebPath()}"><img src="{$oTarget->getProfileAvatarPath(24)}" alt="avatar" /></a>
|
||||
<a href="{$oTarget->getUserWebPath()}">{$oTarget->getLogin()}</a>
|
||||
</span>
|
||||
{elseif $oStreamEvent->getEventType() == 'add_wall'}
|
||||
{if $oUser->getProfileSex() != 'woman'} {$aLang.stream_list_event_add_wall} {else} {$aLang.stream_list_event_add_wall_female} {/if}
|
||||
{* Написали на стене *}
|
||||
|
||||
{if $bUserIsMale}
|
||||
{$aLang.stream_list_event_add_wall}
|
||||
{else}
|
||||
{$aLang.stream_list_event_add_wall_female}
|
||||
{/if}
|
||||
|
||||
<span class="user-avatar user-avatar-n">
|
||||
<a href="{$oTarget->getWallUser()->getUserWebPath()}"><img src="{$oTarget->getWallUser()->getProfileAvatarPath(24)}" alt="avatar" /></a>
|
||||
<a href="{$oTarget->getUrlWall()}">{$oTarget->getWallUser()->getLogin()}</a>
|
||||
</span>
|
||||
{assign var=sTextEvent value=$oTarget->getText()|strip_tags|truncate:200}
|
||||
|
||||
{$sTextEvent = $oTarget->getText()}
|
||||
|
||||
{if trim($sTextEvent)}
|
||||
<div class="stream-comment-preview">{$sTextEvent}</div>
|
||||
<div class="activity-event-text text">{$sTextEvent}</div>
|
||||
{/if}
|
||||
{else}
|
||||
{hook run="stream_list_event_`$oStreamEvent->getEventType()`" oStreamEvent=$oStreamEvent}
|
||||
|
@ -81,9 +172,7 @@
|
|||
{/foreach}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
ls.stream.dateLast = {json var=$sDateLast};
|
||||
});
|
||||
<script>
|
||||
ls.stream.sDateLast = {json var=$sDateLast};
|
||||
</script>
|
||||
{/if}
|
|
@ -11,16 +11,5 @@
|
|||
{block name='layout_page_title'}{$aLang.stream_menu}{/block}
|
||||
|
||||
{block name='layout_content'}
|
||||
{if count($aStreamEvents)}
|
||||
<ul class="stream-list" id="stream-list">
|
||||
{include file='actions/ActionStream/events.tpl'}
|
||||
</ul>
|
||||
|
||||
{if !$bDisableGetMoreButton}
|
||||
<input type="hidden" id="stream_last_id" value="{$iStreamLastId}" />
|
||||
<a class="stream-get-more" id="stream_get_more" href="javascript:ls.stream.getMore()">{$aLang.stream_get_more} ↓</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.stream_no_events}
|
||||
{/if}
|
||||
{include file='actions/ActionStream/event_list.tpl' sActivityType=''}
|
||||
{/block}
|
|
@ -12,10 +12,11 @@
|
|||
{include file='topics/topic_list.tpl'}
|
||||
|
||||
{if count($aTopics)}
|
||||
{if !$bDisableGetMoreButton}
|
||||
{if ! $bDisableGetMoreButton}
|
||||
<div id="userfeed_loaded_topics"></div>
|
||||
<input type="hidden" id="userfeed_last_id" value="{$iUserfeedLastId}" />
|
||||
<a class="stream-get-more" id="userfeed_get_more" href="javascript:ls.userfeed.getMore()">{$aLang.userfeed_get_more} ↓</a>
|
||||
|
||||
<div class="get-more" id="userfeed_get_more" onclick="ls.userfeed.getMore()">{$aLang.userfeed_get_more} ↓</div>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.userfeed_no_events}
|
||||
|
|
48
templates/skin/synio/css/activity.css
Normal file
48
templates/skin/synio/css/activity.css
Normal file
|
@ -0,0 +1,48 @@
|
|||
/**
|
||||
* Активность
|
||||
*
|
||||
* @template actions/ActionStream/*.tpl
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Список событий
|
||||
*/
|
||||
.activity-event-list { margin: 0 0 20px; }
|
||||
.activity-date { font-size: 16px; color: #999; font-family: 'PT Sans', sans-serif; margin-top: 50px; margin-bottom: 20px; padding-bottom: 5px; border-bottom: 1px solid #eee; }
|
||||
|
||||
|
||||
/**
|
||||
* Событие
|
||||
*/
|
||||
.activity-event { margin-bottom: 23px; min-height: 48px; border-bottom: 1px solid #e7ebed; padding: 0 0 20px 60px; position: relative; }
|
||||
.activity-event:last-child { border: none; }
|
||||
.activity-event-info { color: #b9c2c2; font-size: 11px; line-height: 1em; margin-bottom: 8px; }
|
||||
.activity-event-info a { color: #275ec2; }
|
||||
.activity-event-date { color: #818189; }
|
||||
.activity-event-avatar { position: absolute; top: 0; left: 0; }
|
||||
.activity-event .user-avatar { margin-left: 3px; }
|
||||
|
||||
.activity-event-text {
|
||||
position: relative;
|
||||
padding: 5px 10px 6px;
|
||||
background: #fefef1;
|
||||
color: #363636;
|
||||
margin-top: 13px;
|
||||
font-size: 11px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 2px 4px #e8e8c0 inset;
|
||||
box-shadow: 0 2px 4px #e8e8c0 inset;
|
||||
}
|
||||
.activity-event-text:after {
|
||||
display: block;
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -12px;
|
||||
left: 15px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-width: 6px;
|
||||
border-color: transparent transparent #e8e8c0 transparent;
|
||||
border-style: solid;
|
||||
}
|
|
@ -131,47 +131,6 @@ h2.header-table span { color: #949aa1; }
|
|||
|
||||
|
||||
|
||||
/* Userfeed
|
||||
---------------------------------------------------- */
|
||||
.userfeed-get-more {display:block; width:90%; margin:0px auto; text-align:center; height:2.5em; padding-top:1em;}
|
||||
.userfeed-get-more:hover { background: #f0f7fd;}
|
||||
.userfeed_loading {background: #F7F7F7 url(../images/loader.gif) no-repeat center;}
|
||||
|
||||
|
||||
|
||||
/* Stream
|
||||
---------------------------------------------------- */
|
||||
.stream-get-more {
|
||||
margin-top: 50px;
|
||||
border-radius: 5px;
|
||||
display: block; text-align: center; padding: 12px 0; color: #258fa7; text-decoration: none;
|
||||
background: #eefbfc;
|
||||
background: -moz-linear-gradient(top, #eefbfc 0%, #d3edf8 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eefbfc), color-stop(100%,#d3edf8));
|
||||
background: -webkit-linear-gradient(top, #eefbfc 0%,#d3edf8 100%);
|
||||
background: -o-linear-gradient(top, #eefbfc 0%,#d3edf8 100%);
|
||||
background: -ms-linear-gradient(top, #eefbfc 0%,#d3edf8 100%);
|
||||
background: linear-gradient(top, #eefbfc 0%,#d3edf8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eefbfc', endColorstr='#d3edf8',GradientType=0 );
|
||||
}
|
||||
.stream-get-more:hover { background: #eefbfc; color: #258fa7; }
|
||||
.stream-get-more.loader { background-image: url(../images/loader.gif); background-repeat: no-repeat; background-position: 50% 50%; }
|
||||
.stream_loading { background: #f7f7f7 url(../images/loader.gif) no-repeat center; }
|
||||
.stream-comment-preview { position: relative; padding: 5px 10px 6px; background: #fefef1; color: #363636; margin-top: 13px; font-size: 11px; border-radius: 3px; -webkit-box-shadow: 0 2px 4px #e8e8c0 inset; box-shadow: 0 2px 4px #e8e8c0 inset; }
|
||||
.stream-comment-preview:after { display: block; content: ""; position: absolute; top: -12px; left: 15px; width: 0; height: 0; border-width: 6px; border-color: transparent transparent #e8e8c0 transparent; border-style: solid; }
|
||||
|
||||
.stream-list { margin: 0 0 20px; }
|
||||
.stream-list li.stream-item { margin-bottom: 23px; min-height: 48px; _height: 48px; border-bottom: 1px solid #e7ebed; padding: 0 0 20px 60px; position: relative; }
|
||||
.stream-list li.stream-item:last-child { border: none; }
|
||||
.stream-list li.stream-item .info { color: #b9c2c2; font-size: 11px; line-height: 1em; margin-bottom: 8px; }
|
||||
.stream-list li.stream-item .info a { color: #275ec2; }
|
||||
.stream-list li.stream-item .info .date { color: #818189; }
|
||||
.stream-list li.stream-item .avatar { position: absolute; top: 0; left: 0; }
|
||||
.stream-list li.stream-item .user-avatar { margin-left: 3px; }
|
||||
.stream-list li.stream-header-date { font-size: 16px; color: #999; font-family: 'PT Sans', sans-serif; margin-top: 50px; margin-bottom: 20px; padding-bottom: 5px; border-bottom: 1px solid #eee; }
|
||||
|
||||
|
||||
|
||||
/* Userfields
|
||||
---------------------------------------------------- */
|
||||
.userfield-list { width: 450px; }
|
||||
|
|
|
@ -275,4 +275,29 @@
|
|||
|
||||
.blog-list-info { width: 19px; height: 19px; display: inline-block; background: url(../images/icons-synio.png) 0 -107px no-repeat; cursor: pointer; }
|
||||
.blog-list-info:hover,
|
||||
.blog-list-info.open { background-position: -19px -107px; }
|
||||
.blog-list-info.open { background-position: -19px -107px; }
|
||||
|
||||
|
||||
/**
|
||||
* More
|
||||
*/
|
||||
.get-more {
|
||||
margin-top: 30px;
|
||||
border-radius: 5px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 12px 0;
|
||||
color: #258fa7;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
background: #eefbfc;
|
||||
background: -moz-linear-gradient(top, #eefbfc 0%, #d3edf8 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eefbfc), color-stop(100%,#d3edf8));
|
||||
background: -webkit-linear-gradient(top, #eefbfc 0%,#d3edf8 100%);
|
||||
background: -o-linear-gradient(top, #eefbfc 0%,#d3edf8 100%);
|
||||
background: -ms-linear-gradient(top, #eefbfc 0%,#d3edf8 100%);
|
||||
background: linear-gradient(top, #eefbfc 0%,#d3edf8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eefbfc', endColorstr='#d3edf8',GradientType=0 );
|
||||
}
|
||||
.get-more:hover { background: #eefbfc; color: #258fa7; }
|
||||
.get-more.loading { background: #eefbfc url(../images/loader.gif) 50% 50% no-repeat; text-indent: -9999px; }
|
|
@ -42,32 +42,28 @@
|
|||
.wall-item-reply .comment-content:before,
|
||||
.wall-item-reply .comment-content:after { display: none; }
|
||||
|
||||
.wall-more { }
|
||||
.wall-more:hover { background: #F4F4D9; }
|
||||
.wall-more-reply {
|
||||
display: block;
|
||||
border-radius: 5px;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
padding: 7px 0;
|
||||
font-size: 11px;
|
||||
margin-bottom: 10px;
|
||||
.get-more.get-more-wall-comments {
|
||||
margin: 0 0 10px;
|
||||
border-radius: 5px;
|
||||
padding: 7px 0;
|
||||
font-size: 11px;
|
||||
color: #898953;
|
||||
border: 1px solid #eaeac4;
|
||||
-webkit-box-shadow: 0 1px 2px #dbdbba, 0 1px 0 #fff inset; box-shadow: 0 1px 2px #dbdbba, 0 1px 0 #fff inset;
|
||||
|
||||
-webkit-box-shadow: 0 1px 2px #dbdbba, 0 1px 0 #fff inset;
|
||||
box-shadow: 0 1px 2px #dbdbba, 0 1px 0 #fff inset;
|
||||
|
||||
background: #fffffa;
|
||||
background: -moz-linear-gradient(top, #fffffa 0%, #fefef1 100%);
|
||||
background: -moz-linear-gradient(top, #fffffa 0%, #fefef1 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fffffa), color-stop(100%,#fefef1));
|
||||
background: -webkit-linear-gradient(top, #fffffa 0%,#fefef1 100%);
|
||||
background: -o-linear-gradient(top, #fffffa 0%,#fefef1 100%);
|
||||
background: -ms-linear-gradient(top, #fffffa 0%,#fefef1 100%);
|
||||
background: linear-gradient(top, #fffffa 0%,#fefef1 100%);
|
||||
background: -webkit-linear-gradient(top, #fffffa 0%,#fefef1 100%);
|
||||
background: -o-linear-gradient(top, #fffffa 0%,#fefef1 100%);
|
||||
background: -ms-linear-gradient(top, #fffffa 0%,#fefef1 100%);
|
||||
background: linear-gradient(top, #fffffa 0%,#fefef1 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fffffa', endColorstr='#fefef1',GradientType=0 );
|
||||
}
|
||||
.wall-more-reply:hover { color: #898953; }
|
||||
.wall-more.loader { background: #F4F4D9 url(../images/loader.gif) 50% 50% no-repeat; }
|
||||
.wall-more.loader .wall-more-inner { visibility: hidden; }
|
||||
.get-more.get-more-wall-comments:hover { color: #898953; background: #fefef1; }
|
||||
.get-more.get-more-wall-comments.loading { background: #fefef1 url(../images/loader.gif) 50% 50% no-repeat; }
|
||||
|
||||
.wall-note { margin-bottom: 20px; font-family: Verdana, sans-serif; }
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ $config['head']['default']['css'] = array_merge(Config::Get('head.default.css'),
|
|||
"___path.static.skin___/css/blog.css",
|
||||
"___path.static.skin___/css/profile.css",
|
||||
"___path.static.skin___/css/wall.css",
|
||||
"___path.static.skin___/css/activity.css",
|
||||
"___path.static.skin___/css/jquery.notifier.css",
|
||||
"___path.static.skin___/themes/___view.theme___/style.css",
|
||||
"___path.static.skin___/css/print.css",
|
||||
|
|
Loading…
Reference in a new issue