Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

Commit

Permalink
Update date order
Browse files Browse the repository at this point in the history
  • Loading branch information
VivianChu committed Oct 16, 2019
1 parent 362c39b commit f982ea4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
14 changes: 3 additions & 11 deletions app/views/shared/fields/_date.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<%
type = nil unless local_assigns[:type]
if defined?(componentIndex) # Then we're working with a component
prefix = "component_#{componentIndex}_"
htmlOpenTemp = "<tr><td>%s</td><td><ul class = 'unstyled'>"
Expand All @@ -17,8 +18,9 @@

fieldData.each do |datum|
date = JSON.parse(datum)
date_type = date['type']
%>
<% if date['type']!=nil && date['type']!=''&& date['value']!=nil &&date['value']!=''%>
<% if date['type']!=nil && date['type']!='' && type == date_type && date['value']!=nil &&date['value']!=''%>
<%
date_labels = t('date_labels')
Expand All @@ -30,16 +32,6 @@
<% concat htmlOpen.html_safe %>
<li><%= date['value'].gsub('""', '"') %></li>
<% concat htmlClose.html_safe %>
<% elsif date['value']!=nil && date['value']!='' %>
<% htmlOpen = htmlOpenTemp %>
<% htmlOpen %= 'Date' %>
<% concat htmlOpen.html_safe %>
<li><%= date['value'].gsub('""', '"') %></li>
<% concat htmlClose.html_safe %>
<% end %>
<%
Expand Down
6 changes: 4 additions & 2 deletions app/views/shared/fields/_show_raw.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
<%= render :partial => 'shared/fields/note', :locals => {:type => 'description'}.merge(component) %>
<%= render :partial => 'shared/fields/scope_of_content', :locals => component %>
<%= render :partial => 'shared/fields/note', :locals => {:type => 'scope and content'}.merge(component) %>
<%= render :partial => 'shared/fields/date', :locals => component %>
<%= render :partial => 'shared/fields/date', :locals => {:type => 'event'}.merge(component) %>
<%= render :partial => 'shared/fields/date', :locals => {:type => 'collected'}.merge(component) %>
<%= render :partial => 'shared/fields/date', :locals => {:type => 'creation'}.merge(component) %>
<%= render :partial => 'shared/fields/date', :locals => {:type => 'issued'}.merge(component) %>
<%= render :partial => 'shared/fields/relationships', :locals => component %>
<%= render :partial => 'shared/fields/note', :locals => {:type => 'credits'}.merge(component) %>
<%= render :partial => 'shared/fields/note', :locals => {:type => 'performers'}.merge(component) %>
Expand Down Expand Up @@ -95,7 +98,6 @@
:exclude_label => ['digital object made available by'] }.merge(component) %>
<%= render :partial => 'shared/fields/license', :locals => component %>
<%= render :partial => 'shared/fields/rights_holder', :locals => component %>
<%= render :partial => 'shared/fields/note', :locals => {:type => 'preferred citation'}.merge(component) %>
<% if unit_code != "rdcp" %>
<%= render :partial => 'shared/fields/note', :locals => {:type => 'preferred citation', :custom_label => 'cite this work'}.merge(component) %>
<%= render :partial => 'shared/fields/preferred_citation_note', :locals => component %>
Expand Down

0 comments on commit f982ea4

Please sign in to comment.