Merge 88dcc6a92f into 9f03531708
This commit is contained in:
commit
59ed523e73
6 changed files with 39 additions and 35 deletions
|
|
@ -4,7 +4,7 @@ module Admin
|
||||||
skip_before_filter :verify_authenticity_token, only: [:update]
|
skip_before_filter :verify_authenticity_token, only: [:update]
|
||||||
layout 'schedule'
|
layout 'schedule'
|
||||||
|
|
||||||
def show
|
def edit
|
||||||
if @conference.nil?
|
if @conference.nil?
|
||||||
redirect_to admin_conference_index_path
|
redirect_to admin_conference_index_path
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,17 @@
|
||||||
class ScheduleController < ApplicationController
|
class ScheduleController < ApplicationController
|
||||||
|
layout 'application'
|
||||||
layout "application"
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@conference = Conference.includes(:rooms, {:events => [:speakers, :track, :event_type]}).where("conferences.short_title" => params[:conference_id]).first
|
@conference = Conference.includes(:rooms, events: [:speakers, :track, :event_type]).
|
||||||
|
where('conferences.short_title' => params[:conference_id]).first
|
||||||
@rooms = @conference.rooms
|
@rooms = @conference.rooms
|
||||||
@events = @conference.events
|
@events = @conference.events
|
||||||
@dates = @conference.start_date..@conference.end_date
|
@dates = @conference.start_date..@conference.end_date
|
||||||
|
|
||||||
if @dates === Date.current
|
if @dates === Date.current
|
||||||
@today = Date.current.strftime("%Y-%m-%d")
|
@today = Date.current.strftime('%Y-%m-%d')
|
||||||
else
|
else
|
||||||
@today = @conference.start_date.strftime("%Y-%m-%d")
|
@today = @conference.start_date.strftime('%Y-%m-%d')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
.schedule-content
|
.schedule-content
|
||||||
%h2
|
%h2
|
||||||
= "Schedule for #{@conference.title}"
|
= "Edit schedule for #{@conference.title} or go back to"
|
||||||
|
= link_to 'schedule', conference_schedule_path(@conference.short_title)
|
||||||
#unscheduled.unscheduled
|
#unscheduled.unscheduled
|
||||||
.unscheduled-header
|
.unscheduled-header
|
||||||
Unscheduled Events
|
Unscheduled Events
|
||||||
|
|
@ -32,8 +32,8 @@
|
||||||
= link_to(admin_conference_registrations_path(@conference.short_title)) do
|
= link_to(admin_conference_registrations_path(@conference.short_title)) do
|
||||||
%span.glyphicon.glyphicon-user
|
%span.glyphicon.glyphicon-user
|
||||||
Registrations
|
Registrations
|
||||||
%li{class: active_nav_li(admin_conference_schedule_path(@conference.short_title))}
|
%li{class: active_nav_li(conference_schedule_path(@conference.short_title))}
|
||||||
= link_to(admin_conference_schedule_path(@conference.short_title), target: '_blank') do
|
= link_to(conference_schedule_path(@conference.short_title), target: '_blank') do
|
||||||
%span.glyphicon.glyphicon-calendar
|
%span.glyphicon.glyphicon-calendar
|
||||||
Schedule
|
Schedule
|
||||||
%li{class: active_nav_li(admin_conference_campaigns_path(@conference.short_title))}
|
%li{class: active_nav_li(admin_conference_campaigns_path(@conference.short_title))}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
<div id="schedule-content">
|
<div id="schedule-content">
|
||||||
<h2> Schedule for <%= @conference.title %></h2>
|
<h2> Schedule for <%= @conference.title %>
|
||||||
|
<% if has_role?(current_user, 'Admin')%>
|
||||||
|
<%= link_to "Edit", edit_admin_conference_schedule_path(@conference.short_title), :class => "btn btn-mini btn-primary pull-right"%>
|
||||||
|
<% end %>
|
||||||
|
</h2>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<% @dates.each do |date| %>
|
<% @dates.each do |date| %>
|
||||||
<li <%= "class=active" if @dates.first == date %>>
|
<li <%= "class=active" if @dates.first == date %>>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ Osem::Application.routes.draw do
|
||||||
resources :users
|
resources :users
|
||||||
resources :people
|
resources :people
|
||||||
resources :conference do
|
resources :conference do
|
||||||
resource :schedule, only: [:show, :update]
|
resource :schedule, only: [:edit, :update]
|
||||||
get '/stats' => 'stats#index'
|
get '/stats' => 'stats#index'
|
||||||
get '/venue' => 'venue#show', as: 'venue_info'
|
get '/venue' => 'venue#show', as: 'venue_info'
|
||||||
patch '/venue' => 'venue#update', as: 'venue_update'
|
patch '/venue' => 'venue#update', as: 'venue_update'
|
||||||
|
|
@ -56,7 +56,7 @@ Osem::Application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
patch "/questions/update_conference" => "questions#update_conference"
|
patch '/questions/update_conference' => 'questions#update_conference'
|
||||||
resources :questions
|
resources :questions
|
||||||
|
|
||||||
resources :events do
|
resources :events do
|
||||||
|
|
@ -70,7 +70,7 @@ Osem::Application.routes.draw do
|
||||||
patch :restart
|
patch :restart
|
||||||
get :vote
|
get :vote
|
||||||
end
|
end
|
||||||
resource :speaker, :only => [:edit, :update]
|
resource :speaker, only: [:edit, :update]
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :supporters
|
resources :supporters
|
||||||
|
|
@ -79,12 +79,12 @@ Osem::Application.routes.draw do
|
||||||
|
|
||||||
resources :conference, only: [:show] do
|
resources :conference, only: [:show] do
|
||||||
resources :proposal do
|
resources :proposal do
|
||||||
resources :event_attachment, :controller => "event_attachments"
|
resources :event_attachment, controller: 'event_attachments'
|
||||||
patch '/confirm' => 'proposal#confirm'
|
patch '/confirm' => 'proposal#confirm'
|
||||||
patch '/restart' => 'proposal#restart'
|
patch '/restart' => 'proposal#restart'
|
||||||
end
|
end
|
||||||
resource :schedule, :only => [] do
|
resource :schedule, only: [] do
|
||||||
get "/" => "schedule#index"
|
get '/' => 'schedule#index'
|
||||||
end
|
end
|
||||||
member do
|
member do
|
||||||
get "/register" => "conference_registration#register"
|
get "/register" => "conference_registration#register"
|
||||||
|
|
@ -94,23 +94,23 @@ Osem::Application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
namespace :api, defaults: {format: 'json'} do
|
namespace :api, defaults: { format: 'json' } do
|
||||||
namespace :v1 do
|
namespace :v1 do
|
||||||
resources :conferences, :only => :index do
|
resources :conferences, only: :index do
|
||||||
resources :conferences, :only => :index
|
resources :conferences, only: :index
|
||||||
resources :rooms, :only => :index
|
resources :rooms, only: :index
|
||||||
resources :tracks, :only => :index
|
resources :tracks, only: :index
|
||||||
resources :speakers, :only => :index
|
resources :speakers, only: :index
|
||||||
resources :events, :only => :index
|
resources :events, only: :index
|
||||||
end
|
end
|
||||||
resources :rooms, :only => :index
|
resources :rooms, only: :index
|
||||||
resources :tracks, :only => :index
|
resources :tracks, only: :index
|
||||||
resources :speakers, :only => :index
|
resources :speakers, only: :index
|
||||||
resources :events, :only => :index
|
resources :events, only: :index
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/admin" => redirect("/admin/conference")
|
get '/admin' => redirect('/admin/conference')
|
||||||
|
|
||||||
root to: 'home#index', via: [:get, :options]
|
root to: 'home#index', via: [:get, :options]
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue