Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Links only the download text, replaces figure and figcaption with a d…
…iv, removes title attribute, removes alt text, and adds representative-media class for display. Adds <h2> to improve document outline and removes unused img-responsive class. Updates text to be customizable in translation file.
- Loading branch information
mtribone
committed
Aug 23, 2016
1 parent
958904e
commit 1e89cd5
Showing
7 changed files
with
89 additions
and
58 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
27 changes: 18 additions & 9 deletions
27
app/views/curation_concerns/file_sets/media_display/_default.html.erb
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,12 +1,21 @@ | ||
<% if CurationConcerns.config.display_media_download_link %> | ||
<%= link_to main_app.download_path(file_set), target: "_new", title: "Download the document" do %> | ||
<figure> | ||
<%= image_tag "default.png", alt: "No preview available", class: "img-responsive" %> | ||
<figcaption>Download the document</figcaption> | ||
</figure> | ||
<% end %> | ||
<div> | ||
<h2 class="sr-only"><%= t('curation_concerns.show.downloadable_content.heading') %></h2> | ||
<%= image_tag "default.png", | ||
class: "representative-media", | ||
alt: "", | ||
role: "presentation" %> | ||
<%= link_to main_app.download_path(file_set), | ||
target: "_new", | ||
class: "btn btn-default" do %> | ||
<%= t('curation_concerns.show.downloadable_content.default_link') %> | ||
<% end %> | ||
</div> | ||
<% else %> | ||
<figure> | ||
<%= image_tag "default.png", alt: "No preview available", class: "img-responsive" %> | ||
</figure> | ||
<div> | ||
<%= image_tag "default.png", | ||
class: "representative-media", | ||
alt: "", | ||
role: "presentation" %> | ||
</div> | ||
<% end %> |
31 changes: 18 additions & 13 deletions
31
app/views/curation_concerns/file_sets/media_display/_image.html.erb
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,16 +1,21 @@ | ||
<% if CurationConcerns.config.display_media_download_link %> | ||
<%= link_to main_app.download_path(file_set), target: "_new", title: "Download the full-sized image" do %> | ||
<figure> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "img-responsive", | ||
alt: "Download the full-sized image of #{file_set.to_s}" %> | ||
<figcaption>Download the full-sized image</figcaption> | ||
</figure> | ||
<% end %> | ||
<div> | ||
<h2 class="sr-only"><%= t('curation_concerns.show.downloadable_content.heading') %></h2> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "representative-media", | ||
alt: "", | ||
role: "presentation" %> | ||
<%= link_to main_app.download_path(file_set), | ||
target: "_new", | ||
class: "btn btn-default" do %> | ||
<%= t('curation_concerns.show.downloadable_content.image_link') %> | ||
<% end %> | ||
</div> | ||
<% else %> | ||
<figure> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "img-responsive", | ||
alt: "Thumbnail of #{file_set.to_s}" %> | ||
</figure> | ||
<div> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "representative-media", | ||
alt: "", | ||
role: "presentation" %> | ||
</div> | ||
<% end %> |
31 changes: 18 additions & 13 deletions
31
app/views/curation_concerns/file_sets/media_display/_office_document.html.erb
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,16 +1,21 @@ | ||
<% if CurationConcerns.config.display_media_download_link %> | ||
<%= link_to main_app.download_path(file_set), target: "_new", title: "Download the document" do %> | ||
<figure> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "img-responsive", | ||
alt: "Download the document #{file_set.to_s}" %> | ||
<figcaption>Download the document</figcaption> | ||
</figure> | ||
<% end %> | ||
<div> | ||
<h2 class="sr-only"><%= t('curation_concerns.show.downloadable_content.heading') %></h2> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "representative-media", | ||
alt: "", | ||
role: "presentation" %> | ||
<%= link_to main_app.download_path(file_set), | ||
target: "_new", | ||
class: "btn btn-default" do %> | ||
<%= t('curation_concerns.show.downloadable_content.office_link') %> | ||
<% end %> | ||
</div> | ||
<% else %> | ||
<figure> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "img-responsive", | ||
alt: "Thumbnail of #{file_set.to_s}" %> | ||
</figure> | ||
<div> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "representative-media", | ||
alt: "", | ||
role: "presentation" %> | ||
</div> | ||
<% end %> |
31 changes: 18 additions & 13 deletions
31
app/views/curation_concerns/file_sets/media_display/_pdf.html.erb
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,16 +1,21 @@ | ||
<% if CurationConcerns.config.display_media_download_link %> | ||
<%= link_to main_app.download_path(file_set), target: "_new", title: "Download the full-sized PDF" do %> | ||
<figure> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "img-responsive", | ||
alt: "Download the full-sized PDF of #{file_set.to_s}" %> | ||
<figcaption>Download the full-sized PDF</figcaption> | ||
</figure> | ||
<% end %> | ||
<div> | ||
<h2 class="sr-only"><%= t('curation_concerns.show.downloadable_content.heading') %></h2> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "representative-media", | ||
alt: "", | ||
role: "presentation" %> | ||
<%= link_to main_app.download_path(file_set), | ||
target: "_new", | ||
class: "btn btn-default" do %> | ||
<%= t('curation_concerns.show.downloadable_content.pdf_link') %> | ||
<% end %> | ||
</div> | ||
<% else %> | ||
<figure> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "img-responsive", | ||
alt: "Thumbnail of #{file_set.to_s}" %> | ||
</figure> | ||
<div> | ||
<%= image_tag thumbnail_url(file_set), | ||
class: "representative-media", | ||
alt: "", | ||
role: "presentation" %> | ||
</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
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