summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/show_tv_playlist.inc.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/templates/show_tv_playlist.inc.php b/templates/show_tv_playlist.inc.php
index 19a2c80b..150b0b05 100644
--- a/templates/show_tv_playlist.inc.php
+++ b/templates/show_tv_playlist.inc.php
@@ -18,13 +18,15 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* Some defaults */
+$web_path = conf('web_path');
?>
<h3><?php echo _('Current Playlist'); ?></h3>
<table cellspacing="0">
<tr class="table-header">
+ <td><?php echo _('Action'); ?></td>
<td><?php echo _('Votes'); ?></td>
<td><?php echo _('Song'); ?></td>
- <td><?php echo _('Length'); ?></td>
</tr>
<?php
foreach($songs as $row_id=>$song_id) {
@@ -32,9 +34,15 @@ foreach($songs as $row_id=>$song_id) {
$song->format_song();
?>
<tr>
+ <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'); ?>')" />
+ <?php } else { ?>
+ <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'); ?>')" />
+ <?php } ?>
+ </td>
<td><?php echo scrub_out($tmp_playlist->get_vote($row_id)); ?></td>
- <td><?php echo scrub_out($song->title); ?></td>
- <td><?php echo scrub_out($song->length); ?></td>
+ <td><?php echo scrub_out($song->title . ' / ' . $song->get_album_name()); ?></td>
</tr>
<?php } ?>
</table>