-<% end %>
-
-<%
-if false
- table = $timetable.fetch(item[:day]).fetch(:by_index)
- interval = $timetable.fetch(item[:day]).fetch(:interval)
-
- unslug = lambda{|slug| slug == item[:slug]}
- sort = lambda{|e| [e[:start_time], e[:end_time], e[:room_rank], e[:conference_room_id]]}
-
- concurrent_events = begin
- require 'set'
- s = Set.new
- (item[:start_time_index]..item[:end_time_index]).each do |i|
- table[i].each do |slug|
- s << slug
- end
- end
- s.reject(&unslug).map(&$to_event).sort_by(&sort)
- end
-
- next_up_minutes = 30
- next_up = begin
- require 'set'
- (item[:end_time_index]..item[:end_time_index] + (next_up_minutes / interval)).each do |i|
- (table[i] or []).each do |slug|
- s << slug
- end
- end
- s.reject(&unslug).map(&$to_event).sort_by(&sort)
- end
-
- next_in_same_room_limit = 3
- next_in_same_room = begin
- require 'set'
- list = room(item[:room])[:events_by_day].fetch(item[:day].to_sym)
- i = 0
- while i < list.size
- break if list[i] == item[:slug]
- i += 1
- end
- raise "failed to find the event item in the list of events in the same room" unless i < list.size
- list[(i+1)..(i+next_in_same_room_limit)].map(&$to_event)
- end
-
- [
- ['sametime', "Concurrent events", concurrent_events],
- ['sameroom', "Next (up to #{next_in_same_room_limit}) talks in the same room (#{@item[:room_name]})", next_in_same_room],
- ['upcoming', "Events that start after this one (within #{next_up_minutes} minutes)", next_up],
- ].each do |anchor, heading, event_list|
- unless event_list.empty?
- %>
-
<%= heading %>:
+
+
+<% end %> <% if item[:attachments] and not item[:attachments].empty? %>
+
Attachments
+
+ <% item[:attachments].each do |a| ai = $item_by_id.fetch(a[:identifier]) title
+ = a[:title] ? a[:title] : ai[:title] icon = case ai[:media] when 'slides'
+ 'list' when 'video' 'facetime-video' when 'audio' 'music' when 'paper' 'book'
+ else 'download' end %>
+
+<% end %> <% if false table = $timetable.fetch(item[:day]).fetch(:by_index)
+interval = $timetable.fetch(item[:day]).fetch(:interval) unslug = lambda{|slug|
+slug == item[:slug]} sort = lambda{|e| [e[:start_time], e[:end_time],
+e[:room_rank], e[:conference_room_id]]} concurrent_events = begin require 'set'
+s = Set.new (item[:start_time_index]..item[:end_time_index]).each do |i|
+table[i].each do |slug| s << slug end end
+s.reject(&unslug).map(&$to_event).sort_by(&sort) end next_up_minutes = 30
+next_up = begin require 'set' (item[:end_time_index]..item[:end_time_index] +
+(next_up_minutes / interval)).each do |i| (table[i] or []).each do |slug| s <<
+slug end end s.reject(&unslug).map(&$to_event).sort_by(&sort) end
+next_in_same_room_limit = 3 next_in_same_room = begin require 'set' list =
+room(item[:room])[:events_by_day].fetch(item[:day].to_sym) i = 0 while i <
+list.size break if list[i] == item[:slug] i += 1 end raise "failed to find the
+event item in the list of events in the same room" unless i < list.size
+list[(i+1)..(i+next_in_same_room_limit)].map(&$to_event) end [ ['sametime',
+"Concurrent events", concurrent_events], ['sameroom', "Next (up to
+#{next_in_same_room_limit}) talks in the same room (#{@item[:room_name]})",
+next_in_same_room], ['upcoming', "Events that start after this one (within
+#{next_up_minutes} minutes)", next_up], ].each do |anchor, heading, event_list|
+unless event_list.empty? %>
+
+
<%= heading %>:
-
-
When
-
Title
-
Track
-
Where
-
-
- <% event_list.each do |e| %>
-
-
<%= e[:start_time] %>-<%= e[:end_time] %>
-
<%= l(e) %>
-
<%= l(track(e[:track])) %>
-
<%= l(room(e[:room])) %>
-
- <% end %>
-
+
+
When
+
Title
+
Track
+
Where
+
+
+ <% event_list.each do |e| %>
+
+
<%= e[:start_time] %>-<%= e[:end_time] %>
+
<%= l(e) %>
+
<%= l(track(e[:track])) %>
+
<%= l(room(e[:room])) %>
+
+ <% end %>
+
-<% end %>
-<% end %>
-<% end %>
+<% end %> <% end %> <% end %>