added conference wide information page and linked to the admin sidebar
This commit is contained in:
parent
710b4d26a4
commit
35afdcead4
5 changed files with 54 additions and 1 deletions
|
|
@ -173,6 +173,12 @@ module Admin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def conference_wide_screen
|
||||||
|
#To display sponsors in the conference wide information page
|
||||||
|
@conference = Conference.find_by(short_title: params[:id])
|
||||||
|
@sponsors = @conference.sponsors
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def conference_params
|
def conference_params
|
||||||
|
|
|
||||||
13
app/views/admin/conference/conference_wide_screen.html.haml
Normal file
13
app/views/admin/conference/conference_wide_screen.html.haml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
.container
|
||||||
|
- if @conference.present?
|
||||||
|
.row
|
||||||
|
.col-md-12.text-center
|
||||||
|
%h2 Upcoming Events
|
||||||
|
.row
|
||||||
|
.col-md-12.text-center
|
||||||
|
%h2 Tweets About Conference
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
- if @sponsors.any?
|
||||||
|
%section#sponsors
|
||||||
|
= render 'conference/sponsors'
|
||||||
|
|
@ -136,3 +136,9 @@
|
||||||
= link_to(admin_conference_roles_path(@conference.short_title)) do
|
= link_to(admin_conference_roles_path(@conference.short_title)) do
|
||||||
%span.fa.fa-group
|
%span.fa.fa-group
|
||||||
Roles
|
Roles
|
||||||
|
|
||||||
|
- if can? :show, @conference
|
||||||
|
%li{:class=> active_nav_li(conference_wide_screen_admin_conference_path(@conference.short_title))}
|
||||||
|
= link_to(conference_wide_screen_admin_conference_path(@conference.short_title)) do
|
||||||
|
%span.fa.fa-expand
|
||||||
|
Conference Wide Information
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ Osem::Application.routes.draw do
|
||||||
end
|
end
|
||||||
resources :comments, only: [:index]
|
resources :comments, only: [:index]
|
||||||
resources :conferences do
|
resources :conferences do
|
||||||
|
member do
|
||||||
|
get :conference_wide_screen
|
||||||
|
end
|
||||||
resource :contact, except: [:index, :new, :create, :show, :destroy]
|
resource :contact, except: [:index, :new, :create, :show, :destroy]
|
||||||
resources :schedules, only: [:index, :create, :show, :update, :destroy]
|
resources :schedules, only: [:index, :create, :show, :update, :destroy]
|
||||||
resources :event_schedules, only: [:create, :update, :destroy]
|
resources :event_schedules, only: [:create, :update, :destroy]
|
||||||
|
|
@ -102,7 +105,7 @@ Osem::Application.routes.draw do
|
||||||
get '/revision_history/:id/revert_attribute' => 'versions#revert_attribute', as: 'revision_history_revert_attribute'
|
get '/revision_history/:id/revert_attribute' => 'versions#revert_attribute', as: 'revision_history_revert_attribute'
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :conferences, only: [:index, :show] do
|
resources :conferences, only: [:index, :show ] do
|
||||||
resource :program, only: [] do
|
resource :program, only: [] do
|
||||||
resources :proposals, except: :destroy do
|
resources :proposals, except: :destroy do
|
||||||
get 'commercials/render_commercial' => 'commercials#render_commercial'
|
get 'commercials/render_commercial' => 'commercials#render_commercial'
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,18 @@ describe Admin::ConferencesController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'GET #conference_wide_screen' do
|
||||||
|
it 'assigns the requested conference to conference' do
|
||||||
|
get :show, id: conference.short_title
|
||||||
|
expect(assigns(:conference)).to eq conference
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'renders the conference_wide_screen page' do
|
||||||
|
get :conference_wide_screen, id: conference.short_title
|
||||||
|
expect(response).to render_template :conference_wide_screen
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe 'GET #index' do
|
describe 'GET #index' do
|
||||||
context 'with more than 0 conferences' do
|
context 'with more than 0 conferences' do
|
||||||
it 'populates an array with conferences' do
|
it 'populates an array with conferences' do
|
||||||
|
|
@ -280,8 +292,21 @@ describe Admin::ConferencesController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'GET #conference_wide_screen' do
|
||||||
|
it 'requires organizer privileges' do
|
||||||
|
get :conference_wide_screen, id: conference.short_title,
|
||||||
|
conference: attributes_for(:conference,
|
||||||
|
short_title: 'ExCon')
|
||||||
|
expect(response).to redirect_to(send(path))
|
||||||
|
if message
|
||||||
|
expect(flash[:alert]).to match(/#{message}/)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
describe 'participant access' do
|
describe 'participant access' do
|
||||||
before(:each) do
|
before(:each) do
|
||||||
sign_in(participant)
|
sign_in(participant)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue