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
28 lines
1.6 KiB
Text
28 lines
1.6 KiB
Text
- compact_grid = @program.schedule_interval < 15
|
|
- cells_per_hour = 60 / @program.schedule_interval
|
|
/ use smaller cell heights for more compact grids
|
|
- cell_height = compact_grid ? 32 : 58
|
|
- date_event_schedules = @event_schedules.select{ |e| e.start_time.to_date.eql? date }
|
|
.row
|
|
- @rooms.each do |room|
|
|
- non_schedulable = room.tracks.self_organized.confirmed.any? do |track|
|
|
- !track.schedules.include?(@schedule) && (track.start_date..track.end_date).include?(date)
|
|
.col-md-2.col-xs-6{ class: ('non_schedulable' if non_schedulable) }
|
|
.room-name
|
|
- room_date_event_schedules = date_event_schedules.select{ |e| e.room == room }
|
|
= room.name
|
|
- (@conference.start_hour * cells_per_hour..@conference.end_hour * cells_per_hour).each do |slot|
|
|
- hour = slot / cells_per_hour
|
|
- minutes = (@program.schedule_interval * (slot % cells_per_hour)).to_s.rjust(2, '0')
|
|
- time = "#{hour}:#{minutes}"
|
|
.schedule-room-slot{ id: "schedule-room-#{room.guid}-#{hour}-#{minutes}", |
|
|
room_id: room.id, |
|
|
hour: time, |
|
|
date: date, |
|
|
style: "height: #{cell_height}px"}
|
|
.div
|
|
= time
|
|
- event_schedules = room_date_event_schedules.select{ |e| (e.start_time.hour.to_s + e.start_time.strftime(':%M')).eql? time }
|
|
- if event_schedules.any?
|
|
- event_schedule = event_schedules.first
|
|
= render partial: 'event', locals: { event: event_schedule.event, event_schedule_id: event_schedule.id}
|