GRN2-243: Added a report issue button to the 500 error page (#796)

* Added a report issue button to the 500 error page

* Removed unused code

* Removed unused quotes
This commit is contained in:
Ahmad Farhat
2019-09-12 14:56:28 -04:00
committed by farhatahmad
parent 7c6ad6d903
commit e13e762349
6 changed files with 37 additions and 17 deletions

View File

@ -16,24 +16,29 @@
<div class="container text-center pt-9">
<div class="display-1 text-primary mb-5">
<% if defined?(status_code) %>
<%= status_code %>
<%= status_code %>
<% else %>
404
404
<% end %>
</div>
<% if defined?(message) && defined?(help) %>
<h1 class="h2 mb-3"><%= message %></h1>
<p class="h4 text-muted font-weight-normal mb-7"><%= help %></p>
<% if defined?(display_back) && display_back %>
<a class="btn btn-primary" href="javascript:history.back()">
<i class="fas fa-arrow-left mr-2"></i><%= t("go_back") %>
</a>
<% end %>
<% else %>
<h1 class="h2 mb-3"><%= t("errors.not_found.message") %></h1>
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.not_found.help") %></p>
<a class="btn btn-primary" href="javascript:history.back()">
<i class="fas fa-arrow-left mr-2"></i><%= t("go_back") %>
</a>
<% if defined?(message) && defined?(help) %>
<h1 class="h2 mb-3"><%= message %></h1>
<p class="h4 text-muted font-weight-normal mb-7"><%= help %></p>
<% if defined?(display_back) && display_back %>
<a class="btn btn-primary" href="javascript:history.back()">
<i class="fas fa-arrow-left mr-2"></i><%= t("go_back") %>
</a>
<% end %>
<% if defined?(report_issue) && report_issue && Rails.configuration.report_issue_url.present? %>
<a class="btn btn-primary ml-4" href="<%= Rails.configuration.report_issue_url %>" target="_blank" rel="noopener">
<i class="fas fa-exclamation mr-2"></i><%= t("errors.internal.report") %>
</a>
<% end %>
<% else %>
<h1 class="h2 mb-3"><%= t("errors.not_found.message") %></h1>
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.not_found.help") %></p>
<a class="btn btn-primary" href="javascript:history.back()">
<i class="fas fa-arrow-left mr-2"></i><%= t("go_back") %>
</a>
<% end %>
</div>

View File

@ -76,6 +76,11 @@
<a class="dropdown-item" href="http://docs.bigbluebutton.org/install/greenlight-v2.html" target="_blank" rel="noopener">
<i class="dropdown-icon far fa-question-circle"></i> <%= t("header.dropdown.help") %>
</a>
<% if Rails.configuration.report_issue_url.present? %>
<a class="dropdown-item" href="<%= Rails.configuration.report_issue_url %>" target="_blank" rel="noopener">
<i class="dropdown-icon fas fa-exclamation mr-3"></i><%= t("errors.internal.report") %>
</a>
<% end %>
<%= link_to logout_path, class: "dropdown-item" do %>
<i class="dropdown-icon fas fa-sign-out-alt"></i> <%= t("header.dropdown.signout") %>
<% end %>