summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-06-10 21:17:25 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-06-10 21:17:25 +0000
commitb0fdd250fc4f06dba29629fed73f7185afd997b6 (patch)
tree84ac4b32f56cd03cf231dd05fb8e3d6a754bd519 /templates
parent11f28a1d4a752fc9aa29699c1c129e0c723fb8b7 (diff)
downloadampache-b0fdd250fc4f06dba29629fed73f7185afd997b6.tar.gz
ampache-b0fdd250fc4f06dba29629fed73f7185afd997b6.tar.bz2
ampache-b0fdd250fc4f06dba29629fed73f7185afd997b6.zip
added rightbar and fixed genre playback
Diffstat (limited to 'templates')
-rw-r--r--templates/header.inc.php3
-rw-r--r--templates/rightbar.inc.php58
-rw-r--r--templates/show_playlist_bar.inc.php11
3 files changed, 61 insertions, 11 deletions
diff --git a/templates/header.inc.php b/templates/header.inc.php
index cf0deabd..def957ee 100644
--- a/templates/header.inc.php
+++ b/templates/header.inc.php
@@ -73,6 +73,9 @@ if (Config::get('use_rss')) { ?>
<div id="sidebar"><!-- This is the sidebar -->
<?php require_once Config::get('prefix') . '/templates/sidebar.inc.php'; ?>
</div><!-- End sidebar -->
+ <div id="rightbar"><!-- This is the rightbar -->
+ <?php require_once Config::get('prefix') . '/templates/rightbar.inc.php'; ?>
+ </div>
<!-- I hate IE... -->
<table class="smeg-ie" width="100%"><tr><td>
<div id="content">
diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php
new file mode 100644
index 00000000..a9d644bd
--- /dev/null
+++ b/templates/rightbar.inc.php
@@ -0,0 +1,58 @@
+<?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.
+
+*/
+?>
+<?php show_box_top(_('Active Playlist')); ?>
+<ul>
+ <li><a href="<?php echo Config::get('web_path'); ?>/stream.php?action=basket"><?php echo get_user_icon('all'); ?></a></li>
+<?php if (Access::check_function('batch_download')) { ?>
+ <li>
+ <a href="<?php echo Config::get('web_path'); ?>/batch.php?action=tmp_playlist&amp;id=<?php echo $GLOBALS['user']->playlist->id; ?>">
+ <?php echo get_user_icon('batch_download','',_('Batch Download')); ?>
+ </a>
+ </li>
+<?php } ?>
+ <li><span onclick="ajaxPut('<?php echo Config::get('ajax_url'); ?>?action=basket&amp;type=clear_all');return true;">
+ <?php echo get_user_icon('delete','',_('Clear Playlist')); ?>
+ </span></li>
+</ul>
+<div id="current_playlist">
+<table cellpadding="0" cellspacing="0">
+<?php
+ $objects = $GLOBALS['user']->playlist->get_items();
+ foreach ($objects as $song_id) {
+ $song = new Song($song_id);
+ $song->format();
+?>
+<tr class="<?php echo flip_class(); ?>">
+ <td>
+ <?php echo $song->f_link; ?>
+ </td>
+ <td>
+ <span onclick="ajaxPut('<?php echo Config::get('ajax_url'); ?>?action=current_playlist&amp;type=delete&amp;id=<?php echo $song_id; ?>');return true;">
+ <?php echo get_user_icon('delete','',_('Delete')); ?>
+ </span>
+ </td>
+</tr>
+<?php } if (!count($objects)) { ?>
+ <tr><td class="error"><?php echo _('Not Enough Data'); ?></td></tr>
+<?php } ?>
+</table>
+<?php show_box_bottom(); ?>
diff --git a/templates/show_playlist_bar.inc.php b/templates/show_playlist_bar.inc.php
index fd85dc9d..b2eac864 100644
--- a/templates/show_playlist_bar.inc.php
+++ b/templates/show_playlist_bar.inc.php
@@ -18,19 +18,8 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-$ajax_url = Config::get('ajax_url');
-
// Get the count of the number of items in their playlist
?>
<div>
- <a href="#" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=basket&amp;type=clear_all');return true;">
- <?php echo get_user_icon('disable'); ?>
- </a>
- <a href="<?php echo Config::get('web_path'); ?>/stream.php?action=basket"><?php echo get_user_icon('all'); ?></a>
- <?php if (Access::check_function('batch_download')) { ?>
- <a href="<?php echo Config::get('web_path'); ?>/batch.php?action=tmp_playlist&amp;id=<?php echo $GLOBALS['user']->playlist->id; ?>">
- <?php echo get_user_icon('batch_download','',_('Batch Download')); ?>
- </a>
- <?php } ?>
<?php echo __('There are currently %count% items in your playlist','%count%',$GLOBALS['user']->playlist->count_items()); ?>
</div>