PageRenderTime 473ms CodeModel.GetById 231ms app.highlight 2ms RepoModel.GetById 169ms app.codeStats 0ms

/root/_track.html

http://github.com/motemen/Teto
HTML | 25 lines | 25 code | 0 blank | 0 comment | 0 complexity | 059287dd6b6476c60cb16f74be70450d MD5 | raw file
 1% my ($track, $index, $control, $option) = @_;
 2% my $current_track_url = $control->queue->current_track && $control->queue->current_track->url || '';
 3% if ($track) {
 4  <li class="track <%= $_ % 2 ? 'odd' : 'even' %> <% if ($track->url eq $current_track_url) { %>playing<% } %> <% if ($track->is_system) { %>system<% } %>" data-track-index="<%= $index %>" tabindex="0">
 5%   if ($track->is_system) {
 6      <span class="title"><%= $track->title %></span>
 7%   } else {
 8%     if ($track->image) {
 9      <img src="<%= $track->image %>">
10%     }
11%     if (defined $track->title) {
12      <span class="title"><%= $track->title %></span>
13%     } else {
14      <span class="title not-loaded">(not loaded)</span>
15%     }
16    <br>
17    <a class="url" href="<%= $track->url %>"><%= $track->url %></a>
18    <span class="meta"><%= $track->has_buffer ? $track->peek_buffer_length : '-' %> bytes</span>
19    <span class="status"><%= $track->status %></span>
20%     if ($track->error) {
21      <span class="error"><%= $track->error %></span>
22%     }
23%   }
24  </li>
25% }