summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-11-24 21:48:22 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-11-24 21:48:22 +0000
commit6e299a7f63b5b5f056667dee6788fe4c5626be5f (patch)
treea4e9b70bd393d7dc260b32b347aaec74f2da9409 /templates
parent27ba8110cab5b09220a110f0e2f3af026582c9fc (diff)
downloadampache-6e299a7f63b5b5f056667dee6788fe4c5626be5f.tar.gz
ampache-6e299a7f63b5b5f056667dee6788fe4c5626be5f.tar.bz2
ampache-6e299a7f63b5b5f056667dee6788fe4c5626be5f.zip
fixed voting up/down and removal of songs from democratic playlist after playback
Diffstat (limited to 'templates')
-rw-r--r--templates/show_democratic_playlist.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/show_democratic_playlist.inc.php b/templates/show_democratic_playlist.inc.php
index 5798d522..cff55b41 100644
--- a/templates/show_democratic_playlist.inc.php
+++ b/templates/show_democratic_playlist.inc.php
@@ -63,8 +63,10 @@ foreach($objects as $row_id=>$object_data) {
?>
<tr class="<?php echo flip_class(); ?>">
<td class="cel_action">
- <?php if ($democratic->has_vote($song_id)) { ?>
+ <?php if ($democratic->has_vote($song->id)) { ?>
+ <?php echo Ajax::button('?page=democratic&action=delete_vote&row_id=' . $row_id,'thumb_down',_('Remove Vote'),'remove_vote_' . $row_id); ?>
<?php } else { ?>
+ <?php echo Ajax::button('?page=democratic&action=add_vote&object_id=' . $song->id . '&type=' . scrub_out($object_data['1']),'thumb_up',_('Add Vote'),'remove_vote_' . $row_id); ?>
<?php } ?>
</td>
<td class="cel_votes"><?php echo scrub_out($democratic->get_vote($row_id)); ?></td>