diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-11-12 20:10:22 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-11-12 20:10:22 +0000 |
commit | 85a3474424ec5ea06be2f0f27198c9ba7f739af9 (patch) | |
tree | 6c33ccb31e1baff46c83ccbe393382e55c5cbcb6 /templates/show_tv_playlist.inc.php | |
parent | 229ae80fc9b3ae7157ff216330575efae5ec80b5 (diff) | |
download | ampache-85a3474424ec5ea06be2f0f27198c9ba7f739af9.tar.gz ampache-85a3474424ec5ea06be2f0f27198c9ba7f739af9.tar.bz2 ampache-85a3474424ec5ea06be2f0f27198c9ba7f739af9.zip |
added ability to vote songs up and down in democratic play and fixed a problem with ajax not resetting the gettext() and not having a user or session
Diffstat (limited to 'templates/show_tv_playlist.inc.php')
-rw-r--r-- | templates/show_tv_playlist.inc.php | 14 |
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&object_id=<?php echo $song_id; ?>&vote=-1<?php echo conf('ajax_info'); ?>')" /> + <?php } else { ?> + <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'); ?>')" /> + <?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> |