summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-20 17:20:34 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-20 17:20:34 +0000
commit0b4a02f607a1eefb89bc37b734375fb7d70afc6c (patch)
treebb013941166280cb1f23e5c7c7bd32918392a8a5
parentb6549d763ae7a4dc9ad2f00c7b9d6becc1e39012 (diff)
downloadredmine-0b4a02f607a1eefb89bc37b734375fb7d70afc6c.tar.gz
redmine-0b4a02f607a1eefb89bc37b734375fb7d70afc6c.zip
Display custom fields in two columns on the issue form.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1086 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/custom_fields_helper.rb2
-rw-r--r--app/views/issues/_form.rhtml5
-rw-r--r--app/views/issues/_form_custom_fields.rhtml9
3 files changed, 12 insertions, 4 deletions
diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb
index 25389ca63..8792c8c6e 100644
--- a/app/helpers/custom_fields_helper.rb
+++ b/app/helpers/custom_fields_helper.rb
@@ -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"
diff --git a/app/views/issues/_form.rhtml b/app/views/issues/_form.rhtml
index 779846f4d..d91effedf 100644
--- a/app/views/issues/_form.rhtml
+++ b/app/views/issues/_form.rhtml
@@ -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
index 000000000..291b5d4de
--- /dev/null
+++ b/app/views/issues/_form_custom_fields.rhtml
@@ -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>