summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-05 21:48:43 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-05 21:48:43 +0000
commita8589cef1e311a032a67ecdc61e2b73197373288 (patch)
treecfd486596c2126247acfca5a026db2c27cf06277 /templates
parentf24fa20acbd2d7ff7175dab391e75f743c634e87 (diff)
downloadampache-a8589cef1e311a032a67ecdc61e2b73197373288.tar.gz
ampache-a8589cef1e311a032a67ecdc61e2b73197373288.tar.bz2
ampache-a8589cef1e311a032a67ecdc61e2b73197373288.zip
working democratic play
Diffstat (limited to 'templates')
-rw-r--r--templates/show_tv.inc.php2
-rw-r--r--templates/show_tv_adminctl.inc.php3
-rw-r--r--templates/show_tv_nowplaying.inc.php21
-rw-r--r--templates/show_tv_playlist.inc.php40
-rw-r--r--templates/sidebar.inc.php5
5 files changed, 70 insertions, 1 deletions
diff --git a/templates/show_tv.inc.php b/templates/show_tv.inc.php
index 8a556d86..fd29bff7 100644
--- a/templates/show_tv.inc.php
+++ b/templates/show_tv.inc.php
@@ -51,6 +51,8 @@ else {
</div>
<!-- End Control Div -->
<div id="tv_np">
+<?php require_once(conf('prefix') . '/templates/show_tv_nowplaying.inc.php'); ?>
</div>
<div id="tv_playlist">
+<?php require_once(conf('prefix') . '/templates/show_tv_playlist.inc.php'); ?>
</div>
diff --git a/templates/show_tv_adminctl.inc.php b/templates/show_tv_adminctl.inc.php
index f2c383f1..77becb35 100644
--- a/templates/show_tv_adminctl.inc.php
+++ b/templates/show_tv_adminctl.inc.php
@@ -29,5 +29,6 @@
<input type="submit" value="<?php echo _('Activate'); ?>" />
</form>
<?php } else { ?>
-<?php echo _('Democratic Play Active'); ?>
+<?php echo _('Democratic Play Active'); ?>&nbsp;
+<a href="<?php echo $tmp_playlist->get_vote_url(); ?>"><?php echo _('Play'); ?></a>
<?php } ?>
diff --git a/templates/show_tv_nowplaying.inc.php b/templates/show_tv_nowplaying.inc.php
new file mode 100644
index 00000000..5823f537
--- /dev/null
+++ b/templates/show_tv_nowplaying.inc.php
@@ -0,0 +1,21 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2006 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.
+
+*/
+?>
diff --git a/templates/show_tv_playlist.inc.php b/templates/show_tv_playlist.inc.php
new file mode 100644
index 00000000..19a2c80b
--- /dev/null
+++ b/templates/show_tv_playlist.inc.php
@@ -0,0 +1,40 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2006 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.
+
+*/
+?>
+<h3><?php echo _('Current Playlist'); ?></h3>
+<table cellspacing="0">
+<tr class="table-header">
+ <td><?php echo _('Votes'); ?></td>
+ <td><?php echo _('Song'); ?></td>
+ <td><?php echo _('Length'); ?></td>
+</tr>
+<?php
+foreach($songs as $row_id=>$song_id) {
+ $song = new Song($song_id);
+ $song->format_song();
+?>
+<tr>
+ <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>
+</tr>
+<?php } ?>
+</table>
diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php
index cd620975..ff61c4f8 100644
--- a/templates/sidebar.inc.php
+++ b/templates/sidebar.inc.php
@@ -196,6 +196,11 @@ $web_path = conf('web_path');
</li>
<?php } // if horizontal orientation ?>
<?php } // if localplay access ?>
+<?php if ($GLOBALS['user']->prefs['play_type'] == 'democratic') { ?>
+ <li>
+ <a href="<?php echo $web_path; ?>/tv.php"><?php echo _('Democratic View'); ?></a>
+ </li>
+<?php } // if democratic play ?>
<?php if (conf('use_auth')) { ?>
<li><a href="<?php echo $web_path; ?>/logout.php"><?php echo _('Logout'); ?></a></li>
<?php } // end (conf('use_auth'))?>