From d902a42962dc420d256bab431acb2b9f414c55d4 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Thu, 21 Sep 2017 17:41:21 +0200 Subject: [PATCH] Pull out mark as solved button --- .../_mark_as_solved.html.slim | 7 +++++++ app/views/request_for_comments/show.html.erb | 16 +--------------- 2 files changed, 8 insertions(+), 15 deletions(-) create mode 100644 app/views/request_for_comments/_mark_as_solved.html.slim diff --git a/app/views/request_for_comments/_mark_as_solved.html.slim b/app/views/request_for_comments/_mark_as_solved.html.slim new file mode 100644 index 00000000..b3df57fd --- /dev/null +++ b/app/views/request_for_comments/_mark_as_solved.html.slim @@ -0,0 +1,7 @@ +button.btn.btn-primary#mark-as-solved-button = t('request_for_comments.mark_as_solved') + +#thank-you-container + p = t('request_for_comments.write_a_thank_you_node') + textarea#thank-you-note + button.btn.btn-primary#send-thank-you-note = t('request_for_comments.send_thank_you_note') + button.btn.btn-default#cancel-thank-you-note = t('request_for_comments.cancel_thank_you_note') diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index 3814ba21..8ef7e16e 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -27,21 +27,7 @@ <% if (policy(@request_for_comment).mark_as_solved? and not @request_for_comment.solved?) %> - -
-

- <%= t('request_for_comments.write_a_thank_you_node') %> -

- - - -
+ <%= render('mark_as_solved') %> <% end %> <% if @current_user.admin? && user.is_a?(ExternalUser) %>