diff --git a/app/classes/Framadate/Repositories/PollRepository.php b/app/classes/Framadate/Repositories/PollRepository.php index b8e913b3cf8271ea7b41a91a61cead605a19b031..1771b3d425953dac0c5cacb84b007434843ed253 100644 --- a/app/classes/Framadate/Repositories/PollRepository.php +++ b/app/classes/Framadate/Repositories/PollRepository.php @@ -90,6 +90,19 @@ SELECT p.*, return $prepared->fetchAll(); } + /** + * Find all polls that are created with the given admin mail. + * + * @param string $mail Email address of the poll admin + * @return array The list of matching polls + */ + public function findAllByAdminMail($mail) { + $prepared = $this->prepare('SELECT * FROM `' . Utils::table('poll') . '` WHERE admin_mail = :admin_mail'); + $prepared->execute(array('admin_mail' => $mail)); + + return $prepared->fetchAll(); + } + /** * Get the total number of polls in databse. * diff --git a/app/classes/Framadate/Services/MailService.php b/app/classes/Framadate/Services/MailService.php index 3095869b16cecdac141e1da345ddd29543154ed4..3c445ec829463e3f04a001ad3d554cf2d0e9e8d3 100644 --- a/app/classes/Framadate/Services/MailService.php +++ b/app/classes/Framadate/Services/MailService.php @@ -34,12 +34,12 @@ class MailService { $headers = $from; $headers .= 'Reply-To: ' . ADRESSEMAILREPONSEAUTO . "\n"; $headers .= "MIME-Version: 1.0\n"; - $headers .= "Content-Type: text/plain; charset=UTF-8\n"; + $headers .= "Content-Type: text/html; charset=UTF-8\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "Auto-Submitted:auto-generated\n"; $headers .= 'Return-Path: <>'; - $body = html_entity_decode($body, ENT_QUOTES, 'UTF-8') . __('Mail', "\n--\n\n« La route est longue, mais la voie est libre… »\nFramasoft ne vit que par vos dons (déductibles des impôts).\nMerci d'avance pour votre soutien http://soutenir.framasoft.org."); + $body = html_entity_decode($body, ENT_QUOTES, 'UTF-8') . __('Mail', 'FOOTER'); mail($to, $subject, $body, $headers, $param); } diff --git a/app/classes/Framadate/Services/PollService.php b/app/classes/Framadate/Services/PollService.php index 93205b3b4c7f50cf6c25d60010c41c8e266eddac..e28d258dfc19f1d083e32f80f141926fb30a73ed 100644 --- a/app/classes/Framadate/Services/PollService.php +++ b/app/classes/Framadate/Services/PollService.php @@ -112,6 +112,10 @@ class PollService { return array($poll_id, $admin_poll_id); } + public function findAllByAdminMail($mail) { + return $this->pollRepository->findAllByAdminMail($mail); + } + function computeBestChoices($votes) { $result = []; foreach ($votes as $vote) { diff --git a/app/inc/config.template.php b/app/inc/config.template.php index d1208ebfbd766222b77b5e2192484c8df1926fe8..3fd95aaec7dc9282d24204b36677b3697ecfade5 100644 --- a/app/inc/config.template.php +++ b/app/inc/config.template.php @@ -41,8 +41,8 @@ const MIGRATION_TABLE = 'framadate_migration'; // Table name prefix const TABLENAME_PREFIX = 'fd_'; -// Default Language using POSIX variant of BC P47 standard (choose in $ALLOWED_LANGUAGES) -const DEFAULT_LANGUAGE = 'fr_FR'; +// Default Language +const DEFAULT_LANGUAGE = 'fr'; // List of supported languages, fake constant as arrays can be used as constants only in PHP >=5.6 $ALLOWED_LANGUAGES = [ diff --git a/create_classic_poll.php b/create_classic_poll.php index 2c9d3ce7b2f66669085d6415fa47fc1ef2f8fbec..cab22073522ee075defe9deb717c35a56835283d 100644 --- a/create_classic_poll.php +++ b/create_classic_poll.php @@ -96,20 +96,20 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || ( // Send confirmation by mail if enabled if ($config['use_smtp'] === true) { - $message = __("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."); - $message .= "\n\n"; - $message .= stripslashes(html_entity_decode($_SESSION['form']->admin_name, ENT_QUOTES, "UTF-8")) . ' ' . __('hast just created a poll called') . ' : "' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)) . "\".\n"; - $message .= __('Thanks for filling the poll at the link above') . " :\n\n%s\n\n" . __('Thanks for your confidence.') . "\n" . NOMAPPLICATION; + $message = __('Mail', "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."); + $message .= '<br/><br/>'; + $message .= Utils::htmlEscape($_SESSION['form']->admin_name) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . Utils::htmlEscape($_SESSION['form']->title, ENT_QUOTES) . '".<br/>'; + $message .= __('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/>%s<br/><br/>' . __('Mail', 'Thanks for your confidence.') . '<br/>' . NOMAPPLICATION; - $message_admin = __("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"); - $message_admin .= " :\n\n" . "%s \n\n" . __('Thanks for your confidence.') . "\n" . NOMAPPLICATION; + $message_admin = __('Mail', "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"); + $message_admin .= ' :<br/><br/>%s<br/><br/>' . __('Mail', 'Thanks for your confidence.') . '<br/>' . NOMAPPLICATION; $message = sprintf($message, Utils::getUrlSondage($poll_id)); $message_admin = sprintf($message_admin, Utils::getUrlSondage($admin_poll_id, true)); if ($mailService->isValidEmail($_SESSION['form']->admin_mail)) { - $mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Author\'s message') . '] ' . __('Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message_admin); - $mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('For sending to the polled users') . '] ' . __('Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message); + $mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ' : ' . Utils::htmlEscape($_SESSION['form']->title), $message_admin); + $mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ' : ' . Utils::htmlEscape($_SESSION['form']->title), $message); } } diff --git a/create_date_poll.php b/create_date_poll.php index 8960962b5ead019b8761a0cf63945d8232dd697e..75d6ec933076afb34b4b8e0a7865dd8aac0a02ad 100644 --- a/create_date_poll.php +++ b/create_date_poll.php @@ -95,19 +95,19 @@ if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) || // Send confirmation by mail if enabled if ($config['use_smtp'] === true) { $message = __('Mail', "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."); - $message .= "\n\n"; - $message .= stripslashes(html_entity_decode($_SESSION['form']->admin_name, ENT_QUOTES, 'UTF-8')) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)) . "\".\n"; - $message .= __('Mail', 'Thanks for filling the poll at the link above') . " :\n\n%s\n\n" . __('Mail', 'Thanks for your confidence.') . "\n" . NOMAPPLICATION; + $message .= '<br/><br/>'; + $message .= Utils::htmlEscape($_SESSION['form']->admin_name) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . Utils::htmlEscape($_SESSION['form']->title) . '".<br/>'; + $message .= __('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/>%s<br/><br/>' . __('Mail', 'Thanks for your confidence.') . '<br/>' . NOMAPPLICATION; $message_admin = __('Mail', "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"); - $message_admin .= " :\n\n" . "%s \n\n" . __('Mail', 'Thanks for your confidence.') . "\n" . NOMAPPLICATION; + $message_admin .= ' :<br/><br/>%s<br/><br/>' . __('Mail', 'Thanks for your confidence.') . '<br/>' . NOMAPPLICATION; $message = sprintf($message, Utils::getUrlSondage($poll_id)); $message_admin = sprintf($message_admin, Utils::getUrlSondage($admin_poll_id, true)); if ($mailService->isValidEmail($_SESSION['form']->admin_mail)) { - $mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message_admin); - $mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ' : ' . stripslashes(htmlspecialchars_decode($_SESSION['form']->title, ENT_QUOTES)), $message); + $mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ' : ' . Utils::htmlEscape($_SESSION['form']->title), $message_admin); + $mailService->send($_SESSION['form']->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ' : ' . Utils::htmlEscape($_SESSION['form']->title), $message); } } diff --git a/find_polls.php b/find_polls.php new file mode 100644 index 0000000000000000000000000000000000000000..e3ca6dd9dbd5dd34a1517f7d63ac5e96f3b377a0 --- /dev/null +++ b/find_polls.php @@ -0,0 +1,60 @@ +<?php +/** + * This software is governed by the CeCILL-B license. If a copy of this license + * is not distributed with this file, you can obtain one at + * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt + * + * Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ + * Authors of Framadate/OpenSondate: Framasoft (https://github.com/framasoft) + * + * ============================= + * + * Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence + * ne se trouve pas avec ce fichier vous pouvez l'obtenir sur + * http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt + * + * Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ + * Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft) + */ + +use Framadate\Message; +use Framadate\Services\LogService; +use Framadate\Services\MailService; +use Framadate\Services\PollService; + +include_once __DIR__ . '/app/inc/init.php'; + +/* SERVICES */ +/* -------- */ +$logService = new LogService(); +$pollService = new PollService($connect, $logService); +$mailService = new MailService($config['use_smtp']); + +/* PAGE */ +/* ---- */ +$message = null; + +if (!empty($_POST['mail'])) { + $mail = filter_input(INPUT_POST, 'mail', FILTER_VALIDATE_EMAIL); + if ($mail) { + $polls = $pollService->findAllByAdminMail($mail); + + if (count($polls) > 0) { + $smarty->assign('polls', $polls); + $body = $smarty->fetch('mail/find_polls.tpl'); + + $mailService->send($mail, __('Homepage', 'Where are my polls'), $body); + $message = new Message('success', __('FindPolls', 'Polls sent')); + } else { + $message = new Message('warning', __('Error', 'No polls found')); + } + } else { + $message = new Message('danger', __('Error', 'Something is wrong with the format')); + } +} + + +$smarty->assign('title', __('Homepage', 'Where are my polls')); +$smarty->assign('message', $message); + +$smarty->display('find_polls.tpl'); diff --git a/images/question.png b/images/question.png new file mode 100644 index 0000000000000000000000000000000000000000..73d1d94803366747773dd6e0a1f9e5fc6201cbcb Binary files /dev/null and b/images/question.png differ diff --git a/locale/de.json b/locale/de.json index eceb45f8322d101cce676e36a2de4f7ea659ca53..e9666ced67ef95468bb45d2ad6a7837984a49306 100644 --- a/locale/de.json +++ b/locale/de.json @@ -35,7 +35,8 @@ "seconds": "Sekunden", "Choice": "Wahl", "Link": "Link", - "Search": "Suche" + "Search": "Suche", + "Creation date:": "Erstellungsdatum:" }, "Date": { "dd/mm/yyyy": "jj/mm/aaaa", @@ -52,7 +53,8 @@ }, "Homepage": { "Schedule an event": "Termin finden", - "Make a classic poll": "Klassische Umfrage" + "Make a classic poll": "Klassische Umfrage", + "Where are my polls": "Wo sind meine Umfragen" }, "Maintenance": { "The application": "die Anwendung", @@ -116,11 +118,11 @@ "Votes and comments are locked": "Abstimmungen und Kommentare sind gesperrt", "Votes and comments are open": "Abstimmungen und Kommentare sind möglich", "Votes are editable": "Die Abstimmungen können geändert werden", - "Votes are editable solely by their owner.": "DE_Les votes sont modifiables uniquement par leur créateur", + "Votes are editable solely by their owner.": "Stimmen sind nur editierbar von ihrem Eigentümer", "Save the new rules": "Neue Regeln speichern", "Cancel the rules edit": "Neue Regeln nicht speichern", - "Results are hidden.": "DE_Les résultats sont cachés.", - "Results are visible.": "DE_Les résultats sont visibles." + "Results are hidden.": "Ergebnisse werden ausgeblendet.", + "Results are visible.": "Ergebnisse sind sichtbar." }, "Poll results": { "Votes of the poll": "Abstimmungen der Umfrage ", @@ -278,19 +280,24 @@ "polls in the database at this time": "Umfragen derzeit in der Datenbank", "Purge the polls": "TRANSLATE_ Purge the polls" }, + "FindPolls": { + "Here are your polls": "Hier sind Ihre Umfragen", + "Send me my polls": "Senden Sie mir mein Umfragen", + "Polls sent": "Umfragen geschickt" + }, "Mail": { "Poll's participation": "Beteiligung an der Umfrage", - "filled a vote.\nYou can find your poll at the link": "füllte eine Stimme.\nSie können Ihre Umfrage unter dem Link zu finden", - "updated a vote.\nYou can find your poll at the link": "eine Abstimmung regelmäßig aktualisiert.\nSie können Ihre Umfrage unter dem Link zu finden", - "wrote a comment.\nYou can find your poll at the link": "hat einen Kommentar. Sie können Ihre Umfrage unter dem Link zu finden", + "filled a vote.\nYou can find your poll at the link": "füllte eine Stimme.<br/>Sie können Ihre Umfrage unter dem Link zu finden", + "updated a vote.\nYou can find your poll at the link": "eine Abstimmung regelmäßig aktualisiert.<br/>Sie können Ihre Umfrage unter dem Link zu finden", + "wrote a comment.\nYou can find your poll at the link": "hat einen Kommentar.<br/>Sie können Ihre Umfrage unter dem Link zu finden", "Thanks for your confidence.": "Danke für Ihr Vertrauen.", - "\n--\n\n« La route est longue, mais la voie est libre… »\nFramasoft ne vit que par vos dons (déductibles des impôts).\nMerci d'avance pour votre soutien http://soutenir.framasoft.org.": "", + "FOOTER": "", "[ADMINISTRATOR] New settings for your poll": "[ADMINISTRATOR] Neue Einstellungen für Ihre Umfrage ", - "You have changed the settings of your poll. \nYou can modify this poll with this link": "Sie haben die Einstellungen Ihrer Umfrage verändert.\nSie können diese Umfrage mit diesem Link ändern", - "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.": "Dies ist die Botschaft, die Sie zu den Menschen, die Sie abfragen möchten senden.\nNun haben Sie diese Nachricht an alle, die Sie abfragen möchten senden.", + "You have changed the settings of your poll. \nYou can modify this poll with this link": "Sie haben die Einstellungen Ihrer Umfrage verändert.<br/>Sie können diese Umfrage mit diesem Link ändern", + "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.": "Dies ist die Botschaft, die Sie zu den Menschen, die Sie abfragen möchten senden.<br/>Nun haben Sie diese Nachricht an alle, die Sie abfragen möchten senden.", "hast just created a poll called": " hat eine Umfrage erstellt - Name folgt: ", "Thanks for filling the poll at the link above": "Danke, dass Sie die Umfrage unter dem obrigen Link ausgefüllt haben", - "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": "Diese Meldung sollte nicht auf die befragten Personen gesendet werden. Es ist privat für die Umfrage Schöpfer.\n\nSie können nun ändern sie unter dem Link oben", + "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": "Diese Meldung sollte nicht auf die befragten Personen gesendet werden. Es ist privat für die Umfrage Schöpfer.<br/><br/>Sie können nun ändern sie unter dem Link oben", "Author's message": "Nachricht vom Autor ", "For sending to the polled users": "Nachricht für die Teilnehmer" }, @@ -301,6 +308,7 @@ "Something is wrong with the format": "Something is wrong with the format", "Enter an email address": "Sie müssen eine E-Mail-Adresse eingeben", "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "Die Adresse ist nicht korrekt! Sie sollten eine funktionierende E-Mail-Adresse angeben, um den Link zu ihrer Umfrage zu erhalten", + "No polls found": "Keine Umfragen gefunden", "There is a problem with your choices": "Es gibt ein Problem mit der Auswahl", "You haven't filled the first section of the poll creation.": "Sie haben den ersten Teil der Umfrageerstellung nicht ausgefüllt.", "Javascript is disabled on your browser. Its activation is required to create a poll.": "Javascript ist in Ihrem Browser deaktiviert. Seine Aktivierung ist erforderlich, um eine Umfrage zu erstellen.", @@ -316,6 +324,6 @@ "Update vote failed": "Update vote failed", "Adding vote failed": "Adding vote failed", "Comment failed": "Kommentar gescheitert", - "You can't create a poll with hidden results with the following edition option:": "DE_Vous ne pouvez pas créer de sondage avec résulats cachés avec les options d'éditions suivantes : " + "You can't create a poll with hidden results with the following edition option:": "Sie können nicht eine Umfrage erstellen mit versteckten Ergebnisse mit der folgenden Ausgabe-Option:" } } diff --git a/locale/en.json b/locale/en.json index 34b76f9cf1faf7bac0897a343d7a5741fd953d82..c6073942886ffb6151ee4fb7a71b60e10cb32914 100644 --- a/locale/en.json +++ b/locale/en.json @@ -35,7 +35,8 @@ "seconds": "seconds", "Choice": "Choice", "Link": "Link", - "Search": "Search" + "Search": "Search", + "Creation date:": "Creation date:" }, "Date" : { "dd/mm/yyyy": "jj/mm/aaaa", @@ -48,7 +49,8 @@ }, "Language selector": { "Select the language": "Select the language", - "Change the language": "Change the language" + "Change the language": "Change the language", + "Where are my polls": "Where are my polls" }, "Maintenance": { "The application": "The application", @@ -278,19 +280,24 @@ "polls in the database at this time": "polls in the database at this time", "Purge the polls": "Purge the polls" }, + "FindPolls": { + "Here are your polls": "Here are your polls", + "Send me my polls": "Send me my polls", + "Polls sent": "Polls sent" + }, "Mail" : { "Poll's participation": "Poll's participation", - "filled a vote.\nYou can find your poll at the link": "filled a vote.\nYou can find your poll at the link", - "updated a vote.\nYou can find your poll at the link": "updated a vote.\nYou can find your poll at the link", - "wrote a comment.\nYou can find your poll at the link": "wrote a comment.\nYou can find your poll at the link", + "filled a vote.\nYou can find your poll at the link": "filled a vote.<br/>You can find your poll at the link", + "updated a vote.\nYou can find your poll at the link": "updated a vote.<br/>You can find your poll at the link", + "wrote a comment.\nYou can find your poll at the link": "wrote a comment.<br/>You can find your poll at the link", "Thanks for your confidence.": "Thanks for your confidence.", - "\n--\n\n« La route est longue, mais la voie est libre… »\nFramasoft ne vit que par vos dons (déductibles des impôts).\nMerci d'avance pour votre soutien http://soutenir.framasoft.org.": "\n\n\n\n", + "FOOTER": "", "[ADMINISTRATOR] New settings for your poll": "[ADMINISTRATOR] New settings for your poll", - "You have changed the settings of your poll. \nYou can modify this poll with this link": "You have changed the settings of your poll. \nYou can modify this poll with this link", - "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.":"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.", + "You have changed the settings of your poll. \nYou can modify this poll with this link": "You have changed the settings of your poll.<br/>You can modify this poll with this link", + "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.":"This is the message you have to send to the people you want to poll.<br/>Now, you have to send this message to everyone you want to poll.", "hast just created a poll called": "has just created a poll called", "Thanks for filling the poll at the link above": "Thanks for filling the poll at the link above", - "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": "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", + "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": "This message should NOT be sent to the polled people. It is private for the poll's creator.<br/><br/>You can now modify it at the link above", "Author's message": "Author's message", "For sending to the polled users": "For sending to the polled users" }, @@ -301,6 +308,7 @@ "Something is wrong with the format": "Something is wrong with the format", "Enter an email address": "Enter an email address", "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.", + "No polls found": "No polls found", "There is a problem with your choices": "There is a problem with your choices", "You haven't filled the first section of the poll creation.": "You haven't filled the first section of the poll creation.", "Javascript is disabled on your browser. Its activation is required to create a poll.": "Javascript is disabled on your browser. Its activation is required to create a poll.", diff --git a/locale/es.json b/locale/es.json index df9febf64c096ee7360c621f9a741a3b9c621586..4ba1206071452581929d05574e85d5faba2774d3 100644 --- a/locale/es.json +++ b/locale/es.json @@ -35,7 +35,8 @@ "seconds": "ES_secondes", "Choice": "Opciòn", "Link": "ES_Lien", - "Search": "Búsqueda" + "Search": "Búsqueda", + "Creation date:": "ES_Date de création :" }, "Date": { "dd/mm/yyyy": "ES_jj/mm/aaaa", @@ -52,7 +53,8 @@ }, "Homepage": { "Schedule an event": "Encuesta para planificar un evento", - "Make a classic poll": "ES_Créer un sondage classique" + "Make a classic poll": "ES_Créer un sondage classique", + "Where are my polls": "ES_Où sont mes sondages" }, "Maintenance": { "The application": "ES_L'application", @@ -278,19 +280,24 @@ "polls in the database at this time": "encuestas en la basa por el momento", "Purge the polls": "ES_Purger les sondages" }, + "FindPolls": { + "Here are your polls": "ES_Voici tes sondages", + "Send me my polls": "ES_Envoyer mes sondages", + "Polls sent": "ES_Sondages envoyés" + }, "Mail": { "Poll's participation": "ES_Participation au sondage", - "filled a vote.\nYou can find your poll at the link": "ES_vient de voter.\nVous pouvez retrouver votre sondage avec le lien suivant", - "updated a vote.\nYou can find your poll at the link": "ES_vient de mettre à jour un vote.\nVous pouvez retrouver votre sondage avec le lien suivant", - "wrote a comment.\nYou can find your poll at the link": "ES_vient de rédiger un commentaire.\nVous pouvez retrouver votre sondage avec le lien suivant", + "filled a vote.\nYou can find your poll at the link": "ES_vient de voter.<br/>Vous pouvez retrouver votre sondage avec le lien suivant", + "updated a vote.\nYou can find your poll at the link": "ES_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": "ES_vient de rédiger un commentaire.<br/>Vous pouvez retrouver votre sondage avec le lien suivant", "Thanks for your confidence.": "ES_Merci de votre confiance.", - "\n--\n\n« La route est longue, mais la voie est libre… »\nFramasoft ne vit que par vos dons (déductibles des impôts).\nMerci d'avance pour votre soutien http://soutenir.framasoft.org.": "ES_\n--\n\n« La route est longue, mais la voie est libre… »\nFramasoft ne vit que par vos dons (déductibles des impôts).\nMerci d'avance pour votre soutien http://soutenir.framasoft.org.", + "FOOTER": "", "[ADMINISTRATOR] New settings for your poll": "ES_[ADMINISTRATEUR] Changement de configuration du sondage", - "You have changed the settings of your poll. \nYou can modify this poll with this link": "ES_Vous avez modifié la configuration de votre sondage. \nVous 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.": "ES_Ceci est le message qui doit être envoyé aux sondés. \nVous pouvez maintenant transmettre ce message à toutes les personnes susceptibles de participer au vote.", + "You have changed the settings of your poll. \nYou can modify this poll with this link": "ES_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.": "ES_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.", "hast just created a poll called": "ES_ vient de créer un sondage intitulé ", "Thanks for filling the poll at the link above": "ES_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": "ES_Ce message ne doit PAS être diffusé aux sondés. Il est réservé à l'auteur du sondage.\n\nVous pouvez modifier ce 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": "ES_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": "Reservado al autor", "For sending to the polled users": "ES_Pour diffusion aux sondés" }, @@ -301,6 +308,7 @@ "Something is wrong with the format": "Something is wrong with the format", "Enter an email address": "Introduzca una dirección electrónica", "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "ES_L'adresse saisie n'est pas correcte ! Il faut une adresse électronique valide (par exemple r.stallman@outlock.com) pour recevoir le lien vers le sondage.", + "No polls found": "ES_Aucun sondage n'a été trouvé", "There is a problem with your choices": "ES_Il y a un problème avec vos choix", "You haven't filled the first section of the poll creation.": "Usted no habia llenado la primera pagina dela encuesta", "Javascript is disabled on your browser. Its activation is required to create a poll.": "ES_Javascript est désactivé sur votre navigateur. Son activation est requise pour la création d'un sondage.", diff --git a/locale/fr.json b/locale/fr.json index f60c445b148262607fddc57f28c19e92c661ea07..674abf8ebb53a551d888812a45de6df748389628 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -35,7 +35,8 @@ "seconds": "secondes", "Choice": "Choix", "Link": "Lien", - "Search": "Chercher" + "Search": "Chercher", + "Creation date:": "Date de création :" }, "Date": { "dd/mm/yyyy": "jj/mm/aaaa", @@ -52,7 +53,8 @@ }, "Homepage": { "Schedule an event": "Créer un sondage spécial dates", - "Make a classic poll": "Créer un sondage classique" + "Make a classic poll": "Créer un sondage classique", + "Where are my polls": "Où sont mes sondages" }, "Maintenance": { "The application": "L'application", @@ -278,19 +280,24 @@ "polls in the database at this time": "sondages dans la base actuellement", "Purge the polls": "Purger les sondages" }, + "FindPolls": { + "Here are your polls": "Voici tes sondages", + "Send me my polls": "Envoyer mes sondages", + "Polls sent": "Sondages envoyés" + }, "Mail": { "Poll's participation": "Participation au sondage", - "filled a vote.\nYou can find your poll at the link": "vient de voter.\nVous 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.\nVous 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.\nVous pouvez retrouver votre sondage avec le lien suivant", + "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", "Thanks for your confidence.": "Merci de votre confiance.", - "\n--\n\n« La route est longue, mais la voie est libre… »\nFramasoft ne vit que par vos dons (déductibles des impôts).\nMerci d'avance pour votre soutien http://soutenir.framasoft.org.": "\n--\n\n« La route est longue, mais la voie est libre… »\nFramasoft ne vit que par vos dons (déductibles des impôts).\nMerci d'avance pour votre soutien http://soutenir.framasoft.org.", + "FOOTER": "<hr/><br/>« 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. \nVous 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. \nVous pouvez maintenant transmettre ce message à toutes les personnes susceptibles de participer au vote.", + "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.", "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.\n\nVous pouvez modifier ce 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" }, @@ -301,6 +308,7 @@ "Something is wrong with the format": "Quelque chose ne va pas avec le format", "Enter an email address": "Il faut saisir une adresse électronique !", "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "L'adresse saisie n'est pas correcte ! Il faut une adresse électronique valide (par exemple r.stallman@outlock.com) pour recevoir le lien vers le sondage.", + "No polls found": "Aucun sondage n'a été trouvé", "There is a problem with your choices": "Il y a un problème avec vos choix", "You haven't filled the first section of the poll creation.": "Vous n'avez pas renseigné la première page du sondage", "Javascript is disabled on your browser. Its activation is required to create a poll.": "Javascript est désactivé sur votre navigateur. Son activation est requise pour la création d'un sondage.", diff --git a/tpl/find_polls.tpl b/tpl/find_polls.tpl new file mode 100644 index 0000000000000000000000000000000000000000..33c1b531670c7fea90a49f896def321f4ffdc512 --- /dev/null +++ b/tpl/find_polls.tpl @@ -0,0 +1,25 @@ +{extends file='page.tpl'} + +{block name=main} + {if !empty($message)} + <div class="alert alert-dismissible alert-{$message->type|html}" role="alert">{$message->message|html}{if $message->link != null}<br/><a href="{$message->link}">{$message->link}</a>{/if}<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button></div> + {/if} + <form action="" method="post"> + <div class="row"> + <div class="col-md-6 col-md-offset-3 text-center"> + <div class="form-group"> + <div class="input-group"> + <label for="mail" class="input-group-addon">{__('Generic', 'Your email address')}</label> + <input type="email" class="form-control" id="mail" name="mail" autofocus> + </div> + </div> + </div> + <div class="col-md-6 col-md-offset-3 text-center"> + <button type="submit" class="btn btn-warning btn-lg"> + <span class="glyphicon glyphicon-search"></span> + {__('FindPolls', 'Send me my polls')} + </button> + </div> + </div> + </form> +{/block} diff --git a/tpl/index.tpl b/tpl/index.tpl index c7b20a5beb7849cc744d31bde728713a3b7f68e1..815938c2e942d65fd7a08261daae011559b82454 100644 --- a/tpl/index.tpl +++ b/tpl/index.tpl @@ -26,6 +26,18 @@ </a> </p> </div> + <div class="col-md-6 col-md-offset-3 text-center"> + <p class="home-choice"> + <a href="{$SERVER_URL}find_polls.php" class="opacity" role="button"> + <img alt="" class="img-responsive center-block" src="{'images/question.png'|resource}"/> + <br/> + <span class="btn btn-warning btn-lg"> + <span class="glyphicon glyphicon-search"></span> + {__('Homepage', 'Where are my polls')} + </span> + </a> + </p> + </div> </div> <hr role="presentation"/> <div class="row"> diff --git a/tpl/mail/find_polls.tpl b/tpl/mail/find_polls.tpl new file mode 100644 index 0000000000000000000000000000000000000000..478561b0be3b86d7884b8e284d0e187ff58033ab --- /dev/null +++ b/tpl/mail/find_polls.tpl @@ -0,0 +1,9 @@ +<h1>{__('FindPolls', 'Here are your polls')}</h1> +<ul> + {foreach $polls as $poll} + <li> + <a href="{poll_url id=$poll->admin_id admin=true}">{$poll->title|html}</a> + ({__('Generic', 'Creation date:')} {$poll->creation_date|date_format:$date_format['txt_full']}) + </li> + {/foreach} +</ul> \ No newline at end of file