From 025a76abfc0bb01cf29b0d55c52e92af3b7dafab Mon Sep 17 00:00:00 2001 From: Carolyn Cole Date: Fri, 7 Feb 2014 08:13:57 -0500 Subject: [PATCH] Removing hard coded asset paths, which do not work in production. While doing that upgrading to use existing partials and rails helpers for those links. --- .../_thumbnail_display.html.erb | 4 +- .../generic_files/_media_display.html.erb | 6 +-- app/views/users/_contributions.html.erb | 48 ++++++++----------- 3 files changed, 25 insertions(+), 33 deletions(-) diff --git a/app/views/dashboard/_index_partials/_thumbnail_display.html.erb b/app/views/dashboard/_index_partials/_thumbnail_display.html.erb index a7780a6fbb..cddc36b75a 100644 --- a/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +++ b/app/views/dashboard/_index_partials/_thumbnail_display.html.erb @@ -2,8 +2,8 @@ <% if document.image? || document.pdf? || document.video? %> <% path = sufia.download_path(document.noid, {datastream_id: 'thumbnail'}) %> <% elsif document.audio? %> - <% path = "/assets/audio.png" %> + <% path = "audio.png" %> <% else %> - <% path = "/assets/default.png" %> + <% path = "default.png" %> <% end %> <%= link_to image_tag(path, {width: width}), sufia.generic_file_path(document) %> diff --git a/app/views/generic_files/_media_display.html.erb b/app/views/generic_files/_media_display.html.erb index 3a4b91b001..6f162c7f51 100644 --- a/app/views/generic_files/_media_display.html.erb +++ b/app/views/generic_files/_media_display.html.erb @@ -1,5 +1,5 @@ <% if @generic_file.image? %> - Download the full-sized image of <%= @generic_file.title.first %>Download the full-sized image + <%= link_to image_tag(sufia.download_path(@generic_file, datastream_id: 'thumbnail'),{width:"338", alt:"Download the full-sized image of #{@generic_file.title.first}"})+"Download the full-sized image", sufia.download_path(@generic_file), { target:"_new", title:"Download the full-sized image"}%> <% elsif @generic_file.video? %>