Commit c9700e4829f4fb73ecca0eaa612edb04e0565829
1 parent
8064297e
Exists in
master
and in
11 other branches
proposals_discussion: custom body label
Showing
4 changed files
with
15 additions
and
2 deletions
Show diff stats
lib/proposals_discussion_plugin/discussion.rb
@@ -3,6 +3,10 @@ class ProposalsDiscussionPlugin::Discussion < Folder | @@ -3,6 +3,10 @@ class ProposalsDiscussionPlugin::Discussion < Folder | ||
3 | has_many :topics, :class_name => 'ProposalsDiscussionPlugin::Topic', :foreign_key => 'parent_id' | 3 | has_many :topics, :class_name => 'ProposalsDiscussionPlugin::Topic', :foreign_key => 'parent_id' |
4 | has_many :proposals, :class_name => 'ProposalsDiscussionPlugin::Proposal', :through => :children, :source => :children | 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 | def self.short_description | 10 | def self.short_description |
7 | _("Discussion") | 11 | _("Discussion") |
8 | end | 12 | end |
views/cms/proposals_discussion_plugin/_discussion.html.erb
0 → 100644
@@ -0,0 +1,9 @@ | @@ -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,7 +16,7 @@ | ||
16 | 16 | ||
17 | <div class="body"> | 17 | <div class="body"> |
18 | <% editor_type = 'mceEditor' %> | 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 | </div> | 20 | </div> |
21 | </div> | 21 | </div> |
22 | 22 |
views/content_viewer/proposal.html.erb
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | </div> | 18 | </div> |
19 | 19 | ||
20 | <div class="body"> | 20 | <div class="body"> |
21 | - <h5><%= _('Body') %></h4> | 21 | + <h5><%= @page.topic.discussion.custom_body_label %></h4> |
22 | <div class="content"><%= @page.body %></div> | 22 | <div class="content"><%= @page.body %></div> |
23 | </div> | 23 | </div> |
24 | 24 |