- Restructuring the assets

- Worked on the schedule
- Removed some gems
This commit is contained in:
Matt Barringer 2013-01-11 15:00:54 +01:00
parent a9207671b8
commit b801f0dc19
123 changed files with 13587 additions and 33123 deletions

View file

@ -1,19 +1,34 @@
class Admin::EventsController < ApplicationController
before_filter :verify_organizer
layout "admin"
around_filter :set_timezone_for_this_request
def set_timezone_for_this_request(&block)
Time.use_zone(@conference.timezone, &block)
end
def index
@events = @conference.events
respond_to do |format|
format.html
format.json { render :json => Event.where(:state => :confirmed) }
end
end
def show
@event = @conference.events.find(params[:id])
@tracks = Track.all
@comments = @event.root_comments
@comment_count = @event.comment_threads.count
end
def edit
@event = @conference.events.find(params[:id])
@event_types = @conference.event_types
@tracks = Track.all
@comments = @event.root_comments
@comment_count = @event.comment_threads.count
@event = Event.find_by_id(params[:id])
@person = @event.submitter
@url = edit_admin_conference_event_path(@conference.short_title, @event)
@ -27,8 +42,17 @@ class Admin::EventsController < ApplicationController
comment.move_to_child_of(params[:parent])
end
redirect_to admin_conference_event_path(:conference_id => @conference.short_title, :id => params[:id])
redirect_to admin_conference_event_path(:conference_id => @conference.short_title)
end
def update
@event = Event.find(params[:id])
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")
end
def create
end