Track related refactoring
Add roles as nested routes to track (for the track organizer role) Allow transition from to_accept to to_reject and backwards Split Track#valid_dates validation to many independent ones Show all the confirmed tracks in the conference's splashpage Add comment in admin/Tracks#toggle_cfp_inclusion Rewrite admin/TracksController#accept spec Add feature spec for track requests Change 'In' to 'Room' in Tracks#index Rewrite Track#overlapping Refactor code in ProposalsController Fix typos
This commit is contained in:
parent
9c4892bfc8
commit
27fa79a826
21 changed files with 279 additions and 144 deletions
|
|
@ -27,15 +27,17 @@
|
|||
= role.users.pluck(:name).first(5).join ', '
|
||||
- if role.users.count > 5
|
||||
- if role.resource_type == 'Track'
|
||||
= link_to '...', track_admin_conference_role_path(@conference.short_title, role.name, role.resource)
|
||||
= link_to '...', admin_conference_program_track_role_path(@conference.short_title, role.resource, role.name)
|
||||
- else
|
||||
= link_to '...', admin_conference_role_path(@conference.short_title, role.name)
|
||||
%td
|
||||
.btn-group
|
||||
- if role.resource_type == 'Track'
|
||||
= link_to 'Users', track_admin_conference_role_path(@conference.short_title, role.name, role.resource), class: 'btn btn-success'
|
||||
= link_to 'Users', admin_conference_program_track_role_path(@conference.short_title, role.resource, role.name),
|
||||
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'
|
||||
= link_to 'Edit', edit_admin_conference_program_track_role_path(@conference.short_title, role.resource, role.name),
|
||||
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
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
= @role.name.titleize
|
||||
- if can? :edit, @role
|
||||
- if @track
|
||||
= link_to 'Edit', track_edit_admin_conference_role_path(@conference.short_title, @role.name, @track), class: 'btn btn-primary pull-right'
|
||||
= link_to 'Edit', edit_admin_conference_program_track_role_path(@conference.short_title, @track, @role.name),
|
||||
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
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
%tr
|
||||
%td
|
||||
= track.id
|
||||
%td{style: "padding: 15px 0px 0px 10px;"}
|
||||
%td{ style: 'padding: 15px 0px 0px 10px;' }
|
||||
= link_to admin_conference_program_track_path(@conference.short_title, track), class: 'btn' do
|
||||
%span.label{style: "background-color: #{track.color}; color: #{ contrast_color(track.color) }"}
|
||||
= track.name
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
- else
|
||||
= track.state.humanize
|
||||
%td
|
||||
.btn-group{role: "group"}
|
||||
.btn-group{ role: 'group' }
|
||||
- if can? :edit, track
|
||||
= link_to 'Edit', edit_admin_conference_program_track_path(@conference.short_title, track), class: 'btn btn-primary'
|
||||
- special_style = true
|
||||
|
|
|
|||
|
|
@ -5,4 +5,9 @@ track_cfp_td = $('#cfp_switch_' + track_id);
|
|||
track_cfp_value = <%= @track.cfp_active %>;
|
||||
|
||||
track_cfp_td.attr('data-order', track_cfp_value);
|
||||
|
||||
/*
|
||||
* The updated data-order attribute isn't taken into account
|
||||
* until we invalidate the cell
|
||||
*/
|
||||
$('#tracks').DataTable().cell(track_cfp_td).invalidate();
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@
|
|||
= link_to "Register", new_conference_conference_registration_path(conference.short_title), class: "btn btn-default", disabled: cannot?(:new, Registration.new(conference_id: conference.id))
|
||||
- if cannot?(:new, Registration.new(conference_id: conference.id)) && conference.registration_limit_exceeded?
|
||||
Sorry, no places left
|
||||
- if !current_user.nil? && current_user.tracks.where(program: conference.program).length > 0
|
||||
= link_to "My Track Requests", conference_program_tracks_path(conference.short_title), class: 'btn btn-default'
|
||||
- if current_user && current_user.tracks.where(program: conference.program).length > 0
|
||||
= link_to 'My Track Requests', conference_program_tracks_path(conference.short_title), class: 'btn btn-default'
|
||||
- elsif can? :new, conference.program.tracks.new
|
||||
= link_to "Submit Track Request", new_conference_program_track_path(conference.short_title), class: 'btn btn-default'
|
||||
= link_to 'Submit Track Request', new_conference_program_track_path(conference.short_title), class: 'btn btn-default'
|
||||
- if !current_user.nil? && current_user.proposal_count(conference) > 0
|
||||
= link_to "My Proposals", conference_program_proposals_path(conference.short_title), class: 'btn btn-default'
|
||||
- elsif can? :new, conference.program.events.new
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
- if @conference.splashpage and @conference.program.tracks.any? and @conference.splashpage.include_tracks
|
||||
See rock-star speakers cover the topics of
|
||||
- if @conference.splashpage and @conference.splashpage.include_tracks
|
||||
- @conference.program.tracks.confirmed.cfp_active.each_slice(3) do |slice|
|
||||
- @conference.program.tracks.confirmed.each_slice(3) do |slice|
|
||||
.row.row-centered
|
||||
- slice.each do |track|
|
||||
.col-md-4.col-sm-4.col-centered.col-top.track
|
||||
|
|
|
|||
|
|
@ -45,14 +45,14 @@
|
|||
%section#program
|
||||
= render 'schedule_splashpage'
|
||||
|
||||
- if @conference.program.cfps.for_tracks.try(:open?) && @conference.splashpage.include_cfp
|
||||
%section#callfortracks
|
||||
= render 'call_for_tracks'
|
||||
|
||||
- if @conference.program.cfp_open? and @conference.splashpage.include_cfp
|
||||
%section#callforpapers
|
||||
= render 'call_for_paper'
|
||||
|
||||
- if @conference.program.cfps.for_tracks.try(:open?) && @conference.splashpage.include_cfp
|
||||
%section#callfortracks
|
||||
= render 'call_for_tracks'
|
||||
|
||||
- if @conference.venue and @conference.splashpage.include_venue
|
||||
%section#venue
|
||||
= render 'venue'
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@
|
|||
= 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 :description, input_html: {rows: 2, data: { provide: 'markdown-editable' } }, required: true, hint: "This will be public #{markdown_hint}".html_safe
|
||||
= f.input :relevance, input_html: {rows: 5, data: { provide: 'markdown-editable' } }, required: true, hint: "Please explain here how this track relates to the conference, how you are related to it's content and why we should accept it. #{markdown_hint}".html_safe
|
||||
= f.input :relevance, input_html: {rows: 5, data: { provide: 'markdown-editable' } }, required: true, hint: "Please explain here how this track relates to the conference, how you are related to its content and why we should accept it. #{markdown_hint}".html_safe
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
If you submit a track request, the conference organizers will review it and either accept or reject it.
|
||||
%br
|
||||
If your track request is accepted, the conference organizers expect you to confirm that you will be able to hold it.
|
||||
Then you will gain the Track organizer role.
|
||||
Then you will be assigned the Track organizer role.
|
||||
%br
|
||||
If your track request is rejected, you can either live with that or adapt it and resubmit it for review again.
|
||||
%br
|
||||
|
|
@ -29,6 +29,13 @@
|
|||
.row
|
||||
.col-md-12
|
||||
%table.table.table-striped#tracks
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
%th From
|
||||
%th To
|
||||
%th Room
|
||||
%th
|
||||
- @tracks.each do |track|
|
||||
%tr
|
||||
%td{style: "padding:15px 0px 0px 8px;"}
|
||||
|
|
@ -47,17 +54,11 @@
|
|||
%td
|
||||
= markdown(truncate(track.description))
|
||||
%td
|
||||
- if track.start_date
|
||||
From:
|
||||
= track.start_date.strftime('%A, %B %-d. %Y')
|
||||
= track.start_date.strftime('%A, %B %-d. %Y') if track.start_date
|
||||
%td
|
||||
- if track.end_date
|
||||
To:
|
||||
= track.end_date.strftime('%A, %B %-d. %Y')
|
||||
= track.end_date.strftime('%A, %B %-d. %Y') if track.end_date
|
||||
%td
|
||||
- if track.room
|
||||
In:
|
||||
= track.room.name
|
||||
= track.try(:room).try(:name)
|
||||
%td
|
||||
.pull-right
|
||||
- if track.transition_possible? :confirm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue