]> source.dussan.org Git - redmine.git/commitdiff
Display custom fields in two columns on the issue form.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Jan 2008 17:20:34 +0000 (17:20 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Jan 2008 17:20:34 +0000 (17:20 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1086 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/custom_fields_helper.rb
app/views/issues/_form.rhtml
app/views/issues/_form_custom_fields.rhtml [new file with mode: 0644]

index 25389ca637432ed31e05c74168383a8a7deb3328..8792c8c6e80f2c7400e3e9d992d3e3d15110ad80 100644 (file)
@@ -28,7 +28,7 @@ module CustomFieldsHelper
       text_field('custom_value', 'value', :name => field_name, :id => field_id, :size => 10) + 
       calendar_for(field_id)
     when "text"
-      text_area 'custom_value', 'value', :name => field_name, :id => field_id, :cols => 60, :rows => 3
+      text_area 'custom_value', 'value', :name => field_name, :id => field_id, :rows => 3, :style => 'width:99%'
     when "bool"
       check_box 'custom_value', 'value', :name => field_name, :id => field_id
     when "list"
index 779846f4d4695de4e30ccf1b5c694c8c3c201cf5..d91effedf53ce8778a8c1659c6f590331cf03127 100644 (file)
@@ -38,9 +38,8 @@
                    :accesskey => accesskey(:edit),
                    :class => 'wiki-edit' %></p>
 <p><%= f.select :fixed_version_id, (@project.versions.sort.collect {|v| [v.name, v.id]}), { :include_blank => true } %></p>
-<% for @custom_value in @custom_values %>
-       <p><%= custom_field_tag_with_label @custom_value %></p>
-<% end %>
+
+<%= render :partial => 'form_custom_fields', :locals => {:values => @custom_values} %>
 
 <% if @issue.new_record? %>
 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
diff --git a/app/views/issues/_form_custom_fields.rhtml b/app/views/issues/_form_custom_fields.rhtml
new file mode 100644 (file)
index 0000000..291b5d4
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="splitcontentleft">
+<% values.each_with_index do |value, i| %>
+       <p><%= custom_field_tag_with_label value %></p>
+    <% if i >= values.size / 2 - 1 %>
+</div><div class="splitcontentright">
+    <% end %>
+<% end %>
+</div>
+<div style="clear:both;"> </div>