Commit 958f621c7a451ee225b869228370482601eac210

Authored by João M. M. da Silva
Committed by Alessandro Palmeira
1 parent a68a64cf

[Mezuro] Project edition working

plugins/mezuro/lib/mezuro_plugin/project_content.rb
@@ -41,6 +41,7 @@ class MezuroPlugin::ProjectContent < Article @@ -41,6 +41,7 @@ class MezuroPlugin::ProjectContent < Article
41 end 41 end
42 42
43 def description 43 def description
  44 + @description ||= project.description
44 @description 45 @description
45 end 46 end
46 47
plugins/mezuro/views/cms/mezuro_plugin/_project_content.html.erb
@@ -8,13 +8,11 @@ @@ -8,13 +8,11 @@
8 8
9 <%= hidden_field_tag 'project_content[profile_id]', profile.id %> 9 <%= hidden_field_tag 'project_content[profile_id]', profile.id %>
10 <%= hidden_field_tag 'id', @article.id %> 10 <%= hidden_field_tag 'id', @article.id %>
  11 +<%= hidden_field_tag 'project_id', @article.project_id %>
11 12
12 <%= required_fields_message %> 13 <%= required_fields_message %>
13 -<% if !@project.nil? && !@article.id.nil? %>  
14 - <%= required f.text_field(:name, :disabled => 'true') %>  
15 -<% else %>  
16 - <%= required f.text_field(:name) %>  
17 -<% end %> 14 +
  15 +<%= required f.text_field(:name) %>
18 16
19 <%= f.text_field :description %><br/> 17 <%= f.text_field :description %><br/>
20 18