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 | 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