This is an automated email from the git hooks/post-receive script. New commit to branch feature/pollen-riot-js in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit af80ddf9b3e937f6a8cf1e3f7aea7a4f909f0343 Author: Tony CHEMIT <dev@tchemit.fr> Date: Thu Feb 23 10:43:03 2017 +0100 Add my participant polls and my invited polls --- pollen-ui-riot-js/src/main/web/i18n.json | 8 ++++++++ pollen-ui-riot-js/src/main/web/js/PollService.js | 8 ++++++++ pollen-ui-riot-js/src/main/web/tag/Header.tag | 2 ++ pollen-ui-riot-js/src/main/web/tag/Pollen.tag | 16 ++++++++++++++++ 4 files changed, 34 insertions(+) diff --git a/pollen-ui-riot-js/src/main/web/i18n.json b/pollen-ui-riot-js/src/main/web/i18n.json index 245084e..b515235 100644 --- a/pollen-ui-riot-js/src/main/web/i18n.json +++ b/pollen-ui-riot-js/src/main/web/i18n.json @@ -32,6 +32,8 @@ "comment_popup_authorPlaceholder": "Saisir votre nom", "comment_popup_textPlaceholder": "Saisir le commentaire", "polls_createdPolls": "Mes sondages", + "polls_invitedPolls": "Mes invitations", + "polls_participatedPolls": "Mes participations", "polls_polls": "Tous les sondages", "polls_name": "Nom", "polls_createDate": "Date de création", @@ -90,6 +92,8 @@ "header_i18n_lang": "Langue", "header_myProfile": "Mon profile", "header_myPolls": "Mes sondages", + "header_myInvitedPolls": "Mes invitations", + "header_myParticipatedPolls": "Mes participations", "header_polls": "Sondages", "header_users": "Utilisateurs", "header_myFavoriteLists": "Mes listes de favoris", @@ -256,6 +260,8 @@ "polls_voteDates": "Vote", "polls_status": "Status", "polls_createdPolls": "My polls", + "polls_invitedPolls": "My invitations", + "polls_participatedPolls": "My participations", "polls_polls": "All polls", "polls_CLOSED": "Closed", "polls_ADDING_CHOICES": "Adding choices", @@ -309,6 +315,8 @@ "header_i18n_lang": "Language", "header_myProfile": "My profile", "header_myPolls": "My polls", + "header_myInvitedPolls": "Invited polls", + "header_myParticipatedPolls": "Participated polls", "header_polls": "Polls", "header_users": "Users", "header_myFavoriteLists": "My favorite lists", diff --git a/pollen-ui-riot-js/src/main/web/js/PollService.js b/pollen-ui-riot-js/src/main/web/js/PollService.js index 31b0a23..d82de44 100644 --- a/pollen-ui-riot-js/src/main/web/js/PollService.js +++ b/pollen-ui-riot-js/src/main/web/js/PollService.js @@ -39,6 +39,14 @@ class PollService extends FetchService { return this.getWithParams("/v1/polls/created", {paginationParameter: pagination}); } + invitedPolls(pagination) { + return this.getWithParams("/v1/polls/invited", {paginationParameter: pagination}); + } + + participatedPolls(pagination) { + return this.getWithParams("/v1/polls/participated", {paginationParameter: pagination}); + } + polls(pagination) { return this.getWithParams("/v1/polls", {paginationParameter: pagination}); } diff --git a/pollen-ui-riot-js/src/main/web/tag/Header.tag b/pollen-ui-riot-js/src/main/web/tag/Header.tag index 807861e..e6bad53 100644 --- a/pollen-ui-riot-js/src/main/web/tag/Header.tag +++ b/pollen-ui-riot-js/src/main/web/tag/Header.tag @@ -49,6 +49,8 @@ require("./HeaderI18n.tag"); <div class="dropdown-content"> <a href="#user/profile">{__.myProfile}</a> <a href="#poll/created">{__.myPolls}</a> + <a href="#poll/invited">{__.myInvitedPolls}</a> + <a href="#poll/participated">{__.myParticipatedPolls}</a> <a href="#user/favoriteLists">{__.myFavoriteLists}</a> <span role="separator" class="divider"></span> <a onclick="{signOut}">{__.signout}</a> diff --git a/pollen-ui-riot-js/src/main/web/tag/Pollen.tag b/pollen-ui-riot-js/src/main/web/tag/Pollen.tag index cac12cc..e5bc1ed 100644 --- a/pollen-ui-riot-js/src/main/web/tag/Pollen.tag +++ b/pollen-ui-riot-js/src/main/web/tag/Pollen.tag @@ -73,6 +73,22 @@ require("./Users.tag"); } }); + route("/poll/invited", () => { + if (!session.isConnected()) { + route("/signin?url=/poll/invited"); + } else { + riot.mount(this.refs.content, "polls", { method: "invitedPolls", session: session}); + } + }); + + route("/poll/participated", () => { + if (!session.isConnected()) { + route("/signin?url=/poll/participated"); + } else { + riot.mount(this.refs.content, "polls", { method: "participatedPolls", session: session}); + } + }); + route("/poll", () => { if (!session.isConnected()) { route("/signin?url=/poll"); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.