-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small fixes for views & branding (#2386)
* Move oers partials from pals repo * Handle based near label for collections * Fix branding Indicators default to true... not loading them prevented branding. * Add "Other" to discipline options * Fix discipline spec Added "Other"
- Loading branch information
Showing
8 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
# OVERRIDE Hyrax 5 to display based near label instead of URI | ||
# @TODO Move this behavior into Hyrax in a flexible manner | ||
module Hyrax | ||
module PresenterRendererDecorator | ||
def value(field_name, locals = {}) | ||
field_name == :based_near ? super(:based_near_label, locals) : super(field_name, locals) | ||
end | ||
end | ||
end | ||
|
||
Hyrax::PresenterRenderer.prepend(Hyrax::PresenterRendererDecorator) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
app/views/themes/cultural_show/hyrax/oers/_related_item.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<tr> | ||
<td><strong><%= "#{relationship.titlecase}" %>: </strong></td> | ||
<td class="attribute"><%= link_to(member.link_name, contextual_path(member, @presenter)) %></td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<% content_for(:extra_body_classes, 'works-show text-show-theme-partial ') %> | ||
<% provide :page_title, @presenter.page_title %> | ||
<%= render 'shared/citations' %> | ||
<%= render './shared/additional_citations' %> | ||
<div class="row"> | ||
<div itemscope itemtype="http://schema.org/CreativeWork" class="col-xs-12"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<%= render 'work_title', presenter: @presenter %> | ||
</div> | ||
<div class="card-body"> | ||
<div class="row"> | ||
<%= render 'workflow_actions_widget', presenter: @presenter %> | ||
<% if @presenter.iiif_viewer? %> | ||
<div class="col-sm-12"> | ||
<%= render 'representative_media', presenter: @presenter, viewer: true %> | ||
</div> | ||
<% elsif Flipflop.default_pdf_viewer? && @presenter.show_pdf_viewer? && @presenter.file_set_presenters.any?(&:pdf?) %> | ||
<div class="col-sm-12"> | ||
<%= render 'pdf_js', file_set_presenter: pdf_file_set_presenter(@presenter) %> | ||
</div> | ||
<% end %> | ||
<div class="col-sm-12"> | ||
<%= render "show_actions", presenter: @presenter %> | ||
</div> | ||
<div class="centered-media <%= !@presenter.iiif_viewer? ? 'col-sm-6 text-center' : '' %>"> | ||
<%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.iiif_viewer? || @presenter.show_pdf_viewer? %> | ||
<% if !@presenter.iiif_viewer? %> | ||
<div> | ||
<br/> | ||
<%= render('download_pdf', presenter: @presenter, file_set_id: @presenter.file_set_presenters.first.id) if @presenter.show_pdf_download_button? %> | ||
<%= render 'citations', presenter: @presenter %> | ||
<!-- analytics_button is disabled until future fix --> | ||
<%#= render 'analytics_button', presenter: @presenter %> | ||
<br/> | ||
</div> | ||
<% end %> | ||
</div> | ||
<div class="<%= @presenter.iiif_viewer? ? 'col-sm-8' : 'col-sm-6' %>"> | ||
<%= render 'work_description', presenter: @presenter %> | ||
<%= render 'metadata', presenter: @presenter %> | ||
</div> | ||
<div class="<%= @presenter.iiif_viewer? ? 'col-sm-4' : 'col-sm-12' %> relationships-container"> | ||
<div class='relationships-box'> | ||
<%= render 'relationships', presenter: @presenter %> | ||
</div> | ||
<% if @presenter.class == Hyrax::OerPresenter %> | ||
<div class='relationships-box'> | ||
<%= render 'related_items', presenter: @presenter %> | ||
</div> | ||
<% end %> | ||
<% if @presenter.iiif_viewer? %> | ||
<div> | ||
<br/> | ||
<%= render('download_pdf', presenter: @presenter, file_set_id: @presenter.file_set_presenters.first.id) if @presenter.show_pdf_download_button? %> | ||
<%= render 'citations', presenter: @presenter %> | ||
<!-- analytics_button is disabled until future fix --> | ||
<%#= render 'analytics_button', presenter: @presenter %> | ||
<br/> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div class="col-sm-12"> | ||
<%= render 'items', presenter: @presenter %> | ||
<%# TODO: we may consider adding these partials in the future %> | ||
<%# = render 'sharing_with', presenter: @presenter %> | ||
<%# = render 'user_activity', presenter: @presenter %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
1 change: 1 addition & 0 deletions
1
app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,5 @@ terms: | |
term: Engineering - Industrial | ||
- id: Law | ||
term: Law | ||
- id: Other | ||
term: Other |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters