Commit c9700e4829f4fb73ecca0eaa612edb04e0565829

Authored by Victor Costa
1 parent 8064297e

proposals_discussion: custom body label

lib/proposals_discussion_plugin/discussion.rb
... ... @@ -3,6 +3,10 @@ class ProposalsDiscussionPlugin::Discussion < Folder
3 3 has_many :topics, :class_name => 'ProposalsDiscussionPlugin::Topic', :foreign_key => 'parent_id'
4 4 has_many :proposals, :class_name => 'ProposalsDiscussionPlugin::Proposal', :through => :children, :source => :children
5 5  
  6 + settings_items :custom_body_label, :type => :string, :default => _('Body')
  7 +
  8 + attr_accessible :custom_body_label
  9 +
6 10 def self.short_description
7 11 _("Discussion")
8 12 end
... ...
views/cms/proposals_discussion_plugin/_discussion.html.erb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +sdadasda
  2 +<%= required_fields_message %>
  3 +
  4 +<%= required f.text_field('name', :size => '64', :maxlength => 150) %>
  5 +<%= render :partial => 'general_fields' %>
  6 +
  7 +<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %>
  8 +
  9 +<%= f.text_field(:custom_body_label) %>
... ...
views/cms/proposals_discussion_plugin/_proposal.html.erb
... ... @@ -16,7 +16,7 @@
16 16  
17 17 <div class="body">
18 18 <% editor_type = 'mceEditor' %>
19   - <%= labelled_form_field(_('Text'), text_area(:article, :body, :class => editor_type)) %>
  19 + <%= labelled_form_field(@article.topic.discussion.custom_body_label, text_area(:article, :body, :class => editor_type)) %>
20 20 </div>
21 21 </div>
22 22  
... ...
views/content_viewer/proposal.html.erb
... ... @@ -18,7 +18,7 @@
18 18 </div>
19 19  
20 20 <div class="body">
21   - <h5><%= _('Body') %></h4>
  21 + <h5><%= @page.topic.discussion.custom_body_label %></h4>
22 22 <div class="content"><%= @page.body %></div>
23 23 </div>
24 24  
... ...