|
1 | | -<h1><%= @record['title'] %></h1> |
2 | | - |
3 | | -<%= field_object(@record, 'alternateTitles' ) %> |
4 | | - |
5 | | -<%= field_list(@record, 'callNumbers' ) %> |
6 | | - |
7 | | -<%= field_string(@record, 'citation' ) %> |
8 | | - |
9 | | -<%= field_list(@record, 'contentType' ) %> |
10 | | - |
11 | | -<%= field_list(@record, 'contents' ) %> |
12 | | - |
13 | | -<%= field_table(@record, 'contributors', %w[value kind affiliation identifier mit_affiliated]) %> |
14 | | - |
15 | | -<%= field_table(@record, 'dates', %w[kind value range note]) %> |
16 | | - |
17 | | -<%= field_string(@record, 'edition') %> |
18 | | - |
19 | | -<%= field_list(@record, 'fileFormats') %> |
20 | | - |
21 | | -<%= field_string(@record, 'format') %> |
22 | | - |
23 | | -<%= field_table(@record, 'fundingInformation', %w[award_number award_uri funder_identifier funder_identifier_type funder_name]) %> |
24 | | - |
25 | | -<%= field_table(@record, 'holdings', %w[call_number collection format location note]) %> |
26 | | - |
27 | | -<%= field_object(@record, 'identifiers') %> |
28 | | - |
29 | | -<%= field_list(@record, 'languages') %> |
30 | | - |
31 | | -<%= field_table(@record, 'links', %w[kind text url restrictions]) %> |
32 | | - |
33 | | -<%= field_string(@record, 'literaryForm') %> |
34 | | - |
35 | | -<%= field_table(@record, 'locations', %w[kind value geopoint]) %> |
36 | | - |
37 | | -<%= field_object(@record, 'notes') %> |
38 | | - |
39 | | -<%= field_string(@record, 'numbering') %> |
40 | | - |
41 | | -<%= field_string(@record, 'physicalDescription') %> |
42 | | - |
43 | | -<%= field_list(@record, 'publicationFrequency') %> |
44 | | - |
45 | | -<%= field_list(@record, 'publicationInformation') %> |
46 | | - |
47 | | -<%= field_table(@record, 'relatedItems', %w[description item_type relationship uri]) %> |
48 | | - |
49 | | -<%= field_table(@record, 'rights', %w[description kind uri]) %> |
50 | | - |
51 | | -<%= field_string(@record, 'source') %> |
52 | | - |
53 | | -<%= field_string(@record, 'sourceLink') %> |
54 | | - |
55 | | -<%= field_object(@record, 'subjects') %> |
56 | | - |
57 | | -<%= field_list(@record, 'summary') %> |
58 | | - |
59 | | -<%= field_string(@record, 'timdexRecordId') %> |
| 1 | +<div class="gridband layout-3q1q wrap-full-record"> |
| 2 | + <div class="col3q box-content region full-record" data-region="Full record"> |
| 3 | + |
| 4 | + <h2 class="record-title"> |
| 5 | + <span class="sr">Title: </span> |
| 6 | + <% if @record['title'].present? %> |
| 7 | + <%= @record['title'] %> |
| 8 | + <% else %> |
| 9 | + No title provided for this item. |
| 10 | + <% end %> |
| 11 | + </h2> |
| 12 | + |
| 13 | + <p> |
| 14 | + <span class="record-type"> |
| 15 | + <% # we need to create separate displays for different types of content types, see https://github.com/MITLibraries/bento/pull/908/files#diff-6718f9b88f6f93e59d8c2509512dc40a62088430ff3cce1165ab414565949415L22-L57 for starting point but we should anticipate wanting to expand to many more unique content types %> |
| 16 | + <span class="sr">Type</span> <%= @record['contentType'].join %> |
| 17 | + </span> |
| 18 | +
|
| 19 | + <% if @record['citation'].present? %> |
| 20 | +
|
| 21 | + <span class="record-citation"> |
| 22 | + <%= @record['citation'] %> |
| 23 | + </span> |
| 24 | +
|
| 25 | + <% else %> |
| 26 | +
|
| 27 | + <% if @record['dates'].map{|date| date if date['kind'] == 'Publication date'}.compact.present? %> |
| 28 | + <span class="record-year"> |
| 29 | + : Published <%= date_parse(publication_date(@record)) %> |
| 30 | + </span> |
| 31 | + <% end %> |
| 32 | + <% if @record['edition'].present? %> |
| 33 | + <span class="record-edition"> |
| 34 | + : Edition <%= @record['edition'] %> |
| 35 | + </span> |
| 36 | + <% end %> |
| 37 | + <% end %> |
| 38 | + </p> |
| 39 | +
|
| 40 | + <% # we should helper this up to handle insanely large lists of authors %> |
| 41 | + <% if @record['contributors'].present? %> |
| 42 | + <p class="record-authors"> |
| 43 | + <span class="sr"><%= "Author".pluralize(@record['contributors'].count) %>: </span> |
| 44 | + <% @record['contributors'].each do |author| %> |
| 45 | + <span class="record-author"> |
| 46 | + <%= author['value'] %> |
| 47 | + <% if author['affiliation'].present? %> |
| 48 | + (<%= author['affiliation'].join %>) |
| 49 | + <% end %>; |
| 50 | + </span> |
| 51 | + <% end %> |
| 52 | + </span> |
| 53 | + </p> |
| 54 | + <% end %> |
| 55 | +
|
| 56 | + <% # NOTE: link resolver links are not very useful to most of the content in timdex currently. For dspace and all RDI sources, the source link is better than a link resolver link %> |
| 57 | + <h3 class="section-title">Links</h3> |
| 58 | + <ul class="list-links"> |
| 59 | + <li> |
| 60 | + <span class="label">Source:</span> <%= link_to(@record['source'], @record['sourceLink']) %> |
| 61 | + </li> |
| 62 | +
|
| 63 | + <% if @record['links'].present? %> |
| 64 | + <% @record['links'].each do |link| %> |
| 65 | + <li> |
| 66 | + <%= link_to(link['text'] || 'unknown', link['url']) %> |
| 67 | + </li> |
| 68 | + <% end %> |
| 69 | + <% end %> |
| 70 | + </ul> |
| 71 | +
|
| 72 | + <% if @record['summary'].present? %> |
| 73 | + <h3 class="section-title">Summary</h3> |
| 74 | + <% @record['summary'].each do |paragraph| %> |
| 75 | + <p> |
| 76 | + <%= sanitize paragraph, tags: %w(p strong em a), attributes: %w(href) %> |
| 77 | + </p> |
| 78 | + <% end %> |
| 79 | + <% end %> |
| 80 | +
|
| 81 | + <h3 class="section-title">More information</h3> |
| 82 | +
|
| 83 | + <ul class="list-moreinfo"> |
| 84 | + <%# pub type%> |
| 85 | +
|
| 86 | + <%# pub info%> |
| 87 | + <% if @record['publicationInformation'] %> |
| 88 | + <li>Publication Information: <%= @record['publicationInformation'].join('; ') %></li> |
| 89 | + <% end %> |
| 90 | +
|
| 91 | + <%# identifiers %> |
| 92 | + <% if @record['identifiers'].present? %> |
| 93 | +
|
| 94 | + <% @record['identifiers'].each do |id| %> |
| 95 | + <li> |
| 96 | + <span class="label"><%= id['kind'].upcase %>:</span> |
| 97 | + <span class="<%= id['kind']%>"><%= id['value'] %></span> |
| 98 | + </li> |
| 99 | + <% end%> |
| 100 | + <% end %> |
| 101 | +
|
| 102 | + <%# language %> |
| 103 | + <% if @record['languages'].present? %> |
| 104 | + <li> |
| 105 | + <span class="label"><%= "Language".pluralize(@record['languages'].count) %>:</span> <%= @record['languages'].join(',') %> |
| 106 | + </li> |
| 107 | + <% end %> |
| 108 | + </ul> |
| 109 | +
|
| 110 | + <%# subjects%> |
| 111 | + <% if @record['subjects'].present? %> |
| 112 | + <h3 class="section-title">Subjects</h3> |
| 113 | + <ul class="list-subjects"> |
| 114 | + <% @record['subjects'].each do |subject| %> |
| 115 | + <li> |
| 116 | + <%= "#{subject['kind']}: " if subject['kind'] != "Subject scheme not provided" %> |
| 117 | + <%= subject['value'].join(', ') %> |
| 118 | + </li> |
| 119 | + <% end %> |
| 120 | + </ul> |
| 121 | + <% end %> |
| 122 | +
|
| 123 | + <%# dates%> |
| 124 | + <% if @record['dates'].present? %> |
| 125 | + <h3 class="section-title">Dates</h3> |
| 126 | + <ul class="list-dates"> |
| 127 | + <% @record['dates'].each do |date| %> |
| 128 | + <li> |
| 129 | + <%= date['kind'] %>: <%= date_parse(date['value']) %><%= date_range(date['range']) %> |
| 130 | + <%= " Note: #{date['note']}" if date['note'].present? %> |
| 131 | + </li> |
| 132 | + <% end %> |
| 133 | + </ul> |
| 134 | + <% end %> |
| 135 | +
|
| 136 | + <% if @record['notes'].present? %> |
| 137 | + <h3 class="section-title">Notes</h3> |
| 138 | + <% @record['notes'].each do |note| %> |
| 139 | + <% if note['kind'].present? %> |
| 140 | + <%= note['kind'] %>: |
| 141 | + <% end %> |
| 142 | + <% note['value'].each do |paragraph| %> |
| 143 | + <%= sanitize paragraph, tags: %w(p strong em a), attributes: %w(href) %> |
| 144 | + <% end %> |
| 145 | + <% end %> |
| 146 | + <% end %> |
| 147 | +
|
| 148 | + <% if @record['rights'].present? %> |
| 149 | + <h3 class="section-title">Rights</h3> |
| 150 | + <ul> |
| 151 | + <% @record['rights'].each do |right| %> |
| 152 | + <li> |
| 153 | + <% if right['kind'].present? %> |
| 154 | + <%= right['kind'] %>: |
| 155 | + <% end %> |
| 156 | + <% if right['uri'].present? %> |
| 157 | +
|
| 158 | + <% # note: not all URIs are URLs. Only treat URL-like URIs as links. %> |
| 159 | + <% if right['uri'].start_with?('http')%> |
| 160 | + <%= link_to(right['uri'], right['uri']) %> |
| 161 | + <% else %> |
| 162 | + <%= right['uri'] %> |
| 163 | + <% end %> |
| 164 | +
|
| 165 | + <% end %> |
| 166 | + <% if right['description'].present? %> |
| 167 | + <%= right['description'] %> |
| 168 | + <% end %> |
| 169 | + </li> |
| 170 | + <% end %> |
| 171 | + </ul> |
| 172 | + <% end %> |
| 173 | +
|
| 174 | + <%= render('misc') %> |
| 175 | + </div> |
| 176 | +
|
| 177 | + <%= render('sidebar') %> |
| 178 | +
|
| 179 | +</div> |
| 180 | +
|
| 181 | +<% if params[:debug].present? %> |
| 182 | + <%= debug(@record) %> |
| 183 | +<% end %> |
0 commit comments