-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtopic_part_footer.tpl
114 lines (98 loc) · 4.68 KB
/
topic_part_footer.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{assign var="oBlog" value=$oTopic->getBlog()}
{assign var="oUser" value=$oTopic->getUser()}
{assign var="oVote" value=$oTopic->getVote()}
{assign var="oFavourite" value=$oTopic->getFavourite()}
<footer class="topic-footer">
<ul class="topic-tags js-favourite-insert-after-form js-favourite-tags-topic-{$oTopic->getId()}">
{strip}
{if $oTopic->getTagsArray()}
{foreach from=$oTopic->getTagsArray() item=sTag name=tags_list}
<li>{if !$smarty.foreach.tags_list.first}, {/if}<a rel="tag" href="{router page='tag'}{$sTag|escape:'url'}/">{$sTag|escape:'html'}</a></li>
{/foreach}
{else}
<li>{$aLang.topic_tags_empty}</li>
{/if}
{if $oUserCurrent}
{if $oFavourite}
{foreach from=$oFavourite->getTagsArray() item=sTag name=tags_list_user}
<li class="topic-tags-user js-favourite-tag-user">, <a rel="tag" href="{$oUserCurrent->getUserWebPath()}favourites/topics/tag/{$sTag|escape:'url'}/">{$sTag|escape:'html'}</a></li>
{/foreach}
{/if}
<li class="topic-tags-edit js-favourite-tag-edit" {if !$oFavourite}style="display:none;"{/if}>
<a href="#" onclick="return ls.favourite.showEditTags({$oTopic->getId()},'topic',this);" class="link-dotted">{$aLang.favourite_form_tags_button_show}</a>
</li>
{/if}
{/strip}
</ul>
<ul class="topic-info">
{if !$bTopicList}
{include file="blocks/block.addthis.tpl"}
{/if}
{if $oVote || ($oUserCurrent && $oTopic->getUserId() == $oUserCurrent->getId()) || strtotime($oTopic->getDateAdd()) < $smarty.now-$oConfig->GetValue('acl.vote.topic.limit_time')}
{assign var="bVoteInfoShow" value=true}
{/if}
<li class="topic-info-vote">
<div class="rating">
<div id="vote_area_topic_{$oTopic->getId()}" class="vote-topic
{if $oVote || ($oUserCurrent && $oTopic->getUserId() == $oUserCurrent->getId()) || strtotime($oTopic->getDateAdd()) < $smarty.now-$oConfig->GetValue('acl.vote.topic.limit_time')}
{if $oTopic->getRating() > 0}
vote-count-positive
{elseif $oTopic->getRating() < 0}
vote-count-negative
{elseif $oTopic->getRating() == 0}
vote-count-zero
{/if}
{/if}
{if !$oUserCurrent or ($oUserCurrent && $oTopic->getUserId() != $oUserCurrent->getId())}
vote-not-self
{/if}
{if $oVote}
voted
{if $oVote->getDirection() > 0}
voted-up
{elseif $oVote->getDirection() < 0}
voted-down
{elseif $oVote->getDirection() == 0}
voted-zero
{/if}
{else}
not-voted
{/if}
{if (strtotime($oTopic->getDateAdd()) < $smarty.now-$oConfig->GetValue('acl.vote.topic.limit_time') && !$oVote) || ($oUserCurrent && $oTopic->getUserId() == $oUserCurrent->getId())}
vote-nobuttons
{/if}
{if strtotime($oTopic->getDateAdd()) > $smarty.now-$oConfig->GetValue('acl.vote.topic.limit_time')}
vote-not-expired
{/if}
{if $bVoteInfoShow}js-infobox-vote-topic{/if}">
<div class="vote-item vote-up" onclick="return ls.vote.vote({$oTopic->getId()},this,1,'topic');"></div>
<div class="vote-item vote-count" title="{$aLang.topic_vote_count}: {$oTopic->getCountVote()}">
<span id="vote_total_topic_{$oTopic->getId()}">
{if $bVoteInfoShow}
{if $oTopic->getRating() > 0}+{/if}{$oTopic->getRating()}
{else}
<i onclick="return ls.vote.vote({$oTopic->getId()},this,0,'topic');">—</i>
{/if}
</span>
</div>
<div class="vote-item vote-down" onclick="return ls.vote.vote({$oTopic->getId()},this,-1,'topic');"></div>
{if $bVoteInfoShow}
<div id="vote-info-topic-{$oTopic->getId()}" style="display: none;">
<ul class="vote-topic-info">
<li><i class="icon-synio-vote-info-up"></i> {$oTopic->getCountVoteUp()}</li>
<li><i class="icon-synio-vote-info-down"></i> {$oTopic->getCountVoteDown()}</li>
<li><i class="icon-synio-vote-info-zero"></i> {$oTopic->getCountVoteAbstain()}</li>
{hook run='topic_show_vote_stats' topic=$oTopic}
</ul>
</div>
{/if}
</div>
</div>
</li>
{hook run='topic_show_info' topic=$oTopic}
</ul>
{if !$bTopicList}
{hook run='topic_show_end' topic=$oTopic}
{/if}
</footer>
</article> <!-- /.topic -->