1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-20 17:58:24 +03:00
ifhub.club/templates/skin/developer/comment.tpl
2010-02-08 02:10:30 +00:00

77 lines
4.3 KiB
Smarty

{assign var="oUser" value=$oComment->getUser()}
{assign var="oVote" value=$oComment->getVote()}
{if !$oComment->getDelete() or $bOneComment or ($oUserCurrent and $oUserCurrent->isAdministrator())}
<img src="{cfg name='path.static.skin'}/images/folding-close.gif" alt="+" title="{$aLang.comment_collapse}/{$aLang.comment_expand}" class="folding" {if $bOneComment}style="display: none;"{/if} />
<a name="comment{$oComment->getId()}" ></a>
<ul class="info">
<li class="avatar"><a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" /></a></li>
<li><a href="{$oUser->getUserWebPath()}" class="author">{$oUser->getLogin()}</a></li>
<li class="date">{date_format date=$oComment->getDate()}</li>
<li><a href="#comment{$oComment->getId()}">#</a></li>
{if $oComment->getPid()}
<li class="goto-comment-parent"><a href="#comment{$oComment->getPid()}" onclick="return lsCmtTree.goToParentComment($(this));" title="{$aLang.comment_goto_parent}">^</a></li>
{/if}
<li class="goto-comment-child hidden"><a href="#" onclick="return lsCmtTree.goToChildComment(this);" title="{$aLang.comment_goto_child}">v</a></li>
{if !$oComment->getDelete() and $oUserCurrent and $oUserCurrent->isAdministrator()}
<li><a href="#" class="delete" onclick="lsCmtTree.toggleComment(this,{$oComment->getId()}); return false;">{$aLang.comment_delete}</a></li>
{/if}
{if $oComment->getDelete() and $oUserCurrent and $oUserCurrent->isAdministrator()}
<li><a href="#" class="repair" onclick="lsCmtTree.toggleComment(this,{$oComment->getId()}); return false;">{$aLang.comment_repair}</a></li>
{/if}
{if $oUserCurrent and !$bNoCommentFavourites}
<li class="favorite {if $oComment->getIsFavourite()}active{/if}"><a href="#" onclick="lsFavourite.toggle({$oComment->getId()},this,'comment'); return false;"></a></li>
{/if}
</ul>
{if $oComment->getTargetType()!='talk'}
<div class="voting {if $oComment->getRating()>0}positive{elseif $oComment->getRating()<0}negative{/if} {if !$oUserCurrent || $oComment->getUserId()==$oUserCurrent->getId() || strtotime($oComment->getDate())<$smarty.now-$oConfig->GetValue('acl.vote.comment.limit_time')}guest{/if} {if $oVote} voted {if $oVote->getDirection()>0}plus{else}minus{/if}{/if} ">
<div class="total">{if $oComment->getRating()>0}+{/if}{$oComment->getRating()}</div>
<a href="#" class="plus" onclick="lsVote.vote({$oComment->getId()},this,1,'comment'); return false;"></a>
<a href="#" class="minus" onclick="lsVote.vote({$oComment->getId()},this,-1,'comment'); return false;"></a>
</div>
{/if}
<div id="comment_content_id_{$oComment->getId()}" class="content {if $oComment->getDelete() and $oUserCurrent and $oUserCurrent->isAdministrator()}del{elseif $oUserCurrent and $oComment->getUserId()==$oUserCurrent->getId()}self{elseif $sDateReadLast<=$oComment->getDate()}new{/if}">
{if !$bOneComment and $oUserCurrent and $oComment->getUserId()!=$oUserCurrent->getId() and $sDateReadLast<=$oComment->getDate()}
{literal}
<script language="JavaScript" type="text/javascript">
window.addEvent('domready', function() {
{/literal}
lsCmtTree.addCommentScroll({$oComment->getId()});
{literal}
});
</script>
{/literal}
{/if}
<div class="text">
{if $oComment->isBad()}
<div style="display: none;" id="comment_text_{$oComment->getId()}">
{$oComment->getText()}
</div>
<a href="#" onclick="$('comment_text_{$oComment->getId()}').style.display='block';$(this).style.display='none';return false;">{$aLang.comment_bad_open}</a>
{else}
{$oComment->getText()}
{/if}
{if $oUserCurrent and !$oComment->getDelete() and !$bAllowNewComment}
<br />
<a href="javascript:lsCmtTree.toggleCommentForm({$oComment->getId()});" class="reply-link">({$aLang.comment_answer})</a>
{/if}
</div>
</div>
<div class="comment"><div class="content"><div class="text" id="comment_preview_{$oComment->getId()}" style="display: none;"></div></div></div>
<div class="reply" id="reply_{$oComment->getId()}" style="display: none;"></div>
{else}
<span class="delete">{$aLang.comment_was_delete}</span>
{/if}
<div class="comment-children" id="comment-children-{$oComment->getId()}">{if $bOneComment}</div>{/if}