diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-24 21:16:13 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-24 21:16:13 +0000 |
commit | 27ba8110cab5b09220a110f0e2f3af026582c9fc (patch) | |
tree | d54b665062b1dab40deff47ca519eca1ee251db0 /templates | |
parent | 3508380e994d80c6df1a287606a969c218d81694 (diff) | |
download | ampache-27ba8110cab5b09220a110f0e2f3af026582c9fc.tar.gz ampache-27ba8110cab5b09220a110f0e2f3af026582c9fc.tar.bz2 ampache-27ba8110cab5b09220a110f0e2f3af026582c9fc.zip |
democratic play working, if still slightly sketchy
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_democratic_playlist.inc.php | 7 | ||||
-rw-r--r-- | templates/show_manage_democratic.inc.php | 12 |
2 files changed, 12 insertions, 7 deletions
diff --git a/templates/show_democratic_playlist.inc.php b/templates/show_democratic_playlist.inc.php index eba142f4..5798d522 100644 --- a/templates/show_democratic_playlist.inc.php +++ b/templates/show_democratic_playlist.inc.php @@ -31,7 +31,7 @@ </colgroup> <?php if (!count($objects)) { - $playlist = new Playlist($tmp_playlist->base_playlist); + $playlist = new Playlist($democratic->base_playlist); ?> <tr> <td> @@ -63,15 +63,16 @@ foreach($objects as $row_id=>$object_data) { ?> <tr class="<?php echo flip_class(); ?>"> <td class="cel_action"> - <?php if ($tmp_playlist->has_vote($song_id)) { ?> + <?php if ($democratic->has_vote($song_id)) { ?> <?php } else { ?> <?php } ?> </td> - <td class="cel_votes"><?php echo scrub_out($tmp_playlist->get_vote($row_id)); ?></td> + <td class="cel_votes"><?php echo scrub_out($democratic->get_vote($row_id)); ?></td> <td class="cel_song"><?php echo $song->f_link . " / " . $song->f_album_link . " / " . $song->f_artist_link; ?></td> <td class="cel_time"><?php echo $song->f_time; ?></td> <?php if ($GLOBALS['user']->has_access(100)) { ?> <td class="cel_admin"> + <?php echo Ajax::button('?page=democratic&action=delete&row_id=' . $row_id,'delete',_('Delete'),'delete_row_' . $row_id); ?> </td> <?php } ?> </tr> diff --git a/templates/show_manage_democratic.inc.php b/templates/show_manage_democratic.inc.php index c490d856..c9612f23 100644 --- a/templates/show_manage_democratic.inc.php +++ b/templates/show_manage_democratic.inc.php @@ -30,19 +30,22 @@ show_box_top(_('Manage Democratic Playlists')); ?> <tr class="th-top"> <th class="cel_number"><?php echo _('Playlist'); ?></th> <th class="cel_base_playlist"><?php echo _('Base Playlist'); ?></th> - <th class="cel_vote_count"><?php echo _('Current Number of Votes'); ?></th> + <th class="cel_vote_count"><?php echo _('Songs'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> <?php foreach ($playlists as $democratic_id) { $democratic = new Democratic($democratic_id); $playlist = new Playlist($democratic->base_playlist); + $playlist->format(); ?> -<tr> +<tr class="<?php echo flip_class(); ?>"> <td><?php echo abs($democratic->id); ?></td> - <td><?php echo scrub_out($playlist->name); ?></td> + <td><?php echo $playlist->f_link; ?></td> <td><?php echo $democratic->count_items(); ?></td> - <td> </td> + <td> + <a href="<?php echo Config::get('web_path'); ?>/stream.php?action=democratic"><?php echo get_user_icon('all'); ?></a> + </td> </tr> <?php } if (!count($playlists)) { ?> <tr> @@ -50,6 +53,7 @@ show_box_top(_('Manage Democratic Playlists')); ?> </tr> <?php } ?> </table> +<br /> <div> <a class="button" href="<?php echo Config::get('web_path'); ?>/democratic.php?action=show_create"><?php echo _('Create New Playlist'); ?></a> </div> |