app/views/open_conference_ware/proposals/_list_concise.html.erb
<%
# 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
%>
<ul class='calendar_items'>
<% 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?(OpenConferenceWare::ScheduleItem)
%>
<li class='<%= item_class %>' id='<%= item.class.name.demodulize.underscore %>-<%= item.id %>'>
<div class='concise'>
<% if item.is_a?(OpenConferenceWare::ScheduleItem) %>
<span class='summary'><%= h item.title %></span>
<% else %>
<%= user_favorite_control_for item %>
<%= link_to h(item.title), session_path(item), :class => 'url summary' %>
<% end %>
<% if !hide_rooms && room %>
<span class='room'><%= h room.name %></span>
<% end %>
</div>
<ul class='session_info'>
<li>
<strong>Title:</strong>
<% if item.is_a?(OpenConferenceWare::ScheduleItem) %>
<%= h item.title %>
<% else %>
<%= link_to h(item.title), session_path(item) %>
<% end %>
</li>
<% if track %>
<li>
<strong>Track:</strong>
<%= link_to h(track.title), event_track_path(@event,track), :class => track_css_class(track) %>
</li>
<% end %>
<% if room %>
<li class='location'>
<strong>Room:</strong>
<%= link_to h(room.name), event_room_path(@event,room) %>
</li>
<% end %>
<% if item.start_time && @event.schedule_published? %>
<li class='time'>
<strong>Time:</strong>
<%= normalize_time(item, :context => item.start_time.to_date )%>
</li>
<% end %>
<% unless item.excerpt.blank? %>
<li>
<div class='description'>
<strong>Excerpt:</strong>
<%= display_textile_for item.excerpt %>
</div>
</li>
<% end %>
<% if multiple_presenters? %>
<% users = \
if item.respond_to?(:users)
# A proposal
if @users_for_proposal_hash
# Trust the cache
@users_for_proposal_hash[item.id] || []
else
# No cache, use association
item.users
end
else
# Not a propsal
[]
end %>
<% end %>
<% unless users.empty? %>
<li>
<strong>Speakers:</strong>
<%= users.map{|user| link_to(h(user.fullname), user_path(user))}.join(', ').html_safe %>
</li>
<% end %>
</ul>
</li>
<% end %>
</ul>