Gremien, Memberships Update

This commit is contained in:
Andreas Stephanides
2013-08-25 16:37:59 +02:00
parent ad6e387635
commit 3bd04f9101
9 changed files with 33 additions and 9 deletions

View File

@@ -22,10 +22,10 @@
<div class="row-fluid">
<div class="span1"></div>
<div class="span3"><%= membership.input :start, :as=>:date %></div>
<div class="span3"><%= membership.input :start, :as=>:date %></div>
<div class="span3"><%= membership.input :stop %></div>
<div class="span3"><%= membership. input :gremium %></div>
<div class="span2"><%= membership.input :typ ,:as=>:radio, :collection=>{"mitglied"=>1, "ersatzmitglied"=>2} %></div>
<div class="span2"><%= membership.input :typ ,:as=>:radio, :collection=>Membership::TYPEN.invert %></div>
</div> <% end %>
<% end %>

View File

@@ -24,8 +24,9 @@
<div class="span12">
<ul>
<% @fetprofile.memberships.each do |m| %>
<li><%= m.start.to_s %> bis <%= m.stop.to_s %> in <%= m.gremium.try(:name).to_s %>
<%= link_to 'edit', edit_fetprofile_membership_path(@fetprofile,m) %>
<li>
<%= render m %>
<% link_to 'edit', edit_fetprofile_membership_path(@fetprofile,m) %>
</li>
<% end %>
</ul>

View File

@@ -2,7 +2,9 @@
<%= f.inputs do %>
<%= f.input :name %>
<%= f.input :desc %>
<%= f.input :typ %>
<%= f.input :typ, :as => :select, :collection => Gremium::TYPEN.invert %>
<%= f.input :geschlecht, :as => :select, :collection => Gremium::GESCHLECHT.invert %>
<%= f.input :thema, :as=> :select, :collection => Thema.all %>
<% end %>
<%= f.actions do %>

View File

@@ -12,9 +12,9 @@
<p>
<b>Typ:</b>
<%= @gremium.typ %>
<%= Gremium::TYPEN[@gremium.typ.to_i].to_s %>
</p>
<%= link_to 'Edit', edit_gremium_path(@gremium) %> |
<%= link_to 'Back', gremien_path %>
<%= link_to 'Back', gremien_path %>

View File

@@ -3,7 +3,7 @@
<%= f.input :gremium, :as=>:radio %>
<%= f.input :start %>
<%= f.input :stop %>
<%= f.input :typ ,:as=>:radio, :collection=>{"mitglied"=>1, "ersatzmitglied"=>2} %>
<%= f.input :typ ,:as=>:radio,:collection=>Membership::TYPEN.invert %>
<% end %>
<%= f.actions do %>

View File

@@ -0,0 +1,6 @@
<%= "seit" if membership.stop.nil? %>
<%=membership.start.to_s %>
<%= " bis "+membership.stop.to_s unless membership.stop.nil? %>
<%= Membership::TYPEN[membership.typ.to_i] %>
<%= membership.gremium.fall2 %>