From 444db14e98876bae2cd896fcf28fe21c102424cc Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 25 Feb 2015 17:15:14 +0100 Subject: [PATCH 1/6] foto fb button --- app/views/fotos/show.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/fotos/show.html.erb b/app/views/fotos/show.html.erb index c33d0d4..d4c084d 100644 --- a/app/views/fotos/show.html.erb +++ b/app/views/fotos/show.html.erb @@ -9,6 +9,8 @@ top: 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=>"" %> -

<%= notice %>

-
+
" data-layout="standard" data-action="like" data-show-faces="true" data-share="true">
+ +

<%= notice %>

+ From daf258820a7ba78ce5523e864a29fa9e5ce0a707 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 28 Feb 2015 13:27:40 +0100 Subject: [PATCH 2/6] gallery foto view history fix --- app/controllers/fotos_controller.rb | 11 ++++++++-- app/views/galleries/show.html.erb | 32 ++++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/app/controllers/fotos_controller.rb b/app/controllers/fotos_controller.rb index b0f0e76..d55f135 100644 --- a/app/controllers/fotos_controller.rb +++ b/app/controllers/fotos_controller.rb @@ -16,13 +16,20 @@ class FotosController < ApplicationController # GET /fotos/1.json def show @foto = Foto.find(params[:id]) - + @gallery=@foto.gallery + @openfotoid=@foto.id + @pppage=params[:pppage].to_i % 4 + @pppage_array = [ 25 , 50 , 100, 10000] + @page = params[:page].nil? ? 1 : params[:page].to_i + + @fotos_p = @gallery.fotos.page(@page).per(@pppage_array[@pppage]) + @fotos_n = @gallery.fotos- @fotos_p respond_to do |format| format.html { if params[:plain] render "show", layout: false else - redirect_to gallery_path(@foto.gallery,:params=>{fotoid: @foto.id}) + render "galleries/show" #controller: :galleries, action: :show #gallery_path(@foto.gallery,:params=>{fotoid: @foto.id}) end } format.json { render json: @foto } diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb index 32f341f..b5fe40f 100644 --- a/app/views/galleries/show.html.erb +++ b/app/views/galleries/show.html.erb @@ -31,9 +31,19 @@ end <% end %> +
+

<%= notice %>

+ +
<%= @gallery.fotos.size.to_s + " " + I18n.t('fotos.bilder')%> <%=I18n.l(@gallery.try(:datum).try(:to_date)) unless @gallery.try(:datum).try(:to_date).nil? %>
@@ -56,9 +66,10 @@ end @@ -119,7 +130,7 @@ end
itemprop="primaryImageOfPage"<% else %> itemprop="hasPart" <% end %> itemscope itemtype="http://schema.org/ImageObject"> - id="openpic" <% end %>> + id="openpic" <% end %>> <%= image_tag(f.datei.thumb.url,{:class=>"img-polaroid img-rounded"}) %> @@ -137,7 +148,7 @@ end <% end %> <% @fotos_n.each do |f| %>
@@ -159,11 +170,14 @@ end
<%= @pppage_array[@pppage] %> <%= javascript_include_tag "blueimp-gallery-all" %> + From be24c237513c98b47c12e906f8c4406c2743fa41 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 28 Feb 2015 13:31:19 +0100 Subject: [PATCH 3/6] gitignore update --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c78ff3f..c3c81f6 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /db/data.yml +/db/data_*.yml /db/.#initdebug.rb /usergroup.ldif /newuser.ldif @@ -40,3 +41,4 @@ console Gemfile.lock /config/database.yml /config/start_topic.yml +/config/contact_topic.yml \ No newline at end of file From f07925701db6e9fe369be481953f15dc387b6fd0 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 28 Feb 2015 15:01:56 +0100 Subject: [PATCH 4/6] tinymce relative urls --- config/tinymce.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/tinymce.yml b/config/tinymce.yml index 0dfd66d..380b8a0 100755 --- a/config/tinymce.yml +++ b/config/tinymce.yml @@ -29,3 +29,4 @@ formats: setup: function(ed) { ed.addButton('boldred_btn', {title:'Bold-Red',icon:"fa fa-red fa-bold", onclick:function() {ed.focus();ed.formatter.toggle('boldred'); }}); } +relative_urls: false \ No newline at end of file From 62b6f8ca88f02cd0f048c26f1212b1e68ec31e8b Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 28 Feb 2015 15:02:22 +0100 Subject: [PATCH 5/6] gallery fixes --- app/controllers/fotos_controller.rb | 6 +++--- app/controllers/galleries_controller.rb | 2 +- app/views/galleries/show.html.erb | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/controllers/fotos_controller.rb b/app/controllers/fotos_controller.rb index d55f135..17dfa4c 100644 --- a/app/controllers/fotos_controller.rb +++ b/app/controllers/fotos_controller.rb @@ -20,9 +20,9 @@ class FotosController < ApplicationController @openfotoid=@foto.id @pppage=params[:pppage].to_i % 4 @pppage_array = [ 25 , 50 , 100, 10000] - @page = params[:page].nil? ? 1 : params[:page].to_i - - @fotos_p = @gallery.fotos.page(@page).per(@pppage_array[@pppage]) + @page = params[:page].nil? ? 1 : params[:page].to_i + + @fotos_p = @gallery.fotos.page(@page).per(@pppage_array[@pppage]) @fotos_n = @gallery.fotos- @fotos_p respond_to do |format| format.html { diff --git a/app/controllers/galleries_controller.rb b/app/controllers/galleries_controller.rb index 3e40570..fe79760 100644 --- a/app/controllers/galleries_controller.rb +++ b/app/controllers/galleries_controller.rb @@ -19,7 +19,7 @@ class GalleriesController < ApplicationController def show @gallery = Gallery.find(params[:id]) - @pppage_array = [ 25 , 50 , 100, "all"] #defines number & size of picture chunks + @pppage_array = [ 25 , 50 , 100, 10000] #defines number & size of picture chunks @pppage = 0 #starting index of pppage_array if !params[:pppage].nil? && params[:pppage].to_i <= 3 && params[:pppage].to_i >= 0 diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb index b5fe40f..7362515 100644 --- a/app/views/galleries/show.html.erb +++ b/app/views/galleries/show.html.erb @@ -63,7 +63,8 @@ end
-
@@ -168,7 +169,7 @@ end <% end %> <%= render 'layouts/pretty_toolbar' %>
-<%= @pppage_array[@pppage] %> + <%= javascript_include_tag "blueimp-gallery-all" %>