Skip to content

Commit

Permalink
Ongoing review of files that were different in 3 or more repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyf committed Apr 11, 2024
1 parent 72372d7 commit 25ff492
Show file tree
Hide file tree
Showing 14 changed files with 246 additions and 120 deletions.
9 changes: 9 additions & 0 deletions app/models/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions app/models/file_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions app/views/_head_tag_extras.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<%= render_gtm_head(request.original_url) %>

<!-- generics -->
<link rel="icon" href="<%= Site&.favicon&.url(:v32) %>" sizes="32x32">
<link rel="icon" href="<%= Site&.favicon&.url(:v57) %>" sizes="57x57">
Expand Down
20 changes: 11 additions & 9 deletions app/views/_logo.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<% if logo_image %>
<a id="logo" href="<%= hyrax.root_path %>" data-no-turbolink="true">
<i class="fa fa-globe" role="img" aria-label="<%= application_name %>" aria-hidden="true"></i>
<%= image_tag logo_image, alt: block_for(name: 'logo_image_text') %>
</a>
<% else %>
<a id="logo" class="navbar-brand" href="<%= hyrax.root_path %>" data-no-turbolink="true">
<span class="institution_name"><%= application_name %></span>
</a>
<% unless controller.controller_name == 'splash' %>
<% if logo_image %>
<a id="logo" href="<%= hyrax.root_path %>" data-no-turbolink="true">
<span class="glyphicon glyphicon-globe" role="img" aria-label="<%= application_name %>" aria-hidden="true"></span>
<%= image_tag logo_image, alt_text: block_for(name: 'logo_image_text') %>
</a>
<% else %>
<a id="logo" class="navbar-brand" href="<%= hyrax.root_path %>" data-no-turbolink="true">
<span class="institution_name"><%= application_name %></span>
</a>
<% end %>
<% end %>
160 changes: 80 additions & 80 deletions app/views/hyrax/admin/stats/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,94 @@
<h1><span class="fa fa-edit"></span> Statistics for <%= application_name %></h1>
<% end %>

<div class="card tabs">
<!-- Nav tabs -->
<ul id="statistics-tabs" class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#collections" role="tab" data-toggle="tab">Collections</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#works" role="tab" data-toggle="tab">Works</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#downloads" role="tab" data-toggle="tab">Downloads</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#users" role="tab" data-toggle="tab">Users</a>
</li>
</ul>
<div class="card tabs">
<!-- Nav tabs -->
<ul id="statistics-tabs" class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#collections" role="tab" data-toggle="tab">Collections</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#works" role="tab" data-toggle="tab">Works</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#downloads" role="tab" data-toggle="tab">Downloads</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#users" role="tab" data-toggle="tab">Users</a>
</li>
</ul>

<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="collections">
<div class="card labels">
<div class="card-body">
<h2>Collections over time</h2>
<%=
graph_tag('collection-graph', [Hyrax::Statistics::Collections::OverTime.new.points], {
xaxis: {
mode: 'time',
minTickSize: [7, 'day']
},
yaxis: {
minTickSize: 1,
tickDecimals: 0,
min: 0
}
})
%>
</div>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="collections">
<div class="card labels">
<div class="card-body">
<h2>Collections over time</h2>
<%=
graph_tag('collection-graph', [Hyrax::Statistics::Collections::OverTime.new.points], {
xaxis: {
mode: 'time',
minTickSize: [7, 'day']
},
yaxis: {
minTickSize: 1,
tickDecimals: 0,
min: 0
}
})
%>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="works">
<div class="card labels">
<div class="card-body">
<h2>Works over time</h2>
<%=
graph_tag('works-graph', [Hyrax::Statistics::Works::OverTime.new.points], {
xaxis: {
mode: 'time',
minTickSize: [7, 'day']
},
yaxis: {
minTickSize: 1,
tickDecimals: 0,
min: 0
}
})
%>
<h2>Works by type:</h2>
<%=
graph_tag('works-by-type', Hyrax::Statistics::Works::ByResourceType.new.query, series: {
pie: {
show: true,
}
})
%>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="works">
<div class="card labels">
<div class="card-body">
<h2>Works over time</h2>
<%=
graph_tag('works-graph', [Hyrax::Statistics::Works::OverTime.new.points], {
xaxis: {
mode: 'time',
minTickSize: [7, 'day']
},
yaxis: {
minTickSize: 1,
tickDecimals: 0,
min: 0
}
})
%>
<h2>Works by type:</h2>
<%=
graph_tag('works-by-type', Hyrax::Statistics::Works::ByResourceType.new.query, series: {
pie: {
show: true,
}
})
%>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="downloads">
<div class="card labels">
<div class="card-body">
...
</div>
</div>
<div role="tabpanel" class="tab-pane" id="downloads">
<div class="card labels">
<div class="card-body">
...
</div>
</div>
<div role="tabpanel" class="tab-pane" id="users">
<div class="card labels">
<div class="card-body">
<%= render "hyrax/admin/stats/stats_by_date" %>
<%= render "hyrax/admin/stats/top_data" %>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="users">
<div class="card labels">
<div class="card-body">
<%= render "hyrax/admin/stats/stats_by_date" %>
<%= render "hyrax/admin/stats/top_data" %>
</div>
</div>
<script>
Blacklight.onLoad(function() {
var stats = require('statistics_tab_manager');
new stats.Tab('#collections').show();
new stats.Tab('#works');
});
</script>
</div>
<script>
Blacklight.onLoad(function() {
var stats = require('statistics_tab_manager');
new stats.Tab('#collections').show();
new stats.Tab('#works');
});
</script>
</div>
</div>
4 changes: 2 additions & 2 deletions app/views/hyrax/contact_form/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
</div>

<div class="form-group row">
<%= f.label :subject, t('hyrax.contact_form.subject_label'), class: "col-sm-2 col-form-label" %>
<div class="col-sm-10"><%= f.text_field :subject, class: 'form-control', required: true %></div>
<%= negative_label_tag(@captcha, :subject, t('hyrax.contact_form.subject_label'), class: "col-sm-2 col-form-label" %>
<div class="col-sm-10"><%= negative_text_field_tag(@captcha, :subject, class: 'form-control', required: true %></div>
</div>

<div class="form-group row">
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/dashboard/_sidebar.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% menu = Hyrax::MenuPresenter.new(self) %>
<% menu = Hyku::MenuPresenter.new(self) %>
<div class="sidebar-toggle"><span class="fa fa-chevron-circle-right"></span></div>
<nav aria-label="sidebar-nav">
<ul class="nav nav-pills flex-column">
Expand Down
40 changes: 20 additions & 20 deletions app/views/hyrax/dashboard/collections/_form_share.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@
<!-- Add group form -->
<div class="form-add-sharing-wrapper" data-id="<%= @form.id %>">
<%= simple_form_for collection_permission_template_form_for(form: @form),
url: [hyrax, :dashboard, @form, :permission_template],
html: { id: 'group-participants-form' } do |f| %>
url: [hyrax, :dashboard, @form, :permission_template],
html: { id: 'group-participants-form' } do |f| %>

<div class="form-inline add-sharing-form sharing-row-form">
<%= f.fields_for 'access_grants_attributes',
f.object.access_grants.build(agent_type: 'group'),
index: 0 do |builder| %>
f.object.access_grants.build(agent_type: 'group'),
index: 0 do |builder| %>

<div class="form-group mr-2">
<label class="mr-2"><%= t('.add_group') %>:</label>
<%= builder.hidden_field :agent_type %>
<%= builder.text_field :agent_id,
placeholder: t('.search_for_a_group'),
class: 'form-control search-input' %>
placeholder: t('.search_for_a_group'),
class: 'form-control search-input' %>
</div>
<div class="form-group">
<label class="mr-2">as</label>
<%# OVERRIDE: Change select to use Hyrax::Groups %>
<%= builder.select :agent_id,
Hyrax::Group.all.map { |g| [g.humanized_name, g.name] },
{ prompt: t('.select_a_group') },
class: 'form-control' %>
<%# OVERRIDE: Change select to use Hyrax::Groups %>
<%= builder.select :agent_id,
Hyrax::Group.all.map { |g| [g.humanized_name, g.name] },
{ prompt: t('.select_a_group') },
class: 'form-control' %>
</div>
<% end %>
<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info edit-collection-add-sharing-button ml-2', :disabled => true %>
Expand All @@ -46,26 +46,26 @@
<!-- Add user form -->
<div class="form-add-sharing-wrapper" data-id="<%= @form.id %>">
<%= simple_form_for collection_permission_template_form_for(form: @form),
url: [hyrax, :dashboard, @form, :permission_template],
html: { id: 'user-participants-form' } do |f| %>
url: [hyrax, :dashboard, @form, :permission_template],
html: { id: 'user-participants-form' } do |f| %>

<div class="form-inline sharing-row-form add-users">
<%= f.fields_for 'access_grants_attributes',
f.object.access_grants.build(agent_type: 'user'),
index: 0 do |builder| %>
f.object.access_grants.build(agent_type: 'user'),
index: 0 do |builder| %>

<div class="form-group">
<label class="mr-2"><%= t('.add_user') %>:</label>
<%= builder.hidden_field :agent_type %>
<%= builder.text_field :agent_id,
placeholder: t('.search_for_a_user') %>
placeholder: t('.search_for_a_user') %>
</div>
<div class="form-group">
<label class="mx-2">as</label>
<%= builder.select :access,
access_options,
{ prompt: t('.select_a_role') },
class: 'form-control' %>
access_options,
{ prompt: t('.select_a_role') },
class: 'form-control' %>
</div>
<% end %>
Expand All @@ -80,7 +80,7 @@

<h2 class="h3"><%= t(".current_shared") %></h2>
<section class="section-collection-sharing">

<legend><%= t(".current_shared") %></legend>

<%= render 'form_share_table', access: 'managers', filter: :manage? %>
<%= render 'form_share_table', access: 'depositors', filter: :deposit? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/my/_collection_action_menu.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="btn-group">
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= id %>" aria-haspopup="true" aria-expanded="false" aria-controls="<%= ul_id %>">
<span class="sr-only"><%= t("hyrax.dashboard.my.sr.press_to") %> </span>
<%= t("hyrax.dashboard.my.action.select") %>
<%= t("hyrax.dashboard.my.action.select") %> <span class="caret" aria-hidden="true"></span>
</button>
<ul role="menu" id="<%= ul_id %>" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= id %>">
<li class="dropdown-item" role="menuitem" tabindex="-1">
Expand Down
3 changes: 2 additions & 1 deletion app/views/layouts/homepage.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<%# Copied from Hyrax v5.0.1 to remove span with class background-container-gradient - in order to remove gradient hyku wide - theming %>
<% content_for(:navbar) do %>
<div class="image-masthead">
<!-- default repository homepage -->
Expand All @@ -18,4 +19,4 @@
<%= render 'hyrax/homepage/announcement' if controller_name == 'homepage' %>
<% end %>
<%= render template: 'layouts/hyrax' %>
<%= render template: 'layouts/hyrax' %>
5 changes: 4 additions & 1 deletion app/views/layouts/hyrax.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<%= content_for(:head) %>
</head>
<% content_for(:extra_body_classes, 'public-facing') unless params[:controller].match(/^proprietor/) %>
<% content_for(:extra_body_classes, ' search-only') if current_account && current_account.search_only %>

<body class="<%= body_class %> <%= home_page_theme %> <%= search_results_theme %> <%= show_page_theme %>">
<%= render_gtm_body(request.original_url) %>
Expand All @@ -30,7 +31,9 @@
<%= render 'shared/read_only' if Flipflop.read_only? %>
<%= content_for?(:content) ? yield(:content) : yield %>
</div><!-- /#content-wrapper -->
<%= render 'shared/footer' %>
<% unless controller.controller_name == 'splash' %>
<%= render 'shared/footer' %>
<% end %>
<%= render 'shared/modal' %>
</body>
</html>
3 changes: 2 additions & 1 deletion spec/factories/accounts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
gtm_id: "GTM-123456", shared_login: "true",
email_format: ["@pacificu.edu", "@ubiquitypress.com", "@test.com"],
allow_signup: "true",
google_analytics_id: 'UA-123456-12'
google_analytics_id: 'UA-123456-12',
geonames_username: 'geonames'
}
end

Expand Down
Loading

0 comments on commit 25ff492

Please sign in to comment.