diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-14 10:44:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-14 10:44:59 +0000 |
commit | ae4eb4788132caf495eb7b180f9104e4aa0ac42a (patch) | |
tree | 74a0bd1faedc646b7a17e9ce14ac11f350864b95 /app/views/documents | |
parent | 1c078a7081e83839a7689c9a8c5e4d49b9b75e4c (diff) | |
download | redmine-ae4eb4788132caf495eb7b180f9104e4aa0ac42a.tar.gz redmine-ae4eb4788132caf495eb7b180f9104e4aa0ac42a.zip |
Adds custom fields to documents (#7249).
git-svn-id: http://svn.redmine.org/redmine/trunk@14004 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/documents')
-rw-r--r-- | app/views/documents/_form.html.erb | 4 | ||||
-rw-r--r-- | app/views/documents/show.html.erb | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/app/views/documents/_form.html.erb b/app/views/documents/_form.html.erb index 53d8fc3bb..bd3b7cd9f 100644 --- a/app/views/documents/_form.html.erb +++ b/app/views/documents/_form.html.erb @@ -4,6 +4,10 @@ <p><%= f.select :category_id, DocumentCategory.active.collect {|c| [c.name, c.id]} %></p> <p><%= f.text_field :title, :required => true, :size => 60 %></p> <p><%= f.text_area :description, :cols => 60, :rows => 15, :class => 'wiki-edit' %></p> + +<% @document.custom_field_values.each do |value| %> + <p><%= custom_field_tag_with_label :document, value %></p> +<% end %> </div> <%= wikitoolbar_for 'document_description' %> diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index a8aea63da..8b1f0067b 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -11,6 +11,15 @@ <p><em><%=h @document.category.name %><br /> <%= format_date @document.created_on %></em></p> + +<% if @document.custom_field_values.any? %> +<ul> + <% render_custom_field_values(@document) do |custom_field, formatted| %> + <li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li> + <% end %> +</ul> +<% end %> + <div class="wiki"> <%= textilizable @document, :description, :attachments => @document.attachments %> </div> |