mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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
87 lines
3.3 KiB
Text
87 lines
3.3 KiB
Text
.row
|
|
.col-md-12
|
|
.page-header
|
|
%h1 Tracks
|
|
%p.text-muted
|
|
Categorize events in your conference
|
|
.row
|
|
.col-md-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 Room
|
|
%th Start Date
|
|
%th End Date
|
|
%th Actions
|
|
%tbody
|
|
- @tracks.each do |track|
|
|
%tr
|
|
%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?
|
|
.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
|
|
= 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)
|
|
- else
|
|
N/A
|
|
%td
|
|
- 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
|
|
.btn-group{role: "group"}
|
|
- 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',
|
|
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'
|