UX: Add info when poll is public.

This commit is contained in:
Guo Xiang Tan 2016-06-09 22:15:08 +08:00
parent ff577405ae
commit 5a03eca74a
No known key found for this signature in database
GPG Key ID: 19C321C8952B0F72
4 changed files with 14 additions and 0 deletions

View File

@ -5,6 +5,7 @@ export default Ember.Controller.extend({
isNumber: Ember.computed.equal("poll.type", "number"),
isRandom : Ember.computed.equal("poll.order", "random"),
isClosed: Ember.computed.equal("poll.status", "closed"),
isPublic: Ember.computed.equal("poll.public", "true"),
pollsVoters: Ember.computed.alias("post.polls_voters"),
// shows the results when

View File

@ -29,6 +29,12 @@
<p>{{{multipleHelpText}}}</p>
{{/if}}
{{/if}}
{{#if isPublic}}
{{#unless showingResults}}
<p>{{i18n "poll.public.title"}}</p>
{{/unless}}
{{/if}}
</div>
</div>

View File

@ -138,6 +138,10 @@
if (help) { info.push(["p", help]); }
}
if (attributes[DATA_PREFIX + "public"] === "true") {
info.push(["p", I18n.t("poll.public.title")]);
}
poll.push(info);
// 3 - BUTTONS

View File

@ -27,6 +27,9 @@ en:
average_rating: "Average rating: <strong>%{average}</strong>."
public:
title: "Votes submitted to this poll will be made public."
multiple:
help:
at_least_min_options: