#48 thumbnails
This commit is contained in:
parent
23176ba0e3
commit
cf6aee043c
@ -28,6 +28,6 @@
|
|||||||
<% links.each do |dmsf_file, link, create_at| %>
|
<% links.each do |dmsf_file, link, create_at| %>
|
||||||
<%= render :partial => 'dmsf_files/link', :locals => { :dmsf_file => dmsf_file, :link => link } %>
|
<%= render :partial => 'dmsf_files/link', :locals => { :dmsf_file => dmsf_file, :link => link } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= render :partial => 'dmsf_files/thumbnails', :locals => { :links => links, :thumbnails => thumbnails } %>
|
<%= render :partial => 'dmsf_files/thumbnails', :locals => { :links => links, :thumbnails => thumbnails, :link_to => true } %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@ -27,9 +27,12 @@
|
|||||||
<div class="thumbnails">
|
<div class="thumbnails">
|
||||||
<% images.each do |file| %>
|
<% images.each do |file| %>
|
||||||
<div>
|
<div>
|
||||||
<%= link_to image_tag(dmsf_thumbnail_path(file)),
|
<% if link_to # Redmine classic %>
|
||||||
url_for({:controller => :dmsf_files, :action => 'view', :id => file}),
|
<%= link_to image_tag(dmsf_thumbnail_path(file)), view_dmsf_file_path(file), :alt => file.title %>
|
||||||
:alt => file.title %>
|
<% else # jQuery gallery %>
|
||||||
|
<%= image_tag(dmsf_thumbnail_path(file),
|
||||||
|
{ :'data-fullsrc' => view_dmsf_file_path(file), :alt => file.title }) %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -78,7 +78,7 @@ module RedmineDmsf
|
|||||||
if links.present?
|
if links.present?
|
||||||
html = controller.send(:render_to_string,
|
html = controller.send(:render_to_string,
|
||||||
{ :partial => 'dmsf_files/thumbnails',
|
{ :partial => 'dmsf_files/thumbnails',
|
||||||
:locals => { :links => links, :thumbnails => Setting.thumbnails_enabled?} })
|
:locals => { :links => links, :thumbnails => Setting.thumbnails_enabled?, :link_to => false } })
|
||||||
html.html_safe
|
html.html_safe
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user