Skip to content

Commit

Permalink
CatalogController: removing kithe references until after production t…
Browse files Browse the repository at this point in the history
…humbnail crawl
  • Loading branch information
ewlarson committed Jun 28, 2024
1 parent 427a789 commit 7ad0f2a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 46 deletions.
4 changes: 2 additions & 2 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# -*- encoding : utf-8 -*-
require 'blacklight/catalog'
require 'kithe/blacklight_tools/bulk_loading_search_service'
# require 'kithe/blacklight_tools/bulk_loading_search_service'

class CatalogController < ApplicationController
include BlacklightAdvancedSearch::Controller
include BlacklightRangeLimit::ControllerOverride
include Blacklight::Catalog
self.search_service_class = Kithe::BlacklightTools::BulkLoadingSearchService
# self.search_service_class = Kithe::BlacklightTools::BulkLoadingSearchService

configure_blacklight do |config|
# default advanced config values
Expand Down
53 changes: 10 additions & 43 deletions app/views/catalog/_index_mapview_default.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,21 @@
<div class="document-wrapper">
<div class='col-xs-11'>
<div class='media'>
<table>
<%- if document.sidecar.image.attached? %>
<%- if document.sidecar.image.variable? %>
<tr>
<td>Active Storage</td>
</tr>
<tr>
<td><%= image_tag document.sidecar.image.variant(resize_to_fit: [200, nil]), {class: 'mr-3', alt: document.to_semantic_values[:title]} %></td>
</tr>
<%- else %>
<tr>
<td><%= image_tag document.sidecar.image, {class: 'mr-3'} %></td>
</tr>
<%- end %>
<%- if document.sidecar.image.attached? %>
<%- if document.sidecar.image.variable? %>
<%= image_tag document.sidecar.image.variant(resize_to_fit: [200, nil]), {class: 'mr-3', alt: document.to_semantic_values[:title]} %>
<%- else %>
<tr>
<td>
<span class="icon square mr-3">
<%= geoblacklight_icon(document[Settings.FIELDS.RESOURCE_CLASS]&.first, classes: 'svg_tooltip') %>
</span>
</td>
</tr>
<%= image_tag document.sidecar.image, {class: 'mr-3'} %>
<%- end %>
</table>
<% if document&.model&.thumbnail %>
<table>
<tr>
<td style="text-align: center;">AWS S3</td>
</tr>
<tr>
<td>
<% if document&.model&.thumbnail&.file_url(:thumb_standard_2X).nil? %>
<span class="icon square mr-3">
<%= geoblacklight_icon(document[Settings.FIELDS.RESOURCE_CLASS]&.first, classes: 'svg_tooltip') %>
</span>
<% else %>
<%= image_tag document&.model&.thumbnail&.file_url(:thumb_standard_2X) %>
<% end %>
</td>
</tr>
</table>
<% end %>
<%- else %>
<span class="icon square mr-3">
<%= geoblacklight_icon(document[Settings.FIELDS.RESOURCE_CLASS]&.first, classes: 'svg_tooltip') %>
</span>
<%- end %>
<div class='media-body'>
<p><%= geoblacklight_present(:index_fields_display, document) %></p>
</div>
</div>
</div>
</div>
<% end %>
<% end %>
3 changes: 2 additions & 1 deletion app/views/catalog/admin.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
%td
%span AWS S3
%div.media
%span.mr-3= image_tag @document&.kithe_model&.thumbnail&.file_url(:thumb_standard_2X)
- if @document&.thumbnail&.file_derivatives[:thumb_standard_2X].exists?
%span.mr-3= image_tag @document&.kithe_model&.thumbnail&.file_url(:thumb_standard_2X)

%h3 URIs
%table.table.responsive
Expand Down

0 comments on commit 7ad0f2a

Please sign in to comment.