Merge pull request #247 from gopesht/add_splash_dashboard

Adds Splash Checkbox in Conference Settings
This commit is contained in:
James Mason 2014-06-19 10:08:22 -07:00
commit 47777dbb4c
11 changed files with 55 additions and 16 deletions

View file

@ -72,4 +72,8 @@ class ApplicationController < ActionController::Base
redirect_to root_path, :alert => exception.message
end
helper_method :organizer_or_admin?
def not_found
raise ActionController::RoutingError.new('Not Found')
end
end

View file

@ -1,5 +1,6 @@
class ConferenceController < ApplicationController
def show
@conference = Conference.find_by_short_title(params[:id])
not_found unless @conference.make_conference_public?
end
end

View file

@ -19,7 +19,8 @@ class Conference < ActiveRecord::Base
:lodging_description, :include_registrations_in_splash,
:include_sponsors_in_splash, :include_tracks_in_splash,
:include_tickets_in_splash, :include_social_media_in_splash,
:include_program_in_splash
:include_program_in_splash, :make_conference_public
has_paper_trail
@ -282,6 +283,7 @@ class Conference < ActiveRecord::Base
result['tracks'] = tracks_set?
result['event_types'] = event_types_set?
result['difficulty_levels'] = difficulty_levels_set?
result['make_conference_public'] = make_conference_public?
result['process'] = calculate_setup_progress(result)
result['short_title'] = short_title
result

View file

@ -27,3 +27,6 @@
%li{'class'=>class_for_todo(conference_progress['difficulty_levels'])}
%span{'class'=>icon_for_todo(conference_progress['difficulty_levels'])}
= link_to 'Add difficulty levels', admin_conference_difficulty_levels_path(conference_progress['short_title'])
%li{class: class_for_todo(conference_progress['make_conference_public'])}
%span{'class'=>icon_for_todo(conference_progress['make_conference_public'])}
= link_to 'Make Splash Page Public for Visitors', edit_admin_conference_path(conference_progress['short_title'])

View file

@ -1,6 +1,8 @@
.row
.col-md-8
= semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :make_conference_public, hint: 'This will enable the visitors to view the splash page(the "View Conference" button will be visible now on the home page), it is recommended to enable this after you have finished setting up all the components for display'
= f.input :include_program_in_splash, hint: 'On setting this true you will enable the program component to be displayed on the splash page.This component includes tracks, keynote speakers and the schedule'
= f.input :title, :hint => "The full name of the conference, such as 'OpenSUSE Conference 2013'"
= f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs"

View file

@ -21,7 +21,8 @@
.col-md-2
.btn-group-vertical
- if !@conference || @conference != conference
= link_to "View Conference", conference_path(conference.short_title), :class =>"btn btn-default"
- if conference.make_conference_public?
= link_to "View Conference", conference_path(conference.short_title), :class =>"btn btn-default"
- if conference.registration_open?
- if conference.user_registered?(current_user)
= link_to "Modify Registration", register_conference_path(conference.short_title), :class =>"btn btn-default"
@ -31,4 +32,4 @@
- if !current_user.nil? && current_user.person.proposal_count(conference) > 0
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class =>"btn btn-default"
- elsif conference.cfp_open?
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class =>"btn btn-default"
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class =>"btn btn-default"