From 1400c7508d48db4d21246209b7ded083ddfc2178 Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Sun, 5 Apr 2020 10:07:57 +0300 Subject: [PATCH 3/3] Show toolbar for full width custom fields with text formatting enabled on issues bulk edit page --- app/helpers/custom_fields_helper.rb | 6 +++++- app/views/issues/bulk_edit.html.erb | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index 229d5c11f..c66dae5fc 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -128,6 +128,10 @@ module CustomFieldsHelper # Returns the custom field tag for when bulk editing objects def custom_field_tag_for_bulk_edit(prefix, custom_field, objects=nil, value='') + css = custom_field.css_classes + if custom_field.full_text_formatting? + css += ' wiki-edit' + end custom_field.format.bulk_edit_tag( self, custom_field_tag_id(prefix, custom_field), @@ -135,7 +139,7 @@ module CustomFieldsHelper custom_field, objects, value, - :class => custom_field.css_classes) + :class => css) end # Returns custom field value tag diff --git a/app/views/issues/bulk_edit.html.erb b/app/views/issues/bulk_edit.html.erb index 663b80038..224ace22a 100644 --- a/app/views/issues/bulk_edit.html.erb +++ b/app/views/issues/bulk_edit.html.erb @@ -212,6 +212,7 @@ <%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>

+ <%= wikitoolbar_for "issue_custom_field_values_#{custom_field.id}", preview_issue_path(:project_id => @project, :issue_id => nil) if custom_field.full_text_formatting? %> <% end %> -- 2.22.0