.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? = track.state - 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 %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"} = 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'