Skip to content

Commit

Permalink
Document#edit - revert to old view until thumbnail migration is finished
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlarson committed Dec 7, 2023
1 parent 1e830d0 commit 30755e1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
7 changes: 0 additions & 7 deletions app/views/admin/documents/_form_nav.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
<nav class="nav flex-column ml-4 mt-6">
<% if @document.persisted? %>
<strong class="mb-4"><%= link_to "GBL♦Admin | View in GeoBlacklight", solr_document_url(@document), { class: 'btn btn-warning' } %></strong>

<% if @document&.members&.first&.file&.exists? %>
<%= link_to admin_document_document_assets_url(@document) do %>
<strong class="mt-2">Thumbnail</strong><br>
<%= image_tag(@document.members.first.file_url(:thumb_standard_2X), { class: "p-2", width: 150 }) %>
<% end %>
<% end %>
<% end %>

<%- form_elements = FormElement.all.order(position: :asc) %>
Expand Down
30 changes: 30 additions & 0 deletions app/views/admin/documents/_form_nav_kithe.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<div class="make-me-sticky mt-4 ml-4">
<nav class="nav flex-column ml-4 mt-6">
<% if @document.persisted? %>
<strong class="mb-4"><%= link_to "GBL♦Admin | View in GeoBlacklight", solr_document_url(@document), { class: 'btn btn-warning' } %></strong>

<% if @document&.members&.first&.file&.exists? %>
<%= link_to admin_document_document_assets_url(@document) do %>
<strong class="mt-2">Thumbnail</strong><br>
<%= image_tag(@document.members.first.file_url(:thumb_standard_2X), { class: "p-2", width: 150 }) %>
<% end %>
<% end %>
<% end %>

<%- form_elements = FormElement.all.order(position: :asc) %>
<%- form_elements.each do |form_element| %>
<% if form_element.kind_of? FormHeader %>
<strong class="mt-2"><a data-controller="scroll-to" class="mt-4" href="#<%= form_element.label.parameterize(separator: '-') %>"><%= form_element.label %></a></strong>
<% end %>
<% if form_element.kind_of? FormGroup %>
<a data-controller="scroll-to" class="ml-2" href="#<%= form_element.label.parameterize(separator: '-') %>"><%= form_element.label %></a>
<% end %>
<% end %>

<% if @document.persisted? %>
<%= link_to "Institutional Access Links", admin_document_document_accesses_url(@document), class: "ml-2" %>
<%= link_to "Multiple Download Links", admin_document_document_downloads_url(@document), class: "ml-2" %>
<%= link_to "Additional Assets", admin_document_document_assets_url(@document), class: "ml-2" %>
<% end %>
</nav>
</div>

0 comments on commit 30755e1

Please sign in to comment.