forked from bofh/fetsite
Topbar inclusions
This commit is contained in:
@@ -16,6 +16,14 @@ class LvasController < ApplicationController
|
||||
|
||||
@toolbar_elements<<{:hicon=>'icon-plus-sign', :icon=>:plus, :text => "Neues Beispiel", :path=> new_beispiel_path(:lva_id =>@lva.id)}
|
||||
@toolbar_elements<<{:hicon=>'icon-pencil', :icon=>:pencil,:text =>I18n.t('common.edit'),:path => edit_lva_path(@lva)}
|
||||
@topbar_elements =[{:hicon=>'icon-list', :text=>I18n.t("lva.list"), :path=>lvas_path}]
|
||||
for m in @lva.modul
|
||||
@topbar_elements << {:newline=>true}
|
||||
@topbar_elements << {:text=> '<b>' + m.name + '</b>', :path=>modul_path(m)}
|
||||
for mg in m.modulgruppen
|
||||
@topbar_elements << {:text => mg.studium.name + ' (' + mg.name + ')', :path=>studium_path(mg.studium)}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# GET /lvas/new
|
||||
|
||||
@@ -30,18 +30,18 @@ class ModulsController < ApplicationController
|
||||
|
||||
|
||||
@topbar_elements = [{:hicon=>'icon-list', :text=>I18n.t("modul.list"),:path=>moduls_path}]
|
||||
|
||||
@topbar_elements <<{:newline=>true}
|
||||
@tb=[]
|
||||
for i in @modul.modulgruppen
|
||||
|
||||
if !i.studium.nil?
|
||||
name =i.studium.name
|
||||
id = i.studium.id
|
||||
else
|
||||
s.name = 'Kein Studium vorhanden'
|
||||
name =i.studium.name
|
||||
id = i.studium.id
|
||||
else
|
||||
s.name = 'Kein Studium vorhanden'
|
||||
s.id = nil
|
||||
end
|
||||
@topbar_elements <<{:text=> i.name + ' ('+i.studium.name + ')', :path=>studium_modulgruppen_path(i)}
|
||||
end
|
||||
@tb <<{:text=> i.name + ' ('+i.studium.name + ')', :path=>modulgruppe_path(i)}
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @modul }
|
||||
|
||||
Reference in New Issue
Block a user