mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
About track requests: Create migration that adds the fields submitter_id, state, and cfp_active to Tracks Add validations and the self_organized? method to the Track model Create a new TracksController outide of the admin namespace Create the relevant views for index, show, new and edit Modify the admin views for tracks to include extra info for self-organized tracks About track organizers: Create the role when a self-organized track is created Define track organizer abilities Modify the roles views and controller to handle the new role The route for Roles#edit needs to have higher priority than the nested routes for track roles, otherwise, the word edit in the url is matched as a track with short_name edit
64 lines
2.4 KiB
Text
64 lines
2.4 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 Actions
|
|
%tbody
|
|
- @tracks.each do |track|
|
|
%tr
|
|
%td
|
|
= link_to(admin_conference_program_track_path(@conference.short_title, track.short_name)) 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
|
|
N/A
|
|
%td
|
|
- if track.self_organized?
|
|
= check_box_tag "#{@conference.short_title}_#{track.id}", track.id, track.cfp_active,
|
|
class: 'switch-checkbox', method: :patch,
|
|
url: toggle_cfp_inclusion_admin_conference_program_track_path(@conference.short_title, id: track.id)+"?included=",
|
|
data: { size: 'small',
|
|
on_color: 'success',
|
|
off_color: 'warning',
|
|
on_text: 'Yes',
|
|
off_text: 'No' }
|
|
- else
|
|
%i.fa.fa-check
|
|
%td
|
|
.btn-group{role: "group"}
|
|
= link_to 'Edit', edit_admin_conference_program_track_path(@conference.short_title, track.short_name),
|
|
method: :get, class: 'btn btn-primary'
|
|
= link_to 'Delete', admin_conference_program_track_path(@conference.short_title, track.short_name),
|
|
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'
|