Merge branch 'css-results-poll-responsive' into 'master'

Css results poll responsive

See merge request framasoft/framadate!219
This commit is contained in:
Thomas Citharel 2018-02-20 17:14:13 +01:00
commit 2328b2c871
10 changed files with 130 additions and 96 deletions

View File

@ -22,10 +22,4 @@
border-bottom: 4px dashed;
border-top: 0 none;
content: "";
}
@media (max-width: 767px) {
#optionnal {
margin-top: 15px;
}
}

View File

@ -82,6 +82,10 @@ header h1 {
.container .jumbotron p {
font-size: 1em;
}
.container .jumbotron .btn-group >.btn {
margin-bottom: 20px;
white-space: normal;
}
.summary h4 {
margin-top:0;
@ -122,6 +126,12 @@ header .lead {
padding: 10px 0;
margin:0;
}
header form .input-group .form-control {
margin-bottom: 20px;
}
header form .input-group .input-group-btn {
vertical-align: top;
}
#admin-link, #public-link {
cursor:text;
@ -304,11 +314,22 @@ table.results .btn-link.btn-sm {
padding-right:30px;
}
/* Formulaire de création de sondage */
@media (max-width: 767px) {
#formulaire .col-xs-12 {
padding-left: 0;
margin-bottom: 20px;
}
}
/* Formulaire de vote */
#vote-form td ul, #vote-form td label {
margin:0;
font-size:12px;
}
#vote-form td label {
padding: 1px 3px;
}
#vote-form td {
border-top:2px solid white;
@ -508,6 +529,12 @@ table.results > tbody > tr:hover > td .glyphicon {
#poll_search {
cursor: pointer;
}
.table-of-polls {
overflow-x: scroll;
margin-bottom: 0;
border: 0;
box-shadow: none;
}
/* Studs */
.password_request {
@ -518,3 +545,8 @@ table.results > tbody > tr:hover > td .glyphicon {
#password-form .btn-cancel {
float: right;
}
/* Buttons */
.btn {
white-space: normal;
}

View File

@ -75,7 +75,7 @@
"Here is how it works:": "Voici comment ça fonctionne :",
"Make a poll": "Créez un sondage",
"Define dates or subjects to choose": "Déterminez les dates ou les sujets à choisir",
"Send the poll link to your friends or colleagues": "Envoyez le lien du sondage à vos amis ou collègues",
"Send the poll link to your friends or colleagues": "Envoyez le lien du sondage à vos ami·e·s ou collègues",
"Discuss and make a decision": "Discutez et prenez votre décision",
"Do you want to": "Voulez-vous",
"view an example?": "voir un exemple ?"
@ -104,10 +104,10 @@
"Edit the title": "Modifier le titre",
"Save the new title": "Enregistrer le nouveau titre",
"Cancel the title edit": "Annuler le changement de titre",
"Initiator of the poll": "Auteur du sondage",
"Edit the name": "Modification de l'auteur",
"Save the new name": "Enregistrer l'auteur",
"Cancel the name edit": "Annuler le changement d'auteur",
"Initiator of the poll": "Auteur·rice du sondage",
"Edit the name": "Modification de l'auteur·rice",
"Save the new name": "Enregistrer l'auteur·rice",
"Cancel the name edit": "Annuler le changement d'auteur·rice",
"Email": "Courriel",
"Edit the email adress": "Modifier le courriel",
"Save the email address": "Enregistrer le courriel",
@ -149,13 +149,13 @@
"The bests choices at this time are:": "Pour l'instant, les choix ayant reçu le plus grand nombre de votes sont :",
"Scroll to the left": "Faire défiler à gauche",
"Scroll to the right": "Faire défiler à droite",
"polled user": "votant",
"polled users": "votants",
"polled user": "votant·e",
"polled users": "votant·e·s",
"Display the chart of the results": "Afficher le graphique des résultats",
"Chart": "Graphique"
},
"Comments": {
"Comments of polled people": "Commentaires de sondés",
"Comments of polled people": "Commentaires de sondé·e·s",
"Remove the comment": "Supprimer le commentaire",
"Add a comment to the poll": "Ajouter un commentaire au sondage",
"Your comment": "Votre commentaire",
@ -172,7 +172,7 @@
},
"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.": "Pour participer à ce sondage, veuillez entrer votre nom, choisir toutes les valeurs qui vous conviennent et valider votre choix avec le bouton en bout de ligne.",
"POLL_LOCKED_WARNING": "L'administrateur a verrouillé ce sondage. Les votes et commentaires sont gelés, il n'est plus possible de participer",
"POLL_LOCKED_WARNING": "L'administrateur·rice a verrouillé ce sondage. Les votes et commentaires sont gelés, il n'est plus possible de participer",
"The poll is expired, it will be deleted soon.": "Le sondage a expiré, il sera bientôt supprimé.",
"Deletion date:": "Date de suppression :",
"Your vote has been registered successfully, but be careful: regarding this poll options, you need to keep this personal link to edit your own vote:": "Votre vote a bien été pris en compte, mais faites attention : ce sondage n'autorise l'édition de votre vote qu'avec le lien personnalisé suivant ; conservez-le précieusement ! ",
@ -190,7 +190,7 @@
"Your reminder has been successfully sent!": "Votre rappel a été envoyé avec succès !"
},
"adminstuds": {
"As poll administrator, you can change all the lines of this poll with this button": "En tant qu'administrateur, vous pouvez modifier toutes les lignes de ce sondage avec ce bouton",
"As poll administrator, you can change all the lines of this poll with this button": "En tant qu'administrateur·rice, vous pouvez modifier toutes les lignes de ce sondage avec ce bouton",
"remove a column or a line with": "effacer une colonne ou une ligne avec",
"and add a new column with": "et si vous avez oublié de saisir un choix, vous pouvez rajouter une colonne en cliquant sur",
"Finally, you can change the informations of this poll like the title, the comments or your email address.": "Vous pouvez enfin également modifier les informations relatives à ce sondage comme le titre, les commentaires ou encore votre courriel.",
@ -235,11 +235,11 @@
"Poll id rules": "(peut contenir des lettres, des chiffres et des tirets)",
"Poll id warning": "La modification du lien du sondage peut faciliter l'accès à ce sondage pour des personnes non désirées. Il est recommandé de le protéger par mot de passe.",
"Votes cannot be modified": "Aucun vote ne peut être modifié",
"All voters can modify any vote": "Tous les sondés peuvent modifier tous les votes",
"Voters can modify their vote themselves": "Chaque sondé peut modifier son propre vote",
"All voters can modify any vote": "Tou·te·s les sondé·e·s peuvent modifier tous les votes",
"Voters can modify their vote themselves": "Chaque sondé·e peut modifier son propre vote",
"To receive an email for each new vote": "Recevoir un courriel à chaque participation",
"To receive an email for each new comment": "Recevoir un courriel à chaque commentaire",
"Only the poll maker can see the poll's results": "Seul le créateur du sondage peut voir les résultats",
"Only the poll maker can see the poll's results": "Seul le ou la créateur·rice du sondage peut voir les résultats",
"Use a password to restrict access": "Restreindre l'accès au sondage par mot de passe",
"The results are publicly visible": "Les résultats sont visibles sans mot de passe",
"Poll password": "Mot de passe",
@ -289,8 +289,8 @@
"Removal date and confirmation (3 on 3)": "Date d'expiration et confirmation (3 sur 3)",
"Confirm the creation of your poll": "Confirmez la création de votre sondage",
"List of your choices": "Liste de vos choix",
"Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.": "Une fois que vous aurez confirmé la création du sondage, vous serez redirigé automatiquement vers la page d'administration de votre sondage.",
"Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.": "En même temps, vous recevrez deux courriels : l'un contenant le lien vers votre sondage pour le faire suivre aux futurs sondés, l'autre contenant le lien vers la page d'administration du sondage.",
"Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.": "Une fois que vous aurez confirmé la création du sondage, vous serez redirigé·e automatiquement vers la page d'administration de votre sondage.",
"Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.": "En même temps, vous recevrez deux courriels : l'un contenant le lien vers votre sondage pour le faire suivre aux futur·e·s sondé·e·s, l'autre contenant le lien vers la page d'administration du sondage.",
"Create the poll": "Créer le sondage",
"Your poll will be automatically archived in %d days.": "Votre sondage sera automatiquement archivé dans %d jours.",
"You can set a closer archiving date for it.": "Vous pouvez décider d'une date d'archivage plus proche.",
@ -308,7 +308,7 @@
"Poll ID": "ID sondage",
"Format": "Format",
"Title": "Titre",
"Author": "Auteur",
"Author": "Auteur·rice",
"Email": "Courriel",
"Expiration date": "Expiration",
"Votes": "Votes",
@ -321,7 +321,7 @@
"Fail": "Échec",
"Nothing": "Rien",
"Succeeded:": "Succès :",
"Failed:": "Échec ::",
"Failed:": "Échec :",
"Skipped:": "Passé :",
"Pages:": "Pages :",
"Purged:": "Purgés :",
@ -337,7 +337,7 @@
"Here is the list of the polls that you manage on %s:": "Voici la liste des sondages que vous administrez sur %s :",
"Have a good day!": "Bonne journée !",
"PS: this email has been sent because you or someone else asked to get back the polls created with your email address.": "PS : ce mail a été envoyé parce que vous ou quelqu'un d'autre avez demandé la récupération des sondages créés à l'aide de votre adresse email.",
"If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "Si jamais vous n'étiez pas à l'origine de cette action et que vous pensez qu'il s'agit d'un abus, vous pouvez nous le signaler à l'administrateur sur %s."
"If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "Si jamais vous n'étiez pas à l'origine de cette action et que vous pensez qu'il s'agit d'un abus, vous pouvez nous le signaler à l'administrateur·rice sur %s."
},
"Mail": {
"Poll's participation: %s": "Participation au sondage : %s",
@ -345,18 +345,18 @@
"filled a vote.\nYou can find your poll at the link": "vient de voter.<br/>Vous pouvez retrouver votre sondage avec le lien suivant",
"updated a vote.\nYou can find your poll at the link": "vient de mettre à jour un vote.<br/>Vous pouvez retrouver votre sondage avec le lien suivant",
"wrote a comment.\nYou can find your poll at the link": "vient de rédiger un commentaire.<br/>Vous pouvez retrouver votre sondage avec le lien suivant",
"Someone just change your poll available at the following link %s.": "Quelqu'un vient de modifier votre sondage accessible au lien suivant <a href=\"%1$s\">%1$s</a>.",
"Someone just delete your poll %s.": "Quelqu'un vient de supprimer votre sondage \"%s\".",
"Someone just change your poll available at the following link %s.": "Quelqu'un·e vient de modifier votre sondage accessible au lien suivant <a href=\"%1$s\">%1$s</a>.",
"Someone just delete your poll %s.": "Quelqu'un·e vient de supprimer votre sondage \"%s\".",
"Thanks for your trust.": "Merci de votre confiance.",
"FOOTER": "« La route est longue, mais la voie est libre… »<br/>Framasoft ne vit que par vos dons (déductibles des impôts).<br/>Merci d'avance pour votre soutien http://soutenir.framasoft.org.",
"[ADMINISTRATOR] New settings for your poll": "[ADMINISTRATEUR] Changement de configuration du sondage",
"You have changed the settings of your poll. \nYou can modify this poll with this link": "Vous avez modifié la configuration de votre sondage.<br/>Vous pouvez modifier ce sondage avec le lien suivant",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.": "Ceci est le message qui doit être envoyé aux sondés.<br/>Vous pouvez maintenant transmettre ce message à toutes les personnes susceptibles de participer au vote.",
"This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.": "Ceci est le message qui doit être envoyé aux sondé·e·s.<br/>Vous pouvez maintenant transmettre ce message à toutes les personnes susceptibles de participer au vote.",
"hast just created a poll called": " vient de créer un sondage intitulé ",
"Thanks for filling the poll at the link above": "Merci de bien vouloir participer au sondage à l'adresse suivante",
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "Ce message ne doit PAS être diffusé aux sondés. Il est réservé à l'auteur du sondage.<br/><br/>Vous pouvez modifier ce sondage à l'adresse suivante ",
"Author's message": "Réservé à l'auteur",
"For sending to the polled users": "Pour diffusion aux sondés"
"This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above": "Ce message ne doit PAS être diffusé aux sondé·e·s. Il est réservé à l'auteur·rice du sondage.<br/><br/>Vous pouvez modifier ce sondage à l'adresse suivante ",
"Author's message": "Réservé à l'auteur·rice",
"For sending to the polled users": "Pour diffusion aux sondé·e·s"
},
"Installation": {
"AppMail": "Adresse mail de l'application",
@ -366,7 +366,7 @@
"DbConnectionString": "Chaîne de connexion",
"DbPassword": "Mot de passe",
"DbPrefix": "Préfixe",
"DbUser": "Utilisateur",
"DbUser": "Utilisateur·rice",
"DefaultLanguage": "Langue par défaut",
"General": "Général",
"Install": "Installer",

View File

@ -2,8 +2,8 @@
{block 'main'}
<div class="row">
<div class="col-xs-12">
<a href="{'admin'|resource}">{__('Admin', 'Back to administration')}</a>
<div class="col-xs-12 lead">
<a class="btn btn-default" href="{'admin'|resource}">{__('Admin', 'Back to administration')}</a>
</div>
</div>
{block 'admin_main'}{/block}

View File

@ -64,59 +64,60 @@
<div class="panel-heading">
{if $count == $total}{$count}{else}{$count} / {$total}{/if} {__('Admin', 'polls in the database at this time')}
</div>
<table class="table table-bordered table-polls">
<tr align="center">
<th scope="col"></th>
<th scope="col">{__('Admin', 'Title')}</th>
<th scope="col">{__('Admin', 'Author')}</th>
<th scope="col">{__('Admin', 'Email')}</th>
<th scope="col">{__('Admin', 'Expiration date')}</th>
<th scope="col">{__('Admin', 'Votes')}</th>
<th scope="col">{__('Admin', 'Poll ID')}</th>
<th scope="col" colspan="3">{__('Admin', 'Actions')}</th>
</tr>
{foreach $polls as $poll}
<div class="table-of-polls panel">
<table class="table table-bordered table-polls">
<tr align="center">
<td class="cell-format">
{if $poll->format === 'D'}
<span class="glyphicon glyphicon-calendar" aria-hidden="true"
title="{__('Generic', 'Date')}"></span>
<span class="sr-only">{__('Generic', 'Date')}</span>
{else}
<span class="glyphicon glyphicon-list-alt" aria-hidden="true"
title="{__('Generic', 'Classic')}"></span>
<span class="sr-only">{__('Generic', 'Classic')}</span>
{/if}
</td>
<td>{$poll->title|html}</td>
<td>{$poll->admin_name|html}</td>
<td>{$poll->admin_mail|html}</td>
{if strtotime($poll->end_date) > time()}
<td>{date('d/m/y', strtotime($poll->end_date))}</td>
{else}
<td><span class="text-danger">{strtotime($poll->end_date)|date_format:'d/m/Y'}</span></td>
{/if}
<td>{$poll->votes|html}</td>
<td>{$poll->id|html}</td>
<td><a href="{poll_url id=$poll->id}" class="btn btn-link"
title="{__('Admin', 'See the poll')}"><span
class="glyphicon glyphicon-eye-open"></span><span
class="sr-only">{__('Admin', 'See the poll')}</span></a></td>
<td><a href="{poll_url id=$poll->admin_id admin=true}" class="btn btn-link"
title="{__('Admin', 'Change the poll')}"><span
class="glyphicon glyphicon-pencil"></span><span
class="sr-only">{__('Admin', 'Change the poll')}</span></a></td>
<td>
<button type="submit" name="delete_poll" value="{$poll->id|html}" class="btn btn-link"
title="{__('Admin', 'Deleted the poll')}"><span
class="glyphicon glyphicon-trash text-danger"></span><span
class="sr-only">{__('Admin', 'Deleted the poll')}</span>
</td>
<th scope="col"></th>
<th scope="col">{__('Admin', 'Title')}</th>
<th scope="col">{__('Admin', 'Author')}</th>
<th scope="col">{__('Admin', 'Email')}</th>
<th scope="col">{__('Admin', 'Expiration date')}</th>
<th scope="col">{__('Admin', 'Votes')}</th>
<th scope="col">{__('Admin', 'Poll ID')}</th>
<th scope="col" colspan="3">{__('Admin', 'Actions')}</th>
</tr>
{/foreach}
</table>
{foreach $polls as $poll}
<tr align="center">
<td class="cell-format">
{if $poll->format === 'D'}
<span class="glyphicon glyphicon-calendar" aria-hidden="true"
title="{__('Generic', 'Date')}"></span>
<span class="sr-only">{__('Generic', 'Date')}</span>
{else}
<span class="glyphicon glyphicon-list-alt" aria-hidden="true"
title="{__('Generic', 'Classic')}"></span>
<span class="sr-only">{__('Generic', 'Classic')}</span>
{/if}
</td>
<td>{$poll->title|html}</td>
<td>{$poll->admin_name|html}</td>
<td>{$poll->admin_mail|html}</td>
{if strtotime($poll->end_date) > time()}
<td>{date('d/m/y', strtotime($poll->end_date))}</td>
{else}
<td><span class="text-danger">{strtotime($poll->end_date)|date_format:'d/m/Y'}</span></td>
{/if}
<td>{$poll->votes|html}</td>
<td>{$poll->id|html}</td>
<td><a href="{poll_url id=$poll->id}" class="btn btn-link"
title="{__('Admin', 'See the poll')}"><span
class="glyphicon glyphicon-eye-open"></span><span
class="sr-only">{__('Admin', 'See the poll')}</span></a></td>
<td><a href="{poll_url id=$poll->admin_id admin=true}" class="btn btn-link"
title="{__('Admin', 'Change the poll')}"><span
class="glyphicon glyphicon-pencil"></span><span
class="sr-only">{__('Admin', 'Change the poll')}</span></a></td>
<td>
<button type="submit" name="delete_poll" value="{$poll->id|html}" class="btn btn-link"
title="{__('Admin', 'Deleted the poll')}"><span
class="glyphicon glyphicon-trash text-danger"></span><span
class="sr-only">{__('Admin', 'Deleted the poll')}</span>
</td>
</tr>
{/foreach}
</table>
</div>
<div class="panel-heading">
{__('Admin', 'Pages:')}

View File

@ -2,6 +2,7 @@
<html lang="{$locale}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
{if !empty($title)}
<title>{$title|html} - {$APPLICATION_NAME|html}</title>

View File

@ -0,0 +1,11 @@
{* Scroll left and right *}
<div class="hidden row scroll-buttons" aria-hidden="true">
<div class="btn-group pull-right">
<button class="btn btn-sm btn-link scroll-left" title="{__('Poll results', 'Scroll to the left')}">
<span class="glyphicon glyphicon-chevron-left"></span>
</button>
<button class="btn btn-sm btn-link scroll-right" title="{__('Poll results', 'Scroll to the right')}">
<span class="glyphicon glyphicon-chevron-right"></span>
</button>
</div>
</div>

View File

@ -9,6 +9,10 @@
{/if}
</h3>
{include 'part/scroll_left_right.tpl'}
<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">
<input type="hidden" name="control" value="{$slots_hash}"/>

View File

@ -10,6 +10,9 @@
</h3>
{include 'part/scroll_left_right.tpl'}
<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">
<input type="hidden" name="control" value="{$slots_hash}"/>

View File

@ -39,18 +39,6 @@
{/if}
{/if}
{* Scroll left and right *}
<div class="hidden row scroll-buttons" aria-hidden="true">
<div class="btn-group pull-right">
<button class="btn btn-sm btn-link scroll-left" title="{__('Poll results', 'Scroll to the left')}">
<span class="glyphicon glyphicon-chevron-left"></span>
</button>
<button class="btn btn-sm btn-link scroll-right" title="{__('Poll results', 'Scroll to the right')}">
<span class="glyphicon glyphicon-chevron-right"></span>
</button>
</div>
</div>
{if !$accessGranted && $resultPubliclyVisible}
{include 'part/password_request.tpl' active=$poll->active}
{/if}