diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-10 19:05:42 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-10 19:05:42 +0000 |
commit | 0e26226af811a2a92c300ff28f3aa1ad47ae19f0 (patch) | |
tree | b5c083da4160cc61d0ac3aec21d9129f54f49937 /templates/show_democratic_playlist.inc.php | |
parent | 7114792a08c65a5429bfdf6bfaba267b9f88b019 (diff) | |
download | ampache-0e26226af811a2a92c300ff28f3aa1ad47ae19f0.tar.gz ampache-0e26226af811a2a92c300ff28f3aa1ad47ae19f0.tar.bz2 ampache-0e26226af811a2a92c300ff28f3aa1ad47ae19f0.zip |
initial work on democratic play, not finished, added drop down select for playtype switching back in, thinking about changing it and making it a row of icons... not sure
Diffstat (limited to 'templates/show_democratic_playlist.inc.php')
-rw-r--r-- | templates/show_democratic_playlist.inc.php | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/templates/show_democratic_playlist.inc.php b/templates/show_democratic_playlist.inc.php new file mode 100644 index 00000000..4838457b --- /dev/null +++ b/templates/show_democratic_playlist.inc.php @@ -0,0 +1,99 @@ +<?php +/* + + Copyright (c) 2001 - 2007 Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +?> +<table class="tabledata" cellpadding="0" cellspacing="0"> +<colgroup> + <col id="col_action" /> + <col id="col_votes" /> + <col id="col_song" /> + <col id="col_time" /> + <?php if ($GLOBALS['user']->has_access(100)) { ?> + <col id="col_admin" /> + <?php } ?> +</colgroup> +<?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="th-top"> + <th class="cel_action"><?php echo _('Action'); ?></th> + <th class="cel_votes"><?php echo _('Votes'); ?></th> + <th class="cel_song"><?php echo _('Song'); ?></th> + <th class="cel_time"><?php echo _('Time'); ?></th> + <?php if ($GLOBALS['user']->has_access(100)) { ?> + <th class="cel_admin"><?php echo _('Admin'); ?></th> + <?php } ?> +</tr> +<?php + + +foreach($songs as $row_id=>$song_id) { + $song = new Song($song_id); + $song->format_song(); +?> +<tr class="<?php echo flip_class(); ?>"> + <td class="cel_action"> + <?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 class="cel_votes"><?php echo scrub_out($tmp_playlist->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"> + <span onclick="ajaxPut('<?php echo conf('ajax_url'); ?>?action=tv_admin&cmd=delete&track_id=<?php echo $song_id; ?><?php echo conf('ajax_info'); ?>')" /> + <?php echo get_user_icon('delete'); ?> + </span> + </td> + <?php } ?> +</tr> +<?php + } // end foreach +?> +<tr class="th-bottom"> + <th class="cel_action"><?php echo _('Action'); ?></th> + <th class="cel_votes"><?php echo _('Votes'); ?></th> + <th class="cel_song"><?php echo _('Song'); ?></th> + <th class="cel_time"><?php echo _('Time'); ?></th> + <?php if ($GLOBALS['user']->has_access(100)) { ?> + <th class="cel_admin"><?php echo _('Admin'); ?></th> + <?php } ?> +</tr> +<?php +} // end else +?> +</table> |