diff --git a/app/assets/stylesheets/osem-schedule.css.scss b/app/assets/stylesheets/osem-schedule.css.scss index 587cde8d..206a0c70 100644 --- a/app/assets/stylesheets/osem-schedule.css.scss +++ b/app/assets/stylesheets/osem-schedule.css.scss @@ -184,6 +184,24 @@ td.no-padding{ display: inline-block; } +.program-dropdown{ + margin-left: 20%; + margin-right: 20%; + margin-top: 40px; +} + +.program-dropdown > button{ + width: 100%; +} + +.program-dropdown > .dropdown-menu{ + width: 100%; +} + +.no-events-day{ + color: #D8D8D8 !important; +} + /* Small devices (tablets, 768px and up) */ @media (min-width: 768px) { .room, .event-title{ diff --git a/app/models/program.rb b/app/models/program.rb index be8f56a9..ffbb5ef0 100644 --- a/app/models/program.rb +++ b/app/models/program.rb @@ -91,6 +91,17 @@ class Program < ActiveRecord::Base self.languages.split(',').map {|l| ISO_639.find(l).english_name} if self.languages.present? end + ## + # Checks if there is any event in the program that starts in the given date + # + # ====Returns + # * +True+ -> If there is any event for the given date + # * +False+ -> If there is not any event for the given date + def any_event_for_this_date?(date) + parsed_date = DateTime.parse("#{date} 00:00").utc + events.where(start_time: parsed_date..(parsed_date + 1)).any? + end + private ## diff --git a/app/views/conference/_all_events.html.erb b/app/views/conference/_all_events.html.erb index 6d7ac5e1..59175100 100644 --- a/app/views/conference/_all_events.html.erb +++ b/app/views/conference/_all_events.html.erb @@ -1,4 +1,24 @@