summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-15 09:28:23 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-15 09:28:23 +0000
commitad6644d6cb748929108dad3143021e85ed048906 (patch)
tree34dce627a366ae1e6a1b19280c2cb7c7a36e55ff /templates
parent9c30aa01fec45685f2cd12db63f031cd4d1ce422 (diff)
downloadampache-ad6644d6cb748929108dad3143021e85ed048906.tar.gz
ampache-ad6644d6cb748929108dad3143021e85ed048906.tar.bz2
ampache-ad6644d6cb748929108dad3143021e85ed048906.zip
fixed some localplay issues
Diffstat (limited to 'templates')
-rw-r--r--templates/default.css11
-rw-r--r--templates/show_localplay.inc.php28
-rw-r--r--templates/show_localplay_playlist.inc.php52
3 files changed, 63 insertions, 28 deletions
diff --git a/templates/default.css b/templates/default.css
index d746e7f8..a8bda27d 100644
--- a/templates/default.css
+++ b/templates/default.css
@@ -5,9 +5,8 @@
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
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
+ 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
@@ -648,6 +647,12 @@ li.current-rating{
#tv_left {
float:left;
}
+
+/* Localplay Styles */
+.lp_current {
+ font-weight: bold;
+}
+
/* User Online/Offline style, used in users.php */
td.user_online {
background-color: green;
diff --git a/templates/show_localplay.inc.php b/templates/show_localplay.inc.php
index 0ad5938c..206389d2 100644
--- a/templates/show_localplay.inc.php
+++ b/templates/show_localplay.inc.php
@@ -22,7 +22,6 @@
$web_path = conf('web_path');
$localplay = init_localplay();
-$songs = $localplay->get();
?>
<?php show_box_top(ucfirst($localplay->type) . ' ' . _('Localplay')); ?>
<table>
@@ -41,28 +40,7 @@ $songs = $localplay->get();
<?php show_box_top(_('Current Playlist')); ?>
-<table class="border" cellspacing="0" border="0">
-<tr class="table-header">
- <th><?php echo _('Track'); ?></th>
- <th><?php echo _('Name'); ?></th>
- <th><?php echo _('Action'); ?></th>
-</tr>
-<?php foreach ($songs as $song) { ?>
-<tr class="<?php echo flip_class(); ?>">
- <td>
- <?php echo scrub_out($song['track']); ?>
- </td>
- <td>
- <?php echo $localplay->format_name($song['name'],$song['id']); ?>
- </td>
- <td>
- <a href="<?php echo $web_path; ?>/localplay.php?action=delete_song&amp;song_id=<?php echo $song['id']; ?>"><?php echo _('Delete'); ?></a>
- </td>
-</tr>
-<?php } if (!count($songs)) { ?>
-<tr class="<?php echo flip_class(); ?>">
- <td colspan="3"><span class="error"><?php echo _('No Records Found'); ?></span></td>
-</tr>
-<?php } ?>
-</table>
+<div id="lp_playlist">
+<?php require_once(conf('prefix') . '/templates/show_localplay_playlist.inc.php'); ?>
+</div>
<?php show_box_bottom(); ?>
diff --git a/templates/show_localplay_playlist.inc.php b/templates/show_localplay_playlist.inc.php
new file mode 100644
index 00000000..4fec41f3
--- /dev/null
+++ b/templates/show_localplay_playlist.inc.php
@@ -0,0 +1,52 @@
+<?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.
+
+*/
+
+$songs = $localplay->get();
+$status = $localplay->status();
+?>
+<table cellspacing="0">
+<tr class="table-header">
+ <th><?php echo _('Track'); ?></th>
+ <th><?php echo _('Name'); ?></th>
+ <th><?php echo _('Action'); ?></th>
+</tr>
+<?php
+foreach ($songs as $song) {
+ $class = '';
+ if ($status['track'] == $song['track']) { $class=' class="lp_current"'; }
+?>
+<tr class="<?php echo flip_class(); ?>">
+ <td>
+ <?php echo scrub_out($song['track']); ?>
+ </td>
+ <td<?php echo $class; ?>>
+ <?php echo $localplay->format_name($song['name'],$song['id']); ?>
+ </td>
+ <td>
+ <a href="<?php echo $web_path; ?>/localplay.php?action=delete_song&amp;song_id=<?php echo scrub_out($song['id']); ?>"><?php echo _('Delete'); ?></a>
+ </td>
+</tr>
+<?php } if (!count($songs)) { ?>
+<tr class="<?php echo flip_class(); ?>">
+ <td colspan="3"><span class="error"><?php echo _('No Records Found'); ?></span></td>
+</tr>
+<?php } ?>
+</table>