Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / app / views / application / 404.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <%
6    if (controller.andand.action_name == 'show') and params[:uuid]
7      class_name = controller.model_class.to_s.underscore
8      class_name_h = class_name.humanize(capitalize: false)
9      req_item = safe_join([class_name_h, " with UUID ",
10                            raw("<code>"), params[:uuid], raw("</code>")], "")
11      req_item_plain_text = safe_join([class_name_h, " with UUID ", params[:uuid]])
12    else
13      req_item = "page you requested"
14      req_item_plain_text = "page you requested"
15    end
16 %>
17
18 <h2>Not Found</h2>
19
20 <p>The <%= req_item %> was not found.</p>
21
22 <% if !current_user %>
23
24   <p>
25     <%= link_to(arvados_api_client.arvados_login_url(return_to: strip_token_from_path(request.url)),
26                 {class: "btn btn-primary report-issue-modal-window"}) do %>
27       <i class="fa fa-fw fa-sign-in"></i> Log in
28     <% end %>
29     to view private data.
30   </p>
31
32 <% elsif class_name %>
33
34   <p>
35     Perhaps you'd like to <%= link_to("browse all
36     #{class_name_h.pluralize}", action: :index, controller:
37     class_name.tableize) %>?
38   </p>
39
40 <% end %>
41
42 <% error_message = "The #{req_item_plain_text} was not found." %>
43 <%= render :partial => "report_error", :locals => {error_message: error_message, error_type: '404'} %>