Bildergallerie auf Kurs

Für alle mit löschrechten: 2 Buttons, einer zeigt auf originaldatei,
einer löscht das bild.
This commit is contained in:
Thomas Blazek
2015-01-16 14:41:37 +01:00
parent 9c6038d6dd
commit b7f9cf942b
4 changed files with 92 additions and 57 deletions

View File

@@ -38,55 +38,79 @@
</div>
<div style="clear:both"></div>
<!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
<!-- 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>
<!-- 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>
<div id="links">
<div class="row-fluid">
<div class="span12">
<p></p>
<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>
<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| %>
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery></a>
<% end %>
</div>
</div>
<div id="links">
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery></a>
<% end %>
</div>
</div>
</div>
<%= javascript_include_tag "blueimp-gallery-all" %>
<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" %>