Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/assets/stylesheets/dashboard.tweaks.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ body.dashboard {
background-color: white !important;
}

.selected-facet {
margin-right: 1.5em;
}

/* Access eligibility (rights_statement) checkboxes */
div.form-group.check_boxes {
div.checkbox {
Expand Down
127 changes: 127 additions & 0 deletions app/views/hyrax/collections/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<% provide :page_title, construct_page_title(@presenter.title) %>
<div class="hyc-container" itemscope itemtype="http://schema.org/CollectionPage">
<div class="row hyc-header">
<div class="col-md-12">

<% if @presenter.banner_file.present? %>
<div class="hyc-banner" style="background-image:url(<%= @presenter.banner_file %>)">
<% else %>
<div class="hyc-generic">
<% end %>

<div class="hyc-title">
<h1><%= @presenter.title.first %></h1>
<%= @presenter.collection_type_badge %>
<%= @presenter.permission_badge %>
</div>

<% unless @presenter.logo_record.blank? %>
<div class="hyc-logos">
<% @presenter.logo_record.each_with_index do |lr, i| %>

<% if lr[:linkurl].blank? %>
<img alt="<%= lr[:alttext] %>" src="<%= lr[:file_location] %>" onerror="this.style.display='none'"/>
<% else %>
<a href="<%= lr[:linkurl] %>">
<img alt="<%= lr[:alttext] %>" src="<%= lr[:file_location] %>" onerror="this.style.display='none'"/>
</a>
<% end %>

<% end %>
</div>
<% end %>

<% unless @presenter.total_viewable_items.blank? %>
<div class="hyc-bugs">
<div class="hyc-item-count">
<%= pluralize(@presenter.total_viewable_items, t('.item_count')) %></div>

<% unless @presenter.creator.blank? %>
<div class="hyc-created-by">Created by: <%= @presenter.creator.first %></div>
<% end %>

<% unless @presenter.modified_date.blank? %>
<div class="hyc-last-updated">Last Updated: <%= @presenter.modified_date %></div>
<% end %>
</div>
<% end %>

</div>

</div>
</div>

<div class="row hyc-body">
<div class="col-md-8 hyc-description">
<%= render 'collection_description', presenter: @presenter %>

<% if @presenter.collection_type_is_nestable? && @presenter.total_parent_collections > 0 %>
<div class="hyc-blacklight hyc-bl-title">
<h2>
<%= t('.parent_collection_header') %> (<%= @presenter.total_parent_collections %>)
</h2>
</div>
<div class="hyc-blacklight hyc-bl-results">
<%= render 'show_parent_collections', presenter: @presenter %>
</div>
<% end %>

</div>
<div class="col-md-4 hyc-metadata">
<%= render 'hyrax/collections/media_display', presenter: @presenter %>
<% unless collection_search_parameters? %>
<h2><%= t('hyrax.dashboard.collections.show.metadata_header') %></h2>
<%= render 'show_descriptions' %>
<% end %>
</div>
</div>

<!-- Search results label -->
<% if @members_count > 0 || @presenter.subcollection_count > 0 %>
<div class="hyc-blacklight hyc-bl-title">
<% if collection_search_parameters? %>
<h2>
<%= t('hyrax.dashboard.collections.show.search_results') %>
</h2>
<% end %>
</div>
<% end %>

<!-- Search bar -->
<div class="hyc-blacklight hyc-bl-search hyc-body row">
<div class="col-sm-8">
<%= render 'search_form', presenter: @presenter, url: hyrax.collection_path(@presenter.id) %>
</div>
</div>

<!-- Subcollections -->
<% if @presenter.collection_type_is_nestable? && @subcollection_count > 0 %>
<div class="hyc-blacklight hyc-bl-title">
<h2><%= t('.subcollection_count') %> (<%= @subcollection_count %>)</h2>
</div>
<div class="hyc-blacklight hyc-bl-results">
<%= render 'subcollection_list', collection: @subcollection_docs %>
</div>
<% end %>

<!-- Works -->
<% if @members_count > 0 %>
<div class="hyc-blacklight hyc-bl-title">
<h2><%= t('.works_in_collection') %> (<%= @members_count %>)</h2>
</div>

<div class="hyc-blacklight hyc-bl-sort">
<%= render 'sort_and_per_page', collection: @presenter %>
</div>

<div class="hyc-blacklight hyc-bl-results">
<%= render_document_index @member_docs %>
</div>

<div class="hyc-blacklight hyc-bl-pager">
<%= render 'paginate' %>
</div>
<% end # if @members_count > 0 %>
</div>

<span class='hide analytics-event' data-category="collection" data-action="collection-page-view" data-name="<%= @presenter.id %>" >
20 changes: 20 additions & 0 deletions app/views/hyrax/my/_constraints.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<% if query_has_constraints? %>
<div id="appliedParams" class="clearfix constraints-container">
<div class="float-right">
<%= link_to start_over_path,
class: "catalog_startOverLink btn btn-sm btn-text", id: "startOverLink" do %>
<span class="btn btn-sm btn-danger start-over"><span class="fa fa-times"></span></span>
<%= t('blacklight.search.start_over') %>
<% end %>
</div>
<span class="constraints-label"><%= t('blacklight.search.filters.title') %></span>
<%= render_constraints(params.merge(route_set: hyrax)) %>
</div>

<script type="application/javascript">
$(function() {
$("span.applied-filter span:contains(\"Hyrax::AdministrativeSet\")").text("Admin Set").attr('title', 'Admin Set');
});
</script>

<% end %>
23 changes: 23 additions & 0 deletions app/views/hyrax/my/collections/_facets.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<% # main container for facets/limits menu -%>
<% facets = capture do %>
<%= render Blacklight::FacetComponent.with_collection(blacklight_config.facet_fields_in_group(nil), response: @response, component: Hyrax::DropdownFacetFieldComponent)%>
<% end %>

<div class="list-filters" role="group">
<span class="list-filters-label"><%= t("hyrax.dashboard.my.facet_label.collections") %></span>
<%= facets %>
</div>

<script type="application/javascript">
$("button#collection_type_gid_ssim").click(function() {
$("ul#collection_type_gid_ssim-dropdown-options a:contains(\"Admin Set\")").closest("li.dropdown-item").remove();
$("ul#collection_type_gid_ssim-dropdown-options a:contains(\"Hyrax::AdministrativeSet\")").text("Admin Set");

let selected_facet = $("ul#collection_type_gid_ssim-dropdown-options span:contains(\"Hyrax::AdministrativeSet\")")
if (selected_facet !== null) {
selected_facet.text("Admin Set");
selected_facet.after("<a class=\"selected-facet\" rel=\"nofollow\" href=\"/dashboard/collections?locale=en&amp;route_set=%23%3CActionDispatch%3A%3ARouting%3A%3ARoutesProxy%3A0x00007f6b5c926bd8%3E\"><span class=\"remove-icon\" aria-hidden=\"true\">✖</span><span class=\"sr-only visually-hidden\">[remove]</span></a>");
}

});
</script>
9 changes: 9 additions & 0 deletions config/locales/hyrax.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ en:
subject_tesim: Subject
title_tesim: Title
hyrax:
admin:
workflows:
index:
header: Review Submissions
heading:
work: Work
depositor: Depositor
submission_date: Submission Date
status: Status
account_name: My Institution Account Id
contact_form:
notice: Please use the contact form to submit inquiries about this system; to report a problem you are experiencing with the system; to request assistance using the system; or to provide general feedback.
Expand Down