-
';
+ echo '
diff --git a/install/install.mysql.sql b/install/install.mysql.sql
index c873a75..aa0354c 100644
--- a/install/install.mysql.sql
+++ b/install/install.mysql.sql
@@ -1,100 +1,112 @@
--- Base de données: `opensondage`
+-- --------------------------------------------------------
+
--
+-- Table structure `poll`
+--
+
+CREATE TABLE IF NOT EXISTS `poll` (
+ `id` CHAR(16) NOT NULL,
+ `admin_id` CHAR(24) NOT NULL,
+ `title` TEXT NOT NULL,
+ `description` TEXT,
+ `admin_name` VARCHAR(64) DEFAULT NULL,
+ `admin_mail` VARCHAR(128) DEFAULT NULL,
+ `creation_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `end_date` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `format` VARCHAR(1) DEFAULT NULL,
+ `editable` TINYINT(1) DEFAULT '0',
+ `receiveNewVotes` TINYINT(1) DEFAULT '0',
+ `active` TINYINT(1) DEFAULT '1',
+ PRIMARY KEY (`id`)
+)
+ ENGINE = InnoDB
+ DEFAULT CHARSET = utf8;
-- --------------------------------------------------------
--
--- Structure de la table `comments`
+-- Table structure `slot`
--
-CREATE TABLE IF NOT EXISTS `comments` (
- `id_comment` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `id_sondage` char(16) NOT NULL,
- `comment` text NOT NULL,
- `usercomment` text,
- PRIMARY KEY (`id_comment`),
- KEY `id_sondage` (`id_sondage`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS `slot` (
+ `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `poll_id` CHAR(16) NOT NULL,
+ `title` TEXT,
+ `moments` TEXT,
+ PRIMARY KEY (`id`),
+ KEY `poll_id` (`poll_id`)
+)
+ ENGINE = InnoDB
+ DEFAULT CHARSET = utf8;
-- --------------------------------------------------------
--
--- Structure de la table `sondage`
+-- Table structure `comment`
--
-CREATE TABLE IF NOT EXISTS `sondage` (
- `id_sondage` char(16) NOT NULL,
- `commentaires` text,
- `mail_admin` varchar(128) DEFAULT NULL,
- `nom_admin` varchar(64) DEFAULT NULL,
- `titre` text,
- `id_sondage_admin` char(24) DEFAULT NULL,
- `date_creation` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `date_fin` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `format` varchar(2) DEFAULT NULL,
- `mailsonde` tinyint(1) DEFAULT '0',
- `statut` int(11) NOT NULL DEFAULT '1' COMMENT '1 = actif ; 0 = inactif ; ',
- UNIQUE KEY `id_sondage` (`id_sondage`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS `comment` (
+ `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `poll_id` CHAR(16) NOT NULL,
+ `name` TEXT,
+ `comment` TEXT NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `poll_id` (`poll_id`)
+)
+ ENGINE = InnoDB
+ DEFAULT CHARSET = utf8;
-- --------------------------------------------------------
--
--- Structure de la table `sujet_studs`
+-- Table structure `vote`
--
-CREATE TABLE IF NOT EXISTS `sujet_studs` (
- `id_sondage` char(16) NOT NULL,
- `sujet` text,
- KEY `id_sondage` (`id_sondage`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS `vote` (
+ `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `poll_id` CHAR(16) NOT NULL,
+ `name` VARCHAR(64) NOT NULL,
+ `choices` TEXT NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `poll_id` (`poll_id`)
+)
+ ENGINE = InnoDB
+ DEFAULT CHARSET = utf8;
--- --------------------------------------------------------
--
--- Structure de la table `user_studs`
+-- Data for Name: poll; Type: TABLE DATA;
--
-CREATE TABLE IF NOT EXISTS `user_studs` (
- `id_users` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `nom` varchar(64) NOT NULL,
- `id_sondage` char(16) NOT NULL,
- `reponses` text NOT NULL,
- PRIMARY KEY (`id_users`),
- KEY `id_sondage` (`id_sondage`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=160284 ;
-
-
-
-INSERT INTO `sondage`
-(`id_sondage`, `commentaires`, `mail_admin`, `nom_admin`,
- `titre`, `id_sondage_admin`,
- `date_fin`, `format`)
+INSERT INTO `poll`
+(`id`, `description`, `admin_mail`, `admin_name`, `title`, `admin_id`, `end_date`, `format`)
VALUES
-('aqg259dth55iuhwm','Repas de Noel du service','Stephanie@retaillard.com','Stephanie',
- 'Repas de Noel','aqg259dth55iuhwmy9d8jlwk',
- FROM_UNIXTIME('1627100361'),'D+');
+ ('aqg259dth55iuhwm', 'Repas de Noel du service', 'Stephanie@retaillard.com', 'Stephanie', 'Repas de Noel',
+ 'aqg259dth55iuhwmy9d8jlwk', FROM_UNIXTIME('1627100361'), 'D');
--
--- Data for Name: sujet_studs; Type: TABLE DATA;
+-- Data for Name: slot; Type: TABLE DATA;
--
-INSERT INTO `sujet_studs` (`id_sondage`, `sujet`) VALUES
-('aqg259dth55iuhwm','1225839600@12h,1225839600@19h,1226012400@12h,1226012400@19h,1226876400@12h,1226876400@19h,1227049200@12h,1227049200@19h,1227826800@12h,1227826800@19h');
+INSERT INTO `slot` (`poll_id`, `title`, `moments`) VALUES
+ ('aqg259dth55iuhwm', '1225839600', '12h,19h'),
+ ('aqg259dth55iuhwm', '1226012400', '12h,19h'),
+ ('aqg259dth55iuhwm', '1226876400', '12h,19h'),
+ ('aqg259dth55iuhwm', '1227826800', '12h,19h');
--
--- Data for Name: user_studs; Type: TABLE DATA;
+-- Data for Name: vote; Type: TABLE DATA;
--
-INSERT INTO `user_studs` (`nom`, `id_sondage`, `reponses`, `id_users`) VALUES
-('marcel','aqg259dth55iuhwm','0110111101','933'),
-('paul','aqg259dth55iuhwm','1011010111','935'),
-('sophie','aqg259dth55iuhwm','1110110000','945'),
-('barack','aqg259dth55iuhwm','0110000','948'),
-('takashi','aqg259dth55iuhwm','0000110100','951'),
-('albert','aqg259dth55iuhwm','1010110','975'),
-('alfred','aqg259dth55iuhwm','0110010','1135'),
-('marcs','aqg259dth55iuhwm','0100001010','1143'),
-('laure','aqg259dth55iuhwm','0011000','1347'),
-('benda','aqg259dth55iuhwm','1101101100','1667'),
-('Albert','aqg259dth55iuhwm','1111110011','1668');
+INSERT INTO `vote` (`name`, `poll_id`, `choices`) VALUES
+ ('marcel', 'aqg259dth55iuhwm', '02202222'),
+ ('paul', 'aqg259dth55iuhwm', '20220202'),
+ ('sophie', 'aqg259dth55iuhwm', '22202200'),
+ ('barack', 'aqg259dth55iuhwm', '02200000'),
+ ('takashi', 'aqg259dth55iuhwm', '00002202'),
+ ('albert', 'aqg259dth55iuhwm', '20202200'),
+ ('alfred', 'aqg259dth55iuhwm', '02200200'),
+ ('marcs', 'aqg259dth55iuhwm', '02000020'),
+ ('laure', 'aqg259dth55iuhwm', '00220000'),
+ ('benda', 'aqg259dth55iuhwm', '22022022'),
+ ('albert', 'aqg259dth55iuhwm', '22222200');
diff --git a/js/core.js b/js/core.js
index 329885f..19cd395 100644
--- a/js/core.js
+++ b/js/core.js
@@ -1,6 +1,6 @@
$(document).ready(function() {
var lang = $('html').attr('lang');
-
+
// Datepicker
var framadatepicker = function() {
$('.input-group.date').datepicker({
@@ -32,25 +32,13 @@ $(document).ready(function() {
var datepickerfocus = false; // a11y : datepicker not display on focus until there is one click on the button
- var lastDate = new Date();
-
+
$(document).on('click','.input-group.date .input-group-addon', function() {
datepickerfocus = true;
// Re-init datepicker config before displaying
$(this).parent().datepicker(framadatepicker());
$(this).parent().datepicker('show');
-
- // Trick to keep the last datepicker view
- if ($(this).parent().find('input').val() == '') {
- $('.input-group.date input').each(function(){
- if($(this).val()!='') {
- lastDate = $(this).val();
- }
- });
- $(this).parent().datepicker('setDate', lastDate);
- $(this).parent().datepicker('setDate', '');
- }
-
+
// Trick to refresh calendar
$('.datepicker-days .prev').trigger('click');
$('.datepicker-days .next').trigger('click');
@@ -60,9 +48,8 @@ $(document).ready(function() {
$(document).on('focus','.input-group.date input', function() {
if(datepickerfocus) {
- // unfocus and click instead (because we are not in a11y mode anymore)
- $(this).blur();
- $(this).parent().find('.input-group-addon').trigger('click');
+ $(this).parent('.input-group.date').datepicker(framadatepicker());
+ $(this).parent('.input-group.date').datepicker('show');
}
});
/**
@@ -201,17 +188,25 @@ $(document).ready(function() {
});
});
- // 1 day filled and you can submit
+ // 1 day and 2 hours or 2 days and you can submit
function SubmitDaysAvalaible() {
var nb_filled_days = 0;
+ var nb_filled_hours = 0;
$('#selected-days fieldset legend input').each(function() {
if($(this).val()!='') {
nb_filled_days++;
}
});
+ $('#selected-days .hours').each(function() {
+ if($(this).val()!='') {
+ nb_filled_hours++;
+ }
+ });
- if (nb_filled_days>0) {
+ if (nb_filled_days>1) {
+ $('button[name="choixheures"]').removeClass('disabled');
+ } else if (nb_filled_hours>1 && nb_filled_days==1) {
$('button[name="choixheures"]').removeClass('disabled');
} else {
$('button[name="choixheures"]').addClass('disabled');
@@ -223,8 +218,8 @@ $(document).ready(function() {
});
SubmitDaysAvalaible();
- // 1 days and you can remove a day or copy hours
- if($('#selected-days fieldset').length>0) {
+ // 2 days and you can remove a day or copy hours
+ if($('#selected-days fieldset').length>1) {
$('#remove-a-day, #copyhours').removeClass('disabled');
}
@@ -261,13 +256,13 @@ $(document).ready(function() {
$('.choice-field:last').remove();
var nb_choices = $('.choice-field').length;
$('#choice'+(nb_choices-1)).focus();
- if (nb_choices == 1) {
+ if (nb_choices == 2) {
$('#remove-a-choice').addClass('disabled');
};
SubmitChoicesAvalaible();
});
- // 1 choice filled and you can submit
+ // 2 choices filled and you can submit
function SubmitChoicesAvalaible() {
var nb_filled_choices = 0;
$('.choice-field input').each(function() {
@@ -275,7 +270,7 @@ $(document).ready(function() {
nb_filled_choices++;
}
});
- if(nb_filled_choices>0) {
+ if(nb_filled_choices>1) {
$('button[name="fin_sondage_autre"]').removeClass('disabled');
} else {
$('button[name="fin_sondage_autre"]').addClass('disabled');
@@ -327,6 +322,20 @@ $(document).ready(function() {
return false;
});
+ $('#name-form .btn-edit').on('click', function() {
+ $('#name-form p').hide();
+ $('.js-name').removeClass("hidden");
+ $('.js-name input').focus();
+ return false;
+ });
+
+ $('#name-form .btn-cancel').on('click', function() {
+ $('#name-form p').show();
+ $('#name-form .js-name').addClass("hidden");
+ $('#name-form .btn-edit').focus();
+ return false;
+ });
+
$('#email-form .btn-edit').on('click', function() {
$('#email-form p').hide();
$('#email-form .js-email').removeClass("hidden");
@@ -369,6 +378,20 @@ $(document).ready(function() {
return false;
});
+ $('#expiration-form .btn-edit').on('click', function() {
+ $('#expiration-form p').hide();
+ $('.js-expiration').removeClass("hidden");
+ $('.js-expiration input').focus();
+ return false;
+ });
+
+ $('#expiration-form .btn-cancel').on('click', function() {
+ $('#expiration-form p').show();
+ $('#expiration-form .js-expiration').addClass("hidden");
+ $('#expiration-form .btn-edit').focus();
+ return false;
+ });
+
// Horizontal scroll buttons
if($('.results').width() > $('.container').width()) {
$('.scroll-buttons').removeClass('hidden');
diff --git a/locale/de_DE/LC_MESSAGES/Studs.mo b/locale/de_DE/LC_MESSAGES/Studs.mo
index 3b051fc..ac83bd0 100644
Binary files a/locale/de_DE/LC_MESSAGES/Studs.mo and b/locale/de_DE/LC_MESSAGES/Studs.mo differ
diff --git a/locale/de_DE/LC_MESSAGES/Studs.po b/locale/de_DE/LC_MESSAGES/Studs.po
index 58ceb65..9a89c9a 100644
--- a/locale/de_DE/LC_MESSAGES/Studs.po
+++ b/locale/de_DE/LC_MESSAGES/Studs.po
@@ -1,677 +1,715 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: Framadate 0.8\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-10-23 20:52+0100\n"
-"PO-Revision-Date: 2014-10-23 20:52+0100\n"
-"Last-Translator: Jonathan Brielmaier\n"
-"Language-Team: Jonathan Brielmaier\n"
-"Language: German\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-Language: German\n"
-"X-Poedit-Country: GERMANY\n"
-"X-Poedit-SourceCharset: utf-8\n"
-"X-Poedit-KeywordsList: _\n"
-"X-Poedit-Basepath: /var/www/studs\n"
-"X-Poedit-SearchPath-0: .\n"
-
-########### Generic ###########
-msgid "Make your polls"
-msgstr "Eigene Umfragen erstellen"
-
-msgid "Home"
-msgstr "Home"
-
-msgid "Poll"
-msgstr "Umfrage"
-
-msgid "Save"
-msgstr "Speichern"
-
-msgid "Cancel"
-msgstr "Abbrechen"
-
-msgid "Add"
-msgstr "Hinzufügen"
-
-msgid "Remove"
-msgstr "Entfernen"
-
-msgid "Validate"
-msgstr "Bestätigen"
-
-msgid "Edit"
-msgstr "Bearbeiten"
-
-msgid "Next"
-msgstr "Weiter"
-
-msgid "Back"
-msgstr "Zurück"
-
-msgid "Close"
-msgstr "Schließen"
-
-msgid "Your name"
-msgstr "Ihr Name"
-
-msgid "Your email address"
-msgstr "Ihre E-Mail Adresse"
-
-msgid "(in the format name@mail.com)"
-msgstr "(Format: name@mail.com)"
-
-msgid "Description"
-msgstr "Beschreibung"
-
-msgid "Back to the homepage of "
-msgstr "Zurück zur Homepage von "
-
-msgid "Error!"
-msgstr "Fehler!"
-
-msgid "(dd/mm/yyyy)"
-msgstr "(tt/mm/jjjj)"
-
-msgid "dd/mm/yyyy"
-msgstr "tt/mm/jjjj"
-
-msgid "%A, den %e. %B %Y"
-msgstr "%A %e %B %Y"
-
-msgid "Expiration's date"
-msgstr "Verfallsdatum"
-
-########### Language selector ###########
-msgid "Change the language"
-msgstr "Sprache wechseln"
-
-msgid "Select the language"
-msgstr "Sprache wählen"
-
-############ Homepage ############
-msgid "Schedule an event"
-msgstr "Termin finden"
-
-msgid "Make a classic poll"
-msgstr "Klassische Umfrage"
-
-# 1st section
-msgid "What is that?"
-msgstr "Was ist das?"
-
-msgid "Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required."
-msgstr "Framadate ist ein Online-Dienst, das Ihnen hilft, Termine zu finden oder Entscheidungen schnell und einfach zu treffen. Keine Registrierung ist erforderlich. "
-
-msgid "Here is how it works:"
-msgstr "So geht es:"
-
-msgid "Make a poll"
-msgstr "Umfrage erstellen"
-
-msgid "Define dates or subjects to choose"
-msgstr "Datum- oder Auswahlmöglichkeiten definieren"
-
-msgid "Send the poll link to your friends or colleagues"
-msgstr "Link zur Umfrage an Ihre Freunde oder Kollegen schicken"
-
-msgid "Discuss and make a decision"
-msgstr "Besprechen und Entscheidung treffen"
-
-msgid "Do you want to "
-msgstr "Wollen Sie sich "
-
-msgid "view an example?"
-msgstr "einen Beispiel ansehen?"
-
-# 2nd section
-msgid "The software"
-msgstr "Die Software"
-
-msgid "Framadate was initially based on "
-msgstr "Framadate war am Anfang auf "
-
-msgid " a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft"
-msgstr " basiert, eine von der Straßburg-Universität entwickelte Software. Heutzutage wird sie von der Framasoft-Vereinigung entwickelt."
-
-msgid "This software needs javascript and cookies enabled. It is compatible with the following web browsers:"
-msgstr "Für diese Software müssen Javascript und Cookie aktiviert sein. Sie ist mit den folgenden Browsers kompatibel:"
-
-msgid "It is governed by the "
-msgstr "Sie ist lizenziert unter der "
-
-msgid "CeCILL-B license"
-msgstr "CeCILL-B Lizenz"
-
-# 3rd section
-msgid "Cultivate your garden"
-msgstr "Bestellen Sie ihren Garten"
-
-msgid "To participate in the software development, suggest improvements or simply download it, please visit "
-msgstr "Um zur Software-Entwicklung teilzunehmen, Verbesserungen vorzuschlagen oder um sie herunterzuladen, gehen Sie auf "
-
-msgid "the development site"
-msgstr "die Entwicklung-Seite"
-
-msgid "If you want to install the software for your own use and thus increase your independence, we help you on:"
-msgstr "Wenn Sie die Software für Ihre eigene Nutzung installieren möchten und Ihre Eigenständigkeit erhöhen, helfen wir Sie auf:"
-
-############## Poll ##############
-msgid "Poll administration"
-msgstr "Umfrage-Verwaltung"
-
-msgid "Legend:"
-msgstr "Legende:"
-
-# Jumbotron adminstuds.php (+ studs.php)
-msgid "Back to the poll"
-msgstr "Zurück zur Umfrage"
-
-msgid "Print"
-msgstr "Drucken"
-
-msgid "Export to CSV"
-msgstr "CSV-Export"
-
-msgid "Remove the poll"
-msgstr "Umfrage löschen"
-
-msgid "Title of the poll"
-msgstr "Titel der Umfrage"
-
-msgid "Edit the title"
-msgstr "Titel bearbeiten"
-
-msgid "Save the new title"
-msgstr "Den neuen Titel speichern"
-
-msgid "Cancel the title edit"
-msgstr "Änderung des Titels abbrechen"
-
-msgid "Initiator of the poll"
-msgstr "Ersteller der Umfrage"
-
-msgid "Email"
-msgstr "E-Mail Adresse"
-
-msgid "Edit the email adress"
-msgstr "E-Mail Adresse ändern"
-
-msgid "Save the adress email"
-msgstr "E-Mail Adresse speichern"
-
-msgid "Cancel the adress email edit"
-msgstr "Änderung der E-Mail Adresse abbrechen"
-
-msgid "Edit the description"
-msgstr "Beschreibung bearbeiten"
-
-msgid "Save the description"
-msgstr "Beschreibung speichern"
-
-msgid "Cancel the description edit"
-msgstr "Änderung der Beschreibung verwerfen"
-
-msgid "Public link of the poll"
-msgstr "Öffentlicher Link zur Umfrage"
-
-msgid "Admin link of the poll"
-msgstr "Administrator-Link der Umfrage"
-
-msgid "Poll rules"
-msgstr "Regeln der Umfrage"
-
-msgid "Edit the poll rules"
-msgstr "Regeln der Umfrage bearbeiten"
-
-msgid "Votes and comments are locked"
-msgstr "Abstimmungen und Kommentare sind gesperrt"
-
-msgid "Votes and comments are open"
-msgstr "Abstimmungen und Kommentare sind möglich"
-
-msgid "Votes are editable"
-msgstr "Die Abstimmungen können geändert werden"
-
-msgid "Save the new rules"
-msgstr "Neue Regeln speichern"
-
-msgid "Cancel the rules edit"
-msgstr "Neue Regeln nicht speichern"
-
-# Help text adminstuds.php
-msgid "As poll administrator, you can change all the lines of this poll with this button "
-msgstr "Als Administrator der Umfrage, können Sie alle Zeilen der Umfrage über diesen Button ändern "
-
-msgid " remove a column or a line with "
-msgstr " Zeile oder Spalte entfernen mit "
-
-msgid "and add a new column with "
-msgstr "und neue Spalte hinzufügen mit "
-
-msgid "Finally, you can change the informations of this poll like the title, the comments or your email address."
-msgstr "Sie können auch die Informationen dieser Umfrage wie Titel, Kommentare oder E-Mail Adresse ändern."
-
-# Help text studs.php
-msgid "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."
-msgstr "Wenn Sie bei dieser Umfrage abstimmen möchten, müssen Sie ihren Namen angeben. Wählen Sie die Optionen, die für Sie am besten passen und bestätigen Sie diese über den Plus-Button am Ende der Zeile."
-
-# Poll results
-msgid "Votes of the poll "
-msgstr "Abstimmungen der Umfrage "
-
-msgid "Remove the column"
-msgstr "Spalte entfernen"
-
-msgid "Add a column"
-msgstr "Spalte hinzufügen"
-
-msgid "Edit the line:"
-msgstr "Zeile bearbeiten:"
-
-msgid "Remove the line:"
-msgstr "Zeile entfernen:"
-
-msgid "Yes"
-msgstr "Ja"
-
-msgid "Ifneedbe"
-msgstr "Wenn notwendig"
-
-msgid ", ifneedbe"
-msgstr ", wenn notwendig"
-
-msgid "No"
-msgstr "Nein"
-
-msgid "Vote \"no\" for "
-msgstr "Stimme « nein » für "
-
-msgid "Vote \"yes\" for "
-msgstr "Stimme « ja » für "
-
-msgid "Vote \"ifneedbe\" for "
-msgstr "Stimme « Wenn notwendig » für "
-
-msgid "Save the choices"
-msgstr "Wahl speichern"
-
-msgid "Addition"
-msgstr "Hinzufügen"
-
-msgid "Best choice"
-msgstr "Bste Option"
-
-msgid "Best choices"
-msgstr "Besten Optionen"
-
-msgid "The best choice at this time is:"
-msgstr "Die beste Option ist derzeit:"
-
-msgid "The bests choices at this time are:"
-msgstr "Die beste Optionen sind derzeit:"
-
-msgid "with"
-msgstr "mit"
-
-msgid "vote"
-msgstr "Stimme"
-
-msgid "votes"
-msgstr "Stimmen"
-
-msgid "for"
-msgstr "für"
-
-msgid "Remove all the votes"
-msgstr "Alle Stimmungen löschen"
-
-msgid "Scroll to the left"
-msgstr "Links scrollen"
-
-msgid "Scroll to the right"
-msgstr "Rechts scrollen"
-
-# Comments
-msgid "Comments of polled people"
-msgstr "Kommentare von Teilnehmer"
-
-msgid "Remove the comment"
-msgstr "Kommentar entfernen"
-
-msgid "Add a comment in the poll"
-msgstr "Kommentar zur Umfrage hinzufügen"
-
-msgid "Your comment"
-msgstr "Ihr Kommentar"
-
-msgid "Send the comment"
-msgstr "Kommentar senden"
-
-msgid "anonyme"
-msgstr "anonym"
-
-msgid "Remove all the comments"
-msgstr "Alle Kommentare löschen"
-
-# Add a colum adminstuds.php
-msgid "Column's adding"
-msgstr "Spalte hinzufügen"
-
-msgid "You can add a new scheduling date to your poll."
-msgstr "Sie können zur Umfrage ein neues Datum hinzufügen."
-
-msgid "If you just want to add a new hour to an existant date, put the same date and choose a new hour."
-msgstr "Wenn Sie nur eine neue Uhrzeiteit zu einem existierenden Datum hinzufügen wollen, wählen Sie das selbe Datum und wählen Sie eine neue Zeit aus."
-
-# Remove poll adminstuds.php
-msgid "Confirm removal of your poll"
-msgstr "Löschen der Umfrage bestätigen"
-
-msgid "Remove this poll!"
-msgstr "Diese Umfrage löschen!"
-
-msgid "Keep this poll!"
-msgstr "Diese Umfrage nicht löschen!"
-
-msgid "Your poll has been removed!"
-msgstr "Ihre Umfrage wurde gelöscht!"
-
-# Errors adminstuds.php/studs
-msgid "This poll doesn't exist !"
-msgstr "Diese Umfrage existiert nicht!"
-
-msgid "Enter a name"
-msgstr "Geben Sie einen Namen ein"
-
-msgid "The name you've chosen already exist in this poll!"
-msgstr "Der von Ihnen eingegebenen Name existiert bereits in dieser Umfrage"
-
-msgid "Enter a name and a comment!"
-msgstr "Geben Sie einen Namen und ein Kommentar ein!"
-
-msgid "Failed to insert the comment!"
-msgstr "Einfügen des Kommentars gescheitert!"
-
-msgid "Characters \" ' < et > are not permitted"
-msgstr "Die Zeichen \" ' < und > sind nicht erlaubt !"
-
-msgid "The date is not correct !"
-msgstr "Das Datum ist nicht korrekt!"
-
-########### Step 1 ###########
-# Step 1 info_sondage.php
-msgid "Poll creation (1 on 3)"
-msgstr "Umfrage erstellen (1 von 3)"
-
-msgid "Framadate is not properly installed, please check the 'INSTALL' to setup the database before continuing."
-msgstr "Framadate ist nicht richtig installiert, lesen Sie 'INSTALL' um die Datenbank aufzusetzen bevor es weiter geht."
-
-msgid "You are in the poll creation section."
-msgstr "Sie können hier Umfragen erstellen"
-
-msgid "Required fields cannot be left blank."
-msgstr "Mit * markierte Felder müssen ausgefüllt sein."
-
-msgid "Poll title"
-msgstr "Umfragetitel"
-
-msgid "Voters can modify their vote themselves."
-msgstr "Teilnehmer können ihre Antworten verändern"
-
-msgid "To receive an email for each new vote."
-msgstr "Bei jeder neuen Abstimmung eine E-Mail erhalten."
-
-msgid "Go to step 2"
-msgstr "Weiter zum 2. Schritt"
-
-# Errors info_sondage.php
-msgid "Enter a title"
-msgstr "Titel eingeben"
-
-msgid "Characters < > and \" are not permitted"
-msgstr "Die Zeichen < > und \" sind nicht erlaubt !"
-
-msgid "Enter an email address"
-msgstr "Sie müssen eine E-Mail Adresse eingeben"
-
-msgid "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."
-msgstr "Die Adresse ist nicht korrekt! Sie sollten eine funktionierende E-Mail Adresse angeben, um den Link zu ihrer Umfrage zu erhalten"
-
-# Error choix_date.php/choix_autre.php
-msgid "You haven't filled the first section of the poll creation."
-msgstr "Sie haben den ersten Teil der Umfrageerstellung nicht ausgefüllt."
-
-msgid "Back to step 1"
-msgstr "Zurück zum 1. Schritt"
-
-########### Step 2 ###########
-# Step 2 choix_date.php
-msgid "Poll dates (2 on 3)"
-msgstr "Umfragedaten (2 von 3)"
-
-msgid "Choose the dates of your poll"
-msgstr "Wählen Sie Terminmöglichkeiten für Ihre Umfrage"
-
-msgid "To schedule an event, it's better to propose at least two choices (two hours for one day or two days)."
-msgstr "Um eine Umfrage für einen Termin zu erstellen, müssen Sie mindestens zwei Auswahlmöglichkeiten angeben (zwei verschiedene Zeiten an einem Tag oder zwei Tage)."
-
-msgid "You can add or remove additionnal days and hours with the buttons"
-msgstr "Sie können weitere Tage und Uhrzeiten über diesen Button hinzufügen oder entfernen"
-
-msgid "For each selected day, you can choose, or not, meeting hours (e.g.: \"8h\", \"8:30\", \"8h-10h\", \"evening\", etc.)"
-msgstr "Sie können (müssen aber nicht), für jeden ausgewählten Tage, Zeiten für den Termin (z.B. \"8h\", \"8:30\", \"8-10Uhr\", \"Abends\", etc.) angeben."
-
-msgid "Day"
-msgstr "Tag"
-
-msgid "Time"
-msgstr "Uhrzeit"
-
-msgid "Remove an hour"
-msgstr "Eine Uhrzeit entfernen"
-
-msgid "Add an hour"
-msgstr "Eine Uhrzeit hinzufügen"
-
-msgid "Copy hours of the first day"
-msgstr "Uhrzeiten des ersten Tags kopieren"
-
-msgid "Remove a day"
-msgstr "Einen Tag entfernen"
-
-msgid "Add a day"
-msgstr "Einen Tag hinzufügen"
-
-msgid "Remove all days"
-msgstr "Alle Tage entfernen"
-
-msgid "Remove all hours"
-msgstr "Alle Uhrzeiten entfernen"
-
-# Step 2 choix_autre.php
-msgid "Poll subjects (2 on 3)"
-msgstr "Umfragethemen (2 von 3)"
-
-msgid "To make a generic poll, it's better to propose at least two choices between differents subjects."
-msgstr "Um eine allgemeine Umfrage zu erstellen, benötigen Sie mindestens zwei Auswahlmöglichkeiten zwischen verschiedenen Themen."
-
-msgid "You can add or remove additional choices with the buttons"
-msgstr "Sie können über den Button zusätzliche Auswahlmöglichkeiten hinzufügen oder entfernen"
-
-msgid "It's possible to propose links or images by using "
-msgstr "Es besteht die Möglichkeit, Links oder Bilder vorszuschlagen mit "
-
-msgid "the Markdown syntax"
-msgstr "Markdown"
-
-msgid "Choice"
-msgstr "Wahl"
-
-msgid "Add a link or an image"
-msgstr "Link oder Bild hinzufügen"
-
-msgid "These fields are optional. You can add a link, an image or both."
-msgstr "Diese Felder sind optional. Sie können einen Link, ein Bild oder beide hinzufügen."
-
-msgid "URL of the image"
-msgstr "URL des Bilds"
-
-msgid "Link"
-msgstr "Link"
-
-msgid "Alternative text"
-msgstr "Alternativer Text"
-
-msgid "Remove a choice"
-msgstr "Eine Auswahlmöglichkeit entfernen"
-
-msgid "Add a choice"
-msgstr "Eine Auswahlmöglichkeit hinzufügen"
-
-msgid "Back to step 2"
-msgstr "Zurück zum 2. Schritt"
-
-msgid "Go to step 3"
-msgstr "Weiter zum 3. Schritt"
-
-########### Step 3 ###########
-msgid "Removal date and confirmation (3 on 3)"
-msgstr "Löschdatum und Bestätigung (3 von 3)"
-
-msgid "Confirm the creation of your poll"
-msgstr "Bestätigen Sie die Erstellung ihrer Umfrage"
-
-msgid "List of your choices"
-msgstr "Liste Ihrer Auswahlmöglichkeiten"
-
-msgid "Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."
-msgstr "Wenn Sie die Erstellung ihrer Umfrage bestätigt haben, werden sie automatisch zur Administrationsseite ihrer Umfrage weitergeleitet."
-
-msgid "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."
-msgstr "Danach werden Sie zwei E-Mails erhalten: die Eine enthält den Link zur Umfrage für die Teilnehmer, die Andere enthält den Link zur Administrationsseite ihrer Umfrage."
-
-msgid "Create the poll"
-msgstr "Umfrage erstellen"
-
-# Step 3 choix_date.php
-msgid "Your poll will expire automatically 2 days after the last date of your poll."
-msgstr "Ihre Umfrage wird automatisch zwei Tage nach dem letzten Datum ihrer Umfrage auslaufen."
-
-msgid "Removal date:"
-msgstr "Löschdatum:"
-
-# Step 3 choix_autre.php
-msgid "Your poll will be automatically removed after 6 months."
-msgstr "Ihre Umfrage wird automatisch nach 6 Monaten gelöscht."
-
-msgid "You can fix another removal date for it."
-msgstr "Sie können auch ein anderes Löschdatum festlegen."
-
-msgid "Removal date (optional)"
-msgstr "Löschdatum (optional)"
-
-############# Admin #############
-msgid "Polls administrator"
-msgstr "Umfrageadministrator"
-
-msgid "Confirm removal of the poll "
-msgstr "Bestätigen Sie die Löschung ihrer Umfrage"
-
-msgid "polls in the database at this time"
-msgstr "Umfragen derzeit in der Datenbank"
-
-msgid "Poll ID"
-msgstr "Umfrage-ID"
-
-msgid "Format"
-msgstr "Format"
-
-msgid "Title"
-msgstr "Titel"
-
-msgid "Author"
-msgstr "Autor"
-
-msgid "Users"
-msgstr "Nutzer"
-
-msgid "Actions"
-msgstr "Aktionen"
-
-msgid "See the poll"
-msgstr "Umfrage sehen"
-
-msgid "Change the poll"
-msgstr "Umfrage ändern"
-
-msgid "Logs"
-msgstr "Verlauf"
-
-########### Mails ###########
-# Mails studs.php
-msgid "Poll's participation"
-msgstr "Beteiligung an der Umfrage"
-
-msgid ""
-"has filled a line.\n"
-"You can find your poll at the link"
-msgstr ""
-" hat eine Zeile ausgefüllt.\n"
-"Sie finden Ihre Umfrage unter dem folgenden Link:"
-
-msgid "Thanks for your confidence."
-msgstr "Danke für Ihr Vertrauen."
-
-msgid "\n"
-"--\n\n"
-"« La route est longue, mais la voie est libre… »\n"
-"Framasoft ne vit que par vos dons (déductibles des impôts).\n"
-"Merci d'avance pour votre soutien http://soutenir.framasoft.org."
-msgstr "\n"
-"\n"
-"\n"
-"\n"
-" "
-
-# Mails adminstuds.php
-msgid "[ADMINISTRATOR] New settings for your poll"
-msgstr "[ADMINISTRATOR] Neue Einstellungen für Ihre Umfrage "
-
-msgid ""
-"You have changed the settings of your poll. \n"
-"You can modify this poll with this link"
-msgstr ""
-"Sie haben die Einstellungen Ihrer Umfrage geändert. \n"
-"Sie können Ihre Umfrage unter diesem Link ändern"
-
-# Mails creation_sondage.php
-msgid ""
-"This is the message you have to send to the people you want to poll. \n"
-"Now, you have to send this message to everyone you want to poll."
-msgstr ""
-"Dies ist die Nachricht, die Sie an die Personen, die Sie zur Umfrage einladen möchten, schicken sollen. \n"
-"Schicken Sie jetzt bitte diese Nachricht an alle Personen, die Sie zur Umfrage einladen möchten."
-
-msgid "hast just created a poll called"
-msgstr " hat eine Umfrage erstellt - Name folgt: "
-
-msgid "Thanks for filling the poll at the link above"
-msgstr "Danke, dass Sie die Umfrage unter dem obrigen Link ausgefüllt haben"
-
-msgid ""
-"This message should NOT be sent to the polled people. It is private for the poll's creator.\n"
-"\n"
-"You can now modify it at the link above"
-msgstr ""
-"Diese Nachricht sollte NICHT an die befragten Personen gesendet werden. Sie nur für den Autor der Umfrage gemeint.\n"
-"\n"
-"Sie können die Umfrage unter dem oberen Link bearbeiten "
-
-msgid "Author's message"
-msgstr "Nachricht vom Autor "
-
-msgid "For sending to the polled users"
-msgstr "Nachricht für die Teilnehmer"
+msgid ""
+msgstr ""
+"Project-Id-Version: Framadate 0.8\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-10-23 20:52+0100\n"
+"PO-Revision-Date: 2014-10-23 20:52+0100\n"
+"Last-Translator: Jonathan Brielmaier\n"
+"Language-Team: Jonathan Brielmaier\n"
+"Language: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: German\n"
+"X-Poedit-Country: GERMANY\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-KeywordsList: _\n"
+"X-Poedit-Basepath: /var/www/studs\n"
+"X-Poedit-SearchPath-0: .\n"
+
+########### Generic ###########
+msgid "Make your polls"
+msgstr "Eigene Umfragen erstellen"
+
+msgid "Home"
+msgstr "Home"
+
+msgid "Poll"
+msgstr "Umfrage"
+
+msgid "Save"
+msgstr "Speichern"
+
+msgid "Cancel"
+msgstr "Abbrechen"
+
+msgid "Add"
+msgstr "Hinzufügen"
+
+msgid "Remove"
+msgstr "Entfernen"
+
+msgid "Validate"
+msgstr "Bestätigen"
+
+msgid "Edit"
+msgstr "Bearbeiten"
+
+msgid "Next"
+msgstr "Weiter"
+
+msgid "Back"
+msgstr "Zurück"
+
+msgid "Close"
+msgstr "Schließen"
+
+msgid "Your name"
+msgstr "Ihr Name"
+
+msgid "Your email address"
+msgstr "Ihre E-Mail Adresse"
+
+msgid "(in the format name@mail.com)"
+msgstr "(Format: name@mail.com)"
+
+msgid "Description"
+msgstr "Beschreibung"
+
+msgid "Back to the homepage of"
+msgstr "Zurück zur Homepage von "
+
+msgid "Error!"
+msgstr "Fehler!"
+
+msgid "(dd/mm/yyyy)"
+msgstr "(tt/mm/jjjj)"
+
+msgid "dd/mm/yyyy"
+msgstr "tt/mm/jjjj"
+
+msgid "%A, den %e. %B %Y"
+msgstr "%A %e %B %Y"
+
+msgid "Expiration's date"
+msgstr "Verfallsdatum"
+
+########### Language selector ###########
+msgid "Change the language"
+msgstr "Sprache wechseln"
+
+msgid "Select the language"
+msgstr "Sprache wählen"
+
+############ Homepage ############
+msgid "Schedule an event"
+msgstr "Termin finden"
+
+msgid "Make a classic poll"
+msgstr "Klassische Umfrage"
+
+# 1st section
+msgid "What is that?"
+msgstr "Was ist das?"
+
+msgid "Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required."
+msgstr "Framadate ist ein Online-Dienst, das Ihnen hilft, Termine zu finden oder Entscheidungen schnell und einfach zu treffen. Keine Registrierung ist erforderlich. "
+
+msgid "Here is how it works:"
+msgstr "So geht es:"
+
+msgid "Make a poll"
+msgstr "Umfrage erstellen"
+
+msgid "Define dates or subjects to choose"
+msgstr "Datum- oder Auswahlmöglichkeiten definieren"
+
+msgid "Send the poll link to your friends or colleagues"
+msgstr "Link zur Umfrage an Ihre Freunde oder Kollegen schicken"
+
+msgid "Discuss and make a decision"
+msgstr "Besprechen und Entscheidung treffen"
+
+msgid "Do you want to "
+msgstr "Wollen Sie sich "
+
+msgid "view an example?"
+msgstr "einen Beispiel ansehen?"
+
+# 2nd section
+msgid "The software"
+msgstr "Die Software"
+
+msgid "Framadate was initially based on "
+msgstr "Framadate war am Anfang auf "
+
+msgid " a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft"
+msgstr " basiert, eine von der Straßburg-Universität entwickelte Software. Heutzutage wird sie von der Framasoft-Vereinigung entwickelt."
+
+msgid "This software needs javascript and cookies enabled. It is compatible with the following web browsers:"
+msgstr "Für diese Software müssen Javascript und Cookie aktiviert sein. Sie ist mit den folgenden Browsers kompatibel:"
+
+msgid "It is governed by the "
+msgstr "Sie ist lizenziert unter der "
+
+msgid "CeCILL-B license"
+msgstr "CeCILL-B Lizenz"
+
+# 3rd section
+msgid "Cultivate your garden"
+msgstr "Bestellen Sie ihren Garten"
+
+msgid "To participate in the software development, suggest improvements or simply download it, please visit "
+msgstr "Um zur Software-Entwicklung teilzunehmen, Verbesserungen vorzuschlagen oder um sie herunterzuladen, gehen Sie auf "
+
+msgid "the development site"
+msgstr "die Entwicklung-Seite"
+
+msgid "If you want to install the software for your own use and thus increase your independence, we help you on:"
+msgstr "Wenn Sie die Software für Ihre eigene Nutzung installieren möchten und Ihre Eigenständigkeit erhöhen, helfen wir Sie auf:"
+
+############## Poll ##############
+msgid "Poll administration"
+msgstr "Umfrage-Verwaltung"
+
+msgid "Legend:"
+msgstr "Legende:"
+
+# Jumbotron adminstuds.php (+ studs.php)
+msgid "Back to the poll"
+msgstr "Zurück zur Umfrage"
+
+msgid "Print"
+msgstr "Drucken"
+
+msgid "Export to CSV"
+msgstr "CSV-Export"
+
+msgid "Remove the poll"
+msgstr "Umfrage löschen"
+
+msgid "Title of the poll"
+msgstr "Titel der Umfrage"
+
+msgid "Edit the title"
+msgstr "Titel bearbeiten"
+
+msgid "Save the new title"
+msgstr "Den neuen Titel speichern"
+
+msgid "Cancel the title edit"
+msgstr "Änderung des Titels abbrechen"
+
+msgid "Initiator of the poll"
+msgstr "Ersteller der Umfrage"
+
+msgid "Email"
+msgstr "E-Mail Adresse"
+
+msgid "Edit the email adress"
+msgstr "E-Mail Adresse ändern"
+
+msgid "Save the adress email"
+msgstr "E-Mail Adresse speichern"
+
+msgid "Cancel the adress email edit"
+msgstr "Änderung der E-Mail Adresse abbrechen"
+
+msgid "Edit the description"
+msgstr "Beschreibung bearbeiten"
+
+msgid "Save the description"
+msgstr "Beschreibung speichern"
+
+msgid "Cancel the description edit"
+msgstr "Änderung der Beschreibung verwerfen"
+
+msgid "Public link of the poll"
+msgstr "Öffentlicher Link zur Umfrage"
+
+msgid "Admin link of the poll"
+msgstr "Administrator-Link der Umfrage"
+
+msgid "Poll rules"
+msgstr "Regeln der Umfrage"
+
+msgid "Edit the poll rules"
+msgstr "Regeln der Umfrage bearbeiten"
+
+msgid "Votes and comments are locked"
+msgstr "Abstimmungen und Kommentare sind gesperrt"
+
+msgid "Votes and comments are open"
+msgstr "Abstimmungen und Kommentare sind möglich"
+
+msgid "Votes are editable"
+msgstr "Die Abstimmungen können geändert werden"
+
+msgid "Save the new rules"
+msgstr "Neue Regeln speichern"
+
+msgid "Cancel the rules edit"
+msgstr "Neue Regeln nicht speichern"
+
+# Help text adminstuds.php
+msgid "As poll administrator, you can change all the lines of this poll with this button"
+msgstr "Als Administrator der Umfrage, können Sie alle Zeilen der Umfrage über diesen Button ändern"
+
+msgid "remove a column or a line with"
+msgstr "Zeile oder Spalte entfernen mit"
+
+msgid "and add a new column with"
+msgstr "und neue Spalte hinzufügen mit"
+
+msgid "Finally, you can change the informations of this poll like the title, the comments or your email address."
+msgstr "Sie können auch die Informationen dieser Umfrage wie Titel, Kommentare oder E-Mail Adresse ändern."
+
+# Help text studs.php
+msgid "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."
+msgstr "Wenn Sie bei dieser Umfrage abstimmen möchten, müssen Sie ihren Namen angeben. Wählen Sie die Optionen, die für Sie am besten passen und bestätigen Sie diese über den Plus-Button am Ende der Zeile."
+
+# Poll results
+msgid "Votes of the poll "
+msgstr "Abstimmungen der Umfrage "
+
+msgid "Remove the column"
+msgstr "Spalte entfernen"
+
+msgid "Add a column"
+msgstr "Spalte hinzufügen"
+
+msgid "Edit the line:"
+msgstr "Zeile bearbeiten:"
+
+msgid "Remove the line:"
+msgstr "Zeile entfernen:"
+
+msgid "Yes"
+msgstr "Ja"
+
+msgid "Ifneedbe"
+msgstr "Wenn notwendig"
+
+msgid ", ifneedbe"
+msgstr ", wenn notwendig"
+
+msgid "No"
+msgstr "Nein"
+
+msgid "Vote \"no\" for "
+msgstr "Stimme « nein » für "
+
+msgid "Vote \"yes\" for "
+msgstr "Stimme « ja » für "
+
+msgid "Vote \"ifneedbe\" for "
+msgstr "Stimme « Wenn notwendig » für "
+
+msgid "Save the choices"
+msgstr "Wahl speichern"
+
+msgid "Addition"
+msgstr "Hinzufügen"
+
+msgid "Best choice"
+msgstr "Bste Option"
+
+msgid "Best choices"
+msgstr "Besten Optionen"
+
+msgid "The best choice at this time is:"
+msgstr "Die beste Option ist derzeit:"
+
+msgid "The bests choices at this time are:"
+msgstr "Die beste Optionen sind derzeit:"
+
+msgid "with"
+msgstr "mit"
+
+msgid "vote"
+msgstr "Stimme"
+
+msgid "votes"
+msgstr "Stimmen"
+
+msgid "for"
+msgstr "für"
+
+msgid "Remove all the votes"
+msgstr "Alle Stimmungen löschen"
+
+msgid "Scroll to the left"
+msgstr "Links scrollen"
+
+msgid "Scroll to the right"
+msgstr "Rechts scrollen"
+
+# Comments
+msgid "Comments of polled people"
+msgstr "Kommentare von Teilnehmer"
+
+msgid "Remove the comment"
+msgstr "Kommentar entfernen"
+
+msgid "Add a comment in the poll"
+msgstr "Kommentar zur Umfrage hinzufügen"
+
+msgid "Your comment"
+msgstr "Ihr Kommentar"
+
+msgid "Send the comment"
+msgstr "Kommentar senden"
+
+msgid "anonyme"
+msgstr "anonym"
+
+msgid "Remove all the comments"
+msgstr "Alle Kommentare löschen"
+
+# Add a colum adminstuds.php
+msgid "Column's adding"
+msgstr "Spalte hinzufügen"
+
+msgid "You can add a new scheduling date to your poll."
+msgstr "Sie können zur Umfrage ein neues Datum hinzufügen."
+
+msgid "If you just want to add a new hour to an existant date, put the same date and choose a new hour."
+msgstr "Wenn Sie nur eine neue Uhrzeiteit zu einem existierenden Datum hinzufügen wollen, wählen Sie das selbe Datum und wählen Sie eine neue Zeit aus."
+
+# Remove poll adminstuds.php
+msgid "Confirm removal of your poll"
+msgstr "Löschen der Umfrage bestätigen"
+
+msgid "Remove this poll!"
+msgstr "Diese Umfrage löschen!"
+
+msgid "Keep this poll!"
+msgstr "Diese Umfrage nicht löschen!"
+
+msgid "Your poll has been removed!"
+msgstr "Ihre Umfrage wurde gelöscht!"
+
+# Errors adminstuds.php/studs
+msgid "This poll doesn't exist !"
+msgstr "Diese Umfrage existiert nicht!"
+
+msgid "Enter a name"
+msgstr "Geben Sie einen Namen ein"
+
+msgid "The name you've chosen already exist in this poll!"
+msgstr "Der von Ihnen eingegebenen Name existiert bereits in dieser Umfrage"
+
+msgid "Enter a name and a comment!"
+msgstr "Geben Sie einen Namen und ein Kommentar ein!"
+
+msgid "Failed to insert the comment!"
+msgstr "Einfügen des Kommentars gescheitert!"
+
+msgid "Characters \" ' < et > are not permitted"
+msgstr "Die Zeichen \" ' < und > sind nicht erlaubt !"
+
+msgid "The date is not correct !"
+msgstr "Das Datum ist nicht korrekt!"
+
+########### Step 1 ###########
+# Step 1 info_sondage.php
+msgid "Poll creation (1 on 3)"
+msgstr "Umfrage erstellen (1 von 3)"
+
+msgid "Framadate is not properly installed, please check the 'INSTALL' to setup the database before continuing."
+msgstr "Framadate ist nicht richtig installiert, lesen Sie 'INSTALL' um die Datenbank aufzusetzen bevor es weiter geht."
+
+msgid "You are in the poll creation section."
+msgstr "Sie können hier Umfragen erstellen"
+
+msgid "Required fields cannot be left blank."
+msgstr "Mit * markierte Felder müssen ausgefüllt sein."
+
+msgid "Poll title"
+msgstr "Umfragetitel"
+
+msgid "Voters can modify their vote themselves."
+msgstr "Teilnehmer können ihre Antworten verändern"
+
+msgid "To receive an email for each new vote."
+msgstr "Bei jeder neuen Abstimmung eine E-Mail erhalten."
+
+msgid "Go to step 2"
+msgstr "Weiter zum 2. Schritt"
+
+# Errors info_sondage.php
+msgid "Enter a title"
+msgstr "Titel eingeben"
+
+msgid "Something is wrong with the format"
+msgstr "Something is wrong with the format"
+
+msgid "Enter an email address"
+msgstr "Sie müssen eine E-Mail Adresse eingeben"
+
+msgid "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."
+msgstr "Die Adresse ist nicht korrekt! Sie sollten eine funktionierende E-Mail Adresse angeben, um den Link zu ihrer Umfrage zu erhalten"
+
+# Error choix_date.php/choix_autre.php
+msgid "You haven't filled the first section of the poll creation."
+msgstr "Sie haben den ersten Teil der Umfrageerstellung nicht ausgefüllt."
+
+msgid "Back to step 1"
+msgstr "Zurück zum 1. Schritt"
+
+########### Step 2 ###########
+# Step 2 choix_date.php
+msgid "Poll dates (2 on 3)"
+msgstr "Umfragedaten (2 von 3)"
+
+msgid "Choose the dates of your poll"
+msgstr "Wählen Sie Terminmöglichkeiten für Ihre Umfrage"
+
+msgid "To schedule an event you need to propose at least two choices (two hours for one day or two days)."
+msgstr "Um eine Umfrage für einen Termin zu erstellen, müssen Sie mindestens zwei Auswahlmöglichkeiten angeben (zwei verschiedene Zeiten an einem Tag oder zwei Tage)."
+
+msgid "You can add or remove additionnal days and hours with the buttons"
+msgstr "Sie können weitere Tage und Uhrzeiten über diesen Button hinzufügen oder entfernen"
+
+msgid "For each selected day, you can choose, or not, meeting hours (e.g.: \"8h\", \"8:30\", \"8h-10h\", \"evening\", etc.)"
+msgstr "Sie können (müssen aber nicht), für jeden ausgewählten Tage, Zeiten für den Termin (z.B. \"8h\", \"8:30\", \"8-10Uhr\", \"Abends\", etc.) angeben."
+
+msgid "Day"
+msgstr "Tag"
+
+msgid "Time"
+msgstr "Uhrzeit"
+
+msgid "Remove an hour"
+msgstr "Eine Uhrzeit entfernen"
+
+msgid "Add an hour"
+msgstr "Eine Uhrzeit hinzufügen"
+
+msgid "Copy hours of the first day"
+msgstr "Uhrzeiten des ersten Tags kopieren"
+
+msgid "Remove a day"
+msgstr "Einen Tag entfernen"
+
+msgid "Add a day"
+msgstr "Einen Tag hinzufügen"
+
+msgid "Remove all days"
+msgstr "Alle Tage entfernen"
+
+msgid "Remove all hours"
+msgstr "Alle Uhrzeiten entfernen"
+
+# Step 2 choix_autre.php
+msgid "Poll subjects (2 on 3)"
+msgstr "Umfragethemen (2 von 3)"
+
+msgid "To make a generic poll you need to propose at least two choices between differents subjects."
+msgstr "Um eine allgemeine Umfrage zu erstellen, benötigen Sie mindestens zwei Auswahlmöglichkeiten zwischen verschiedenen Themen."
+
+msgid "You can add or remove additional choices with the buttons"
+msgstr "Sie können über den Button zusätzliche Auswahlmöglichkeiten hinzufügen oder entfernen"
+
+msgid "It's possible to propose links or images by using "
+msgstr "Es besteht die Möglichkeit, Links oder Bilder vorszuschlagen mit "
+
+msgid "the Markdown syntax"
+msgstr "Markdown"
+
+msgid "Choice"
+msgstr "Wahl"
+
+msgid "Add a link or an image"
+msgstr "Link oder Bild hinzufügen"
+
+msgid "These fields are optional. You can add a link, an image or both."
+msgstr "Diese Felder sind optional. Sie können einen Link, ein Bild oder beide hinzufügen."
+
+msgid "URL of the image"
+msgstr "URL des Bilds"
+
+msgid "Link"
+msgstr "Link"
+
+msgid "Alternative text"
+msgstr "Alternativer Text"
+
+msgid "Remove a choice"
+msgstr "Eine Auswahlmöglichkeit entfernen"
+
+msgid "Add a choice"
+msgstr "Eine Auswahlmöglichkeit hinzufügen"
+
+msgid "Back to step 2"
+msgstr "Zurück zum 2. Schritt"
+
+msgid "Go to step 3"
+msgstr "Weiter zum 3. Schritt"
+
+########### Step 3 ###########
+msgid "Removal date and confirmation (3 on 3)"
+msgstr "Löschdatum und Bestätigung (3 von 3)"
+
+msgid "Confirm the creation of your poll"
+msgstr "Bestätigen Sie die Erstellung ihrer Umfrage"
+
+msgid "List of your choices"
+msgstr "Liste Ihrer Auswahlmöglichkeiten"
+
+msgid "Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."
+msgstr "Wenn Sie die Erstellung ihrer Umfrage bestätigt haben, werden sie automatisch zur Administrationsseite ihrer Umfrage weitergeleitet."
+
+msgid "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."
+msgstr "Danach werden Sie zwei E-Mails erhalten: die Eine enthält den Link zur Umfrage für die Teilnehmer, die Andere enthält den Link zur Administrationsseite ihrer Umfrage."
+
+msgid "Create the poll"
+msgstr "Umfrage erstellen"
+
+# Step 3 choix_date.php
+msgid "Your poll will expire automatically 2 days after the last date of your poll."
+msgstr "Ihre Umfrage wird automatisch zwei Tage nach dem letzten Datum ihrer Umfrage auslaufen."
+
+msgid "Removal date:"
+msgstr "Löschdatum:"
+
+# Step 3 choix_autre.php
+msgid "Your poll will be automatically removed after 6 months."
+msgstr "Ihre Umfrage wird automatisch nach 6 Monaten gelöscht."
+
+msgid "You can set a closer removal date for it."
+msgstr "Sie können auch ein anderes Löschdatum festlegen."
+
+msgid "Removal date (optional)"
+msgstr "Löschdatum (optional)"
+
+############# Admin #############
+msgid "Polls administrator"
+msgstr "Umfrageadministrator"
+
+msgid "Confirm removal of the poll "
+msgstr "Bestätigen Sie die Löschung ihrer Umfrage"
+
+msgid "polls in the database at this time"
+msgstr "Umfragen derzeit in der Datenbank"
+
+msgid "Poll ID"
+msgstr "Umfrage-ID"
+
+msgid "Format"
+msgstr "Format"
+
+msgid "Title"
+msgstr "Titel"
+
+msgid "Author"
+msgstr "Autor"
+
+msgid "Users"
+msgstr "Nutzer"
+
+msgid "Actions"
+msgstr "Aktionen"
+
+msgid "See the poll"
+msgstr "Umfrage sehen"
+
+msgid "Change the poll"
+msgstr "Umfrage ändern"
+
+msgid "Logs"
+msgstr "Verlauf"
+
+msgid "Summary"
+msgstr "Zusammenfassung"
+
+msgid "Success"
+msgstr "Erfolg"
+
+msgid "Fail"
+msgstr "scheitern"
+
+msgid "Nothing"
+msgstr "Nichts"
+
+msgid "Succeeded:"
+msgstr "Erfolgreich:"
+
+msgid "Failed:"
+msgstr "fehlgeschlagen:"
+
+msgid "Skipped:"
+msgstr "übersprungene:"
+
+msgid "Pages:"
+msgstr "Seiten:"
+
+########### Mails ###########
+# Mails studs.php
+msgid "Poll's participation"
+msgstr "Beteiligung an der Umfrage"
+
+msgid ""
+"filled a vote.\n"
+"You can find your poll at the link"
+msgstr ""
+"hat eine Zeile ausgefüllt.\n"
+"Sie finden Ihre Umfrage unter dem folgenden Link:"
+
+msgid ""
+"updated a vote.\n"
+"You can find your poll at the link"
+msgstr ""
+"updated a vote.\n"
+"Sie finden Ihre Umfrage unter dem folgenden Link:"
+
+msgid ""
+"wrote a comment.\n"
+"You can find your poll at the link"
+msgstr ""
+"wrote a comment.\n"
+"Sie finden Ihre Umfrage unter dem folgenden Link:"
+
+msgid "Thanks for your confidence."
+msgstr "Danke für Ihr Vertrauen."
+
+msgid "\n"
+"--\n\n"
+"« La route est longue, mais la voie est libre… »\n"
+"Framasoft ne vit que par vos dons (déductibles des impôts).\n"
+"Merci d'avance pour votre soutien http://soutenir.framasoft.org."
+msgstr "\n"
+"\n"
+"\n"
+"\n"
+" "
+
+# Mails adminstuds.php
+msgid "[ADMINISTRATOR] New settings for your poll"
+msgstr "[ADMINISTRATOR] Neue Einstellungen für Ihre Umfrage "
+
+msgid ""
+"You have changed the settings of your poll. \n"
+"You can modify this poll with this link"
+msgstr ""
+"Sie haben die Einstellungen Ihrer Umfrage geändert. \n"
+"Sie können Ihre Umfrage unter diesem Link ändern"
+
+# Mails creation_sondage.php
+msgid ""
+"This is the message you have to send to the people you want to poll. \n"
+"Now, you have to send this message to everyone you want to poll."
+msgstr ""
+"Dies ist die Nachricht, die Sie an die Personen, die Sie zur Umfrage einladen möchten, schicken sollen. \n"
+"Schicken Sie jetzt bitte diese Nachricht an alle Personen, die Sie zur Umfrage einladen möchten."
+
+msgid "hast just created a poll called"
+msgstr " hat eine Umfrage erstellt - Name folgt: "
+
+msgid "Thanks for filling the poll at the link above"
+msgstr "Danke, dass Sie die Umfrage unter dem obrigen Link ausgefüllt haben"
+
+msgid ""
+"This message should NOT be sent to the polled people. It is private for the poll's creator.\n"
+"\n"
+"You can now modify it at the link above"
+msgstr ""
+"Diese Nachricht sollte NICHT an die befragten Personen gesendet werden. Sie nur für den Autor der Umfrage gemeint.\n"
+"\n"
+"Sie können die Umfrage unter dem oberen Link bearbeiten "
+
+msgid "Author's message"
+msgstr "Nachricht vom Autor "
+
+msgid "For sending to the polled users"
+msgstr "Nachricht für die Teilnehmer"
diff --git a/locale/en_GB/LC_MESSAGES/Studs.mo b/locale/en_GB/LC_MESSAGES/Studs.mo
index b21ecdc..2646d04 100644
Binary files a/locale/en_GB/LC_MESSAGES/Studs.mo and b/locale/en_GB/LC_MESSAGES/Studs.mo differ
diff --git a/locale/en_GB/LC_MESSAGES/Studs.po b/locale/en_GB/LC_MESSAGES/Studs.po
index e22f5c9..d084ea4 100644
--- a/locale/en_GB/LC_MESSAGES/Studs.po
+++ b/locale/en_GB/LC_MESSAGES/Studs.po
@@ -66,8 +66,8 @@ msgstr "(in the format name@mail.com)"
msgid "Description"
msgstr "Description"
-msgid "Back to the homepage of "
-msgstr "Back to the homepage of "
+msgid "Back to the homepage of"
+msgstr "Back to the homepage of"
msgid "Error!"
msgstr "Error!"
@@ -81,9 +81,6 @@ msgstr "dd/mm/yyyy"
msgid "%A, den %e. %B %Y"
msgstr "%A, den %e. %B %Y"
-msgid "Expiration's date"
-msgstr "Expiration's date"
-
msgid "days"
msgstr "days"
@@ -199,14 +196,23 @@ msgstr "Cancel the title edit"
msgid "Initiator of the poll"
msgstr "Initiator of the poll"
+msgid "Edit the name"
+msgstr "Edit the name"
+
+msgid "Save the new name"
+msgstr "Save the new name"
+
+msgid "Cancel the name edit"
+msgstr "Cancel the name edit"
+
msgid "Email"
msgstr "Email"
msgid "Edit the email adress"
msgstr "Edit the email adress"
-msgid "Save the email address "
-msgstr "Save the email address "
+msgid "Save the email address"
+msgstr "Save the email address"
msgid "Cancel the email address edit"
msgstr "Cancel the email address edit"
@@ -226,6 +232,18 @@ msgstr "Public link of the poll"
msgid "Admin link of the poll"
msgstr "Admin link of the poll"
+msgid "Expiration's date"
+msgstr "Expiration's date"
+
+msgid "Edit the expiration's date"
+msgstr "Edit the expiration's date"
+
+msgid "Save the new expiration's date"
+msgstr "Save the new expiration's date"
+
+msgid "Cancel the expiration's date edit"
+msgstr "Cancel the expiration's date edit"
+
msgid "Poll rules"
msgstr "Poll rules"
@@ -247,15 +265,18 @@ msgstr "Save the new rules"
msgid "Cancel the rules edit"
msgstr "Cancel the rules edit"
+msgid "The name is invalid."
+msgstr "Le nom n'est pas valide."
+
# Help text adminstuds.php
-msgid "As poll administrator, you can change all the lines of this poll with this button "
-msgstr "As poll administrator, you can change all the lines of this poll with this button "
+msgid "As poll administrator, you can change all the lines of this poll with this button"
+msgstr "As poll administrator, you can change all the lines of this poll with this button"
-msgid " remove a column or a line with "
-msgstr " remove a column or a line with "
+msgid "remove a column or a line with"
+msgstr "remove a column or a line with"
-msgid "and add a new column with "
-msgstr "and add a new column with "
+msgid "and add a new column with"
+msgstr "and add a new column with"
msgid "Finally, you can change the informations of this poll like the title, the comments or your email address."
msgstr "Finally, you can change the informations of this poll like the title, the comments or your email address."
@@ -437,8 +458,8 @@ msgstr "Go to step 2"
msgid "Enter a title"
msgstr "Enter a title"
-msgid "Characters < > and \" are not permitted"
-msgstr "Characters < > and \" are not permitted"
+msgid "Something is wrong with the format"
+msgstr "Something is wrong with the format"
msgid "Enter an email address"
msgstr "Enter an email address"
@@ -461,8 +482,8 @@ msgstr "Poll dates (2 on 3)"
msgid "Choose the dates of your poll"
msgstr "Choose the dates of your poll"
-msgid "To schedule an event, it's better to propose at least two choices (two hours for one day or two days)."
-msgstr "To schedule an event, it's better to propose at least two choices (two hours for one day or two days)."
+msgid "To schedule an event you need to propose at least two choices (two hours for one day or two days)."
+msgstr "To schedule an event you need to propose at least two choices (two hours for one day or two days)."
msgid "You can add or remove additionnal days and hours with the buttons"
msgstr "You can add or remove additionnal days and hours with the buttons"
@@ -501,8 +522,8 @@ msgstr "Remove all hours"
msgid "Poll subjects (2 on 3)"
msgstr "Poll subjects (2 on 3)"
-msgid "To make a generic poll, it's better to propose at least two choices between differents subjects."
-msgstr "To make a generic poll, it's better to propose at least two choices between differents subjects."
+msgid "To make a generic poll you need to propose at least two choices between differents subjects."
+msgstr "To make a generic poll you need to propose at least two choices between differents subjects."
msgid "You can add or remove additional choices with the buttons"
msgstr "You can add or remove additional choices with the buttons"
@@ -576,15 +597,18 @@ msgstr "Removal date:"
msgid "Your poll will be automatically removed after"
msgstr "Your poll will be automatically removed after"
-msgid "You can fix another removal date for it."
-msgstr "You can fix another removal date for it."
+msgid "You can set a closer removal date for it."
+msgstr "You can set a closer removal date for it."
msgid "Removal date (optional)"
msgstr "Removal date (optional)"
############# Admin #############
-msgid "Polls administrator"
-msgstr "Polls administrator"
+msgid "Polls"
+msgstr "Polls"
+
+msgid "Migration"
+msgstr "Migration"
msgid "Confirm removal of the poll "
msgstr "Confirm removal of the poll "
@@ -619,16 +643,54 @@ msgstr "Change the poll"
msgid "Logs"
msgstr "Logs"
+msgid "Summary"
+msgstr "Summary"
+
+msgid "Success"
+msgstr "Success"
+
+msgid "Fail"
+msgstr "Fail"
+
+msgid "Nothing"
+msgstr "Nothing"
+
+msgid "Succeeded:"
+msgstr "Succeeded:"
+
+msgid "Failed:"
+msgstr "Failed:"
+
+msgid "Skipped:"
+msgstr "Skipped:"
+
+msgid "Pages:"
+msgstr "Pages:"
+
########### Mails ###########
# Mails studs.php
msgid "Poll's participation"
msgstr "Poll's participation"
msgid ""
-"has filled a line.\n"
+"filled a vote.\n"
"You can find your poll at the link"
msgstr ""
-"has filled a line.\n"
+"filled a vote.\n"
+"You can find your poll at the link"
+
+msgid ""
+"updated a vote.\n"
+"You can find your poll at the link"
+msgstr ""
+"updated a vote.\n"
+"You can find your poll at the link"
+
+msgid ""
+"wrote a comment.\n"
+"You can find your poll at the link"
+msgstr ""
+"wrote a comment.\n"
"You can find your poll at the link"
msgid "Thanks for your confidence."
diff --git a/locale/es_ES/LC_MESSAGES/Studs.mo b/locale/es_ES/LC_MESSAGES/Studs.mo
index 54fc228..d742a11 100644
Binary files a/locale/es_ES/LC_MESSAGES/Studs.mo and b/locale/es_ES/LC_MESSAGES/Studs.mo differ
diff --git a/locale/es_ES/LC_MESSAGES/Studs.po b/locale/es_ES/LC_MESSAGES/Studs.po
index 0a0ba51..6633139 100644
--- a/locale/es_ES/LC_MESSAGES/Studs.po
+++ b/locale/es_ES/LC_MESSAGES/Studs.po
@@ -130,7 +130,7 @@ msgstr "Usted no habia llenado la primera pagina dela encuesta"
#: choix_autre.php:63
#: adminstuds.php:79
#: adminstuds.php:1044
-msgid "Back to the homepage of "
+msgid "Back to the homepage of"
msgstr "Retroceder al inicio de"
#: choix_date.php:220
@@ -255,8 +255,8 @@ msgstr "Introducza un título"
#: infos_sondage.php:133
#: infos_sondage.php:138
#: infos_sondage.php:150
-msgid "Characters < > and \" are not permitted"
-msgstr "Los caracteres < > y \" no estan autorizados!"
+msgid "Something is wrong with the format"
+msgstr "Something is wrong with the format"
#: infos_sondage.php:136
msgid "Comments: "
@@ -393,12 +393,26 @@ msgstr "Participación a la encuesta"
#: studs.php:171
#: studs.php:211
msgid ""
-"has filled a line.\n"
+"filled a vote.\n"
"You can find your poll at the link"
msgstr ""
"acaba de llenar una línea.\n"
"Usted puede retroceder a su encuesta con el enlace siguiente"
+msgid ""
+"updated a vote.\n"
+"You can find your poll at the link"
+msgstr ""
+"updated a vote.\n"
+"Usted puede retroceder a su encuesta con el enlace siguiente"
+
+msgid ""
+"wrote a comment.\n"
+"You can find your poll at the link"
+msgstr ""
+"wrote a comment.\n"
+"Usted puede retroceder a su encuesta con el enlace siguiente"
+
#: studs.php:246
#: adminstuds.php:567
msgid "Initiator of the poll"
@@ -526,7 +540,7 @@ msgid "Characters \" < and > are not permitted"
msgstr "Los caracteres \" < y > no estan autorizados!"
#: choix_autre.php:191
-msgid "Your poll will be automatically removed after 6 months.
You can fix another removal date for it."
+msgid "Your poll will be automatically removed after 6 months.
You can set a closer removal date for it."
msgstr "Su encuesta será automaticamente borrado dentro de 6 meses.
Mientras, usted puede cambiar este fecha aquí."
#: choix_autre.php:193
@@ -612,8 +626,8 @@ msgstr ""
"Usted puede cambiar su encuesta al enlace siguiente"
#: adminstuds.php:582
-msgid "As poll administrator, you can change all the lines of this poll with this button : "
-msgstr "En calidad de administrador, Usted puede cambiar todas la líneas de este encuesta con este botón :"
+msgid "As poll administrator, you can change all the lines of this poll with this button"
+msgstr "En calidad de administrador, Usted puede cambiar todas la líneas de este encuesta con este botón"
msgid "Edit"
msgstr "Cambio"
diff --git a/locale/fr_FR/LC_MESSAGES/Studs.mo b/locale/fr_FR/LC_MESSAGES/Studs.mo
index ea335f1..0c460f9 100644
Binary files a/locale/fr_FR/LC_MESSAGES/Studs.mo and b/locale/fr_FR/LC_MESSAGES/Studs.mo differ
diff --git a/locale/fr_FR/LC_MESSAGES/Studs.po b/locale/fr_FR/LC_MESSAGES/Studs.po
index 74af27d..7cd490e 100644
--- a/locale/fr_FR/LC_MESSAGES/Studs.po
+++ b/locale/fr_FR/LC_MESSAGES/Studs.po
@@ -66,7 +66,7 @@ msgstr "(au format nom@mail.com)"
msgid "Description"
msgstr "Description"
-msgid "Back to the homepage of "
+msgid "Back to the homepage of"
msgstr "Retourner à la page d'accueil de"
msgid "Error!"
@@ -81,9 +81,6 @@ msgstr "jj/mm/aaaa"
msgid "%A, den %e. %B %Y"
msgstr "%A %e %B %Y"
-msgid "Expiration's date"
-msgstr "Date d'expiration"
-
msgid "days"
msgstr "jours"
@@ -199,13 +196,22 @@ msgstr "Annuler le changement de titre"
msgid "Initiator of the poll"
msgstr "Auteur du sondage"
+msgid "Edit the name"
+msgstr "Modification de l'auteur"
+
+msgid "Save the new name"
+msgstr "Enregistrer l'auteur"
+
+msgid "Cancel the name edit"
+msgstr "Annuler le changement d'auteur"
+
msgid "Email"
msgstr "Courriel"
msgid "Edit the email adress"
msgstr "Modifier le courriel"
-msgid "Save the email address "
+msgid "Save the email address"
msgstr "Enregistrer le courriel"
msgid "Cancel the email address edit"
@@ -226,6 +232,18 @@ msgstr "Lien public du sondage"
msgid "Admin link of the poll"
msgstr "Lien d'administration du sondage"
+msgid "Expiration's date"
+msgstr "Date d'expiration"
+
+msgid "Edit the expiration's date"
+msgstr "Modifier la date d'expiration"
+
+msgid "Save the new expiration's date"
+msgstr "Enregistrer la date d'expiration"
+
+msgid "Cancel the expiration's date edit"
+msgstr "Annuler le changement de date d'expiration"
+
msgid "Poll rules"
msgstr "Permissions du sondage"
@@ -247,15 +265,18 @@ msgstr "Enregistrer les nouvelles permissions"
msgid "Cancel the rules edit"
msgstr "Annuler le changement de permissions"
+msgid "The name is invalid."
+msgstr "Le nom n'est pas valide."
+
# Help text adminstuds.php
-msgid "As poll administrator, you can change all the lines of this poll with this button "
-msgstr "En tant qu'administrateur, vous pouvez modifier toutes les lignes de ce sondage avec ce bouton "
+msgid "As poll administrator, you can change all the lines of this poll with this button"
+msgstr "En tant qu'administrateur, vous pouvez modifier toutes les lignes de ce sondage avec ce bouton"
-msgid " remove a column or a line with "
-msgstr " effacer une colonne ou une ligne avec "
+msgid "remove a column or a line with"
+msgstr "effacer une colonne ou une ligne avec"
-msgid "and add a new column with "
-msgstr "et si vous avez oublié de saisir un choix, vous pouvez rajouter une colonne en cliquant sur "
+msgid "and add a new column with"
+msgstr "et si vous avez oublié de saisir un choix, vous pouvez rajouter une colonne en cliquant sur"
msgid "Finally, you can change the informations of this poll like the title, the comments or your email address."
msgstr "Vous pouvez enfin également modifier les informations relatives à ce sondage comme le titre, les commentaires ou encore votre courriel."
@@ -437,8 +458,8 @@ msgstr "Aller à l'étape 2"
msgid "Enter a title"
msgstr "Il faut saisir un titre !"
-msgid "Characters < > and \" are not permitted"
-msgstr "Les caractères < > et \" ne sont pas autorisés !"
+msgid "Something is wrong with the format"
+msgstr "Quelque chose ne va pas avec le format"
msgid "Enter an email address"
msgstr "Il faut saisir une adresse électronique !"
@@ -461,8 +482,8 @@ msgstr "Choix des dates (2 sur 3)"
msgid "Choose the dates of your poll"
msgstr "Choisissez les dates de votre sondage"
-msgid "To schedule an event, it's better to propose at least two choices (two hours for one day or two days)."
-msgstr "Pour créer un sondage spécial dates, il est préférable de proposer au moins deux choix (deux horaires pour une même journée ou deux jours)."
+msgid "To schedule an event you need to propose at least two choices (two hours for one day or two days)."
+msgstr "Pour créer un sondage spécial dates vous devez proposer au moins deux choix (deux horaires pour une même journée ou deux jours)."
msgid "You can add or remove additionnal days and hours with the buttons"
msgstr "Vous pouvez ajouter ou supprimer des jours et horaires supplémentaires avec les boutons"
@@ -501,8 +522,8 @@ msgstr "Effacer tous les horaires"
msgid "Poll subjects (2 on 3)"
msgstr "Choix des sujets (2 sur 3)"
-msgid "To make a generic poll, it's better to propose at least two choices between differents subjects."
-msgstr "Pour créer un sondage classique, il est préférable de proposer au moins deux choix différents."
+msgid "To make a generic poll you need to propose at least two choices between differents subjects."
+msgstr "Pour créer un sondage classique, vous devez proposer au moins deux choix différents."
msgid "You can add or remove additional choices with the buttons"
msgstr "Vous pouvez ajouter ou supprimer des choix supplémentaires avec les boutons"
@@ -576,15 +597,18 @@ msgstr "Date de suppression :"
msgid "Your poll will be automatically removed after"
msgstr "Votre sondage sera automatiquement effacé dans"
-msgid "You can fix another removal date for it."
-msgstr "Néanmoins vous pouvez décider ci-dessous d'une date plus rapprochée pour la suppression de votre sondage."
+msgid "You can set a closer removal date for it."
+msgstr "Vous pouvez décider d'une date de suppression plus proche."
msgid "Removal date (optional)"
-msgstr "Date de suppression (facultative)"
+msgstr "Date de fin (facultative)"
############# Admin #############
-msgid "Polls administrator"
-msgstr "Administrateur de la base"
+msgid "Polls"
+msgstr "Sondages"
+
+msgid "Migration"
+msgstr "Migration"
msgid "Confirm removal of the poll "
msgstr "Confirmer la suppression du sondage "
@@ -619,16 +643,54 @@ msgstr "Modifier le sondage"
msgid "Logs"
msgstr "Historique"
+msgid "Summary"
+msgstr "Résumé"
+
+msgid "Success"
+msgstr "Réussite"
+
+msgid "Fail"
+msgstr "Échèc"
+
+msgid "Nothing"
+msgstr "Rien"
+
+msgid "Succeeded:"
+msgstr "Réussit:"
+
+msgid "Failed:"
+msgstr "Échoué:"
+
+msgid "Skipped:"
+msgstr "Passé:"
+
+msgid "Pages:"
+msgstr "Pages :"
+
########### Mails ###########
# Mails studs.php
msgid "Poll's participation"
msgstr "Participation au sondage"
msgid ""
-"has filled a line.\n"
+"filled a vote.\n"
"You can find your poll at the link"
msgstr ""
-" vient de remplir une ligne.\n"
+"vient de voter.\n"
+"Vous pouvez retrouver votre sondage avec le lien suivant"
+
+msgid ""
+"updated a vote.\n"
+"You can find your poll at the link"
+msgstr ""
+"vient de mettre à jour un vote.\n"
+"Vous pouvez retrouver votre sondage avec le lien suivant"
+
+msgid ""
+"vient de rédiger un commentaire.\n"
+"You can find your poll at the link"
+msgstr ""
+"wrote a comment.\n"
"Vous pouvez retrouver votre sondage avec le lien suivant"
msgid "Thanks for your confidence."
diff --git a/studs.php b/studs.php
index db63ea2..ddfc2b3 100644
--- a/studs.php
+++ b/studs.php
@@ -16,694 +16,192 @@
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
*/
-namespace Framadate;
-
-session_start();
-
-if (file_exists('bandeaux_local.php')) {
- include_once('bandeaux_local.php');
-} else {
- include_once('bandeaux.php');
-}
+use Framadate\Services\LogService;
+use Framadate\Services\PollService;
+use Framadate\Services\InputService;
+use Framadate\Services\MailService;
+use Framadate\Message;
+use Framadate\Utils;
include_once __DIR__ . '/app/inc/init.php';
-// Le fichier studs.php sert a afficher les résultats d'un sondage à un simple utilisateur.
-// C'est également l'interface pour ajouter une valeur à un sondage deja créé.
-$numsondage = false;
+/* Constants */
+/* --------- */
+const UPDATE_VOTE = 1;
+const ADD_VOTE = 2;
+const ADD_COMMENT = 3;
-//On récupère le numéro de sondage par le lien web.
-if(Utils::issetAndNoEmpty('sondage', $_GET) === true) {
- $numsondage = $_GET["sondage"];
- $_SESSION["numsondage"] = $numsondage;
-}
+/* Variables */
+/* --------- */
-if(Utils::issetAndNoEmpty('sondage') === true) {
- $numsondage = $_POST["sondage"];
- $_SESSION["numsondage"] = $numsondage;
-} elseif(Utils::issetAndNoEmpty('sondage', $_COOKIE) === true) {
- $numsondage = $_COOKIE["sondage"];
-} elseif(Utils::issetAndNoEmpty('numsondage', $_SESSION) === true) {
- $numsondage = $_SESSION["numsondage"];
-}
+$poll_id = null;
+$poll = null;
+$message = null;
+$editingVoteId = 0;
-$dsondage = ($numsondage != false) ? Utils::get_sondage_from_id($numsondage) : false;
-if (!$dsondage || $dsondage->id_sondage == ''){
- Utils::print_header( _("Error!"));
+/* Services */
+/*----------*/
- bandeau_titre(_("Error!"));
+$logService = new LogService();
+$pollService = new PollService($connect, $logService);
+$inputService = new InputService();
+$mailService = new MailService($config['use_smtp']);
- echo '
-
'."\n";
+/* Functions */
+/*-----------*/
- bandeau_pied();
-
- die();
-}
-
-//output a CSV and die()
-if(Utils::issetAndNoEmpty('export', $_GET) && $dsondage !== false) {
- if($_GET['export'] == 'csv') {
- require_once('exportcsv.php');
+/**
+ * Send a notification to the poll admin to notify him about an update.
+ *
+ * @param $poll stdClass The poll
+ * @param $mailService MailService The mail service
+ * @param $name string The name user who triggered the notification
+ * @param $type int cf: Constants on the top of this page
+ */
+function sendUpdateNotification($poll, $mailService, $name, $type) {
+ if (!isset($_SESSION['mail_sent'])) {
+ $_SESSION['mail_sent'] = [];
}
- die();
-}
+ if ($poll->receiveNewVotes && (!isset($_SESSION['mail_sent'][$poll->id]) || $_SESSION['mail_sent'][$poll->id] !== true)) {
-// quand on ajoute un commentaire utilisateur
-if(isset($_POST['ajoutcomment'])) {
- if (isset($_SESSION['nom']) && Utils::issetAndNoEmpty('commentuser') === false) {
- // Si le nom vient de la session, on le de-htmlentities
- $comment_user = html_entity_decode($_SESSION['nom'], ENT_QUOTES, 'UTF-8');
- } elseif(Utils::issetAndNoEmpty('commentuser')) {
- $comment_user = $_POST["commentuser"];
- } elseif(isset($_POST["commentuser"])) {
- $err |= COMMENT_USER_EMPTY;
- } else {
- $comment_user = _('anonyme');
- }
+ $subject = '[' . NOMAPPLICATION . '] ' . _('Poll\'s participation') . ' : ' . $poll->title;
- if(Utils::issetAndNoEmpty('comment') === false) {
- $err |= COMMENT_EMPTY;
- }
-
- if (isset($_POST["comment"]) && !Utils::is_error(COMMENT_EMPTY) && !Utils::is_error(NO_POLL) && !Utils::is_error(COMMENT_USER_EMPTY)) {
- // protection contre les XSS : htmlentities
- $comment = htmlentities($_POST['comment'], ENT_QUOTES, 'UTF-8');
- $comment_user = htmlentities($comment_user, ENT_QUOTES, 'UTF-8');
-
- // Check for doublons
- $comment_doublon = false;
- $req = 'SELECT * FROM comments WHERE id_sondage='.$connect->Param('numsondage').' ORDER BY id_comment';
- $sql = $connect->Prepare($req);
- $comment_user_doublon = $connect->Execute($sql, array($numsondage));
- if ($comment_user_doublon->RecordCount() != 0) {
- while ( $dcomment_user_doublon=$comment_user_doublon->FetchNextObject(false)) {
- if($dcomment_user_doublon->comment == $comment && $dcomment_user_doublon->usercomment == $comment_user) {
- $comment_doublon = true;
- };
- }
+ $message = $name . ' ';
+ switch ($type) {
+ case UPDATE_VOTE:
+ $message .= _('updated a vote.\nYou can find your poll at the link') . " :\n\n";
+ break;
+ case ADD_VOTE:
+ $message .= _('filled a vote.\nYou can find your poll at the link') . " :\n\n";
+ break;
+ case ADD_COMMENT:
+ $message .= _('wrote a comment.\nYou can find your poll at the link') . " :\n\n";
+ break;
}
+ $message .= Utils::getUrlSondage($poll->admin_id, true) . "\n\n";
+ $message .= _('Thanks for your confidence.') . "\n" . NOMAPPLICATION;
- if(!$comment_doublon) {
- $req = 'INSERT INTO comments (id_sondage, comment, usercomment) VALUES ('.
- $connect->Param('id_sondage').','.
- $connect->Param('comment').','.
- $connect->Param('comment_user').')';
- $sql = $connect->Prepare($req);
+ $mailService->send($poll->admin_mail, $subject, $message);
- $comments = $connect->Execute($sql, array($numsondage, $comment, $comment_user));
- if ($comments === false) {
- $err |= COMMENT_INSERT_FAILED;
- }
- }
+ $_SESSION['mail_sent'][$poll->id] = true;
}
}
+/* PAGE */
+/* ---- */
-// Action quand on clique le bouton participer
-$sql = 'SELECT * FROM user_studs WHERE id_sondage='.$connect->Param('numsondage').' ORDER BY id_users';
-$sql = $connect->Prepare($sql);
-$user_studs = $connect->Execute($sql, array($numsondage));
-
-$nbcolonnes = substr_count($dsondage->sujet, ',') + 1;
-if (!Utils::is_error(NO_POLL) && (isset($_POST["boutonp"]))) {
- //Si le nom est bien entré
- if (Utils::issetAndNoEmpty('nom') === false) {
- $err |= NAME_EMPTY;
- }
-
- if(!Utils::is_error(NAME_EMPTY) && (! ( USE_REMOTE_USER && isset($_SERVER['REMOTE_USER']) ) || $_POST["nom"] == $_SESSION["nom"])) {
- $nouveauchoix = '';
- for ($i=0;$i<$nbcolonnes;$i++) {
- // radio checked 1 = Yes, 2 = Ifneedbe, 0 = No
- if (isset($_POST["choix$i"])) {
- switch ($_POST["choix$i"]) {
- case 1: $nouveauchoix .= "1";break;
- case 2: $nouveauchoix .= "2";break;
- default: $nouveauchoix .= "0";break;
- }
- }
- }
-
- $nom=substr($_POST["nom"],0,64);
-
- // protection contre les XSS : htmlentities
- $nom = htmlentities($nom, ENT_QUOTES, 'UTF-8');
-
- while($user = $user_studs->FetchNextObject(false)) {
- if ($nom == $user->nom) {
- $err |= NAME_TAKEN;
- }
- }
-
- // Ecriture des choix de l'utilisateur dans la base
- if (!Utils::is_error(NAME_TAKEN) && !Utils::is_error(NAME_EMPTY)) {
-
- $sql = 'INSERT INTO user_studs (nom,id_sondage,reponses) VALUES ('.
- $connect->Param('nom').', '.
- $connect->Param('numsondage').', '.
- $connect->Param('nouveauchoix').')';
- $sql = $connect->Prepare($sql);
-
- // Todo : Il faudrait lever une erreur en cas d'erreur d'insertion
- $connect->Execute($sql, array($nom, $numsondage, $nouveauchoix));
-
- if ($dsondage->mailsonde || /* compatibility for non boolean DB */ $dsondage->mailsonde=="yes" || $dsondage->mailsonde=="true") {
- if($config['use_smtp']==true){
- Utils::sendEmail( "$dsondage->mail_admin",
- "[".NOMAPPLICATION."] "._("Poll's participation")." : ".html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8')."",
- html_entity_decode("\"$nom\" ", ENT_QUOTES, 'UTF-8').
- _("has filled a line.\nYou can find your poll at the link") . " :\n\n".
- Utils::getUrlSondage($numsondage) . " \n\n" .
- _("Thanks for your confidence.") . "\n". NOMAPPLICATION );
- }
- }
- }
- } else {
- $err |= NAME_EMPTY;
- }
+if (!empty($_GET['poll'])) {
+ $poll_id = filter_input(INPUT_GET, 'poll', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => POLL_REGEX]]);
+ $poll = $pollService->findById($poll_id);
}
-if($err != 0) {
- Utils::print_header(_("Error!").' - '.$dsondage->titre);
- bandeau_titre(_("Error!"));
-
- echo '
'."\n";
-
- if(Utils::is_error(NAME_EMPTY)) {
- echo '' . _("Enter a name") . " \n";
- }
- if(Utils::is_error(NAME_TAKEN)) {
- echo '' . _("The name you've chosen already exist in this poll!") . " \n";
- }
- if(Utils::is_error(COMMENT_EMPTY) || Utils::is_error(COMMENT_USER_EMPTY)) {
- echo '' . _("Enter a name and a comment!") . " \n";
- }
- if(Utils::is_error(COMMENT_INSERT_FAILED) ) {
- echo '' . _("Failed to insert the comment!") . " \n";
- }
-
- echo ' ';
-
-} else {
- Utils::print_header(_('Poll').' - '.$dsondage->titre);
- bandeau_titre(_('Poll').' - '.$dsondage->titre);
+if (!$poll) {
+ $smarty->assign('error', _('This poll doesn\'t exist !'));
+ $smarty->display('error.tpl');
+ exit;
}
-$title=stripslashes(str_replace("\\","",$dsondage->titre));
-echo '
-
-
-
-
'.$title.'
-
-
-
- ' . _('Print') . '
- ' . _('Export to CSV') . '
-
-
-
-
-
'."\n";
+// -------------------------------
+// A vote is going to be edited
+// -------------------------------
-//affichage de la description du sondage
-if ($dsondage->commentaires) {
- $commentaires = $dsondage->commentaires;
- $commentaires=nl2br(str_replace("\\","",$commentaires));
- echo '
-
';
-}
-echo '
-
-
'."\n"; // .jumbotron
-
-//On récupere les données et les sujets du sondage
-$nblignes = $user_studs->RecordCount();
-
-//on teste pour voir si une ligne doit etre modifiée
-$testmodifier = false;
-$ligneamodifier = -1;
-for ($i=0;$i<$nblignes;$i++) {
- if (isset($_POST["modifierligne$i"])) {
- $ligneamodifier = $i;
- }
-
- //test pour voir si une ligne est a modifier
- if (isset($_POST['validermodifier'.$i])) {
- $modifier = $i;
- $testmodifier = true;
- }
+if (!empty($_POST['edit_vote'])) {
+ $editingVoteId = filter_input(INPUT_POST, 'edit_vote', FILTER_VALIDATE_INT);
}
-//si le test est valide alors on affiche des checkbox pour entrer de nouvelles valeurs
-if ($testmodifier) {
- $nouveauchoix = '';
- for ($i=0;$i<$nbcolonnes;$i++) {
- // radio checked 1 = Yes, 2 = Ifneedbe, 0 = No
- if (isset($_POST["choix$i"])) {
- switch ($_POST["choix$i"]) {
- case 1: $nouveauchoix .= "1";break;
- case 2: $nouveauchoix .= "2";break;
- default: $nouveauchoix .= "0";break;
- }
- }
+// -------------------------------
+// Something to save (edit or add)
+// -------------------------------
+
+if (!empty($_POST['save'])) { // Save edition of an old vote
+ $name = filter_input(INPUT_POST, 'name', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => NAME_REGEX]]);
+ $editedVote = filter_input(INPUT_POST, 'save', FILTER_VALIDATE_INT);
+ $choices = $inputService->filterArray($_POST['choices'], FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => CHOICE_REGEX]]);
+
+ if (empty($editedVote)) {
+ $message = new Message('danger', _('Something is going wrong...'));
+ }
+ if (count($choices) != count($_POST['choices'])) {
+ $message = new Message('danger', _('There is a problem with your choices.'));
}
- $compteur=0;
- while ($data = $user_studs->FetchNextObject(false) ) {
- //mise a jour des données de l'utilisateur dans la base SQL
- if ($compteur == $modifier) {
- $sql = 'UPDATE user_studs SET reponses='.$connect->Param('nouveauchoix').' WHERE nom='.$connect->Param('nom').' AND id_users='.$connect->Param('id_users');
- $sql = $connect->Prepare($sql);
- $connect->Execute($sql, array($nouveauchoix, $data->nom, $data->id_users));
-
- if ($dsondage->mailsonde=="yes") {
- Utils::sendEmail( "$dsondage->mail_admin", "[".NOMAPPLICATION."] " . _("Poll's participation") . " : ".html_entity_decode($dsondage->titre, ENT_QUOTES, 'UTF-8'), "\"".html_entity_decode($data->nom, ENT_QUOTES, 'UTF-8')."\""."" . _("has filled a line.\nYou can find your poll at the link") . " :\n\n" . Utils::getUrlSondage($numsondage) . " \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION );
- }
- }
- $compteur++;
- }
-}
-
-//recuperation des utilisateurs du sondage
-$sql = 'SELECT * FROM user_studs WHERE id_sondage='.$connect->Param('numsondage').' ORDER BY id_users';
-$sql = $connect->Prepare($sql);
-$user_studs = $connect->Execute($sql, array($numsondage));
-
-//reformatage des données des sujets du sondage
-$toutsujet = explode(",",$dsondage->sujet);
-
-// Table headers
-$thead = '
';
-
-// Button in the first td to avoid remove col on "Return" keypress)
-$border = array(); // bordure pour distinguer les mois
-$td_headers = array(); // for a11y, headers="M1 D4 H5" on each td
-$radio_title = array(); // date for
-
-// Dates poll
-if ($dsondage->format=="D"||$dsondage->format=="D+"||$dsondage->format=="D-") {
-
- $tr_months = ' ';
- $tr_days = ' ';
- $tr_hours = ' ';
-
- // Headers
- $colspan_month = 1;
- $colspan_day = 1;
-
- for ($i = 0; $i < count($toutsujet); $i++) {
-
- // Current date
- $current = $toutsujet[$i];
- $horoCur = explode("@",$current); //horoCur[0] = date, horoCur[1] = hour
- if (isset($toutsujet[$i+1])){
- $next = $toutsujet[$i+1];
- $horoNext = explode("@",$next);
- }
-
- $border[$i] = false;
- $radio_title[$i] = strftime($date_format['txt_short'],$horoCur[0]);
-
- // Months
- $td_headers[$i] = 'M'.($i+1-$colspan_month);
-
- if (isset($toutsujet[$i+1]) && strftime("%B", $horoCur[0]) == strftime("%B", $horoNext[0]) && strftime("%Y", $horoCur[0]) == strftime("%Y", $horoNext[0])){
- $colspan_month++;
+ if ($message == null) {
+ // Update vote
+ $result = $pollService->updateVote($poll_id, $editedVote, $name, $choices);
+ if ($result) {
+ $message = new Message('success', _('Update vote successfully.'));
+ sendUpdateNotification($poll, $mailService, $name, UPDATE_VOTE);
} else {
- $border[$i] = true;
- $tr_months .= ''.strftime("%B",$horoCur[0]).' '.strftime("%Y", $horoCur[0]).' ';
- $colspan_month=1;
+ $message = new Message('danger', _('Update vote failed.'));
}
+ }
+} elseif (isset($_POST['save'])) { // Add a new vote
+ $name = filter_input(INPUT_POST, 'name', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => NAME_REGEX]]);
+ $choices = $inputService->filterArray($_POST['choices'], FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => CHOICE_REGEX]]);
- // Days
- $td_headers[$i] .= ' D'.($i+1-$colspan_day);
+ if (empty($name)) {
+ $message = new Message('danger', _('Name is incorrect.'));
+ }
+ if (count($choices) != count($_POST['choices'])) {
+ $message = new Message('danger', _('There is a problem with your choices.'));
+ }
- if (isset($toutsujet[$i+1]) && strftime($date_format['txt_day'],$horoCur[0])==strftime($date_format['txt_day'],$horoNext[0])&&strftime("%B",$horoCur[0])==strftime("%B",$horoNext[0])){
- $colspan_day++;
+ if ($message == null) {
+ // Add vote
+ $result = $pollService->addVote($poll_id, $name, $choices);
+ if ($result) {
+ $message = new Message('success', _('Update vote successfully.'));
+ sendUpdateNotification($poll, $mailService, $name, ADD_VOTE);
} else {
- $rbd = ($border[$i]) ? ' rbd' : '';
- $tr_days .= ''.strftime($date_format['txt_day'],$horoCur[0]).' ';
- $colspan_day=1;
+ $message = new Message('danger', _('Update vote failed.'));
}
+ }
+}
- // Hours
- $rbd = ($border[$i]) ? ' rbd' : '';
- if (isset($horoCur[1]) && $horoCur[1] !== '') {
- $tr_hours .= ''.$horoCur[1].' ';
- $radio_title[$i] .= ' - '.$horoCur[1];
- $td_headers[$i] .= ' H'.$i;
+// -------------------------------
+// Add a comment
+// -------------------------------
+
+if (isset($_POST['add_comment'])) {
+ $name = filter_input(INPUT_POST, 'name', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => NAME_REGEX]]);
+ $comment = strip_tags($_POST['comment']);
+
+ if (empty($name)) {
+ $message = new Message('danger', _('Name is incorrect.'));
+ }
+
+ if ($message == null) {
+ // Add comment
+ $result = $pollService->addComment($poll_id, $name, $comment);
+ if ($result) {
+ $message = new Message('success', _('Comment added.'));
+ sendUpdateNotification($poll, $mailService, $name, ADD_COMMENT);
} else {
- $tr_hours .= ' ';
+ $message = new Message('danger', _('Comment failed.'));
}
}
- $border[count($border)-1] = false; // suppression de la bordure droite du dernier mois
-
- $tr_months .= ' ';
- $tr_days .= ' ';
- $tr_hours .= ' ';
-
- $thead = "\n".$tr_months."\n".$tr_days."\n".$tr_hours."\n";
-
-// Subjects poll
-} else {
- $toutsujet=str_replace("@"," ",$toutsujet);
-
- $tr_subjects = ' ';
-
- for ($i = 0; isset($toutsujet[$i]); $i++) {
-
- $td_headers[$i]='';$radio_title[$i]=''; // init before concatenate
-
- // Subjects
- preg_match_all('/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/',$toutsujet[$i],$md_a_img); // Markdown [![alt](src)](href)
- preg_match_all('/!\[(.*?)\]\((.*?)\)/',$toutsujet[$i],$md_img); // Markdown ![alt](src)
- preg_match_all('/\[(.*?)\]\((.*?)\)/',$toutsujet[$i],$md_a); // Markdown [text](href)
- if (isset($md_a_img[2][0]) && $md_a_img[2][0]!='' && isset($md_a_img[3][0]) && $md_a_img[3][0]!='') { // [![alt](src)](href)
-
- $th_subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0]!='') ? stripslashes($md_a_img[1][0]) : _("Choice") .' '.($i+1);
- $th_subject_html = ' ';
-
- } elseif (isset($md_img[2][0]) && $md_img[2][0]!='') { // ![alt](src)
-
- $th_subject_text = (isset($md_img[1][0]) && $md_img[1][0]!='') ? stripslashes($md_img[1][0]) : _("Choice") .' '.($i+1);
- $th_subject_html = ' ';
-
- } elseif (isset($md_a[2][0]) && $md_a[2][0]!='') { // [text](href)
-
- $th_subject_text = (isset($md_a[1][0]) && $md_a[1][0]!='') ? stripslashes($md_a[1][0]) : _("Choice") .' '.($i+1);
- $th_subject_html = ''.$th_subject_text.' ';
-
- } else { // text only
-
- $th_subject_text = stripslashes($toutsujet[$i]);
- $th_subject_html = $th_subject_text;
-
- }
- $tr_subjects .= ''.$th_subject_html.' ';
-
- $border[$i] = false;
- $td_headers[$i] .= 'S'.$i;
- $radio_title[$i] .= $th_subject_text;
-
- }
-
- $thead = $tr_subjects.' ';
}
-// Print headers
-echo '
-';
-
-bandeau_pied();
+$smarty->display('studs.tpl');
diff --git a/tpl/add_slot.tpl b/tpl/add_slot.tpl
new file mode 100644
index 0000000..40e23a6
--- /dev/null
+++ b/tpl/add_slot.tpl
@@ -0,0 +1,39 @@
+{extends file='page.tpl'}
+
+{block name=main}
+
+{/block}
\ No newline at end of file
diff --git a/tpl/admin/admin_page.tpl b/tpl/admin/admin_page.tpl
new file mode 100644
index 0000000..2fb2f77
--- /dev/null
+++ b/tpl/admin/admin_page.tpl
@@ -0,0 +1,10 @@
+{extends 'page.tpl'}
+
+{block 'main'}
+
+ {block 'admin_main'}{/block}
+{/block}
\ No newline at end of file
diff --git a/tpl/admin/index.tpl b/tpl/admin/index.tpl
new file mode 100644
index 0000000..a2453d3
--- /dev/null
+++ b/tpl/admin/index.tpl
@@ -0,0 +1,20 @@
+{extends 'admin/admin_page.tpl'}
+
+{block 'main'}
+
+
+
+
+ {if $logsAreReadable}
+
+ {/if}
+
+{/block}
\ No newline at end of file
diff --git a/tpl/admin/logs.tpl b/tpl/admin/logs.tpl
new file mode 100644
index 0000000..9855291
--- /dev/null
+++ b/tpl/admin/logs.tpl
@@ -0,0 +1,5 @@
+{extends 'admin/admin_page.tpl'}
+
+{block 'admin_main'}
+{$logs|html}
+{/block}
diff --git a/tpl/admin/migration.tpl b/tpl/admin/migration.tpl
new file mode 100644
index 0000000..1d904bf
--- /dev/null
+++ b/tpl/admin/migration.tpl
@@ -0,0 +1,39 @@
+{extends 'admin/admin_page.tpl'}
+
+{block 'admin_main'}
+
+
+
{_('Summary')}
+ {_('Succeeded:')} {$countSucceeded|html} / {$countTotal|html}
+
+ {_('Failed:')} {$countFailed|html} / {$countTotal|html}
+
+ {_('Skipped:')} {$countSkipped|html} / {$countTotal|html}
+
+
+
{_('Success')}
+
+ {foreach $success as $s}
+ {$s|html}
+ {foreachelse}
+ {_('Nothing')}
+ {/foreach}
+
+
+
+
+
{_('Fail')}
+
+ {foreach $fail as $f}
+ {$f|html}
+ {foreachelse}
+ {_('Nothing')}
+ {/foreach}
+
+
+
+
+ {_('Page generated in')} {$time} {_('secondes')}
+
+
+{/block}
\ No newline at end of file
diff --git a/tpl/admin/polls.tpl b/tpl/admin/polls.tpl
new file mode 100644
index 0000000..9da7819
--- /dev/null
+++ b/tpl/admin/polls.tpl
@@ -0,0 +1,75 @@
+{extends 'admin/admin_page.tpl'}
+
+{block 'admin_main'}
+
+{/block}
\ No newline at end of file
diff --git a/tpl/admin/purge.tpl b/tpl/admin/purge.tpl
new file mode 100644
index 0000000..d36553d
--- /dev/null
+++ b/tpl/admin/purge.tpl
@@ -0,0 +1,13 @@
+{extends 'admin/admin_page.tpl'}
+
+{block 'admin_main'}
+ {if $message}
+ {$message|html}×
+ {/if}
+
+{/block}
\ No newline at end of file
diff --git a/tpl/confirm/delete_comments.tpl b/tpl/confirm/delete_comments.tpl
new file mode 100644
index 0000000..bbc6a67
--- /dev/null
+++ b/tpl/confirm/delete_comments.tpl
@@ -0,0 +1,11 @@
+{extends file='page.tpl'}
+
+{block name=main}
+
+{/block}
\ No newline at end of file
diff --git a/tpl/confirm/delete_poll.tpl b/tpl/confirm/delete_poll.tpl
new file mode 100644
index 0000000..e2cbbe5
--- /dev/null
+++ b/tpl/confirm/delete_poll.tpl
@@ -0,0 +1,11 @@
+{extends file='page.tpl'}
+
+{block name=main}
+
+{/block}
\ No newline at end of file
diff --git a/tpl/confirm/delete_votes.tpl b/tpl/confirm/delete_votes.tpl
new file mode 100644
index 0000000..d807201
--- /dev/null
+++ b/tpl/confirm/delete_votes.tpl
@@ -0,0 +1,11 @@
+{extends file='page.tpl'}
+
+{block name=main}
+
+{/block}
\ No newline at end of file
diff --git a/tpl/error.tpl b/tpl/error.tpl
new file mode 100644
index 0000000..1c7452a
--- /dev/null
+++ b/tpl/error.tpl
@@ -0,0 +1,8 @@
+{extends file='page.tpl'}
+
+{block name=main}
+
+{/block}
diff --git a/tpl/footer.tpl b/tpl/footer.tpl
new file mode 100644
index 0000000..0313ca5
--- /dev/null
+++ b/tpl/footer.tpl
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/tpl/head.tpl b/tpl/head.tpl
new file mode 100644
index 0000000..3b8bbac
--- /dev/null
+++ b/tpl/head.tpl
@@ -0,0 +1,29 @@
+
+
+
+
+
+ {if !empty($title)}
+ {$title|html} - {$APPLICATION_NAME|html}
+ {else}
+ {$APPLICATION_NAME|html}
+ {/if}
+
+
+
+
+
+
+
+
+
+
+
+
+ {if !empty($nav_js)}
+
+ {/if}
+
+
+
+
\ No newline at end of file
diff --git a/tpl/header.tpl b/tpl/header.tpl
new file mode 100644
index 0000000..1fa06c2
--- /dev/null
+++ b/tpl/header.tpl
@@ -0,0 +1,21 @@
+
+
\ No newline at end of file
diff --git a/tpl/page.tpl b/tpl/page.tpl
new file mode 100644
index 0000000..025864a
--- /dev/null
+++ b/tpl/page.tpl
@@ -0,0 +1,6 @@
+{include file='head.tpl'}
+{include file='header.tpl'}
+
+{block name=main}{/block}
+
+{include file='footer.tpl'}
\ No newline at end of file
diff --git a/tpl/part/comments.tpl b/tpl/part/comments.tpl
new file mode 100644
index 0000000..5923cc9
--- /dev/null
+++ b/tpl/part/comments.tpl
@@ -0,0 +1,40 @@
+
+
\ No newline at end of file
diff --git a/tpl/part/poll_hint.tpl b/tpl/part/poll_hint.tpl
new file mode 100644
index 0000000..341a9f1
--- /dev/null
+++ b/tpl/part/poll_hint.tpl
@@ -0,0 +1,11 @@
+{if $active}
+
+
{_("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.")}
+
{_('Legend:')} = {_('Yes')}, ( ) = {_('Ifneedbe')}, = {_('No')}
+
+{else}
+
+
{_("The administrator locked this poll, votes and comments are frozen, it's not possible to participate anymore.")}
+
{_('Legend:')} = {_('Yes')}, ( ) = {_('Ifneedbe')}, = {_('No')}
+
+{/if}
\ No newline at end of file
diff --git a/tpl/part/poll_hint_admin.tpl b/tpl/part/poll_hint_admin.tpl
new file mode 100644
index 0000000..2b7c1c3
--- /dev/null
+++ b/tpl/part/poll_hint_admin.tpl
@@ -0,0 +1,7 @@
+
+
{_('As poll administrator, you can change all the lines of this poll with this button')} {_('Edit')} ,
+ {_('remove a column or a line with')} {_('Remove')}
+ {_('and add a new column with')} {_('Add a column')} .
+
{_('Finally, you can change the informations of this poll like the title, the comments or your email address.')}
+
{_('Legend:')} = {_('Yes')}, ( ) = {_('Ifneedbe')}, = {_('No')}
+
\ No newline at end of file
diff --git a/tpl/part/poll_info.tpl b/tpl/part/poll_info.tpl
new file mode 100644
index 0000000..360e09a
--- /dev/null
+++ b/tpl/part/poll_info.tpl
@@ -0,0 +1,160 @@
+{$admin = $admin|default:false}
+
+{if $admin}{/if}
diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl
new file mode 100644
index 0000000..c6dc236
--- /dev/null
+++ b/tpl/part/vote_table_classic.tpl
@@ -0,0 +1,196 @@
+{if !is_array($best_choices) || empty($best_choices)}
+ {$best_choices = [0]}
+{/if}
+
+{_('Votes of the poll')}
+
+
+
+{* Best votes listing *}
+
+{$max = max($best_choices)}
+{if $max > 0}
+
+ {if $count_bests == 1}
+
{_("Best choice")}
+
+
{_('The best choice at this time is:')}
+ {elseif $count_bests > 1}
+
{_("Best choices")}
+
+
{_('The bests choices at this time are:')}
+ {/if}
+
+
+ {$i = 0}
+
+ {foreach $slots as $slot}
+ {if $best_choices[$i] == $max}
+ {$slot->title|html|markdown:true}
+ {/if}
+ {$i = $i+1}
+ {/foreach}
+
+
{_('with')} {$max|html} {if $max==1}{_('vote')}{else}{_('votes')}{/if}.
+
+
+{/if}
\ No newline at end of file
diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl
new file mode 100644
index 0000000..3343243
--- /dev/null
+++ b/tpl/part/vote_table_date.tpl
@@ -0,0 +1,246 @@
+{if !is_array($best_choices) || empty($best_choices)}
+ {$best_choices = [0]}
+{/if}
+
+
{_('Votes of the poll')}
+
+
+
+{* Best votes listing *}
+
+{$max = max($best_choices)}
+{if $max > 0}
+
+ {if $count_bests == 1}
+
{_('Best choice')}
+
+
{_('The best choice at this time is:')}
+ {elseif $count_bests > 1}
+
{_('Best choices')}
+
+
{_('The bests choices at this time are:')}
+ {/if}
+
+
+ {$i = 0}
+
+ {foreach $slots as $slot}
+ {foreach $slot->moments as $moment}
+ {if $best_choices[$i] == $max}
+ {$slot->day|date_format:$date_format.txt_full|html} - {$moment|html}
+ {/if}
+ {$i = $i+1}
+ {/foreach}
+ {/foreach}
+
+
{_('with')} {$max|html} {if $max==1}{_('vote')}{else}{_('votes')}{/if}.
+
+
+{/if}
\ No newline at end of file
diff --git a/tpl/poll_deleted.tpl b/tpl/poll_deleted.tpl
new file mode 100644
index 0000000..f0b46a2
--- /dev/null
+++ b/tpl/poll_deleted.tpl
@@ -0,0 +1,8 @@
+{extends file='page.tpl'}
+
+{block name=main}
+
+
{_("Your poll has been removed!")}
+
{_('Back to the homepage of')} {$APPLICATION_NAME|html}
+
+{/block}
\ No newline at end of file
diff --git a/tpl/studs.tpl b/tpl/studs.tpl
new file mode 100644
index 0000000..c4280fe
--- /dev/null
+++ b/tpl/studs.tpl
@@ -0,0 +1,52 @@
+{extends file='page.tpl'}
+
+{block name=main}
+
+ {if !empty($message)}
+
{$message->message|html}×
+ {/if}
+
+{* Global informations about the current poll *}
+
+{include 'part/poll_info.tpl' admin=$admin}
+
+{* Information about voting *}
+{if $expired}
+
+
{_('The poll is expired, it will be deleted soon.')}
+
{_('Deletion date:')} {$deletion_date|date_format:$date_format['txt_short']|html}
+
+{else}
+ {if $admin}
+ {include 'part/poll_hint_admin.tpl'}
+ {else}
+ {include 'part/poll_hint.tpl' active=$poll->active}
+ {/if}
+{/if}
+
+{* Scroll left and right *}
+
+
+
+{* Vote table *}
+
+{if $poll->format === 'D'}
+ {include 'part/vote_table_date.tpl' active=$poll->active}
+{else}
+ {include 'part/vote_table_classic.tpl' active=$poll->active}
+{/if}
+
+{* Comments *}
+
+{include 'part/comments.tpl' active=$poll->active comments=$comments}
+
+{/block}
\ No newline at end of file