From 4f7160e437e549c28a57c8632ca2fca8bb46fd94 Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Sun, 5 Apr 2020 12:38:53 +0300 Subject: [PATCH] Show wiki toolbar in time spent form for custom fields with text formatting enabled --- app/views/timelog/_form.html.erb | 3 +++ app/views/timelog/bulk_edit.html.erb | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/views/timelog/_form.html.erb b/app/views/timelog/_form.html.erb index 24bce8b6d..3a0543e7c 100644 --- a/app/views/timelog/_form.html.erb +++ b/app/views/timelog/_form.html.erb @@ -31,6 +31,9 @@

<%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %>

<% @time_entry.editable_custom_field_values.each do |value| %>

<%= custom_field_tag_with_label :time_entry, value %>

+ <% if value.custom_field.full_text_formatting? %> + <%= wikitoolbar_for "time_entry_custom_field_values_#{value.custom_field_id}", preview_issue_path(:project_id => @project) %> + <% end %> <% end %> <%= call_hook(:view_timelog_edit_form_bottom, { :time_entry => @time_entry, :form => f }) %> diff --git a/app/views/timelog/bulk_edit.html.erb b/app/views/timelog/bulk_edit.html.erb index bb7caa14b..3571b4016 100644 --- a/app/views/timelog/bulk_edit.html.erb +++ b/app/views/timelog/bulk_edit.html.erb @@ -68,7 +68,11 @@

<% @custom_fields.each do |custom_field| %> -

<%= custom_field_tag_for_bulk_edit('time_entry', custom_field, @time_entries, @time_entry_params[:custom_field_values][custom_field.id.to_s]) %>

+

+ + <%= custom_field_tag_for_bulk_edit('time_entry', custom_field, @time_entries, @time_entry_params[:custom_field_values][custom_field.id.to_s]) %> +

+ <%= wikitoolbar_for "time_entry_custom_field_values_#{custom_field.id}", preview_issue_path(:project_id => @project) if custom_field.full_text_formatting? %> <% end %> <%= call_hook(:view_time_entries_bulk_edit_details_bottom, { :time_entries => @time_entries }) %> -- 2.22.0