Merge branch 'testgallery'

This commit is contained in:
Andreas Stephanides
2015-01-17 12:18:14 +01:00
21 changed files with 265 additions and 164 deletions

View File

@@ -1,11 +1,20 @@
<%= semantic_form_for @gallery do |f| %>
<%= f.inputs do %>
<%= f.input :name %>
<%= f.input :desc %>
<%= f.input :datum %>
<% end %>
<div class="container-fluid">
<div class="fluid-row">
<div class="span4">
<%= semantic_form_for @gallery do |f| %>
<%= f.inputs do %>
<%= f.input :name %>
<%= f.input :desc %>
<%= f.input :datum %>
<% end %>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>
<% end %>
<% end %>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>
<% end %>
<% end %>
</div>
</div>
</div>

View File

@@ -36,48 +36,81 @@
</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>
<!-- 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">&times;</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 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>
</div>
<p></p>
<div class="row-fluid">
<div class="span12">
<% @fotos_p.each do |f| %>
<div class="left">
<div id="links">
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery>
<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid img-rounded"}) %></a>
</div>
<%= link_to ff_icon('icon-circle-arrow-down').html_safe, f.datei.url,
:class=>"btn-small",title: I18n.t('fotos.download')+': '+f.title, rel: 'tooltip' %>
<%= link_to ff_icon('icon-remove-circle').html_safe, gallery_foto_path(@gallery, f),
:method => :delete, :class=>"btn-small btn-danger",title: I18n.t('fotos.delete')+': '+f.title, rel: 'tooltip', confirm: I18n.t('fotos.delete')+': '+f.title+', Sicher?'%>
<p></p>
</div>
<% end %>
<% @fotos_n.each do |f| %>
<div id="links">
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery></a>
<% end %>
</div>
</div>
</div>
<%= render 'layouts/pretty_toolbar' %>
<div class="row-fluid">
<% if can? :delete,@gallery %>
<div class="span12">
<%= link_to ff_icon('icon-circle-arrow-down').html_safe, '',
:class=>"btn-small"%>: <%= I18n.t('fotos.download_long')%><br>
<%= link_to ff_icon('icon-remove-circle').html_safe, '',
:class=>"btn-small btn-danger"%>: <%= I18n.t('fotos.delete')%>
<p></p>
</div>
<% end %>
<%= render 'layouts/pretty_toolbar' %>
</div>
<%= @pppage_array[@pppage] %>
<%= javascript_include_tag "blueimp-gallery-all" %>
<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>