Skip to content

Commit 6b1a114

Browse files
committed
Fixups
1 parent fc333d1 commit 6b1a114

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

app/helpers/record_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def date_range(range)
1414
end
1515

1616
def publication_date(metadata)
17-
metadata['dates'].select { |date| date['kind'] == 'Publication date' }.first['value']
17+
metadata[:dates].select { |date| date['kind'] == 'Publication date' }.first['value']
1818
end
1919

2020
# Display the machine-format key in human-readable text.
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<ul class="list-inline">
2-
<li><%= metadata['contentType']&.each { |type| type['value'] }&.join(' ; ') %></li>
3-
<% if parse_geo_dates(metadata['dates']) %>
2+
<% if metadata[:content_type] %>
3+
<li><%= metadata[:content_type]&.each { |type| type['value'] }&.join(' ; ') %></li>
4+
<% elsif metadata['contentType'] %>
5+
<li><%= metadata['contentType']&.each { |type| type['value'] }&.join(' ; ') %></li>
6+
<% end %>
7+
8+
<% if parse_geo_dates(metadata[:dates]) %>
9+
<li><%= parse_geo_dates(metadata[:dates]) %></li>
10+
<% elsif parse_geo_dates(metadata['dates']) %>
411
<li><%= parse_geo_dates(metadata['dates']) %></li>
512
<% end %>
613
<% if access_type(metadata) == 'unknown: check with owning institution' %>
@@ -11,4 +18,4 @@
1118
<% elsif access_type(metadata) == 'MIT authentication required' %>
1219
<li><span class="access-restricted"><%= access_type(metadata) %></span></li>
1320
<% end %>
14-
</ul>
21+
</ul>

0 commit comments

Comments
 (0)