-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Why these changes are being introduced: The GeoData app requires specific metadata in the results view. Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/GDT-130 How this addresses that need: This adds a separate result view for geo records that includes the specifed metadata fields. It also applies some general styling updates, most of which involve spacing and font size/weight. The most significant CSS change is that values that may be long (authors, higlights, summary) are now truncated. Side effects of this change: * The date parsing logic catches a lot of edge cases, but not all of them. It also puts a fair amount of faith in the source data to have reasonably formatted dates. Finally, it makes the assumption that the date we want is coverage, falling back to issued. This is subject to change. * I noticed an indentation issue in the search controller test, so some lines that appear to have changed have just been re-indented. New tests begin at line 1036. * Certain fields have been added to support these changes, and cassettes have been regenerated as a result.
- Loading branch information
Showing
57 changed files
with
1,309 additions
and
723 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<%= return if contributors.blank? %> | ||
|
||
<% author_list = [] %> | ||
<% contributors&.each do |contributor| %> | ||
<% author_list << contributor['value'] %> | ||
<% end %> | ||
|
||
<span class="sr">Authors: </span> | ||
<%= author_list.uniq.map { |author| link_to author, results_path({ advanced: true, contributors: author }) }.join(' ; ').html_safe %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<ul class="list-inline"> | ||
<li><%= result['contentType']&.each { |type| type['value'] }&.join(' ; ') %></li> | ||
<li><%= parse_geo_dates(result['dates']) %></li> | ||
<% if access_type(result) == 'Not owned by MIT' %> | ||
<li> | ||
<%= access_type(result) %> | ||
<span class="other-provider">(<%= link_to "Owned by #{result['provider']}", gis_access_link(result) %>)</span> | ||
</li> | ||
<% elsif access_type(result) == 'MIT authentication' %> | ||
<li><span class="access-restricted"><%= access_type(result) %></span></li> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<li class="result"> | ||
<h2 class="record-title"> | ||
<span class="sr">Title: </span><%= number_in_results(result_geo) %>. <%= link_to(result_geo['title'], record_path(result_geo['timdexRecordId'])) %> | ||
</h2> | ||
|
||
<div class="data-info"> | ||
<%= render partial: 'search/geo_data_info', locals: { result: result_geo } %> | ||
</div> | ||
|
||
<% if result_geo['contributors'] %> | ||
<p class="result-authors truncate-list"> | ||
<%= render partial: 'search/authors', locals: { contributors: result_geo['contributors'] } %> | ||
</p> | ||
<% end %> | ||
|
||
<% if result_geo['summary'] %> | ||
<p class="result-summary truncate-list"> | ||
<span class="sr">Summary: </span><%= result_geo['summary'].join(' ') %> | ||
</p> | ||
<% end %> | ||
|
||
<% if result_geo['highlight'] %> | ||
<div class="result-highlights"> | ||
<%= render partial: 'search/highlights', locals: { result: result_geo } %> | ||
</div> | ||
<% end %> | ||
|
||
<div class="result-get"> | ||
<%= view_record(result_geo['timdexRecordId']) %> | ||
</div> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.