825c88ca
Aurélio A. Heckert
Create FilePresen...
|
1
2
3
|
<% if image.gallery? && options[:gallery_view] %>
<%
images = image.parent.images
|
18ac7d64
Rodrigo Souto
profile-activitie...
|
4
|
current_index = images.index(image.encapsulated_instance)
|
825c88ca
Aurélio A. Heckert
Create FilePresen...
|
5
6
|
total_of_images = images.count
link_to_previous = if current_index >= 1
|
5ff5e42b
Leandro Santos
should not escape...
|
7
|
link_to(_('« Previous').html_safe, images[current_index - 1].view_url, :class => 'previous')
|
825c88ca
Aurélio A. Heckert
Create FilePresen...
|
8
|
else
|
5ff5e42b
Leandro Santos
should not escape...
|
9
|
content_tag('span', _('« Previous').html_safe, :class => 'previous')
|
825c88ca
Aurélio A. Heckert
Create FilePresen...
|
10
11
12
|
end
link_to_next = if current_index < total_of_images - 1
|
5ff5e42b
Leandro Santos
should not escape...
|
13
|
link_to(_('Next »').html_safe, images[current_index + 1].view_url, :class => 'next')
|
825c88ca
Aurélio A. Heckert
Create FilePresen...
|
14
|
else
|
5ff5e42b
Leandro Santos
should not escape...
|
15
|
content_tag('span', _('Next »').html_safe, :class => 'next')
|
825c88ca
Aurélio A. Heckert
Create FilePresen...
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
end
%>
<div class="gallery-navigation">
<%= link_to_previous %>
<span class="total-of-images">
<%= _('image %d of %d') % [current_index + 1, total_of_images] %>
</span>
<%= link_to_next %>
</div>
<% end %>
<%# image_tag(article.public_filename(:display), :class => article.css_class_name, :style => 'max-width: 100%') %>
|
8c1e4fab
Antonio Terceiro
FilePresenter: fi...
|
31
|
<img src="<%= [Noosfero.root, image.public_filename(:display)].join %>" class="<%=image.css_class_name%>">
|
825c88ca
Aurélio A. Heckert
Create FilePresen...
|
32
|
|
af119b17
Pedro de Lyra Pereira
Add download butt...
|
33
34
35
36
|
<% if image.parent.is_a?(Gallery) && image.parent.allow_download %>
<%= link_to _('Download image'), [Noosfero.root, image.public_filename(:display)].join, download: image.filename, id: 'download-image-id', class: "button with-text icon-save" %>
<% end %>
|
825c88ca
Aurélio A. Heckert
Create FilePresen...
|
37
|
<div class="uploaded-file-description <%= 'empty' if image.abstract.blank? %>">
|
825c88ca
Aurélio A. Heckert
Create FilePresen...
|
38
39
|
<%= image.abstract %>
</div>
|