fixed to string conversion in missing galleries and photos

This commit is contained in:
Pet
2018-10-29 10:52:26 +01:00
parent 638795b8d3
commit 5f5fed7881
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) ) %>
<div style="position:absolute; bottom:0; ">
<%= 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>-->
<%= 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>
</div>

View File

@@ -1,7 +1,7 @@
<%= content_for :header do %>
<title>Fet - Fotos: <%= @gallery.name %></title>
<%
<%
if @openfotoid.nil? || @openfotoid==0
@firstfoto= @fotos_p.first
unless @firstfoto.nil?
@@ -70,7 +70,7 @@ end
<!-- <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
<% # for i in 1..@pages do
i=1 %>
<li><a href="<%= gallery_path @gallery, {:pppage => @pppage, :page => i} %>"><%=i%></a></li>
<% # end %>
@@ -131,7 +131,7 @@ end
<% @fotos_p.each do |f| %>
<div class="left">
<div id="links">
<% if (@openfotoid.to_i==f.id) %>
<% if (@openfotoid.to_i==f.id) %>
<meta itemprop="image" content="<%= f.datei.resized.url %>"/>
<% end %>
<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>
<%= 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),
: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>
</div>
<% end %>
@@ -169,21 +172,21 @@ end
<%= 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>
</div>
<%= javascript_include_tag "blueimp-gallery-all" %>
<script>
blueimp.Gallery.prototype.textFactory = function (obj, callback) {
var $element = $('<div>')
.addClass('slide-content')
.attr('title', obj.title)
.attr('histItem',obj.getAttribute('histitem'));
$.get(obj.href)
.done(function (result) {
$element.html(result);
@@ -201,13 +204,13 @@ end
return $element[0];
};
$('#openpic').click()
blueimp.Gallery.prototype.onslide = (function(_super) {
return function(index) {
history.pushState({},"Foto",String(this.list[index].getAttribute('histitem')));
return _super.apply(this, arguments);
};
};
})(blueimp.Gallery.prototype.onslide);
</script>
<style>
@@ -221,5 +224,3 @@ end
* html .fb-like{display:inline}/* ie6 inline block fix*/
*+html .fb-like{display:inline}/* ie7 inline block fix*/
</style>