PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/root/_playlist.html

http://github.com/motemen/Teto
HTML | 16 lines | 13 code | 3 blank | 0 comment | 0 complexity | 529cb4d94cc8dda706d96d5aad1fa4aa MD5 | raw file
 1% my $playlist = $_[0]{playlist};
 2% my $control  = $_[0]{control};
 3
 4      <h1><% if ($playlist->image) { %><img src="<%= $playlist->image %>"> <% } %><a href="<%= $playlist->url %>" class="title"><%= $playlist->title || $playlist->url %></a> <a href="<%= $playlist->url %>" class="url"><%= eval { $playlist->url->host . $playlist->url->path_query } || '' %></a>
 5      <button onclick="$.post('/api/play', { playlist: '<%= $playlist->url %>' }).success(function () { location.reload() })">Play</button>
 6      </h1>
 7
 8
 9      <div class="playlist">
10        <ol>
11%       for (0 .. $#{ $playlist->tracks }) {
12%         my $track = $playlist->tracks->[$_];
13%=        $_mt->render_file('_track.html', $track, $_, $control);
14%       }
15        </ol>
16      </div>