diff --git a/controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb b/controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb index 0bb8d73..2884a6c 100644 --- a/controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb +++ b/controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb @@ -1,7 +1,8 @@ class ProposalsDiscussionPluginTasksController < TasksController def index - @email_templates = profile.email_templates.find_all_by_template_type(:task_rejection) + @rejection_email_templates = profile.email_templates.find_all_by_template_type(:task_rejection) + @acceptance_email_templates = profile.email_templates.find_all_by_template_type(:task_acceptance) @filter_type = params[:filter_type].presence @filter_text = params[:filter_text].presence diff --git a/views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb b/views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb index 6e4e703..d6db148 100644 --- a/views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb +++ b/views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb @@ -1,5 +1,5 @@ -<%= task_email_template(_('Select an acceptance email template:'), @acceptance_email_templates, task) %> <% unless @view_only %> + <%= task_email_template(_('Select an acceptance email template:'), @acceptance_email_templates, task, false) %> <%= f.fields_for 'article', OpenStruct.new(task.article) do |a| %> <%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task][article_parent_id]", task.target, task.article_parent_id) %> <% end %> diff --git a/views/proposals_discussion_plugin_tasks/_task_reject_details.html.erb b/views/proposals_discussion_plugin_tasks/_task_reject_details.html.erb index f5e4763..d33de6f 100644 --- a/views/proposals_discussion_plugin_tasks/_task_reject_details.html.erb +++ b/views/proposals_discussion_plugin_tasks/_task_reject_details.html.erb @@ -1,4 +1,4 @@ -<%= task_email_template(_('Select a rejection email template:'), @rejection_email_templates, task) %> +<%= task_email_template(_('Select a rejection email template:'), @rejection_email_templates, task) unless @view_only %> <% if task.flagged_for_reproval? %> <% end %> -- libgit2 0.21.2