This commit is contained in:
Thomas Blazek
2015-01-15 14:01:16 +01:00
parent 2931ee6cd6
commit 3a00794851

View File

@@ -39,45 +39,36 @@
<div style="clear:both"></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"> <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| %> <% @fotos.each_index do |i| %>
<% f= @fotos[i] %> <% f= @fotos[i] %>
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery="gallery"> <a href="<%= f.datei.resized.url%>" title="<%=f.title%>">
<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid img-rounded"}) if @showind.include? i %></a> <%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid img-rounded"}) if @showind.include? i %></a>
<% end %> <% end %>
</div> </div>
</div>
<%= render 'layouts/pretty_toolbar' %> <%= render 'layouts/pretty_toolbar' %>
<script>
document.getElementById('links').onclick = function (event) {
event = event || window.event;
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> var target = event.target || event.srcElement,
<script src="js/bootstrap.js"></script> link = target.src ? target.parentNode : target,
<script src="js/load-image.js"></script> options = {index: link, event: event},
<script src="js/bootstrap-image-gallery.js"></script> links = this.getElementsByTagName('a');
<script type="text/javascript"> blueimp.Gallery(links, options);
$('#modal-gallery.fade').css('top', '50%'); };
</script> </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>