mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
Страница блога
* Приведены в порядок шаблоны и стили
This commit is contained in:
parent
16ea18f712
commit
96e830b14a
|
@ -1,15 +1,25 @@
|
|||
{**
|
||||
* Блог
|
||||
*
|
||||
* bCloseBlog true если блог закрытый
|
||||
*
|
||||
* @styles css/blog.css
|
||||
* @scripts _framework_/js/livestreet/blog.js
|
||||
*}
|
||||
|
||||
{include file='header.tpl'}
|
||||
{assign var="oUserOwner" value=$oBlog->getOwner()}
|
||||
{assign var="oVote" value=$oBlog->getVote()}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
{$oUserOwner = $oBlog->getOwner()}
|
||||
{$oVote = $oBlog->getVote()}
|
||||
|
||||
<script>
|
||||
jQuery(function($){
|
||||
ls.lang.load({lang_load name="blog_fold_info,blog_expand_info"});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
{* Подключаем модальное окно удаления блога если пользователь админ *}
|
||||
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
|
||||
{include file='modals/modal.blog_delete.tpl'}
|
||||
{/if}
|
||||
|
@ -17,32 +27,69 @@
|
|||
|
||||
<div class="blog">
|
||||
<header class="blog-header">
|
||||
<div id="vote_area_blog_{$oBlog->getId()}" class="vote {if $oBlog->getRating() > 0}vote-count-positive{elseif $oBlog->getRating() < 0}vote-count-negative{/if} {if $oVote} voted {if $oVote->getDirection()>0}voted-up{elseif $oVote->getDirection()<0}voted-down{/if}{/if}">
|
||||
{* Голосование за блог *}
|
||||
<div id="vote_area_blog_{$oBlog->getId()}" class="vote
|
||||
{if $oBlog->getRating() > 0}
|
||||
vote-count-positive
|
||||
{elseif $oBlog->getRating() < 0}
|
||||
vote-count-negative
|
||||
{/if}
|
||||
|
||||
{if $oVote}
|
||||
voted
|
||||
|
||||
{if $oVote->getDirection() > 0}
|
||||
voted-up
|
||||
{elseif $oVote->getDirection() < 0}
|
||||
voted-down
|
||||
{/if}
|
||||
{/if}">
|
||||
<div class="vote-label">{$aLang.blog_rating}</div>
|
||||
<a href="#" class="vote-up" onclick="return ls.vote.vote({$oBlog->getId()},this,1,'blog');"></a>
|
||||
<a href="#" class="vote-down" onclick="return ls.vote.vote({$oBlog->getId()},this,-1,'blog');"></a>
|
||||
<div id="vote_total_blog_{$oBlog->getId()}" class="vote-count count" title="{$aLang.blog_vote_count}: {$oBlog->getCountVote()}">{if $oBlog->getRating() > 0}+{/if}{$oBlog->getRating()}</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* Аватар *}
|
||||
<img src="{$oBlog->getAvatarPath(48)}" alt="avatar" class="avatar" />
|
||||
|
||||
{* Заголовок *}
|
||||
<h2 class="blog-title">
|
||||
{if $oBlog->getType() == 'close'}
|
||||
<i title="{$aLang.blog_closed}" class="icon icon-lock"></i>
|
||||
{/if}
|
||||
|
||||
<h2>{if $oBlog->getType()=='close'}<i title="{$aLang.blog_closed}" class="icon icon-lock"></i> {/if}{$oBlog->getTitle()|escape:'html'}</h2>
|
||||
|
||||
{$oBlog->getTitle()|escape:'html'}
|
||||
</h2>
|
||||
|
||||
{* Управление *}
|
||||
<ul class="actions">
|
||||
<li><a href="{router page='rss'}blog/{$oBlog->getUrl()}/" class="rss">RSS</a></li>
|
||||
{if $oUserCurrent and $oUserCurrent->getId()!=$oBlog->getOwnerId()}
|
||||
<li><a href="#" onclick="ls.blog.toggleJoin(this,{$oBlog->getId()}); return false;" class="link-dotted">{if $oBlog->getUserIsJoin()}{$aLang.blog_leave}{else}{$aLang.blog_join}{/if}</a></li>
|
||||
{/if}
|
||||
{if $oUserCurrent and ($oUserCurrent->getId()==$oBlog->getOwnerId() or $oUserCurrent->isAdministrator() or $oBlog->getUserIsAdministrator() )}
|
||||
|
||||
{* Вступить/покинуть блог *}
|
||||
{if $oUserCurrent and $oUserCurrent->getId() != $oBlog->getOwnerId()}
|
||||
<li>
|
||||
<a href="{router page='blog'}edit/{$oBlog->getId()}/" title="{$aLang.blog_edit}" class="edit">{$aLang.blog_edit}</a></li>
|
||||
<a href="#" onclick="ls.blog.toggleJoin(this,{$oBlog->getId()}); return false;" class="link-dotted">
|
||||
{if $oBlog->getUserIsJoin()}
|
||||
{$aLang.blog_leave}
|
||||
{else}
|
||||
{$aLang.blog_join}
|
||||
{/if}
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
{* Администрирование *}
|
||||
{if $oUserCurrent and ($oUserCurrent->getId() == $oBlog->getOwnerId() or $oUserCurrent->isAdministrator() or $oBlog->getUserIsAdministrator() )}
|
||||
<li>
|
||||
<a href="{router page='blog'}edit/{$oBlog->getId()}/" title="{$aLang.blog_edit}" class="edit">{$aLang.blog_edit}</a>
|
||||
|
||||
{if $oUserCurrent->isAdministrator()}
|
||||
<li><a href="#" title="{$aLang.blog_delete}" data-type="modal-toggle" data-option-target="modal-blog-delete" class="delete">{$aLang.blog_delete}</a>
|
||||
<a href="#" title="{$aLang.blog_delete}" data-type="modal-toggle" data-option-target="modal-blog-delete" class="delete">{$aLang.blog_delete}</a>
|
||||
{else}
|
||||
<a href="{router page='blog'}delete/{$oBlog->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" title="{$aLang.blog_delete}" onclick="return confirm('{$aLang.blog_admin_delete_confirm}');" >{$aLang.blog_delete}</a>
|
||||
<a href="{router page='blog'}delete/{$oBlog->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}"
|
||||
title="{$aLang.blog_delete}"
|
||||
onclick="return confirm('{$aLang.blog_admin_delete_confirm}');" >{$aLang.blog_delete}</a>
|
||||
{/if}
|
||||
</li>
|
||||
{/if}
|
||||
|
@ -50,53 +97,74 @@
|
|||
</header>
|
||||
|
||||
|
||||
<div class="blog-more-content" id="blog-more-content" style="display: none;">
|
||||
<div class="blog-content">
|
||||
<p class="blog-description">{$oBlog->getDescription()}</p>
|
||||
{* Информация о блоге *}
|
||||
<div class="blog-content" id="blog-more-content" style="display: none;">
|
||||
<div class="blog-description text">
|
||||
{$oBlog->getDescription()}
|
||||
</div>
|
||||
|
||||
|
||||
<footer class="blog-footer">
|
||||
<div class="blog-info">
|
||||
{hook run='blog_info_begin' oBlog=$oBlog}
|
||||
|
||||
<strong>{$aLang.blog_user_administrators} ({$iCountBlogAdministrators}):</strong>
|
||||
|
||||
{* Создатель блога *}
|
||||
<a href="{$oUserOwner->getUserWebPath()}" class="user"><i class="icon-user"></i>{$oUserOwner->getLogin()}</a>
|
||||
|
||||
{* Список администраторов блога *}
|
||||
{if $aBlogAdministrators}
|
||||
{foreach from=$aBlogAdministrators item=oBlogUser}
|
||||
{assign var="oUser" value=$oBlogUser->getUser()}
|
||||
{$oUser = $oBlogUser->getUser()}
|
||||
|
||||
<a href="{$oUser->getUserWebPath()}" class="user"><i class="icon-user"></i>{$oUser->getLogin()}</a>
|
||||
{/foreach}
|
||||
{/if}<br />
|
||||
{/if}
|
||||
<br />
|
||||
|
||||
|
||||
{* Список модераторов блога *}
|
||||
<strong>{$aLang.blog_user_moderators} ({$iCountBlogModerators}):</strong>
|
||||
|
||||
{if $aBlogModerators}
|
||||
{foreach from=$aBlogModerators item=oBlogUser}
|
||||
{assign var="oUser" value=$oBlogUser->getUser()}
|
||||
{$oUser = $oBlogUser->getUser()}
|
||||
|
||||
<a href="{$oUser->getUserWebPath()}" class="user"><i class="icon-user"></i>{$oUser->getLogin()}</a>
|
||||
{/foreach}
|
||||
{else}
|
||||
{$aLang.blog_user_moderators_empty}
|
||||
{/if}<br />
|
||||
{/if}
|
||||
<br />
|
||||
|
||||
|
||||
{* Список подписавшихся пользователей *}
|
||||
<strong>{$aLang.blog_user_readers} ({$iCountBlogUsers}):</strong>
|
||||
|
||||
{if $aBlogUsers}
|
||||
{foreach from=$aBlogUsers item=oBlogUser}
|
||||
{assign var="oUser" value=$oBlogUser->getUser()}
|
||||
{$oUser = $oBlogUser->getUser()}
|
||||
|
||||
<a href="{$oUser->getUserWebPath()}" class="user"><i class="icon-user"></i>{$oUser->getLogin()}</a>
|
||||
{/foreach}
|
||||
|
||||
{* Если пользователей слишком много, то показываем ссылку на страницу со всеми пользователями *}
|
||||
{if count($aBlogUsers) < $iCountBlogUsers}
|
||||
<br /><a href="{$oBlog->getUrlFull()}users/">{$aLang.blog_user_readers_all}</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$aLang.blog_user_readers_empty}
|
||||
{/if}
|
||||
|
||||
{hook run='blog_info_end' oBlog=$oBlog}
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="#" class="blog-more" id="blog-more" onclick="return ls.blog.toggleInfo()">{$aLang.blog_expand_info}</a>
|
||||
|
||||
{* Кнопка показывающая/скрывающая информацию о блоге *}
|
||||
<footer class="blog-footer">
|
||||
<a href="#" class="blog-more" id="blog-more" onclick="return ls.blog.toggleInfo()">{$aLang.blog_expand_info}</a>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
{hook run='blog_info' oBlog=$oBlog}
|
||||
|
|
|
@ -1,40 +1,35 @@
|
|||
/* --------------------------------------------
|
||||
БЛОГ
|
||||
-------------------------------------------- */
|
||||
/**
|
||||
* Блог
|
||||
*
|
||||
* @file actions/ActionBlog/blog.tpl
|
||||
*/
|
||||
|
||||
.blog { background: #fafafa; margin-bottom: 10px; border-radius: 3px; border: 1px solid #eee; overflow: hidden; }
|
||||
.blog { background: #fafafa; margin-bottom: 10px; border: 1px solid #eee; overflow: hidden; }
|
||||
|
||||
/* Хидер */
|
||||
.blog-header { position: relative; padding: 15px 130px 15px 78px; border-bottom: 1px solid #eee; }
|
||||
|
||||
/* Header */
|
||||
.blog .blog-header { position: relative; padding: 15px 130px 15px 78px; border-bottom: 1px solid #eee; }
|
||||
.blog .blog-header h2 { font-size: 20px; font-weight: bold; line-height: 1em; margin-top: 3px; margin-bottom: 7px; }
|
||||
.blog .blog-header h2 i { position: relative; top: 5px; }
|
||||
.blog .blog-header .avatar { position: absolute; top: 15px; left: 15px; }
|
||||
.blog-header .blog-title { font-size: 20px; font-weight: bold; line-height: 1em; margin-top: 3px; margin-bottom: 7px; }
|
||||
.blog-header .blog-title i { position: relative; top: 5px; }
|
||||
|
||||
.blog .blog-header .vote-label { text-transform: uppercase; text-align: right; font-size: 11px; color: #aaa; }
|
||||
.blog .blog-header .count { font-size: 34px; line-height: 1em; font-weight: bold; text-align: right; }
|
||||
.blog-header .avatar { position: absolute; top: 15px; left: 15px; }
|
||||
|
||||
.blog .blog-header .vote { position: absolute; top: 15px; right: 15px; }
|
||||
.blog .blog-header .vote .vote-count { padding-left: 25px; display: block; color: #333; }
|
||||
.blog .blog-header .vote .vote-up { position: absolute; top: 22px; left: 0; display: none; }
|
||||
.blog .blog-header .vote .vote-down { position: absolute; top: 35px; left: 0; display: none; }
|
||||
.blog .blog-header .vote:hover .vote-up,
|
||||
.blog .blog-header .vote:hover .vote-down,
|
||||
.blog .blog-header .vote.voted .vote-up,
|
||||
.blog .blog-header .vote.voted .vote-down { display: inline-block; }
|
||||
.blog .blog-header .vote.vote-count-positive .vote-count { color: #5055B2; }
|
||||
.blog-header .vote { position: absolute; top: 15px; right: 15px; }
|
||||
.blog-header .vote .vote-count { padding-left: 25px; display: block; color: #333; }
|
||||
.blog-header .vote .vote-up { position: absolute; top: 22px; left: 0; }
|
||||
.blog-header .vote .vote-down { position: absolute; top: 35px; left: 0; }
|
||||
.blog-header .vote.vote-count-positive .vote-count { color: #5055B2; }
|
||||
.blog-header .vote-label { text-transform: uppercase; text-align: right; font-size: 11px; color: #aaa; }
|
||||
.blog-header .count { font-size: 34px; line-height: 1em; font-weight: bold; text-align: right; }
|
||||
|
||||
.blog .blog-header .actions { margin-bottom: 0; }
|
||||
.blog-header .actions { margin-bottom: 0; }
|
||||
|
||||
/* Описание */
|
||||
.blog-description { padding: 15px; border-bottom: 1px solid #eee; }
|
||||
|
||||
/* Content */
|
||||
.blog .blog-content { padding: 15px; border-bottom: 1px solid #eee; }
|
||||
/* Информация о блоге */
|
||||
.blog-info { padding: 15px; 15px; border-bottom: 1px solid #eee; }
|
||||
|
||||
|
||||
/* Footer */
|
||||
.blog .blog-footer { padding: 15px; border-bottom: 1px solid #eee; }
|
||||
|
||||
|
||||
/* More Button */
|
||||
.blog-more { display: block; padding: 10px 0; text-align: center; text-decoration: none; background: #fafafa; }
|
||||
.blog-more:hover { background: #eee; }
|
||||
/* Кнопка показывающая/скрывающая информацию о блоге */
|
||||
.blog-more { display: block; padding: 10px 0; text-align: center; text-decoration: none; background: #fafafa; }
|
||||
.blog-more:hover { background: #eee; }
|
|
@ -1,74 +1,107 @@
|
|||
{**
|
||||
* Блог
|
||||
*
|
||||
* bCloseBlog true если блог закрытый
|
||||
*
|
||||
* @styles css/blog.css
|
||||
* @scripts _framework_/js/livestreet/blog.js
|
||||
*}
|
||||
|
||||
{include file='header.tpl'}
|
||||
{include file='modals/modal.blog_delete.tpl'}
|
||||
|
||||
{assign var="oUserOwner" value=$oBlog->getOwner()}
|
||||
{assign var="oVote" value=$oBlog->getVote()}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
{$oUserOwner = $oBlog->getOwner()}
|
||||
{$oVote = $oBlog->getVote()}
|
||||
|
||||
<script>
|
||||
jQuery(function($){
|
||||
ls.lang.load({lang_load name="blog_fold_info,blog_expand_info"});
|
||||
});
|
||||
</script>
|
||||
|
||||
{* Подключаем модальное окно удаления блога если пользователь админ *}
|
||||
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
|
||||
{include file='modals/modal.blog_delete.tpl'}
|
||||
{/if}
|
||||
|
||||
<div class="blog-top">
|
||||
<h2 class="page-header">{$oBlog->getTitle()|escape:'html'} {if $oBlog->getType()=='close'} <i title="{$aLang.blog_closed}" class="icon-synio-topic-private"></i>{/if}</h2>
|
||||
|
||||
<div id="vote_area_blog_{$oBlog->getId()}" class="vote-topic
|
||||
{if $oBlog->getRating() > 0}
|
||||
vote-count-positive
|
||||
{elseif $oBlog->getRating() < 0}
|
||||
vote-count-negative
|
||||
{elseif $oBlog->getRating() == 0}
|
||||
vote-count-zero
|
||||
{/if}
|
||||
|
||||
{if $oVote}
|
||||
voted
|
||||
|
||||
{if $oVote->getDirection() > 0}
|
||||
voted-up
|
||||
{elseif $oVote->getDirection() < 0}
|
||||
voted-down
|
||||
{**
|
||||
* Шапка блога
|
||||
*}
|
||||
<div class="blog" id="js-blog">
|
||||
<div class="blog-header">
|
||||
<img src="{$oBlog->getAvatarPath(48)}" alt="avatar" class="blog-avatar" />
|
||||
|
||||
<h2 class="page-header blog-title">
|
||||
{$oBlog->getTitle()|escape:'html'}
|
||||
|
||||
{if $oBlog->getType() == 'close'}
|
||||
<i title="{$aLang.blog_closed}" class="icon-synio-topic-private"></i>
|
||||
{/if}
|
||||
</h2>
|
||||
|
||||
<div id="vote_area_blog_{$oBlog->getId()}" class="vote-topic
|
||||
{if $oBlog->getRating() > 0}
|
||||
vote-count-positive
|
||||
{elseif $oBlog->getRating() < 0}
|
||||
vote-count-negative
|
||||
{elseif $oBlog->getRating() == 0}
|
||||
vote-count-zero
|
||||
{/if}
|
||||
{else}
|
||||
not-voted
|
||||
{/if}
|
||||
|
||||
{if ($oUserCurrent && $oUserOwner->getId() == $oUserCurrent->getId())}
|
||||
vote-nobuttons
|
||||
{/if}">
|
||||
<a href="#" class="vote-item vote-down" onclick="return ls.vote.vote({$oBlog->getId()},this,-1,'blog');"><span><i></i></span></a>
|
||||
<div class="vote-item vote-count" title="{$aLang.blog_vote_count}: {$oBlog->getCountVote()}"><span id="vote_total_blog_{$oBlog->getId()}">{if $oBlog->getRating() > 0}+{/if}{$oBlog->getRating()}</span></div>
|
||||
<a href="#" class="vote-item vote-up" onclick="return ls.vote.vote({$oBlog->getId()},this,1,'blog');"><span><i></i></span></a>
|
||||
|
||||
{if $oVote}
|
||||
voted
|
||||
|
||||
{if $oVote->getDirection() > 0}
|
||||
voted-up
|
||||
{elseif $oVote->getDirection() < 0}
|
||||
voted-down
|
||||
{/if}
|
||||
{else}
|
||||
not-voted
|
||||
{/if}
|
||||
|
||||
{if ($oUserCurrent && $oUserOwner->getId() == $oUserCurrent->getId())}
|
||||
vote-nobuttons
|
||||
{/if}">
|
||||
<a href="#" class="vote-item vote-down" onclick="return ls.vote.vote({$oBlog->getId()},this,-1,'blog');"><span><i></i></span></a>
|
||||
<div class="vote-item vote-count" title="{$aLang.blog_vote_count}: {$oBlog->getCountVote()}"><span id="vote_total_blog_{$oBlog->getId()}">{if $oBlog->getRating() > 0}+{/if}{$oBlog->getRating()}</span></div>
|
||||
<a href="#" class="vote-item vote-up" onclick="return ls.vote.vote({$oBlog->getId()},this,1,'blog');"><span><i></i></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="blog-mini" id="blog-mini">
|
||||
<span id="blog_user_count_{$oBlog->getId()}">{$iCountBlogUsers}</span> {$iCountBlogUsers|declension:$aLang.reader_declension:'russian'},
|
||||
{$oBlog->getCountTopic()} {$oBlog->getCountTopic()|declension:$aLang.topic_declension:'russian'}
|
||||
<div class="fl-r" id="blog-mini-header">
|
||||
<a href="#" class="link-dotted" onclick="ls.blog.toggleInfo(); return false;">{$aLang.blog_expand_info}</a>
|
||||
<a href="{router page='rss'}blog/{$oBlog->getUrl()}/">RSS</a>
|
||||
{if $oUserCurrent and $oUserCurrent->getId()!=$oBlog->getOwnerId()}
|
||||
<button type="submit" class="button button-small" id="button-blog-join-first-{$oBlog->getId()}" data-button-additional="button-blog-join-second-{$oBlog->getId()}" 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}
|
||||
|
||||
{**
|
||||
* Краткая информация о блоге
|
||||
*}
|
||||
<div class="blog-short-info">
|
||||
<div class="blog-short-info-actions">
|
||||
<a href="#" class="link-dotted" id="js-blog-toggle" onclick="ls.blog.toggleInfo(); return false;">{$aLang.blog_expand_info}</a>
|
||||
|
||||
{if $oUserCurrent and $oUserCurrent->getId() != $oBlog->getOwnerId()}
|
||||
<button type="submit"
|
||||
class="button button-small"
|
||||
id="button-blog-join-first-{$oBlog->getId()}"
|
||||
data-button-additional="button-blog-join-second-{$oBlog->getId()}"
|
||||
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}
|
||||
</div>
|
||||
|
||||
<span id="blog_user_count_{$oBlog->getId()}">{$iCountBlogUsers}</span>
|
||||
{$iCountBlogUsers|declension:$aLang.reader_declension:'russian'},
|
||||
{$oBlog->getCountTopic()} {$oBlog->getCountTopic()|declension:$aLang.topic_declension:'russian'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="blog" id="blog" style="display: none">
|
||||
<div class="blog-inner">
|
||||
<header class="blog-header">
|
||||
<img src="{$oBlog->getAvatarPath(48)}" alt="avatar" class="avatar" />
|
||||
<span class="close" onclick="ls.blog.toggleInfo(); return false;"><a href="#" class="link-dotted">{$aLang.blog_fold_info}</a><i class="icon-synio-close"></i></span>
|
||||
</header>
|
||||
|
||||
|
||||
{**
|
||||
* Полная информация о блоге
|
||||
*}
|
||||
<div class="blog-full-info" id="js-blog-full-info">
|
||||
<div class="blog-content">
|
||||
<p class="blog-description">{$oBlog->getDescription()}</p>
|
||||
<div class="blog-description text">{$oBlog->getDescription()}</div>
|
||||
|
||||
|
||||
<ul class="blog-info">
|
||||
|
@ -80,14 +113,20 @@
|
|||
|
||||
|
||||
{hook run='blog_info_begin' oBlog=$oBlog}
|
||||
<strong>{$aLang.blog_user_administrators} ({$iCountBlogAdministrators})</strong><br />
|
||||
|
||||
<h4>{$aLang.blog_user_administrators} ({$iCountBlogAdministrators})</h4>
|
||||
|
||||
{* Создатель блога *}
|
||||
<span class="user-avatar">
|
||||
<a href="{$oUserOwner->getUserWebPath()}"><img src="{$oUserOwner->getProfileAvatarPath(24)}" alt="avatar" /></a>
|
||||
<a href="{$oUserOwner->getUserWebPath()}">{$oUserOwner->getLogin()}</a>
|
||||
</span>
|
||||
|
||||
{* Список администраторов блога *}
|
||||
{if $aBlogAdministrators}
|
||||
{foreach from=$aBlogAdministrators item=oBlogUser}
|
||||
{assign var="oUser" value=$oBlogUser->getUser()}
|
||||
{$oUser = $oBlogUser->getUser()}
|
||||
|
||||
<span class="user-avatar">
|
||||
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" /></a>
|
||||
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
|
||||
|
@ -96,10 +135,13 @@
|
|||
{/if}<br /><br />
|
||||
|
||||
|
||||
<strong>{$aLang.blog_user_moderators} ({$iCountBlogModerators})</strong><br />
|
||||
{* Список модераторов блога *}
|
||||
<h4>{$aLang.blog_user_moderators} ({$iCountBlogModerators})</h4>
|
||||
|
||||
{if $aBlogModerators}
|
||||
{foreach from=$aBlogModerators item=oBlogUser}
|
||||
{assign var="oUser" value=$oBlogUser->getUser()}
|
||||
{$oUser = $oBlogUser->getUser()}
|
||||
|
||||
<span class="user-avatar">
|
||||
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" /></a>
|
||||
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
|
||||
|
@ -108,8 +150,8 @@
|
|||
{else}
|
||||
<span class="notice-empty">{$aLang.blog_user_moderators_empty}</span>
|
||||
{/if}
|
||||
{hook run='blog_info_end' oBlog=$oBlog}
|
||||
|
||||
{hook run='blog_info_end' oBlog=$oBlog}
|
||||
|
||||
|
||||
{if $oUserCurrent and ($oUserCurrent->getId()==$oBlog->getOwnerId() or $oUserCurrent->isAdministrator() or $oBlog->getUserIsAdministrator() )}
|
||||
|
@ -126,24 +168,24 @@
|
|||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="blog-footer" id="blog-footer">
|
||||
{if $oUserCurrent and $oUserCurrent->getId()!=$oBlog->getOwnerId()}
|
||||
<button type="submit" class="button button-small" id="button-blog-join-second-{$oBlog->getId()}" data-button-additional="button-blog-join-first-{$oBlog->getId()}" 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>
|
||||
|
||||
<div class="admin">
|
||||
{$aLang.blogs_owner} —
|
||||
<a href="{$oUserOwner->getUserWebPath()}"><img src="{$oUserOwner->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
|
||||
<a href="{$oUserOwner->getUserWebPath()}">{$oUserOwner->getLogin()}</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<footer class="blog-footer">
|
||||
<a href="{router page='rss'}blog/{$oBlog->getUrl()}/" class="blog-rss">RSS</a>
|
||||
|
||||
<div class="blog-admin">
|
||||
{$aLang.blogs_owner} —
|
||||
<span class="user-avatar">
|
||||
<a href="{$oUserOwner->getUserWebPath()}"><img src="{$oUserOwner->getProfileAvatarPath(24)}" alt="avatar" class="avatar" /></a>
|
||||
<a href="{$oUserOwner->getUserWebPath()}">{$oUserOwner->getLogin()}</a>
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{hook run='blog_info' oBlog=$oBlog}
|
||||
|
||||
{hook run='blog_info' oBlog=$oBlog}
|
||||
|
||||
{include file='navs/nav.blog_single.tpl'}
|
||||
|
||||
|
|
|
@ -1,93 +1,60 @@
|
|||
/* --------------------------------------------
|
||||
БЛОГ
|
||||
-------------------------------------------- */
|
||||
/**
|
||||
* Блог
|
||||
*
|
||||
* @file actions/ActionBlog/blog.tpl
|
||||
*/
|
||||
|
||||
.blog-top { position: relative; padding-right: 150px; }
|
||||
.blog-top .vote-topic { position: absolute; top: 3px; right: 15px; }
|
||||
.blog { margin-bottom: 15px; }
|
||||
|
||||
/* Blog Mini */
|
||||
.blog-mini {
|
||||
.blog.open .blog-short-info { background: #f8fbfe; border-color: #e8eef5; border-radius: 5px 5px 0 0; }
|
||||
|
||||
|
||||
/* Хидер */
|
||||
.blog-header { position: relative; padding-right: 150px; padding-left: 40px; margin-bottom: 20px; min-height: 30px; }
|
||||
.blog-header .blog-title { margin: 0; }
|
||||
.blog-header .vote-topic { position: absolute; top: 3px; right: 15px; }
|
||||
.blog-header .blog-avatar { position: absolute; top: 0; left: 0; width: 30px; height: 30px; }
|
||||
|
||||
/* Краткая информация */
|
||||
.blog-short-info {
|
||||
padding: 15px;
|
||||
margin-bottom: 17px;
|
||||
font-size: 11px;
|
||||
overflow: hidden; zoom: 1;
|
||||
overflow: hidden;
|
||||
zoom: 1;
|
||||
border-radius: 5px;
|
||||
border-bottom: 1px solid transparent;
|
||||
|
||||
background: #ffffff;
|
||||
background: #f9fbfb;
|
||||
background: -moz-linear-gradient(top, #ffffff 0%, #f9fbfb 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f9fbfb));
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%,#f9fbfb 100%);
|
||||
background: -o-linear-gradient(top, #ffffff 0%,#f9fbfb 100%);
|
||||
background: -ms-linear-gradient(top, #ffffff 0%,#f9fbfb 100%);
|
||||
background: linear-gradient(top, #ffffff 0%,#f9fbfb 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9fbfb',GradientType=0 );
|
||||
}
|
||||
.blog-mini button { margin-left: 20px; }
|
||||
.blog-mini .fl-r a { margin-left: 14px; color: #727a90; }
|
||||
.blog-mini .fl-r a:hover { color: #f00; }
|
||||
.blog-mini .fl-r a.link-dotted { border-color: #727a90; }
|
||||
.blog-mini .fl-r a.link-dotted:hover { border-color: #f00; }
|
||||
|
||||
.blog-short-info-actions { float: right; }
|
||||
.blog-short-info-actions .button { margin-left: 20px; }
|
||||
.blog-short-info-actions a { margin-left: 14px; color: #727a90; }
|
||||
.blog-short-info-actions a:hover { color: #f00; }
|
||||
|
||||
/* Полная информация */
|
||||
.blog-full-info { display: none; }
|
||||
|
||||
.blog {
|
||||
overflow: hidden;
|
||||
margin-bottom: 17px;
|
||||
background: #f8fbfe;
|
||||
border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.blog-inner { padding: 20px; }
|
||||
/* Описание */
|
||||
.blog-content { padding: 20px 25px; border-top: 1px solid #fff; background: #f8fbfe; border-top: 1px solid #fff; }
|
||||
.blog-content h4 { margin-bottom: 5px; font: bold 13px Verdana; }
|
||||
.blog-content .blog-description { margin-bottom: 50px; }
|
||||
.blog-content .user-avatar { margin-right: 10px; }
|
||||
|
||||
|
||||
/* Header */
|
||||
.blog .blog-header { position: relative; padding: 10px 0 13px 78px; border-bottom: 1px solid #e8eef5; min-height: 16px; }
|
||||
.blog .blog-header h2 { font-size: 20px; font-weight: bold; line-height: 1em; margin-top: 3px; margin-bottom: 7px; }
|
||||
.blog .blog-header h2 i { position: relative; top: 5px; }
|
||||
.blog .blog-header .close { position: absolute; top: 0; right: 0; font-size: 11px; cursor: pointer; }
|
||||
.blog .blog-header .close i { margin-left: 5px; }
|
||||
.blog .blog-header .close a { color: #727a90; border-color: #727a90; }
|
||||
.blog .blog-header .close a:hover { color: #f00; border-color: #f00; }
|
||||
.blog .blog-header .avatar { position: absolute; top: -10px; left: 7px; width: 39px; height: 39px; }
|
||||
|
||||
.blog .blog-header .vote-label { text-transform: uppercase; text-align: right; font-size: 11px; color: #aaa; }
|
||||
.blog .blog-header .count { font-size: 34px; line-height: 1em; font-weight: bold; text-align: right; }
|
||||
|
||||
.blog .blog-header .vote { position: absolute; top: 15px; right: 15px; }
|
||||
.blog .blog-header .vote .vote-count { padding-left: 25px; display: block; color: #333; }
|
||||
.blog .blog-header .vote .vote-up { position: absolute; top: 22px; left: 0; display: none; }
|
||||
.blog .blog-header .vote .vote-down { position: absolute; top: 35px; left: 0; display: none; }
|
||||
.blog .blog-header .vote:hover .vote-up,
|
||||
.blog .blog-header .vote:hover .vote-down,
|
||||
.blog .blog-header .vote.voted .vote-up,
|
||||
.blog .blog-header .vote.voted .vote-down { display: inline-block; }
|
||||
.blog .blog-header .vote.vote-count-positive .vote-count { color: #5055B2; }
|
||||
|
||||
.blog .blog-header .actions { margin-bottom: 0; }
|
||||
|
||||
|
||||
/* Content */
|
||||
.blog .blog-content { padding: 22px 8px 0; border-top: 1px solid #fff; }
|
||||
.blog .blog-content .blog-description { margin-bottom: 50px; }
|
||||
.blog .blog-content .user-avatar { margin-right: 10px; }
|
||||
|
||||
.blog-info { width: 300px; margin-bottom: 50px; }
|
||||
.blog-info li { margin-bottom: 5px; background: url(../images/dots.png) 0% 14px repeat-x; position: relative; padding-right: 50px; }
|
||||
.blog-info li span { background: #f8fbfe; padding-right: 2px; }
|
||||
.blog-info li strong { width: 150px; position: absolute; top: 0; right: 0; background: #f8fbfe; padding-left: 2px; font-weight: normal; }
|
||||
/* Info */
|
||||
.blog-info { width: 300px; margin-bottom: 50px; }
|
||||
.blog-info li { margin-bottom: 5px; background: url(../images/dots.png) 0% 14px repeat-x; position: relative; padding-right: 50px; }
|
||||
.blog-info li span { background: #f8fbfe; padding-right: 2px; }
|
||||
.blog-info li strong { width: 150px; position: absolute; top: 0; right: 0; background: #f8fbfe; padding-left: 2px; font-weight: normal; }
|
||||
.blog-info li.rating strong { color: #5fa459; }
|
||||
|
||||
|
||||
|
||||
/* Footer */
|
||||
.blog .blog-footer { padding: 22px 26px; background: #f1f7fd; font-size: 11px; }
|
||||
.blog .blog-footer button { margin-right: 10px; }
|
||||
.blog .blog-footer a { color: #727a90; }
|
||||
.blog .blog-footer .admin { float: right; }
|
||||
.blog .blog-footer .admin img { width: 16px; height: 16px; vertical-align: middle; margin-right: 1px; }
|
||||
.blog .blog-footer .admin a { color: #4a4a4a; }
|
||||
|
||||
|
||||
/* More Button */
|
||||
.blog-more { display: block; padding: 10px 0; text-align: center; text-decoration: none; background: #fafafa; }
|
||||
.blog-more:hover { background: #eee; }
|
||||
.blog-footer { padding: 20px 25px; background: #f1f7fd; font-size: 11px; border-radius: 0 0 5px 5px; }
|
||||
.blog-footer .blog-rss { color: #727a90; }
|
||||
.blog-footer .blog-admin { float: right; }
|
|
@ -56,8 +56,6 @@
|
|||
.modal.modal-login .remember-label input { top: 2px; }
|
||||
.modal.modal-login .icon-question-sign { position: relative; top: -3px; }
|
||||
.modal.modal-login .icon-ok-green { position: relative; top: -1px; }
|
||||
.modal.modal-login .modal-content .button { position: relative; top: -1px; margin-left: 1px; }
|
||||
.ie .modal.modal-login .modal-content .button { margin-left: 1px; }
|
||||
|
||||
|
||||
/* Write
|
||||
|
|
28
templates/skin/synio/js/blog.js
Normal file
28
templates/skin/synio/js/blog.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
(function($) {
|
||||
"use strict";
|
||||
|
||||
ls.blog.toggleInfo = function() {
|
||||
var $toggle = $('#js-blog-toggle'),
|
||||
$blog = $('#js-blog'),
|
||||
$blogFullInfo = $('#js-blog-full-info');
|
||||
|
||||
if ($blog.hasClass('open')) {
|
||||
$blog.removeClass('open');
|
||||
|
||||
$blogFullInfo.slideUp(300, function () {
|
||||
$toggle.text(ls.lang.get('blog_expand_info'));
|
||||
});
|
||||
} else {
|
||||
$blog.addClass('open');
|
||||
$toggle.text(ls.lang.get('blog_fold_info'));
|
||||
$blogFullInfo.slideDown();
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
ls.hook.add('ls_blog_toggle_join_after', function (idBlog, result) {
|
||||
$(this).removeClass('active');
|
||||
});
|
||||
})(jQuery);
|
|
@ -344,18 +344,6 @@ jQuery(document).ready(function($){
|
|||
$('.talk-search').toggleClass('opened'); return false;
|
||||
};
|
||||
|
||||
ls.blog.toggleInfo = function() {
|
||||
if ($('#blog-mini').is(':visible')) {
|
||||
$('#blog-mini').hide();
|
||||
$('#blog').show();
|
||||
} else {
|
||||
$('#blog-mini').show();
|
||||
$('#blog').hide();
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
// Хук конца инициализации javascript-составляющих шаблона
|
||||
ls.hook.run('ls_template_init_end',[],window);
|
||||
});
|
||||
|
|
|
@ -35,6 +35,7 @@ $config['view']['grid']['fixed_width'] = 976;
|
|||
$config['head']['default']['js'] = Config::Get('head.default.js');
|
||||
$config['head']['default']['js'][] = '___path.static.skin___/js/init.js';
|
||||
$config['head']['default']['js'][] = '___path.static.skin___/js/stream.js';
|
||||
$config['head']['default']['js'][] = '___path.static.skin___/js/blog.js';
|
||||
|
||||
/* JavaScript */
|
||||
$config['head']['default']['css'] = array_merge(Config::Get('head.default.css'), array(
|
||||
|
|
Loading…
Reference in a new issue