forked from bofh/fetsite
a) Worked on better pagination, knows now 25, 50, 100 and "all" b) Viewer always shows ALL pictures, sorted to fit the order of the pagination
93 lines
3.3 KiB
Plaintext
93 lines
3.3 KiB
Plaintext
|
||
<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>
|
||
|
||
<!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
|
||
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">
|
||
<!-- The container for the modal slides -->
|
||
<div class="slides"></div>
|
||
<!-- Controls for the borderless lightbox -->
|
||
<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>
|
||
<!-- The modal dialog, which will be used to wrap the lightbox content -->
|
||
<div class="modal fade">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" aria-hidden="true">×</button>
|
||
<h4 class="modal-title"></h4>
|
||
</div>
|
||
<div class="modal-body next"></div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default pull-left prev">
|
||
<i class="glyphicon glyphicon-chevron-left"></i>
|
||
Previous
|
||
</button>
|
||
<button type="button" class="btn btn-primary next">
|
||
Next
|
||
<i class="glyphicon glyphicon-chevron-right"></i>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="links">
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<% @fotos_p.each do |f| %>
|
||
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery>
|
||
<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid img-rounded"}) %></a>
|
||
<% end %>
|
||
<% @fotos_n.each do |f| %>
|
||
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery></a>
|
||
<% end %>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<%= javascript_include_tag "blueimp-gallery-all" %>
|
||
|
||
<%= render 'layouts/pretty_toolbar' %>
|
||
|