summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-05 22:39:53 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-05 22:39:53 +0000
commit246c321617b18035725b3d42c6a313386687cedc (patch)
tree45262291e66caae786ed06873c2fe9e67089f8ae /templates
parentad3d2363c4c20d6b5049c8db92d08786650bd2ae (diff)
downloadampache-246c321617b18035725b3d42c6a313386687cedc.tar.gz
ampache-246c321617b18035725b3d42c6a313386687cedc.tar.bz2
ampache-246c321617b18035725b3d42c6a313386687cedc.zip
fixed some typos, minor bugs, updated the sql, added playlist as a browse type
Diffstat (limited to 'templates')
-rw-r--r--templates/show_playlist_row.inc.php35
-rw-r--r--templates/show_playlists.inc.php41
2 files changed, 40 insertions, 36 deletions
diff --git a/templates/show_playlist_row.inc.php b/templates/show_playlist_row.inc.php
new file mode 100644
index 00000000..f4c4cc3b
--- /dev/null
+++ b/templates/show_playlist_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 Ajax::button('?action=basket&type=playlist&id=' . $playlist->id,'add',_('Add'),'add_playlist_' . $playlist->id); ?>
+ <?php echo Ajax::button('?action=basket&type=playlist_random&id=' . $playlist->id,'random',_('Random'),'random_playlist_' . $playlist->id); ?>
+</td>
+<td><?php echo $playlist->f_link; ?></td>
+<td><?php echo $count; ?></td>
+<td><?php echo scrub_out($playlist->f_user); ?></td>
+<td>
+ <?php if (Access::check_function('batch_download')) { ?>
+ <a href="<?php echo Config::get('web_path'); ?>/batch.php?action=playlist&amp;id=<?php echo $playlist->id; ?>">
+ <?php echo get_user_icon('batch_download',_('Batch Download')); ?>
+ </a>
+ <?php } ?>
+</td>
diff --git a/templates/show_playlists.inc.php b/templates/show_playlists.inc.php
index ca07c5ef..4b925fe8 100644
--- a/templates/show_playlists.inc.php
+++ b/templates/show_playlists.inc.php
@@ -19,13 +19,10 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
?>
<table class="tabledata" cellspacing="0" cellpadding="0" border="0"> <!-- Playlist Table -->
<tr class="table-header">
- <th align="center">
-
- </th>
+ <th>&nbsp;</th>
<th><?php echo _('Playlist Name'); ?></th>
<th><?php echo _('# Songs'); ?></th>
<th><?php echo _('Owner'); ?></th>
@@ -34,39 +31,11 @@
<?php
foreach ($object_ids as $playlist_id) {
$playlist = new Playlist($playlist_id);
+ $playlist->format();
$count = $playlist->get_song_count();
?>
- <tr class="<?php echo flip_class(); ?>">
- <td align="center">
- </td>
- <td>
- <a href="<?php echo $web_path; ?>/playlist.php?action=show_playlist&amp;playlist_id=<?php echo $playlist->id; ?>">
- <?php echo scrub_out($playlist->name); ?>
- </a>
- </td>
- <td><?php echo $count; ?></td>
- <td><?php echo scrub_out($playlist_user->fullname); ?></td>
- <td>
- | <a href="<?php echo $web_path; ?>/playlist.php?action=show_playlist&amp;playlist_id=<?php echo $playlist->id; ?>">
- <?php echo _('View'); ?></a>
- <?php if (($GLOBALS['user']->username == $playlist->user) || ($GLOBALS['user']->has_access(100))) { ?>
- | <a href="<?php echo $web_path; ?>/playlist.php?action=edit&amp;playlist_id=<?php echo $playlist->id; ?>">
- <?php echo _('Edit'); ?></a>
- | <a href="<?php echo $web_path; ?>/playlist.php?action=show_delete_playlist&amp;playlist_id=<?php echo $playlist->id; ?>">
- <?php echo _('Delete'); ?></a>
- <?php } ?>
- <?php if ($count > 0) { ?>
- | <a href="<?php echo $web_path; ?>/stream.php?action=playlist&amp;playlist_id=<?php echo $playlist->id; ?>">
- <?php echo _('Play'); ?></a>
- | <a href="<?php echo $web_path; ?>/stream.php?action=playlist_random&amp;playlist_id=<?php echo $playlist->id; ?>">
- <?php echo _('Random'); ?></a>
- <?php if (batch_ok()) { ?>
- | <a href="<?php echo $web_path; ?>/batch.php?action=pl&amp;id=<?php echo $playlist->id; ?>">
- <?php echo _('Download'); ?></a>
- <?php } ?>
- <?php } ?>
- |
- </td>
- </tr>
+<tr class="<?php echo flip_class(); ?>" id="playlist_row_<?php echo $playlist->id; ?>">
+ <?php require Config::get('prefix') . '/templates/show_playlist_row.inc.php'; ?>
+</tr>
<?php } // end foreach ($playlists as $playlist) ?>
</table>