Files
fetsite/app/views/galleries/show.html.erb
Thomas Blazek f6a95dee57 commit
2015-01-15 14:30:53 +01:00

74 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<p id="notice"><%= notice %></p>
<div>
<small class="pull-left"><%= @gallery.fotos.size.to_s + " " + I18n.t('fotos.bilder')%> </small>
<small class="pull-right"><%=I18n.l(@gallery.try(:datum).try(:to_date)) unless @gallery.try(:datum).try(:to_date).nil? %></small></br>
<h1>
<%= @gallery.name %>
</h1>
</div>
<p>
<%= @gallery.desc %>
</p>
<div class="fluid-row">
<div class="span9"> <!-- pagination-->
<div class="pagination pull_left" style="margin:0px 0px 0px 0px">
<ul>
<li><a href="<%= gallery_path @gallery, {:pppage => @pppage, :page => (@page==1 ? @page : @page-1)} %>"><%=I18n.t('fotos.prev')%></a></li>
<% for i in 1..@pages do %>
<li><a href="<%= gallery_path @gallery, {:pppage => @pppage, :page => i} %>"><%=i%></a></li>
<% end %>
<li><a href="<%= gallery_path @gallery, {:pppage => @pppage, :page => (@page==@pages ? @page : @page+1)} %>"><%=I18n.t('fotos.next')%></a></li>
</ul>
</div>
</div>
<div class="span3"> <!-- size selector -->
<div class="pull-right">
<div class="btn-group" data-toggle="buttons-radio">
<button class="btn" disabled><%=I18n.t('fotos.pictures_per_site')%></button>
<% for i in 0..@pppage_array.size-1 %>
<a class="btn" href="<%= gallery_path @gallery, {:pppage => i} %>"><%=@pppage_array[i]%></a>
<% end %>
</div>
</div>
</div>
</div>
<div style="clear:both"></div>
<div id="blueimp-gallery" class="blueimp-gallery">
<div class="slides"></div>
<h3 class="title"></h3>
<a class="prev"></a>
<a class="next"></a>
<a class="close">×</a>
<a class="play-pause"></a>
<ol class="indicator"></ol>
</div>
<div id="links">
<% @fotos.each_index do |i| %>
<% f= @fotos[i] %>
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery>
<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid img-rounded"}) if @showind.include? i %></a>
<% end %>
</div>
<%= render 'layouts/pretty_toolbar' %>
<script>
document.getElementById('links').onclick = function (event) {
event = event || window.event;
var target = event.target || event.srcElement,
link = target.src ? target.parentNode : target,
options = {index: link, event: event},
links = this.getElementsByTagName('a');
blueimp.Gallery(links, options);
};
</script>