File tree Expand file tree Collapse file tree 3 files changed +48
-1
lines changed Expand file tree Collapse file tree 3 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,30 @@ def index
77 end
88
99 def generate
10+ # 50 Teilnehmer insgesamt
11+ # mach 10 Gruppen á 5 Teilnehmer
12+ # mach für jede Gruppe einen DB Eintrag mit name = "Group " + index Zahl
13+
14+ # (Anzahl der Gruppen = Anzahl der Attendees, die attended haben / 6 )
15+ #p application.attended
16+ #
17+ # if @event.applications.attended && @event.applications.language_de
18+ # attendants = @event.applications.attendants
19+
20+ @attendants = @event . applications . application_selected . confirmed
21+ puts ( 'huhuu' )
22+ puts @attendants
23+
24+ # attendants.each do |attendant|
25+ # puts ('huhuuu')
26+ # puts @attendant
27+ # end
28+ puts @event . applications #.attendants
29+ #attended = 'true')
30+ # end
31+ # Gruppennummer zuordnen put application_id in event_group_attendees
32+ #
33+
1034 redirect_to admin_event_groups_path ( @event ) , notice : "Groups successfully generated"
1135 end
1236
Original file line number Diff line number Diff line change 11<% if @event.has_groups? %>
22has Groups
3+
4+ <% @event_groups.each do |event_group| %>
5+ <h2 > <%= event_group . name %> </ h2 >
6+ < table >
7+ < thead >
8+ < tr >
9+ < th > Attendees</ th >
10+ < th > Coaches</ th >
11+ </ tr >
12+ </ thead >
13+ < tbody >
14+ < tr >
15+ < td >
16+ <%= @application . name %>
17+ </ td >
18+ < td >
19+ <%= @coach . name %>
20+ </ td >
21+ </ tr >
22+ </ tbody >
23+ </ table >
24+ <% end %>
25+
326<% else %>
427 <%= button_to "Generate groups" , generate_admin_event_groups_path ( @event ) , method : :post %>
528<% end %>
Original file line number Diff line number Diff line change 5252 t . integer "state" , default : 0 , null : false
5353 t . boolean "lightningtalk_approved" , default : false
5454 t . datetime "contacted_at"
55- t . boolean "first_time_coaching" , default : false
55+ t . boolean "first_time_coaching"
5656 t . boolean "coach_the_coaches" , default : false
5757 t . string "sponsor"
5858 t . index [ "coach_id" ] , name : "index_coach_applications_on_coach_id"
You can’t perform that action at this time.
0 commit comments