Merge branch 'master' into responsive_charts

This commit is contained in:
Stella Rouzi 2017-07-15 13:46:40 +03:00 committed by GitHub
commit 56c8328b2f
273 changed files with 7772 additions and 3171 deletions

View file

@ -0,0 +1,12 @@
%dt
Start Date
%dd
= @cfp.start_date.strftime('%A, %B %e. %Y')
%dt
End Date
%dd
= @cfp.end_date.strftime('%A, %B %e. %Y')
%dt
Days Left
%dd
= pluralize(@cfp.remaining_days, 'day')

View file

@ -0,0 +1,38 @@
%dt
Start Date:
%dd#start_date
= @cfp.start_date.strftime('%A, %B %-d. %Y')
%dt
End Date:
%dd#end_date
= @cfp.end_date.strftime('%A, %B %-d. %Y')
%dt
Days Left:
%dd
= pluralize(@cfp.remaining_days, 'day')
%dt
Event types:
%dd
= event_types(@conference)
%dt
Tracks:
%dd
= tracks(@conference)
%dt
Public Schedule
%dd#schedule_public
- if @program.schedule_public
Yes
- else
No
%dt
Schedule changeable?
%dd#schedule_changes
- if @program.schedule_fluid
Yes
- else
No
%dt
Rating Levels
%dd#rating
= @program.rating

View file

@ -4,8 +4,9 @@
%h1 Call for Papers
.row
.col-md-8
= semantic_form_for(@cfp, url: admin_conference_program_cfp_path(@conference.short_title), html: {multipart: true}) do |f|
= semantic_form_for(@cfp, url: (@cfp.new_record? ? admin_conference_program_cfps_path : admin_conference_program_cfp_path(@conference.short_title, @cfp)), html: {multipart: true}) do |f|
= f.input :start_date, as: :string, input_html: { id: 'registration-period-start-datepicker', start_date: @conference.start_date, end_date: @conference.end_date, readonly: 'readonly' }
= f.input :end_date, as: :string, input_html: { id: 'registration-period-end-datepicker', readonly: 'readonly' }
= f.input :cfp_type, as: :select, collection: (@cfp.new_record? ? @program.remaining_cfp_types : [@cfp.cfp_type] + @program.remaining_cfp_types).map {|type| ["#{type.capitalize}", type]}, include_blank: false, label: 'Type', input_html: { class: 'select-help-toggle' }
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -0,0 +1,36 @@
.row
.col-md-12
.page-header
%h1 Call for Papers
%p.text-muted
Call for people to submit events to your conference
- if @program.cfps
.row
.col-md-12
%table.table.table-hover.datatable#tickets
%thead
%th Type
%th Start Date
%th End Date
%th Days Left
%th Actions
%tbody
- @program.cfps.each do |cfp|
%tr
%td
= link_to(admin_conference_program_cfp_path(@conference.short_title, cfp.id)) do
= cfp.cfp_type.capitalize
%td
= cfp.start_date.strftime('%A, %B %-d. %Y')
%td
= cfp.end_date.strftime('%A, %B %-d. %Y')
%td
= pluralize(cfp.remaining_days, 'day')
%td
.btn-group
= link_to 'Edit', edit_admin_conference_program_cfp_path(@conference.short_title, cfp.id), method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_program_cfp_path(@conference.short_title, cfp.id), method: 'delete', class: 'btn btn-danger', data: { confirm: 'Are you sure you want to delete the CfP?' }
- if can? :new, @program.cfps.new
.row
.col-md-12.text-right
= link_to 'Create Call for Papers', new_admin_conference_program_cfp_path(@conference.short_title), class: 'btn btn-primary'

View file

@ -4,55 +4,13 @@
%h1 Call for Papers
%p.text-muted
Call for people to submit events to your conference
- if @cfp
.row
.col-md-8
%dl.dl-horizontal
%dt
Start Date:
%dd#start_date
= @cfp.start_date.strftime('%A, %B %-d. %Y')
%dt
End Date:
%dd#end_date
= @cfp.end_date.strftime('%A, %B %-d. %Y')
%dt
Days Left:
%dd
= pluralize(@cfp.remaining_days, 'day')
%dt
Event types:
%dd
= event_types(@conference)
%dt
Tracks:
%dd
= tracks(@conference)
%dt
Public Schedule
%dd#schedule_public
- if @program.schedule_public
Yes
- else
No
%dt
Schedule changeable?
%dd#schedule_changes
- if @program.schedule_fluid
Yes
- else
No
%dt
Rating Levels
%dd#rating
= @program.rating
.row
.col-md-12.text-right
= link_to(edit_admin_conference_program_cfp_path(@conference.short_title), class: 'btn btn-primary') do
Edit
= link_to(admin_conference_program_cfp_path(@conference.short_title), method: 'delete', class: 'btn btn-danger', data: { confirm: 'Are you sure you want to delete the CfP?' }) do
Delete
- else
.row
.col-md-12.text-right
= link_to 'Create Call for Papers', new_admin_conference_program_cfp_path(@conference.short_title), class: 'btn btn-primary'
.row
.col-md-8
%dl.dl-horizontal
= render "#{@cfp.cfp_type}_cfp"
.row
.col-md-12.text-right
= link_to(edit_admin_conference_program_cfp_path(@conference.short_title, @cfp.id), class: 'btn btn-primary') do
Edit
= link_to(admin_conference_program_cfp_path(@conference.short_title, @cfp.id), method: 'delete', class: 'btn btn-danger', data: { confirm: 'Are you sure you want to delete the CfP?' }) do
Delete

View file

@ -1,12 +1,12 @@
.list-group
%li.list-group-item
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)}" }
%h4
Conference progress
.progress
.progress-bar{ 'role' => 'progressbar', 'aria-valuenow' => "#{conference_progress['process']}", 'aria-valuemin' => '0',
'aria-valuemax' => '100', 'style' => "width: #{conference_progress['process']}%;" }
= conference_progress['process'] + '%'
%li{ 'class' => "list-group-item #{class_for_todo(conference_progress['registration'])}" }
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['registration'])}" }
%span{ 'class' => icon_for_todo(conference_progress['registration']) }
- if can? :update, @conference
- if conference.registration_period
@ -15,46 +15,48 @@
= link_to 'Set up registration period', new_admin_conference_registration_period_path(conference_progress['short_title'])
- else
Set up registration period
%li{ 'class' => "list-group-item #{class_for_todo(conference_progress['cfp'])}" }
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['cfp'])}" }
%span{ 'class' => icon_for_todo(conference_progress['cfp']) }
- if can? :update, Cfp.new(program_id: @program.id)
= link_to 'Set up call for papers', admin_conference_program_cfp_path(conference_progress['short_title'])
= link_to 'Set up call for papers', admin_conference_program_cfps_path(conference_progress['short_title'])
- else
Set up call for papers
%li{ 'class' => "list-group-item #{class_for_todo(conference_progress['venue'])}" }
%span{ 'class' => icon_for_todo(conference_progress['venue']) }
- if can? :update, @conference.venue
%li{'class'=>"list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['venue'])}"}
%span{'class'=>icon_for_todo(conference_progress['venue'])}
- if can? :update, Venue.new(conference: @conference)
- @conference.reload
- if conference.venue
= link_to 'Add venue', edit_admin_conference_venue_path(conference_progress['short_title'])
- else
= link_to 'Add venue', new_admin_conference_venue_path(conference_progress['short_title'])
- else
- @conference.reload
Add venue
%li{ 'class' => "list-group-item #{class_for_todo(conference_progress['rooms'])}" }
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['rooms'])}" }
%span{ 'class' => icon_for_todo(conference_progress['rooms']) }
- if @conference.venue && (can? :update, @conference.venue.rooms.build)
= link_to 'Add rooms', admin_conference_venue_rooms_path(conference_progress['short_title'])
- else
Add rooms
%li{ 'class' => "list-group-item #{class_for_todo(conference_progress['tracks'])}" }
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['tracks'])}" }
%span{ 'class' => icon_for_todo(conference_progress['tracks']) }
- if can? :update, @conference.program.tracks.build
= link_to 'Add tracks', admin_conference_program_tracks_path(conference_progress['short_title'])
- else
Add tracks
%li{ 'class' => "list-group-item #{class_for_todo(conference_progress['event_types'])}" }
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['event_types'])}" }
%span{ 'class' => icon_for_todo(conference_progress['event_types']) }
- if can? :update, @conference.program.event_types.build
= link_to 'Add event types', admin_conference_program_event_types_path(conference_progress['short_title'])
- else
Add event types
%li{ 'class' => "list-group-item #{class_for_todo(conference_progress['difficulty_levels'])}" }
%li{ 'class' => "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['difficulty_levels'])}" }
%span{ 'class' => icon_for_todo(conference_progress['difficulty_levels']) }
- if can? :update, @conference.program.difficulty_levels.build
= link_to 'Add difficulty levels', admin_conference_program_difficulty_levels_path(conference_progress['short_title'])
- else
Add difficulty levels
%li{ class: "list-group-item #{class_for_todo(conference_progress['splashpage'])}" }
%li{ class: "list-group-item #{hidden_if_conference_over(conference)} #{class_for_todo(conference_progress['splashpage'])}" }
%span{ 'class' => icon_for_todo(conference_progress['splashpage']) }
- if can? :update, @conference
= link_to 'Set up a Splashpage', admin_conference_splashpage_path(conference_progress['short_title'])

View file

@ -17,6 +17,7 @@
= image_tag @conference.picture.thumb.url
= f.input :picture, label: false, hint: 'This will be displayed on the front page.'
= f.hidden_field :picture_cache
= f.input :ticket_layout, as: :select, collection: Conference.ticket_layouts.keys, hint: "Layout type for tickets of the conference."
= 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' }
@ -24,5 +25,5 @@
= f.input :start_hour, input_html: {size: 2, type: 'number', min: 0, max: 23}
= f.input :end_hour, input_html: {size: 2, type: 'number', min: 1, max: 24}
= f.inputs name: 'Registrations' do
= f.input :registration_limit, as: :number, in: 0..9999, hint: 'Limit the number of registrations to the conference (0 no limit). You currently have ' + pluralize(@conference.registrations.count, 'registration')
= f.input :registration_limit, as: :number, in: 0..9999, hint: 'Limit the number of registrations to the conference (0 no limit). Please note that the registration limit doesn\'t apply to speakers of confirmed events (they will still be able to register even if it has been reached). You currently have ' + pluralize(@conference.registrations.count, 'registration')
= f.action :submit, as: :button, button_html: {class: 'btn btn-primary'}

View file

@ -60,6 +60,17 @@
unit: 'weeks' }
.col-md-4
= render partial: 'doughnut_chart', locals: { title: 'User', data: @user_distribution }
.row#tickets
.col-md-8
= render partial: 'line_chart', locals: { title: 'Tickets sold over time',
name: 'tickets',
conferences: @conferences,
active_conferences: @active_conferences,
deactive_conferences: @deactive_conferences,
y: @tickets,
x: @ticket_weeks,
unit: 'weeks' }
%br
.row
.col-md-8
%ul.nav.nav-tabs#recentTable

View file

@ -69,6 +69,17 @@
.col-md-4
= render partial: 'todo_list', locals: { conference_progress: @conference_progress,
conference: @conference }
.row#tickets
.col-md-8
= render partial: 'line_chart', locals: { title: 'Tickets sold over time',
name: 'tickets',
conferences: @tickets,
active_conferences: @tickets,
deactive_conferences: [],
y: @tickets_data,
x: @ticket_weeks,
unit: 'weeks' }
%br
.row
.col-md-12#doughnut
%ul.nav.nav-tabs#doughnut_tabs
@ -101,11 +112,11 @@
.row
.col-md-8
%ul.nav.nav-tabs#recentTable
%li.active
%li{ 'class' => "active #{hidden_if_conference_over(@conference)}" }
%a{ href: '#recent_reg', 'data-toggle' => 'tab' }
%span.fa.fa-user
Recent Registrations
%li
%li{ 'class' => "#{hidden_if_conference_over(@conference)}" }
%a{ href: '#recent_submissions', 'data-toggle' => 'tab' }
%span.fa.fa-file-text
Recent Submissions

View file

@ -10,7 +10,7 @@
.col-md-12
= semantic_form_for(@event_type, url: (@event_type.new_record? ? admin_conference_program_event_types_path : admin_conference_program_event_type_path(@conference.short_title, @event_type))) do |f|
= f.input :title
= f.input :length, input_html: {size: 3, type: 'number', step: EventType::LENGTH_STEP, min: EventType::LENGTH_STEP}
= f.input :length, input_html: {size: 3, type: 'number', step: @event_type.program.schedule_interval, min: @event_type.program.schedule_interval}
= f.input :description
= f.input :minimum_abstract_length, input_html: {size: 3}
= f.input :maximum_abstract_length, input_html: {size: 3}

View file

@ -0,0 +1,11 @@
.row
.col-md-12
.page-header
%h1
-if @event.new_record?
New
= @event.title
Event
.row
.col-md-12
= render 'proposals/proposal_form'

View file

@ -117,7 +117,7 @@
%td
%b Scheduled time
%td
= @event.time
= time_with_timezone(@event.time)
%tr
%td
%b Submitter
@ -131,9 +131,26 @@
%i Hidden
%tr
%td
%b Biography
%b Speakers
%td
= markdown(@event.submitter.biography)
- if @program.show_voting?
- @event.speakers.each do |speaker|
%div
= link_to speaker.name, admin_user_path(speaker)
(
= link_to speaker.email, "mailto: #{speaker.email}"
)
- else
%i Hidden
%tr
%td
%b Biographies
%td
- @event.speakers.each do |speaker|
- unless speaker.biography.blank?
%b
= speaker.name
= markdown(speaker.biography)
%tr
%td
%b Submitted on

View file

@ -4,7 +4,9 @@
%h1
Events
= "(#{@events.length})" if @events.any?
.btn-group.pull-right
.pull-right
- if can? :create, Event
=link_to 'Add Event', new_admin_conference_program_event_path(@conference.short_title), class: 'button btn btn-default btn-info'
- if can? :read, Event
.btn-group
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
@ -54,8 +56,8 @@
%th
%b Submitter
%th
%b Speaker
- if @program.languages.present?
%b Speakers
-if @program.languages.present?
%th
%b Language
%th
@ -99,10 +101,9 @@
%i Hidden
%td
- if @program.show_voting?
- if speaker = event.speakers.first
= link_to speaker.name, admin_user_path(speaker)
- else
Unknown speaker
- event.speakers_ordered.each do |speaker|
.speaker
= link_to speaker.name, admin_user_path(speaker)
- else
%i Hidden
@ -183,4 +184,4 @@
%ul.dropdown-menu{ role: 'menu' }
= render 'change_state_dropdown', event: event
%td.text-center
= link_to "#{event.comment_threads.count}", admin_conference_program_event_path(@conference.short_title, event), anchor: 'comments-div'
= link_to "#{event.comments_count}", admin_conference_program_event_path(@conference.short_title, event), anchor: 'comments-div'

View file

@ -1,127 +0,0 @@
.tabbable
%ul.nav.nav-tabs
%li.active
= link_to 'All Events', '#all', 'data-toggle' => 'tab'
%li
%a{ href: '#missing-commercial', 'data-toggle' => 'tab' }
Events without Commercials
%span.label.label-danger{ style: 'border-radius: 1em;' }
= @events_missing_commercial.length
%li
%a{ href: '#requirements', 'data-toggle' => 'tab' }
Speaker Requirements
%span.label.label-success{ style: 'border-radius: 1em;' }
= @events_with_requirements.length
%li
%a{ href: '#missing-speakers', 'data-toggle' => 'tab' }
Missing Speakers
%span.label.label-danger{ style: 'border-radius: 1em;' }
= @missing_event_speakers.length
.tab-content
#all.tab-pane.active
.row
.col-md-12
.page-header
%h1
All Events
= "(#{@events.length})"
%p.text-muted
All submissions and the information that they are mssing
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th Title
%th Submitter Registered
%th Submitter Biography
%th Commercial
%th Subtitle
%th Difficulty Level
- if @program.tracks.any?
%th Track
%tbody
- @events.each do |event|
%tr
- progress_status = event.progress_status
%td
= link_to event.title, edit_conference_program_proposal_path(@conference.short_title, event)
%br
.small (Presented by #{event.speaker_names})
- %w(registered biography commercials subtitle difficulty_level).each do |info|
%td{ 'data-order' => "#{progress_status[info]}" }
%span{ class: class_for_todo(progress_status[info]) }
%span{ class: [icon_for_todo(progress_status[info]), 'fa-lg'] }
- if @program.tracks.any?
%td{ 'data-order' => "#{progress_status['track']}" }
%span{ class: class_for_todo(progress_status['track']) }
%span{ class: [icon_for_todo(progress_status['track']), 'fa-lg'] }
#missing-commercial.tab-pane
.row
.col-md-12
.page-header
%h1
Events without commercials
= "(#{@events_missing_commercial.length})"
%p.text-muted
All submissions that have no commercial
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th Title
%th Speaker(s)
%tbody
- @events_missing_commercial.each do |event|
%tr
%td= link_to event.title, edit_conference_program_proposal_path(@conference.short_title, event)
%td #{event.speaker_names}
#requirements.tab-pane
.row
.col-md-12
.page-header
%h1
Requirements
= "(#{@events_with_requirements.length})"
%p.text-muted
All submissions where the speakers have special requirements
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th Title
%th Speaker(s)
%th Requirements
%tbody
- @events_with_requirements.each do |event|
%tr
%td= link_to event.title, edit_conference_program_proposal_path(@conference.short_title, event)
%td #{event.speaker_names}
%td= event.description
#missing-speakers.tab-pane
.row
.col-md-12
.page-header
%h1
Missing Speakers
= "(#{@missing_event_speakers.length})"
%p.text-muted
All event speakers who haven't checked in
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th Speaker Name
%th Registered?
%th Event
%th Start Time
%tbody
- @missing_event_speakers.each do |speaker|
%tr
%td= speaker.user.name
%td= @conference.user_registered?(speaker.user) ? 'Yes' : 'No'
%td= link_to speaker.event.title, edit_conference_program_proposal_path(@conference.short_title, speaker.event)
- event_start_time = speaker.event.time
%td= event_start_time.present? ? event_start_time : '-'

View file

@ -64,13 +64,18 @@
%br
%table.table.table-hover
%tr
%td= link_to 'Submitter must be registered to the conference', admin_conference_registrations_path(@event.program.conference.short_title)
%td= link_to "#{'Speaker'.pluralize(@event.speakers.count)} must be registered to the conference", admin_conference_registrations_path(@event.program.conference.short_title)
%td{ 'class' => class_for_todo(progress_status['registered']) }
%span{ 'class' => [icon_for_todo(progress_status['registered']), 'fa-lg'] }
%tr
%td= link_to 'Fill out submitter biography', edit_admin_user_path(@event.submitter)
%td{ 'class' => class_for_todo(progress_status['biography']) }
%span{ 'class' => [icon_for_todo(progress_status['biography']), 'fa-lg'] }
%td
- if @event.speakers.count == 1
= link_to 'Fill out speaker\'s biography', edit_admin_user_path(@event.speakers.first)
- else
Fill out speaker's biography:
= speaker_links(@event)
%td{ 'class' => class_for_todo(progress_status['biographies']) }
%span{ 'class' => [icon_for_todo(progress_status['biographies']), 'fa-lg'] }
%tr
%td= link_to 'Add a subtitle', edit_admin_conference_program_event_path(@event.program.conference.short_title, @event)
%td{ 'class' => class_for_todo(progress_status['subtitle']) }

View file

@ -0,0 +1,13 @@
= semantic_form_for(@organization, url: (@organization.new_record? ? admin_organizations_path : admin_organization_path(@organization))) do |f|
= f.inputs name: 'Organization details' do
= f.input :name, as: :string, required: true
= f.input :description, as: :text, input_html: { rows: 10 }, placeholder: 'Decribe about your organization..'
= image_tag f.object.picture.thumb.url if f.object.picture?
- if @organization.picture
= image_tag(@organization.picture.thumb.url, width: '20%')
= f.input :picture
%p.text-right
- if @organization.new_record?
= f.submit 'Create Organization', class: 'btn btn-success'
- else
= f.submit 'Update Organization', class: 'btn btn-success'

View file

@ -0,0 +1,31 @@
.row
.col-md-12
.page-header
%h1 Organizations
.btn-group.pull-right
= link_to 'Create Organization', new_admin_organization_path, class: 'btn btn-success pull-right'
%p.text-muted
Manage organizations in OSEM
.row
.col-md-12
%table.table.table-hover.datatable
%thead
%th Name
%th Upcoming Conferences
%th Past Conferences
%th Actions
%tbody
- @organizations.each do |organization|
%tr
%td
= organization.name
%td
= organization.conferences.upcoming.count
%td
= organization.conferences.past.count
%td
.btn-group
= link_to 'Edit', edit_admin_organization_path(organization),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_organization_path(organization),
method: :delete, class: 'btn btn-danger', data: { confirm: "Warning: This will delete #{organization.name} and all its data which includes data for all conferences within #{organization.name}. Do you really want to continue?" }

View file

@ -0,0 +1,43 @@
.container
.row
.col-md-12.page-header
%h2
Tickets Sold
.text-muted
Tickets sold for the conference
.row
.col-md-4
= render partial: 'admin/conferences/doughnut_chart',
locals: { title: 'Tickets sold', data: @tickets_sold_distribution }
.col-md-4
= render partial: 'admin/conferences/doughnut_chart',
locals: {title: 'Tickets turnover', data: @tickets_turnover_distribution}
%br
- if @physical_tickets.any?
.row
.col-md-12
%table.table.table-hover.datatable#tickets
%thead
%th ID
%th Type
%th User
%th Actions
%tbody
- @physical_tickets.each do |physical_ticket|
%tr
%td= physical_ticket.id
%td= physical_ticket.ticket.title
%td= physical_ticket.user.email
%td
.btn-group
= link_to 'Show',
conference_physical_ticket_path(@conference.short_title,
physical_ticket.id),
class: 'btn btn-primary'
= link_to 'Generate PDF',
conference_physical_ticket_path(@conference.short_title,
physical_ticket.id,
format: :pdf),
class: 'button btn btn-default btn-info'
- else
%h5 No Tickets sold!

View file

@ -9,6 +9,7 @@
= f.input :schedule_fluid, 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.'
= f.input :languages, hint: "Enter the languages allowed for events as values of #{link_to('ISO 639-1', 'http://www.loc.gov/standards/iso639-2/php/code_list.php', target: "_blank")} language codes separated with commas. The first language would be the default language. Leave it blank if you do not want to specify languages.".html_safe
= f.input :schedule_interval, hint: "It is the minimal time interval of your schedule. The value should be 5, 6, 10, 12, 15, 20, 30 or 60. Warning! Some events could be unscheduled when changing this value."
= f.input :blind_voting, hint: 'Enable this feature if you do not want to show voting results and voters prior to user submitting a vote. For the feature to work you need to set the voting dates below as well'
= f.input :voting_start_date, as: :string, input_html: { id: 'datetimepicker-voting_start_date', readonly: true, value: (f.object.voting_start_date.to_formatted_s(:db_without_seconds) unless f.object.voting_start_date.nil?) }
= f.input :voting_end_date, as: :string, input_html: { id: 'datetimepicker-voting_start_date', readonly: true, value: (f.object.voting_end_date.to_formatted_s(:db_without_seconds) unless f.object.voting_end_date.nil?) }

View file

@ -49,6 +49,11 @@
Yes
- else
No
%dt
Schedule interval
%dd
= @program.schedule_interval
minutes
%h3 Voting Options
%hr

View file

@ -25,5 +25,5 @@
= link_to 'Delete', admin_conference_registration_period_path,
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
- else
- if can? :create, @conference
- if can? :create, @conference.build_registration_period
= link_to 'New Registration Period', new_admin_conference_registration_period_path, class: 'btn btn-primary'

View file

@ -56,7 +56,7 @@
-if @conference.questions.any?
%td
= link_to 'Questions','#', class: 'btn btn-success question-btn', 'data-id' => index, 'data-name' => registration.name
%td
%td{ 'data-order' => registration.attended.to_s }
= check_box_tag "#{@conference.short_title}_#{registration.id}", registration.id, registration.attended,
class: 'switch-checkbox', method: :patch,
url: toggle_attendance_admin_conference_registration_path(@conference.short_title, id: registration.id)+"?attended=",

View file

@ -12,8 +12,8 @@
%thead
%th ID
%th Title
%th Submitter Registered
%th Submitter Biography
%th Speakers Registered
%th Speakers Biographies
%th Commercial
%th Subtitle
%th Difficulty Level
@ -27,9 +27,12 @@
%td
= link_to event.title, edit_admin_conference_program_event_path(@conference.short_title, event)
%br
.small (Presented by #{event.speaker_names})
.small
(Presented by
= speaker_links(event)
)
- %w(registered biography commercials subtitle difficulty_level).each do |info|
- %w(registered biographies commercials subtitle difficulty_level).each do |info|
%td{'data-order' => "#{progress_status[info]}"}
%span{class: class_for_todo(progress_status[info])}
%span{class: [icon_for_todo(progress_status[info]), 'fa-lg']}

View file

@ -21,7 +21,8 @@
%tr
%td= event.id
%td= link_to event.title, edit_admin_conference_program_event_path(@conference.short_title, event)
%td #{event.speaker_names}
%td
= speaker_links(event)
%td= event.description
%td= event.room.name if event.room
%td= event.time.to_date if event.time

View file

@ -17,4 +17,5 @@
%tr
%td= event.id
%td= link_to event.title, edit_admin_conference_program_event_path(@conference.short_title, event)
%td #{event.speaker_names}
%td
= speaker_links(event)

View file

@ -3,7 +3,7 @@
.page-header
%h1
Missing Speakers
= "(#{@missing_event_speakers.group(:user_id).length})"
= "(#{@missing_event_speakers.distinct(:user_id).length})"
%p.text-muted
All event speakers who haven't checked in
.col-md-12

View file

@ -17,7 +17,7 @@
%a{href: '#missing-speakers', 'data-toggle' => 'tab'}
Missing Speakers
%span.label.label-danger{style: 'border-radius: 1em;'}
= @missing_event_speakers.group(:user_id).length
= @missing_event_speakers.distinct(:user_id).length
.tab-content
#all.tab-pane.active

View file

@ -9,7 +9,7 @@
.col-md-8
= semantic_form_for(@resource, :url => (@resource.new_record? ? admin_conference_resources_path : admin_conference_resource_path(@conference.short_title, @resource))) do |f|
= f.input :name
= f.input :description, input_html: { rows: 5, data: { provide: "markdown-editable" } }
= f.input :description, input_html: { rows: 5, data: { provide: 'markdown-editable' } }
= f.input :used
= f.input :quantity
%p.text-right

View file

@ -7,7 +7,7 @@
.text-muted
= @role.description
= semantic_form_for @role, url: admin_conference_role_path(@conference.short_title, @role.name) do |f|
= semantic_form_for @role, url: @url do |f|
.row
.col-md-5
= f.input :description

View file

@ -14,7 +14,7 @@
- if ( can? :toggle_user, @role )
%td.text-right
= hidden_field_tag "role[user_ids][]", nil
= check_box_tag @conference.short_title, @role.id, (@role.user_ids.include? user.id), method: :post, url: "/admin/conferences/#{@conference.short_title}/roles/#{@role.name}/toggle_user?user[email]=#{user.email}&user[state]=", class: 'switch-checkbox', data: { size: 'small', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
= check_box_tag @conference.short_title, @role.id, (@role.user_ids.include? user.id), method: :post, url: "#{@url}?user[email]=#{user.email}&user[state]=", class: 'switch-checkbox', data: { size: 'small', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
%td= user.id
%td= user.name
%td= user.email

View file

@ -19,13 +19,24 @@
%tr
%td= role.id
%td= role.name.titleize
%td= role.description
%td
= role.description
- if role.resource_type == 'Track'
= link_to role.resource.name, admin_conference_program_track_path(@conference.short_title, role.resource)
%td
= role.users.pluck(:name).first(5).join ', '
- if role.users.count > 5
= link_to '...', admin_conference_role_path(@conference.short_title, role.name)
- if role.resource_type == 'Track'
= link_to '...', track_admin_conference_role_path(@conference.short_title, role.name, role.resource)
- else
= link_to '...', admin_conference_role_path(@conference.short_title, role.name)
%td
.btn-group
= link_to 'Users', admin_conference_role_path(@conference.short_title, role.name), class: 'btn btn-success'
- if can? :edit, role
= link_to 'Edit', edit_admin_conference_role_path(@conference.short_title, role.name), class: 'btn btn-primary'
- if role.resource_type == 'Track'
= link_to 'Users', track_admin_conference_role_path(@conference.short_title, role.name, role.resource), class: 'btn btn-success'
- if can? :edit, role
= link_to 'Edit', track_edit_admin_conference_role_path(@conference.short_title, role.name, role.resource), class: 'btn btn-primary'
- else
= link_to 'Users', admin_conference_role_path(@conference.short_title, role.name), class: 'btn btn-success'
- if can? :edit, role
= link_to 'Edit', edit_admin_conference_role_path(@conference.short_title, role.name), class: 'btn btn-primary'

View file

@ -6,14 +6,20 @@
Role
= @role.name.titleize
- if can? :edit, @role
= link_to 'Edit', edit_admin_conference_role_path(@conference.short_title, @role.name), class: 'btn btn-primary pull-right'
- if @track
= link_to 'Edit', track_edit_admin_conference_role_path(@conference.short_title, @role.name, @track), class: 'btn btn-primary pull-right'
- else
= link_to 'Edit', edit_admin_conference_role_path(@conference.short_title, @role.name), class: 'btn btn-primary pull-right'
.text-muted
= @role.description
- if @track
= link_to @track.name, admin_conference_program_track_path(@conference.short_title, @track)
.row.col-md-3
- if ( can? :toggle_user, @role ) && !@role.new_record?
= semantic_form_for :user, url: toggle_user_admin_conference_role_path(@conference.short_title, @role.name), method: :post do |u|
= semantic_form_for :user, url: @url, method: :post do |u|
= u.label 'Add user by email: '
.input-group

View file

@ -1,5 +1,5 @@
- compact_grid = EventType::LENGTH_STEP < 15
- cells_per_hour = 60 / EventType::LENGTH_STEP
- compact_grid = @program.schedule_interval < 15
- cells_per_hour = 60 / @program.schedule_interval
/ use smaller cell heights for more compact grids
- cell_height = compact_grid ? 32 : 58
- date_event_schedules = @event_schedules.select{ |e| e.start_time.to_date.eql? date }
@ -11,7 +11,7 @@
= room.name
- (@conference.start_hour * cells_per_hour..@conference.end_hour * cells_per_hour).each do |slot|
- hour = slot / cells_per_hour
- minutes = (EventType::LENGTH_STEP * (slot % cells_per_hour)).to_s.rjust(2, '0')
- minutes = (@program.schedule_interval * (slot % cells_per_hour)).to_s.rjust(2, '0')
- time = "#{hour}:#{minutes}"
.schedule-room-slot{ id: "schedule-room-#{room.guid}-#{hour}-#{minutes}", |
room_id: room.id, |

View file

@ -1,6 +1,6 @@
- cells_length = event.event_type.length / EventType::LENGTH_STEP
- cells_length = event.event_type.length / @program.schedule_interval
/ this height fits the room cells
- compact_grid = EventType::LENGTH_STEP < 15
- compact_grid = @program.schedule_interval < 15
- single_cell_height = compact_grid ? 32 : 58
- height = (cells_length * single_cell_height)
- height -= 23 unless compact_grid

View file

@ -6,15 +6,15 @@
.col-md-8
= semantic_form_for(@splashpage, url: admin_conference_splashpage_path(@conference.short_title)) do |f|
= f.inputs name: 'Components' do
= f.input :include_tracks, label: 'Display tracks on the splashpage?'
= f.input :include_program, label: 'Display program on the splashpage?'
= f.input :include_cfp, label: 'Display call for papers information on splashpage, while cfp is open?'
= f.input :include_venue, label: 'Display venue on the splashpage?'
= f.input :include_registrations, label: 'Display the registration period on the splashpage?'
= f.input :include_tickets, label: 'Display tickets 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_social_media, label: 'Display social media on the splashpage?'
= f.input :include_tracks, label: 'Display tracks', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tracks) }
= f.input :include_program, label: 'Display program', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_program) }
= f.input :include_cfp, label: 'Display call for papers information on splashpage, while cfp is open', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_cfp) }
= f.input :include_venue, label: 'Display venue', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_venue) }
= f.input :include_registrations, label: 'Display the registration period', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_registrations) }
= f.input :include_tickets, label: 'Display tickets', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_tickets) }
= f.input :include_lodgings, label: 'Display the lodgings', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_lodgings) }
= f.input :include_sponsors, label: 'Display sponsors', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_sponsors) }
= f.input :include_social_media, label: 'Display social media', input_html: { checked: params[:action] == 'new' || @splashpage.try(:include_social_media) }
= f.inputs name: 'Access' do
= f.input :public, label: 'Make splash page public?'
%p.text-right

View file

@ -10,27 +10,6 @@
.row
.col-md-8
%dl.dl-horizontal
%dt
Include Tickets:
%dd
- if @splashpage.include_tickets
Yes
- else
No
%dt
Include Sponsors:
%dd
- if @splashpage.include_sponsors
Yes
- else
No
%dt
Include Registrations:
%dd
- if @splashpage.include_registrations
Yes
- else
No
%dt
Include Tracks:
%dd
@ -52,6 +31,41 @@
Yes
- else
No
%dt
Include Venue:
%dd
-if @splashpage.include_venue
Yes
-else
No
%dt
Include Registrations:
%dd
- if @splashpage.include_registrations
Yes
- else
No
%dt
Include Tickets:
%dd
- if @splashpage.include_tickets
Yes
- else
No
%dt
Include Lodgins
%dd
-if @splashpage.include_lodgings
Yes
-else
No
%dt
Include Sponsors:
%dd
- if @splashpage.include_sponsors
Yes
- else
No
%dt
Include Social Media:
%dd
@ -76,5 +90,5 @@
- else
.row
.col-md-12.text-right
- if can? :create, @conference
- if can? :create, @conference.build_splashpage
= link_to 'Create Splashpage', new_admin_conference_splashpage_path, class: 'btn btn-primary'

View file

@ -10,6 +10,6 @@
= 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 '
= f.input :unit, as: :select, label: 'Unit', class: 'form-control', collection: Target.units.values, include_blank: false
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -4,6 +4,7 @@
%h1 Tickets
%p.text-muted
Tickets to get during registration
%br
- if @conference.tickets.any?
.row
.col-md-12
@ -36,4 +37,4 @@
.row
.col-md-12
= link_to 'Add Ticket', new_admin_conference_ticket_path, class: 'btn btn-success pull-right'
= link_to 'Tickets Sold', admin_conference_physical_ticket_index_path, class: 'button btn btn-default btn-info pull-right'

View file

@ -10,6 +10,9 @@
.col-md-12
= semantic_form_for(@track, url: (@track.new_record? ? admin_conference_program_tracks_path : admin_conference_program_track_path(@conference.short_title, @track))) do |f|
= f.input :name
= f.input :short_name, hint: "A short and unique handle for the track, using only letters, numbers, underscores, and dashes. This will be used to identify the track in URLs etc. Example: 'my_awesome_track'", input_html: { required: 'required', pattern: '[a-zA-Z0-9_-]+', title: 'Only letters, numbers, underscores, and dashes.' }
= 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
- if @track.self_organized?
= f.input :cfp_active, label: 'Allow event submitters to select this track for their proposal'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -9,8 +9,12 @@
%table.table.table-hover#tracks
%thead
%th Name
%th Short name
%th Description
%th Submitter
%th Color
%th State
%th Included in the Cfp
%th Actions
%tbody
- @tracks.each do |track|
@ -18,19 +22,44 @@
%td
= link_to(admin_conference_program_track_path(@conference.short_title, track)) do
= track.name
%td
= track.short_name
%td
%p
= truncate(track.description)
%td
- if track.self_organized?
= link_to track.submitter.name, admin_user_path(track.submitter)
- else
N/A
%td
%span.label{style: "background-color: #{track.color}; color: #{ contrast_color(track.color) }"}
= track.color
%td
- if track.self_organized?
= track.state
- else
N/A
%td
- if track.self_organized?
= check_box_tag "#{@conference.short_title}_#{track.short_name}", track.id, track.cfp_active,
class: 'switch-checkbox', method: :patch,
url: toggle_cfp_inclusion_admin_conference_program_track_path(@conference.short_title, id: track.short_name)+"?included=",
data: { size: 'small',
on_color: 'success',
off_color: 'warning',
on_text: 'Yes',
off_text: 'No' }
- else
%i.fa.fa-check
%td
.btn-group{role: "group"}
= link_to 'Edit', edit_admin_conference_program_track_path(@conference.short_title, track.id),
= link_to 'Edit', edit_admin_conference_program_track_path(@conference.short_title, track),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_program_track_path(@conference.short_title, track.id),
method: :delete, class: 'btn btn-danger',
data: { confirm: "Do you really want to delete #{track.name}? Attention: This track will be removed from all Events that have it set" }
- if can? :destroy, track
= link_to 'Delete', admin_conference_program_track_path(@conference.short_title, track),
method: :delete, class: 'btn btn-danger',
data: { confirm: "Do you really want to delete #{track.name}? Attention: This track will be removed from all Events that have it set" }
.row
.col-md-12.text-right
= link_to 'New Track', new_admin_conference_program_track_path(@conference.short_title), class: 'btn btn-success'

View file

@ -1,25 +1,28 @@
= semantic_form_for [:admin, @user] do |f|
= f.inputs 'Basic Information' do
.pull-right
%b
Confirmed?
- if can? :toggle_confirmation, @user
= check_box_tag @user.id, @user.id, @user.confirmed?,
method: :patch,
url: "/admin/users/#{@user.id}/toggle_confirmation?user[to_confirm]=",
class: 'switch-checkbox',
readonly: false,
data: { size: 'small', on_color: 'success', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
- else
= check_box_tag @user.id, @user.id, @user.confirmed?,
method: :patch,
url: "/admin/users/#{@user.id}/toggle_confirmation?user[to_confirm]=",
class: 'switch-checkbox',
readonly: true,
data: { size: 'small', on_color: 'success', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
- unless @user.new_record?
.pull-right
%b
Confirmed?
- if can? :toggle_confirmation, @user
= check_box_tag @user.id, @user.id, @user.confirmed?,
method: :patch,
url: "/admin/users/#{@user.id}/toggle_confirmation?user[to_confirm]=",
class: 'switch-checkbox',
readonly: false,
data: { size: 'small', on_color: 'success', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
- else
= check_box_tag @user.id, @user.id, @user.confirmed?,
method: :patch,
url: "/admin/users/#{@user.id}/toggle_confirmation?user[to_confirm]=",
class: 'switch-checkbox',
readonly: true,
data: { size: 'small', on_color: 'success', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
= f.input :is_admin, hint: 'An admin can create a new conference, manage users and make other users admins.'
= f.input :name, as: :string
= f.input :username, :as => :string if @user.new_record?
= f.input :email
= f.input :password if @user.new_record?
= f.input :affiliation, as: :string
= f.input :biography, input_html: { rows: 10, data: { provide: 'markdown-editable' } },
hint: markdown_hint

View file

@ -1,10 +1,13 @@
.row
.col-md-12
.page-header
%h2
%h1
Users
- if @users
= "(#{@users.length})"
- if can? :create, User
.pull-right
= link_to 'Add User', new_admin_user_path, :class => 'button btn btn-default btn-info'
.row
.col-md-12.table-responsive
%table.table.table-striped.table-bordered.table-hover.datatable

View file

@ -85,14 +85,16 @@
admin_conference_program_path(conference_id: Conference.find(version.conference_id).short_title)
- when 'Cfp'
= link_if_alive version, 'cfp',
admin_conference_program_cfp_path(conference_id: Conference.find(version.conference_id).short_title)
= 'cfp for'
- cfp = current_or_last_object_state(version.item_type, version.item_id)
= link_if_alive version, cfp.cfp_type,
admin_conference_program_cfp_path(conference_id: Conference.find(version.conference_id).short_title, id: version.item_id)
- when 'Track'
= 'track'
- track = current_or_last_object_state(version.item_type, version.item_id)
= link_if_alive version, track.name,
admin_conference_program_track_path(conference_id: Conference.find(version.conference_id).short_title, id: version.item_id)
admin_conference_program_track_path(conference_id: Conference.find(version.conference_id).short_title, id: track.try(:short_name))
- when 'EventType'
= 'event type'