forked from bofh/fetsite
Toolbar und kopfzeileneinbindung
This commit is contained in:
@@ -3,7 +3,7 @@ class LvasController < ApplicationController
|
|||||||
before_filter {@toolbar_elements =[]}
|
before_filter {@toolbar_elements =[]}
|
||||||
def index
|
def index
|
||||||
@lvas = Lva.all
|
@lvas = Lva.all
|
||||||
|
@toolbar_elements=[{:hicon=>'icon-plus-sign',:text =>I18n.t('lva.add'),:path => new_lva_path}]
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /lvas/1
|
# GET /lvas/1
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ class ModulsController < ApplicationController
|
|||||||
if !params[:studium_id].nil?
|
if !params[:studium_id].nil?
|
||||||
@studium=Studium.find_by_id(params[:studium_id])
|
@studium=Studium.find_by_id(params[:studium_id])
|
||||||
end
|
end
|
||||||
|
@toolbar_elements = [{:hicon=>'icon-plus-sign', :text=>I18n.t("modul.add"), :path=>new_modul_path}]
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # index.html.erb
|
format.html # index.html.erb
|
||||||
format.json { render json: @moduls }
|
format.json { render json: @moduls }
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ class StudienController < ApplicationController
|
|||||||
@studien = Studium.all
|
@studien = Studium.all
|
||||||
@toolbar_elements<<{:icon =>:plus, :hicon=>'icon-plus-sign', :text=> I18n.t('studien.new') ,:path=>new_studium_path }
|
@toolbar_elements<<{:icon =>:plus, :hicon=>'icon-plus-sign', :text=> I18n.t('studien.new') ,:path=>new_studium_path }
|
||||||
# @toolbar_elements<<{:text=> I18n.t('modulgruppe.show.link') ,:path=>modulgruppen_path }
|
# @toolbar_elements<<{:text=> I18n.t('modulgruppe.show.link') ,:path=>modulgruppen_path }
|
||||||
@toolbar_elements<<{:hicon=> 'icon-list', :text=> I18n.t('modul.show.link') ,:path=>moduls_path }
|
|
||||||
@toolbar_elements<<{:hicon=> 'icon-list', :text=> 'Alle LVas auflisten', :path=>lvas_path}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|||||||
11
app/views/layouts/_link_all.html.erb
Executable file
11
app/views/layouts/_link_all.html.erb
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li> <%= link_to_unless_current '<i class="icon-list"></i>'.html_safe+ I18n.t("studien.allestudien"), studien_path,:raw=>true %>
|
||||||
|
<span class="divider">/</span></li>
|
||||||
|
|
||||||
|
<li> <%= link_to_unless_current '<i class="icon-list"></i>'.html_safe+ I18n.t("modul.list"), moduls_path,:raw=>true %>
|
||||||
|
<span class="divider">/</span></li>
|
||||||
|
<li> <%= link_to_unless_current '<i class="icon-list"></i>'.html_safe+ I18n.t("lva.list"), lvas_path,:raw=>true %>
|
||||||
|
<span class="divider">/</span></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
<h1>Listing lvas</h1>
|
<%= render 'layouts/link_all' %>
|
||||||
|
<h1><%= I18n.t("lva.list")%></h1>
|
||||||
<ul>
|
<ul>
|
||||||
<% @lvas.each do |l| %>
|
<% @lvas.each do |l| %>
|
||||||
<li><%= render :partial => 'lvas/lva_semester', :locals=> {:lva => l} %>
|
<li><%= render :partial => 'lvas/lva_semester', :locals=> {:lva => l} %>
|
||||||
<%end%>
|
<%end%>
|
||||||
</ul>
|
</ul>
|
||||||
<%= link_to 'New Lva', new_lva_path %>
|
<%= render 'layouts/pretty_toolbar' %>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
<%= semantic_form_for @modul do |f| %>
|
<%= semantic_form_for @modul do |f| %>
|
||||||
<%= f.inputs do %>
|
<%= f.inputs do %>
|
||||||
<%= f.input :modulgruppen,:as => :select, :collection => Hash[Modulgruppe.all.map{|m| [m.studium.name + " " + m.name,m.id]}] %>
|
<% # f.input :modulgruppen,:as => :select, :collection => Hash[Modulgruppe.all.map{|m| [m.studium.name + " " + m.name,m.id]}] %>
|
||||||
|
<%= f.input :modulgruppen %>
|
||||||
<%= f.input :name ,:hint=>true%>
|
<%= f.input :name ,:hint=>true%>
|
||||||
<%= f.input :desc, :as=>:tinymce_text %>
|
<%= f.input :desc, :as=>:tinymce_text %>
|
||||||
<%= f.input :depend %>
|
<%= f.input :depend %>
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
|
<%= render 'layouts/link_all' %>
|
||||||
<h1><%= I18n.t("modul.show.title") %></h1>
|
<h1><%= I18n.t("modul.list") %></h1>
|
||||||
|
|
||||||
<%= render :partial=>'moduls/lang', :collection=>@moduls, :as=>:modul%>
|
<%= render :partial=>'moduls/lang', :collection=>@moduls, :as=>:modul%>
|
||||||
|
|
||||||
<br />
|
<br>
|
||||||
<% #if !@studium.nil? %>
|
<%= render 'layouts/pretty_toolbar'%>
|
||||||
<%= link_to 'New Modul', new_modul_path() %>
|
|
||||||
<% #end%>
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<%= render 'layouts/link_all' %>
|
||||||
<h1><%= I18n.t("studien.list") %></h1>
|
<h1><%= I18n.t("studien.list") %></h1>
|
||||||
|
|
||||||
|
|
||||||
@@ -8,8 +9,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br>
|
||||||
<% link_to I18n.t("studien.new"), new_studium_path %>
|
|
||||||
<% link_to I18n.t("modulgruppe.show"), modulgruppen_path %>
|
|
||||||
<%= render :partial=>'layouts/pretty_toolbar'%>
|
<%= render :partial=>'layouts/pretty_toolbar'%>
|
||||||
<% #toolbar_html(@toolbar_elements) %>
|
<% #toolbar_html(@toolbar_elements) %>
|
||||||
|
|||||||
@@ -17,5 +17,5 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= render 'layouts/pretty_toolbar' %><br>
|
<%= render 'layouts/pretty_toolbar' %><br>
|
||||||
<%= render 'layouts/pretty_toolbar', :pretty_toolbar=>@toolbar_modulgruppen %>
|
<%= render :partial=>'layouts/pretty_toolbar', :object=>@toolbar_modulgruppen %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ de:
|
|||||||
edit: "Studium bearbeiten"
|
edit: "Studium bearbeiten"
|
||||||
modul:
|
modul:
|
||||||
edit: "Modul bearbeiten"
|
edit: "Modul bearbeiten"
|
||||||
show:
|
list: "Alle Module"
|
||||||
title: "Auflistung aller Module"
|
add: "Neues Modul"
|
||||||
link: "Alle Module auflisten"
|
|
||||||
keine:
|
keine:
|
||||||
beschreibung: "Keine Beschreibung vorhanden"
|
beschreibung: "Keine Beschreibung vorhanden"
|
||||||
lva:
|
lva:
|
||||||
add: "Lva hinzufügen"
|
add: "Lva hinzufügen"
|
||||||
|
list: "Alle Lvas"
|
||||||
semester:
|
semester:
|
||||||
ohne: "Ohne Semesterzuordnung"
|
ohne: "Ohne Semesterzuordnung"
|
||||||
modulgruppe:
|
modulgruppe:
|
||||||
|
|||||||
Reference in New Issue
Block a user