-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtopic_topic.tpl
89 lines (80 loc) · 4.67 KB
/
topic_topic.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{assign var="oBlog" value=$oTopic->getBlog()}
{assign var="oUser" value=$oTopic->getUser()}
{assign var="oVote" value=$oTopic->getVote()}
<div class="topic" {if !$bTopicList}style="margin-bottom:30px;"{/if}>
<h3 class="title">
{if $oTopic->getPublish()==0}
<img src="{cfg name='path.static.skin'}/images/draft.png" title="{$aLang.topic_unpublish}" alt="{$aLang.topic_unpublish}" />
{/if}
{if $bTopicList}
<a href="{$oTopic->getUrl()}" class="title-topic">{$oTopic->getTitle()|escape:'html'}</a>
{else}
{$oTopic->getTitle()|escape:'html'}
{/if}
</h3>
<div class="info-top">
{if $oBlog->getType()=='personal'}
<li><a href="{router page='personal_blog'}">{$aLang.topic_personal_blog}</a> \</li>
{else}
<li><a href="{router page='blog'}">{$aLang.topic_collective_blog}</a> \</li>
{/if}
<li><a href="{$oBlog->getUrlFull()}">{$oBlog->getTitle()|escape:'html'}</a> \</li>
<li>{date_format date=$oTopic->getDateAdd()}</li>
{if $oUserCurrent and ($oUserCurrent->getId()==$oTopic->getUserId() or $oUserCurrent->isAdministrator() or $oBlog->getUserIsAdministrator() or $oBlog->getUserIsModerator() or $oBlog->getOwnerId()==$oUserCurrent->getId())}
<li>\ <a href="{cfg name='path.root.web'}/{$oTopic->getType()}/edit/{$oTopic->getId()}/" title="{$aLang.topic_edit}" class="edit">{$aLang.topic_edit}</a></li>
{/if}
{if $oUserCurrent and ($oUserCurrent->isAdministrator() or $oBlog->getUserIsAdministrator() or $oBlog->getOwnerId()==$oUserCurrent->getId())}
<li>\ <a href="{router page='topic'}delete/{$oTopic->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" title="{$aLang.topic_delete}" onclick="return confirm('{$aLang.topic_delete_confirm}');" class="delete">{$aLang.topic_delete}</a></li>
{/if}
</div>
<div class="content">
{if $bTopicList}
{$oTopic->getTextShort()}
{if $oTopic->getTextShort()!=$oTopic->getText()}
<br><br><a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
{if $oTopic->getCutText()}
{$oTopic->getCutText()}
{else}
{$aLang.topic_read_more}
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}
{/if}
</div>
<ul class="tags">
{foreach from=$oTopic->getTagsArray() item=sTag name=tags_list}
<li><a href="{router page='tag'}{$sTag|escape:'url'}/"><span></span>{$sTag|escape:'html'}</a></li>
{/foreach}
</ul>
<ul class="info">
<li class="avatar"><a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" title="{$oUser->getLogin()}" /></a></li>
<li class="username"><span class="userrating {if $oUser->getRating()<0}minus{else}plus{/if}">{if $oUser->getRating()>0}+{/if}{$oUser->getRating()}</span> <a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a></li>
<li class="view">{$oTopic->getCountRead()}</li>
{if $bTopicList}
<li class="comments-link">
{if $oTopic->getCountComment()>0}
<a href="{$oTopic->getUrl()}#comments">{$oTopic->getCountComment()}{if $oTopic->getCountCommentNew()}<span> +{$oTopic->getCountCommentNew()}</span>{/if}</a>
{else}
<a href="{$oTopic->getUrl()}#comments">{$aLang.topic_comment}</a>
{/if}
</li>
{/if}
<li class="like">
<a href="#" onclick="return ls.favourite.toggle({$oTopic->getId()},this,'topic');" title="{$aLang.topic_add_favourite}" class="favourite {if $oUserCurrent && $oTopic->getIsFavourite()}active{/if}"></a>
</li>
<li id="vote_area_topic_{$oTopic->getId()}" class="voting {if $oVote || ($oUserCurrent && $oTopic->getUserId()==$oUserCurrent->getId()) || strtotime($oTopic->getDateAdd())<$smarty.now-$oConfig->GetValue('acl.vote.topic.limit_time')}{if $oTopic->getRating()>0}positive{elseif $oTopic->getRating()<0}negative{/if}{/if} {if !$oUserCurrent || $oTopic->getUserId()==$oUserCurrent->getId() || strtotime($oTopic->getDateAdd())<$smarty.now-$oConfig->GetValue('acl.vote.topic.limit_time')}guest{/if}{if $oVote} voted {if $oVote->getDirection()>0}plus{elseif $oVote->getDirection()<0}minus{/if}{/if}">
<span class="bg-plus"><a href="#" class="plus" onclick="return ls.vote.vote({$oTopic->getId()},this,1,'topic');"></a></span>
<span id="vote_total_topic_{$oTopic->getId()}" class="total" title="{$aLang.topic_vote_count}: {$oTopic->getCountVote()}">{if $oTopic->getRating()>0}+{/if}{$oTopic->getRating()}</span>
<span class="bg-minus"><a href="#" class="minus" onclick="return ls.vote.vote({$oTopic->getId()},this,-1,'topic');"></a></span>
</li>
{if !$bTopicList}
<li class="share"><a href="/">{$aLang.topic_share_link}</a></li>
{/if}
{hook run='topic_show_info' topic=$oTopic}
</ul>
{if !$bTopicList}
{hook run='topic_show_end' topic=$oTopic}
{/if}
</div>