From 69a5bc2e1c2fde073b14669b28f4230fbc278c86 Mon Sep 17 00:00:00 2001 From: Olivier PEREZ <olivier@olivierperez.fr> Date: Tue, 13 Oct 2015 00:42:33 +0200 Subject: [PATCH] Hide poll hint into a modal --- locale/de.json | 1 + locale/en.json | 1 + locale/es.json | 1 + locale/fr.json | 1 + locale/it.json | 1 + tpl/part/poll_hint.tpl | 44 +++++++++++++++++++++++++-------- tpl/part/poll_hint_admin.tpl | 41 ++++++++++++++++++++++++------ tpl/part/vote_table_classic.tpl | 5 +++- tpl/part/vote_table_date.tpl | 5 +++- 9 files changed, 81 insertions(+), 19 deletions(-) diff --git a/locale/de.json b/locale/de.json index a8191e24..16110a09 100644 --- a/locale/de.json +++ b/locale/de.json @@ -37,6 +37,7 @@ "Link": "Link", "Search": "Suche", "Creation date:": "Erstellungsdatum:", + "Caption": "Bildunterschrift", "ASTERISK": "*" }, "Date": { diff --git a/locale/en.json b/locale/en.json index 9f9d6998..7cf3d2c4 100644 --- a/locale/en.json +++ b/locale/en.json @@ -37,6 +37,7 @@ "Link": "Link", "Search": "Search", "Creation date:": "Creation date:", + "Caption": "Caption", "ASTERISK": "*" }, "Date" : { diff --git a/locale/es.json b/locale/es.json index cf8e31ff..37391f5b 100644 --- a/locale/es.json +++ b/locale/es.json @@ -37,6 +37,7 @@ "Link": "ES_Lien", "Search": "Búsqueda", "Creation date:": "ES_Date de création :", + "Caption": "Leyenda", "ASTERISK": "*" }, "Date": { diff --git a/locale/fr.json b/locale/fr.json index 01e0250d..af509902 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -37,6 +37,7 @@ "Link": "Lien", "Search": "Chercher", "Creation date:": "Date de création :", + "Caption": "Légende", "ASTERISK": "*" }, "Date": { diff --git a/locale/it.json b/locale/it.json index 3dd15f36..0ca50087 100644 --- a/locale/it.json +++ b/locale/it.json @@ -37,6 +37,7 @@ "Link": "Link", "Search": "IT_Chercher", "Creation date:": "IT_Date de création :", + "Caption": "Titolo", "ASTERISK": "*" }, "Date": { diff --git a/tpl/part/poll_hint.tpl b/tpl/part/poll_hint.tpl index e4c0fc53..29f5c2da 100644 --- a/tpl/part/poll_hint.tpl +++ b/tpl/part/poll_hint.tpl @@ -1,11 +1,35 @@ -{if $active} - <div class="alert alert-info"> - <p>{__('studs', 'If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.')}</p> - <p aria-hidden="true"><b>{__('Generic', 'Legend:')}</b> <span class="glyphicon glyphicon-ok"></span> = {__('Generic', 'Yes')}, <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = {__('Generic', 'Ifneedbe')}, <span class="glyphicon glyphicon-ban-circle"></span> = {__('Generic', 'No')}</p> +<div id="hint_modal" class="modal fade"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <h4 class="modal-title">{__('Generic', 'Caption')}</h4> + </div> + <div class="modal-body"> + {if $active} + <div class="alert alert-info"> + <p>{__('studs', 'If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.')}</p> + + <p aria-hidden="true"><b>{__('Generic', 'Legend:')}</b> <span + class="glyphicon glyphicon-ok"></span> + = {__('Generic', 'Yes')}, <b>(<span class="glyphicon glyphicon-ok"></span>)</b> + = {__('Generic', 'Ifneedbe')}, <span class="glyphicon glyphicon-ban-circle"></span> + = {__('Generic', 'No')}</p> + </div> + {else} + <div class="alert alert-danger"> + <p>{__('studs', 'POLL_LOCKED_WARNING')}</p> + + <p aria-hidden="true"><b>{__('Generic', 'Legend:')}</b> <span + class="glyphicon glyphicon-ok"></span> + = {__('Generic', 'Yes')}, <b>(<span class="glyphicon glyphicon-ok"></span>)</b> + = {__('Generic', 'Ifneedbe')}, <span class="glyphicon glyphicon-ban-circle"></span> + = {__('Generic', 'No')}</p> + </div> + {/if} + </div> + </div> </div> -{else} - <div class="alert alert-danger"> - <p>{__('studs', 'POLL_LOCKED_WARNING')}</p> - <p aria-hidden="true"><b>{__('Generic', 'Legend:')}</b> <span class="glyphicon glyphicon-ok"></span> = {__('Generic', 'Yes')}, <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = {__('Generic', 'Ifneedbe')}, <span class="glyphicon glyphicon-ban-circle"></span> = {__('Generic', 'No')}</p> - </div> -{/if} \ No newline at end of file +</div> \ No newline at end of file diff --git a/tpl/part/poll_hint_admin.tpl b/tpl/part/poll_hint_admin.tpl index 8a16d086..a750c0cd 100644 --- a/tpl/part/poll_hint_admin.tpl +++ b/tpl/part/poll_hint_admin.tpl @@ -1,7 +1,34 @@ -<div class="alert alert-info"> - <p>{__('adminstuds', 'As poll administrator, you can change all the lines of this poll with this button')} <span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{__('Generic', 'Edit')}</span>, - {__('adminstuds', 'remove a column or a line with')} <span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">{__('Generic', 'Remove')}</span> - {__('adminstuds', 'and add a new column with')} <span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">{__('adminstuds', 'Add a column')}</span>.</p> - <p>{__('adminstuds', 'Finally, you can change the informations of this poll like the title, the comments or your email address.')}</p> - <p aria-hidden="true"><strong>{__('Generic', 'Legend:')}</strong> <span class="glyphicon glyphicon-ok"></span> = {__('Generic', 'Yes')}, <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = {__('Generic', 'Ifneedbe')}, <span class="glyphicon glyphicon-ban-circle"></span> = {__('Generic', 'No')}</p> -</div> \ No newline at end of file +<div id="hint_modal" class="modal fade"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <h4 class="modal-title">{__('Generic', 'Caption')}</h4> + </div> + <div class="modal-body"> + <div class="alert alert-info"> + <p>{__('adminstuds', 'As poll administrator, you can change all the lines of this poll with this button')} + <span class="glyphicon glyphicon-pencil"></span><span + class="sr-only">{__('Generic', 'Edit')}</span>, + {__('adminstuds', 'remove a column or a line with')} <span + class="glyphicon glyphicon-remove text-danger"></span><span + class="sr-only">{__('Generic', 'Remove')}</span> + {__('adminstuds', 'and add a new column with')} <span + class="glyphicon glyphicon-plus text-success"></span><span + class="sr-only">{__('adminstuds', 'Add a column')}</span>.</p> + + <p>{__('adminstuds', 'Finally, you can change the informations of this poll like the title, the comments or your email address.')}</p> + + <p aria-hidden="true"><strong>{__('Generic', 'Legend:')}</strong> <span + class="glyphicon glyphicon-ok"></span> = {__('Generic', 'Yes')}, <b>(<span + class="glyphicon glyphicon-ok"></span>)</b> = {__('Generic', 'Ifneedbe')}, <span + class="glyphicon glyphicon-ban-circle"></span> = {__('Generic', 'No')}</p> + </div> + </div> + </div> + <!-- /.modal-content --> + </div> + <!-- /.modal-dialog --> +</div><!-- /.modal --> diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl index 20fe8858..bd092ef1 100644 --- a/tpl/part/vote_table_classic.tpl +++ b/tpl/part/vote_table_classic.tpl @@ -2,7 +2,10 @@ {$best_choices = [0]} {/if} -<h3>{__('Poll results', 'Votes of the poll')} {if $hidden}<i>({__('PollInfo', 'Results are hidden.')})</i>{/if}</h3> +<h3> + {__('Poll results', 'Votes of the poll')} {if $hidden}<i>({__('PollInfo', 'Results are hidden.')})</i>{/if} + <a href="" data-toggle="modal" data-target="#hint_modal"><i class="glyphicon glyphicon-info-sign"></i></a> +</h3> <div id="tableContainer" class="tableContainer"> <form action="{if $admin}{poll_url id=$admin_poll_id admin=true}{else}{poll_url id=$poll_id}{/if}" method="POST" id="poll_form"> diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index 029e11f5..a072a634 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -2,7 +2,10 @@ {$best_choices = [0]} {/if} -<h3>{__('Poll results', 'Votes of the poll')} {if $hidden}<i>({__('PollInfo', 'Results are hidden.')})</i>{/if}</h3> +<h3> + {__('Poll results', 'Votes of the poll')} {if $hidden}<i>({__('PollInfo', 'Results are hidden.')})</i>{/if} + <a href="" data-toggle="modal" data-target="#hint_modal"><i class="glyphicon glyphicon-info-sign"></i></a> +</h3> <div id="tableContainer" class="tableContainer"> -- GitLab