mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Add track association to schedule Show schedules in admin sidebar to track organizers Allow track organizers to manage the schedules of their tracks Don't allow self-organized track events to be dragged or unscheduled in a conference schedule Make scheduled events of self-organized tracks appear semitransparent in conference schedules Make the rooms of confirmed self_organized tracks appear semitransparent and don't allow events to be scheduled to it in the conference schedules during the dates of its track Create admin/SchedulesController#new action Add a button in admin/Schedules#index to create schedules for tracks Add self_organized scope to Track Modify Schedules#show to handle track schedules and show a unified schedule Allow track organizers to create new schedules for their tracks Correctly identify scheduled and unscheduled events in Schedules#events Fix Event#room and Event#time for when the event is scheduled in a track schedule Modify Program#selected_event_schedules to include the event_schedules of selected track schedules Modify Track#revoke_role_and_cleanup to destroy the track's schedules and revert its events' state to new Add tabs for conference and track schedules in admin/Schedules#index Add button to Create/Show a tracks schedule in Tracks#index and #show Fix concurrent_events in application_helper because of changes in Program#selected_event_schedules Do not take into account cfp_active in Event#valid_track Modify EventsController#get_tracks accordingly Enforce cfp_active of track to be enabled for proposals in ProposalsController#create and #update Add support for multiple schedules per track Add selected_schedule_id to Track Load EventSchedules of selected track schedules for conference schedules in admin/SchedulesController#show Modify SchedulesController#show to take into account only the selected track schedules Create Event#selected_schedule_id and use it in Event#scheduled? and Event#time Validate that an EventSchedule for an event of a self-organized track belongs to one of the track's schedules Add 'Manage' button in Tracks#index, #show that sends you to the admin side of things Add admin/TracksController#update_selected_schedule to update the selected_schedule_id of tracks
134 lines
5.1 KiB
Text
134 lines
5.1 KiB
Text
.unobtrusive-flash-container
|
|
.row
|
|
.col-md-12
|
|
.page-header
|
|
%h1
|
|
= @track.name
|
|
Track
|
|
|
|
.tabbable
|
|
%ul.nav.nav-tabs
|
|
%li.active
|
|
= link_to 'Details', '#details', 'data-toggle' => 'tab'
|
|
%li
|
|
= link_to 'Events', '#events', 'data-toggle' => 'tab'
|
|
|
|
.tab-content
|
|
.tab-pane.active#details
|
|
.row
|
|
.col-md-12
|
|
.btn-group.pull-right
|
|
- if can? :edit, @track
|
|
= link_to 'Edit', edit_admin_conference_program_track_path(@conference.short_title, @track),
|
|
method: :get, class: 'btn btn-primary'
|
|
- special_style = true
|
|
- 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" }
|
|
- if @track.self_organized?
|
|
- if @track.selected_schedule
|
|
- if can? :show, @track.selected_schedule
|
|
= link_to 'Show Schedule', admin_conference_schedule_path(@conference.short_title, @track.selected_schedule),
|
|
class: 'btn btn-default'
|
|
- elsif can? :create, @program.schedules.build(track: @track)
|
|
= button_to 'Create Schedule', admin_conference_schedules_path(@conference.short_title),
|
|
form: { class: 'btn', style: 'padding: 0px 0px; margin-top: -1px;' }, class: 'btn btn-default',
|
|
style: ('border-top-left-radius: 0; border-bottom-left-radius: 0;' if special_style), params: { 'schedule[track_id]' => @track.id }
|
|
.row
|
|
.col-md-12
|
|
%table.table
|
|
%tr
|
|
%td.col-md-2
|
|
%b Color
|
|
%td
|
|
%span.label{ style: "background-color: #{@track.color}; color: #{ contrast_color(@track.color) }" }
|
|
= @track.color
|
|
%tr
|
|
%td
|
|
%b Room
|
|
%td
|
|
= @track.room.try(:name)
|
|
%tr
|
|
%td
|
|
%b Start date
|
|
%td
|
|
= @track.start_date.strftime('%A, %B %-d. %Y') if @track.start_date
|
|
%tr
|
|
%td
|
|
%b End date
|
|
%td
|
|
= @track.end_date.strftime('%A, %B %-d. %Y') if @track.end_date
|
|
- if @track.self_organized?
|
|
%tr
|
|
%td
|
|
%b Submitter
|
|
%td
|
|
= link_to @track.submitter.name, admin_user_path(@track.submitter)
|
|
- if @track.confirmed?
|
|
%tr
|
|
%td
|
|
%b Organizers
|
|
%td
|
|
- Role.find_by(name: 'track_organizer', resource: @track).users.each do |organizer|
|
|
%div
|
|
= link_to organizer.name, admin_user_path(organizer)
|
|
%tr
|
|
%td
|
|
%b Included in the Cfp?
|
|
%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' }
|
|
%tr
|
|
%td
|
|
%b State
|
|
%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
|
|
%tr
|
|
%td
|
|
%b Description
|
|
%td
|
|
= markdown(@track.description)
|
|
- if @track.self_organized?
|
|
%tr
|
|
%td
|
|
%b Relevance
|
|
%td
|
|
= markdown(@track.relevance)
|
|
|
|
.tab-pane#events
|
|
.col-md-12
|
|
%table.table.table-hover.datatable
|
|
%thead
|
|
%th Title
|
|
%th Type
|
|
%th Submitter
|
|
%th State
|
|
%th Time
|
|
%tbody
|
|
- @track.events.each_with_index do |event|
|
|
%tr
|
|
%td
|
|
=link_to event.title, admin_conference_program_event_path(@conference.short_title, event)
|
|
%td
|
|
= event.event_type.title
|
|
%td
|
|
=link_to event.submitter.name, admin_user_path(event.submitter)
|
|
%td
|
|
= event.state
|
|
%td
|
|
= event.time
|