diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb index 3bea0915..365955d3 100644 --- a/app/controllers/errors_controller.rb +++ b/app/controllers/errors_controller.rb @@ -27,7 +27,8 @@ class ErrorsController < ApplicationController status_code: 500, message: I18n.t("errors.internal.message"), help: I18n.t("errors.internal.help"), - display_back: true + display_back: true, + report_issue: true } end diff --git a/app/views/errors/greenlight_error.html.erb b/app/views/errors/greenlight_error.html.erb index c7c83e74..0c75a78a 100644 --- a/app/views/errors/greenlight_error.html.erb +++ b/app/views/errors/greenlight_error.html.erb @@ -16,24 +16,29 @@
<%= help %>
- <% if defined?(display_back) && display_back %> - - <%= t("go_back") %> - - <% end %> - <% else %> -<%= t("errors.not_found.help") %>
- - <%= t("go_back") %> - + <% if defined?(message) && defined?(help) %> +<%= help %>
+ <% if defined?(display_back) && display_back %> + + <%= t("go_back") %> + <% end %> + <% if defined?(report_issue) && report_issue && Rails.configuration.report_issue_url.present? %> + + <%= t("errors.internal.report") %> + + <% end %> + <% else %> +<%= t("errors.not_found.help") %>
+ + <%= t("go_back") %> + + <% end %>