diff --git a/app/controllers/lvas_controller.rb b/app/controllers/lvas_controller.rb index f9409be..ecc3082 100755 --- a/app/controllers/lvas_controller.rb +++ b/app/controllers/lvas_controller.rb @@ -3,7 +3,7 @@ class LvasController < ApplicationController before_filter {@toolbar_elements =[]} def index @lvas = Lva.all - + @toolbar_elements=[{:hicon=>'icon-plus-sign',:text =>I18n.t('lva.add'),:path => new_lva_path}] end # GET /lvas/1 diff --git a/app/controllers/moduls_controller.rb b/app/controllers/moduls_controller.rb index 82a7bd3..49c0168 100755 --- a/app/controllers/moduls_controller.rb +++ b/app/controllers/moduls_controller.rb @@ -7,6 +7,8 @@ class ModulsController < ApplicationController if !params[:studium_id].nil? @studium=Studium.find_by_id(params[:studium_id]) end + @toolbar_elements = [{:hicon=>'icon-plus-sign', :text=>I18n.t("modul.add"), :path=>new_modul_path}] + respond_to do |format| format.html # index.html.erb format.json { render json: @moduls } diff --git a/app/controllers/studien_controller.rb b/app/controllers/studien_controller.rb index 4b431e6..22f109f 100755 --- a/app/controllers/studien_controller.rb +++ b/app/controllers/studien_controller.rb @@ -6,8 +6,6 @@ class StudienController < ApplicationController @studien = Studium.all @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<<{: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 def show diff --git a/app/views/layouts/_link_all.html.erb b/app/views/layouts/_link_all.html.erb new file mode 100755 index 0000000..0108206 --- /dev/null +++ b/app/views/layouts/_link_all.html.erb @@ -0,0 +1,11 @@ + + + diff --git a/app/views/lvas/index.html.erb b/app/views/lvas/index.html.erb index 2eec9ee..640e04a 100755 --- a/app/views/lvas/index.html.erb +++ b/app/views/lvas/index.html.erb @@ -1,7 +1,8 @@ -

Listing lvas

+<%= render 'layouts/link_all' %> +

<%= I18n.t("lva.list")%>

-<%= link_to 'New Lva', new_lva_path %> +<%= render 'layouts/pretty_toolbar' %> diff --git a/app/views/moduls/_form.html.erb b/app/views/moduls/_form.html.erb index fd67fc1..fb6b68b 100755 --- a/app/views/moduls/_form.html.erb +++ b/app/views/moduls/_form.html.erb @@ -1,7 +1,8 @@ <%= semantic_form_for @modul do |f| %> <%= 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 :desc, :as=>:tinymce_text %> <%= f.input :depend %> diff --git a/app/views/moduls/index.html.erb b/app/views/moduls/index.html.erb index 98ade7d..3b0e973 100755 --- a/app/views/moduls/index.html.erb +++ b/app/views/moduls/index.html.erb @@ -1,10 +1,8 @@ - -

<%= I18n.t("modul.show.title") %>

+<%= render 'layouts/link_all' %> +

<%= I18n.t("modul.list") %>

<%= render :partial=>'moduls/lang', :collection=>@moduls, :as=>:modul%> -
-<% #if !@studium.nil? %> -<%= link_to 'New Modul', new_modul_path() %> -<% #end%> +
+<%= render 'layouts/pretty_toolbar'%> diff --git a/app/views/studien/index.html.erb b/app/views/studien/index.html.erb index c4c242b..cf2ae8b 100755 --- a/app/views/studien/index.html.erb +++ b/app/views/studien/index.html.erb @@ -1,3 +1,4 @@ +<%= render 'layouts/link_all' %>

<%= I18n.t("studien.list") %>

@@ -8,8 +9,6 @@ <% end %> -
-<% link_to I18n.t("studien.new"), new_studium_path %> -<% link_to I18n.t("modulgruppe.show"), modulgruppen_path %> +
<%= render :partial=>'layouts/pretty_toolbar'%> <% #toolbar_html(@toolbar_elements) %> diff --git a/app/views/studien/show.html.erb b/app/views/studien/show.html.erb index 20632c0..64f3c32 100644 --- a/app/views/studien/show.html.erb +++ b/app/views/studien/show.html.erb @@ -16,6 +16,6 @@ <% end %> <% end %> - <%= render 'layouts/pretty_toolbar'%>
- <%= render 'layouts/pretty_toolbar', :pretty_toolbar=>@toolbar_modulgruppen %> + <%= render 'layouts/pretty_toolbar' %>
+ <%= render :partial=>'layouts/pretty_toolbar', :object=>@toolbar_modulgruppen %> diff --git a/config/locales/de.yml b/config/locales/de.yml index 44b6fc0..84fa7a6 100755 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -15,13 +15,13 @@ de: edit: "Studium bearbeiten" modul: edit: "Modul bearbeiten" - show: - title: "Auflistung aller Module" - link: "Alle Module auflisten" + list: "Alle Module" + add: "Neues Modul" keine: beschreibung: "Keine Beschreibung vorhanden" lva: add: "Lva hinzufügen" + list: "Alle Lvas" semester: ohne: "Ohne Semesterzuordnung" modulgruppe: