-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2705 from archivesspace/make-representative-file-…
…version-opt-in restore digital object views in public app and turn off new represent…
- Loading branch information
Showing
10 changed files
with
68 additions
and
9 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
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
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 |
---|---|---|
@@ -1,11 +1,52 @@ | ||
<%# expects 'rep_fv' as a file_version hash %> | ||
<% unless rep_fv.blank? %> | ||
<% if false %><!-- comment --> | ||
expects 'rep_fv' as a file_version hash when AppConfig[:enable_representative_file_version] | ||
otherwise expects to-be-deprecated 'dig_objs' as an array of hashes | ||
<!-- /comment --><% end %> | ||
<% if AppConfig[:enable_representative_file_version] && rep_fv.present? %> | ||
<div class="images"> | ||
<div class="objectimage"> | ||
<div class="panel panel-default"> | ||
<%= render partial: 'shared/representative_file_version', locals: {:uri => rep_fv['file_uri'], :caption => rep_fv['caption']} %> | ||
</div> | ||
</div> | ||
</div> | ||
<% elsif dig_objs.present? %> | ||
<div class="images"> | ||
<% dig_objs.each do |d_file| %> | ||
<% if !d_file['out'].blank? %> | ||
<% if d_file['thumb'].blank? %> | ||
<div class="objectimage"> | ||
<div class="panel panel-default"> | ||
<a class="btn btn-default record-type-badge digital_object" style="width: 100%" href="<%= d_file['out'] %>" target="new" title="<%= t('digital_object._public.link')%>"> | ||
<i class="fa <%= { '(moving_image)' => 'fa-file-video-o' , | ||
'(sound_recording)' => 'fa-file-audio-o', | ||
'(sound_recording_musical)' => 'fa-file-audio-o', | ||
'(sound_recording_nonmusical)' => 'fa-file-audio-o' , | ||
'(still_image)' => 'fa-file-image-o' , | ||
'(text)' => 'fa-file-text'}.fetch( d_file['material'], 'fa-file-o' ) %> fa-4x"></i><br/> | ||
<div class="panel-heading"> | ||
<%= d_file['caption'].blank? ? "#{t('enumerations.instance_instance_type.digital_object')} #{d_file['material']}" : d_file['caption'].html_safe %> | ||
</div> | ||
</a> | ||
</div> | ||
</div> | ||
<% else %> | ||
<div class="objectimage"> | ||
<div class="panel panel-default"> | ||
<a class="thumbnail" href="<%= d_file['out'] %>" target="new" title="<%= t('digital_object._public.link')%>"> | ||
<img src="<%= d_file['thumb'] %>" alt="<%= strip_mixed_content(d_file['caption'] || t('enumerations.instance_instance_type.digital_object')) %>" /> | ||
</a> | ||
<div class="panel-heading"> | ||
<%= (d_file['caption'] || t('enumerations.instance_instance_type.digital_object')).html_safe %> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
<% elsif !d_file['thumb'].blank? %> | ||
<div class="objectimage"> | ||
<img src="<%= d_file['thumb'] %>" alt="<%= strip_mixed_content(d_file['caption'] || t('digital_object._public.thumbnail')) %>" /> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<% end %> |
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