3112: add "report issue" button to fiddlesticks error page
[arvados.git] / apps / workbench / app / views / application / api_error.html.erb
index 10ffbb775fa1c637e7160adb0afde658953a7c9c..a9e9b7ad30dd62fe371de28b861448485ab14aa7 100644 (file)
@@ -21,3 +21,19 @@ If that doesn't work, the information below can help system administrators track
   <% end %>
 </dl>
 <% end %>
+
+<p>
+<br/><strong>Would you like to report this problem?</strong></br>
+<% if api_error %>
+  <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.fullpath, action_method: 'post', api_error_request_url: api_error.request_url, api_error_response: api_error.api_response_s),
+        {class: 'btn btn-primary report-issue-modal-window', 'data-toggle' =>  "modal", 'data-target' => '#report-issue-modal-window', :remote => true, return_to: request.url} do %>
+        <i class="fa fa-fw fa-support"></i> Report problem
+  <% end %>
+<% else %>
+  <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.fullpath, action_method: 'post'),
+        {class: 'btn btn-primary report-issue-modal-window', 'data-toggle' =>  "modal", 'data-target' => '#report-issue-modal-window', :remote => true, return_to: request.url} do %>
+        <i class="fa fa-fw fa-support"></i> Report problem
+  <% end %>
+<% end %>
+</p>
+