summaryrefslogtreecommitdiffstats
path: root/templates/show_tv_playlist.inc.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-13 06:04:12 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-13 06:04:12 +0000
commit70c2fedd2992bc2bf5309a9afcc8b810aa7f80ce (patch)
treeaa531656b9015821190546c382cb3756f0c435de /templates/show_tv_playlist.inc.php
parent4d053815c552e77ebbab55e9f48bacbea2559cd2 (diff)
downloadampache-70c2fedd2992bc2bf5309a9afcc8b810aa7f80ce.tar.gz
ampache-70c2fedd2992bc2bf5309a9afcc8b810aa7f80ce.tar.bz2
ampache-70c2fedd2992bc2bf5309a9afcc8b810aa7f80ce.zip
final commit before alpha2 release
Diffstat (limited to 'templates/show_tv_playlist.inc.php')
-rw-r--r--templates/show_tv_playlist.inc.php27
1 files changed, 24 insertions, 3 deletions
diff --git a/templates/show_tv_playlist.inc.php b/templates/show_tv_playlist.inc.php
index 150b0b05..94bb1c7b 100644
--- a/templates/show_tv_playlist.inc.php
+++ b/templates/show_tv_playlist.inc.php
@@ -21,19 +21,37 @@
/* Some defaults */
$web_path = conf('web_path');
?>
-<h3><?php echo _('Current Playlist'); ?></h3>
<table cellspacing="0">
+<?php
+if (!count($songs)) {
+ $playlist = new Playlist($tmp_playlist->base_playlist);
+?>
+<tr>
+ <td>
+ <?php echo _('Playing from base Playlist'); ?>:
+ <a href="<?php echo $web_path; ?>/playlist.php?action=show_playlist&amp;playlist_id=<?php echo $playlist->id; ?>">
+ <?php echo scrub_out($playlist->name); ?>
+ </a>
+ </td>
+</tr>
+<?php
+} // if no songs
+/* Else we have songs */
+else {
+?>
<tr class="table-header">
<td><?php echo _('Action'); ?></td>
<td><?php echo _('Votes'); ?></td>
<td><?php echo _('Song'); ?></td>
</tr>
<?php
+
+
foreach($songs as $row_id=>$song_id) {
$song = new Song($song_id);
$song->format_song();
?>
-<tr>
+<tr class="<?php echo flip_class(); ?>">
<td>
<?php if ($tmp_playlist->has_vote($song_id)) { ?>
<input class="button" type="button" value="-" onclick="ajaxPut('<?php echo conf('ajax_url'); ?>?action=vote&amp;object_id=<?php echo $song_id; ?>&amp;vote=-1<?php echo conf('ajax_info'); ?>')" />
@@ -44,5 +62,8 @@ foreach($songs as $row_id=>$song_id) {
<td><?php echo scrub_out($tmp_playlist->get_vote($row_id)); ?></td>
<td><?php echo scrub_out($song->title . ' / ' . $song->get_album_name()); ?></td>
</tr>
-<?php } ?>
+<?php
+ } // end foreach
+} // end else
+?>
</table>