File tree Expand file tree Collapse file tree 5 files changed +13
-18
lines changed Expand file tree Collapse file tree 5 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def normalize
1515 'format' => format ,
1616 'links' => links ,
1717 'citation' => citation ,
18- 'identifier' => record_id ,
18+ 'identifier' => identifier ,
1919 'summary' => summary ,
2020 'publisher' => publisher ,
2121 'location' => location ,
@@ -45,7 +45,9 @@ def creators
4545 end
4646
4747 def source
48- @record [ 'source' ] &.first || 'Unknown source'
48+ return 'Unknown source' unless @record [ 'source' ]
49+
50+ @record [ 'source' ]
4951 end
5052
5153 def year
@@ -113,7 +115,7 @@ def subjects
113115 @record [ 'subjects' ] . map { |subject | subject [ 'value' ] }
114116 end
115117
116- def record_id
118+ def identifier
117119 @record [ 'timdexRecordId' ]
118120 end
119121
Original file line number Diff line number Diff line change 11< li class ="result ">
22 < div class ="result-content ">
33 < h3 class ="record-title ">
4- < span class ="sr "> Title: </ span > <%= link_to ( result_geo [ 'title' ] , record_path ( result_geo [ 'timdex_record_id ' ] ) ) %>
4+ < span class ="sr "> Title: </ span > <%= link_to ( result_geo [ 'title' ] , record_path ( result_geo [ 'identifier ' ] ) ) %>
55 </ h3 >
66
7- <% if result_geo [ 'content_type' ] || result_geo [ 'dates' ] %>
8- < div class ="data-info ">
9- <%= render partial : 'shared/geo_data_info' , locals : {
10- metadata : {
11- 'contentType' => result_geo [ 'content_type' ] ,
12- 'dates' => result_geo [ 'dates' ]
13- }
14- } %>
15- </ div >
16- <% end %>
7+ < div class ="data-info ">
8+ <%= render partial : 'shared/geo_data_info' , locals : { metadata : result_geo } %>
9+ </ div >
1710
1811 <% if result_geo [ 'creators' ] . present? || result_geo [ 'contributors' ] . present? %>
1912 < span class ="sr "> Contributors: </ span >
3932 <% end %>
4033
4134 < div class ="result-record ">
42- <%= view_record ( result_geo [ 'timdex_record_id ' ] ) %>
35+ <%= view_record ( result_geo [ 'identifier ' ] ) %>
4336 </ div >
4437 </ div >
4538</ li >
Original file line number Diff line number Diff line change 1111 <% elsif access_type ( metadata ) == 'MIT authentication required' %>
1212 < li > < span class ="access-restricted "> <%= access_type ( metadata ) %> </ span > </ li >
1313 <% end %>
14- </ ul >
14+ </ ul >
Original file line number Diff line number Diff line change 11{
22 "timdexRecordId" : " test-record-123" ,
33 "title" : " Sample TIMDEX Record for Testing" ,
4- "source" : [ " Test Repository" ] ,
4+ "source" : " Test Repository" ,
55 "contentType" : [
66 {"value" : " Dataset" },
77 {"value" : " Geospatial data" }
Original file line number Diff line number Diff line change 11{
22 "timdexRecordId" : " minimal-record-456" ,
33 "title" : " Minimal Test Record" ,
4- "source" : [ " Test Repository" ]
4+ "source" : " Test Repository"
55}
You can’t perform that action at this time.
0 commit comments