fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-12-22 10:09 am

[dw-free] Revamp /update

[commit: http://hg.dwscoalition.org/dw-free/rev/a3195e4a564a]

http://bugs.dwscoalition.org/show_bug.cgi?id=2524

Make the Create Poll link context-sensitive: show it only when your journal
caps let you post a poll, or when you're explicitly using a community that
has the post poll capability. (Seems misleading to free users otherwise,
since it's not clear that they *might* be able to post a poll to a paid
community they're a member of)

Patch by [personal profile] fu.

Files modified:
  • views/entry/form.tt
--------------------------------------------------------------------------------
diff -r 6bd16c2235b1 -r a3195e4a564a views/entry/form.tt
--- a/views/entry/form.tt	Thu Dec 22 18:06:03 2011 +0800
+++ b/views/entry/form.tt	Thu Dec 22 18:09:27 2011 +0800
@@ -174,7 +174,9 @@
                 <!-- TODO make this only take up one tab area? -->
                 <div class="toolbar">
                     <div id="main-tools" class='subtoolbar'>
+                        [%- IF remote.can_create_polls OR journalu.can_create_polls -%]
                         <a href="[%site.root%]/poll/create" class="external-link" target="_blank">Create Poll <span class="ui-icon ui-icon-newwin"></span></a>
+                        [%- END -%]
                         <a href="#" class="unimplemented"><img src="[% site.imgroot%]/silk/site/help.png" alt="Help for valid HTML tags" title="Help for valid HTML tags" width="16" height="16"></a>
                         <a href="[%site.root%]/entry/options" id="post_options"><img src="[% site.imgroot%]/silk/site/cog.png" alt="Edit entry form settings" title="Edit entry form settings" width="16" height="16"></a>
                     </div>
--------------------------------------------------------------------------------