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;" %>
<%= notice %>
-<%= 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 %>
+ +