
<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 class="fluid-row" style="margin:20px">
  <!-- modal-gallery is the modal dialog used for the image gallery -->
  <div id="modal-gallery" class="modal hide fade modal-gallery modal-fullscreen modal-loading" tabindex="-1">
    <div class="modal-header">
      <a class="close" data-dismiss="modal">&times;</a>
      <h3 class="modal-title"></h3>
    </div>
    <div class="modal-body"><div class="modal-image"></div></div>
    <div class="modal-footer">
      <a class="btn btn-info modal-prev"><i class="icon-arrow-left icon-white"></i></a>
      <a class="btn btn-primary modal-next"><i class="icon-arrow-right icon-white"></i></a>
      <a class="btn btn-success modal-play modal-slideshow" data-slideshow="5000"><i class="icon-play icon-white"></i> <%=I18n.t('fotos.slideshow')%></a>
      <a class="btn modal-download" target="_blank"><i class="icon-download"></i> Download</a>
    </div>
  </div>

  <div id="gallery" data-toggle="modal-gallery" data-target="#modal-gallery">
    <% @fotos.each_index do |i| %>
    <% f= @fotos[i] %>
    <a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery="gallery">
      <%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid img-rounded"}) if @showind.include? i  %></a>


    <% end %>
  </div>
</div>

<%= render 'layouts/pretty_toolbar' %>



<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/load-image.js"></script>
<script src="js/bootstrap-image-gallery.js"></script>
<script type="text/javascript">
  $('#modal-gallery.fade').css('top', '50%');
</script>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
<script src="js/bootstrap-image-gallery.min.js"></script>
