branch refonteUI created (now c3960ad)
This is an automated email from the git hooks/post-receive script. New change to branch refonteUI in repository pollen. See http://git.chorem.org/pollen.git at c3960ad Init refonteUI branch for new design integration. Begining of page reorganization This branch includes the following new commits: new c3960ad Init refonteUI branch for new design integration. Begining of page reorganization The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit c3960adb92c78c7afc4e00abb01536325f5ab0ae Author: Léo Kaufmann <kaufmann@codelutin.com> Date: Thu Mar 12 17:38:14 2015 +0100 Init refonteUI branch for new design integration. Begining of page reorganization -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch refonteUI in repository pollen. See http://git.chorem.org/pollen.git commit c3960adb92c78c7afc4e00abb01536325f5ab0ae Author: Léo Kaufmann <kaufmann@codelutin.com> Date: Thu Mar 12 17:38:14 2015 +0100 Init refonteUI branch for new design integration. Begining of page reorganization --- pollen-ui-angular/src/main/webapp/i18n/en.js | 8 +- pollen-ui-angular/src/main/webapp/i18n/fr.js | 8 +- .../main/webapp/partials/poll-listParticipant.html | 329 +++++++++++++++------ .../src/main/webapp/partials/poll-poll.html | 148 ++++++--- .../src/main/webapp/partials/poll-settings.html | 231 +-------------- .../src/main/webapp/partials/poll.html | 24 +- 6 files changed, 399 insertions(+), 349 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/i18n/en.js b/pollen-ui-angular/src/main/webapp/i18n/en.js index c7bedcb..3643d2c 100644 --- a/pollen-ui-angular/src/main/webapp/i18n/en.js +++ b/pollen-ui-angular/src/main/webapp/i18n/en.js @@ -118,6 +118,7 @@ var translateEN = { 'poll.edit' : 'Click to edit', 'poll.edit.choice' : 'Click to edit the choice', 'poll.edit.title' : 'Click to edit the title', +'poll.title' : 'Title', 'poll.desc' : 'Description is optional. This message will not visible in vote page.', 'poll.saved' : 'Poll saved.', 'poll.created.printLink' : 'You can modify your poll to using this address when you are not connected: {{url}}', @@ -145,8 +146,13 @@ var translateEN = { 'poll.result.group.title.other' : 'Group : {{name}}, {{nbVoter}} voters', 'poll.config.title.creator' : 'Creator information', 'poll.config.title.poll' : 'Global config', +'poll.config.title.poll.informations' : 'Informations', +'poll.config.title.poll.creator' : 'Creator', +'poll.config.title.poll.validityDates' : 'Validity dates', +'poll.config.title.poll.voteCountingType': 'Vote counting Type', 'poll.config.title.choice' : 'Choice config', 'poll.config.title.vote' : 'Vote config', +'poll.config.title.visibility' : 'Visibility and restrictions', 'poll.config.label.creatorName' : 'Your name', 'poll.config.label.creatorEmail' : 'Your e-mail', 'poll.config.label.creatorEmail.help' : 'This e-mail is use for notify', @@ -159,7 +165,6 @@ var translateEN = { 'poll.config.label.endChoiceDate' : 'Add choice end date', 'poll.config.label.limitedVote' : 'Limited choice', 'poll.config.label.maxChoiceNumber' : 'Max number of choice', -'poll.config.label.voteCountingType' : 'Vote counting Type', 'poll.config.label.voteVisibility' : 'Vote visibility', 'poll.config.label.anonymousVoteAllowed' : 'Anonymous vote allowed', 'poll.config.label.commentVisibility' : 'Comment visibility', @@ -209,6 +214,7 @@ var translateEN = { 'action.vote' : 'Vote', 'action.search' : 'Search', 'action.comment' : 'Comment', +'action.createPoll' : 'Create the poll', 'action.restricted.addVoter' : 'Add a Voter', 'action.restricted.deleteVoter' : 'Delete the Voter', 'action.restricted.addGroup' : 'Add a Group', diff --git a/pollen-ui-angular/src/main/webapp/i18n/fr.js b/pollen-ui-angular/src/main/webapp/i18n/fr.js index b9b2dc7..d1e74a6 100644 --- a/pollen-ui-angular/src/main/webapp/i18n/fr.js +++ b/pollen-ui-angular/src/main/webapp/i18n/fr.js @@ -118,6 +118,7 @@ var translateFR = { 'poll.edit' : 'Cliquez pour modifier', 'poll.edit.choice' : 'Cliquez pour modifier le choix', 'poll.edit.title' : 'Cliquez pour modifier le titre', +'poll.title' : 'Titre', 'poll.desc' : 'Description (facultative). Ce cadre n\'apparait pas si aucune description n\'est saisie.', 'poll.saved' : 'Sondage sauvegardé', 'poll.created.printLink' : 'Garder le lien suivant pour pouvoir modifier votre sondage plus tard, lorsque vous n\'êtes pas connecté : {{url}}', @@ -145,8 +146,13 @@ var translateFR = { 'poll.result.group.title.other' : 'Groupe : {{name}}, {{nbVoter}} votants', 'poll.config.title.creator' : 'Information du créateur', 'poll.config.title.poll' : 'Configuration globale', +'poll.config.title.poll.informations' : 'Informations', +'poll.config.title.poll.creator' : 'Créateur', +'poll.config.title.poll.validityDates' : 'Période de validité', +'poll.config.title.poll.voteCountingType': 'Type de scrutin', 'poll.config.title.choice' : 'Configuration des choix', 'poll.config.title.vote' : 'Configuration des votes', +'poll.config.title.visibility' : 'Visibilité et restrictions', 'poll.config.label.creatorName' : 'Votre nom', 'poll.config.label.creatorEmail' : 'Votre courriel', 'poll.config.label.creatorEmail.help' : 'Cette adresse servira pour les notifications', @@ -159,7 +165,6 @@ var translateFR = { 'poll.config.label.endChoiceDate' : 'Date de fin d\'ajout de choix', 'poll.config.label.limitedVote' : 'Limiter les votes', 'poll.config.label.maxChoiceNumber' : 'Nombre maximum de votes', -'poll.config.label.voteCountingType' : 'Type de scrutin', 'poll.config.label.voteVisibility' : 'Visibilité des votes', 'poll.config.label.anonymousVoteAllowed' : 'Autoriser les votes anonymes', 'poll.config.label.commentVisibility' : 'Visibilité des commentaires', @@ -209,6 +214,7 @@ var translateFR = { 'action.vote' : 'Voter', 'action.comment' : 'Commenter', 'action.search' : 'Rechercher', +'action.createPoll' : 'Créer le sondage', 'action.restricted.addVoter' : 'Ajouter un votant', 'action.restricted.deleteVoter' : 'Supprimer le votant', 'action.restricted.addGroup' : 'Ajouter un groupe de votants', diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-listParticipant.html b/pollen-ui-angular/src/main/webapp/partials/poll-listParticipant.html index d65d418..357c72f 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-listParticipant.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-listParticipant.html @@ -18,102 +18,253 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #L% --> -<h1>{{data.poll.title}}</h1> -<h2> - {{ 'poll.restricted.pollType' | translate }} - <info-error error="restError.pollType" data="data.poll.pollType" append-class="fa-lg"></info-error> -</h2> -<div> - <label for="formFree"> - <input type="radio" ng-model="data.poll.pollType" name="type" value="FREE" id="formFree" auto-save="autoSavePoll()"/> - {{ 'poll.restricted.free' | translate }} - </label> - <label for="formRestricted"> - <input type="radio" ng-model="data.poll.pollType" name="type" value="RESTRICTED" id="formRestricted" auto-save="autoSavePoll()"/> - {{ 'poll.restricted.restricted' | translate }} - </label> - <label for="formGroup"> - <input type="radio" ng-model="data.poll.pollType" name="type" value="GROUP" id="formGroup" auto-save="autoSavePoll()"/> - {{ 'poll.restricted.group' | translate }} - </label> - - - - <div class="container-fluid" ng-hide="data.poll.pollType == 'FREE'"> - <hr/> - - <div class="row"> - <button class="btn btn-info" ng-show="data.poll.pollType == 'GROUP'" ng-click="addGroup()"><span class="fa fa-plus"></span> {{ 'action.restricted.addGroup' | translate }}</button> - <button class="btn btn-warning" disabled><span class="fa fa-envelope"></span> {{ 'action.restricted.notify' | translate }}</button> + +<form> + + <fieldset> + + <h4>{{ 'poll.config.title.vote' | translate }}</h4> + + <div class="form-group row"> + <label class="col-sm-4 control-label"> + {{ 'poll.config.label.voteVisibility' | translate }} + </label> + <div class="col-sm-6"> + <label class="label-block"> + <input type="radio" + ng-model="data.poll.voteVisibility" + auto-save="autoSavePoll()" + value="EVERYBODY" /> + {{ 'poll.config.value.visibility.everybody' | translate }} + </label> + + <label class="label-block"> + <input type="radio" + ng-model="data.poll.voteVisibility" + auto-save="autoSavePoll()" + value="VOTER" /> + {{ 'poll.config.value.visibility.voter' | translate }} + </label> + + <label class="label-block"> + <input type="radio" + ng-model="data.poll.voteVisibility" + auto-save="autoSavePoll()" + value="CREATOR" /> + {{ 'poll.config.value.visibility.creator' | translate }} + </label> + + <label class="label-block"> + <input type="radio" + ng-model="data.poll.voteVisibility" + auto-save="autoSavePoll()" + value="ANONYMOUS" /> + {{ 'poll.config.value.visibility.anonymous' | translate }} + </label> + </div> + <div class="col-sm-2"> + <info-error error="restError.voteVisibility[0]" data="data.poll.voteVisibility" append-class="fa-2x"></info-error> + </div> </div> - <div class="row" ng-if="data.favoriteList"> - <hr/> + <div class="form-group row"> + <label class="col-sm-4 control-label" for="formAnonymousVoteAllowed"> + {{ 'poll.config.label.anonymousVoteAllowed' | translate }} + </label> + <div class="col-sm-6 btn-group"> + <input type="checkbox" id="formAnonymousVoteAllowed" ng-model="data.poll.anonymousVoteAllowed" auto-save="autoSavePoll()" /> + </div> </div> + + <h4>{{ 'poll.config.title.poll' | translate }}</h4> - <div class="row text-right" ng-if="data.favoriteList"> + <div class="form-group row"> + <label class="col-sm-4 control-label"> + {{ 'poll.config.label.resultVisibility' | translate }} + </label> <div class="col-sm-6"> - <h4>{{ 'user.favoriteList' | translate }}</h4> + <label class="label-block"> + <input type="radio" + ng-model="data.poll.resultVisibility" + name="resultVisibility" + value="EVERYBODY" + auto-save="autoSavePoll()" /> + {{ 'poll.config.value.visibility.everybody' | translate }} + </label> + + <label class="label-block"> + <input type="radio" + ng-model="data.poll.resultVisibility" + name="resultVisibility" + value="VOTER" + auto-save="autoSavePoll()" /> + {{ 'poll.config.value.visibility.voter' | translate }} + </label> + + <label class="label-block"> + <input type="radio" + ng-model="data.poll.resultVisibility" + name="resultVisibility" + value="CREATOR" + auto-save="autoSavePoll()" /> + {{ 'poll.config.value.visibility.creator' | translate }} + </label> </div> + <div class="col-sm-2"> + <info-error error="restError.resultVisibility[0]" data="data.poll.resultVisibility" append-class="fa-2x"></info-error> + </div> + </div> + + <div class="form-group row"> + <label class="col-sm-4 control-label" for="formContinuousResults"> + {{ 'poll.config.label.continuousResults' | translate }} + </label> <div class="col-sm-6"> - <select class="form-control" - ng-model="data.favoriteListImport" - ng-options="favList.id as favList.name for favList in data.favoriteList"> - </select> + <input type="checkbox" id="formContinuousResults" ng-model="data.poll.continuousResults" auto-save="autoSavePoll()" /> + </div> + <div class="col-sm-2"></div> + </div> + + <div class="form-group row"> + <label class="col-sm-4 control-label"> + {{ 'poll.config.label.commentVisibility' | translate }} + </label> + <div class="col-sm-6"> + <label class="label-block"> + <input type="radio" + ng-model="data.poll.commentVisibility" + name="commentVisibility" + value="EVERYBODY" + auto-save="autoSavePoll()" /> + {{ 'poll.config.value.visibility.everybody' | translate }} + </label> + + <label class="label-block"> + <input type="radio" + ng-model="data.poll.commentVisibility" + name="commentVisibility" + value="VOTER" + auto-save="autoSavePoll()" /> + {{ 'poll.config.value.visibility.voter' | translate }} + </label> + + <label class="label-block"> + <input type="radio" + ng-model="data.poll.commentVisibility" + name="commentVisibility" + value="NOBODY" + auto-save="autoSavePoll()" /> + {{ 'poll.config.value.visibility.nobody' | translate }} + </label> + </div> + <div class="col-sm-2"> + <info-error error="restError.commentVisibility[0]" data="data.poll.commentVisibility" append-class="fa-2x"></info-error> </div> </div> + + </fieldset> + + <fieldset> + + <h1>{{data.poll.title}}</h1> + <h2> + {{ 'poll.restricted.pollType' | translate }} + <info-error error="restError.pollType" data="data.poll.pollType" append-class="fa-lg"></info-error> + </h2> + <div> + <label for="formFree"> + <input type="radio" ng-model="data.poll.pollType" name="type" value="FREE" id="formFree" auto-save="autoSavePoll()"/> + {{ 'poll.restricted.free' | translate }} + </label> + <label for="formRestricted"> + <input type="radio" ng-model="data.poll.pollType" name="type" value="RESTRICTED" id="formRestricted" auto-save="autoSavePoll()"/> + {{ 'poll.restricted.restricted' | translate }} + </label> + <label for="formGroup"> + <input type="radio" ng-model="data.poll.pollType" name="type" value="GROUP" id="formGroup" auto-save="autoSavePoll()"/> + {{ 'poll.restricted.group' | translate }} + </label> + + + + <div class="container-fluid" ng-hide="data.poll.pollType == 'FREE'"> + <hr/> + + <div class="row"> + <button class="btn btn-info" ng-show="data.poll.pollType == 'GROUP'" ng-click="addGroup()"><span class="fa fa-plus"></span> {{ 'action.restricted.addGroup' | translate }}</button> + <button class="btn btn-warning" disabled><span class="fa fa-envelope"></span> {{ 'action.restricted.notify' | translate }}</button> + </div> + + <div class="row" ng-if="data.favoriteList"> + <hr/> + </div> + + <div class="row text-right" ng-if="data.favoriteList"> + <div class="col-sm-6"> + <h4>{{ 'user.favoriteList' | translate }}</h4> + </div> + <div class="col-sm-6"> + <select class="form-control" + ng-model="data.favoriteListImport" + ng-options="favList.id as favList.name for favList in data.favoriteList"> + </select> + </div> + </div> + + <hr/> + </div> + + + + <table ng-repeat="voterList in data.voterList" class="voterList" ng-hide="data.poll.pollType == 'FREE'"> + + <tr ng-show="data.poll.pollType == 'GROUP'" ng-class="{'has-success':voterList.group.id && !voterList.group.restError}"> + <th colspan="2"> + <input-error error="voterList.group.restError.name[0]"> + <input type="text" name="group" placeholder="name group" ng-model="voterList.group.name" class="form-control" auto-save="saveVoterList(voterList)" focus-me="!voterList.group.id"/> + </input-error> + </th> + <th class="weight" ng-class="{'has-error':voterList.group.restError.weight}"> <input type="number" step="0.1" min="0" ng-model="voterList.group.weight" select-on-click class="form-control" auto-save="saveVoterList(voterList)" /> </th> + <th class="action"> </th> + </tr> + + <tr> + <th> {{ 'poll.restricted.name' | translate }} </th> + <th> {{ 'poll.restricted.mail' | translate }} </th> + <th> {{ 'poll.restricted.weight' | translate }} </th> + <th class="action"> </th> + </tr> + + <tr ng-repeat="member in voterList.members" ng-class="{'has-success':member.id && !member.restError}"> + <td> + <input-error error="member.restError.name[0]"> + <input type="text" ng-model="member.name" class="form-control" auto-save="saveVoterListMember(member, voterList)"/> + </input-error> + </td> + <td> + <input-error error="member.restError.email[0]"> + <input type="text" ng-model="member.email" class="form-control" auto-save="saveVoterListMember(member, voterList)" /> + </input-error> + </td> + <td class="weight"> + <input-error error="member.restError.weight[0]"> + <input type="number" step="0.1" min="0" ng-model="member.weight" select-on-click class="form-control" auto-save="saveVoterListMember(member, voterList)"/> + </input-error> + </td> + <td class="action"> + <button class="btn btn-danger" ng-click="deleteVoterListMember(member, voterList);" tooltip="{{ 'action.restricted.deleteVoter' | translate }}"><span class="fa fa-trash"></span></button> + </td> + </tr> + + <tr> + <th colspan="4"> + <button class="btn btn-info" ng-click="addVoter($index);"> <span class="fa fa-plus"></span> {{ 'action.restricted.addVoter' | translate }} </button> + <button class="btn btn-danger" ng-click="deleteVoterList(voterList);"> <span class="fa fa-trash"></span> {{ 'action.restricted.deleteGroup' | translate }} </button> + <button class="btn btn-info" ng-click="importFavoriteList(voterList)" ng-if="data.favoriteList"><span class="fa fa-save"></span> {{ 'action.favoriteList.import.inGroup' | translate }}</button> + </th> + </tr> + </table> + </div> + </fieldset> - <hr/> - </div> - - - - <table ng-repeat="voterList in data.voterList" class="voterList" ng-hide="data.poll.pollType == 'FREE'"> - - <tr ng-show="data.poll.pollType == 'GROUP'" ng-class="{'has-success':voterList.group.id && !voterList.group.restError}"> - <th colspan="2"> - <input-error error="voterList.group.restError.name[0]"> - <input type="text" name="group" placeholder="name group" ng-model="voterList.group.name" class="form-control" auto-save="saveVoterList(voterList)" focus-me="!voterList.group.id"/> - </input-error> - </th> - <th class="weight" ng-class="{'has-error':voterList.group.restError.weight}"> <input type="number" step="0.1" min="0" ng-model="voterList.group.weight" select-on-click class="form-control" auto-save="saveVoterList(voterList)" /> </th> - <th class="action"> </th> - </tr> - - <tr> - <th> {{ 'poll.restricted.name' | translate }} </th> - <th> {{ 'poll.restricted.mail' | translate }} </th> - <th> {{ 'poll.restricted.weight' | translate }} </th> - <th class="action"> </th> - </tr> - - <tr ng-repeat="member in voterList.members" ng-class="{'has-success':member.id && !member.restError}"> - <td> - <input-error error="member.restError.name[0]"> - <input type="text" ng-model="member.name" class="form-control" auto-save="saveVoterListMember(member, voterList)"/> - </input-error> - </td> - <td> - <input-error error="member.restError.email[0]"> - <input type="text" ng-model="member.email" class="form-control" auto-save="saveVoterListMember(member, voterList)" /> - </input-error> - </td> - <td class="weight"> - <input-error error="member.restError.weight[0]"> - <input type="number" step="0.1" min="0" ng-model="member.weight" select-on-click class="form-control" auto-save="saveVoterListMember(member, voterList)"/> - </input-error> - </td> - <td class="action"> - <button class="btn btn-danger" ng-click="deleteVoterListMember(member, voterList);" tooltip="{{ 'action.restricted.deleteVoter' | translate }}"><span class="fa fa-trash"></span></button> - </td> - </tr> - - <tr> - <th colspan="4"> - <button class="btn btn-info" ng-click="addVoter($index);"> <span class="fa fa-plus"></span> {{ 'action.restricted.addVoter' | translate }} </button> - <button class="btn btn-danger" ng-click="deleteVoterList(voterList);"> <span class="fa fa-trash"></span> {{ 'action.restricted.deleteGroup' | translate }} </button> - <button class="btn btn-info" ng-click="importFavoriteList(voterList)" ng-if="data.favoriteList"><span class="fa fa-save"></span> {{ 'action.favoriteList.import.inGroup' | translate }}</button> - </th> - </tr> - </table> -</div> +</form> \ No newline at end of file diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-poll.html b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html index 6201431..f4b8b04 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html @@ -18,37 +18,117 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #L% --> -<div class="pollTitle" edit-me="showEditTitle" novalidate> - <h1 ng-hide="showEditTitle"> - <span tooltip="{{ !globalVariables.editMode ? '' : 'poll.edit.title' | translate }}">{{data.poll.title || 'poll.edit.title' | translate }}</span> <span class="fa fa-pencil" showonhoverparent ng-if="globalVariables.editMode"></span> - <info-error error="restError.title[0]" data="data.poll.title" append-class="fa-lg"></info-error> - </h1> - - <h1 ng-show="showEditTitle"> - <input type="text" class="form-control" focus-me="showEditTitle" ng-model="data.poll.title" ng-exit="showEditTitle = false" auto-save="autoSavePoll()" required/> - </h1> -</div> - -<div ng-include="'./partials/poll-info.html'" ng-controller="PollInfoCtrl" class="poll-info"></div> - -<div ng-hide="showEditDesc || !globalVariables.editMode && !data.poll.description " class="pollDesc" edit-me="showEditDesc" > - <div> - <span class="fa fa-pencil" style="float: right" showonhoverparent ng-if="globalVariables.editMode"></span> - <div ng-bind-html="toHTML(data.poll.description)" tooltip="{{ !globalVariables.editMode ? '' : 'poll.edit' | translate }}"></div> - </div> - <div ng-hide="data.poll.description"> - <span tooltip="{{ 'poll.edit' | translate }}">{{ 'poll.desc' | translate }}</span> - <span class="fa fa-pencil" showonhoverparent></span> - </div> -</div> -<div ng-show="showEditDesc" class="pollDesc"> - <textarea id="descEditor" data-ck-editor ng-model="data.poll.description" focus-me="showEditDesc"></textarea> - - <button type="button" class="btn btn-primary" ng-click="showEditDesc = false">{{ 'action.return' | translate }}</button> -</div> - -<div id="poll"> - - <div ng-include="templateURL"></div> - -</div> +<form> + + <fieldset class="pollTitle" novalidate ng-hide="!globalVariables.editMode" > + <h2>{{'poll.config.title.poll.informations' |translate}}</h2> + + <div class="form-group row"> + <label class="col-sm-4 control-label">{{ 'poll.title' | translate}}</label> + <div class="col-sm-6"> + <input type="text" class="form-control" focus-me="showEditTitle" ng-model="data.poll.title" required/> + <info-error error="restError.title[0]" data="data.poll.title" append-class="fa-lg"></info-error> + </div> + </div> + + <div class="form-group row"> + <label class="col-sm-4 control-label">{{ 'poll.desc' | translate}}</label> + <div class="col-sm-6"> + <textarea id="descEditor" ng-model="data.poll.description" class="form-control"></textarea> + </div> + + </div> + </fieldset> + + <fieldset class="pollAuthor" novalidate ng-hide="!globalVariables.editMode" > + <h2>{{ 'poll.config.title.creator' | translate }}</h2> + + <div class="form-group row"> + <label class="col-sm-4 control-label" for="formCreatorName"> + {{ 'poll.config.label.creatorName' | translate }} + </label> + <div class="col-sm-6"> + <input-error error="restError['creator.name'][0]" data="data.poll.creatorName"> + <input type="text" class="form-control" id="formCreatorName" ng-model="data.poll.creatorName" auto-save="autoSavePoll()" /> + </input-error> + </div> + <div class="col-sm-2"> + <info-error error="restError['creator.name'][0]" append-class="fa-2x"></info-error> + </div> + </div> + + <div class="form-group row"> + <label class="col-sm-4 control-label" for="formCreatorEmail"> + {{ 'poll.config.label.creatorEmail' | translate }} + </label> + <div class="col-sm-6"> + <input-error error="restError['creator.email'][0]" data="data.poll.creatorEmail"> + <input type="text" class="form-control" id="formCreatorEmail" ng-model="data.poll.creatorEmail" auto-save="autoSavePoll()" /> + <span class="text-help">{{ 'poll.config.label.creatorEmail.help' | translate }}</span> + </input-error> + </div> + <div class="col-sm-2"> + <info-error error="restError['creator.email'][0]" append-class="fa-2x"></info-error> + </div> + </div> + </fieldset> + + <fieldset> + <h2>{{'poll.config.title.poll.validityDates' |translate}}</h2> + + <div class="form-group row"> + <label class="col-sm-4 control-label" for="formBeginDate">{{ 'poll.config.label.beginDate' | translate }}</label> + <div class="col-sm-6"> + <input-error error="restError.beginDate[0]" data="data.poll.beginDate"> + <datetimepicker min-date="globalVariables.toDay" + max-date="data.poll.endDate" + ng-model="data.poll.beginDate" + auto-save="autoSavePoll()" + for-id="formBeginDate"></datetimepicker> + </input-error> + </div> + <div class="col-sm-2"> + <info-error error="restError.beginDate[0]" data="data.poll.beginDate" append-class="fa-2x"></info-error> + </div> + </div> + + <div class="form-group row"> + <label class="col-sm-4 control-label" for="formEndDate">{{ 'poll.config.label.endDate' | translate }}</label> + <div class="col-sm-6"> + <input-error error="restError.endDate[0]" data="data.poll.endDate"> + <datetimepicker min-date="data.poll.beginDate" + ng-model="data.poll.endDate" + auto-save="autoSavePoll()" + for-id="formEndDate"></datetimepicker> + </input-error> + </div> + <div class="col-sm-2"> + <info-error error="restError.endDate[0]" data="data.poll.endDate" append-class="fa-2x"></info-error> + </div> + </div> + </fieldset> + <fieldset> + + <h2>{{'poll.config.title.poll.voteCountingType' |translate}}</h2> + + <div class="form-group row"> + <div> + <label class="label-block" ng-repeat="voteCountingType in data.allVoteCountingType"> + <input type="radio" + ng-model="data.poll.voteCountingType" + value="{{voteCountingType.id}}" + auto-save="autoSavePoll()" /> + {{voteCountingType.name}} + </label> + <hr/> + <p ng-bind-html="toHTML(data.voteCountingType.helper)"></p> + </div> + <div class="col-sm-2"> + <info-error error="restError.voteCountingType[0]" data="data.poll.voteCountingType" append-class="fa-2x"></info-error> + </div> + </div> + + </fieldset> + + +</form> \ No newline at end of file diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-settings.html b/pollen-ui-angular/src/main/webapp/partials/poll-settings.html index 7d156a2..e1b004c 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-settings.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-settings.html @@ -18,118 +18,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #L% --> -<h1>{{data.poll.title}}</h1> <form class="form-horizontal" novalidate> - <h4>{{ 'poll.config.title.creator' | translate }}</h4> + + <fieldset> + + <div id="poll"> - <div class="form-group row"> - <label class="col-sm-4 control-label" for="formCreatorName"> - {{ 'poll.config.label.creatorName' | translate }} - </label> - <div class="col-sm-6"> - <input-error error="restError['creator.name'][0]" data="data.poll.creatorName"> - <input type="text" class="form-control" id="formCreatorName" ng-model="data.poll.creatorName" auto-save="autoSavePoll()" /> - </input-error> - </div> - <div class="col-sm-2"> - <info-error error="restError['creator.name'][0]" append-class="fa-2x"></info-error> - </div> - </div> - - <div class="form-group row"> - <label class="col-sm-4 control-label" for="formCreatorEmail"> - {{ 'poll.config.label.creatorEmail' | translate }} - </label> - <div class="col-sm-6"> - <input-error error="restError['creator.email'][0]" data="data.poll.creatorEmail"> - <input type="text" class="form-control" id="formCreatorEmail" ng-model="data.poll.creatorEmail" auto-save="autoSavePoll()" /> - <span class="text-help">{{ 'poll.config.label.creatorEmail.help' | translate }}</span> - </input-error> - </div> - <div class="col-sm-2"> - <info-error error="restError['creator.email'][0]" append-class="fa-2x"></info-error> - </div> - </div> - - <h4>{{ 'poll.config.title.poll' | translate }}</h4> - - <div class="form-group row"> - <label class="col-sm-4 control-label" for="formBeginDate">{{ 'poll.config.label.beginDate' | translate }}</label> - <div class="col-sm-6"> - <input-error error="restError.beginDate[0]" data="data.poll.beginDate"> - <datetimepicker min-date="globalVariables.toDay" - max-date="data.poll.endDate" - ng-model="data.poll.beginDate" - auto-save="autoSavePoll()" - for-id="formBeginDate"></datetimepicker> - </input-error> - </div> - <div class="col-sm-2"> - <info-error error="restError.beginDate[0]" data="data.poll.beginDate" append-class="fa-2x"></info-error> - </div> - </div> - - <div class="form-group row"> - <label class="col-sm-4 control-label" for="formEndDate">{{ 'poll.config.label.endDate' | translate }}</label> - <div class="col-sm-6"> - <input-error error="restError.endDate[0]" data="data.poll.endDate"> - <datetimepicker min-date="data.poll.beginDate" - ng-model="data.poll.endDate" - auto-save="autoSavePoll()" - for-id="formEndDate"></datetimepicker> - </input-error> - </div> - <div class="col-sm-2"> - <info-error error="restError.endDate[0]" data="data.poll.endDate" append-class="fa-2x"></info-error> - </div> - </div> - - <div class="form-group row"> - <label class="col-sm-4 control-label"> - {{ 'poll.config.label.resultVisibility' | translate }} - </label> - <div class="col-sm-6"> - <label class="label-block"> - <input type="radio" - ng-model="data.poll.resultVisibility" - name="resultVisibility" - value="EVERYBODY" - auto-save="autoSavePoll()" /> - {{ 'poll.config.value.visibility.everybody' | translate }} - </label> + <div ng-include="templateURL"></div> - <label class="label-block"> - <input type="radio" - ng-model="data.poll.resultVisibility" - name="resultVisibility" - value="VOTER" - auto-save="autoSavePoll()" /> - {{ 'poll.config.value.visibility.voter' | translate }} - </label> - - <label class="label-block"> - <input type="radio" - ng-model="data.poll.resultVisibility" - name="resultVisibility" - value="CREATOR" - auto-save="autoSavePoll()" /> - {{ 'poll.config.value.visibility.creator' | translate }} - </label> - </div> - <div class="col-sm-2"> - <info-error error="restError.resultVisibility[0]" data="data.poll.resultVisibility" append-class="fa-2x"></info-error> - </div> </div> + + </fieldset> + + + - <div class="form-group row"> - <label class="col-sm-4 control-label" for="formContinuousResults"> - {{ 'poll.config.label.continuousResults' | translate }} - </label> - <div class="col-sm-6"> - <input type="checkbox" id="formContinuousResults" ng-model="data.poll.continuousResults" auto-save="autoSavePoll()" /> - </div> - <div class="col-sm-2"></div> - </div> + <fieldset> <h4>{{ 'poll.config.title.choice' | translate }}</h4> @@ -196,114 +100,7 @@ <info-error error="restError.maxChoiceNumber[0]" data="data.poll.maxChoiceNumber" append-class="fa-2x"></info-error> </div> </div> - - <h4>{{ 'poll.config.title.vote' | translate }}</h4> - - <div class="form-group row"> - <label class="col-sm-4 control-label"> - {{ 'poll.config.label.voteCountingType' | translate }} - </label> - <div class="col-sm-6"> - <label class="label-block" ng-repeat="voteCountingType in data.allVoteCountingType"> - <input type="radio" - ng-model="data.poll.voteCountingType" - value="{{voteCountingType.id}}" - auto-save="autoSavePoll()" /> - {{voteCountingType.name}} - </label> - <hr/> - <p ng-bind-html="toHTML(data.voteCountingType.helper)"></p> - </div> - <div class="col-sm-2"> - <info-error error="restError.voteCountingType[0]" data="data.poll.voteCountingType" append-class="fa-2x"></info-error> - </div> - </div> - - <div class="form-group row"> - <label class="col-sm-4 control-label"> - {{ 'poll.config.label.voteVisibility' | translate }} - </label> - <div class="col-sm-6"> - <label class="label-block"> - <input type="radio" - ng-model="data.poll.voteVisibility" - auto-save="autoSavePoll()" - value="EVERYBODY" /> - {{ 'poll.config.value.visibility.everybody' | translate }} - </label> - - <label class="label-block"> - <input type="radio" - ng-model="data.poll.voteVisibility" - auto-save="autoSavePoll()" - value="VOTER" /> - {{ 'poll.config.value.visibility.voter' | translate }} - </label> - - <label class="label-block"> - <input type="radio" - ng-model="data.poll.voteVisibility" - auto-save="autoSavePoll()" - value="CREATOR" /> - {{ 'poll.config.value.visibility.creator' | translate }} - </label> - - <label class="label-block"> - <input type="radio" - ng-model="data.poll.voteVisibility" - auto-save="autoSavePoll()" - value="ANONYMOUS" /> - {{ 'poll.config.value.visibility.anonymous' | translate }} - </label> - </div> - <div class="col-sm-2"> - <info-error error="restError.voteVisibility[0]" data="data.poll.voteVisibility" append-class="fa-2x"></info-error> - </div> - </div> - - <div class="form-group row"> - <label class="col-sm-4 control-label" for="formAnonymousVoteAllowed"> - {{ 'poll.config.label.anonymousVoteAllowed' | translate }} - </label> - <div class="col-sm-6 btn-group"> - <input type="checkbox" id="formAnonymousVoteAllowed" ng-model="data.poll.anonymousVoteAllowed" auto-save="autoSavePoll()" /> - </div> - </div> - - <div class="form-group row"> - <label class="col-sm-4 control-label"> - {{ 'poll.config.label.commentVisibility' | translate }} - </label> - <div class="col-sm-6"> - <label class="label-block"> - <input type="radio" - ng-model="data.poll.commentVisibility" - name="commentVisibility" - value="EVERYBODY" - auto-save="autoSavePoll()" /> - {{ 'poll.config.value.visibility.everybody' | translate }} - </label> - - <label class="label-block"> - <input type="radio" - ng-model="data.poll.commentVisibility" - name="commentVisibility" - value="VOTER" - auto-save="autoSavePoll()" /> - {{ 'poll.config.value.visibility.voter' | translate }} - </label> - - <label class="label-block"> - <input type="radio" - ng-model="data.poll.commentVisibility" - name="commentVisibility" - value="NOBODY" - auto-save="autoSavePoll()" /> - {{ 'poll.config.value.visibility.nobody' | translate }} - </label> - </div> - <div class="col-sm-2"> - <info-error error="restError.commentVisibility[0]" data="data.poll.commentVisibility" append-class="fa-2x"></info-error> - </div> - </div> + </fieldset> + </form> + diff --git a/pollen-ui-angular/src/main/webapp/partials/poll.html b/pollen-ui-angular/src/main/webapp/partials/poll.html index 39fc43e..0512135 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll.html @@ -38,38 +38,38 @@ </li> <li ng-class="{active: tab == 'edit'}" ng-show="data.poll.permission"> <a href="{{globalVariables.linkEdit}}"> - <span class="fa fa-pencil-square-o"></span> {{ 'poll.tab.edit' | translate }} + <span class="fa fa-pencil-square-o"></span> {{ 'poll.config.title.poll' | translate }} <info-error error="globalVariables.pollError"></info-error> </a> </li> <li ng-class="{active: tab == 'conf'}" ng-show="data.poll.permission"> <a href="{{globalVariables.linkConf}}"> - <span class="fa fa-wrench"></span> {{ 'poll.tab.conf' | translate }} + <span class="fa fa-wrench"></span> {{ 'poll.config.title.choice' | translate }} <info-error error="globalVariables.configError"></info-error> </a> </li> <li ng-class="{active: tab == 'participant'}" ng-show="data.poll.permission"> <a href="{{globalVariables.linkParticipant}}"> - <span class="fa fa-users"></span> {{ 'poll.tab.participant' | translate }} + <span class="fa fa-users"></span> {{ 'poll.config.title.visibility' | translate }} <info-error error="globalVariables.participantError"></info-error> </a> </li> <li ng-class="{active: tab == 'create'}" ng-show="globalVariables.create"> <a href="#/poll/create"> - <span class="fa fa-pencil-square-o"></span> {{ 'poll.tab.create' | translate }} + <span class="fa fa-pencil-square-o"></span> {{ 'poll.config.title.poll' | translate }} <info-error error="globalVariables.pollError"></info-error> </a> </li> <li ng-class="{active: tab == 'conf'}" ng-show="globalVariables.create"> <a href="#/poll/create/conf"> - <span class="fa fa-wrench"></span> {{ 'poll.tab.conf' | translate }} + <span class="fa fa-wrench"></span> {{ 'poll.config.title.choice' | translate }} <info-error error="globalVariables.configError"></info-error> </a> </li> <li ng-class="{active: tab == 'participant'}" ng-show="globalVariables.create"> <a href="#/poll/create/participant"> - <span class="fa fa-users"></span> {{ 'poll.tab.participant' | translate }} + <span class="fa fa-users"></span> {{ 'poll.config.title.visibility' | translate }} <info-error error="globalVariables.participantError"></info-error> </a> </li> @@ -104,7 +104,17 @@ <div> <hr/> - <button class="btn btn-primary" ng-click="savePoll()"><span class="fa fa-save"></span> {{ 'action.save' | translate }}</button> + <button class="btn btn-primary" ng-click="savePoll()" ng-if="(tab == 'conf' || tab == 'participant')"><span class="fa fa-save"></span> {{ 'action.createPoll' | translate }}</button> + + <a href="#/poll/create/conf" ng-if="tab == 'create'"> + <span class="fa fa-wrench"></span> {{ 'poll.config.title.choice' | translate }} + <info-error error="globalVariables.configError"></info-error> + </a> + + <a href="#/poll/create/participant" ng-if="tab == 'conf'"> + <span class="fa fa-users"></span> {{ 'poll.config.title.visibility' | translate }} + <info-error error="globalVariables.participantError"></info-error> + </a> </div> </div> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm