foto gallery - schema.org und download button

This commit is contained in:
Andreas Stephanides
2015-02-24 13:46:43 +01:00
parent 742962255b
commit 67d0d19bd7
5 changed files with 78 additions and 37 deletions

View File

@@ -1,5 +1,6 @@
class FotosController < ApplicationController
before_filter {@toolbar_elements=[]}
load_and_authorize_resource
# GET /fotos
# GET /fotos.json
def index
@@ -17,7 +18,13 @@ class FotosController < ApplicationController
@foto = Foto.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.html {
if params[:plain]
render "show", layout: false
else
redirect_to gallery_path(@foto.gallery,:params=>{fotoid: @foto.id})
end
}
format.json { render json: @foto }
end
end