diff --git a/adminstuds.php b/adminstuds.php index 05aed7e..aae0bbd 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -327,7 +327,7 @@ $smarty->assign('poll_id', $poll_id); $smarty->assign('admin_poll_id', $admin_poll_id); $smarty->assign('poll', $poll); $smarty->assign('title', _('Poll') . ' - ' . $poll->title); -$smarty->assign('slots', $pollService->splitSlots($slots)); +$smarty->assign('slots', $poll->format === 'D' ? $pollService->splitSlots($slots) : $slots); $smarty->assign('votes', $pollService->splitVotes($votes)); $smarty->assign('best_moments', $pollService->computeBestMoments($votes)); $smarty->assign('comments', $comments); diff --git a/studs.php b/studs.php index a893a27..7ff18a5 100644 --- a/studs.php +++ b/studs.php @@ -169,7 +169,7 @@ $comments = $pollService->allCommentsByPollId($poll_id); $smarty->assign('poll_id', $poll_id); $smarty->assign('poll', $poll); $smarty->assign('title', _('Poll') . ' - ' . $poll->title); -$smarty->assign('slots', $pollService->splitSlots($slots)); +$smarty->assign('slots', $poll->format === 'D' ? $pollService->splitSlots($slots) : $slots); $smarty->assign('votes', $pollService->splitVotes($votes)); $smarty->assign('best_moments', $pollService->computeBestMoments($votes)); $smarty->assign('comments', $comments); diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl new file mode 100644 index 0000000..7d7e703 --- /dev/null +++ b/tpl/part/vote_table_classic.tpl @@ -0,0 +1,190 @@ +{if !is_array($best_moments) || empty($best_moments)} + {$best_moments = [0]} +{/if} + +
{_("The best choice at this time is:")}
+ {elseif $count_bests > 1} +{_("The bests choices at this time are:")}
+ {/if} + + + {$i = 0} +{_("with")} {$max} {if $max==1}{_('vote')}{else}{_('votes')}{/if}.
+