Skip to content

Commit 36b3f3a

Browse files
authored
Merge pull request #660 from notch8/update-submodule-etc
Update submodule etc
2 parents 778c7dd + a38d9e0 commit 36b3f3a

21 files changed

Lines changed: 2359 additions & 94 deletions

File tree

app/services/hyku_knapsack/m3_profile_updater.rb

Lines changed: 675 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
11
# frozen_string_literal: true
22
module Hyrax
3-
# Provide select options for the types field
4-
class ContributingLibraryService < QaSelectService
5-
mattr_accessor :authority
6-
self.authority = Qa::Authorities::Local.subauthority_for('contributing_libraries')
7-
def initialize(_authority_name = nil)
8-
super('contributing_libraries')
9-
end
3+
module ContributingLibraryService
4+
extend Hyrax::AuthorityService
105

11-
def self.select_options
12-
authority.all.map do |element|
13-
[element[:label], element[:id]]
14-
end
15-
end
16-
17-
def self.label(id)
18-
authority.find(id).fetch('term')
19-
end
6+
authority_name 'contributing_libraries'
207
end
218
end
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
<% view_options_for(presenter).each do |field, options| %>
2-
<% value = presenter.public_send(field) %>
3-
<% render_attribute = value.present? && (value.is_a?(Enumerable) ? value.any?(&:present?) : true) %>
4-
<% if field == :admin_note %>
5-
<%= presenter.attribute_to_html(:admin_note, options) if presenter.editor? && render_attribute %>
6-
<% else %>
7-
<%= presenter.attribute_to_html(conform_field(field, options), conform_options(field, options)) if render_attribute %>
8-
<% end %>
2+
<% view_options = conform_options(field, options) %>
3+
<%= presenter.attribute_to_html(conform_field(field, options), view_options) if field_visible?(view_options, presenter) %>
94
<% end %>

app/views/hyrax/collections/show.html.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<%# OVERRIDE Hyrax 5.0.1 and Hyku 6.0 to update the layout of the collection show page to be more visually appealing %>
22

3+
<% content_for :canonical_url do %>
4+
<link rel="canonical" href="<%= canonical_url_for(@presenter) %>" />
5+
<% end %>
6+
37
<% provide :page_title, construct_page_title(@presenter.title) %>
48
<div class="hyc-container" itemscope itemtype="http://schema.org/CollectionPage">
59
<div class="row hyc-header">
Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
1-
<%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %>
2-
<%= presenter.attribute_to_html(:alternative_title, html_dl: true) %>
3-
<%= presenter.attribute_to_html(:creator, html_dl: true) %>
4-
<%= presenter.attribute_to_html(:contributor, html_dl: true) %>
5-
<%= presenter.attribute_to_html(:subject, html_dl: true) %>
6-
<%= presenter.attribute_to_html(:abstract, html_dl: true) %>
7-
<%= presenter.attribute_to_html(:publisher, html_dl: true) %>
8-
<%= presenter.attribute_to_html(:language, html_dl: true) %>
9-
<%= presenter.attribute_to_html(:identifier, search_field: 'identifier_tesim', html_dl: true) %>
10-
<%= presenter.attribute_to_html(:based_near_label, html_dl: true) %>
11-
<%= presenter.attribute_to_html(:keyword, html_dl: true) %>
12-
<%= presenter.attribute_to_html(:date_created, search_field: 'date_created_tesim', html_dl: true) %>
13-
<%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %>
14-
<%= presenter.attribute_to_html(:resource_type, html_dl: true) %>
15-
<%= presenter.attribute_to_html(:source, html_dl: true) %>
16-
<%= presenter.attribute_to_html(:additional_information, html_dl: true) %>
17-
<%= presenter.attribute_to_html(:rights_statement, html_dl: true) %>
18-
<%= presenter.attribute_to_html(:rights_notes, html_dl: true) %>
19-
<%= presenter.attribute_to_html(:extent, html_dl: true) %>
20-
<%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %>
21-
<%= presenter.attribute_to_html(:contributing_library, html_dl: true) if presenter.editor? %>
22-
<%= presenter.attribute_to_html(:library_catalog_identifier, html_dl: true) if presenter.editor? %>
23-
<%= presenter.attribute_to_html(:chronology_note, html_dl: true) if presenter.editor? %>
1+
<% view_options_for(presenter).each do |field, options| %>
2+
<% view_options = conform_options(field, options) %>
3+
<%= presenter.attribute_to_html(conform_field(field, options), view_options) if field_visible?(view_options, presenter) %>
4+
<% end %>

app/views/themes/reshare_show/hyrax/base/show.html.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<% content_for :canonical_url do %>
2+
<link rel="canonical" href="<%= canonical_url_for(@presenter) %>" />
3+
<% end %>
4+
15
<% provide :page_title, @presenter.page_title %>
26
<div class="row work-type">
37
<div itemscope itemtype="http://schema.org/CreativeWork" class="col-12">

app/views/themes/reshare_show/layouts/hyrax.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<head>
55
<%= render partial: 'layouts/head_tag_content' %>
66
<%= content_for(:head) %>
7+
<%= yield(:canonical_url) %>
78
</head>
89
<% content_for(:extra_body_classes, 'public-facing') unless params[:controller].match(/^proprietor/) %>
910

config/features.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

config/initializers/default_bulkrax_mappings.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
'previous_version' => { from: ['previous_version'], split: '\|' },
5353
'proxy_depositor' => { from: ['proxy_depositor'], generated: true },
5454
'publisher' => { from: ['publisher'], split: '\|' },
55+
'path' => { from: ['redirect_path'], object: 'redirects', nested_attributes: true },
56+
'is_display_url' => { from: ['redirect_is_display_url'], object: 'redirects', nested_attributes: true },
5557
'related_item' => { from: ['related_item'], split: '\|' },
5658
'related_url' => { from: ['related_url', 'relation'], split: '\|' },
5759
'relative_path' => { from: ['relative_path'], split: '\|', generated: true },

0 commit comments

Comments
 (0)