|
1 | 1 | <div class="attachments"> |
2 | 2 | <div class="contextual"> |
3 | | - <%= link_to image_tag('edit.png'), |
4 | | - container_attachments_edit_path(container), |
5 | | - :title => l(:label_edit_attachments) if options[:editable] %> |
| 3 | + <%= link_to(l(:label_edit_attachments), |
| 4 | + container_attachments_edit_path(container), |
| 5 | + :title => l(:label_edit_attachments), |
| 6 | + :class => 'icon-only icon-edit' |
| 7 | + ) if options[:editable] %> |
6 | 8 | </div> |
7 | 9 | <% for attachment in attachments %> |
8 | 10 | <p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%> |
9 | 11 | <% if attachment.is_text? %> |
10 | | - <%= link_to image_tag('magnifier.png'), |
11 | | - :controller => 'attachments', :action => 'show', |
12 | | - :id => attachment, :filename => attachment.filename %> |
| 12 | + <%= link_to l(:button_view), |
| 13 | + { :controller => 'attachments', :action => 'show', |
| 14 | + :id => attachment, :filename => attachment.filename }, |
| 15 | + :class => 'icon-only icon-magnifier', |
| 16 | + :title => l(:button_view) %> |
| 17 | + <% end %> |
| 18 | + <% if attachment.is_image? %> |
| 19 | + <%= link_to l(:button_view), |
| 20 | + { :controller => 'attachments', :action => 'download', |
| 21 | + :id => attachment, :filename => attachment.filename }, |
| 22 | + :class => 'icon-only icon-magnifier lightbox_preview ' + attachment.filename.split('.').last.downcase, |
| 23 | + :rel => 'attachments', :title => "#{attachment.filename}#{ (' - ' + attachment.description) unless attachment.description.blank? }" %> |
13 | 24 | <% end %> |
14 | | - <%= h(" - #{attachment.description}") unless attachment.description.blank? %> |
15 | | - <span class="size">(<%= number_to_human_size attachment.filesize %>)</span> |
16 | 25 | <% if( attachment.filename =~ /.(pdf|swf)$/i ) %> |
17 | | - <%= link_to image_tag('preview.png', :plugin => :redmine_lightbox2), { |
18 | | - :controller => 'attachments', :action => 'download_inline', |
19 | | - :id => attachment, :filename => attachment.filename |
20 | | - }, :class => $1.downcase + ' lightbox_preview', :rel => 'attachments', |
21 | | - :title => "#{attachment.filename}#{ ('-' + attachment.description) unless attachment.description.blank? }", |
| 26 | + <%= link_to l(:button_view), |
| 27 | + { :controller => 'attachments', :action => 'download_inline', |
| 28 | + :id => attachment, :filename => attachment.filename }, |
| 29 | + :class => 'icon-only icon-magnifier lightbox_preview ' + attachment.filename.split('.').last.downcase, |
| 30 | + :rel => 'attachments', :title => "#{attachment.filename}#{ (' - ' + attachment.description) unless attachment.description.blank? }", |
22 | 31 | :data => {:fancybox_type => 'iframe'} %> |
23 | | - <% end -%> |
24 | | - <% if( attachment.filename =~ /.(png|jpg|jpeg|gif)$/i ) %> |
25 | | - <%= link_to image_tag('preview.png', :plugin => :redmine_lightbox2), { |
26 | | - :controller => 'attachments', :action => 'show', |
27 | | - :id => attachment, :filename => attachment.filename |
28 | | - }, :class => $1.downcase + ' lightbox_preview', :rel => 'attachments', |
29 | | - :title => "#{attachment.filename}#{ ('-' + attachment.description) unless attachment.description.blank? }" %> |
30 | | - <% end -%> |
| 32 | + <% end %> |
| 33 | + <%= attachment.description unless attachment.description.blank? %> |
| 34 | + <span class="size">(<%= number_to_human_size attachment.filesize %>)</span> |
31 | 35 | <% if options[:deletable] %> |
32 | | - <%= link_to image_tag('delete.png'), attachment_path(attachment), |
33 | | - :data => {:confirm => l(:text_are_you_sure)}, |
34 | | - :method => :delete, |
35 | | - :class => 'delete', |
36 | | - :title => l(:button_delete) %> |
| 36 | + <%= link_to l(:button_delete), attachment_path(attachment), |
| 37 | + :data => {:confirm => l(:text_are_you_sure)}, |
| 38 | + :method => :delete, |
| 39 | + :class => 'delete icon-only icon-del', |
| 40 | + :title => l(:button_delete) %> |
37 | 41 | <% end %> |
38 | 42 | <% if options[:author] %> |
39 | | - <span class="author"><%= h(attachment.author) %>, <%= format_time(attachment.created_on) %></span> |
| 43 | + <span class="author"><%= attachment.author %>, <%= format_time(attachment.created_on) %></span> |
40 | 44 | <% end %> |
41 | 45 | </p> |
42 | 46 | <% end %> |
|
49 | 53 | <div> |
50 | 54 | <%= |
51 | 55 | link_to image_tag(url_for(:controller => 'attachments', :action => 'thumbnail', :id => attachment)), |
52 | | - {:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename}, |
| 56 | + {:controller => 'attachments', :action => 'download', :id => attachment, :filename => attachment.filename}, |
53 | 57 | :class => 'lightbox', :rel => 'thumbnails', :title => "#{attachment.filename}#{ ('-' + attachment.description) unless attachment.description.blank? }" |
54 | 58 | %> |
55 | 59 | </div> |
|
61 | 65 | <% unless images.empty? %> |
62 | 66 | <div class='images'> |
63 | 67 | <% images.each do |attachment| %> |
64 | | - <%= link_to image_tag(url_for({:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename }), :width => '180'), |
65 | | - {:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename }, :class => 'lightbox', :rel => 'thumbnails', :title => "#{attachment.filename}#{ ('-' + attachment.description) unless attachment.description.blank? }" %> |
| 68 | + <%= link_to image_tag(url_for({:controller => 'attachments', :action => 'download', :id => attachment, :filename => attachment.filename }), :width => '180'), |
| 69 | + {:controller => 'attachments', :action => 'download', :id => attachment, :filename => attachment.filename }, :class => 'lightbox', :rel => 'thumbnails', :title => "#{attachment.filename}#{ ('-' + attachment.description) unless attachment.description.blank? }" %> |
66 | 70 | <% end -%> |
67 | 71 | </div> |
68 | 72 | <% end -%> |
|
0 commit comments