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 diff --git a/app/controllers/fotos_controller.rb b/app/controllers/fotos_controller.rb index b0f0e76..17dfa4c 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/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/controllers/themen_controller.rb b/app/controllers/themen_controller.rb index 15a03ec..d8643a4 100644 --- a/app/controllers/themen_controller.rb +++ b/app/controllers/themen_controller.rb @@ -137,7 +137,7 @@ class ThemenController < ApplicationController @thema = Thema.find(params[:id]) @themen = @thema.themengruppe.themen.order(:priority).reverse @thema.assign_attributes(params[:thema]) - @thema.fix_links(request.host_with_port) + # @thema.fix_links(request.host_with_port) respond_to do |format| if @thema.save 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 %>

+ diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb index 6b533d4..9340128 100644 --- a/app/views/galleries/show.html.erb +++ b/app/views/galleries/show.html.erb @@ -32,9 +32,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? %>
@@ -54,15 +64,17 @@ end
-
@@ -117,17 +129,18 @@ end <% @fotos_p.each do |f| %>
<%= 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' %> @@ -138,7 +151,7 @@ end <% end %> <% @fotos_n.each do |f| %>
@@ -158,13 +171,16 @@ end <% end %> <%= render 'layouts/pretty_toolbar' %>
-<%= @pppage_array[@pppage] %> + <%= javascript_include_tag "blueimp-gallery-all" %> + 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