From be754a86286d31b9b4e4f371b6f82ba3a47b2e19 Mon Sep 17 00:00:00 2001 From: Olivier PEREZ Date: Mon, 2 Feb 2015 21:14:24 +0100 Subject: [PATCH] Fix accessibility on classical polls --- app/inc/i18n.php | 1 + tpl/part/vote_table_classic.tpl | 4 ++-- tpl/part/vote_table_date.tpl | 11 +++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/inc/i18n.php b/app/inc/i18n.php index e62cd7b..02446c5 100644 --- a/app/inc/i18n.php +++ b/app/inc/i18n.php @@ -72,6 +72,7 @@ $date_format['txt_full'] = _('%A, den %e. %B %Y'); //summary in choix_date.php a $date_format['txt_short'] = _('%A %e %B %Y'); // radio title $date_format['txt_day'] = _('%a %e'); $date_format['txt_date'] = _('%Y-%m-%d'); +$date_format['txt_year_month'] = _('%B %Y'); if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { //%e can't be used on Windows platform, use %#d instead foreach ($date_format as $k => $v) { $date_format[$k] = preg_replace('#(? {foreach $slots as $id=>$slot} - {$slot->title|html|markdown} + {$slot->title|html|markdown} {/foreach} @@ -76,7 +76,7 @@ {$vote->name|html} - {foreach $vote->choices as $choice} + {foreach $vote->choices as $id=>$choice} {if $choice==2} {_('Yes')} diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index c4196cd..0412a7a 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -29,7 +29,7 @@ {foreach $slots as $id=>$slot} - {$slot->day|date_format:'%B %Y'|html} + {$slot->day|date_format:$date_format.txt_year_month|html} {for $foo=0 to ($slot->moments|count)-1} {append var='headersM' value=$id} {/for} @@ -40,6 +40,9 @@ {foreach $slots as $id=>$slot} {$slot->day|date_format:$date_format.txt_day|html} + {for $foo=0 to ($slot->moments|count)-1} + {append var='headersD' value=$id} + {/for} {/foreach} @@ -49,7 +52,7 @@ {foreach $slots as $slot} {foreach $slot->moments as $id=>$moment} {$moment|html} - {append var='headersD' value=$headersDCount} + {append var='headersH' value=$headersDCount} {$headersDCount = $headersDCount+1} {/foreach} {/foreach} @@ -72,7 +75,7 @@ {foreach $vote->choices as $k=>$choice} - +