Commit 48987aaffe6a4ec4167e15a35d80575f3d95ad25

Authored by Antonio Terceiro
1 parent 10eab96c

Any community members can edit - UI

(ActionItem2345)
Showing 1 changed file with 15 additions and 2 deletions   Show diff stats
app/helpers/article_helper.rb
@@ -8,19 +8,32 @@ module ArticleHelper @@ -8,19 +8,32 @@ module ArticleHelper
8 'div', 8 'div',
9 check_box(:article, :published) + 9 check_box(:article, :published) +
10 content_tag('label', _('This article must be published (visible to other people)'), :for => 'article_published') 10 content_tag('label', _('This article must be published (visible to other people)'), :for => 'article_published')
11 - ) + (article.parent && article.parent.forum? && controller.action_name == 'new' ? 11 + ) +
  12 +
  13 + (article.profile.has_members? ?
  14 + content_tag(
  15 + 'div',
  16 + check_box(:article, :allow_members_to_edit) +
  17 + content_tag('label', _('Allow all members to edit this article'), :for => 'article_allow_members_to_edit')
  18 + ) :
  19 + '') +
  20 +
  21 + (article.parent && article.parent.forum? && controller.action_name == 'new' ?
12 hidden_field_tag('article[accept_comments]', 1) : 22 hidden_field_tag('article[accept_comments]', 1) :
13 content_tag( 23 content_tag(
14 'div', 24 'div',
15 check_box(:article, :accept_comments) + 25 check_box(:article, :accept_comments) +
16 content_tag('label', (article.parent && article.parent.forum? ? _('This topic is opened for replies') : _('I want to receive comments about this article')), :for => 'article_accept_comments') 26 content_tag('label', (article.parent && article.parent.forum? ? _('This topic is opened for replies') : _('I want to receive comments about this article')), :for => 'article_accept_comments')
17 )) + 27 )) +
  28 +
18 content_tag( 29 content_tag(
19 'div', 30 'div',
20 check_box(:article, :notify_comments) + 31 check_box(:article, :notify_comments) +
21 content_tag('label', _('I want to receive a notification of each comment written by e-mail'), :for => 'article_notify_comments') + 32 content_tag('label', _('I want to receive a notification of each comment written by e-mail'), :for => 'article_notify_comments') +
22 observe_field(:article_accept_comments, :function => "$('article_notify_comments').disabled = ! $('article_accept_comments').checked") 33 observe_field(:article_accept_comments, :function => "$('article_notify_comments').disabled = ! $('article_accept_comments').checked")
23 - ) + (article.can_display_hits? ? 34 + ) +
  35 +
  36 + (article.can_display_hits? ?
24 content_tag( 37 content_tag(
25 'div', 38 'div',
26 check_box(:article, :display_hits) + 39 check_box(:article, :display_hits) +