Position of a document custom fields unified

This commit is contained in:
Karel Picman 2017-02-07 15:20:30 +01:00
parent d1330675dc
commit aae721d21b
3 changed files with 22 additions and 8 deletions

View File

@ -5,7 +5,7 @@
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-17 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -5,7 +5,7 @@
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-17 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -44,6 +44,13 @@
<%= text_area_tag("commited_files[#{i}][description]", upload.description, :rows => 6, :class => 'wiki-edit') %>
</p>
<div class="clear">
<div class="splitcontentright">
<div class="custom_fields">
<% upload.custom_values.each do |value| %>
<p><%= custom_field_tag_with_label("commited_files[#{i}][dmsf_file_revision]", value) %></p>
<% end %>
</div>
</div>
<div class="splitcontentleft">
<p>
<%= label_tag("commited_files[#{i}][version]_minor", l(:label_dmsf_version)) %>
@ -70,13 +77,10 @@
</p>
</div>
</div>
<% upload.custom_values.each do |value| %>
<p><%= custom_field_tag_with_label("commited_files[#{i}][dmsf_file_revision]", value) %></p>
<% end %>
<p>
<%= label_tag("commited_files[#{i}][comment]", l(:label_comment)) %>
<%= text_area_tag("commited_files[#{i}][comment]", upload.comment, :rows => 2) %>
</p>
</div>
<%= wikitoolbar_for "commited_files_#{i}_description" %>
<%= wikitoolbar_for "commited_files_#{i}_description" %>

View File

@ -5,7 +5,7 @@
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-17 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -49,6 +49,16 @@
</p>
<% end %>
<div class="clear">
<div class="splitcontentright">
<div class="custom_fields">
<% upload.custom_values.each do |value| %>
<p>
<%= label_tag('', h(value.custom_field.name)) %>
<%= h(value) %>
</p>
<% end %>
</div>
</div>
<div class="splitcontentleft">
<p>
<%= label_tag('', l(:label_dmsf_version)) %>
@ -72,4 +82,4 @@
<div class="wiki"><%= textilizable(upload.comment) %></div>
</p>
<% end %>
</div>
</div>