diff --git a/app/assets/stylesheets/formtastic-changes.css.scss b/app/assets/stylesheets/formtastic-changes.css.scss index 5007540..498eb2a 100644 --- a/app/assets/stylesheets/formtastic-changes.css.scss +++ b/app/assets/stylesheets/formtastic-changes.css.scss @@ -5,13 +5,7 @@ form.formtastic textarea { width:90%; height:20em; } -form.formtastic .stringish label { -font-weight: bold; -} -form.formtastic .choice-group label { -font-weight: bold; -} -form.formtastic fieldset div.control-group{} + div.form-group { border-width: 1px; @@ -19,3 +13,8 @@ border-style: dashed; padding: 10px; border-radius: 10px; } +div.verwalten-block { +border-width: 1px; +border-style: solid; +padding: 5px; +} \ No newline at end of file diff --git a/app/controllers/modulgruppen_controller.rb b/app/controllers/modulgruppen_controller.rb index c69f8fe..d84de6f 100755 --- a/app/controllers/modulgruppen_controller.rb +++ b/app/controllers/modulgruppen_controller.rb @@ -51,15 +51,10 @@ class ModulgruppenController < ApplicationController def create @modulgruppe = Modulgruppe.new(params[:modulgruppe]) - if !params[:studium_id].nil? - @studium=Studium.find_by_id(params[:studium_id]) - else - @studium=Studium.find_by_id(params[:modulgruppe][:studium_id]) - end respond_to do |format| if @modulgruppe.save - format.html { redirect_to @studium, notice: 'Modulgruppe was successfully created.' } + format.html { redirect_to @modulgruppe.studium, notice: 'Modulgruppe was successfully created.' } else format.html { render action: "new" } diff --git a/app/views/modulgruppen/_form.html.erb b/app/views/modulgruppen/_form.html.erb index 8191af5..22cc925 100755 --- a/app/views/modulgruppen/_form.html.erb +++ b/app/views/modulgruppen/_form.html.erb @@ -1,13 +1,25 @@ <%= semantic_form_for @modulgruppe do |f| %> <%= f.inputs do %> - <%= f.input :studium_id, :as =>:select, :collection => Studium.all %> - <%= f.input :typ ,:as => :radio, :collection=>["Pflicht","Vertiefungspflicht","Wahl"]%> - <%= f.input :phase,:as => :radio,:collection=>1..3 %> - <%= f.input :name %> - <%= f.input :desc,:input_html=>{:rows=> 3 }%> - <% end %> +
+
+ <%= f.input :name, :wrapper_html=>{:class=>"span12"}%> +
+ <%= f.input :studium_id, :as =>:select, :collection => Studium.all, :wrapper_html=>{:class=>"span4"} %> + <%= f.input :typ, :collection=>["Pflicht","Vertiefungspflicht","Wahl"], :wrapper_html=>{:class=>"span4"}%> + <%= f.input :phase, :as=>:select, :collection=>1..3, :wrapper_html=>{:class=>"span4"} %> +
+
+ + +
+ <%= f.input :desc %> + +
+ <% end %> +
<%= f.actions do %> <%= f.action :submit, :as => :input %> + <% end %> <% end %> diff --git a/app/views/studien/verwalten.html.erb b/app/views/studien/verwalten.html.erb index a834154..279026f 100644 --- a/app/views/studien/verwalten.html.erb +++ b/app/views/studien/verwalten.html.erb @@ -1,8 +1,7 @@
<%= render 'studien/tabs'%>
-
-
+

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

@@ -11,7 +10,7 @@
-
+

Studien <%= link_to "new", new_studium_path %>

<% @studien.each do |s| %> <%= link_to s.name, s %> <%= (s.valid?) ? "Gültig" : "Problemfall" %>
@@ -23,7 +22,7 @@
-
+

Modulgruppen <%= link_to 'new', new_studium_modulgruppe_path(Studium.first) unless Studium.first.nil? %>

<% @modulgruppen.each do |mg| %> <%= link_to mg.name, mg %> | <%= (mg.valid?) ? "Gültig" : "Problemfall" %>
@@ -31,7 +30,7 @@
-
+

Module <%= link_to "new", new_modul_path %>

<% @module.each do |m| %> <%= link_to m.name, m %> @@ -40,7 +39,7 @@
-
+

LVas <%= link_to "new", new_lva_path %>

<% @lvas.each do |lva| %> <%= link_to lva.name, lva %> | @@ -50,7 +49,7 @@
-
+

Beispiele <%= link_to "new", new_beispiel_path %>

<% @beispiele.each do |b| %> <%= link_to b.name, b %> @@ -62,28 +61,23 @@
-
-
-
-

Error Log

+
+

Error Log

+
    +
  • Red: Error, Solve immediately
  • +
  • Black: Warning, should be solved
  • +
  • Green: Everything is fine
  • +
+
    -
  • Red: Error, Solve immediately
  • -
  • Black: Warning, should be solved
  • -
  • Green: Everything is fine
  • -
-
-
    - <% @messages.flatten.each do |m| %>
    -
  • <%= m.html_safe %>
  • - <% end %> -
- <%= I18n.t("verwalten.fehler.keine").html_safe if @messages.empty?%> -
+ <% @messages.flatten.each do |m| %>
+
  • <%= m.html_safe %>
  • + <% end %> + + <%= I18n.t("verwalten.fehler.keine").html_safe if @messages.empty?%>
    - -