summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-25 14:55:36 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-25 14:55:36 +0000
commitb40d66f39fa8a0425ce2a08d4cf4007d814b97fb (patch)
tree87940a49e073ba7d61af294157b48fa1fdf9ba8c /app/views
parent8d713ae6ca643db8ce548b143635dee361f36ffe (diff)
downloadredmine-b40d66f39fa8a0425ce2a08d4cf4007d814b97fb.tar.gz
redmine-b40d66f39fa8a0425ce2a08d4cf4007d814b97fb.zip
Option for long text custom fields to be displayed under the description field (#21705).
Based on patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16251 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/custom_fields/formats/_text.html.erb3
-rw-r--r--app/views/issues/_form_custom_fields.html.erb7
-rw-r--r--app/views/issues/show.html.erb4
3 files changed, 13 insertions, 1 deletions
diff --git a/app/views/custom_fields/formats/_text.html.erb b/app/views/custom_fields/formats/_text.html.erb
index e72dcab42..79ea7c5e6 100644
--- a/app/views/custom_fields/formats/_text.html.erb
+++ b/app/views/custom_fields/formats/_text.html.erb
@@ -1,3 +1,6 @@
<%= render :partial => 'custom_fields/formats/regexp', :locals => {:f => f, :custom_field => custom_field} %>
<p><%= f.check_box :text_formatting, {:label => :setting_text_formatting}, 'full', '' %></p>
+<% if @custom_field.class.name == "IssueCustomField" %>
+<p><%= f.check_box :full_width_layout %></p>
+<% end %>
<p><%= f.text_area(:default_value, :rows => 5) %></p>
diff --git a/app/views/issues/_form_custom_fields.html.erb b/app/views/issues/_form_custom_fields.html.erb
index 2e12c00e8..13bedd546 100644
--- a/app/views/issues/_form_custom_fields.html.erb
+++ b/app/views/issues/_form_custom_fields.html.erb
@@ -1,4 +1,7 @@
<% custom_field_values = @issue.editable_custom_field_values %>
+<% custom_field_values_full_width = custom_field_values.select { |value| value.custom_field.full_width_layout? } %>
+<% custom_field_values -= custom_field_values_full_width %>
+
<% if custom_field_values.present? %>
<div class="splitcontent">
<div class="splitcontentleft">
@@ -14,3 +17,7 @@
</div>
</div>
<% end %>
+
+<% custom_field_values_full_width.each do |value| %>
+ <p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
+<% end %>
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index b9e5111fa..9d767f0b1 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -66,7 +66,7 @@
end
end
end %>
-<%= render_custom_fields_rows(@issue) %>
+<%= render_half_width_custom_fields_rows(@issue) %>
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
</div>
@@ -87,6 +87,8 @@ end %>
<%= link_to_attachments @issue, :thumbnails => true %>
<% end -%>
+<%= render_full_width_custom_fields_rows(@issue) %>
+
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
<% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>