diff --git a/app/assets/stylesheets/formtastic-changes.css.scss b/app/assets/stylesheets/formtastic-changes.css.scss
new file mode 100644
index 0000000..192ee43
--- /dev/null
+++ b/app/assets/stylesheets/formtastic-changes.css.scss
@@ -0,0 +1,20 @@
+form.formtastic .stringish input {
+width:90%;
+}
+form.formtastic textarea {
+width:90%;
+height:20em;
+}
+
+
+div.form-group {
+border-width: 1px;
+border-style: none;
+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/beispiele/_form.html.erb b/app/views/beispiele/_form.html.erb
index bf0c027..1e3833c 100755
--- a/app/views/beispiele/_form.html.erb
+++ b/app/views/beispiele/_form.html.erb
@@ -1,13 +1,32 @@
-<%= semantic_form_for @beispiel, :html => { :multipart => true } do |f| %>
- <%= f.inputs do %>
- <%= f.input :name %>
- <%= f.input :desc %>
- <%= f.file_field :beispieldatei %>
- <%= f.hidden_field :beispieldatei_cache %>
- <%= f.input :lva, :as=>:select, :collection => Lva.all%>
- <% end %>
+
+ <%= f.inputs do %>
+
+
+
+
+
+
+
BILD
+ <%= f.input :modul,:label=>'Modul'.html_safe, :as=>:check_boxes%>
+
+
+
+
+
+ <%= f.input :semester, :label=>'Semester'.html_safe, :as=>:check_boxes%>
+
+
+ <% end %>
+ <%= f.actions do %>
+ <%= f.action :submit, :as => :input %>
+ <% end %>
<% end %>
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/moduls/_form.html.erb b/app/views/moduls/_form.html.erb
index fb6b68b..db03f9d 100755
--- a/app/views/moduls/_form.html.erb
+++ b/app/views/moduls/_form.html.erb
@@ -1,15 +1,30 @@
+
+ <%= semantic_form_for @modul do |f| %>
-<%= 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 %>
- <%= f.input :name ,:hint=>true%>
- <%= f.input :desc, :as=>:tinymce_text %>
- <%= f.input :depend %>
+
+
+ <%= f.input :name ,:hint=>true%>
+
+
+ <%= f.input :desc, :as=>:tinymce_text %>
+
+
+ <%= f.input :depend %>
+
+
+
+
+ <%= f.input :modulgruppen,:as => :check_boxes, :collection => Hash[Modulgruppe.all.map{|m| [m.studium.name + " " + m.name,m.id]}.sort] %>
+
+
+
<% end %>
<%= f.actions do %>
- <%= f.action :submit, :as => :input %>
+ <%= f.action :submit, :as => :input %>
<% end %>
-<% end %>
+
+ <% end %>
+
<%= tinymce %>
diff --git a/app/views/studien/_form.html.erb b/app/views/studien/_form.html.erb
index 471a8c3..0973ef5 100755
--- a/app/views/studien/_form.html.erb
+++ b/app/views/studien/_form.html.erb
@@ -1,13 +1,28 @@
+
<%= tinymce_assets %>
-<%= semantic_form_for @studium do |f| %>
+ <%= semantic_form_for @studium do |f| %>
+
<%= f.inputs do %>
- <%= f.input :zahl %>
- <%= f.input :name,:append=>"NAME" %>
+
+
+
+ <%= f.input :name,:append=>"NAME" %>
+
+
+ <%= f.input :zahl %>
+
+
+ <%= f.input :typ, :as=>:select, :include_blank=>false, :collection=>["Bachelor","Master"]%>
+
+
+
<%= f.input :desc, :as=>:tinymce_text %>
- <%= f.input :typ, :as=>:radio, :collection=>["Bachelor","Master"]%>
+
<% end %>
-<%= tinymce %>
+ <%= tinymce %>
<%= f.actions do %>
- <%= f.action :submit, :as => :input %>
+ <%= f.action :submit, :as => :input %>
<% end %>
-<% 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?%>
-
-
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 94ea21c..2e2ca1e 100755
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -91,7 +91,10 @@ de:
stunden:
blank: "Geben Sie die Stunden der LVA an"
lvanr:
- invalid: "Geben Sie eine LVA-Nummer in richtigem Format an. Wenn die LVA noch keine Nummer hat, so geben sie 000 an."
+ invalid: "Geben Sie eine Nummer im Format 000.000 an."
+ blank: "Geben sie eine Lva-Nr an"
+ taken: "Die Lva-Nummer ist bereits vergeben"
+
studium:
attributes:
zahl:
@@ -118,4 +121,7 @@ de:
verwalten:
fehler:
keine: "Keine Fehlermeldungen oder Warnungen"
-
+ support:
+ array:
+ two_words_connector: ', '
+