From 83b46a6b88894194546a2a9a13470f6999172903 Mon Sep 17 00:00:00 2001 From: Vikhyat Korrapati Date: Sat, 12 Apr 2014 23:00:51 +0530 Subject: [PATCH] Disable the close poll functionality if allow_user_locale is enabled. --- plugins/poll/README.md | 8 ++++---- .../javascripts/discourse/templates/poll.js.handlebars | 2 +- plugins/poll/assets/javascripts/poll_ui.js | 3 +++ plugins/poll/poll.rb | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/poll/README.md b/plugins/poll/README.md index e62077d9714..5fabf2cc031 100644 --- a/plugins/poll/README.md +++ b/plugins/poll/README.md @@ -9,7 +9,7 @@ Allows you to add a poll to the first post of a topic. ## Closing the poll -Change the start of the topic title from "Poll: " to "Closed Poll: " +Change the start of the topic title from "Poll: " to "Closed Poll: ". This feature is disabled if the `allow_user_locale` site setting is enabled. _Note: closing a topic will also close the poll._ @@ -21,12 +21,12 @@ list to be used like this: ``` Intro Text - + - Item one - Item two - + Here are your choices: - + [poll] - Option 1 - Option 2 diff --git a/plugins/poll/assets/javascripts/discourse/templates/poll.js.handlebars b/plugins/poll/assets/javascripts/discourse/templates/poll.js.handlebars index c7197451306..360499b40f7 100644 --- a/plugins/poll/assets/javascripts/discourse/templates/poll.js.handlebars +++ b/plugins/poll/assets/javascripts/discourse/templates/poll.js.handlebars @@ -24,7 +24,7 @@ {{/if}} -{{#if poll.post.topic.details.can_edit}} +{{#if controller.showToggleClosePoll}}