|
13 | 13 | <%= render Arclight::DocumentActionsComponent.new(presenter: presenter) %> |
14 | 14 | </div> |
15 | 15 |
|
16 | | - |
17 | | -<%= render Arclight::MetadataSectionComponent.with_collection(blacklight_config.show.component_metadata_partials || [], metadata_attr: { layout: Arclight::UpperMetadataLayoutComponent }, presenter: presenter, classes: ['al-metadata-section', 'breadcrumb-item', "breadcrumb-item-#{document.parents.length + 3}"]) unless document.collection? %> |
18 | | - |
19 | 16 | <div class='row'> |
20 | 17 | <div class='col-md-12'> |
21 | 18 | <%= embed %> |
|
27 | 24 | <ul class='nav nav-tabs nav-fill' role='tablist' aria-label='<%= t('arclight.views.show.tablist_nav') %>'> |
28 | 25 | <li class='nav-item flex-fill'> |
29 | 26 | <a class='nav-link p-1 p-sm-2 active' data-toggle='tab' data-bs-toggle='tab' href='#context' role='tab'> |
30 | | - <%= document.collection? ? t('arclight.views.show.overview') : t('arclight.views.show.context') %> |
| 27 | + <%= t('arclight.views.show.overview') %> |
31 | 28 | </a> |
32 | 29 | </li> |
33 | 30 |
|
34 | | - <% if document.collection? %> |
35 | 31 | <li class='nav-item flex-fill'> |
36 | | - <a class='nav-link p-1 p-sm-2 disabled' data-toggle='tab' data-bs-toggle='tab' href='#contents' role='tab' data-hierarchy-enable-me='true'> |
| 32 | + <a class='nav-link p-1 p-sm-2 disabled' data-toggle='tab' data-bs-toggle='tab' href='#contents' role='tab' data-hierarchy-enable-me='true'> |
37 | 33 | <%= t 'arclight.views.show.no_contents' %> |
38 | | - </a> |
| 34 | + </a> |
39 | 35 | </li> |
40 | | - <% end %> |
41 | 36 |
|
42 | 37 | <% if online_content? %> |
43 | 38 | <li class='nav-item flex-fill'> |
44 | 39 | <a class='nav-link p-1 p-sm-2' data-toggle='tab' data-bs-toggle='tab' href='#online-content' role='tab' data-arclight-online-content-tab='true'> |
45 | 40 | <%= t 'arclight.views.show.online_content' %> |
46 | | - <% unless document.collection? %> |
47 | | - <span data-arclight-online-content-tab-count/> |
48 | | - <% end %> |
49 | 41 | </a> |
50 | 42 | </li> |
51 | 43 | <% end %> |
|
62 | 54 | <div class='row'> |
63 | 55 | <div class='col-md-12'> |
64 | 56 | <div class='tab-content'> |
65 | | - <% if document.collection? %> |
66 | | - <div class='tab-pane active' id='context' role='tabpanel'> |
67 | | - <div class="row"> |
68 | | - <div class="col-md-3 order-md-2"> |
| 57 | + <div class='tab-pane active' id='context' role='tabpanel'> |
| 58 | + <div class="row"> |
| 59 | + <div class="col-md-3 order-md-2"> |
69 | 60 | <nav class='al-sidebar-navigation-context al-sticky-sidebar' |
70 | | - id="collection-context-sidebar" |
71 | | - aria-label='<%= t('arclight.views.show.context_nav.title') %>'> |
72 | | - <ul class='nav nav-pills flex-sm-row flex-md-column text-sm-left text-md-right'> |
| 61 | + id="collection-context-sidebar" |
| 62 | + aria-label='<%= t('arclight.views.show.context_nav.title') %>'> |
| 63 | + <ul class='nav nav-pills flex-sm-row flex-md-column text-sm-left text-md-right'> |
73 | 64 | <% blacklight_config.show.metadata_partials&.select { |item| presenter.with_field_group(item).fields_to_render.any? }&.each do |item| %> |
74 | | - <li class='nav-item'> |
| 65 | + <li class='nav-item'> |
75 | 66 | <%= link_to t("arclight.views.show.sections.#{item}"), "##{t("arclight.views.show.sections.#{item}").parameterize}", class: 'nav-link' %> |
76 | | - </li> |
| 67 | + </li> |
77 | 68 | <% end %> |
78 | | - </ul> |
| 69 | + </ul> |
79 | 70 | </nav> |
80 | | - </div> |
| 71 | + </div> |
81 | 72 |
|
82 | | - <div class="col-md-9 order-md-1"> |
| 73 | + <div class="col-md-9 order-md-1"> |
83 | 74 | <h2 class="sr-only visually-hidden"><%= t 'arclight.views.show.context' %></h2> |
84 | 75 | <%= render Arclight::MetadataSectionComponent.with_collection(blacklight_config.show.metadata_partials || [], presenter: presenter, heading: true) %> |
85 | | - </div> |
86 | 76 | </div> |
87 | 77 | </div> |
88 | | - <% end %> |
| 78 | + </div> |
89 | 79 |
|
90 | | - <div class='tab-pane <%= document.collection? ? '': 'active' %>' id='<%= document.collection? ? 'contents' : 'context' %>' role='tabpanel'> |
91 | | - <h2 class="sr-only visually-hidden" data-sr-enable-me='true' data-has-contents=<%= t 'arclight.views.show.has_content' %>><%= document.collection? ? t('arclight.views.show.has_content') : t('arclight.views.show.context') %></h2> |
92 | | - <%= content_tag(:div, id: document.collection? ? nil : t("arclight.views.show.sections.collection_context_field").parameterize) do %> |
| 80 | + <div class='tab-pane' id='contents' role='tabpanel'> |
| 81 | + <h2 class="sr-only visually-hidden" data-sr-enable-me='true' data-has-contents=<%= t 'arclight.views.show.has_content' %>><%= t('arclight.views.show.has_content') %></h2> |
| 82 | + <%= content_tag(:div) do %> |
93 | 83 | <%= generic_context_navigation(@document) %> |
94 | 84 | <% end %> |
95 | 85 | </div> |
|
106 | 96 | name: document.collection_name, |
107 | 97 | access: 'online', |
108 | 98 | view: 'online_contents', |
109 | | - parent: document.collection? ? nil : document.reference, |
| 99 | + parent: nil, |
110 | 100 | search_field: 'within_collection' |
111 | 101 | } |
112 | 102 | } |
|
117 | 107 | <div class='tab-pane' id='access' role='tabpanel'> |
118 | 108 | <h2 class="sr-only visually-hidden"><%= t 'arclight.views.show.access' %></h2> |
119 | 109 |
|
120 | | - <% if @document.collection? %> |
121 | | - <%= render Arclight::MetadataSectionComponent.with_collection(blacklight_config.show.context_access_tab_items || [], presenter: presenter) %> |
122 | | - <% else %> |
123 | | - <%= render Arclight::MetadataSectionComponent.with_collection(blacklight_config.show.component_access_tab_items || [], presenter: presenter) %> |
124 | | - <% end %> |
| 110 | + <%= render Arclight::MetadataSectionComponent.with_collection(blacklight_config.show.context_access_tab_items || [], presenter: presenter) %> |
125 | 111 | </div> |
126 | 112 | </div> |
127 | 113 | </div> |
|
0 commit comments