From 58a36e3604372e0ade54b3e12f2bc29f4b729f3b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 25 Dec 2006 10:14:24 +0000 Subject: [PATCH] attachments list on issues/show: * "delete" form replaced by link_to * added css class for attachment icon git-svn-id: http://redmine.rubyforge.org/svn/trunk@112 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/show.rhtml | 10 ++-------- public/stylesheets/application.css | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index 8390f8282..0d4bfa497 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -77,16 +77,10 @@ end %> <% for attachment in @issue.attachments %> - + -<% if authorize_for('issues', 'destroy_attachment') %> - -<% end %> + <% end %>
<%= image_tag('attachment') %> <%= link_to attachment.filename, :action => 'download', :id => @issue, :attachment_id => attachment %> (<%= human_size(attachment.filesize) %>)<%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon attachment' %> (<%= human_size(attachment.filesize) %>) <%= format_date(attachment.created_on) %> <%= attachment.author.display_name %> - <%= start_form_tag :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment %> - <%= submit_tag l(:button_delete), :class => "button-small" %> - <%= end_form_tag %> -
<%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment }, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index b2fbee0d4..194be1991 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -143,6 +143,7 @@ background-color: #80b0da; .folder { background-image: url(../images/folder.png); } .file { background-image: url(../images/file.png); } +.attachment { background-image: url(../images/attachment.png); } /**************** Content styles ****************/