%
# Display a concise summary of calendar items.
#
# Locals:
# * items => Array of Proposal and ScheduleItem records to display. REQUIRED.
# * hide_rooms => Hide room name on the item row listing? Defaults to false, which shows the room.
hide_rooms ||= false
%>
<% items.each do |item|
# Use prefetched values
track = item.respond_to?(:track_id) ? (@tracks_hash.try(:fetch, item.track_id, nil) || item.track) : nil
room = item.respond_to?(:room_id) ? (@rooms_hash.try(:fetch, item.room_id, nil) || item.room) : nil
# Establish classs
item_class = 'vevent'
item_class << ' light ' << track_css_class(track) if track
item_class << ' generic_item' if item.is_a?(ScheduleItem)
%>
-
<% if item.is_a?(ScheduleItem) %>
<%= h item.title %>
<% else %>
<%= user_favorite_control_for item %>
<%= link_to h(item.title), session_path(item), :class => 'url summary' %>
<% end %>
<% if !hide_rooms && room %>
<%= h room.name %>
<% end %>
<% end %>