Implement consistent admin interface

* Consistent route/model/controller/view layout
* Get rid of unused photos, speakers, dietchoices, social_events controllers
* Drop unused :public from Rooms and :description from CallForPapers
This commit is contained in:
Henne Vogelsang 2014-11-25 10:47:18 +01:00
parent f6a87331be
commit 28063129c7
133 changed files with 1461 additions and 1461 deletions

View file

@ -3,7 +3,8 @@ $(function () {
$('.datatable').DataTable({ $('.datatable').DataTable({
// ajax: ..., // ajax: ...,
autoWidth: false, autoWidth: false,
pagingType: 'full_numbers' pagingType: 'full_numbers',
"lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]]
}); });
}); });
}); });

View file

@ -0,0 +1,60 @@
module Admin
class CallForPapersController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title
load_and_authorize_resource through: :conference, singleton: true
def show; end
def new
@call_for_paper = @conference.build_call_for_paper
end
def edit; end
def create
@call_for_paper = @conference.build_call_for_paper(call_for_paper_params)
if @call_for_paper.save
redirect_to admin_conference_call_for_paper_path,
notice: 'Call for papers successfully created.'
else
flash[:alert] = "Creating the call for papers failed. #{@call_for_paper.errors.full_messages.join('. ')}."
render :new
end
end
def update
authorize! :update, @conference.call_for_paper
@cfp = @conference.call_for_paper
@cfp.assign_attributes(params[:call_for_paper])
send_mail_on_schedule_public = @cfp.notify_on_schedule_public?
send_mail_on_cfp_dates_updates = @cfp.notify_on_cfp_date_update?
if @cfp.update_attributes(params[:call_for_paper])
Mailbot.delay.send_on_call_for_papers_dates_updates(@conference) if send_mail_on_cfp_dates_updates
Mailbot.delay.send_on_schedule_public(@conference) if send_mail_on_schedule_public
redirect_to(admin_conference_call_for_paper_path(@conference.short_title),
notice: 'Call for papers successfully updated.')
else
flash[:alert] = "Updating call for papers failed. #{@cfp.errors.to_a.join('. ')}."
render :new
end
end
def destroy
if @call_for_paper.destroy
redirect_to admin_conference_call_for_paper_path, notice: 'Call for Papers was successfully deleted.'
else
redirect_to admin_conference_call_for_paper_path, alert: 'A error prohibited this Call for Papers from being destroyed: '\
"#{@call_for_paper.errors.full_messages.join('. ')}."
end
end
private
def call_for_paper_params
params[:call_for_paper]
end
end
end

View file

@ -1,51 +0,0 @@
module Admin
class CallforpapersController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title
# load_and_authorize_resource :cfp, class: 'CallForPapers', through: :conference
def show
authorize! :show, CallForPapers.new(conference_id: @conference.id)
@cfp = @conference.call_for_papers
if @cfp.nil?
@cfp = CallForPapers.new
end
end
def update
authorize! :update, @conference.call_for_papers
@cfp = @conference.call_for_papers
@cfp.assign_attributes(params[:call_for_papers])
send_mail_on_schedule_public = @cfp.notify_on_schedule_public?
send_mail_on_cfp_dates_updates = @cfp.notify_on_cfp_date_update?
if @cfp.update_attributes(params[:call_for_papers])
Mailbot.delay.send_on_call_for_papers_dates_updates(@conference) if send_mail_on_cfp_dates_updates
Mailbot.delay.send_on_schedule_public(@conference) if send_mail_on_schedule_public
redirect_to(admin_conference_callforpapers_path(
id: @conference.short_title),
notice: 'Call for Papers was successfully updated.')
else
redirect_to(admin_conference_callforpapers_path(
id: @conference.short_title),
alert: "Updating call for papers failed. #{@cfp.errors.to_a.join('. ')}.")
end
end
def create
authorize! :update, CallForPapers.new(conference_id: @conference.id)
@cfp = CallForPapers.new(params[:call_for_papers])
if @cfp.valid?
@cfp.save
@conference.call_for_papers = @cfp
redirect_to(admin_conference_callforpapers_path(
id: @conference.short_title),
notice: 'Call for Papers was successfully created.')
else
redirect_to(admin_conference_callforpapers_path(
id: @conference.short_title),
alert: "Creating the call for papers failed. #{@cfp.errors.to_a.join('. ')}.")
end
end
end
end

View file

@ -1,19 +0,0 @@
module Admin
class DietchoicesController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title
load_and_authorize_resource :dietary_choice, through: :conference
def show
render :diets_list
end
def update
begin
@conference.update_attributes!(params[:conference])
redirect_to(admin_conference_dietary_list_path(conference_id: @conference.short_title), notice: 'Dietary choices were successfully updated.')
rescue => e
redirect_to(admin_conference_dietary_list_path(conference_id: @conference.short_title), alert: "Dietary choices update failed: #{e.message}")
end
end
end
end

View file

@ -1,32 +1,55 @@
module Admin module Admin
class DifficultyLevelsController < Admin::BaseController class DifficultyLevelsController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title load_and_authorize_resource :conference, find_by: :short_title
authorize_resource through: :conference load_and_authorize_resource :difficulty_level, through: :conference
def index def index
authorize! :index, DifficultyLevel.new(conference_id: @conference.id) authorize! :index, DifficultyLevel.new(conference_id: @conference.id)
end end
def edit; end
def new
@difficulty_level = @conference.difficulty_levels.new
end
def create
@difficulty_level = @conference.difficulty_levels.new(difficulty_level_params)
if @difficulty_level.save
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title),
notice: 'Difficulty level successfully created.')
else
flash[:error] = "Creating difficulty level failed: #{@difficulty_level.errors.full_messages.join('. ')}."
render :new
end
end
def update def update
if @conference.update_attributes(params[:conference]) if @difficulty_level.update_attributes(difficulty_level_params)
if !(@conference.difficulty_levels.count > 0) && @conference.use_difficulty_levels == true redirect_to(admin_conference_difficulty_levels_path(
begin conference_id: @conference.short_title),
@conference.use_difficulty_levels = false notice: 'Difficulty level successfully updated.')
@conference.save!
flash[:error] = 'You cannot enable the usage of difficulty levels without having set any levels.'
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title))
rescue ActiveRecord::RecordInvalid
flash[:error] = 'Something went wrong. Difficulty Levels update failed.'
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title))
end
else else
flash[:notice] = 'Difficulty Levels were successfully updated.' flash[:error] = "Update difficulty level failed: #{@difficulty_level.errors.full_messages.join('. ')}."
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title)) render :edit
end end
end
def destroy
if @difficulty_level.destroy
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title),
notice: 'Difficulty level successfully deleted.')
else else
flash[:error] = 'Difficulty Levels update failed.' redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title),
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title)) error: 'Deleting difficulty level type failed! ' \
end "#{@difficulty_level.errors.full_messages.join('. ')}.")
end
end
private
def difficulty_level_params
params[:difficulty_level]
end end
end end
end end

View file

@ -1,25 +1,55 @@
module Admin module Admin
class EventTypesController < Admin::BaseController class EventTypesController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title load_and_authorize_resource :conference, find_by: :short_title
authorize_resource :event_type, through: :conference load_and_authorize_resource :event_type, through: :conference
def index def index
authorize! :index, EventType.new(conference_id: @conference.id) authorize! :index, EventType.new(conference_id: @conference.id)
end end
def show def edit; end
render :eventtypes
def new
@event_type = @conference.event_types.new
end
def create
@event_type = @conference.event_types.new(event_type_params)
if @event_type.save
redirect_to(admin_conference_event_types_path(conference_id: @conference.short_title),
notice: 'Event type successfully created.')
else
flash[:error] = "Creating event type failed: #{@event_type.errors.full_messages.join('. ')}."
render :new
end
end end
def update def update
@conference.update_attributes!(params[:conference]) if @event_type.update_attributes(event_type_params)
redirect_to(admin_conference_event_types_path( redirect_to(admin_conference_event_types_path(
conference_id: @conference.short_title), conference_id: @conference.short_title),
notice: 'Event types were successfully updated.') notice: 'Event type successfully updated.')
rescue => e else
redirect_to(admin_conference_event_types_path( flash[:error] = "Update event type failed: #{@event_type.errors.full_messages.join('. ')}."
conference_id: @conference.short_title), render :edit
alert: "Event types update failed: #{e.message}") end
end
def destroy
if @event_type.destroy
redirect_to(admin_conference_event_types_path(conference_id: @conference.short_title),
notice: 'Event type successfully deleted.')
else
redirect_to(admin_conference_event_types_path(conference_id: @conference.short_title),
error: 'Destroying event type failed! ' \
"#{@event_type.errors.full_messages.join('. ')}.")
end
end
private
def event_type_params
params[:event_type]
end end
end end
end end

View file

@ -6,8 +6,6 @@ module Admin
def index def index
end end
def show; end
def new def new
@lodging = @conference.lodgings.new @lodging = @conference.lodgings.new
end end
@ -27,7 +25,7 @@ module Admin
def update def update
if @lodging.update_attributes(lodging_params) if @lodging.update_attributes(lodging_params)
redirect_to(admin_conference_lodging_path(conference_id: @conference.short_title, id: @lodging.id), redirect_to(admin_conference_lodgings_path(conference_id: @conference.short_title),
notice: 'Lodging successfully updated.') notice: 'Lodging successfully updated.')
else else
flash[:error] = "Update Lodging failed: #{@lodging.errors.full_messages.join('. ')}." flash[:error] = "Update Lodging failed: #{@lodging.errors.full_messages.join('. ')}."

View file

@ -1,53 +0,0 @@
module Admin
class PhotosController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title
load_and_authorize_resource through: :conference
# GET /admin/photos
def index
@photos = @conference.photos.all
end
# GET /admin/photos/new
def new
@photo = @conference.photos.build
end
# GET /admin/photos/1/edit
def edit; end
# POST /admin/photos
def create
@photo = @conference.photos.build(photo_params)
if @photo.save
redirect_to admin_conference_photos_path, notice: 'Photo was successfully created.'
else
flash[:alert] = "A error prohibited this Photo from being saved: #{@photo.errors.full_messages.join('. ')}."
render :new
end
end
# PATCH/PUT /admin/photos/1
def update
if @photo.update(photo_params)
redirect_to admin_conference_photos_path, notice: 'Photo was successfully updated.'
else
flash[:alert] = "A error prohibited this Photo from being saved: #{@photo.errors.full_messages.join('. ')}."
render :edit
end
end
# DELETE /admin/photos/1
def destroy
@photo.destroy
redirect_to admin_conference_photos_path, notice: 'Photo was successfully destroyed.'
end
private
# Only allow a trusted parameter "white list" through.
def photo_params
params[:photo]
end
end
end

View file

@ -11,18 +11,6 @@ module Admin
@attended = @conference.registrations.where('attended = ?', true).count @attended = @conference.registrations.where('attended = ?', true).count
end end
def toogle_attended
@registration.attended = !@registration.attended
if @registration.save
flash[:notice] = "Successfully updated Attended for #{@user.email}"
redirect_to admin_conference_registrations_path(@conference.short_title)
else
flash[:notice] = "Update Attended for #{@user.email} failed!" \
"#{@registration.errors.full_messages.join('. ')}"
redirect_to admin_conference_registrations_path(@conference.short_title)
end
end
def edit; end def edit; end
def update def update
@ -48,6 +36,30 @@ module Admin
end end
end end
def present
@registration.attended = true
if @registration.save
flash[:notice] = "#{@user.email} has attended"
redirect_to admin_conference_registrations_path(@conference.short_title)
else
flash[:notice] = "Update Attended for #{@user.email} failed!" \
"#{@registration.errors.full_messages.join('. ')}"
redirect_to admin_conference_registrations_path(@conference.short_title)
end
end
def absent
@registration.attended = false
if @registration.save
flash[:notice] = "#{@user.email} has not attended"
redirect_to admin_conference_registrations_path(@conference.short_title)
else
flash[:notice] = "Update Attended for #{@user.email} failed!" \
"#{@registration.errors.full_messages.join('. ')}"
redirect_to admin_conference_registrations_path(@conference.short_title)
end
end
protected protected
def set_user def set_user

View file

@ -1,18 +0,0 @@
module Admin
class SocialEventsController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title
authorize_resource :social_event, through: :conference
def show
render :social_events_list
end
def update
if @conference.update_attributes(params[:conference])
redirect_to(admin_conference_social_events_path(conference_id: @conference.short_title), notice: 'Social events were successfully updated.')
else
redirect_to(admin_conference_social_events_path(conference_id: @conference.short_title), notice: 'Social events update failed.')
end
end
end
end

View file

@ -1,21 +0,0 @@
module Admin
class SpeakersController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title
load_and_authorize_resource :event
respond_to :js, :html
def edit
authorize! :update, @conference.events.new
@speaker = @event.event_users.where(event_role: 'speaker').first
end
def update
authorize! :update, @conference.events.new
@speaker = @event.event_users.where(event_role: 'speaker').first
@speaker.user_id = params[:speaker][:user_id]
@speaker.save
respond_with @speaker, location: admin_conference_events_path(@conference.short_title)
end
end
end

View file

@ -1,22 +1,55 @@
module Admin module Admin
class SponsorsController < Admin::BaseController class SponsorsController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title load_and_authorize_resource :conference, find_by: :short_title
authorize_resource :sponsor, through: :conference load_and_authorize_resource :sponsor, through: :conference
def index def index
authorize! :index, Sponsor.new(conference_id: @conference.id) authorize! :index, Sponsor.new(conference_id: @conference.id)
end end
def update def edit; end
if @conference.update_attributes(params[:conference])
redirect_to(admin_conference_sponsors_path( def new
conference_id: @conference.short_title), @sponsor = @conference.sponsors.new
notice: 'Sponsorships were successfully updated.') end
def create
@sponsor = @conference.sponsors.new(sponsor_params)
if @sponsor.save
redirect_to(admin_conference_sponsors_path(conference_id: @conference.short_title),
notice: 'Sponsor successfully created.')
else else
flash[:error] = "Creating sponsor failed: #{@sponsor.errors.full_messages.join('. ')}."
render :new
end
end
def update
if @sponsor.update_attributes(sponsor_params)
redirect_to(admin_conference_sponsors_path( redirect_to(admin_conference_sponsors_path(
conference_id: @conference.short_title), conference_id: @conference.short_title),
alert: 'Sponsorships update failed.') notice: 'Sponsor successfully updated.')
end else
flash[:error] = "Update sponsor failed: #{@sponsor.errors.full_messages.join('. ')}."
render :edit
end
end
def destroy
if @sponsor.destroy
redirect_to(admin_conference_sponsors_path(conference_id: @conference.short_title),
notice: 'Sponsor successfully deleted.')
else
redirect_to(admin_conference_sponsors_path(conference_id: @conference.short_title),
error: 'Deleting sponsor failed! ' \
"#{@sponsor.errors.full_messages.join('. ')}.")
end
end
private
def sponsor_params
params[:sponsor]
end end
end end
end end

View file

@ -1,25 +1,54 @@
module Admin module Admin
class TargetsController < Admin::BaseController class TargetsController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title load_and_authorize_resource :conference, find_by: :short_title
authorize_resource through: :conference load_and_authorize_resource :target, through: :conference
def index def index
authorize! :index, Target.new(conference_id: @conference.id) authorize! :update, Target.new(conference_id: @conference.id)
end end
def new
@target = @conference.targets.new
end
def create
@target = @conference.targets.new(target_params)
if @target.save(target_params)
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
notice: 'Target successfully created.')
else
flash[:alert] = "Creating target failed: #{@target.errors.full_messages.join('. ')}."
render :new
end
end
def edit; end
def update def update
authorize! :update, @conference => Target if @target.update_attributes(target_params)
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
if @conference.update_attributes(params[:conference]) notice: 'Target successfully updated.')
redirect_to(admin_conference_targets_path(
conference_id: @conference.short_title),
notice: 'Targets were successfully updated.')
else else
redirect_to(admin_conference_targets_path( flash[:alert] = "Target update failed: #{@target.errors.full_messages.join('. ')}."
conference_id: @conference.short_title), render :edit
alert: 'Targets update failed: ' \ end
"#{@conference.errors.full_messages.join('. ')}") end
end
def destroy
if @target.destroy
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
notice: 'Target successfully destroyed.')
else
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
alert: 'Target was successfully destroyed.' \
"#{@target.errors.full_messages.join('. ')}.")
end
end
private
def target_params
params[:target]
end end
end end
end end

View file

@ -1,29 +1,59 @@
module Admin module Admin
class TracksController < Admin::BaseController class TracksController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title load_and_authorize_resource :conference, find_by: :short_title
authorize_resource through: :conference load_and_authorize_resource :track, through: :conference
def index def index; end
authorize! :index, Track.new(conference_id: @conference.id)
end
def show def show
respond_to do |format| respond_to do |format|
format.html { render :tracks_list } format.html { render }
format.json { render json: @conference.tracks.to_json } format.json { render json: @conference.tracks.to_json }
end end
end end
def update def new
if @conference.update_attributes(params[:conference]) @track = @conference.tracks.new
redirect_to(admin_conference_tracks_path( end
conference_id: @conference.short_title),
notice: 'Tracks were successfully updated.') def create
@track = @conference.tracks.new(track_params)
if @track.save
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
notice: 'Track successfully created.')
else else
redirect_to(admin_conference_tracks_path( flash[:alert] = "Creating Track failed: #{@track.errors.full_messages.join('. ')}."
conference_id: @conference.short_title), render :new
notice: 'Tracks update failed.') end
end end
def edit; end
def update
if @track.update_attributes(track_params)
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
notice: 'Track successfully updated.')
else
flash[:alert] = "Track update failed: #{@track.errors.full_messages.join('. ')}."
render :edit
end
end
def destroy
if @track.destroy
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
notice: 'Track successfully deleted.')
else
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
alert: 'Track couldn\'t be deleted.' \
"#{@track.errors.full_messages.join('. ')}.")
end
end
private
def track_params
params[:track]
end end
end end
end end

View file

@ -78,16 +78,12 @@ class Ability
# the user can also vote # the user can also vote
can :manage, Event, conference_id: conf_ids_for_organizer + conf_ids_for_cfp can :manage, Event, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
can :create, Event can :create, Event
can :manage, CallForPapers, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
can :manage, EventType, conference_id: conf_ids_for_organizer + conf_ids_for_cfp can :manage, EventType, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
can :manage, Track, conference_id: conf_ids_for_organizer + conf_ids_for_cfp can :manage, Track, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
can :manage, DifficultyLevel, conference_id: conf_ids_for_organizer + conf_ids_for_cfp can :manage, DifficultyLevel, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
can :manage, EmailSettings, conference_id: conf_ids_for_organizer + conf_ids_for_cfp can :manage, EmailSettings, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
can :manage, Campaign, conference_id: conf_ids_for_organizer can :manage, Campaign, conference_id: conf_ids_for_organizer
can :manage, Venue, conference_id: conf_ids_for_organizer
can :index, Venue, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
can :manage, Lodging, conference_id: conf_ids_for_organizer can :manage, Lodging, conference_id: conf_ids_for_organizer
can :manage, Photo, conference_id: conf_ids_for_organizer
can :manage, Room, conference_id: conf_ids_for_organizer + conf_ids_for_cfp can :manage, Room, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
can :manage, Sponsor, conference_id: conf_ids_for_organizer can :manage, Sponsor, conference_id: conf_ids_for_organizer
can :manage, SponsorshipLevel, conference_id: conf_ids_for_organizer can :manage, SponsorshipLevel, conference_id: conf_ids_for_organizer
@ -99,14 +95,16 @@ class Ability
can :manage, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(conference_id: conf_ids_for_organizer + conf_ids_for_cfp).pluck(:id) can :manage, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(conference_id: conf_ids_for_organizer + conf_ids_for_cfp).pluck(:id)
can :manage, Contact, conference_id: conf_ids_for_organizer can :manage, Contact, conference_id: conf_ids_for_organizer
can :manage, Campaign, conference_id: conf_ids_for_organizer can :manage, Campaign, conference_id: conf_ids_for_organizer
can :manage, Photo, conference_id: conf_ids_for_organizer
can :manage, RegistrationPeriod, conference_id: conf_ids_for_organizer can :manage, RegistrationPeriod, conference_id: conf_ids_for_organizer
can :manage, Splashpage, conference_id: conf_ids_for_organizer can :manage, Splashpage, conference_id: conf_ids_for_organizer
can :manage, CallForPaper, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
can :manage, Venue, conference_id: conf_ids_for_organizer
can :index, Venue, conference_id: conf_ids_for_organizer + conf_ids_for_cfp
end end
def guest def guest
## Abilities for everyone, even guests (not logged in users) ## Abilities for everyone, even guests (not logged in users)
can [:index, :show, :gallery_photos], Conference do |conference| can [:index, :show], Conference do |conference|
conference.splashpage && conference.splashpage.public == true conference.splashpage && conference.splashpage.public == true
end end

View file

@ -1,8 +1,8 @@
class CallForPapers < ActiveRecord::Base class CallForPaper < ActiveRecord::Base
attr_accessible :start_date, :end_date,
:description, :schedule_changes, :rating,
:schedule_public, :include_cfp_in_splash, :conference_id
belongs_to :conference belongs_to :conference
attr_accessible :start_date, :end_date,
:schedule_changes, :rating,
:schedule_public, :include_cfp_in_splash, :conference_id
validates_presence_of :start_date, :end_date validates_presence_of :start_date, :end_date
validates :rating, numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: 10 } validates :rating, numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: 10 }

View file

@ -28,7 +28,7 @@ class Conference < ActiveRecord::Base
has_one :contact, dependent: :destroy has_one :contact, dependent: :destroy
has_one :registration_period, dependent: :destroy has_one :registration_period, dependent: :destroy
has_one :email_settings, dependent: :destroy has_one :email_settings, dependent: :destroy
has_one :call_for_papers, dependent: :destroy has_one :call_for_paper, dependent: :destroy
has_one :venue, dependent: :destroy has_one :venue, dependent: :destroy
has_many :social_events, dependent: :destroy has_many :social_events, dependent: :destroy
has_many :ticket_purchases has_many :ticket_purchases
@ -161,7 +161,7 @@ class Conference < ActiveRecord::Base
# * +true+ -> If today is in the CFP period. # * +true+ -> If today is in the CFP period.
def cfp_open? def cfp_open?
today = Date.current today = Date.current
cfp = self.call_for_papers cfp = self.call_for_paper
if !cfp.nil? && (cfp.start_date.. cfp.end_date).cover?(today) if !cfp.nil? && (cfp.start_date.. cfp.end_date).cover?(today)
return true return true
end end
@ -177,10 +177,10 @@ class Conference < ActiveRecord::Base
def get_submissions_per_week def get_submissions_per_week
result = [] result = []
if call_for_papers && events if call_for_paper && events
submissions = events.group(:week).count submissions = events.group(:week).count
start_week = call_for_papers.start_week start_week = call_for_paper.start_week
weeks = call_for_papers.weeks weeks = call_for_paper.weeks
result = calculate_items_per_week(start_week, weeks, submissions) result = calculate_items_per_week(start_week, weeks, submissions)
end end
result result
@ -194,10 +194,10 @@ class Conference < ActiveRecord::Base
# * +Array+ -> e.g. 'Submitted' => [0, 3, 3, 5] -> first week 0 events, second week 3 events. # * +Array+ -> e.g. 'Submitted' => [0, 3, 3, 5] -> first week 0 events, second week 3 events.
def get_submissions_data def get_submissions_data
result = {} result = {}
if call_for_papers && events if call_for_paper && events
result = get_events_per_week_by_state result = get_events_per_week_by_state
start_week = call_for_papers.start_week start_week = call_for_paper.start_week
end_week = end_date.strftime('%W').to_i end_week = end_date.strftime('%W').to_i
weeks = weeks(start_week, end_week) weeks = weeks(start_week, end_week)
@ -260,8 +260,8 @@ class Conference < ActiveRecord::Base
# * +Integer+ -> weeks # * +Integer+ -> weeks
def cfp_weeks def cfp_weeks
result = 0 result = 0
if call_for_papers if call_for_paper
result = call_for_papers.weeks result = call_for_paper.weeks
end end
result result
end end
@ -743,7 +743,7 @@ class Conference < ActiveRecord::Base
# * +True+ -> If conference has a cfp object. # * +True+ -> If conference has a cfp object.
# * +False+ -> If conference has no cfp object. # * +False+ -> If conference has no cfp object.
def cfp_set? def cfp_set?
!!call_for_papers !!call_for_paper
end end
## ##

View file

@ -1,5 +1,5 @@
class Room < ActiveRecord::Base class Room < ActiveRecord::Base
attr_accessible :name, :size, :public, :conference_id attr_accessible :name, :size, :conference_id
belongs_to :conference belongs_to :conference
has_many :events has_many :events
@ -10,8 +10,6 @@ class Room < ActiveRecord::Base
validates :size, numericality: { only_integer: true, greater_than: 0 }, allow_nil: true validates :size, numericality: { only_integer: true, greater_than: 0 }, allow_nil: true
validates :size, presence: true, if: :public?
private private
def generate_guid def generate_guid

View file

@ -1,7 +1,7 @@
class Track < ActiveRecord::Base class Track < ActiveRecord::Base
attr_accessible :name, :description, :color, :conference_id attr_accessible :name, :description, :color, :conference_id
belongs_to :conference belongs_to :conference
has_many :events
before_create :generate_guid before_create :generate_guid

View file

@ -0,0 +1,15 @@
.row
.col-md-12
.page-header
%h1 Call for Papers
.row
.col-md-8
= semantic_form_for(@call_for_paper, :url => admin_conference_call_for_paper_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.input :include_cfp_in_splash, label: "Show Call for Papers on the splash page"
= f.input :schedule_public, label: "Show Schedule on the home and splash page"
= f.input :schedule_changes, label: "Allow submitters to change their event after it is scheduled"
= f.input :rating, :hint => "Enter the number of different rating levels you want to have for voting on proposals. Enter 0 if you do not want to vote on proposals."
%p.text-right
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -0,0 +1,66 @@
.row
.col-md-12
.page-header
%h1 Call for Papers
%p.text-muted
Call for people to submit events to your conference
- if @call_for_paper
.row
.col-md-8
%dl.dl-horizontal
%dt
Start Date:
%dd#start_date
= @call_for_paper.start_date.strftime('%A, %B %-d. %Y')
%dt
Start Date:
%dd#end_date
= @call_for_paper.end_date.strftime('%A, %B %-d. %Y')
%dt
Days Left:
%dd
- days = (@call_for_paper.end_date - Date.today).to_i
= pluralize(days, 'days')
%dt
Event types:
%dd
= event_types(@conference)
%dt
Tracks:
%dd
= tracks(@conference)
%dt
Public
%dd#cfp_in_splash
- if @call_for_paper.include_cfp_in_splash
True
- else
False
%dt
Public Schedule
%dd#schedule_public
- if @call_for_paper.schedule_public
Yes
- else
No
%dt
Schedule changeable?
%dd#schedule_changes
- if @call_for_paper.schedule_changes
Yes
- else
No
%dt
Rating Levels
%dd#rating
= @call_for_paper.rating
.row
.col-md-12.text-right
= link_to(edit_admin_conference_call_for_paper_path(@conference.short_title), class: 'btn btn-primary') do
Edit
= link_to(admin_conference_call_for_paper_path(@conference.short_title), method: 'delete', class: 'btn btn-danger') do
Delete
-else
.row
.col-md-12.text-right
= link_to 'Create Call for Papers', new_admin_conference_call_for_paper_path(@conference.short_title), class: 'btn btn-primary'

View file

@ -1,11 +0,0 @@
.row
.col-md-8
= semantic_form_for(@cfp, :url => admin_conference_callforpapers_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :include_cfp_in_splash, label: 'Include Call for Papers in Splash', hint: 'On setting this true you will enable the call for papers to be displayed on the splash page'
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.input :description, hint: markdown_hint("Welcome text for the Call for Papers."), input_html: { data: { provide: "markdown-editable" } }
= f.input :schedule_changes
= f.input :schedule_public
= f.input :rating, :hint => "Enter the number of different rating levels you want to have for voting on proposals. Enter 0 if you do not want to vote on proposals."
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,12 +1,24 @@
.row
.col-md-12
.page-header
%h1
-if @campaign.new_record?
New
Campaign
= @campaign.name
.row
.col-md-8
= semantic_form_for(@campaign, :url => (@campaign.new_record? ? admin_conference_campaigns_path : admin_conference_campaign_path(@conference.short_title, @campaign))) do |f|
= f.inputs do = f.inputs do
= f.input :name = f.input :name
= f.inputs name: 'UTM Parameters' do = f.inputs name: 'UTM Parameters' do
= f.input :utm_campaign, label: 'Campaign', hint: 'Groups all of the content form one campaign. E.g. 20percentpromocode' = f.input :utm_campaign, label: 'Campaign', hint: 'Groups all of the content from one campaign. E.g. 20percentpromocode'
= f.input :utm_source, label: 'Source', hint: 'Which website is sending you traffic. E.g. Facebook, google+, blog' = f.input :utm_source, label: 'Source', hint: 'Which website is sending you traffic. E.g. Facebook, google+, blog'
= f.input :utm_medium, label: 'Medium', hint: 'The type of marketing medium that the link is featured in. E.g. Facebook wallpost or facebook advertisement' = f.input :utm_medium, label: 'Medium', hint: 'The type of marketing medium that the link is featured in. E.g. Facebook wallpost or facebook advertisement'
= f.input :utm_term, label: 'Term', hint: 'Campaign keywords. E.g. marketing+conference+opensource' = f.input :utm_term, label: 'Term', hint: 'Campaign keywords. E.g. marketing+conference+opensource'
= f.input :utm_content, label: 'Content', hint: 'Used to track the different types of content that point to the same URL (A/B Test).' = f.input :utm_content, label: 'Content', hint: 'Used to track the different types of content that point to the same URL (A/B Test).'
= f.inputs name: 'Targets' do = f.inputs name: 'Targets' do
= f.input :targets = f.input :targets
= f.actions do %p.text-right
= f.action :submit, button_html: { class: 'btn btn-primary' } = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,2 +0,0 @@
= semantic_form_for(@campaign, url: admin_conference_campaign_path(@conference.short_title, @campaign)) do |f|
= render partial: 'form', locals: {f: f}

View file

@ -1,41 +1,42 @@
%h1
Campaigns
.row .row
.col-md-12 .col-md-12
.table-responsive .page-header
%table.table %h1 Campaigns
%p.text-muted
Track where people come from
.row
.col-md-12
%table.table.table-hover#campaigns
%thead %thead
%tr %tr
%th #
%th Name %th Name
%th Visits %th Visits
%th Registrations %th Registrations
%th Submissions %th Submissions
%th Link %th Link
%th Edit %th Actions
%th Delete
%tbody %tbody
- @campaigns.each_with_index do |campaign, index| - @campaigns.each do |campaign|
%tr %tr
%td %td{'id'=> "name_#{campaign.id}"}
= index + 1
%td{'id'=> "name_#{index}"}
= campaign.name = campaign.name
%td{'id'=> "visits_#{index}"} %td{'id'=> "visits_#{campaign.id}"}
= campaign.visits_count = campaign.visits_count
%td{'id'=> "registrations_#{index}"} %td{'id'=> "registrations_#{campaign.id}"}
= campaign.registrations_count = campaign.registrations_count
%td{'id'=> "submissions_#{ + index}"} %td{'id'=> "submissions_#{campaign.id}"}
= campaign.submissions_count = campaign.submissions_count
%td %td
%a.copyLink{'href'=> '#', 'data-url'=>root_path + campaign.url_parameters} %a.copyLink{'href'=> '#', 'data-url'=>root_path + campaign.url_parameters}
Copy link Copy link
%td %td
.btn-group
= link_to 'Edit', = link_to 'Edit',
edit_admin_conference_campaign_path(@conference.short_title, campaign.id) edit_admin_conference_campaign_path(@conference.short_title, campaign.id),
%td class: 'btn btn-primary'
= link_to 'Delete', = link_to 'Delete',
admin_conference_campaign_path(@conference.short_title, campaign.id), method: :delete admin_conference_campaign_path(@conference.short_title, campaign.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the campaign #{campaign.name}?" }
.row .row
.col-md-12 .col-md-12
%b= link_to 'New Campaign', new_admin_conference_campaign_path, class: 'btn btn-success' = link_to 'New Campaign', new_admin_conference_campaign_path, class: 'btn btn-success pull-right'

View file

@ -1,2 +0,0 @@
= semantic_form_for(@campaign, url: admin_conference_campaigns_path(@conference.short_title)) do |f|
= render partial: 'form', locals: {f: f}

View file

@ -1,3 +1,13 @@
.row
.col-md-12
.page-header
%h1
-if @commercial.new_record?
New
Commercial
.row
.col-md-8
= semantic_form_for(@commercial, :url => (@commercial.new_record? ? admin_conference_commercials_path : admin_conference_commercial_path(@conference.short_title, @commercial))) do |f|
= f.input :commercial_type, as: :select, label: 'Conference Promo Media Type', class: 'form-control', collection: CONFIG['commercial_types'].values, include_blank: false, hint: 'This media-item will be used to represent this conference at various places in OSEM.' = f.input :commercial_type, as: :select, label: 'Conference Promo Media Type', class: 'form-control', collection: CONFIG['commercial_types'].values, include_blank: false, hint: 'This media-item will be used to represent this conference at various places in OSEM.'
= f.input :commercial_id, label: 'Conference Promo Media ID', as: :string = f.input :commercial_id, label: 'Conference Promo Media ID', as: :string
%p{ class: 'help-block media-type', id: 'youtube-help' } Go to your YouTube video, click on "share" and copy everything behind http://youtu.be/" %p{ class: 'help-block media-type', id: 'youtube-help' } Go to your YouTube video, click on "share" and copy everything behind http://youtu.be/"
@ -6,4 +16,5 @@
%p{ class: 'help-block media-type', id: 'vimeo-help', style: 'display:none' } Go to your vimeo video, click on "share" and copy everything behind http://vimeo.com/ %p{ class: 'help-block media-type', id: 'vimeo-help', style: 'display:none' } Go to your vimeo video, click on "share" and copy everything behind http://vimeo.com/
%p{ class: 'help-block media-type', id: 'speakerdeck-help', style: 'display:none' } Go to your SpeakerDeck, click on "share" -> "embed" and copy the data-id %p{ class: 'help-block media-type', id: 'speakerdeck-help', style: 'display:none' } Go to your SpeakerDeck, click on "share" -> "embed" and copy the data-id
%p{ class: 'help-block media-type', id: 'instagram-help', style: 'display:none' } Go to your Instagram photo page and copy everything behind instagram.com/p/ (without trailing /# hash symbol) %p{ class: 'help-block media-type', id: 'instagram-help', style: 'display:none' } Go to your Instagram photo page and copy everything behind instagram.com/p/ (without trailing /# hash symbol)
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,8 +0,0 @@
%h1 Editing Commercial
.row
.col-md-8
= semantic_form_for @commercial, url: admin_conference_commercial_path(conference_id: @conference.short_title, id: @commercial.id) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_commercials_path

View file

@ -1,10 +1,11 @@
.row
.col-md-12
.page-header
%h1 Commercials %h1 Commercials
%p.text-muted %p.text-muted
You can add commercials for your conference. These commercials will be displayed on the event detail site if Conference commercials will be displayed on the events in the
the event submitter doesn't add a commercial. Currently supported commercial types are YouTube, Vimeo, Instagram = link_to "schedule,", conference_schedule_path(@conference.short_title)
Flickr, Speakerdeck and SlideShare. if the event speaker didn't add an event commercial.
- @commercials.each_slice(3) do |slice| - @commercials.each_slice(3) do |slice|
.row .row
- slice.each do |commercial| - slice.each do |commercial|
@ -14,11 +15,13 @@
= commercial.commercial_type = commercial.commercial_type
.flexvideo .flexvideo
= render partial: 'shared/media_item', locals: { commercial_type: commercial.commercial_type, commercial_id: commercial.commercial_id } = render partial: 'shared/media_item', locals: { commercial_type: commercial.commercial_type, commercial_id: commercial.commercial_id }
.caption
- if can? :update, commercial - if can? :update, commercial
= link_to 'Edit', edit_admin_conference_commercial_path(@conference.short_title, commercial.id), class: 'btn btn-primary' = link_to 'Edit', edit_admin_conference_commercial_path(@conference.short_title, commercial.id), class: 'btn btn-primary'
- if can? :destroy, commercial - if can? :destroy, commercial
= link_to 'Delete', admin_conference_commercial_path(@conference.short_title, commercial.id), = link_to 'Delete', admin_conference_commercial_path(@conference.short_title, commercial.id),
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
.row
.col-md-12.text-right
- if can? :create, @conference.commercials.new - if can? :create, @conference.commercials.new
%br = link_to 'Add Commercial', new_admin_conference_commercial_path, class: 'btn btn-primary'
= link_to 'New Commercial', new_admin_conference_commercial_path, class: 'btn btn-primary'

View file

@ -1,7 +0,0 @@
%h1 New Commercial
.row
.col-md-8
= semantic_form_for @commercial, url: admin_conference_commercials_path(conference_id: @conference.short_title) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_commercials_path

View file

@ -1,15 +0,0 @@
.row
.col-md-8
= semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :title, :hint => "The full title of the conference, e.g. 'openSUSE Conference 2014'"
= f.input :short_title, :hint => "A short title, e.g. 'oSC14', to be used in URLs"
= f.input :description, hint: markdown_hint('A description of the conference.'), input_html: { rows: 5, data: { provide: 'markdown-editable' } }
= f.input :color, :hint => "The color will be used eg for the dashboard.", :input_html => {:size => 6, :type => "color"}
- if !@conference.logo.blank?
= image_tag @conference.logo(:thumb)
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
= f.inputs :name => "Scheduling" do
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,42 +0,0 @@
.row{'style'=>'padding-top: 15px;'}
.col-md-6
%dl.dl-horizontal
%dt
Title
%dd
= @conference.title
%dt
Short Title
%dd
= @conference.short_title
%dt
Description
%dd
- unless @conference.description.blank?
= markdown(@conference.description)
%dt
Date
%dd
= @date_string
%dt
Color
%dd
%div.text-center{'style'=>"width: 25px; height: 25px; background: #{@conference.color};"}
.row.row-flex.row-flex-wrap
.col-md-4
.thumbnail.flex-col
%h3.text-center
Conference Logo
- if @conference.logo?
= image_tag(@conference.logo(:large), class: 'img-responsive')
.caption.flex-grow
.caption
%p
%dl.dl-horizontal
%dt
Filename
%dd
= @conference.logo_file_name
-else
%h4.text-center
Not set!

View file

@ -17,8 +17,8 @@
Set up registration period Set up registration period
%li{'class'=>class_for_todo(conference_progress['cfp'])} %li{'class'=>class_for_todo(conference_progress['cfp'])}
%span{'class'=>icon_for_todo(conference_progress['cfp'])} %span{'class'=>icon_for_todo(conference_progress['cfp'])}
- if can? :update, CallForPapers.new(conference_id: @conference.id) - if can? :update, CallForPaper.new(conference_id: @conference.id)
= link_to 'Set up call for papers', admin_conference_callforpapers_path(conference_progress['short_title']) = link_to 'Set up call for papers', admin_conference_call_for_paper_path(conference_progress['short_title'])
- else - else
Set up call for papers Set up call for papers
%li{'class'=>class_for_todo(conference_progress['venue'])} %li{'class'=>class_for_todo(conference_progress['venue'])}

View file

@ -1,17 +1,22 @@
.row .row
.col-md-12 .col-md-12
%ul.nav.nav-tabs{'role'=>'tablist'} .page-header
%li.active %h1 Basics
%a{'href'=> '#show', 'role'=>'tab', 'data-toggle'=>'tab'} %p.text-muted
Show The most basic settings of your conference
%li
%a{'href'=> '#edit', 'role'=>'tab', 'data-toggle'=>'tab'}
Edit
%br
.row .row
.col-md-12 .col-md-8
.tab-content = semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f|
.tab-pane.active#show = f.input :title, :hint => "The full title of the conference, e.g. 'openSUSE Conference 2014'"
= render partial: 'edit_show' = f.input :short_title, :hint => "A short title, e.g. 'oSC14', to be used in URLs"
.tab-pane#edit = f.input :description, hint: markdown_hint('A description of the conference.'), input_html: { rows: 5, data: { provide: 'markdown-editable' } }
= render partial: 'edit_form' = f.input :color, :hint => "The color will be used eg for the dashboard.", :input_html => {:size => 6, :type => "color"}
- if !@conference.logo.blank?
= image_tag @conference.logo(:thumb)
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
= f.inputs :name => "Scheduling" do
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,13 +0,0 @@
.row
.col-md-8
= semantic_form_for(@contact, :url => admin_conference_contact_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.inputs :name => 'Contact' do
= f.input :email, hint: 'Contact email address for your conference. Will be used as reply-to address in emails sent out by the system.'
= f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers'
= f.inputs :name => 'Social Media' do
= f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
= f.input :facebook, hint: 'This will appear in the social media section as link to the Facebook page of your Conference'
= f.input :googleplus, label: 'Google+ Url', hint: 'This will appear in the social media section as the link to the Google+ Page of your Conference'
= f.input :twitter, hint: 'This will appear in the social media section as the link to the Twitter Page of your Conference'
= f.input :instagram, hint: 'This will appear in the social media section as the link to the Instagram Page of your Conference'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,36 +0,0 @@
%ul.list-unstyled
- unless @contact.email.blank?
%li
= link_to "#{ @contact.email }" do
%i.fa.fa-envelope.fa-3x
= @contact.email
- unless @contact.sponsor_email.blank?
%li
= link_to "#{ @contact.sponsor_email }" do
%i.fa.fa-money.fa-3x
= @contact.sponsor_email
- unless @contact.social_tag.blank?
%li
= link_to "#{ @contact.social_tag }" do
%i.fa.fa-thumbs-o-up.fa-3x
= "##{@contact.social_tag}"
- unless @contact.facebook.blank?
%li
= link_to "#{ @contact.facebook }" do
%i.fa.fa-facebook-square.fa-3x
= @contact.facebook
- unless @contact.twitter.blank?
%li
= link_to "#{ @contact.twitter }" do
%i.fa.fa-twitter.fa-3x
= @contact.twitter
- unless @contact.instagram.blank?
%li
= link_to "#{ @contact.instagram }" do
%i.fa.fa-instagram.fa-3x
= @contact.instagram
- unless @contact.googleplus.blank?
%li
= link_to "#{ @contact.googleplus }" do
%i.fa.fa-google.fa-3x
= @contact.googleplus

View file

@ -1,16 +1,19 @@
.row .row
.col-md-12 .col-md-12
%ul.nav.nav-tabs{'role'=>'tablist'} .page-header
%li.active %h1 Contact
%a{'href'=> '#show', 'role'=>'tab', 'data-toggle'=>'tab'} %p.text-muted
Show How people can contact you
%li
%a{'href'=> '#edit', 'role'=>'tab', 'data-toggle'=>'tab'}
Edit
.row .row
.col-md-12 .col-md-8
.tab-content = semantic_form_for(@contact, :url => admin_conference_contact_path(@conference.short_title),:html => {:multipart => true}) do |f|
.tab-pane.active#show = f.inputs :name => 'Mail' do
= render partial: 'show' = f.input :email, hint: 'Contact email address for your conference. Will be used as reply-to address in emails sent out by the system.'
.tab-pane#edit = f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers'
= render partial: 'form' = f.inputs :name => 'Social Media' do
= f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
= f.input :facebook, hint: 'This will appear in the social media section as link to the Facebook page of your Conference'
= f.input :googleplus, label: 'Google+ Url', hint: 'This will appear in the social media section as the link to the Google+ Page of your Conference'
= f.input :twitter, hint: 'This will appear in the social media section as the link to the Twitter Page of your Conference'
= f.input :instagram, hint: 'This will appear in the social media section as the link to the Instagram Page of your Conference'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,6 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :title %>
<%= remove_association_link :dietary_choice, f %>
<% end %>
</div>

View file

@ -1,6 +0,0 @@
.row
.col-md-8
= semantic_form_for(@conference, :url => admin_conference_dietary_update_path(@conference.short_title)) do |f|
= f.input :use_dietary_choices, :label => false
= dynamic_association :dietary_choices, "Dietary Choices", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,6 +0,0 @@
.nested-fields
= f.inputs do
= f.input :title, :required => true
= f.input :description, :input_html => {:rows => 3, :class => "span6"}
= f.input :color, :input_html => {:size => 6, :type => "color"}
= remove_association_link :difficulty_level, f

View file

@ -0,0 +1,16 @@
.row
.col-md-12
.page-header
%h1
- if @difficulty_level.new_record?
New
Difficulty Level
= @difficulty_level.title
.row
.col-md-8
= semantic_form_for(@difficulty_level, :url => (@difficulty_level.new_record? ? admin_conference_difficulty_levels_path : admin_conference_difficulty_level_path(@conference.short_title, @difficulty_level))) do |f|
= f.input :title, :required => true
= f.input :description, :input_html => {:rows => 3, :class => "span6"}
= f.input :color, :input_html => {:size => 6, :type => "color"}
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,6 +1,33 @@
.row .row
.col-md-8 .col-md-12
= semantic_form_for @conference, :url => admin_conference_difficulty_level_path(@conference.short_title, @conference.difficulty_levels) do |f| .page-header
= f.input :use_difficulty_levels, :label => false %h1 Difficulty Levels
= dynamic_association :difficulty_levels, "Difficulty_Levels", f %p.text-muted
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} Classify your conference events by difficulty
.row
.col-md-12
%table.table.table-hover#difficulty_levels
%thead
%th Title
%th Description
%th Color
%th Actions
%tbody
- @conference.difficulty_levels.each do |difficulty_level|
%tr
%td
= difficulty_level.title
%td
= difficulty_level.description
%td
%span.label{style: "background-color: #{difficulty_level.color};"}
= difficulty_level.color
%td
.btn-group{role: "group"}
= link_to 'Edit', edit_admin_conference_difficulty_level_path(@conference.short_title, difficulty_level.id),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_difficulty_level_path(@conference.short_title, difficulty_level.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete #{difficulty_level.title}?" }
.row
.col-md-12.text-right
= link_to 'Add Difficulty Level', new_admin_conference_difficulty_level_path(@conference.short_title), class: 'btn btn-primary'

View file

@ -33,22 +33,22 @@
%tr %tr
%td {registrationlink} %td {registrationlink}
%td A link to the registration page %td A link to the registration page
- unless @conference.venue.name.blank? - if @conference.venue
%tr %tr
%td {venue} %td {venue}
%td The name of the venue %td The name of the venue
- unless @conference.venue.address.blank? - if @conference.venue
%tr %tr
%td {venue_address} %td {venue_address}
%td The address of the venue %td The address of the venue
- unless @conference.call_for_papers.blank? || @conference.call_for_papers.start_date.blank? || @conference.call_for_papers.end_date.blank? - unless @conference.call_for_paper.blank? || @conference.call_for_paper.start_date.blank? || @conference.call_for_paper.end_date.blank?
%tr %tr
%td {cfp_start_date} %td {cfp_start_date}
%td The call for papers start date %td The call for papers start date
%tr %tr
%td {cfp_end_date} %td {cfp_end_date}
%td The call for papers end date %td The call for papers end date
-if @conference.call_for_papers.schedule_public -if @conference.call_for_paper.schedule_public
%td {schedule_link} %td {schedule_link}
%td The link to complete schedule of the conference %td The link to complete schedule of the conference
- if @conference.splashpage && @conference.splashpage.public - if @conference.splashpage && @conference.splashpage.public

View file

@ -1,10 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :length, :input_html => {:size => 3} %>
<%= f.input :minimum_abstract_length, :input_html => {:size => 3} %>
<%= f.input :maximum_abstract_length, :input_html => {:size => 3} %>
<%= f.input :color, :input_html => { :size => 6, :type => 'color' } %>
<%= remove_association_link :event_type, f %>
<% end %>
</div>

View file

@ -0,0 +1,18 @@
.row
.col-md-12
.page-header
%h1
- if @event_type.new_record?
New
Event Type
= @event_type.title
.row
.col-md-12
= semantic_form_for(@event_type, :url => (@event_type.new_record? ? admin_conference_event_types_path : admin_conference_event_type_path(@conference.short_title, @event_type))) do |f|
= f.input :title
= f.input :length, :input_html => {:size => 3}
= f.input :minimum_abstract_length, :input_html => {:size => 3}
= f.input :maximum_abstract_length, :input_html => {:size => 3}
= f.input :color, :input_html => { :size => 6, :type => 'color' }
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,5 +1,39 @@
.row .row
.col-md-8 .col-md-12
= semantic_form_for(@conference, url: admin_conference_event_types_path(@conference.short_title, @conference.event_types)) do |f| .page-header
= dynamic_association :event_types, "Event Types", f %h1 Event Types
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} %p.text-muted
The character of events in your conference
.row
.col-md-12
%table.table.table-hover#event_types
%thead
%th Title
%th Length
%th Abstract Length
%th Color
%th Actions
%tbody
- @conference.event_types.each do |event_type|
%tr
%td
= event_type.title
%td
= event_type.length
Minutes
%td
= "#{event_type.minimum_abstract_length}:#{event_type.maximum_abstract_length}"
Words
%td
%span.label{style: "background-color: #{event_type.color};"}
= event_type.color
%td
.btn-group{role: "group"}
= link_to 'Edit', edit_admin_conference_event_type_path(@conference.short_title, event_type.id),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_event_type_path(@conference.short_title, event_type.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete #{event_type.name}?" }
.row
.col-md-12.text-right
= link_to 'Add Event Type', new_admin_conference_event_type_path(@conference.short_title), class: 'btn btn-primary'

View file

@ -1,48 +0,0 @@
.row
.col-md-12
= link_to "Show Events Stats", "#", :id => "events-stats-link", :class => "btn btn-default pull-right"
.clearfix
#events-stats
.span12
%table.table.table-bordered.table-striped
%thead
%th
- @mystates.each do |state|
%th{:colspan => 2, :style => "text-align:center"}
State "#{state.name}"
%th{:colspan => 2, :style => "text-align:center"}
Total
%br
No & Time
%tr
%td
%b Total
- @mystates.each do |mystate|
%td
%b
= @eventstats["#{mystate.name}"]["count"]
%td
%b
#{@eventstats["#{mystate.name}"]["length"] / 60} h #{@eventstats["#{mystate.name}"]["length"] - @eventstats["#{mystate.name}"]["length"] / 60 * 60} m
%td
%b= @events.count
%td
%b= show_time(@eventstats["totallength"])
- @mytypes.each do |mytype|
%tr
%td= "#{mytype.title} (#{show_time(mytype.length)})"
- @mystates.each do |mystate|
%td= @eventstats["#{mytype.title}"]["#{mystate.name}"]["type_state_count"] unless @eventstats["#{mytype.title}"]["#{mystate.name}"] == nil
%td= show_time(@eventstats["#{mytype.title}"]["#{mystate.name}"]["type_state_length"]) unless @eventstats["#{mytype.title}"]["#{mystate.name}"] == nil
%td= @eventstats["#{mytype.title}"]["count"]
%td= show_time(@eventstats["#{mytype.title}"]["length"])
:javascript
$(document).ready( function() {
$("#events-stats").hide();
$("#events-stats-link").click(function() {
$("#events-stats").toggle();
});
});

View file

@ -107,7 +107,7 @@
%b Description %b Description
%td= simple_format(@event.description) %td= simple_format(@event.description)
- if @conference.call_for_papers && @conference.call_for_papers.rating && @conference.call_for_papers.rating > 0 - if @conference.call_for_paper && @conference.call_for_paper.rating && @conference.call_for_paper.rating > 0
= render :partial => "voting" = render :partial => "voting"
.row .row

View file

@ -4,11 +4,11 @@
%b Rating %b Rating
%td %td
- if @event.average_rating.to_f > 0 - if @event.average_rating.to_f > 0
#{@event.average_rating}/#{@conference.call_for_papers.rating} #{@event.average_rating}/#{@conference.call_for_paper.rating}
- else - else
Rating: 0/#{@conference.call_for_papers.rating} Rating: 0/#{@conference.call_for_paper.rating}
- @conference.call_for_papers.rating.times do |counter| - @conference.call_for_paper.rating.times do |counter|
- if @event.average_rating.to_f.round == counter+1 - if @event.average_rating.to_f.round == counter+1
= label_tag "label_rating", "", :class => "avgrating", :avgrate => true = label_tag "label_rating", "", :class => "avgrating", :avgrate => true
= javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');" = javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');"
@ -27,7 +27,7 @@
%td %td
%b Your vote %b Your vote
%td %td
- @conference.call_for_papers.rating.times do |counter| - @conference.call_for_paper.rating.times do |counter|
- voted = @event.voted?(@event, current_user) - voted = @event.voted?(@event, current_user)
- if voted && voted.rating == counter+1 - if voted && voted.rating == counter+1
= link_to "", vote_admin_conference_event_path(@conference.short_title, @event, :rating => counter+1), :remote => true, :id =>"label#{counter+1}", :class => "myrating", :voted => true = link_to "", vote_admin_conference_event_path(@conference.short_title, @event, :rating => counter+1), :remote => true, :id =>"label#{counter+1}", :class => "myrating", :voted => true
@ -42,7 +42,7 @@
%td %td
= rate.name = rate.name
%td %td
- @conference.call_for_papers.rating.times do |counter| - @conference.call_for_paper.rating.times do |counter|
- voted = @event.voted?(@event, rate.user) - voted = @event.voted?(@event, rate.user)
- if voted && voted.rating == counter+1 - if voted && voted.rating == counter+1
= label_tag "label#{counter+1}", "", :class => "othersrating", :voted => true = label_tag "label#{counter+1}", "", :class => "othersrating", :voted => true

View file

@ -1,18 +1,21 @@
= render :partial => "events_stats"
.row .row
.col-md-12 .col-md-12
%h2 .page-header
%h1
Events Events
- if @events - if @events.any?
= "(#{@events.length})" = "(#{@events.length})"
%p.text-muted
All the submissions of your speakers
.row
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable %table.table.table-striped.table-bordered.table-hover.datatable
%thead %thead
%th %th
%b ID %b ID
%th %th
%b Title %b Title
- if @conference.call_for_papers && @conference.call_for_papers.rating && @conference.call_for_papers.rating > 0 - if @conference.call_for_paper && @conference.call_for_paper.rating && @conference.call_for_paper.rating > 0
%th %th
%b Rating %b Rating
%th %th
@ -34,21 +37,21 @@
%td %td
=link_to event.title, admin_conference_event_path(@conference.short_title, event) =link_to event.title, admin_conference_event_path(@conference.short_title, event)
- if @conference.call_for_papers && @conference.call_for_papers.rating && @conference.call_for_papers.rating > 0 - if @conference.call_for_paper && @conference.call_for_paper.rating && @conference.call_for_paper.rating > 0
%td{:style => "width:96px"} %td{:style => "width:96px"}
- if event.average_rating.to_f > 0 - if event.average_rating.to_f > 0
#{event.average_rating}/#{@conference.call_for_papers.rating} #{event.average_rating}/#{@conference.call_for_paper.rating}
%br %br
#{pluralize(event.voters.length, 'voter')} #{pluralize(event.voters.length, 'voter')}
%br %br
- @conference.call_for_papers.rating.times do |counter| - @conference.call_for_paper.rating.times do |counter|
- if event.average_rating.to_f.round == counter+1 - if event.average_rating.to_f.round == counter+1
= label_tag "label_rating", "", :class => "avgrating", :avgrate => true = label_tag "label_rating", "", :class => "avgrating", :avgrate => true
= javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');" = javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');"
- else - else
= label_tag "label_rating", "", :class => "avgrating" = label_tag "label_rating", "", :class => "avgrating"
- else - else
0/#{@conference.call_for_papers.rating} 0/#{@conference.call_for_paper.rating}
%br %br
- if event.submitter && event.submitter.registrations && event.submitter.registrations.count < 1 - if event.submitter && event.submitter.registrations && event.submitter.registrations.count < 1
@ -94,7 +97,7 @@
%li= link_to track.name, admin_conference_event_path(@conference.short_title, event, :track_id => track.id) , %li= link_to track.name, admin_conference_event_path(@conference.short_title, event, :track_id => track.id) ,
:method => :put, :track_id => track.id :method => :put, :track_id => track.id
%td %td
= event.difficulty_level.title if @conference.use_difficulty_levels && event.difficulty_level = event.difficulty_level.title if event.difficulty_level
%td %td
- if event.state == "withdrawn" - if event.state == "withdrawn"
Withdrawn Withdrawn

View file

@ -1,3 +1,13 @@
.row
.col-md-12
.page-header
%h1
- if @lodging.new_record?
New
Lodging
= @lodging.name
.row
.col-md-8
= semantic_form_for(@lodging, :url => (@lodging.new_record? ? admin_conference_lodgings_path : admin_conference_lodging_path(@conference.short_title, @lodging))) do |f| = semantic_form_for(@lodging, :url => (@lodging.new_record? ? admin_conference_lodgings_path : admin_conference_lodging_path(@conference.short_title, @lodging))) do |f|
= f.input :name = f.input :name
= f.input :website_link = f.input :website_link
@ -5,4 +15,5 @@
- unless @lodging.photo.blank? - unless @lodging.photo.blank?
= image_tag @lodging.photo(:thumb) = image_tag @lodging.photo(:thumb)
= f.input :photo = f.input :photo
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,26 +1,35 @@
%h1 Lodgings
- if @conference.lodgings.any?
.row .row
.col-md-12 .col-md-12
%table.table .page-header
%thead %h1 Lodgings
%th # %p.text-muted
%th Name Recommended some Hotels, Motels, Hostels or Campsites around your venue
%th Edit
%th Delete - @conference.lodgings.each_slice(3) do |slice|
%tbody .row
- @conference.lodgings.each_with_index do |lodging, index| - slice.each do |lodging|
%tr .col-md-4
%td .thumbnail
= index + 1 - if lodging.photo.blank?
%td %p.text-center
= link_to lodging.name, admin_conference_lodging_path(@conference.short_title, lodging.id) %i.fa.fa-home.fa-5x
%td - else
= link_to 'Edit', edit_admin_conference_lodging_path(@conference.short_title, lodging.id), -if lodging.website_link.present?
method: :get, class: 'btn btn-primary' = link_to(lodging.website_link, class: 'thumbnail') do
%td = image_tag lodging.photo(:thumb), class: 'img-responsive img-lodging'
= link_to 'Delete', admin_conference_lodging_path(@conference.short_title, lodging.id), - else
= image_tag lodging.photo(:thumb), class: 'img-responsive img-lodging'
.caption
%h3.text-center
= lodging.name
-if lodging.description.present?
= markdown(lodging.description)
.actions.text-right
= link_to 'Edit', edit_admin_conference_lodging_path(@conference.short_title, lodging), class: 'btn btn-primary'
= link_to 'Delete', admin_conference_lodging_path(@conference.short_title, lodging),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the lodging #{lodging.name}?" } method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the lodging #{lodging.name}?" }
= link_to 'Add Lodging', new_admin_conference_lodging_path(@conference.short_title), class: 'btn btn-success'
.row
.col-md-12.text-right
= link_to 'Add Lodging', new_admin_conference_lodging_path(@conference.short_title), class: 'btn btn-primary'

View file

@ -1,16 +0,0 @@
%h1
= @lodging.name
- unless @lodging.photo.blank? || @lodging.description.blank? || @lodging.website_link.blank?
.div.thumbnail
- unless @lodging.photo.blank?
= image_tag @lodging.photo(:large), class: 'img-responsive'
- unless @lodging.description.blank?
.lead.text-center #{ markdown(@lodging.description) }
- unless @lodging.website_link.blank?
.text-center
= link_to 'Go to Website', @lodging.website_link
= link_to 'Edit', edit_admin_conference_lodging_path(@conference.short_title, @lodging.id),
method: :get, class: 'btn btn-primary'
= link_to 'Back', admin_conference_lodgings_path(@conference.short_title)

View file

@ -1,7 +0,0 @@
= f.inputs do
- if !f.object.errors
= image_tag(f.object.picture(:thumb)) unless f.object.picture.blank?
= f.input :picture, hint: 'This photo will appear in the gallery of the splash so please give photos of banner sizes.'
= f.input :description, :input_html => {:rows => 2 }, hint: 'This description will appear at the bottom of each photo.'
.actions
= f.button 'Save Photo', :class => 'btn btn-primary'

View file

@ -1,6 +0,0 @@
%h1 Editing Photo
= semantic_form_for @photo, url: admin_conference_photo_path(conference_id: @conference.short_title, id: @photo.id) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_photos_path

View file

@ -1,22 +0,0 @@
%h1 Photos
%p.text-muted
Photo's will appear in the gallery of the conference splash page.
- @photos.each_slice(3) do |slice|
.row.row-flex.row-flex-wrap
- slice.each do |photo|
.col-md-4
.thumbnail.flex-col
%h3.text-center
= photo.picture_file_name
= image_tag(photo.picture(:large), class: 'img-responsive', title: photo.description)
.caption.flex-grow
.caption
= link_to edit_admin_conference_photo_path(@conference.short_title, photo.id), class: 'btn btn-primary' do
%i.fa.fa-pencil-square-o
Edit
= link_to admin_conference_photo_path(@conference.short_title, photo.id), method: :delete, class: 'btn btn-danger' do
%i.fa.fa-times-circle
Delete
.row{'style'=>'padding-top: 10px;'}
.col-md-12
= link_to 'New Photo', new_admin_conference_photo_path, class: 'btn btn-primary'

View file

@ -1,6 +0,0 @@
%h1 New Photo
= semantic_form_for @photo, url: admin_conference_photos_path(conference_id: @conference.short_title) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_photos_path

View file

@ -1,10 +1,9 @@
%h2 %table.table.table-hover#questions
Questions for #{@conference.short_title} %th Enabled
- if @questions_conference.count %th Question
= "(#{@questions_conference.count})" %th Type
%i The questions will appear in the registration page of the conference %th Answers
%th Actions
%table.table
- @questions.each do |q| - @questions.each do |q|
%tr %tr
%td %td
@ -12,15 +11,16 @@
= check_box_tag "conference[question_ids][]", q.id, = check_box_tag "conference[question_ids][]", q.id,
@conference.question_ids.include?(q.id), id: dom_id(q) @conference.question_ids.include?(q.id), id: dom_id(q)
%td %td
= label_tag dom_id(q), q.title = q.title
%br %td
= label_tag dom_id(q), "Type: #{q.question_type.title}" = q.question_type.title
= ',' %td
= label_tag dom_id(q), "Answers: #{q.answers.map {|a| a.title}.join(', ')}" = q.answers.map {|a| a.title}.join(', ')
%td= link_to 'Edit', edit_admin_conference_question_path(@conference.short_title, q), %td
.btn-group
= link_to 'Edit', edit_admin_conference_question_path(@conference.short_title, q),
class: 'btn btn-primary', disabled: !(can? :update, q) class: 'btn btn-primary', disabled: !(can? :update, q)
= link_to 'Delete', admin_conference_question_path(@conference.short_title, q),
%td= link_to 'Delete', admin_conference_question_path(@conference.short_title, q),
method: :delete, remote: true, class: 'btn btn-danger', method: :delete, remote: true, class: 'btn btn-danger',
confirm: "Delete question '#{q.title}'?", disabled: !(can? :destroy, q) confirm: "Delete question '#{q.title}'?", disabled: !(can? :destroy, q)

View file

@ -1,17 +1,21 @@
.row .row
.col-md-8 .col-md-12
.pull-right .page-header
%h1
Questions
- if can? :create, Question.new(conference_id: @conference.id) - if can? :create, Question.new(conference_id: @conference.id)
%b= link_to 'Create New Question','#', 'data-toggle' => 'modal', = link_to 'Create New Question','#', 'data-toggle' => 'modal',
'data-target' => '#new-question', class: 'btn btn-success' 'data-target' => '#new-question', class: 'btn btn-success pull-right'
%br %p.text-muted
%br People will have to answer your questions during registration to your conference
.row
.col-md-12
- if @questions.count > 0 - if @questions.count > 0
= semantic_form_for(@conference, url: admin_conference_questions_update_conference_path(@conference.short_title)) do |f| = semantic_form_for(@conference, url: update_conference_admin_conference_questions_path(@conference.short_title)) do |f|
.questions{id: 'myquestions'} .questions{id: 'myquestions'}
= render partial: 'questions' = render partial: 'questions'
- if can? :update, @conference - if can? :update, @conference
= f.submit "Update Questions for #{@conference.short_title}", class: 'btn btn-primary', = f.submit "Save Questions", class: 'btn btn-primary pull-right',
confirm: 'Are you sure you want to make these changes?' confirm: 'Are you sure you want to make these changes?'
.modal.fade{id: 'new-question', 'role' => 'dialog', 'aria-hidden' => 'true'} .modal.fade{id: 'new-question', 'role' => 'dialog', 'aria-hidden' => 'true'}

View file

@ -1,7 +1,11 @@
.row
.col-md-12
.page-header
%h1 Registration Period %h1 Registration Period
.row .row
.col-md-8 .col-md-8
= semantic_form_for(@registration_period, url: admin_conference_registration_period_path(@conference.short_title)) do |f| = semantic_form_for(@registration_period, url: admin_conference_registration_period_path(@conference.short_title)) do |f|
= f.input :start_date, as: :string, input_html: { id: 'registration-period-start-datepicker', readonly: 'readonly' } = f.input :start_date, as: :string, input_html: { id: 'registration-period-start-datepicker', readonly: 'readonly' }
= f.input :end_date, as: :string, input_html: { id: 'registration-period-end-datepicker', readonly: 'readonly' } = f.input :end_date, as: :string, input_html: { id: 'registration-period-end-datepicker', readonly: 'readonly' }
%p.text-right
= f.submit 'Save Registration Period', class: 'btn btn-primary' = f.submit 'Save Registration Period', class: 'btn btn-primary'

View file

@ -1,7 +1,12 @@
.row
.col-md-12
.page-header
%h1 Registration Period %h1 Registration Period
%p.text-muted
The stretch of time where people can register to your conference
- if @registration_period - if @registration_period
.row .row
.col-md-6 .col-md-8
%dl.dl-horizontal %dl.dl-horizontal
%dt %dt
Start Date Start Date
@ -11,7 +16,9 @@
End Date End Date
%dd %dd
= @registration_period.end_date = @registration_period.end_date
.row
.col-md-12.text-right
- if @registration_period
- if can? :update, @registration_period - if can? :update, @registration_period
= link_to 'Edit', edit_admin_conference_registration_period_path, class: 'btn btn-primary' = link_to 'Edit', edit_admin_conference_registration_period_path, class: 'btn btn-primary'
- if can? :destroy, @registration_period - if can? :destroy, @registration_period

View file

@ -1,8 +1,8 @@
.row .row
.col-md-12 .col-md-12
%h3 .page-header
Edit registration of #{@user.name} (#{@user.email}) for #{@conference.title} %h1
%br Edit registration of #{@user.username} for #{@conference.short_title}
.row .row
.col-md-8 .col-md-8
= semantic_form_for(@registration, :url => admin_conference_registration_path(@conference.short_title, @registration)) do |f| = semantic_form_for(@registration, :url => admin_conference_registration_path(@conference.short_title, @registration)) do |f|

View file

@ -1,32 +1,31 @@
.row .row
.col-md-12 .col-md-12
.page-header .page-header
%h2 %h1
Registrations Registrations
- if @registrations = "(#{@registrations.length})" if @registrations
= "(#{@registrations.length})"
= " - Attended (#{@attended})"
.btn-group.pull-right .btn-group.pull-right
- if can? :read, Registration - if can? :read, Registration
= link_to "Export PDF", admin_conference_registrations_path(@conference.short_title, :format => :pdf), :class => "btn btn-default" = link_to "Export PDF", admin_conference_registrations_path(@conference.short_title, :format => :pdf), :class => "btn btn-default"
= link_to "Export XLS", {:format => :xlsx}, :class => "btn btn-default" = link_to "Export XLS", {:format => :xlsx}, :class => "btn btn-default"
%table.table.table-bordered.table-striped.table-hover#registrations-datatable %p.text-muted
All the people who registered to your event
%table.table.table-hover.datatable#registrations
%thead %thead
%tr %tr
%th # %th ID#
%th Name %th Name
%th E-Mail %th E-Mail
%th Arrival %th Arrival
%th Departure %th Departure
%th Attended - if @conference.questions.any?
%th Questions %th Questions
%th Edit %th Actions
%th Delete
%tbody %tbody
- @registrations.each_with_index do |registration, index| - @registrations.each_with_index do |registration, index|
%tr %tr
%td %td
= index + 1 = registration.id
%td %td
= registration.name = registration.name
%td %td
@ -41,15 +40,30 @@
= registration.departure.strftime("%d %b %H:%M") = registration.departure.strftime("%d %b %H:%M")
- else - else
n/a n/a
%td -if @conference.questions.any?
= link_to "#{registration.attended}", admin_conference_registrations_toogle_attended_path(@conference.short_title, id: registration.id),
method: :patch, class: 'btn btn-success'
%td %td
= link_to 'Questions','#', class: 'btn btn-success question-btn', 'data-id' => index, 'data-name' => registration.name = link_to 'Questions','#', class: 'btn btn-success question-btn', 'data-id' => index, 'data-name' => registration.name
%td %td
.btn-group
.btn-group
- if registration.attended
- btnclass = 'btn-success'
- else
- btnclass = 'btn-warning'
%button{type: "button", class: "btn #{btnclass} dropdown-toggle", "data-toggle" => "dropdown", "aria-expanded" => "false"}
- if registration.attended
Present
- else
Absent
%span.caret
%ul.dropdown-menu{role: "menu"}
%li
= link_to "Present", present_admin_conference_registration_path(@conference.short_title, id: registration.id),
method: :patch
= link_to "Absent" , absent_admin_conference_registration_path(@conference.short_title, id: registration.id),
method: :patch
= link_to 'Edit', edit_admin_conference_registration_path(@conference.short_title, id: registration), = link_to 'Edit', edit_admin_conference_registration_path(@conference.short_title, id: registration),
method: :get, class: 'btn btn-primary' method: :get, class: 'btn btn-primary'
%td
= link_to 'Delete', admin_conference_registration_path(@conference.short_title, registration), = link_to 'Delete', admin_conference_registration_path(@conference.short_title, registration),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the Registration for #{registration.name}?" } method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the Registration for #{registration.name}?" }
- @registrations.each_with_index do |registration, index| - @registrations.each_with_index do |registration, index|

View file

@ -1,4 +1,15 @@
.row
.col-md-12
.page-header
%h1
- if @room.new_record?
New
Room
= @room.name
.row
.col-md-8
= semantic_form_for(@room, :url => (@room.new_record? ? admin_conference_rooms_path : admin_conference_room_path(@conference.short_title, @room))) do |f|
= f.input :name = f.input :name
= f.input :size, :input_html => {:size => 5} = f.input :size, :input_html => {:size => 5}
= f.input :public, :as => :boolean %p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,8 +0,0 @@
%h1 Editing Room
.row
.col-md-8
= semantic_form_for @room, url: admin_conference_room_path(conference_id: @conference.short_title, id: @room.id) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_rooms_path

View file

@ -1,32 +1,30 @@
.row
.col-md-12
.page-header
%h1 Rooms %h1 Rooms
%p.text-muted
The rooms of your conference venue
- if @conference.rooms.any? - if @conference.rooms.any?
.row .row
.col-md-12 .col-md-12
%table.table#rooms %table.table.table-hover#rooms
%thead %thead
%th #
%th Name %th Name
%th Size %th Size
%th Public %th Actions
%th Edit
%th Delete
%tbody %tbody
- @conference.rooms.each_with_index do |room, index| - @conference.rooms.each_with_index do |room, index|
%tr %tr
%td
= index + 1
%td %td
= room.name = room.name
%td %td
= room.size = room.size
%td
= room.public
%td %td
= link_to 'Edit', edit_admin_conference_room_path(@conference.short_title, room.id), = link_to 'Edit', edit_admin_conference_room_path(@conference.short_title, room.id),
method: :get, class: 'btn btn-primary' method: :get, class: 'btn btn-primary'
%td
= link_to 'Delete', admin_conference_room_path(@conference.short_title, room.id), = link_to 'Delete', admin_conference_room_path(@conference.short_title, room.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete #{room.name}?" } method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete #{room.name}?" }
.row
= link_to 'New Room', new_admin_conference_room_path(@conference.short_title), class: 'btn btn-success' .col-md-12.text-right
= link_to 'Add Room', new_admin_conference_room_path(@conference.short_title), class: 'btn btn-primary'

View file

@ -1,7 +0,0 @@
%h1 New Room
.row
.col-md-8
= semantic_form_for @room, url: admin_conference_rooms_path(conference_id: @conference.short_title) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_rooms_path

View file

@ -1,8 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :description, :input_html => {:rows => 5} %>
<%= f.date_select :date, as: :string %>
<%= remove_association_link :social_event, f %>
<% end %>
</div>

View file

@ -1,5 +0,0 @@
.row
.col-md-8
= semantic_form_for(@conference, :url => admin_conference_social_event_path(@conference.short_title, @conference.social_events)) do |f|
= dynamic_association :social_events, "Social Events", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,11 +0,0 @@
.modal-header
%button.close{:type => "button", :data => {:dismiss => "modal"}} &times;
%h3
Assign speaker
= semantic_form_for @speaker, :as => :speaker, :url => admin_conference_event_speaker_path(@conference.short_title, @event), :method => :put do |f|
.form-inputs.form-horizontal.modal-body
= f.collection_select(:user_id, User.order(:name), :id, :name)
.modal-footer
= link_to "Close", "#", :data => {:dismiss => "modal"}, :class => 'btn'
= f.button "Assign", :class => 'btn btn-primary'

View file

@ -1,2 +0,0 @@
build_dialog('edit_speaker', '<%= j render :partial => 'form' %>');

View file

@ -1,3 +1,6 @@
.row
.col-md-12
.page-header
%h1 Splashpage %h1 Splashpage
.row .row
.col-md-8 .col-md-8
@ -11,5 +14,7 @@
= f.input :include_lodgings, label: 'Display the lodgings on the splashpage?' = f.input :include_lodgings, label: 'Display the lodgings on the splashpage?'
= f.input :include_sponsors, label: 'Display sponsors on the splashpage?' = f.input :include_sponsors, label: 'Display sponsors on the splashpage?'
= f.input :include_social_media, label: 'Display social media on the splashpage?' = f.input :include_social_media, label: 'Display social media on the splashpage?'
= f.inputs name: 'Access' do
= f.input :public, label: 'Make splash page public?' = f.input :public, label: 'Make splash page public?'
%p.text-right
= f.submit 'Save Splashpage', class: 'btn btn-primary' = f.submit 'Save Splashpage', class: 'btn btn-primary'

View file

@ -1,5 +1,11 @@
.row
.col-md-12
.page-header
%h1 Splashpage %h1 Splashpage
%br %p.text-muted
Build a
= link_to "splash page", conference_path(@conference.short_title)
with all the information for your conference
- if @splashpage - if @splashpage
.row .row
.col-md-8 .col-md-8
@ -53,13 +59,15 @@
Yes Yes
- else - else
No No
.row
%br .col-md-12
- if can? :update, @splashpage - if can? :update, @splashpage
= link_to 'Edit', edit_admin_conference_splashpage_path, class: 'btn btn-primary' = link_to 'Edit', edit_admin_conference_splashpage_path, class: 'btn btn-primary'
- if can? :destroy, @splashpage - if can? :destroy, @splashpage
= link_to 'Delete', admin_conference_splashpage_path, = link_to 'Delete', admin_conference_splashpage_path,
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
- else - else
.row
.col-md-12.text-right
- if can? :create, @conference - if can? :create, @conference
= link_to 'Create Splashpage', new_admin_conference_splashpage_path, class: 'btn btn-primary' = link_to 'Create Splashpage', new_admin_conference_splashpage_path, class: 'btn btn-primary'

View file

@ -0,0 +1,19 @@
.row
.col-md-12
.page-header
-if @sponsor.new_record?
New
%h1
Sponsor
= @sponsor.name
.row
.col-md-8
= semantic_form_for(@sponsor, :url => (@sponsor.new_record? ? admin_conference_sponsors_path : admin_conference_sponsor_path(@conference.short_title, @sponsor))) do |f|
= f.input :name
= f.input :description
= image_tag f.object.logo(:thumb) if !f.object.logo.blank?
= f.input :logo
= f.input :website_url
= f.input :sponsorship_level, collection: @conference.sponsorship_levels
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,11 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :name %>
<%= f.input :description %>
<%= image_tag f.object.logo(:thumb) if !f.object.logo.blank? %>
<%= f.input :logo %>
<%= f.input :website_url %>
<%= f.input :sponsorship_level, collection: @conference.sponsorship_levels %>
<%= remove_association_link :sponsor, f %>
<% end %>
</div>

View file

@ -1,5 +1,39 @@
.row .row
.col-md-8 .col-md-12
= semantic_form_for(@conference, :url => admin_conference_sponsor_path(@conference.short_title, @conference.sponsors)) do |f| .page-header
= dynamic_association :sponsors, "Sponsors", f %h1 Sponsors
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} %p.text-muted
People supporting your conference
- if @conference.sponsors.any?
.row
.col-md-12
%table.table.table-hover#sponsors
%thead
%th Logo
%th Name
%th Description
%th URL
%th Level
%th Actions
%tbody
- @conference.sponsors.each do |sponsor|
%tr
%td
= image_tag(sponsor.logo(:thumb), width: '20%')
%td
= sponsor.name
%td
= truncate(sponsor.description)
%td
= sponsor.website_url
%td
= sponsor.sponsorship_level.title
%td
.btn-group
= link_to 'Edit', edit_admin_conference_sponsor_path(@conference.short_title, sponsor),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_sponsor_path(@conference.short_title, sponsor),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the sponsor #{sponsor.name}?" }
.row
.col-md-12
= link_to 'Add Sponsor', new_admin_conference_sponsor_path(@conference.short_title), class: 'btn btn-primary pull-right'

View file

@ -1,2 +1,14 @@
.row
.col-md-12
.page-header
%h1
- if @sponsorship_level.new_record?
New
Sponsorship Level
= @sponsorship_level.title
.row
.col-md-8
= semantic_form_for(@sponsorship_level, :url => (@sponsorship_level.new_record? ? admin_conference_sponsorship_levels_path : admin_conference_sponsorship_level_path(@conference.short_title, @sponsorship_level))) do |f|
= f.input :title = f.input :title
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,8 +0,0 @@
%h1 Editing Sponsorship Level
.row
.col-md-8
= semantic_form_for @sponsorship_level, url: admin_conference_sponsorship_level_path(conference_id: @conference.short_title, id: @sponsorship_level.id) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_sponsorship_levels_path

View file

@ -1,9 +1,13 @@
.row
.col-md-12
.page-header
%h1 Sponsorship Levels %h1 Sponsorship Levels
%p.text-muted
Classify your sponsors
- if @conference.sponsorship_levels.any? - if @conference.sponsorship_levels.any?
.row .row
.col-md-12 .col-md-12
%table.table#sponsorship_levels %table.table.table-hover#sponsorship_levels
%thead %thead
%th Title %th Title
%th Position %th Position
@ -25,5 +29,6 @@
method: :get, class: 'btn btn-primary' method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_sponsorship_level_path(@conference.short_title, sponsorship_level.id), = link_to 'Delete', admin_conference_sponsorship_level_path(@conference.short_title, sponsorship_level.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the sponsorship level #{sponsorship_level.title}?" } method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the sponsorship level #{sponsorship_level.title}?" }
.row
= link_to 'New Sponsorship Level', new_admin_conference_sponsorship_level_path(@conference.short_title), class: 'btn btn-success' .col-md-12
= link_to 'New Sponsorship Level', new_admin_conference_sponsorship_level_path(@conference.short_title), class: 'btn btn-success pull-right'

View file

@ -1,7 +0,0 @@
%h1 New Sponsorship Level
.row
.col-md-8
= semantic_form_for @sponsorship_level, url: admin_conference_sponsorship_levels_path(conference_id: @conference.short_title) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_sponsorship_levels_path

View file

@ -1,37 +0,0 @@
#new-supporter-dialog
= semantic_form_for :supporter_registration, :html => {:id => "supporter-add-form"} do |f|
= f.input :name, :label => "Supporter Name"
= f.input :email, :label => "Supporter Email"
= f.input :supporter_level_id, :as => :select, :collection => @conference.supporter_levels
= f.input :code, :label => "Confirmation code"
= f.input :code_is_valid, :as => :boolean, :label => false
= f.action :submit, :button_html => { :value => "Save", :class => "btn btn-primary" }
.row
.col-md-12
.pull-right{:style=>"margin-top:20px; margin-bottom:20px;"}
= link_to "New Supporter", "#", :id => "new-supporter-button", :class => "btn btn-success"
.row
.col-md-12
%h2 Supporters
.well
%table.table.table-striped#supporters
%thead
%th
Name
%th
Email
%th
Level
%th
Code
%th
Code Valid
%tbody
- @conference.supporter_registrations.each do |u|
%tr
%td= u.name
%td= u.email
%td= u.supporter_level.title if u.supporter_level
%td= u.code
%td= u.code_is_valid

View file

@ -0,0 +1,15 @@
.row
.col-md-12
.page-header
%h1
-if @target.new_record?
New
Target
.row
.col-md-8
= semantic_form_for(@target, :url => (@target.new_record? ? admin_conference_targets_path : admin_conference_target_path(@conference.short_title, @target))) do |f|
= f.input :due_date, as: :string, input_html: { class: 'target-due-date-datepicker'}, label: 'Until when do you want to have '
= f.input :target_count, label: 'this amount of '
= f.input :unit, as: :select, label: 'Unit', class: 'form-control', collection: Target.units.values, include_blank: false, label: 'units '
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,6 +0,0 @@
.nested-fields
= f.inputs do
= f.input :due_date, as: :string, input_html: { class: 'target-due-date-datepicker', readonly: 'readonly' }
= f.input :target_count
= f.input :unit, as: :select, label: 'Unit', class: 'form-control', collection: Target.units.values, include_blank: false
= remove_association_link :target, f

View file

@ -1,5 +1,35 @@
.row .row
.col-md-8 .col-md-12
= semantic_form_for(@conference, url: admin_conference_target_path(@conference.short_title, @conference.targets)) do |f| .page-header
= dynamic_association :targets, 'Targets', f %h1 Targets
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } %p.text-muted
Set up goals for your conference
.row
.col-md-12
%table.table.table-hover#targets
%thead
%tr
%th Due Date
%th Target Count
%th Unit
%th Actions
%tbody
- @targets.each do |target|
%tr
%td{'id'=> "due_date_#{target.id}"}
= target.due_date
%td{'id'=> "count#{target.id}"}
= target.target_count
%td{'id'=> "unit_#{target.id}"}
= target.unit
%td
.btn-group
= link_to 'Edit',
edit_admin_conference_target_path(@conference.short_title, target.id),
class: 'btn btn-primary'
= link_to 'Delete',
admin_conference_target_path(@conference.short_title, target.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete this target?" }
.row
.col-md-12
= link_to 'New Target', new_admin_conference_target_path, class: 'btn btn-success pull-right'

View file

@ -1,5 +1,17 @@
.row
.col-md-12
.page-header
%h1
- if @ticket.new_record?
New
= @ticket.title
Ticket
.row
.col-md-8
= semantic_form_for(@ticket, :url => (@ticket.new_record? ? admin_conference_tickets_path : admin_conference_ticket_path(@conference.short_title, @ticket))) do |f|
= f.input :title = f.input :title
= f.input :description, input_html: { rows: 5, data: { provide: "markdown-editable" } } = f.input :description, input_html: { rows: 5, data: { provide: "markdown-editable" } }
= f.input :price = f.input :price
= f.input :price_currency, as: :select, class: 'form-control', collection: ['USD', 'EUR', 'GBP', 'INR', 'CNY'], include_blank: false = f.input :price_currency, as: :select, class: 'form-control', collection: ['USD', 'EUR', 'GBP', 'INR', 'CNY'], include_blank: false
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,6 +0,0 @@
%h1
Edit Ticket
.row
.col-md-8
= semantic_form_for(@ticket, :url => admin_conference_ticket_path(@conference.short_title, @ticket)) do |f|
= render partial: 'form', locals: { f: f }

View file

@ -1,38 +1,35 @@
.row
.col-md-12
.page-header
%h1 Tickets %h1 Tickets
%p.lead %p.text-muted
If you add Tickets to your Conference, people will be redirected after registration to a page where they can purchase tickets. Tickets to purchase during registration
- if @conference.tickets.any? - if @conference.tickets.any?
.row .row
.col-md-12 .col-md-12
%table.table %table.table.table-hover#tickets
%thead %thead
%th #
%th Title %th Title
%th Price %th Price
%th Buyer %th Sold
%th Show %th Actions
%th Edit
%th Delete
%tbody %tbody
- @conference.tickets.each_with_index do |ticket, index| - @conference.tickets.each do |ticket|
%tr %tr
%td %td
= index + 1 = link_to(admin_conference_ticket_path(@conference.short_title, ticket.id)) do
%td
= ticket.title = ticket.title
%td %td
= humanized_money_with_symbol ticket.price = humanized_money_with_symbol ticket.price
%td %td
= ticket.buyers.count = ticket.buyers.count
%td %td
= link_to 'Show', admin_conference_ticket_path(@conference.short_title, ticket.id), .btn-group
method: :get, class: 'btn btn-success'
%td
= link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, ticket.id), = link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, ticket.id),
method: :get, class: 'btn btn-primary' method: :get, class: 'btn btn-primary'
%td
= link_to 'Delete', admin_conference_ticket_path(@conference.short_title, ticket.id), = link_to 'Delete', admin_conference_ticket_path(@conference.short_title, ticket.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the Ticket for #{ticket.title}?" } method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the Ticket for #{ticket.title}?" }
.row
= link_to 'Add Ticket', new_admin_conference_ticket_path, class: 'btn btn-success' .col-md-12
= link_to 'Add Ticket', new_admin_conference_ticket_path, class: 'btn btn-success pull-right'

View file

@ -1,6 +0,0 @@
%h1
New Ticket
.row
.col-md-8
= semantic_form_for(@ticket, :url => admin_conference_tickets_path(@conference.short_title, @ticket)) do |f|
= render partial: 'form', locals: { f: f }

View file

@ -1,13 +1,16 @@
.row
.col-md-12
.page-header
%h1 %h1
= @ticket.title = @ticket.title
Ticket
%small %small
= humanized_money_with_symbol @ticket.price = humanized_money_with_symbol @ticket.price
- if @ticket.description.present? %p.text-muted
%p.lead People who bought this ticket
= markdown(@ticket.description) .row
.col-md-12
%h4 The following persons bought this ticket: %table.table.table-hover.datatable
%table.table.table-striped.table-bordered.table-hover.datatable
%thead %thead
%th # %th #
%th Name %th Name
@ -29,5 +32,4 @@
= buyer.affiliation = buyer.affiliation
%td %td
= @ticket.paid?(buyer) = @ticket.paid?(buyer)
= link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, @ticket.id),
method: :get, class: 'btn btn-primary'

View file

@ -0,0 +1,15 @@
.row
.col-md-12
.page-header
%h1
-if @track.new_record?
New
= @track.name
Track
.row
.col-md-12
= semantic_form_for(@track, :url => (@track.new_record? ? admin_conference_tracks_path : admin_conference_track_path(@conference.short_title, @track))) do |f|
= f.input :name
= f.input :color, :input_html => {:size => 6, :type => "color"}, :required=> true
= f.input :description, :input_html => {:rows => 2, data: { provide: "markdown-editable" } }, hint: markdown_hint
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,9 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :name %>
<%= f.input :color, :input_html => {:size => 6, :type => "color"}, :required=> true %>
<%= f.input :description, :input_html => {:rows => 2, data: { provide: "markdown-editable" } }, hint: markdown_hint %>
<%= remove_association_link :track, f %>
<% end %>
</div>

View file

@ -1,5 +1,36 @@
.row .row
.col-md-8 .col-md-12
= semantic_form_for(@conference, :url => admin_conference_track_path(@conference.short_title, @conference.tracks)) do |f| .page-header
= dynamic_association :tracks, "Tracks", f %h1 Tracks
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} %p.text-muted
Categorize events in your conference
.row
.col-md-12
%table.table.table-hover#tracks
%thead
%th Name
%th Description
%th Color
%th Actions
%tbody
- @conference.tracks.each do |track|
%tr
%td
= link_to(admin_conference_track_path(@conference.short_title, track)) do
= track.name
%td
%p
= truncate(track.description)
%td
%span.label{style: "background-color: #{track.color};"}
= track.color
%td
.btn-group{role: "group"}
= link_to 'Edit', edit_admin_conference_track_path(@conference.short_title, track.id),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_track_path(@conference.short_title, track.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete #{track.name}?" }
.row
.col-md-12.text-right
= link_to 'New Track', new_admin_conference_track_path(@conference.short_title), class: 'btn btn-success'

View file

@ -0,0 +1,31 @@
.row
.col-md-12
.page-header
%h1
= @track.name
Track
%p.text-muted
Events in this track
.row
.col-md-12
%table.table.table-hover.datatable
%thead
%th Title
%th Type
%th Submitter
%th State
%th Time
%tbody
- @track.events.each_with_index do |event|
%tr
%td
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
%td
= event.event_type.title
%td
=link_to event.submitter.name, admin_user_path(event.submitter)
%td
= event.state
%td
= event.start_time

View file

@ -22,8 +22,8 @@
%td= event.state %td= event.state
%td= "#{event.event_type.title} (#{show_time(event.event_type.length)})" %td= "#{event.event_type.title} (#{show_time(event.event_type.length)})"
%td %td
- if event.conference.call_for_papers && event.conference.call_for_papers.rating && event.conference.call_for_papers.rating > 0 - if event.conference.call_for_paper && event.conference.call_for_paper.rating && event.conference.call_for_paper.rating > 0
- event.conference.call_for_papers.rating.times do |counter| - event.conference.call_for_paper.rating.times do |counter|
- if event.average_rating.to_f.round == counter+1 - if event.average_rating.to_f.round == counter+1
= label_tag 'label_rating', '', class: 'avgrating', avgrate: true = label_tag 'label_rating', '', class: 'avgrating', avgrate: true
= javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');" = javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');"

View file

@ -1,3 +1,9 @@
.row
.col-md-12
.page-header
%h1 Venue
.row
.col-md-8
= semantic_form_for(@venue, url: admin_conference_venue_path(@conference.short_title)) do |f| = semantic_form_for(@venue, url: admin_conference_venue_path(@conference.short_title)) do |f|
= f.inputs :name, :website = f.inputs :name, :website
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint = f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint

View file

@ -1,3 +1,9 @@
.row
.col-md-12
.page-header
%h1 Venue
%p.text-muted
The place where your conference takes place
-if @venue -if @venue
.row .row
.col-md-6 .col-md-6
@ -20,6 +26,6 @@
Delete Venue Delete Venue
-else -else
.row .row
.col-md-12 .col-md-12.text-right
= link_to(new_admin_conference_venue_path(@conference.short_title), class: 'btn btn-success') do = link_to(new_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary') do
Create Venue Create Venue

View file

@ -21,12 +21,12 @@
= "#{tracks(@conference)}." = "#{tracks(@conference)}."
The submission period has begun The submission period has begun
%em %em
= @conference.call_for_papers.start_date.strftime('%A, %B %-d. %Y') = @conference.call_for_paper.start_date.strftime('%A, %B %-d. %Y')
and closes and closes
%em %em
= @conference.call_for_papers.end_date.strftime('%A, %B %-d. %Y.') = @conference.call_for_paper.end_date.strftime('%A, %B %-d. %Y.')
That means you have only That means you have only
- days = (@conference.call_for_papers.end_date - Date.today).to_i - days = (@conference.call_for_paper.end_date - Date.today).to_i
%b %b
= pluralize(days, 'days') = pluralize(days, 'days')
left! left!

View file

@ -25,7 +25,7 @@
= link_to "Modify Registration", edit_conference_conference_registrations_path(conference.short_title), :class =>"btn btn-default" = link_to "Modify Registration", edit_conference_conference_registrations_path(conference.short_title), :class =>"btn btn-default"
- else - else
= link_to "Register", new_conference_conference_registrations_path(conference.short_title), :class =>"btn btn-success" = link_to "Register", new_conference_conference_registrations_path(conference.short_title), :class =>"btn btn-success"
= link_to "Schedule", conference_schedule_path(conference.short_title), :class =>"btn btn-default" if conference.call_for_papers and conference.call_for_papers.schedule_public = link_to "Schedule", conference_schedule_path(conference.short_title), :class =>"btn btn-default" if conference.call_for_paper and conference.call_for_paper.schedule_public
- if !current_user.nil? && current_user.proposal_count(conference) > 0 - if !current_user.nil? && current_user.proposal_count(conference) > 0
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class =>"btn btn-default" = link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class =>"btn btn-default"
- elsif conference.cfp_open? - elsif conference.cfp_open?

View file

@ -17,7 +17,7 @@
= track.name = track.name
= markdown(track.description) = markdown(track.description)
- if @conference.call_for_papers and @conference.call_for_papers.schedule_public - if @conference.call_for_paper and @conference.call_for_paper.schedule_public
.row .row
.col-md-12 .col-md-12
%p.cta-button.text-center %p.cta-button.text-center

View file

@ -33,9 +33,9 @@
%section#program %section#program
= render 'program' = render 'program'
- if @conference.cfp_open? and @conference.call_for_papers.include_cfp_in_splash? - if @conference.cfp_open? and @conference.call_for_paper.include_cfp_in_splash?
%section#callforpapers %section#callforpapers
= render 'call_for_papers' = render 'call_for_paper'
- if @conference.venue and @conference.splashpage.include_venue - if @conference.venue and @conference.splashpage.include_venue
%section#venue %section#venue

Some files were not shown because too many files have changed in this diff Show more