diff --git a/app/controllers/moduls_controller.rb b/app/controllers/moduls_controller.rb index f5315c9..82a7bd3 100755 --- a/app/controllers/moduls_controller.rb +++ b/app/controllers/moduls_controller.rb @@ -18,11 +18,15 @@ class ModulsController < ApplicationController # GET /moduls/1.json def show @modul = Modul.find(params[:id]) + @toolbar_elements = [{:hicon=>'icon-plus-sign', :text=>I18n.t("lva.add"), :path=>new_lva_path(:modul_id =>@modul.id)}] + @toolbar_elements << {:hicon=>'icon-pencil', :text=>I18n.t("modul.edit"), :path=>edit_modul_path(@modul)} + @toolbar_elements << {:hicon=>'icon-remove-circle', :text=>I18n.t("common.delete"),:path=>@modul , :method=>:delete , :data=>{:confirm =>'Are you sure'}} respond_to do |format| format.html # show.html.erb format.json { render json: @modul } end + end # GET /moduls/new diff --git a/app/controllers/studien_controller.rb b/app/controllers/studien_controller.rb index 531109e..4b431e6 100755 --- a/app/controllers/studien_controller.rb +++ b/app/controllers/studien_controller.rb @@ -34,6 +34,8 @@ class StudienController < ApplicationController @toolbar_elements=[{:icon=>:plus, :hicon =>'icon-plus-sign' ,:text=> I18n.t('studien.new') , :path => new_studium_path(@studium) }] @toolbar_elements<<{:icon=>:pencil, :hicon=>'icon-pencil',:text =>I18n.t('common.edit'),:path => edit_studium_path(@studium)} @toolbar_elements<<{:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => studium_path(@studium), :method=> :delete,:confirm=>"Sure?" } + @toolbar_modulgruppen =[ {:hicon=>'icon-plus-sign', :text=> I18n.t('modulgruppe.new'), :path=>new_studium_modulgruppe_path(@studium)}] + @toolbar_modulgruppen << {:hicon=>'icon-list', :text => I18n.t('modulgruppe.list'), :path=>modulgruppen_path} end def new diff --git a/app/views/layouts/_pretty_toolbar.html.erb b/app/views/layouts/_pretty_toolbar.html.erb index cdbaa85..cb8514a 100644 --- a/app/views/layouts/_pretty_toolbar.html.erb +++ b/app/views/layouts/_pretty_toolbar.html.erb @@ -1,8 +1,7 @@ -