diff --git a/app/models/modulgruppe.rb b/app/models/modulgruppe.rb index dc3787b..236811c 100755 --- a/app/models/modulgruppe.rb +++ b/app/models/modulgruppe.rb @@ -13,7 +13,7 @@ # class Modulgruppe < ActiveRecord::Base - attr_accessible :name, :phase, :typ,:desc, :studium_id + attr_accessible :name, :phase, :typ,:desc, :studium_id, :modul_ids belongs_to :studium, :foreign_key => "studium_id" has_and_belongs_to_many :moduls diff --git a/app/views/modulgruppen/_form.html.erb b/app/views/modulgruppen/_form.html.erb index 22cc925..52a558e 100755 --- a/app/views/modulgruppen/_form.html.erb +++ b/app/views/modulgruppen/_form.html.erb @@ -1,25 +1,29 @@ <%= semantic_form_for @modulgruppe do |f| %> - <%= f.inputs do %> -
+<%= f.inputs do %> +
-
- <%= 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 :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.input :desc %> +
- <%= f.actions do %> - <%= f.action :submit, :as => :input %> +
+
+ <%= f.input :moduls, :as=>:check_boxes %> +
<% end %> +<%= f.actions do %> +<%= f.action :submit, :as => :input %> + +<% end %> <% end %>