jam-cloud/web/app/views/shared/_landing_sidebar.html.erb

44 lines
1.8 KiB
Plaintext

<div class="landing-sidebar" style="z-index:900;"><br />
<h2>More by <%= user.name %>:</h2><br />
<% recent_history.each do |history_record| %>
<% if history_record.instance_of? Recording %>
<div class="grey f16">
<em><%= history_record.created_at.strftime("%b #{history_record.created_at.day.ordinalize}") %>:</em>
</div>
<div class="f16">
<span class="orange"><strong>RECORDING:</strong></span>
<a recording-id="<%= history_record.claimed_recordings.first.id %>" hoveraction="recording" href="/recordings/<%= history_record.claimed_recordings.first.id %>" class="white"><%= history_record.claimed_recordings.first.name %></a>
</div>
<div class="f13 lightgrey"><%= history_record.claimed_recordings.first.description %></div>
<% elsif history_record.instance_of? MusicSessionHistory %>
<div class="grey f16">
<em>
<% if history_record.session_removed_at.blank? %>
Now:
<% else %>
<%= history_record.session_removed_at.strftime("%b #{history_record.session_removed_at.day.ordinalize}") %>:
<% end %>
</em>
</div>
<div class="f16">
<span class="teal"><strong>SESSION:</strong></span>&nbsp;
<% if history_record.session_removed_at.blank? %>
<a session-id="<%= history_record.music_session_id %>" hoveraction="session" href="/sessions/<%= history_record.music_session_id %>" class="white">Live Session in Progress</a>
<% else %>
<span class="grey">Session Ended. Unavailable.</span>
<% end %>
</div>
<div class="f13 lightgrey"><%= history_record.description %></div>
<% end %>
<% if history_record != recent_history.last %>
<br /><br />
<% end %>
<% end %>
</div>