From 25ff4928a009d16ebe0dde4abd7f78b5edf46c33 Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Wed, 10 Apr 2024 15:42:50 -0400 Subject: [PATCH] Ongoing review of files that were different in 3 or more repositories --- app/models/collection.rb | 9 + app/models/file_set.rb | 8 + app/views/_head_tag_extras.html.erb | 1 + app/views/_logo.html.erb | 20 ++- app/views/hyrax/admin/stats/show.html.erb | 160 +++++++++--------- app/views/hyrax/contact_form/new.html.erb | 4 +- app/views/hyrax/dashboard/_sidebar.html.erb | 2 +- .../collections/_form_share.html.erb | 40 ++--- .../hyrax/my/_collection_action_menu.html.erb | 2 +- app/views/layouts/homepage.html.erb | 3 +- app/views/layouts/hyrax.html.erb | 5 +- spec/factories/accounts.rb | 3 +- spec/models/generic_work_spec.rb | 10 ++ spec/views/_user_util_links.html.erb_spec.rb | 99 ++++++++++- 14 files changed, 246 insertions(+), 120 deletions(-) diff --git a/app/models/collection.rb b/app/models/collection.rb index 246913adaf..055490e481 100644 --- a/app/models/collection.rb +++ b/app/models/collection.rb @@ -2,6 +2,15 @@ # Generated by hyrax:models class Collection < ActiveFedora::Base + + property :bulkrax_identifier, predicate: ::RDF::URI("https://hykucommons.org/terms/bulkrax_identifier"), multiple: false do |index| + index.as :stored_searchable, :facetable + end + + property :collection_subtitle, predicate: ::RDF::URI('https://hykucommons.org/terms/collection_subtitle') do |index| + index.as :stored_searchable, :facetable + end + include ::Hyrax::CollectionBehavior # You can replace these metadata if they're not suitable include Hyrax::BasicMetadata diff --git a/app/models/file_set.rb b/app/models/file_set.rb index a4f6deacb1..bd4303f00b 100644 --- a/app/models/file_set.rb +++ b/app/models/file_set.rb @@ -2,5 +2,13 @@ # Generated by hyrax:models:install class FileSet < ActiveFedora::Base + property :is_derived, + predicate: ::RDF::URI.intern('https://hykucommons.org/terms/isDerived'), + multiple: false do |index| + index.as :stored_searchable + end + property :bulkrax_identifier, predicate: ::RDF::URI("https://hykucommons.org/terms/bulkrax_identifier"), multiple: false do |index| + index.as :stored_searchable, :facetable + end include ::Hyrax::FileSetBehavior end diff --git a/app/views/_head_tag_extras.html.erb b/app/views/_head_tag_extras.html.erb index d690322c8c..36f4125996 100644 --- a/app/views/_head_tag_extras.html.erb +++ b/app/views/_head_tag_extras.html.erb @@ -1,4 +1,5 @@ <%= render_gtm_head(request.original_url) %> + diff --git a/app/views/_logo.html.erb b/app/views/_logo.html.erb index 08eca88bde..5d786ed7f6 100644 --- a/app/views/_logo.html.erb +++ b/app/views/_logo.html.erb @@ -1,10 +1,12 @@ -<% if logo_image %> - -<% else %> - +<% unless controller.controller_name == 'splash' %> + <% if logo_image %> + + <% else %> + + <% end %> <% end %> diff --git a/app/views/hyrax/admin/stats/show.html.erb b/app/views/hyrax/admin/stats/show.html.erb index 4996fe330e..44713ae8fb 100644 --- a/app/views/hyrax/admin/stats/show.html.erb +++ b/app/views/hyrax/admin/stats/show.html.erb @@ -2,94 +2,94 @@

Statistics for <%= application_name %>

<% end %> -
- - +
+ + - -
-
-
-
-

Collections over time

- <%= - graph_tag('collection-graph', [Hyrax::Statistics::Collections::OverTime.new.points], { - xaxis: { - mode: 'time', - minTickSize: [7, 'day'] - }, - yaxis: { - minTickSize: 1, - tickDecimals: 0, - min: 0 - } - }) - %> -
+ +
+
+
+
+

Collections over time

+ <%= + graph_tag('collection-graph', [Hyrax::Statistics::Collections::OverTime.new.points], { + xaxis: { + mode: 'time', + minTickSize: [7, 'day'] + }, + yaxis: { + minTickSize: 1, + tickDecimals: 0, + min: 0 + } + }) + %>
-
-
-
-

Works over time

- <%= - graph_tag('works-graph', [Hyrax::Statistics::Works::OverTime.new.points], { - xaxis: { - mode: 'time', - minTickSize: [7, 'day'] - }, - yaxis: { - minTickSize: 1, - tickDecimals: 0, - min: 0 - } - }) - %> -

Works by type:

- <%= - graph_tag('works-by-type', Hyrax::Statistics::Works::ByResourceType.new.query, series: { - pie: { - show: true, - } - }) - %> -
+
+
+
+
+

Works over time

+ <%= + graph_tag('works-graph', [Hyrax::Statistics::Works::OverTime.new.points], { + xaxis: { + mode: 'time', + minTickSize: [7, 'day'] + }, + yaxis: { + minTickSize: 1, + tickDecimals: 0, + min: 0 + } + }) + %> +

Works by type:

+ <%= + graph_tag('works-by-type', Hyrax::Statistics::Works::ByResourceType.new.query, series: { + pie: { + show: true, + } + }) + %>
-
-
-
- ... -
+
+
+
+
+ ...
-
-
-
- <%= render "hyrax/admin/stats/stats_by_date" %> - <%= render "hyrax/admin/stats/top_data" %> -
+
+
+
+
+ <%= render "hyrax/admin/stats/stats_by_date" %> + <%= render "hyrax/admin/stats/top_data" %>
-
+
+
diff --git a/app/views/hyrax/contact_form/new.html.erb b/app/views/hyrax/contact_form/new.html.erb index b1c6d774c6..c79984e05f 100644 --- a/app/views/hyrax/contact_form/new.html.erb +++ b/app/views/hyrax/contact_form/new.html.erb @@ -39,8 +39,8 @@
- <%= f.label :subject, t('hyrax.contact_form.subject_label'), class: "col-sm-2 col-form-label" %> -
<%= f.text_field :subject, class: 'form-control', required: true %>
+ <%= negative_label_tag(@captcha, :subject, t('hyrax.contact_form.subject_label'), class: "col-sm-2 col-form-label" %> +
<%= negative_text_field_tag(@captcha, :subject, class: 'form-control', required: true %>
diff --git a/app/views/hyrax/dashboard/_sidebar.html.erb b/app/views/hyrax/dashboard/_sidebar.html.erb index 8a3522e07b..5052cc4296 100644 --- a/app/views/hyrax/dashboard/_sidebar.html.erb +++ b/app/views/hyrax/dashboard/_sidebar.html.erb @@ -1,4 +1,4 @@ -<% menu = Hyrax::MenuPresenter.new(self) %> +<% menu = Hyku::MenuPresenter.new(self) %>