2017-06-08 12:25:33 +03:00
|
|
|
.container
|
|
|
|
|
.row
|
|
|
|
|
.col-md-12.page-header
|
|
|
|
|
%h1
|
|
|
|
|
Track requests for
|
|
|
|
|
%span.notranslate
|
|
|
|
|
= @conference.title
|
|
|
|
|
|
|
|
|
|
- if @tracks.any?
|
|
|
|
|
.row
|
|
|
|
|
.col-md-12
|
|
|
|
|
%table.table.table-hover#tracks
|
|
|
|
|
%thead
|
|
|
|
|
%th Name
|
|
|
|
|
%th Short name
|
|
|
|
|
%th Description
|
|
|
|
|
%th Color
|
|
|
|
|
%th State
|
2017-07-14 15:57:34 +03:00
|
|
|
%th Start Date
|
|
|
|
|
%th End Date
|
2017-06-08 12:25:33 +03:00
|
|
|
%th Actions
|
|
|
|
|
%tbody
|
|
|
|
|
- @tracks.each do |track|
|
|
|
|
|
%tr
|
|
|
|
|
%td
|
2017-07-07 00:21:26 +03:00
|
|
|
= link_to(conference_program_track_path(@conference.short_title, track)) do
|
2017-06-08 12:25:33 +03:00
|
|
|
= track.name
|
|
|
|
|
%td
|
|
|
|
|
= track.short_name
|
|
|
|
|
%td
|
|
|
|
|
%p
|
|
|
|
|
= truncate(track.description)
|
|
|
|
|
%td
|
|
|
|
|
%span.label{style: "background-color: #{track.color}; color: #{ contrast_color(track.color) }"}
|
|
|
|
|
= track.color
|
|
|
|
|
%td
|
2017-07-12 16:35:09 +03:00
|
|
|
= track.state.humanize
|
2017-06-08 12:25:33 +03:00
|
|
|
%td
|
2017-07-14 15:57:34 +03:00
|
|
|
- if track.start_date
|
|
|
|
|
= track.start_date.strftime('%A, %B %-d. %Y')
|
|
|
|
|
- else
|
|
|
|
|
N/A
|
|
|
|
|
%td
|
|
|
|
|
- if track.end_date
|
|
|
|
|
= track.end_date.strftime('%A, %B %-d. %Y')
|
|
|
|
|
- else
|
|
|
|
|
N/A
|
|
|
|
|
%td
|
|
|
|
|
- if track.transition_possible? :confirm
|
|
|
|
|
= link_to 'Confirm', confirm_conference_program_track_path(@conference.short_title, track),
|
|
|
|
|
method: :patch, class: 'btn btn-mini btn-success', id: "confirm_track_#{track.id}"
|
|
|
|
|
- if track.transition_possible? :withdraw
|
|
|
|
|
= link_to 'Withdraw', withdraw_conference_program_track_path(@conference.short_title, track),
|
|
|
|
|
method: :patch, data: { confirm: 'Are you sure you want to withdraw this track request?' },
|
|
|
|
|
class: 'btn btn-mini btn-warning', id: "withdraw_track_request_#{track.id}"
|
|
|
|
|
- if track.transition_possible? :restart
|
|
|
|
|
= link_to 'Re-Submit', restart_conference_program_track_path(@conference.short_title, track),
|
|
|
|
|
method: :patch, class: 'btn btn-mini btn-success', id: "resubmit_track_request_#{track.id}"
|
|
|
|
|
- if can? :edit, track
|
|
|
|
|
= link_to 'Edit', edit_conference_program_track_path(@conference.short_title, track),
|
|
|
|
|
method: :get, class: 'btn btn-primary'
|
2017-06-08 12:25:33 +03:00
|
|
|
|
|
|
|
|
.row
|
|
|
|
|
.col-md-12
|
2017-07-14 15:57:34 +03:00
|
|
|
- if can? :new, @program.tracks.new
|
2017-06-08 12:25:33 +03:00
|
|
|
= link_to "New Track request", new_conference_program_track_path(@conference.short_title), class: 'btn btn-success pull-right'
|