mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-30 21:45:01 +03:00
Fixes #491 Если срок голосования истек, то все равно показываются кнопки для голосования
This commit is contained in:
parent
f67e6a8636
commit
9a0c1d0f24
|
@ -91,13 +91,15 @@
|
||||||
{block 'entry_footer_info_items'}
|
{block 'entry_footer_info_items'}
|
||||||
{* Голосование *}
|
{* Голосование *}
|
||||||
<li class="topic-info-item topic-info-item-vote">
|
<li class="topic-info-item topic-info-item-vote">
|
||||||
|
{$isExpired = strtotime($oTopic->getDateAdd()) < $smarty.now - Config::Get('acl.vote.topic.limit_time')}
|
||||||
|
|
||||||
{include 'components/vote/vote.tpl'
|
{include 'components/vote/vote.tpl'
|
||||||
oObject = $oTopic
|
oObject = $oTopic
|
||||||
sClasses = 'js-vote-topic'
|
sClasses = 'js-vote-topic'
|
||||||
sMods = 'small white topic'
|
sMods = 'small white topic'
|
||||||
bUseAbstain = true
|
bUseAbstain = true
|
||||||
bIsLocked = $oUserCurrent && $oTopic->getUserId() == $oUserCurrent->getId()
|
bIsLocked = ( $oUserCurrent && $oTopic->getUserId() == $oUserCurrent->getId() ) || $isExpired
|
||||||
bShowRating = $oTopic->getVote() || ($oUserCurrent && $oTopic->getUserId() == $oUserCurrent->getId()) || strtotime($oTopic->getDateAdd()) < $smarty.now - Config::Get('acl.vote.topic.limit_time')}
|
bShowRating = $oTopic->getVote() || ($oUserCurrent && $oTopic->getUserId() == $oUserCurrent->getId()) || $isExpired}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{$smarty.block.parent}
|
{$smarty.block.parent}
|
||||||
|
|
Loading…
Reference in a new issue