Skip to content

Commit

Permalink
Only viewer on document page
Browse files Browse the repository at this point in the history
  • Loading branch information
brittnylapierre committed Dec 5, 2023
1 parent cb7d2d9 commit 5105ca8
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 38 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,8 @@ input[type="search"]::-webkit-search-cancel-button {
.uv .leftPanel .views {
height: 93% !important;
}
}

footer, .navbar-search, .topbar {
display: none;
}
71 changes: 38 additions & 33 deletions app/components/blacklight/document_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,50 @@
<%= body %>
<% else %>
<div class="document-main-section container-xxl">

<% if @component.to_s == 'div' %>
<br/>
<% end %>
<%= title %>
<% if @component.to_s == 'div' %>
<%= render(ViewerComponent.new(documentId: @document.id, prefix: 'oocihm')) %>
<% end %>
<%= embed %>
<%= content %>
<% if @component.to_s == 'div' %>
<br/>
<div class="row gx-2 gy-1">
<div class="col-sm-9">
<h2>Document Record</h2>
<%= metadata %>
<% metadata_sections.each do |section| %>
<%= section %>
<% end %>
</div>
<div class="col-sm-3">
<%= render(Blacklight::Document::SidebarComponent.new(presenter: @presenter)) %>
<% else %>

<% if @component.to_s == 'div' %>
<br/>
<% end %>
<%= title %>

<%= embed %>
<%= content %>
<% if @component.to_s == 'div' %>
<br/>
<div class="row gx-2 gy-1">
<div class="col-sm-9">
<h2>Document Record</h2>
<%= metadata %>
<% metadata_sections.each do |section| %>
<%= section %>
<% end %>
</div>
<div class="col-sm-3">
<%= render(Blacklight::Document::SidebarComponent.new(presenter: @presenter)) %>
</div>
</div>
</div>
<% end %>
<% if @component.to_s != 'div' %>
<%= metadata %>
<% metadata_sections.each do |section| %>
<%= section %>
<% end %>
<% end %>
<% partials.each do |partial| %>
<%= partial %>
<% end %>
<% if @component.to_s == 'article' %>
<%= render(LegacyOcrSearchComponent.new(documentId: @document.id, term: params[:q] || '', prefix: 'oocihm')) do %><% end %>
<% end %>
<% if @component.to_s != 'div' %>
<%= metadata %>
<% metadata_sections.each do |section| %>
<%= section %>
<% end %>
<% end %>
<% partials.each do |partial| %>
<%= partial %>
<% end %>
<% if @component.to_s == 'article' %>
<%= render(LegacyOcrSearchComponent.new(documentId: @document.id, term: params[:q] || '', prefix: 'oocihm')) do %><% end %>
<% end %>

<% end %>
</div>

</div>
<%= thumbnail %>
<% end %>
<%= footer %>
Expand Down
10 changes: 5 additions & 5 deletions app/components/viewer_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@

<%= render(DocumentDownloadsComponent.new(documentId: @documentId, prefix: 'oocihm', pageNum: params[:pageNum])) do %><% end %>

<div id="download-help" class="text-aligned">
<!--div id="download-help" class="text-aligned">
<img class="pv-help-icon" src="/help.svg" width="19" height="19" class="" alt=""/>
<span>For help and additional download options, please see our <a href="https://www.crkn-rcdr.ca/en/navigating-collections" target="_blank">documentation</a> <!--Help--></span>
</div>
</div-->

<div id="pv-images-info" class="text-aligned">
<!--div id="pv-images-info" class="text-aligned"-->
<!--span data-toggle="tooltip" data-placement="right" title="" data-original-title="Canadiana uses OCR (optical character recognition) to provide full-text search for printed documents.">
</span-->
<img class="pv-help-icon" src="/info.svg" width="18" height="18" class="" alt=""/>
<!--img class="pv-help-icon" src="/info.svg" width="18" height="18" class="" alt=""/>
<span>57 images, 55 with full-text search</span>
</div>
</div-->
</div>

0 comments on commit 5105ca8

Please sign in to comment.