{assign var=replies value=intval($postResponseCounts[$cPost->data.post_id].commentcount)} {assign var='votingAllowed' value=1} {assign var='forPhase' value=(int)$smarty.request.forPhase} {if $cPost->data.post_moderationstatus eq 5} {assign var='votingAllowed' value=0} {else if $cPost->hasReachedFinalMilestone()} {assign var='votingAllowed' value=0} {else if $votingWalletEnabled && !$allowanceLeft && $userVoteDir eq 0} {assign var='votingAllowed' value=0} {else if ((!$timeLeft.ongoing && !$cPost->hasReachedFinalMilestone()) || ($cPost->data.post_moderationstatus eq 5)) && $category->data.category_milestonesresettime} {assign var='votingAllowed' value=0} {else if $forPhase ne 0 && $category->tempData.phase->data.phase_id ne $forPhase} {assign var='votingAllowed' value=0} {else if $currentMilestone|is_object && ($currentMilestone->getConditionType() == 'review' || $currentMilestone->getConditionType() == 'elaborate')} {assign var='votingAllowed' value=0} {else if $timeLimit && $hasMilestones && !$cPost->hasReachedFinalMilestone() && (!$timeLeft.ongoing || $cPost->data.post_moderationstatus eq 5)} {assign var='votingAllowed' value=0} {else if $currentMilestone|is_object && $currentMilestone->getConditionType() == 'score' && !MilestoneVoter::canUserVote($user, $cPost)} {assign var='votingAllowed' value=0} {assign var='votingAllowedNoMessage' value=true} {else if $cPost->data.post_user eq $user->data['user_id']}{* || in_array($user->data['user_id'], $cPost->getAuthorIds())} *} {assign var='votingAllowed' value=0} {assign var='votingAllowedNoMessage' value=true} {else if $categoryaccess->getData('canVoteIdeas')} {assign var='votingAllowed' value=1} {else} {assign var='votingAllowed' value=0} {/if} {if $cPost->hasBlindVoting() && $categoryaccess->getData('canModerate') neq 0} {assign var='canSeeVotingBecauseModerator' value=true} {/if} {if $hasVoting neq false && (!$hasMilestones || $currentMilestone->getConditionType() == 'score')}
{assign var='voteTotal' value=$cPost->joined.obj_postvotecount->data.postvotecount_votes} {assign var='votingData' value=$cPost->getVotingData(forPhase)} {assign var='votingScheme' value=$cPost->getVotingScheme($forPhase)} {if $votingScheme eq 'updown'} {if !$cPost->hasBlindVoting() || $categoryaccess->getData('canModerate') neq 0}
{$votingData.score|intval} {"Score"|gettext}
{/if} {if $votingAllowed}
{else if !$votingAllowedNoMessage}
{"Voting closed"|gettext}
{/if} {elseif $votingScheme eq 'up'} {if $category instanceof Crowdicity\Category && $category->isIncubatorChallenge() && $category->milestonesTimeLimit} {assign var=time_limit value=Milestonetime::getTimeLeft($cPost, $category->milestonesTimeLimit)} {if $time_limit.rejected}
{"This idea has been closed by the challenge moderator"|gettext}.
0 {"Days Left"|gettext}
{else} {if !$time_limit.ongoing}
{"The idea has run out of time"|gettext}.
0 {"Days Left"|gettext}
{else}
{"Time Left"|gettext}
{$time_limit.days}
{"Days"|gettext}
{$time_limit.hours}
{"Hours"|gettext}
{$time_limit.minutes}
{"Mins"|gettext}
{$time_limit.seconds}
{"Secs"|gettext}
{if $time_limit.days} {$time_limit.days} {if $time_limit.days neq 1} {"Days Left"|gettext} {else} {"Day Left"|gettext} {/if} {else} {$time_limit.hours} {if $time_limit.hours neq 1} {"Hrs Left"|gettext} {else} {"Hr Left"|gettext} {/if} {/if}
{/if} {/if} {/if} {if !$cPost->hasBlindVoting() || $categoryaccess->getData('canModerate') neq 0}
{if $category instanceof Crowdicity\Category && $category->isIncubatorChallenge()} {if $lastReached && $lastReached->getConditionType() eq 'score'}
{$voteTotal|intval} {if $cPost->getCurrentMilestone() && $cPost->getCurrentMilestone()->getConditionType() eq 'score'}{*/{$cPost->getCurrentMilestone()->getTarget()}*}{/if} {if $votingAllowed} {"Score"|gettext} {else if $lastReached && $lastReached->getConditionType() eq 'score'} {"Votes Achieved"} {else} {"Score"|gettext} {/if}
{else} {if $cPost->hasReachedVoteTarget()}
{/if}
{$voteTotal|intval} {if $votingAllowed} {"Score"|gettext} {else if ($lastReached && $lastReached->getConditionType() eq 'score') || $cPost->hasReachedVoteTarget()} {"Votes Achieved"} {else} {"Score"|gettext} {/if}
{/if} {else} {$voteTotal|intval} {"Score"|gettext} {/if}
{/if} {if $votingAllowed && !$cPost->hasReachedFinalMilestone()}
{else if !$votingAllowed && $lastReached && $lastReached->getConditionType() neq 'score' && !$cPost->hasReachedVoteTarget() && !$votingAllowedNoMessage}
{"Voting is not open"|gettext}
{else if !$votingAllowed && !$votingAllowedNoMessage}
{"Voting closed"|gettext}
{/if} {elseif $votingScheme eq 'pointsAward'} {assign var=optionOptions value=$categoryaccess->getData('votingScheme_optionOptions')} {if !$cPost->hasBlindVoting() || $categoryaccess->getData('canModerate') neq 0}
{$voteTotal|intval} {if $categoryaccess->getData('renameScoring')} {"Score"|gettext} {else} {"Points"|gettext} {/if}
{/if} {if $votingAllowed}
{if $votingData.userVote}
{"Your Score"|gettext}
{$votingData.userVote}/{$optionOptions.maxScore}
{"Change Score"|gettext}
{else}
{if $categoryaccess->getData('renameScoring')}{"Award Votes"|gettext}{else}{"Award Points"|gettext}{/if}
{/if}
    {for $var=1 to $optionOptions.maxScore}
  • {$var}
  • {/for}
{else if !$votingAllowedNoMessage}
{"Voting closed"|gettext}
{/if} {elseif $votingScheme eq 'stars'} {assign var=voteTotalInteger value=$voteTotal|floor} {assign var=voteTotalFraction value=$voteTotal*11-$voteTotalInteger*11} {assign var=voteTotalFractionOn value=$voteTotalInteger+1} {assign var=optionOptions value=$categoryaccess->getData('votingScheme_optionOptions')} {if !$cPost->hasBlindVoting() || $categoryaccess->getData('canModerate') neq 0}
{if $votingData.score} {for $var=1 to $optionOptions.maxStars} {/for} {else} n/a {/if}
{(int)$votingData.totalVotes} {if (int)$votingData.totalVotes eq 1}{"Rating"|gettext}{else}{"Ratings"|gettext}{/if}
{/if} {if $votingAllowed}
{for $var=1 to $optionOptions.maxStars} {/for}
{else if !$votingAllowedNoMessage}
{"Voting closed"|gettext}
{/if} {else if $votingScheme eq 'scorecard'} {if $category->isPhased()} {assign var=postScore value=Scorecard::roundScore($voteTotal)} {elseif $category->isIncubatorChallenge()} {if $currentMilestone->getConditionType() eq 'score'} {assign var=scorecardResults value=Scorecard::getForPost($cPost, 'category', 0, $currentMilestone->id, $sortByCriteria)} {assign var=postScore value=Scorecard::getOverAllScore($scorecardResults)} {/if} {else} {assign var=postScore value=Scorecard::roundScore($voteTotal)} {/if} {if !$cPost->hasBlindVoting() || $categoryaccess->getData('canModerate') neq 0}
{$postScore} {"Points"|gettext}
{/if} {/if}
{/if}
{$replies}