summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-22 05:36:07 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-22 05:36:07 +0000
commitdf348122a7092a24a4ae5c04cf0b5b85bd750ae0 (patch)
tree79204441a824bafe239a5e8e8de596b87c0aa999 /templates
parent696f35b5a3e148282c452810ac2b294a68b074e0 (diff)
downloadampache-df348122a7092a24a4ae5c04cf0b5b85bd750ae0.tar.gz
ampache-df348122a7092a24a4ae5c04cf0b5b85bd750ae0.tar.bz2
ampache-df348122a7092a24a4ae5c04cf0b5b85bd750ae0.zip
added the initial playlist view page, fixed the artist name on albums of the moment
Diffstat (limited to 'templates')
-rw-r--r--templates/show_album_row.inc.php2
-rw-r--r--templates/show_playlist.inc.php6
-rw-r--r--templates/show_playlist_song_row.inc.php35
-rw-r--r--templates/show_playlist_songs.inc.php59
-rw-r--r--templates/show_random_albums.inc.php2
5 files changed, 102 insertions, 2 deletions
diff --git a/templates/show_album_row.inc.php b/templates/show_album_row.inc.php
index 649888e6..7753816e 100644
--- a/templates/show_album_row.inc.php
+++ b/templates/show_album_row.inc.php
@@ -30,7 +30,7 @@
</a>
<?php } ?>
<td><?php echo $album->f_name_link; ?></td>
-<td><?php echo $album->f_artist; ?></td>
+<td><?php echo $album->f_artist_link; ?></td>
<td><?php echo $album->song_count; ?></td>
<td><?php echo $album->year; ?></td>
<td>
diff --git a/templates/show_playlist.inc.php b/templates/show_playlist.inc.php
index 5e99b8a9..6c14210d 100644
--- a/templates/show_playlist.inc.php
+++ b/templates/show_playlist.inc.php
@@ -31,5 +31,11 @@ $web_path = Config::get('web_path');
<li><a href="<?php echo $web_path; ?>/stream.php?action=playlist_random&amp;playlist_id=<?php echo $playlist->id; ?>"><?php echo _('Play Random'); ?></a></li>
</ul>
<?php show_box_bottom(); ?>
+<?php show_box_top(); ?>
<div id="browse_content">
+<?php
+ $object_ids = $playlist->get_items();
+ require_once Config::get('prefix') . '/templates/show_playlist_songs.inc.php';
+?>
</div>
+<?php show_box_bottom(); ?>
diff --git a/templates/show_playlist_song_row.inc.php b/templates/show_playlist_song_row.inc.php
new file mode 100644
index 00000000..354f8419
--- /dev/null
+++ b/templates/show_playlist_song_row.inc.php
@@ -0,0 +1,35 @@
+<?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.
+
+*/
+?>
+<td><?php echo $playlist_track; ?></td>
+<td><?php echo $song->f_link; ?></td>
+<td><?php echo $song->f_artist_link; ?></td>
+<td><?php echo $song->f_album_link; ?></td>
+<td><?php echo $song->f_genre_link; ?></td>
+<td><?php echo $song->f_track; ?></td>
+<td><?php echo $song->f_time; ?></td>
+<td>
+ <?php if ($GLOBALS['user']->prefs['download']) { ?>
+ <a href="<?php echo Config::get('web_path'); ?>/stream.php?action=download&amp;song_id=<?php echo $song->id; ?>">
+ <?php echo get_user_icon('download',_('Download')); ?>
+ </a>
+ <?php } ?>
+</td>
diff --git a/templates/show_playlist_songs.inc.php b/templates/show_playlist_songs.inc.php
new file mode 100644
index 00000000..d1479a90
--- /dev/null
+++ b/templates/show_playlist_songs.inc.php
@@ -0,0 +1,59 @@
+<?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.
+
+*/
+
+// First let's setup some vars we're going to use a lot
+$web_path = Config::get('web_path');
+$ajax_url = Config::get('ajax_url');
+?>
+<table class="tabledata" cellspacing="0" cellpadding="0">
+<tr>
+ <td colspan="8">
+ <?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?>
+ </td>
+</tr>
+<tr class="table-header">
+ <th><?php echo _('Track'); ?></th>
+ <th onclick="ajaxPut('<?php echo $ajax_url; ?>?action=browse&amp;sort=title');return true;" style="cursor:pointer;">
+ <?php echo _('Song Title'); ?>
+ </th>
+ <th><?php echo _('Artist'); ?></th>
+ <th><?php echo _('Album'); ?></th>
+ <th><?php echo _('Genre'); ?></th>
+ <th><?php echo _('Track'); ?></th>
+ <th><?php echo _('Time'); ?></th>
+ <th><?php echo _('Action'); ?></th>
+</tr>
+<?php
+ foreach ($object_ids as $object) {
+ $song = new Song($object['object_id']);
+ $song->format();
+ $playlist_track = $object['track'];
+?>
+<tr class="<?php echo flip_class(); ?>" id="song_<?php echo $song->id; ?>">
+ <?php require Config::get('prefix') . '/templates/show_playlist_song_row.inc.php'; ?>
+</tr>
+<?php } ?>
+<tr>
+ <td colspan="8">
+ <?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?>
+ </td>
+</tr>
+</table>
diff --git a/templates/show_random_albums.inc.php b/templates/show_random_albums.inc.php
index e8e4749d..6a15e58a 100644
--- a/templates/show_random_albums.inc.php
+++ b/templates/show_random_albums.inc.php
@@ -26,7 +26,7 @@ $web_path = Config::get('web_path');
foreach ($albums as $album_id) {
$album = new Album($album_id);
$album->format();
- $name = scrub_out('[' . $album->artist . '] ' . $album->name);
+ $name = scrub_out('[' . $album->f_artist . '] ' . $album->name);
?>
<div class="random_album">
<a href="<?php echo $web_path; ?>/albums.php?action=show&amp;album=<?php echo $album_id; ?>">