Show the individual User schedule
Show the current user favourites events for both schedule and all events. Unsed css removed.
This commit is contained in:
parent
c6906675f9
commit
059b5cbf84
8 changed files with 40 additions and 23 deletions
|
|
@ -29,9 +29,10 @@
|
|||
%td.room{ style: "height: #{ td_height(@rooms) }px;" }
|
||||
.room.elipsis.break-words{ style: "-webkit-line-clamp: #{ room_lines(@rooms) }; height: #{ room_height(@rooms) }px;" }
|
||||
= room.name
|
||||
|
||||
- event_schedules = (@event_schedules_by_room_id[room.id] || []).select{ |e| (e.end_time > start_time) && (e.start_time <= (start_time + hrs_per_slide.hour)) }
|
||||
|
||||
- event_schedules = event_schedules.select{ |e| e.event.favourite_users.exists?(current_user.id) } if current_user && @favourites
|
||||
|
||||
- interval_count.times do |offset|
|
||||
- if span > 1
|
||||
- span -= 1
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@
|
|||
|
||||
= canceled_replacement_event_label(event, event_schedule, 'schedule-label')
|
||||
|
||||
- if current_user
|
||||
= link_to('#', onClick: 'starClicked();') do
|
||||
%span#star{ class: "fa fa-lg #{ event.favourite_users.exists?(current_user.id) ? 'fa-star' : 'fa-star-o' }", |
|
||||
"aria-hidden" =>"true", |
|
||||
"data-url" => conference_program_proposal_path(@conference.short_title, event.id), |
|
||||
"data-user" => current_user.id }
|
||||
= event.title
|
||||
|
||||
- if current_user
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
/ Nav tabs
|
||||
%ul.nav.nav-tabs{ role: "tablist" }
|
||||
%li{ class: "schedule #{ 'active' if active == 'schedule' }", role: "presentation" }
|
||||
= link_to('Schedule', conference_schedule_path(@conference.short_title))
|
||||
= link_to('Schedule', conference_schedule_path(@conference.short_title, favourites: @favourites))
|
||||
%li{ class: "program #{ 'active' if active == 'program' }", role: "presentation" }
|
||||
= link_to('All events', events_conference_schedule_path(@conference.short_title))
|
||||
= link_to('All events', events_conference_schedule_path(@conference.short_title, favourites: @favourites))
|
||||
|
|
|
|||
|
|
@ -5,6 +5,13 @@
|
|||
%h1.text-center
|
||||
Program for
|
||||
= @conference.title
|
||||
- if current_user
|
||||
.row
|
||||
.col-md-12.text-center
|
||||
= button_to (@favourites ? 'All events' : 'Only favourites events'),
|
||||
events_conference_schedule_path(@conference.short_title),
|
||||
params: { favourites: !@favourites },
|
||||
method: :get, class: 'btn btn-success'
|
||||
.dropdown.program-dropdown
|
||||
%button{ type: "button", class: "btn btn-default dropdown-toggle", 'data-toggle' => "dropdown" }
|
||||
Dates
|
||||
|
|
|
|||
|
|
@ -5,6 +5,13 @@
|
|||
%h1.text-center
|
||||
Schedule for
|
||||
= @conference.title
|
||||
- if current_user
|
||||
.row
|
||||
.col-md-12.text-center
|
||||
= button_to (@favourites ? 'All events' : 'Only favourites events'),
|
||||
conference_schedule_path(@conference.short_title),
|
||||
params: { favourites: !@favourites },
|
||||
method: :get, class: 'btn btn-success'
|
||||
.dropdown.schedule-dropdown
|
||||
%button{ type: "button", class: "btn btn-default dropdown-toggle", 'data-toggle' => "dropdown" }
|
||||
= @day
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue