fixes in fotogallery

This commit is contained in:
2018-12-29 01:04:16 +01:00
parent a20c6fa673
commit f6c3cda045
2 changed files with 15 additions and 15 deletions

View File

@@ -8,10 +8,9 @@ top: 0" %>
<% #, gallery_foto_path(@foto.gallery, ((@foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].nil?) ? (@foto.gallery.fotos[0].try(:id).to_i) : @foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].try(:id).to_i) ) %> <% #, gallery_foto_path(@foto.gallery, ((@foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].nil?) ? (@foto.gallery.fotos[0].try(:id).to_i) : @foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].try(:id).to_i) ) %>
<div style="position:absolute; bottom:0; "> <div style="position:absolute; bottom:0; ">
<%= link_to ff_icon('icon-circle-arrow-down').html_safe, @foto.datei.url, <%= link_to ff_icon('icon-circle-arrow-down').html_safe, @foto.datei.url,
:class=>"btn",title: I18n.t('fotos.download')+': '+@foto.title,:target=>:blank, :style=>"" %> :class=>"btn",title: I18n.t('fotos.download')+': '+@foto.title.to_s,:target=>:blank, :style=>"" %>
<!-- <div class="fb-like" data-href"<%= gallery_foto_path(@foto.gallery,@foto, {fotoid:@foto.id,theme: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>--> <!-- <div class="fb-like" data-href"<%= gallery_foto_path(@foto.gallery,@foto, {fotoid:@foto.id,theme: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>-->
<%= render_shareable :url=>gallery_foto_url(@foto.gallery,@foto, {theme: nil, locale: nil}),:static_link=>true, :buttons=>[:facebook, :twitter, :google_plus] %> <%= render_shareable :url=>gallery_foto_url(@foto.gallery,@foto, {theme: nil, locale: nil}),:static_link=>true, :buttons=>[:facebook, :twitter, :google_plus] %>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
</div> </div>

View File

@@ -1,7 +1,7 @@
<%= content_for :header do %> <%= content_for :header do %>
<title>Fet - Fotos: <%= @gallery.name %></title> <title>Fet - Fotos: <%= @gallery.name %></title>
<% <%
if @openfotoid.nil? || @openfotoid==0 if @openfotoid.nil? || @openfotoid==0
@firstfoto= @fotos_p.first @firstfoto= @fotos_p.first
unless @firstfoto.nil? unless @firstfoto.nil?
@@ -70,7 +70,7 @@ end
<!-- <div class="pagination pull_left" style="margin:0px 0px 0px 0px"> <!-- <div class="pagination pull_left" style="margin:0px 0px 0px 0px">
<ul> <ul>
<li><a href="<%= gallery_path @gallery, {:pppage => @pppage, :page => (@page==1 ? @page : @page-1)} %>"><%=I18n.t('fotos.prev')%></a></li> <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 <% # for i in 1..@pages do
i=1 %> i=1 %>
<li><a href="<%= gallery_path @gallery, {:pppage => @pppage, :page => i} %>"><%=i%></a></li> <li><a href="<%= gallery_path @gallery, {:pppage => @pppage, :page => i} %>"><%=i%></a></li>
<% # end %> <% # end %>
@@ -131,7 +131,7 @@ end
<% @fotos_p.each do |f| %> <% @fotos_p.each do |f| %>
<div class="left"> <div class="left">
<div id="links"> <div id="links">
<% if (@openfotoid.to_i==f.id) %> <% if (@openfotoid.to_i==f.id) %>
<meta itemprop="image" content="<%= f.datei.resized.url %>"/> <meta itemprop="image" content="<%= f.datei.resized.url %>"/>
<% end %> <% end %>
<div <% if (@openfotoid.to_i==f.id) %> itemprop="primaryImageOfPage"<% else %> itemprop="hasPart" <% end %> itemscope itemtype="http://schema.org/ImageObject"> <div <% if (@openfotoid.to_i==f.id) %> itemprop="primaryImageOfPage"<% else %> itemprop="hasPart" <% end %> itemscope itemtype="http://schema.org/ImageObject">
@@ -145,9 +145,12 @@ end
</div> </div>
</div> </div>
<%= link_to ff_icon('icon-circle-arrow-down').html_safe, f.datei.url, <%= link_to ff_icon('icon-circle-arrow-down').html_safe, f.datei.url,
:class=>"btn-small",title: I18n.t('fotos.download')+': '+f.title.to_s, rel: 'tooltip' %> :class=>"btn-small",title: I18n.t('fotos.download').to_s+': '+f.title.to_s, rel: 'tooltip' %>
<%= link_to ff_icon('icon-remove-circle').html_safe, gallery_foto_path(@gallery, f), <%= 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?' if can?(:delete,f) %> :method => :delete, :class=>"btn-small btn-danger",
title: I18n.t('fotos.delete').to_s+': '+f.title.to_s, rel: 'tooltip',
confirm: I18n.t('fotos.delete').to_s+': '+f.title.to_s+',
Sicher?' if can?(:delete,f) %>
<p></p> <p></p>
</div> </div>
<% end %> <% end %>
@@ -169,21 +172,21 @@ end
<%= link_to ff_icon('icon-remove-circle').html_safe, '', <%= link_to ff_icon('icon-remove-circle').html_safe, '',
:class=>"btn-small btn-danger"%>: <%= I18n.t('fotos.delete')%> :class=>"btn-small btn-danger"%>: <%= I18n.t('fotos.delete')%>
<p></p> <p></p>
</div> </div>
<% end %> <% end %>
<%= render 'layouts/pretty_toolbar' %> <%= render 'layouts/pretty_toolbar' %>
</div> </div>
</div> </div>
<%= javascript_include_tag "blueimp-gallery-all" %> <%= javascript_include_tag "blueimp-gallery-all" %>
<script> <script>
blueimp.Gallery.prototype.textFactory = function (obj, callback) { blueimp.Gallery.prototype.textFactory = function (obj, callback) {
var $element = $('<div>') var $element = $('<div>')
.addClass('slide-content') .addClass('slide-content')
.attr('title', obj.title) .attr('title', obj.title)
.attr('histItem',obj.getAttribute('histitem')); .attr('histItem',obj.getAttribute('histitem'));
$.get(obj.href) $.get(obj.href)
.done(function (result) { .done(function (result) {
$element.html(result); $element.html(result);
@@ -201,13 +204,13 @@ end
return $element[0]; return $element[0];
}; };
$('#openpic').click() $('#openpic').click()
blueimp.Gallery.prototype.onslide = (function(_super) { blueimp.Gallery.prototype.onslide = (function(_super) {
return function(index) { return function(index) {
history.pushState({},"Foto",String(this.list[index].getAttribute('histitem'))); history.pushState({},"Foto",String(this.list[index].getAttribute('histitem')));
return _super.apply(this, arguments); return _super.apply(this, arguments);
}; };
})(blueimp.Gallery.prototype.onslide); })(blueimp.Gallery.prototype.onslide);
</script> </script>
<style> <style>
@@ -221,5 +224,3 @@ end
* html .fb-like{display:inline}/* ie6 inline block fix*/ * html .fb-like{display:inline}/* ie6 inline block fix*/
*+html .fb-like{display:inline}/* ie7 inline block fix*/ *+html .fb-like{display:inline}/* ie7 inline block fix*/
</style> </style>