* Add ID and track to the event overview

* Get rid of the timezones in the schedule, need to deal with that on output
* Skip auth token verfiy on schedule updates
* Make it possible to withdraw confirmed submissions
* Show if people are not registerd
This commit is contained in:
Henne Vogelsang 2013-06-14 13:17:40 +02:00 committed by Henne Vogelsang
parent 2b5e40bc96
commit 73013bd3e6
14 changed files with 96 additions and 48 deletions

View file

@ -1,7 +1,9 @@
class Admin::EventsController < ApplicationController
before_filter :verify_organizer
layout "admin"
around_filter :set_timezone_for_this_request
# FIXME: The timezome should only be applied on output, otherwise
# you get lost in timezone conversions...
# around_filter :set_timezone_for_this_request
def set_timezone_for_this_request(&block)
Time.use_zone(@conference.timezone, &block)
@ -9,6 +11,7 @@ class Admin::EventsController < ApplicationController
def index
@events = @conference.events
@tracks = @conference.tracks
respond_to do |format|
format.html
format.json { render :json => Event.where(:state => :confirmed) }
@ -50,7 +53,7 @@ class Admin::EventsController < ApplicationController
if params.has_key? :track_id
@event.update_attribute(:track_id, params[:track_id])
end
redirect_to(admin_conference_event_path(@conference.short_title, @event), :notice => "Updated")
redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event), :notice => "Updated")
end
def create

View file

@ -4,6 +4,16 @@ class Admin::PeopleController < ApplicationController
def index
@people = Person.all
mails = []
@people.each do |p|
if p.registrations.count < 1 and p.confirmed?
mails << p.email
end
end
respond_to do |format|
format.html
format.text { render :text => mails }
end
end
def create

View file

@ -1,5 +1,6 @@
class Admin::ScheduleController < ApplicationController
before_filter :verify_organizer
skip_before_filter :verify_authenticity_token, :only => [:update]
layout "schedule"
def show
@ -39,8 +40,11 @@ class Admin::ScheduleController < ApplicationController
time = "#{params[:date]} #{params[:time]}"
Rails.logger.debug("Loading #{time}")
zone = ActiveSupport::TimeZone::new(@conference.timezone)
startTime = DateTime.strptime(time + zone.formatted_offset, "%Y-%m-%d %k:%M %Z")
# FIXME: Same here as in events_controller.rb. Event timezone should be applied
# only on output
# zone = ActiveSupport::TimeZone::new(@conference.timezone)
# startTime = DateTime.strptime(time + zone.formatted_offset, "%Y-%m-%d %k:%M %Z")
startTime = DateTime.strptime(time, "%Y-%m-%d %k:%M")
event.start_time = startTime
event.save!
render :json => {"status" => "ok"}