mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-18 14:11:10 +00:00
Volunteers, positions and days and volunteers list for admin, volunteering option for attendees
This commit is contained in:
parent
125d5fe3ff
commit
64b2b8b3f8
31 changed files with 335 additions and 79 deletions
23
app/controllers/admin/volunteers_controller.rb
Normal file
23
app/controllers/admin/volunteers_controller.rb
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
class Admin::VolunteersController < ApplicationController
|
||||
def index
|
||||
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||
render :index
|
||||
end
|
||||
|
||||
def show
|
||||
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||
@volunteers = @conference.registrations.joins(:vchoices).all
|
||||
end
|
||||
|
||||
def update
|
||||
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||
# @conference.update_attributes(params[:conference])
|
||||
# redirect_to admin_conference_volunteers_path(@conference.short_title)
|
||||
begin
|
||||
@conference.update_attributes!(params[:conference])
|
||||
redirect_to(admin_conference_volunteer_options_path(:conference_id => params[:conference_id]), :notice => "Volunteering options were successfully updated.")
|
||||
rescue Exception => e
|
||||
redirect_to(admin_conference_volunteer_options_path(:conference_id => params[:conference_id]), :alert => "Volunteering options update failed: #{e.message}")
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue