mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
- Restructuring the assets
- Worked on the schedule - Removed some gems
This commit is contained in:
parent
a9207671b8
commit
b801f0dc19
123 changed files with 13587 additions and 33123 deletions
|
|
@ -32,5 +32,9 @@ class Admin::ConferenceController < ApplicationController
|
|||
|
||||
def show
|
||||
@conference = Conference.find_all_by_short_title(params[:id]).first
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render :json => @conference.to_json }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -3,11 +3,48 @@ class Admin::ScheduleController < ApplicationController
|
|||
layout "schedule"
|
||||
|
||||
def show
|
||||
if @conference.nil?
|
||||
redirect_to admin_conference_index_path
|
||||
return
|
||||
end
|
||||
@dates = @conference.start_date..@conference.end_date
|
||||
@tracks = @conference.tracks
|
||||
@rooms = @conference.rooms
|
||||
end
|
||||
|
||||
def update
|
||||
event = Event.where(:guid => params[:event]).first
|
||||
error_message = nil
|
||||
if event.nil?
|
||||
error_message = "Could not find event GUID: #{params[:event]}"
|
||||
end
|
||||
|
||||
if params[:date] == "none"
|
||||
event.start_time = nil
|
||||
event.room = nil
|
||||
event.save!
|
||||
render :json => {"status" => "ok"}
|
||||
return
|
||||
end
|
||||
room = Room.where(:guid => params[:room]).first
|
||||
if room.nil?
|
||||
error_message = "Could not find room GUID: #{params[:room]}"
|
||||
end
|
||||
|
||||
if !error_message.nil?
|
||||
render :json => {"status" => "error", "message" => error_message}, :status => 500
|
||||
return
|
||||
end
|
||||
|
||||
event.room = room
|
||||
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")
|
||||
event.start_time = startTime
|
||||
event.save!
|
||||
render :json => {"status" => "ok"}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@ class Admin::TracksController < ApplicationController
|
|||
layout "admin"
|
||||
|
||||
def show
|
||||
render :tracks_list
|
||||
respond_to do |format|
|
||||
format.html { render :tracks_list}
|
||||
format.json { render :json => @conference.tracks.to_json }
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue