diff --git a/app/assets/images/audio.png b/app/assets/images/audio.png new file mode 100644 index 00000000..a11a773b Binary files /dev/null and b/app/assets/images/audio.png differ diff --git a/app/assets/images/collection.png b/app/assets/images/collection.png new file mode 100644 index 00000000..8f3b137f Binary files /dev/null and b/app/assets/images/collection.png differ diff --git a/app/assets/images/default.png b/app/assets/images/default.png new file mode 100644 index 00000000..b5437e4e Binary files /dev/null and b/app/assets/images/default.png differ diff --git a/app/assets/images/unauthorized.png b/app/assets/images/unauthorized.png new file mode 100644 index 00000000..b5437e4e Binary files /dev/null and b/app/assets/images/unauthorized.png differ diff --git a/app/assets/images/work.png b/app/assets/images/work.png new file mode 100644 index 00000000..5ed5b102 Binary files /dev/null and b/app/assets/images/work.png differ diff --git a/app/assets/stylesheets/scholarspace/components/_collection.scss b/app/assets/stylesheets/scholarspace/components/_collection.scss index d0ea5951..a27a89e6 100755 --- a/app/assets/stylesheets/scholarspace/components/_collection.scss +++ b/app/assets/stylesheets/scholarspace/components/_collection.scss @@ -189,4 +189,60 @@ #select2-drop { border: none; } -} \ No newline at end of file +} + +// collections list page styles +.collections-description-wrapper { + padding: 1.5em 1em; + text-align: center; +} + +.collections-list { + background-color: $gw-white; + + &:nth-child(odd) { + background-color: $gw-white; + } + + .search-result-wrapper { + display: flex; + flex-direction: row; + align-items: start; + padding-bottom: 0; + + .img-container { + width: 10em; + height: 10em; + + img { + width: 100%; + height: 100%; + object-fit: cover; + } + } + + .h2-section-header a { + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + .collections-title-wrapper p { + margin-top: 1em; + } + + @media (max-width: 1199px) { + .img-container { + width: 9em; + height: 9em; + } + } + + @media (max-width: $mobile-max) { + flex-direction: column; + align-items: center; + } + } +} diff --git a/app/assets/stylesheets/scholarspace/components/_header.scss b/app/assets/stylesheets/scholarspace/components/_header.scss index 0979e627..f408cff4 100644 --- a/app/assets/stylesheets/scholarspace/components/_header.scss +++ b/app/assets/stylesheets/scholarspace/components/_header.scss @@ -267,6 +267,9 @@ header { } .navbar-nav { + display: flex; + align-items: center; + .open > .navbar-item:hover, .open > .navbar-item:focus { color: $gw-white; background-color: $gw-light-blue; @@ -286,6 +289,19 @@ header { } } + .navbar-divider { + &::before { + content: "|"; + color: #688a9c; + font-size: 1em; + width: 4px; + margin-left: -2px; + padding: 0; + text-align: center; + display: inline-block; + } + } + li.navbar-browse { padding: 0 1em; diff --git a/app/assets/stylesheets/scholarspace/components/_homepage.scss b/app/assets/stylesheets/scholarspace/components/_homepage.scss index 161298d1..bedba42d 100644 --- a/app/assets/stylesheets/scholarspace/components/_homepage.scss +++ b/app/assets/stylesheets/scholarspace/components/_homepage.scss @@ -204,7 +204,6 @@ display: flex; flex-direction: row; justify-content: space-between; - align-items: baseline; padding-top: 0.5em; .recent-work { diff --git a/app/assets/stylesheets/scholarspace/components/_search.scss b/app/assets/stylesheets/scholarspace/components/_search.scss index caaee5d6..06ffdbf2 100644 --- a/app/assets/stylesheets/scholarspace/components/_search.scss +++ b/app/assets/stylesheets/scholarspace/components/_search.scss @@ -1,286 +1,290 @@ // search results styling #facets { - .top-panel-heading { + .top-panel-heading { + border: none; + border-radius: 0; + margin-bottom: 0; + background-color: $gw-dark-blue; + color: $gw-white; + text-align: center; + + h2.facets-heading { + font-weight: 200; + font-size: 1rem; + padding-bottom: 0; + } + + .facets-toggle { + margin: 0; border: none; - border-radius: 0; + background-color: transparent; + + &:hover { + background-color: transparent; + } + + .icon-bar { + background-color: $gw-white; + } + } + + @media (min-width: $mobile-breakpoint) { + background-color: transparent; + color: $gw-dark-grey; + padding: 0; + } + } + + .panel { + border: none; + + .panel-heading { margin-bottom: 0; + border: none; + border-radius: 0; background-color: $gw-dark-blue; color: $gw-white; - text-align: center; - h2.facets-heading { - font-weight: 200; + h3.panel-title { font-size: 1rem; - padding-bottom: 0; - } - - .facets-toggle { - margin: 0; - border: none; - background-color: transparent; - - &:hover { - background-color: transparent; + font-weight: 200; + + a:hover { + color: $gw-white; + text-decoration: none; } - - .icon-bar { - background-color: $gw-white; + + &::after { + color: $gw-white; } } - - @media (min-width: $mobile-breakpoint) { - background-color: transparent; - color: $gw-dark-grey; - padding: 0; - } } - - .panel { - border: none; - - .panel-heading { + + .panel-body { + background-color: $gw-light-grey; + + ul { margin-bottom: 0; - border: none; - border-radius: 0; - background-color: $gw-dark-blue; - color: $gw-white; - - h3.panel-title { - font-size: 1rem; - font-weight: 200; - - a:hover { - color: $gw-white; - text-decoration: none; - } - - &::after { - color: $gw-white; - } + + .selected { + color: $gw-dark-grey; } - } - - .panel-body { - background-color: $gw-light-grey; - - ul { - margin-bottom: 0; - - .selected { - color: $gw-dark-grey; - } - - .glyphicon { - vertical-align: initial; - - &:hover { - color: $gw-light-blue; - } + + .glyphicon { + vertical-align: initial; + + &:hover { + color: $gw-light-blue; } } } } } +} - .dl-horizontal { - display: grid; - } +.dl-horizontal { + display: grid; +} + +.panel-group .panel + .panel { + margin-top: 0; +} + +#appliedParams { + background-color: $gw-white; + text-align: right; - .panel-group .panel + .panel { - margin-top: 0; + span { + font-weight: 200; } - - #appliedParams { - background-color: $gw-white; - text-align: right; - - span { - font-weight: 200; - } - - span.appliedFilter .remove { - background-color: $gw-light-blue; - border-radius: 0; - border-color: $gw-light-blue; - - &:hover { - background-color: $gw-hover-buff; - border-color: $gw-hover-buff; - color: $gw-dark-blue; - } + + span.appliedFilter .remove { + background-color: $gw-light-blue; + border-radius: 0; + border-color: $gw-light-blue; + + &:hover { + background-color: $gw-hover-buff; + border-color: $gw-hover-buff; + color: $gw-dark-blue; } - - span.constraint-value { - border-radius: 0; - border-color: $gw-dark-grey; + } + + span.constraint-value { + border-radius: 0; + border-color: $gw-dark-grey; + } + + a#startOverLink { + background-color: $gw-light-blue; + color: $gw-white; + margin-left: 1rem; + + &:hover { + background-color: $gw-hover-buff; + color: $gw-dark-blue; } - + } + + @media (min-width: $mobile-breakpoint) { a#startOverLink { - background-color: $gw-light-blue; - color: $gw-white; margin-left: 1rem; - - &:hover { - background-color: $gw-hover-buff; - color: $gw-dark-blue; - } - } - - @media (min-width: $mobile-breakpoint) { - a#startOverLink { - margin-left: 1rem; - } } } - - #sortAndPerPage { +} + +#sortAndPerPage { + border-bottom: none; + margin-bottom: 0; + display: flex; + flex-direction: column; + align-items: center; + + @media (min-width: $mobile-breakpoint) { + display: block; + } +} + +li.document { + padding: 1em; + + &:nth-child(odd) { + background-color: $gw-light-grey; + } + + .search-result-wrapper { border-bottom: none; margin-bottom: 0; - display: flex; - flex-direction: column; - align-items: center; - - @media (min-width: $mobile-breakpoint) { - display: block; - } - } - - li.document { - padding: 1em; - - &.blacklight-collection { - .col-md-2, - .col-md-10, - .collection-counts-wrapper { - display: none; - } - } - - &:nth-child(odd) { - background-color: $gw-light-grey; + text-align: center; + + .list-thumbnail { + padding-bottom: 0; } - - .search-result-wrapper { - border-bottom: none; + + dl { margin-bottom: 0; - text-align: center; - - .list-thumbnail { - padding-bottom: 0; - } - - dl { + + dd { margin-bottom: 0; - - dd { - margin-bottom: 0; - } - } - - .collection-counts-wrapper .collection-counts-item { - font-weight: 400; - } - - @media (min-width: $mobile-breakpoint) { - text-align: start; } } + + @media (min-width: $mobile-breakpoint) { + text-align: start; + } } - - .pagination { - margin: 0; - - li { - span, a { +} + +.pagination { + margin: 0; + + li { + span, a { + border: none; + border-radius: 0; + + &:hover { + background-color: transparent; border: none; - border-radius: 0; - - &:hover { - background-color: transparent; - border: none; - color: $gw-hover-orange; - } + color: $gw-hover-orange; } } - - .active > span { + } + + .active > span { + background-color: transparent; + border: none; + color: $gw-dark-grey; + font-weight: 400; + + &:hover { background-color: transparent; - border: none; color: $gw-dark-grey; - font-weight: 400; - - &:hover { - background-color: transparent; - color: $gw-dark-grey; - } } } - - .search-widgets { +} + +.search-widgets { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + + #sort-dropdown, #per_page-dropdown { width: 100%; display: flex; flex-direction: column; align-items: center; - - #sort-dropdown, #per_page-dropdown { - width: 100%; - display: flex; - flex-direction: column; - align-items: center; - - .widget-label { - margin-right: 0; - } - - button { - width: 100%; - border-radius: 0; - border-color: $gw-dark-grey; - color: $gw-dark-grey; - font-weight: 200; - } + + .widget-label { + margin-right: 0; } - - .view-type .btn-group a, .view-type-group btn-group a { + + button { + width: 100%; border-radius: 0; border-color: $gw-dark-grey; - - &.active { - box-shadow: none; - background-color: $gw-light-blue; - border-color: $gw-light-blue; - color: $gw-white; - } - - &:hover { - box-shadow: none; - } + color: $gw-dark-grey; + font-weight: 200; } - - > div { - margin: 0.3em 0; + } + + .view-type .btn-group a, .view-type-group btn-group a { + border-radius: 0; + border-color: $gw-dark-grey; + + &.active { + box-shadow: none; + background-color: $gw-light-blue; + border-color: $gw-light-blue; + color: $gw-white; } - - @media (min-width: $mobile-breakpoint) { + + &:hover { + box-shadow: none; + } + } + + > div { + margin: 0.3em 0; + } + + @media (min-width: $mobile-breakpoint) { + width: fit-content; + flex-direction: row; + + #sort-dropdown, #per_page-dropdown { width: fit-content; flex-direction: row; - #sort-dropdown, #per_page-dropdown { - width: fit-content; - flex-direction: row; - - .widget-label { - margin-right: 0.3rem; - } - - button { - width: fit-content; - } + .widget-label { + margin-right: 0.3rem; } - - > div { - margin: 0 0.3em; + + button { + width: fit-content; } } - } \ No newline at end of file + + > div { + margin: 0 0.3em; + } + } +} + +@media (max-width: 991px) { + .search-result-wrapper .col-md-2 { + margin-bottom: 0; + } + + .search-result-wrapper .list-thumbnail, + .search-result-wrapper .col-md-2 { + text-align: center; + padding-bottom: 1em; + + img { + max-height: 200px; + } + } +} diff --git a/app/controllers/hyrax/collections_page_controller.rb b/app/controllers/hyrax/collections_page_controller.rb new file mode 100644 index 00000000..b232ae3f --- /dev/null +++ b/app/controllers/hyrax/collections_page_controller.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +class Hyrax::CollectionsPageController < ApplicationController + include Blacklight::SearchHelper + include Blacklight::SearchContext + include Blacklight::AccessControls::Catalog + + class_attribute :presenter_class + self.presenter_class = Hyrax::CollectionsPagePresenter + + def index + @presenter = presenter_class.new(collections) + end + + private + + # Return All collections + def collections + Hyrax::CollectionsService.new(self).search_results + rescue Blacklight::Exceptions::ECONNREFUSED, Blacklight::Exceptions::InvalidRequest + [] + end +end diff --git a/app/models/collection.rb b/app/models/collection.rb index 06286c56..87e71166 100644 --- a/app/models/collection.rb +++ b/app/models/collection.rb @@ -3,5 +3,5 @@ class Collection < ActiveFedora::Base include ::Hyrax::CollectionBehavior # You can replace these metadata if they're not suitable include Hyrax::BasicMetadata - # self.indexer = Hyrax::CollectionWithBasicMetadataIndexer + self.indexer = Hyrax::CollectionWithBasicMetadataIndexer end diff --git a/app/presenters/hyrax/collections_page_presenter.rb b/app/presenters/hyrax/collections_page_presenter.rb new file mode 100644 index 00000000..c81ac808 --- /dev/null +++ b/app/presenters/hyrax/collections_page_presenter.rb @@ -0,0 +1,9 @@ +module Hyrax + class CollectionsPagePresenter + attr_reader :collections + + def initialize(collections) + @collections = collections + end + end +end \ No newline at end of file diff --git a/app/views/catalog/_index_list_default.html.erb b/app/views/catalog/_index_list_default.html.erb index e2c5c52d..7119e0c8 100644 --- a/app/views/catalog/_index_list_default.html.erb +++ b/app/views/catalog/_index_list_default.html.erb @@ -17,9 +17,7 @@ <% collection_presenter = Hyrax::CollectionPresenter.new(document, current_ability) %>
-
- <%= collection_presenter.total_viewable_collections %>Collections -
+ <%# removed subcollections counter from here as GWSS currently has no nested collections %>
<%= collection_presenter.total_viewable_works %>Works
diff --git a/app/views/errors/not_found.html.erb b/app/views/errors/not_found.html.erb index 7d72aa6b..b4151521 100644 --- a/app/views/errors/not_found.html.erb +++ b/app/views/errors/not_found.html.erb @@ -1,23 +1,25 @@ -
-
-

404: Page not found

-
-
-

Looks like something went wrong...

-

The link you have may be incorrect, or the page you're looking for may have been removed or renamed.

- -
-
-

Find the page name

-

Use the search bar to locate the page by name.

-
-
-

Start over

-

Try <%= link_to "starting from the homepage", "/" %>.

-
-
-

Contact us

-

Reach out using the <%= link_to "contact form", "/contact" %> to let us know what you were looking for.

+
+
+
+

404: Page not found

+
+
+

Looks like something went wrong...

+

The link you have may be incorrect, or the page you're looking for may have been removed or renamed.

+ +
+
+

Find the page name

+

Use the search bar to locate the page by name.

+
+
+

Start over

+

Try <%= link_to "starting from the homepage", "/" %>.

+
+
+

Contact us

+

Reach out using the <%= link_to "contact form", "/contact" %> to let us know what you were looking for.

+
diff --git a/app/views/hyrax/collections/_collection_description.erb b/app/views/hyrax/collections/_collection_description.erb new file mode 100644 index 00000000..cfb12264 --- /dev/null +++ b/app/views/hyrax/collections/_collection_description.erb @@ -0,0 +1,3 @@ +<% presenter.description.each do |description| %> + <%= simple_format(auto_link(description)) %> +<% end %> \ No newline at end of file diff --git a/app/views/hyrax/collections_page/_list_collections.html.erb b/app/views/hyrax/collections_page/_list_collections.html.erb new file mode 100644 index 00000000..aa3fa5f6 --- /dev/null +++ b/app/views/hyrax/collections_page/_list_collections.html.erb @@ -0,0 +1,24 @@ +
    +<% collections.each do |collection| %> +
  • +
    +
    +
    + <%= link_to [hyrax, collection] do %> + <%= render_thumbnail_tag(collection, { class: 'file_listing_thumbnail', alt: "#{collection.title_or_label} #{ t('hyrax.homepage.admin_sets.thumbnail')}" }, + { suppress_link: true }) %> + <% end %> +
    +
    +
    +

    <%= link_to collection.title_or_label, [hyrax, collection] %>

    + <% if collection.description != [] %> +

    <%= collection.description[0] %>

    + <% else %> +

    Click through to learn more about this collection.

    + <% end %> +
    +
    +
  • +<% end %> +
\ No newline at end of file diff --git a/app/views/hyrax/collections_page/index.html.erb b/app/views/hyrax/collections_page/index.html.erb new file mode 100644 index 00000000..0af06f03 --- /dev/null +++ b/app/views/hyrax/collections_page/index.html.erb @@ -0,0 +1,15 @@ + +
+
+

Browse all Collections in GW ScholarSpace.

+
+
+
+
+ <%= render 'list_collections', collections: @presenter.collections %> +
+
\ No newline at end of file diff --git a/app/views/hyrax/homepage/_home_collections.html.erb b/app/views/hyrax/homepage/_home_collections.html.erb index 4ddb8214..be815cf4 100644 --- a/app/views/hyrax/homepage/_home_collections.html.erb +++ b/app/views/hyrax/homepage/_home_collections.html.erb @@ -18,7 +18,7 @@ Browse this collection ⟶
- Browse all collections ⟶ + Browse all collections ⟶
diff --git a/config/locales/hyrax.en.yml b/config/locales/hyrax.en.yml index 8961a8d0..99949556 100644 --- a/config/locales/hyrax.en.yml +++ b/config/locales/hyrax.en.yml @@ -17,7 +17,7 @@ en: search_form: button_label: Search product_name: "ScholarSpace" - local_product_version: "2.0.0" + local_product_version: "2.1.0" product_twitter_handle: "" institution_name: "The George Washington University" institution_name_full: "George Washington University" diff --git a/config/routes.rb b/config/routes.rb index 75acf287..e6daf7b7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -25,7 +25,6 @@ end - devise_for :users, controllers: { omniauth_callbacks: 'users/omniauth_callbacks', sessions: 'users/sessions' } mount Hydra::RoleManagement::Engine => '/' @@ -63,6 +62,9 @@ Hyrax::Engine.routes.draw do concern :range_searchable, BlacklightRangeLimit::Routes::RangeSearchable.new get 'share' =>'pages#show', key: 'share' + + resources :collections, only: [:index], controller: "collections_page" + redirect_all_proc = Proc.new { match '(*any)', to: redirect('/'), via: [:get, :post] } # Redirects non-privileged users to the application homepage diff --git a/config/schoolie.yml b/config/schoolie.yml index 8d9cc91e..e995e132 100644 --- a/config/schoolie.yml +++ b/config/schoolie.yml @@ -5,6 +5,7 @@ attributes: citation_author: creator citation_type: resource_type dc.type: resource_type - citation_date: publication_date + citation_publication_date: date_created + dc.issued: date_created citation_keywords: keyword citation_pdf_url: download_url diff --git a/public/images/default.png b/public/images/default.png new file mode 100644 index 00000000..b5437e4e Binary files /dev/null and b/public/images/default.png differ diff --git a/spec/fixtures/content_blocks/about_page.html b/spec/fixtures/content_blocks/about_page.html index fcbe778f..741dae05 100644 --- a/spec/fixtures/content_blocks/about_page.html +++ b/spec/fixtures/content_blocks/about_page.html @@ -43,7 +43,7 @@

What belongs in GW ScholarSpace?

How do I submit my work to GW ScholarSpace?

Submitting Electronic Thesis and Dissertations (ETDs)

-

Electronic Thesis and Dissertations (ETDs) must first be submitted via the ProQuest ETD administrator. Please visit the library’s ETD page for more information.

+

Electronic Thesis and Dissertations (ETDs) must first be submitted via the ProQuest ETD administrator. Please visitThe Office of Graduate and Postdoctoral Affairs' ETD Page for more information.

ETDs submitted via this process are automatically ingested into GW ScholarSpace.

Submitting All Other Types of Works and Publications

To deposit any other type of work, please use the GW ScholarSpace Deposit Form.