arclight 0.4.0 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc +11 -4
  3. data/.github/workflows/ruby.yml +24 -8
  4. data/.rspec +0 -1
  5. data/.rubocop.yml +289 -3
  6. data/.rubocop_todo.yml +64 -76
  7. data/CONTRIBUTING.md +5 -5
  8. data/Gemfile +15 -10
  9. data/README.md +18 -12
  10. data/app/assets/javascripts/arclight/arclight.js +3 -7
  11. data/app/assets/javascripts/arclight/oembed_viewer.js +64 -39
  12. data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
  13. data/app/assets/stylesheets/arclight/application.scss +1 -5
  14. data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +104 -130
  15. data/app/assets/stylesheets/arclight/modules/icons.scss +14 -3
  16. data/app/assets/stylesheets/arclight/modules/layout.scss +121 -100
  17. data/app/assets/stylesheets/arclight/modules/mastheads.scss +15 -57
  18. data/app/assets/stylesheets/arclight/modules/repositories.scss +2 -2
  19. data/app/assets/stylesheets/arclight/modules/repository_card.scss +4 -48
  20. data/app/assets/stylesheets/arclight/modules/search_results.scss +86 -35
  21. data/app/assets/stylesheets/arclight/modules/show_collection.scss +5 -32
  22. data/app/assets/stylesheets/arclight/modules/truncator.scss +56 -0
  23. data/app/assets/stylesheets/arclight/variables.scss +7 -4
  24. data/app/components/arclight/access_component.html.erb +14 -0
  25. data/app/components/arclight/access_component.rb +25 -0
  26. data/app/components/arclight/bookmark_component.html.erb +25 -0
  27. data/app/components/arclight/bookmark_component.rb +9 -0
  28. data/app/components/arclight/breadcrumb_component.rb +40 -0
  29. data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +34 -0
  30. data/app/components/arclight/breadcrumbs_hierarchy_component.rb +25 -0
  31. data/app/components/arclight/collection_context_component.html.erb +12 -0
  32. data/app/components/arclight/collection_context_component.rb +27 -0
  33. data/app/components/arclight/collection_info_component.html.erb +28 -0
  34. data/app/components/arclight/collection_info_component.rb +26 -0
  35. data/app/components/arclight/collection_sidebar_component.html.erb +15 -0
  36. data/app/components/arclight/collection_sidebar_component.rb +41 -0
  37. data/app/{views/catalog/_search_results_repository.html.erb → components/arclight/constraints_component.html.erb} +2 -1
  38. data/app/components/arclight/constraints_component.rb +17 -0
  39. data/app/components/arclight/document_collection_context_component.html.erb +29 -0
  40. data/app/components/arclight/document_collection_context_component.rb +28 -0
  41. data/app/components/arclight/document_collection_hierarchy_component.html.erb +46 -0
  42. data/app/components/arclight/document_collection_hierarchy_component.rb +62 -0
  43. data/app/components/arclight/document_component.html.erb +39 -0
  44. data/app/components/arclight/document_component.rb +49 -0
  45. data/app/components/arclight/document_components_hierarchy_component.html.erb +32 -0
  46. data/app/components/arclight/document_components_hierarchy_component.rb +28 -0
  47. data/app/components/arclight/document_download_component.html.erb +24 -0
  48. data/app/components/arclight/document_download_component.rb +71 -0
  49. data/app/components/arclight/embed_component.html.erb +10 -0
  50. data/app/components/arclight/embed_component.rb +43 -0
  51. data/app/components/arclight/group_component.html.erb +30 -0
  52. data/app/components/arclight/group_component.rb +23 -0
  53. data/app/components/arclight/header_component.html.erb +5 -0
  54. data/app/components/arclight/header_component.rb +10 -0
  55. data/app/components/arclight/index_metadata_field_component.html.erb +17 -0
  56. data/app/components/arclight/index_metadata_field_component.rb +20 -0
  57. data/app/components/arclight/masthead_component.html.erb +15 -0
  58. data/app/components/arclight/masthead_component.rb +10 -0
  59. data/app/components/arclight/metadata_section_component.html.erb +13 -0
  60. data/app/components/arclight/metadata_section_component.rb +22 -0
  61. data/app/components/arclight/oembed_viewer_component.html.erb +5 -0
  62. data/app/components/arclight/oembed_viewer_component.rb +16 -0
  63. data/app/components/arclight/online_content_filter_component.html.erb +15 -0
  64. data/app/components/arclight/online_content_filter_component.rb +19 -0
  65. data/app/components/arclight/online_status_indicator_component.rb +19 -0
  66. data/app/components/arclight/repository_breadcrumb_component.html.erb +10 -0
  67. data/app/components/arclight/repository_breadcrumb_component.rb +17 -0
  68. data/app/components/arclight/repository_location_component.html.erb +20 -0
  69. data/app/components/arclight/repository_location_component.rb +10 -0
  70. data/app/components/arclight/search_bar_component.html.erb +25 -0
  71. data/app/components/arclight/search_bar_component.rb +32 -0
  72. data/app/components/arclight/search_result_breadcrumbs_component.html.erb +3 -0
  73. data/app/components/arclight/search_result_breadcrumbs_component.rb +37 -0
  74. data/app/components/arclight/search_result_component.html.erb +20 -0
  75. data/app/components/arclight/search_result_component.rb +24 -0
  76. data/app/components/arclight/search_result_title_component.html.erb +13 -0
  77. data/app/components/arclight/search_result_title_component.rb +15 -0
  78. data/app/components/arclight/sidebar_component.html.erb +9 -0
  79. data/app/components/arclight/sidebar_component.rb +19 -0
  80. data/app/components/arclight/upper_metadata_layout_component.rb +10 -0
  81. data/app/components/blacklight/icons/bookmark_component.rb +12 -0
  82. data/app/components/blacklight/icons/collection_component.rb +14 -0
  83. data/app/components/blacklight/icons/compact_component.rb +12 -0
  84. data/app/components/blacklight/icons/container_component.rb +14 -0
  85. data/app/components/blacklight/icons/ead_component.rb +12 -0
  86. data/app/components/blacklight/icons/file_component.rb +14 -0
  87. data/app/components/blacklight/icons/folder_component.rb +12 -0
  88. data/app/components/blacklight/icons/online_component.rb +15 -0
  89. data/app/components/blacklight/icons/pdf_component.rb +12 -0
  90. data/app/components/blacklight/icons/repository_component.rb +12 -0
  91. data/app/controllers/arclight/repositories_controller.rb +4 -4
  92. data/app/{controllers/concerns → helpers}/arclight/ead_format_helpers.rb +4 -7
  93. data/app/helpers/arclight/field_config_helpers.rb +26 -0
  94. data/app/helpers/arclight_helper.rb +16 -254
  95. data/app/models/arclight/document_downloads.rb +12 -15
  96. data/app/models/arclight/parent.rb +5 -0
  97. data/app/models/arclight/parents.rb +2 -1
  98. data/app/models/arclight/requests/aeon_external_request.rb +1 -1
  99. data/app/models/arclight/requests/aeon_web_ead.rb +8 -3
  100. data/app/models/arclight/requests/google_form.rb +8 -3
  101. data/app/models/concerns/arclight/catalog.rb +25 -15
  102. data/app/models/concerns/arclight/search_behavior.rb +12 -26
  103. data/app/models/concerns/arclight/solr_document.rb +70 -73
  104. data/app/presenters/arclight/show_presenter.rb +34 -7
  105. data/app/views/arclight/_requests.html.erb +2 -2
  106. data/app/views/arclight/repositories/_repository.html.erb +21 -40
  107. data/app/views/arclight/repositories/index.html.erb +3 -1
  108. data/app/views/arclight/repositories/show.html.erb +4 -6
  109. data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +4 -5
  110. data/app/views/arclight/requests/_aeon_web_ead.html.erb +3 -4
  111. data/app/views/arclight/requests/_google_form.html.erb +4 -6
  112. data/app/views/catalog/_group.html.erb +1 -18
  113. data/app/views/catalog/_group_toggle.html.erb +1 -1
  114. data/app/views/catalog/_search_results_header.html.erb +3 -0
  115. data/app/views/catalog/hierarchy.html.erb +19 -0
  116. data/app/views/catalog/index.html.erb +16 -7
  117. data/app/views/shared/_breadcrumbs.html.erb +2 -14
  118. data/app/views/shared/_main_menu_links.html.erb +1 -1
  119. data/arclight.gemspec +13 -11
  120. data/config/breadcrumbs.rb +24 -0
  121. data/config/i18n-tasks.yml +9 -8
  122. data/config/importmap.rb +3 -0
  123. data/config/locales/arclight.en.yml +31 -30
  124. data/config/routes.rb +1 -1
  125. data/docker-compose.yml +16 -0
  126. data/lib/arclight/digital_object.rb +2 -1
  127. data/lib/arclight/engine.rb +18 -37
  128. data/lib/arclight/exceptions.rb +1 -0
  129. data/lib/arclight/hash_absolute_xpath.rb +2 -1
  130. data/lib/arclight/normalized_id.rb +2 -0
  131. data/lib/arclight/normalized_title.rb +2 -0
  132. data/lib/arclight/repository.rb +45 -56
  133. data/lib/arclight/routes/hierarchy.rb +19 -0
  134. data/lib/arclight/routes.rb +8 -0
  135. data/lib/arclight/traject/ead2_component_config.rb +292 -0
  136. data/lib/arclight/traject/ead2_config.rb +66 -287
  137. data/lib/arclight/version.rb +1 -1
  138. data/lib/arclight/year_range.rb +4 -3
  139. data/lib/arclight.rb +6 -1
  140. data/lib/generators/arclight/install_generator.rb +59 -21
  141. data/lib/generators/arclight/templates/arclight.scss +4 -3
  142. data/lib/generators/arclight/templates/catalog_controller.rb +150 -165
  143. data/lib/generators/arclight/templates/config/locales/arclight.en.yml +53 -0
  144. data/lib/generators/arclight/templates/config/repositories.yml +20 -27
  145. data/lib/tasks/index.rake +14 -17
  146. data/package.json +11 -13
  147. data/solr/conf/schema.xml +42 -38
  148. data/solr/conf/solrconfig.xml +34 -31
  149. data/tasks/arclight.rake +8 -7
  150. data/template.rb +1 -2
  151. metadata +147 -120
  152. data/.babelrc +0 -3
  153. data/app/assets/javascripts/arclight/collection_navigation.js +0 -100
  154. data/app/assets/javascripts/arclight/collection_scrollspy.js +0 -6
  155. data/app/assets/javascripts/arclight/context_navigation.js +0 -351
  156. data/app/assets/javascripts/arclight/truncator.js.erb +0 -29
  157. data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +0 -26
  158. data/app/assets/stylesheets/arclight/modules/context_navigation.scss +0 -75
  159. data/app/controllers/concerns/arclight/field_config_helpers.rb +0 -102
  160. data/app/factories/blacklight_field_configuration_factory.rb +0 -30
  161. data/app/views/arclight/repositories/_in_person_repository.html.erb +0 -19
  162. data/app/views/arclight/repositories/_repository_contact.html.erb +0 -9
  163. data/app/views/arclight/viewers/_oembed.html.erb +0 -8
  164. data/app/views/catalog/_access_contents.html.erb +0 -15
  165. data/app/views/catalog/_arclight_abstract_or_scope.html.erb +0 -5
  166. data/app/views/catalog/_arclight_bookmark_control.html.erb +0 -38
  167. data/app/views/catalog/_arclight_document_header_icon.html.erb +0 -1
  168. data/app/views/catalog/_arclight_document_index_header.html.erb +0 -13
  169. data/app/views/catalog/_arclight_document_index_header_hierarchy_default.html.erb +0 -0
  170. data/app/views/catalog/_arclight_document_index_header_online_contents_default.html.erb +0 -0
  171. data/app/views/catalog/_arclight_index_compact_default.html.erb +0 -22
  172. data/app/views/catalog/_arclight_index_default.html.erb +0 -45
  173. data/app/views/catalog/_arclight_index_group_document_compact_default.html.erb +0 -19
  174. data/app/views/catalog/_arclight_index_group_document_default.html.erb +0 -18
  175. data/app/views/catalog/_arclight_online_content_indicator.html.erb +0 -3
  176. data/app/views/catalog/_arclight_rangelimit.html.erb +0 -24
  177. data/app/views/catalog/_arclight_viewer_default.html.erb +0 -1
  178. data/app/views/catalog/_collection_contents.html.erb +0 -4
  179. data/app/views/catalog/_collection_context.html.erb +0 -15
  180. data/app/views/catalog/_collection_context_nav.html.erb +0 -12
  181. data/app/views/catalog/_collection_online_contents.html.erb +0 -17
  182. data/app/views/catalog/_component_context.html.erb +0 -5
  183. data/app/views/catalog/_containers.html.erb +0 -3
  184. data/app/views/catalog/_context_card.html.erb +0 -27
  185. data/app/views/catalog/_context_sidebar.html.erb +0 -8
  186. data/app/views/catalog/_custom_metadata.html.erb +0 -16
  187. data/app/views/catalog/_document_downloads.html.erb +0 -14
  188. data/app/views/catalog/_group_header_compact_default.html.erb +0 -15
  189. data/app/views/catalog/_group_header_default.html.erb +0 -20
  190. data/app/views/catalog/_home.html.erb +0 -1
  191. data/app/views/catalog/_index_breadcrumb_default.html.erb +0 -6
  192. data/app/views/catalog/_index_collection_context_default.html.erb +0 -53
  193. data/app/views/catalog/_index_default.html.erb +0 -17
  194. data/app/views/catalog/_index_header.html.erb +0 -7
  195. data/app/views/catalog/_index_header_online_contents_default.html.erb +0 -1
  196. data/app/views/catalog/_index_online_contents_default.html.erb +0 -6
  197. data/app/views/catalog/_online_content_label.html.erb +0 -5
  198. data/app/views/catalog/_search_form.html.erb +0 -34
  199. data/app/views/catalog/_search_results.html.erb +0 -28
  200. data/app/views/catalog/_show_actions_box_default.html.erb +0 -27
  201. data/app/views/catalog/_show_breadcrumbs_default.html.erb +0 -6
  202. data/app/views/catalog/_show_collection.html.erb +0 -66
  203. data/app/views/catalog/_show_default.html.erb +0 -70
  204. data/app/views/catalog/_show_upper_metadata_collection.html.erb +0 -1
  205. data/app/views/catalog/_show_upper_metadata_default.html.erb +0 -14
  206. data/app/views/catalog/_sort_and_per_page.html.erb +0 -8
  207. data/app/views/catalog/_within_collection_dropdown.html.erb +0 -26
  208. data/app/views/layouts/catalog_result.html.erb +0 -7
  209. data/app/views/shared/_context_sidebar.html.erb +0 -8
  210. data/app/views/shared/_header_navbar.html.erb +0 -61
  211. data/app/views/shared/_show_breadcrumbs.html.erb +0 -27
  212. data/lib/arclight/viewer.rb +0 -45
  213. data/lib/arclight/viewers/oembed.rb +0 -57
  214. data/solr/conf/scripts.conf +0 -24
  215. data/vendor/assets/javascripts/responsiveTruncator.js +0 -69
  216. data/vendor/assets/javascripts/stickyfill.js +0 -480
@@ -1,38 +0,0 @@
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 %>
@@ -1 +0,0 @@
1
- <%= blacklight_icon document_or_parent_icon(document) %>
@@ -1,13 +0,0 @@
1
- <% document_actions = capture do %>
2
- <% # bookmark functions for items/docs -%>
3
- <%= render_index_doc_actions document, wrapping_class: "col-sm-3 col-md-5 col-lg-4 text-right" %>
4
- <% end %>
5
-
6
- <div class='al-document-title-bar'>
7
- <div class='row'>
8
- <div class='col-sm-9 col-md-7 col-lg-8'>
9
- <%= document.repository_and_unitid %>
10
- </div>
11
- <%= document_actions %>
12
- </div>
13
- </div>
@@ -1,22 +0,0 @@
1
- <div class="documentHeader row">
2
- <div class="col-auto">
3
- <%= blacklight_icon document_or_parent_icon(document) %>
4
- </div>
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>
20
- </div>
21
- </div>
22
- </div>
@@ -1,45 +0,0 @@
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>
@@ -1,19 +0,0 @@
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>
@@ -1,18 +0,0 @@
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,3 +0,0 @@
1
- <% if document.online_content? %>
2
- <%= blacklight_icon :online, classes: 'al-online-content-icon' %>
3
- <% end %>
@@ -1,24 +0,0 @@
1
- <% # Arclight Customized version of https://github.com/projectblacklight/blacklight_range_limit/blob/master/app/views/blacklight_range_limit/_range_limit_panel.html.erb %>
2
-
3
- <% # requires solr_config local passed in
4
- field_config = range_config(solr_field)
5
- %>
6
-
7
- <div class='limit_content range_limit'>
8
- <% unless params['range'] && params['range'][solr_field] && params['range'][solr_field]['missing'] %>
9
- <div class='profile'>
10
- <% if (min = range_results_endpoint(solr_field, :min)) &&
11
- (max = range_results_endpoint(solr_field, :max)) %>
12
- <% if field_config[:segments] != false %>
13
- <div class="distribution subsection <%= 'chart_js' unless field_config[:chart_js] == false %>">
14
- <% if solr_range_queries_to_a(solr_field).length > 0 %>
15
- <%= render(partial: 'blacklight_range_limit/range_segments', locals: {solr_field: solr_field}) %>
16
- <% else %>
17
- <%= link_to('View distribution', search_state.to_h.merge(action: 'range_limit', range_field: solr_field, range_start: min, range_end: max), :class => 'load_distribution') %>
18
- <% end %>
19
- </div>
20
- <% end %>
21
- <% end %>
22
- </div>
23
- <% end %>
24
- </div>
@@ -1 +0,0 @@
1
- <%= @document.digital_object_viewer %>
@@ -1,4 +0,0 @@
1
- <% document ||= @document %>
2
-
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) %>
@@ -1,15 +0,0 @@
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>
@@ -1,12 +0,0 @@
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,17 +0,0 @@
1
- <h2 class="sr-only"><%= t 'arclight.views.show.online_content' %></h2>
2
-
3
- <% if document.online_content? %>
4
- <%= content_tag(
5
- :div, '',
6
- class: 'al-contents',
7
- data: {
8
- arclight: {
9
- path: search_catalog_path,
10
- name: document.collection_name,
11
- access: 'online',
12
- view: 'online_contents',
13
- search_field: 'within_collection'
14
- }
15
- }
16
- ) %>
17
- <% end %>
@@ -1,5 +0,0 @@
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 %>
@@ -1,3 +0,0 @@
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,27 +0,0 @@
1
- <% doc_presenter = show_presenter(document).with_field_group(field_accessor) %>
2
- <div class="card">
3
- <div class="card-header" role="tab" id="heading<%= card_index %>">
4
- <h3 class="mb-0">
5
- <a data-toggle="collapse" data-parent="#accordion" href="#collapse<%= card_index %>" aria-expanded="<%= card_index.zero? %>" aria-controls="collapse<%= card_index %>">
6
- <%= t("arclight.views.show.context_sidebar.#{field_accessor}") %>
7
- </a>
8
- </h3>
9
- </div>
10
-
11
- <div id="collapse<%= card_index %>" class="collapse <%= 'show' if card_index.zero? %>" role="tabpanel" aria-labelledby="heading<%= card_index %>">
12
- <div class="card-body">
13
- <dl>
14
- <% generic_document_fields(field_accessor).each do |field_name, field| %>
15
- <% if generic_should_render_field?(field_accessor, document, field) %>
16
- <dt class="blacklight-<%= field_name.parameterize %>">
17
- <%= generic_render_document_field_label(field_accessor, document, field: field_name) %>
18
- </dt>
19
- <dd class="blacklight-<%= field_name.parameterize %>">
20
- <%= doc_presenter.field_value field %>
21
- </dd>
22
- <% end %>
23
- <% end %>
24
- </dl>
25
- </div>
26
- </div>
27
- </div>
@@ -1,8 +0,0 @@
1
- <% unless blacklight_config.show.context_access_tab_items.nil? %>
2
- <div id="accordion" role="tablist" aria-multiselectable="true">
3
- <% items = blacklight_config.show.context_access_tab_items.select { |i| fields_have_content?(@document, i) } %>
4
- <% items.each_with_index do |item, index| %>
5
- <%= render partial: 'context_card', locals: { document: @document, field_accessor: item, card_index: index} %>
6
- <% end %>
7
- </div>
8
- <% end %>
@@ -1,16 +0,0 @@
1
- <% doc_presenter = show_presenter(document).with_field_group(field_accessor) %>
2
-
3
- <%= content_tag(:div, id: t("arclight.views.show.sections.#{field_accessor}").parameterize) do %>
4
- <h3 class='al-show-sub-heading'>
5
- <%= t("arclight.views.show.sections.#{field_accessor}", level: document.level) %>
6
- </h3>
7
-
8
- <dl class="row dl-invert">
9
- <% generic_document_fields(field_accessor).each do |field_name, field| %>
10
- <% if generic_should_render_field?(field_accessor, document, field) %>
11
- <dt class="blacklight-<%= field_name.parameterize %> col-md-3"><%= generic_render_document_field_label(field_accessor, document, field: field_name) %></dt>
12
- <dd class="blacklight-<%= field_name.parameterize %> col-md-9"><%= doc_presenter.field_value field %></dd>
13
- <% end %>
14
- <% end %>
15
- </dl>
16
- <% end %>
@@ -1,14 +0,0 @@
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 %>
@@ -1,15 +0,0 @@
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>
@@ -1,20 +0,0 @@
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
- <%= content_tag('div', class: 'al-document-abstract-or-scope') do %>
14
- <%= content_tag('div', 'data-arclight-truncate' => true) do %>
15
- <%= document.abstract_or_scope %>
16
- <% end %>
17
- <% end if document.abstract_or_scope %>
18
- </div>
19
- </div>
20
- </div>
@@ -1 +0,0 @@
1
- <% @page_title = t('arclight.views.home.title') %>
@@ -1,6 +0,0 @@
1
- <div class="row">
2
- <div class='breadcrumb-links media'>
3
- <span class="media-body ml-3" aria-hidden="true"><%= blacklight_icon :repository, classes: 'al-repository-content-icon' %></span>
4
- <span class="col ml-2 pl-0" ><%= parents_to_links(document) %></span>
5
- </div>
6
- </div>
@@ -1,53 +0,0 @@
1
- <li id="<%= document.id %>" class="al-collection-context row d-flex align-items-start">
2
- <div class="documentHeader row" data-document-id="<%= document.id %>">
3
- <% requestable = item_requestable?('', { document: document }) %>
4
- <% if document.children? %>
5
- <div class="al-toggle-children-container">
6
- <%= link_to(
7
- '',
8
- "##{document.id}-collapsible-hierarchy",
9
- class: "al-toggle-view-children #{!show_expanded?(document) ? 'collapsed' : ''}",
10
- 'aria-label': t('arclight.hierarchy.view_all'),
11
- data: {
12
- toggle: 'collapse'
13
- }
14
- )
15
- %>
16
- </div>
17
- <% end %>
18
- <div class="col-auto">
19
- <%= render partial: 'arclight_document_header_icon', locals: { document: document } %>
20
- </div>
21
- <div class="col col-no-left-padding d-flex flex-wrap">
22
- <div class="index_title document-title-heading my-w-75 w-md-100 order-0">
23
- <% counter = document_counter_with_offset(document_counter) %>
24
- <%= link_to_document document, document_show_link_field(document), counter: counter %>
25
- <% if document.children? %>
26
- <span class="badge badge-pill badge-secondary al-number-of-children-badge"><%= document.number_of_children %><span class="sr-only"><%= t(:'arclight.views.index.number_of_components', count: document.number_of_children) %></span></span>
27
- <% end %>
28
- </div>
29
-
30
- <div class="my-w-25 w-md-100 order-12 order-md-1">
31
- <%= render_index_doc_actions document, wrapping_class: 'd-flex justify-content-end' %>
32
- </div>
33
-
34
- <div class="order-2">
35
- <div class="row">
36
- <%= content_tag('div', class: 'al-document-abstract-or-scope mb-0') do %>
37
- <%= content_tag('div', data: { 'arclight-truncate': true, 'truncate-more': I18n.t('arclight.truncation.view_more'), 'truncate-less': I18n.t('arclight.truncation.view_less') } ) do %>
38
- <%= document.abstract_or_scope %>
39
- <% end %>
40
- <% end if document.abstract_or_scope %>
41
- </div>
42
- </div>
43
- </div>
44
- </div>
45
- <% if document.number_of_children > 0 %>
46
- <%= content_tag(:div, id: "#{document.id}-collapsible-hierarchy",
47
- class: "collapse al-collection-context-collapsible al-hierarchy-level-#{document.component_level} #{'show' if show_expanded?(document)}",
48
- data: { resolved: false }
49
- ) do %>
50
- <%= generic_context_navigation(document, component_level: document.component_level + 1, original_parents: params[:original_parents]) %>
51
- <% end %>
52
- <% end %>
53
- </li>
@@ -1,17 +0,0 @@
1
- <%= content_tag('div', class: 'al-document-creator') do %>
2
- <%= document.creator %>
3
- <% end if document.creator %>
4
-
5
- <%= content_tag('div', class: 'al-document-extent') do %>
6
- <%= document.extent %>
7
- <% end if document.extent %>
8
-
9
- <%= content_tag('div', class: 'al-document-abstract-or-scope') do %>
10
- <%= content_tag('div', 'data-arclight-truncate' => true) do %>
11
- <%= document.abstract_or_scope %>
12
- <% end %>
13
- <% end if document.abstract_or_scope %>
14
-
15
- <%= content_tag('div', class: 'al-document-highlight') do %>
16
- <%= document.highlights.join('<br/>').html_safe %>
17
- <% end if document.highlights %>
@@ -1,7 +0,0 @@
1
- <%# header bar for doc items in index view -%>
2
- <div class="documentHeader col" data-document-id="<%= document.id %>">
3
- <h3 class="index_title document-title-heading">
4
- <% counter = document_counter_with_offset(document_counter) %>
5
- <%= link_to_document document, document_show_link_field(document), counter: counter %>
6
- </h3>
7
- </div>
@@ -1 +0,0 @@
1
- <%= render_document_partial(document, :index_header_hierarchy, document_counter: document_counter) %>
@@ -1,6 +0,0 @@
1
- <%= content_tag('div', class: 'al-document-abstract-or-scope') do %>
2
- <%= content_tag(:h4, I18n.t('arclight.hierarchy.scope_and_contents'), class: 'al-hierarchy-sub-heading') %>
3
- <%= content_tag('div', 'data-arclight-truncate' => true) do %>
4
- <%= document.abstract_or_scope %>
5
- <% end %>
6
- <% end if document.abstract_or_scope %>
@@ -1,5 +0,0 @@
1
- <% if document.online_content? %>
2
- <div>
3
- <%= blacklight_icon :online, classes: 'al-online-content-icon' %>
4
- </div>
5
- <% end %>
@@ -1,34 +0,0 @@
1
- <%
2
- # Overridden from Blacklight to add a drop down that allows the user to choose to search w/i the collection or all collections
3
- %>
4
- <%= form_tag search_action_url, method: :get, class: 'search-query-form pr-0', role: 'search' do %>
5
- <%= render_hash_as_hidden_fields(search_state.params_for_search.except(:q, :search_field, :qt, :page, :utf8).merge(f: (search_state.params_for_search[:f] || {}).except(:collection_sim))) %>
6
- <div class="d-md-flex">
7
- <%= render 'catalog/within_collection_dropdown' %>
8
-
9
- <% if search_fields.length > 1 %>
10
- <label for="search_field" class="sr-only"><%= t('blacklight.search.form.search_field.label') %></label>
11
- <% end %>
12
- <div class="input-group flex-nowrap">
13
- <% if search_fields.length > 1 %>
14
- <%= select_tag(:search_field,
15
- options_for_select(search_fields, h(params[:search_field])),
16
- title: t('blacklight.search.form.search_field.title'),
17
- id: "search_field",
18
- class: "custom-select search-field") %>
19
- <% elsif search_fields.length == 1 %>
20
- <%= hidden_field_tag :search_field, search_fields.first.last %>
21
- <% end %>
22
-
23
- <label for="q" class="sr-only"><%= t('blacklight.search.form.search.label') %></label>
24
- <%= text_field_tag :q, params[:q], placeholder: t('blacklight.search.form.search.placeholder'), class: "search-q q rounded-0 form-control", id: "q", autofocus: presenter.autofocus?, data: { autocomplete_enabled: presenter.autocomplete_enabled?, autocomplete_path: search_action_path(action: :suggest) } %>
25
-
26
- <span class="input-group-append">
27
- <button type="submit" class="btn btn-primary search-btn" id="search">
28
- <span class="submit-search-text d-none d-lg-inline"><%= t('blacklight.search.form.submit') %></span>
29
- <%= blacklight_icon :search, aria_hidden: true %>
30
- </button>
31
- </span>
32
- </div>
33
- </div>
34
- <% end %>
@@ -1,28 +0,0 @@
1
- <% @page_title = t('blacklight.search.page_title.title', :constraints => render_search_to_page_title(params), :application_name => application_name) %>
2
-
3
- <% content_for(:head) do %>
4
- <%= render_opensearch_response_metadata %>
5
- <%= rss_feed_link_tag %>
6
- <%= atom_feed_link_tag %>
7
- <% end %>
8
-
9
- <% content_for(:container_header) do %>
10
- <h1 class="sr-only top-content-title"><%= search_results_header_text %></h1>
11
- <%= render 'shared/breadcrumbs' %>
12
- <%= render 'search_results_repository' %>
13
- <%= render 'constraints' %>
14
- <% end %>
15
-
16
- <%= render 'search_header' %>
17
-
18
- <h2 class="sr-only"><%= t('blacklight.search.search_results') %></h2>
19
-
20
- <%- if @response.empty? %>
21
- <%= render "zero_results" %>
22
- <%- elsif render_grouped_response? %>
23
- <%= render_grouped_document_index %>
24
- <%- else %>
25
- <%= render_document_index %>
26
- <%- end %>
27
-
28
- <%= render 'results_pagination' %>
@@ -1,27 +0,0 @@
1
- <div class='al-show-actions-box'>
2
- <div class="al-actions-box-container">
3
- <% if document.unitid || document.containers.present? %>
4
- <div class='al-collection-id'>
5
- <% if document.unitid %>
6
- <%= t(:'arclight.views.show.collection_id', id: document.unitid) %>
7
- <% end %>
8
-
9
- <% if document.unitid && document.containers.present? %>
10
- <span> | </span>
11
- <% end %>
12
-
13
- <% if document.containers.present? %>
14
- <span><%= document.containers.join(', ') %></span>
15
- <% end %>
16
- </div>
17
- <% end %>
18
- <div class='al-show-actions-box-options d-flex'>
19
- <%= render partial: 'arclight/requests', locals: { document: document } %>
20
- <div class='al-show-actions-box-bookmarks flex-md-fill'>
21
- <%= render partial: 'catalog/bookmark_control', locals: { document: document } %>
22
- </div>
23
- </div>
24
- </div>
25
-
26
- <%= render document.downloads %>
27
- </div>
@@ -1,6 +0,0 @@
1
- <div class='d-md-flex justify-content-between al-show'>
2
- <div class='al-show-breadcrumb'>
3
- <%= render partial: 'shared/show_breadcrumbs', locals: {document: document} %>
4
- </div>
5
- <%= render_document_partial(document, :show_actions_box) %>
6
- </div>