1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
6 if (controller.andand.action_name == 'show') and params[:uuid]
7 check_trash = controller.model_class.include_trash(true).where(uuid: params[:uuid], is_trashed: true)
8 class_name = controller.model_class.to_s.underscore
9 class_name_h = class_name.humanize(capitalize: false)
10 req_item = safe_join([class_name_h, " with UUID ",
11 raw("<code>"), params[:uuid], raw("</code>")], "")
12 req_item_plain_text = safe_join([class_name_h, " with UUID ", params[:uuid]])
14 req_item = "page you requested"
15 req_item_plain_text = "page you requested"
19 <% if check_trash.andand.any? %>
22 <p>The <%= req_item %> is in the trash.
24 <% object = check_trash.first %>
25 <% if object.editable? %>
26 <% msg = "Untrash '" + if !object.name.blank? then object.name else object.uuid end + "'?" %>
27 <%= link_to({action: 'untrash_items', selection: [object.uuid], controller: :trash_items}, remote: true, method: :post,
28 title: "Untrash", style: 'cursor: pointer;') do %>
32 <%= form_tag url_for({action: 'untrash_items', controller: :trash_items}), {method: :post} %>
33 <%= hidden_field_tag :selection, [object.uuid] %>
34 <button type="submit">Click here to untrash this item <i class="fa fa-fw fa-recycle"></i></button>
42 <p>The <%= req_item %> was not found.</p>
44 <% if !current_user %>
47 <%= link_to(arvados_api_client.arvados_login_url(return_to: strip_token_from_path(request.url)),
48 {class: "btn btn-primary report-issue-modal-window"}) do %>
49 <i class="fa fa-fw fa-sign-in"></i> Log in
54 <% elsif class_name %>
57 Perhaps you'd like to <%= link_to("browse all
58 #{class_name_h.pluralize}", action: :index, controller:
59 class_name.tableize) %>?
66 <% error_message = "The #{req_item_plain_text} was not found." %>
67 <%= render :partial => "report_error", :locals => {error_message: error_message, error_type: '404'} %>