diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-11-13 06:04:12 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-11-13 06:04:12 +0000 |
commit | 70c2fedd2992bc2bf5309a9afcc8b810aa7f80ce (patch) | |
tree | aa531656b9015821190546c382cb3756f0c435de /templates/show_tv_playlist.inc.php | |
parent | 4d053815c552e77ebbab55e9f48bacbea2559cd2 (diff) | |
download | ampache-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.php | 27 |
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&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&object_id=<?php echo $song_id; ?>&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> |