From 3e8950ba64cddca90da8cc4352327c23b7aaf744 Mon Sep 17 00:00:00 2001 From: HausdorffHimself Date: Wed, 11 Sep 2013 21:51:59 +0200 Subject: [PATCH] =?UTF-8?q?CHANGE:=20pretty=5Ftoolbar=20f=C3=BCr=20Foto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/fotos_controller.rb | 3 +++ app/views/fotos/new.html.erb | 2 +- config/locales/de.yml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/fotos_controller.rb b/app/controllers/fotos_controller.rb index af920da..6b3ba2b 100644 --- a/app/controllers/fotos_controller.rb +++ b/app/controllers/fotos_controller.rb @@ -1,4 +1,5 @@ class FotosController < ApplicationController + before_filter {@toolbar_elements=[]} # GET /fotos # GET /fotos.json def index @@ -27,6 +28,8 @@ class FotosController < ApplicationController @foto = Foto.new @gallery = Gallery.find_by_id(params[:gallery_id]) @foto.gallery_id = @gallery.id + @toolbar_elements << {:hicon => 'icon-arrow-left', :text => I18n.t('common.back'), :path => gallery_path(params[:gallery_id]) } + respond_to do |format| format.html # new.html.erb format.json { render json: @foto } diff --git a/app/views/fotos/new.html.erb b/app/views/fotos/new.html.erb index c8ad2fd..4afa250 100644 --- a/app/views/fotos/new.html.erb +++ b/app/views/fotos/new.html.erb @@ -2,4 +2,4 @@ <%= render 'form_bulk' %> -<%= link_to 'Back', gallery_path(params[:gallery_id]) %> +<%= render :partial => 'layouts/pretty_toolbar' %> diff --git a/config/locales/de.yml b/config/locales/de.yml index b08d2ca..6f8b853 100755 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -8,6 +8,7 @@ de: actions: "Aktionen" delete: "Löschen" verwalten: "Verwalten" + back: "Zurück" home: mtitle: "Menu" willkommen: "Willkommen bei der Fachschaft Elektrotechnik"