arclight 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/.all-contributorsrc +450 -0
  3. data/.babelrc +3 -0
  4. data/.codeclimate.yml +5 -0
  5. data/.eslintrc +3 -0
  6. data/.rubocop.yml +19 -0
  7. data/.rubocop_todo.yml +15 -135
  8. data/.travis.yml +2 -2
  9. data/CONTRIBUTORS.md +79 -0
  10. data/README.md +21 -24
  11. data/Rakefile +0 -1
  12. data/app/assets/images/blacklight/bookmark.svg +1 -0
  13. data/app/assets/images/blacklight/collection.svg +5 -0
  14. data/app/assets/images/blacklight/compact.svg +1 -25
  15. data/app/assets/images/blacklight/container.svg +5 -0
  16. data/app/assets/images/blacklight/ead.svg +1 -0
  17. data/app/assets/images/blacklight/file.svg +5 -0
  18. data/app/assets/images/blacklight/folder.svg +1 -0
  19. data/app/assets/images/blacklight/list.svg +1 -0
  20. data/app/assets/images/blacklight/minus.svg +1 -0
  21. data/app/assets/images/blacklight/online.svg +5 -0
  22. data/app/assets/images/blacklight/pdf.svg +1 -0
  23. data/app/assets/images/blacklight/plus.svg +1 -0
  24. data/app/assets/images/blacklight/repository.svg +1 -0
  25. data/app/assets/javascripts/arclight/arclight.js +1 -3
  26. data/app/assets/javascripts/arclight/collection_navigation.js +36 -53
  27. data/app/assets/javascripts/arclight/collection_scrollspy.js +1 -1
  28. data/app/assets/javascripts/arclight/context_navigation.js +374 -0
  29. data/app/assets/javascripts/arclight/truncator.js.erb +8 -2
  30. data/app/assets/stylesheets/arclight/application.scss +3 -1
  31. data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +23 -0
  32. data/app/assets/stylesheets/arclight/modules/context_navigation.scss +75 -0
  33. data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +28 -35
  34. data/app/assets/stylesheets/arclight/modules/highlights.scss +2 -1
  35. data/app/assets/stylesheets/arclight/modules/layout.scss +128 -14
  36. data/app/assets/stylesheets/arclight/modules/mastheads.scss +27 -5
  37. data/app/assets/stylesheets/arclight/modules/repositories.scss +1 -5
  38. data/app/assets/stylesheets/arclight/modules/repository_card.scss +6 -7
  39. data/app/assets/stylesheets/arclight/modules/search_results.scss +145 -24
  40. data/app/assets/stylesheets/arclight/modules/show_collection.scss +38 -59
  41. data/app/assets/stylesheets/arclight/responsive.scss +13 -0
  42. data/app/assets/stylesheets/arclight/variables.scss +21 -1
  43. data/app/controllers/concerns/arclight/ead_format_helpers.rb +225 -0
  44. data/app/controllers/concerns/arclight/field_config_helpers.rb +23 -7
  45. data/app/factories/blacklight_field_configuration_factory.rb +1 -0
  46. data/app/helpers/arclight_helper.rb +197 -35
  47. data/app/models/arclight/document_downloads.rb +125 -0
  48. data/app/models/arclight/parent.rb +4 -2
  49. data/app/models/arclight/parents.rb +6 -4
  50. data/app/models/arclight/requests/aeon_external_request.rb +42 -0
  51. data/app/models/arclight/requests/aeon_web_ead.rb +47 -0
  52. data/app/models/arclight/requests/google_form.rb +2 -2
  53. data/app/models/concerns/arclight/catalog.rb +14 -2
  54. data/app/models/concerns/arclight/search_behavior.rb +27 -12
  55. data/app/models/concerns/arclight/solr_document.rb +29 -7
  56. data/app/views/arclight/_requests.html.erb +7 -0
  57. data/app/views/arclight/repositories/_in_person_repository.html.erb +1 -1
  58. data/app/views/arclight/repositories/_repository.html.erb +2 -2
  59. data/app/views/arclight/repositories/_repository_contact.html.erb +9 -0
  60. data/app/views/arclight/repositories/index.html.erb +3 -0
  61. data/app/views/arclight/repositories/show.html.erb +5 -4
  62. data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +9 -0
  63. data/app/views/arclight/requests/_aeon_web_ead.html.erb +7 -0
  64. data/app/views/arclight/requests/_google_form.html.erb +2 -1
  65. data/app/views/arclight/viewers/_oembed.html.erb +2 -1
  66. data/app/views/catalog/_access_contents.html.erb +15 -0
  67. data/app/views/catalog/_arclight_abstract_or_scope.html.erb +5 -0
  68. data/app/views/catalog/_arclight_bookmark_control.html.erb +38 -0
  69. data/app/views/catalog/_arclight_document_header_icon.html.erb +1 -0
  70. data/app/views/catalog/_arclight_index_compact_default.html.erb +18 -11
  71. data/app/views/catalog/_arclight_index_default.html.erb +45 -0
  72. data/app/views/catalog/_arclight_index_group_document_compact_default.html.erb +19 -0
  73. data/app/views/catalog/_arclight_index_group_document_default.html.erb +18 -0
  74. data/app/views/catalog/_arclight_online_content_indicator.html.erb +1 -3
  75. data/app/views/catalog/_collection_contents.html.erb +2 -10
  76. data/app/views/catalog/_collection_context.html.erb +15 -0
  77. data/app/views/catalog/_collection_context_nav.html.erb +12 -0
  78. data/app/views/catalog/_collection_online_contents.html.erb +3 -3
  79. data/app/views/catalog/_component_context.html.erb +5 -0
  80. data/app/views/catalog/_containers.html.erb +3 -0
  81. data/app/views/catalog/_context_sidebar.html.erb +2 -2
  82. data/app/views/catalog/_document_downloads.html.erb +14 -0
  83. data/app/views/catalog/_group.html.erb +21 -0
  84. data/app/views/catalog/_group_header_compact_default.html.erb +15 -0
  85. data/app/views/catalog/_group_header_default.html.erb +20 -0
  86. data/app/views/catalog/_group_toggle.html.erb +10 -0
  87. data/app/views/catalog/_home.html.erb +1 -1
  88. data/app/views/catalog/_index_breadcrumb_default.html.erb +5 -2
  89. data/app/views/catalog/_index_collection_context_default.html.erb +53 -0
  90. data/app/views/catalog/_index_header.html.erb +3 -3
  91. data/app/views/catalog/_index_online_contents_default.html.erb +1 -1
  92. data/app/views/catalog/_online_content_label.html.erb +5 -0
  93. data/app/views/catalog/_search_form.html.erb +34 -0
  94. data/app/views/catalog/_search_results.html.erb +1 -4
  95. data/app/views/catalog/_show_actions_box_default.html.erb +27 -0
  96. data/app/views/catalog/_show_breadcrumbs_default.html.erb +5 -20
  97. data/app/views/catalog/_show_collection.html.erb +42 -24
  98. data/app/views/catalog/_show_default.html.erb +63 -35
  99. data/app/views/catalog/_show_upper_metadata_default.html.erb +1 -1
  100. data/app/views/catalog/_sort_and_per_page.html.erb +8 -0
  101. data/app/views/catalog/_within_collection_dropdown.html.erb +26 -0
  102. data/app/views/shared/_breadcrumbs.html.erb +4 -4
  103. data/app/views/shared/_context_sidebar.html.erb +2 -2
  104. data/app/views/shared/_header_navbar.html.erb +13 -17
  105. data/app/views/shared/_show_breadcrumbs.html.erb +27 -0
  106. data/arclight.gemspec +5 -6
  107. data/config/i18n-tasks.yml +2 -1
  108. data/config/locales/arclight.en.yml +54 -21
  109. data/config/repositories.yml +0 -0
  110. data/lib/arclight/engine.rb +22 -12
  111. data/lib/arclight/hash_absolute_xpath.rb +11 -7
  112. data/lib/arclight/level_label.rb +46 -0
  113. data/lib/arclight/normalized_date.rb +2 -2
  114. data/lib/arclight/normalized_id.rb +1 -0
  115. data/lib/arclight/normalized_title.rb +1 -0
  116. data/lib/arclight/repository.rb +58 -5
  117. data/lib/arclight/traject/ead2_config.rb +178 -159
  118. data/lib/arclight/traject/nokogiri_namespaceless_reader.rb +22 -0
  119. data/lib/arclight/version.rb +1 -1
  120. data/lib/arclight/viewers/oembed.rb +1 -0
  121. data/lib/arclight/year_range.rb +9 -1
  122. data/lib/generators/arclight/install_generator.rb +5 -1
  123. data/lib/generators/arclight/templates/catalog_controller.rb +128 -100
  124. data/lib/generators/arclight/templates/config/downloads.yml +12 -0
  125. data/lib/generators/arclight/templates/config/repositories.yml +20 -2
  126. data/lib/generators/arclight/update_generator.rb +1 -1
  127. data/lib/tasks/index.rake +18 -20
  128. data/package.json +8 -1
  129. data/solr/conf/schema.xml +51 -292
  130. data/solr/conf/solrconfig.xml +40 -125
  131. data/tasks/arclight.rake +1 -0
  132. data/vendor/assets/javascripts/responsiveTruncator.js +2 -2
  133. metadata +71 -44
  134. data/app/assets/javascripts/arclight/collection_context.js +0 -18
  135. data/app/assets/javascripts/arclight/component_ancestors.js +0 -56
  136. data/app/assets/javascripts/arclight/search_results.js +0 -15
  137. data/app/assets/stylesheets/arclight/modules/sidebar.scss +0 -21
  138. data/app/views/catalog/_collection_count.html.erb +0 -7
  139. data/app/views/catalog/_collection_downloads.html.erb +0 -15
  140. data/app/views/catalog/_collection_overview.html.erb +0 -7
  141. data/app/views/catalog/_component_contents.html.erb +0 -16
  142. data/app/views/catalog/_component_overview.html.erb +0 -40
  143. data/app/views/catalog/_index_header_hierarchy_default.html.erb +0 -42
  144. data/app/views/catalog/_index_hierarchy_default.html.erb +0 -28
  145. data/app/views/catalog/_results_histogram.html.erb +0 -15
  146. data/app/views/catalog/_show_component_sidebar.html.erb +0 -12
  147. data/app/views/catalog/_show_sidebar.html.erb +0 -22
  148. data/lib/arclight/custom_component.rb +0 -99
  149. data/lib/arclight/custom_document.rb +0 -93
  150. data/lib/arclight/indexer.rb +0 -9
  151. data/lib/arclight/shared_indexing_behavior.rb +0 -97
  152. data/lib/arclight/shared_terminology_behavior.rb +0 -65
  153. data/lib/arclight/solr_ead_indexer_ext.rb +0 -155
@@ -0,0 +1,7 @@
1
+ <% if item_requestable?('', { document: document }) %>
2
+ <div class='mr-4 al-show-actions-box-request flex-md-fill'>
3
+ <% document.repository_config.available_request_types.each do |request_type| %>
4
+ <%= render partial: "arclight/requests/#{request_type}", locals: { document: document } %>
5
+ <% end %>
6
+ </div>
7
+ <% end %>
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  <div class='al-in-person-repository-location'>
10
10
  <address>
11
- <% %i[building address1 address2 city_state_zip_country phone contact_info].each do |f| %>
11
+ <% %i[building address1 address2 city_state_zip_country].each do |f| %>
12
12
  <% if repository.send(f).present? %>
13
13
  <div class='al-repository-contact-<%= f %>'>
14
14
  <%= repository.send(f) %>
@@ -6,9 +6,9 @@
6
6
  </div>
7
7
 
8
8
  <div class="col-sm-12 col-lg-10 al-repository-information">
9
- <h2>
9
+ <%= content_tag(params[:id] == repository.slug ? :h1 : :h2, class: 'h5 repo-name') do %>
10
10
  <%= link_to_unless(params[:id] == repository.slug, repository.name, arclight_engine.repository_path(repository.slug)) %>
11
- </h2>
11
+ <% end %>
12
12
  <div class='row no-gutters justify-content-md-center'>
13
13
  <div class='col-4 col-md-3 al-repository-contact'>
14
14
  <address>
@@ -0,0 +1,9 @@
1
+ <div class='al-in-person-repository-contact'>
2
+ <% %i[phone contact_info].each do |f| %>
3
+ <% if repository.send(f).present? %>
4
+ <div class='al-repository-contact-<%= f %>'>
5
+ <%= repository.send(f) %>
6
+ </div>
7
+ <% end %>
8
+ <% end %>
9
+ </div>
@@ -1,4 +1,7 @@
1
+ <h1 class="sr-only"><%= t('arclight.repositories') %></h1>
2
+
1
3
  <div class="al-repositories">
4
+ <% @page_title = t('arclight.views.repositories.title') %>
2
5
  <%= render 'shared/breadcrumbs' %>
3
6
  <%= render @repositories %>
4
7
  </div>
@@ -1,10 +1,11 @@
1
+ <% @page_title = t(:'arclight.views.repositories.show', name: @repository.name) %>
1
2
  <%= render 'shared/breadcrumbs' %>
2
3
  <%= render @repository %>
3
4
  <div class="row al-repository-show-header">
4
5
  <div class="col col-md-8 col-lg-9">
5
- <h3>
6
+ <h2 class="h4">
6
7
  <%= t('arclight.views.show.our_collections') %>
7
- </h3>
8
+ </h2>
8
9
  </div>
9
10
  <div class="col text-right">
10
11
  <span class="al-repository-collections">
@@ -19,8 +20,8 @@
19
20
  <div class='al-document-title-bar'>
20
21
  <div class='row'>
21
22
  <div class='col-md-10 col-lg-9'>
22
- <h5><%= link_to document.normalized_title, solr_document_path(document.id) %></h5>
23
- <%= content_tag('div', class: 'al-document-abstract-or-scope', title: document.abstract_or_scope) do %>
23
+ <h3 class="h5"><%= link_to document.normalized_title, solr_document_path(document.id) %></h3>
24
+ <%= content_tag('div', class: 'al-document-abstract-or-scope') do %>
24
25
  <%= content_tag('div', 'data-arclight-truncate' => true) do %>
25
26
  <%= document.abstract_or_scope %>
26
27
  <% end %>
@@ -0,0 +1,9 @@
1
+ <% document ||= @document %>
2
+ <% aeon_external_request ||= Arclight::Requests::AeonExternalRequest.new(document, show_presenter(document)) %>
3
+
4
+ <%= form_tag aeon_external_request.url, method: :post, class: 'al-request-form' do |f| %>
5
+ <%= render_hash_as_hidden_fields(aeon_external_request.form_mapping) %>
6
+ <button type='submit' class='al-request-button btn-link'>
7
+ <%= t('arclight.request.container') %>
8
+ </button>
9
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <% document ||= @document %>
2
+ <% if parsed_files = ead_files(document) %>
3
+ <% aeon_web_ead ||= Arclight::Requests::AeonWebEad.new(document, parsed_files.href) %>
4
+ <% aeon_web_ead_url = aeon_web_ead.try(:url) %>
5
+
6
+ <%= link_to 'Request', aeon_web_ead_url, class: 'btn btn-secondary btn-sm' %>
7
+ <% end %>
@@ -5,7 +5,8 @@
5
5
  <% google_form.form_mapping.each do |key, value| %>
6
6
  <%= hidden_field_tag value, google_form.send(key) %>
7
7
  <% end %>
8
- <button type='submit' class='al-request-button btn-link'>
8
+ <!-- Note: previous button class was 'al-request-button btn-link' -->
9
+ <button type='submit' class='btn btn-secondary btn-sm'>
9
10
  <%= t('arclight.request.container') %>
10
11
  </button>
11
12
  <% end %>
@@ -1,6 +1,7 @@
1
+ <% parents = Arclight::Parents.from_solr_document(viewer.document).as_parents %>
1
2
  <% viewer.resources.each do |resource| %>
2
3
  <%= content_tag(:div, viewer.attributes_for(resource)) do %>
3
- <div class='al-digital-object'>
4
+ <div class="al-digital-object media breadcrumb-item breadcrumb-item-<%= parents.length + 6 %>">
4
5
  <%= link_to(resource.label, resource.href) %>
5
6
  </div>
6
7
  <% end %>
@@ -0,0 +1,15 @@
1
+ <% doc_presenter = show_presenter(document).with_field_group(field_accessor) %>
2
+ <div class="container">
3
+ <dl class="row dl-invert">
4
+ <% generic_document_fields(field_accessor).each do |field_name, field| %>
5
+ <% if generic_should_render_field?(field_accessor, document, field) %>
6
+ <dt class="blacklight-<%= field_name.parameterize %> col-md-2">
7
+ <%= generic_render_document_field_label(field_accessor, document, field: field_name).upcase %>
8
+ </dt>
9
+ <dd class="blacklight-<%= field_name.parameterize %> col-md-10">
10
+ <%= doc_presenter.field_value field %>
11
+ </dd>
12
+ <% end %>
13
+ <% end %>
14
+ </dl>
15
+ </div>
@@ -0,0 +1,5 @@
1
+ <%= content_tag('div', class: 'al-document-abstract-or-scope') do %>
2
+ <%= content_tag('div', data: { 'arclight-truncate': true, 'truncate-more': I18n.t('arclight.truncation.view_more'), 'truncate-less': I18n.t('arclight.truncation.view_less') } ) do %>
3
+ <%= content_tag(:span, I18n.t('arclight.hierarchy.scope_note')) %><%= document.abstract_or_scope %>
4
+ <% end %>
5
+ <% end if document.abstract_or_scope %>
@@ -0,0 +1,38 @@
1
+ <% if current_or_guest_user %>
2
+ <%-
3
+ # Note these two forms are pretty similar but for different :methods, classes, and labels.
4
+ # but it was simpler to leave them seperate instead of DRYing them, got confusing trying that.
5
+ # the data-doc-id attribute is used by our JS that converts to a checkbox/label.
6
+ -%>
7
+ <% unless bookmarked? document %>
8
+ <%= form_tag(bookmark_path(document),
9
+ method: :put,
10
+ class: 'bookmark-toggle col-auto',
11
+ data: {
12
+ 'doc-id' => document.id,
13
+ present: "#{blacklight_icon(:bookmark)}<span class=\"sr-only\">#{t('blacklight.search.bookmarks.present')}",
14
+ absent: "#{blacklight_icon(:bookmark)}<span class=\"sr-only\">#{t('blacklight.search.bookmarks.absent')}",
15
+ inprogress: t('blacklight.search.bookmarks.inprogress')
16
+ }) do %>
17
+ <%= submit_tag(t('blacklight.bookmarks.add.button'),
18
+ id: "bookmark_toggle_#{document.id.to_s.parameterize}",
19
+ class: "bookmark-add btn btn-outline-secondary") %>
20
+ <% end %>
21
+ <% else %>
22
+ <%= form_tag(bookmark_path(document),
23
+ method: :delete,
24
+ class: "bookmark-toggle col-auto",
25
+ data: {
26
+ 'doc-id' => document.id,
27
+ present: "#{blacklight_icon(:bookmark)}<span class=\"sr-only\">#{t('blacklight.search.bookmarks.present')}",
28
+ absent: "#{blacklight_icon(:bookmark)}<span class=\"sr-only\">#{t('blacklight.search.bookmarks.absent')}",
29
+ inprogress: t('blacklight.search.bookmarks.inprogress')
30
+ }) do %>
31
+ <%= submit_tag(t('blacklight.bookmarks.remove.button'),
32
+ id: "bookmark_toggle_#{document.id.to_s.parameterize}",
33
+ class: "bookmark-remove btn btn-outline-secondary") %>
34
+ <% end %>
35
+ <% end %>
36
+ <% else %>
37
+ &nbsp;
38
+ <% end %>
@@ -0,0 +1 @@
1
+ <%= blacklight_icon document_or_parent_icon(document) %>
@@ -1,15 +1,22 @@
1
- <div class="row">
2
- <div class="col-5">
3
- <% counter = document_counter_with_offset(document_counter) %>
4
- <%= link_to_document document, document_show_link_field(document), counter: counter %>
1
+ <div class="documentHeader row">
2
+ <div class="col-auto">
3
+ <%= blacklight_icon document_or_parent_icon(document) %>
5
4
  </div>
6
- <div class="col-5">
7
- <%= render_document_partial(document, :index_breadcrumb) %>
8
- <div class='al-repository-footer'>
9
- <%= document.repository %>
5
+ <div class="col col-no-left-padding col-no-right-padding">
6
+ <div class="d-flex justify-content-between">
7
+ <h3 class="col col-no-left-padding">
8
+ <%= link_to_document document, document_show_link_field(document), counter: document_counter %>
9
+ </h3>
10
+ <%= render_index_doc_actions document %>
11
+ </div>
12
+ <div class="row">
13
+ <%= content_tag('div', class: 'al-document-highlight col') do %>
14
+ <%= document.highlights.join('<br/>').html_safe %>
15
+ <% end if document.highlights %>
16
+ </div>
17
+ <div class='breadcrumb-links media'>
18
+ <span class="media-body" aria-hidden="true"><%= blacklight_icon :repository, classes: 'al-repository-content-icon' %></span>
19
+ <span class="col ml-2 pl-0" ><%= regular_compact_breadcrumbs(document) %></span>
10
20
  </div>
11
- </div>
12
- <div class="col-2">
13
- <%= render_document_partial(document, :arclight_online_content_indicator) %>
14
21
  </div>
15
22
  </div>
@@ -0,0 +1,45 @@
1
+ <div class="al-search-result-index-article row d-flex align-items-start">
2
+ <% counter = document_counter_with_offset(document_counter) %>
3
+ <div class="col-auto">
4
+ <%= render partial: 'arclight_document_header_icon', locals: { document: document } %>
5
+ </div>
6
+
7
+ <div class="col col-no-left-padding d-flex flex-wrap">
8
+ <div class="documentHeader my-w-75 w-md-100 order-0" data-document-id="<%= document.id %>">
9
+ <h3 class="index_title document-title-heading">
10
+ <%= link_to_document document, document_show_link_field(document), counter: counter %>
11
+ <%= content_tag('span', class: 'al-document-extent badge') do %>
12
+ <%= document.extent %>
13
+ <% end if document.extent %>
14
+ </h3>
15
+ </div>
16
+
17
+ <div class="my-w-25 w-md-100 order-12 order-md-1">
18
+ <%= render_index_doc_actions document, wrapping_class: 'd-flex justify-content-end' %>
19
+ </div>
20
+
21
+ <div class="order-2">
22
+ <div class="row">
23
+ <%= content_tag('div', class: 'al-document-highlight col') do %>
24
+ <%= document.highlights.join('<br/>').html_safe %>
25
+ <% end if document.highlights %>
26
+ </div>
27
+
28
+ <div class="row">
29
+ <%= content_tag('div', class: 'al-document-creator col') do %>
30
+ <%= document.creator %>
31
+ <% end if document.creator %>
32
+ </div>
33
+
34
+ <div class="row">
35
+ <%= content_tag('div', class: 'al-document-abstract-or-scope col') do %>
36
+ <%= content_tag('div', 'data-arclight-truncate' => true) do %>
37
+ <%= document.abstract_or_scope %>
38
+ <% end %>
39
+ <% end if document.abstract_or_scope %>
40
+ </div>
41
+
42
+ <%= render partial: 'index_breadcrumb_default', locals: { document: document } %>
43
+ </div>
44
+ </div>
45
+ </div>
@@ -0,0 +1,19 @@
1
+ <article class="document">
2
+ <% breadcrumbs = component_top_level_parent_to_links(document) %>
3
+ <div class="documentHeader row">
4
+ <div class="col-auto">
5
+ <%= blacklight_icon document_or_parent_icon(document) %>
6
+ </div>
7
+ <div class="col col-no-left-padding">
8
+ <h4>
9
+ <%= link_to_document document, document_show_link_field(document), counter: document_counter %>
10
+ </h4>
11
+ <div class='breadcrumb-links media'>
12
+ <% unless breadcrumbs.nil? %>
13
+ <span class="media-body" aria-hidden="true"><%= blacklight_icon :folder, classes: 'al-folder-icon' %></span>
14
+ <span class="col" ><%= component_top_level_parent_to_links(document) %></span>
15
+ <% end %>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </article>
@@ -0,0 +1,18 @@
1
+ <article class="document">
2
+ <% breadcrumbs = parents_to_links(document) %>
3
+ <div class="documentHeader row">
4
+ <div class="col-auto">
5
+ <%= blacklight_icon document_or_parent_icon(document) %>
6
+ </div>
7
+ <div class="col col-no-left-padding">
8
+ <h4>
9
+ <%= link_to_document document, document_show_link_field(document), counter: document_counter %>
10
+ </h4>
11
+ <div class='breadcrumb-links media'>
12
+ <% unless breadcrumbs.nil? %>
13
+ <span class="media-body" aria-hidden="true"><%= blacklight_icon :folder, classes: 'al-folder-icon' %></span>
14
+ <span class="col" ><%= parents_to_links(document) %></span>
15
+ <% end %>
16
+ </div>
17
+ </div>
18
+ </article>
@@ -1,5 +1,3 @@
1
1
  <% if document.online_content? %>
2
- <span class='badge badge-success'>
3
- <%= t(:'arclight.views.online_content_indicator') %>
4
- </span>
2
+ <%= blacklight_icon :online, classes: 'al-online-content-icon' %>
5
3
  <% end %>
@@ -1,12 +1,4 @@
1
1
  <% document ||= @document %>
2
2
 
3
- <h2 class="sr-only">Collection inventory</h2>
4
- <%= content_tag(
5
- :div, '',
6
- class: 'al-contents',
7
- data: {
8
- arclight: {
9
- hierarchy: true, level: 1, path: search_catalog_path, name: document.collection_name
10
- }
11
- }
12
- ) %>
3
+ <h2 class="sr-only" data-sr-enable-me='true' data-has-contents=<%= t 'arclight.views.show.has_content' %>></h2>
4
+ <%= generic_context_navigation(document) %>
@@ -0,0 +1,15 @@
1
+ <div class="row">
2
+ <div class="col-md-3 order-md-2">
3
+ <%= render partial: 'collection_context_nav' %>
4
+ </div>
5
+
6
+ <div class="col-md-9 order-md-1">
7
+ <h2 class="sr-only"><%= t 'arclight.views.show.context' %></h2>
8
+ <% unless blacklight_config.show.metadata_partials.nil? %>
9
+ <% blacklight_config.show.metadata_partials.each do |metadata| %>
10
+ <% next unless fields_have_content?(@document, metadata) %>
11
+ <%= render partial: 'custom_metadata', locals: { document: @document, field_accessor: metadata } %>
12
+ <% end %>
13
+ <% end %>
14
+ </div>
15
+ </div>
@@ -0,0 +1,12 @@
1
+ <nav class='al-sidebar-navigation-context al-sticky-sidebar' aria-label='<%= t('arclight.views.show.context_nav.title') %>'>
2
+ <ul class='nav nav-pills flex-sm-row flex-md-column text-sm-left text-md-right'>
3
+ <% unless blacklight_config.show.metadata_partials.nil? %>
4
+ <% blacklight_config.show.metadata_partials.each do |item| %>
5
+ <% next unless fields_have_content?(@document, item) %>
6
+ <li class='nav-item'>
7
+ <%= link_to t("arclight.views.show.sections.#{item}"), "##{t("arclight.views.show.sections.#{item}").parameterize}", class: 'nav-link' %>
8
+ </li>
9
+ <% end %>
10
+ <% end %>
11
+ </ul>
12
+ </nav>
@@ -1,6 +1,6 @@
1
- <% if document.digital_objects.present? %>
2
- <%= render_document_partial(document, 'arclight_viewer') %>
3
- <% elsif document.online_content? %>
1
+ <h2 class="sr-only"><%= t 'arclight.views.show.online_content' %></h2>
2
+
3
+ <% if document.online_content? %>
4
4
  <%= content_tag(
5
5
  :div, '',
6
6
  class: 'al-contents',
@@ -0,0 +1,5 @@
1
+ <h2 class="sr-only"><%= t 'arclight.views.show.context' %></h2>
2
+ <!-- Section below will be moved into its own partial later -->
3
+ <%= content_tag(:div, id: t("arclight.views.show.sections.collection_context_field").parameterize) do %>
4
+ <%= generic_context_navigation(@document) %>
5
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <%= content_tag('div', class: 'al-document-container col col-no-left-padding text-muted') do %>
2
+ <%= document.containers.join(', ') %>
3
+ <% end if document.containers.present? && !online_contents_context? %>
@@ -1,6 +1,6 @@
1
- <% unless blacklight_config.show.context_sidebar_items.nil? %>
1
+ <% unless blacklight_config.show.context_access_tab_items.nil? %>
2
2
  <div id="accordion" role="tablist" aria-multiselectable="true">
3
- <% items = blacklight_config.show.context_sidebar_items.select { |i| fields_have_content?(@document, i) } %>
3
+ <% items = blacklight_config.show.context_access_tab_items.select { |i| fields_have_content?(@document, i) } %>
4
4
  <% items.each_with_index do |item, index| %>
5
5
  <%= render partial: 'context_card', locals: { document: @document, field_accessor: item, card_index: index} %>
6
6
  <% end %>
@@ -0,0 +1,14 @@
1
+ <% if document_downloads.files.present? %>
2
+ <div class=" al-show-actions-box-downloads-container">
3
+ <% document_downloads.files.each do |file| %>
4
+ <div class="al-show-actions-box-downloads media">
5
+ <%= blacklight_icon(file.type, classes: "al-show-actions-box-downloads-file") %>
6
+ <% if file.size %>
7
+ <%= link_to(t("arclight.views.show.download_with_size.#{file.type}", size: file.size), file.href, class: "media-body") %>
8
+ <% else %>
9
+ <%= link_to(t("arclight.views.show.download.#{file.type}"), file.href, class: "media-body") %>
10
+ <% end %>
11
+ </div>
12
+ <% end %>
13
+ </div>
14
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <% # container for all groups in index view -%>
2
+ <div class='al-grouped-results'>
3
+ <% @response.groups.each do |g| %>
4
+ <% parent_document = g.docs.first.parent_document %>
5
+ <%= render_document_partial(parent_document, :group_header) %>
6
+ <div class="grouped-documents">
7
+ <div class="al-grouped-more">
8
+ <% if g.total > 3 %>
9
+ <%= t('arclight.views.index.top_group_results', count: 3) %>
10
+ <%= link_to(
11
+ t('arclight.views.index.all_group_results', count: g.total),
12
+ search_catalog_path(search_within_collection(parent_document.collection_name, search_without_group)))
13
+ %>
14
+ <% else %>
15
+ <%= t('arclight.views.index.group_results_count', count: g.total) %>
16
+ <% end %>
17
+ </div>
18
+ <%= render_grouped_documents(g.docs) %>
19
+ </div>
20
+ <% end %>
21
+ </div>
@@ -0,0 +1,15 @@
1
+ <div class='al-grouped-title-bar'>
2
+ <div class='row'>
3
+ <div class='col-md-12'>
4
+ <% if document.repository_config.present? %>
5
+ <div class='al-grouped-repository breadcrumb-links'>
6
+ <%= link_to(document.repository_config.name, arclight_engine.repository_path(document.repository_config.slug)) %>
7
+ </div>
8
+ <% end %>
9
+ <h3><%= link_to_document document, document_show_link_field(document) %></h3>
10
+ <%= content_tag('span', class: 'al-document-extent badge') do %>
11
+ <%= document.extent %>
12
+ <% end if document.extent %>
13
+ </div>
14
+ </div>
15
+ </div>