mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Implement track request acceptance
Allow track submitter to request specific dates Redirect to Tracks#edit if a track doesn't have a room or start/end date before accepting it Don't allow the submitter or the track organizers to edit the request after it has been accepted or confirmed Restrict track selection in proposals and move track selection from Proposals form to events helper Mark cfp_active of the tracks table as not null and fill in true if nil
This commit is contained in:
parent
2f9eb04219
commit
d9faffc96a
27 changed files with 909 additions and 62 deletions
34
app/views/admin/tracks/_change_state_dropdown.html.haml
Normal file
34
app/views/admin/tracks/_change_state_dropdown.html.haml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
- if track.transition_possible? :restart
|
||||
%li= link_to 'Start review',
|
||||
restart_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :patch, id: "restart_track_#{track.id}"
|
||||
|
||||
- if track.transition_possible? :to_accept
|
||||
%li= link_to 'Mark as possible acceptance',
|
||||
to_accept_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :patch, id: "to_accept_track_#{track.id}"
|
||||
|
||||
- if track.transition_possible? :accept
|
||||
%li= link_to 'Accept track request',
|
||||
accept_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :patch, id: "accept_track_#{track.id}"
|
||||
|
||||
- if track.transition_possible? :confirm
|
||||
%li= link_to 'Confirm track',
|
||||
confirm_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :patch, id: "confirm_track_#{track.id}"
|
||||
|
||||
- if track.transition_possible? :to_reject
|
||||
%li= link_to 'Mark as possible rejection',
|
||||
to_reject_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :patch, id: "to_reject_track_#{track.id}"
|
||||
|
||||
- if track.transition_possible? :reject
|
||||
%li= link_to 'Reject track request',
|
||||
reject_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :patch, confirm: 'Are you sure?', id: "reject_track_#{track.id}"
|
||||
|
||||
- if track.transition_possible? :cancel
|
||||
%li= link_to 'Cancel track request',
|
||||
cancel_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :patch, id: "cancel_track_#{track.id}"
|
||||
|
|
@ -19,6 +19,5 @@
|
|||
- else
|
||||
Please add a venue with rooms, if you want to select a room for the track.
|
||||
= 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.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' }
|
||||
|
|
|
|||
|
|
@ -40,21 +40,24 @@
|
|||
= track.color
|
||||
%td
|
||||
- if track.self_organized?
|
||||
= track.state
|
||||
.btn-group
|
||||
%button{ type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown' }
|
||||
= track.state.humanize
|
||||
%span.caret
|
||||
%ul.dropdown-menu{ role: 'menu' }
|
||||
= render 'change_state_dropdown', track: track
|
||||
- else
|
||||
= track.state.humanize
|
||||
%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
|
||||
= 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' }
|
||||
|
||||
%td
|
||||
- if track.room
|
||||
= link_to track.room.name, admin_conference_venue_room_path(@conference.short_title, track.room.id)
|
||||
|
|
@ -72,8 +75,9 @@
|
|||
N/A
|
||||
%td
|
||||
.btn-group{role: "group"}
|
||||
= link_to 'Edit', edit_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
- if can? :edit, track
|
||||
= link_to 'Edit', edit_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
- if can? :destroy, track
|
||||
= link_to 'Delete', admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :delete, class: 'btn btn-danger',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue