summaryrefslogtreecommitdiffstats
path: root/templates/show_albums.inc.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-07 08:00:05 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-07 08:00:05 +0000
commitc0455678c1f6644801e5c25cb07510e49db7b28d (patch)
treec32edccb9386316c8b6ff1f885efa8a66ac0d067 /templates/show_albums.inc.php
parent0dcbad80cde204cfda078b5fc16a92c41d74c87d (diff)
downloadampache-c0455678c1f6644801e5c25cb07510e49db7b28d.tar.gz
ampache-c0455678c1f6644801e5c25cb07510e49db7b28d.tar.bz2
ampache-c0455678c1f6644801e5c25cb07510e49db7b28d.zip
started work on the sorting, and added in album viewing that kinda works
Diffstat (limited to 'templates/show_albums.inc.php')
-rw-r--r--templates/show_albums.inc.php84
1 files changed, 17 insertions, 67 deletions
diff --git a/templates/show_albums.inc.php b/templates/show_albums.inc.php
index b24804b1..588c88b6 100644
--- a/templates/show_albums.inc.php
+++ b/templates/show_albums.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2006 Ampache.org
+ Copyright (c) 2001 - 2007 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -18,81 +18,31 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*!
- @header Show Albums
- @discussion shows a list of albums
-*/
-$web_path = conf('web_path');
-// Build array of the table classes we are using
-$total_items = $view->total_items;
+$web_path = Config::get('web_path');
+$ajax_url = Config::get('ajax_url');
?>
-<?php require(conf('prefix') . '/templates/show_box_top.inc.php'); ?>
<table class="tabledata" cellspacing="0" cellpadding="0" border="0">
<tr class="table-header">
<td colspan="5">
- <?php if ($view->offset_limit) { require (conf('prefix') . "/templates/list_header.inc"); } ?>
</td>
</tr>
<tr class="table-header">
- <td>
- <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.name&amp;sort_order=0"><?php echo _("Album"); ?></a>
- </td>
- <td>
- <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=artist.name&amp;type=album_sort&amp;sort_order=0"><?php echo _('Artist'); ?></a>
- </td>
- <td> <?php echo _('Songs'); ?> </td>
- <td>
- <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.year&amp;sort_order=0"><?php echo _("Year"); ?></a>
- </td>
- <td> <?php echo _("Action"); ?> </td>
+ <th><?php echo _('Add'); ?></th>
+ <th><?php echo _('Album'); ?></th>
+ <th><?php echo _('Artist'); ?></th>
+ <th><?php echo _('Year'); ?></th>
</tr>
-
<?php
-/* Foreach through the albums */
-foreach ($albums as $album) {
+ /* Foreach through the albums */
+ foreach ($object_ids as $album_id) {
+ $album = new Album($album_id);
+ $album->format();
?>
- <tr class="<?php echo flip_class(); ?>">
- <td><?php echo $album->f_name; ?></td>
- <td><?php echo $album->f_artist; ?></td>
- <td><?php echo $album->songs; ?></td>
- <td><?php echo $album->year; ?></td>
- <td nowrap="nowrap">
- <a href="<?php echo $web_path; ?>/song.php?action=album&amp;album_id=<?php echo $album->id; ?>">
- <?php echo get_user_icon('all'); ?>
- </a>
- <a href="<?php echo $web_path; ?>/song.php?action=album_random&amp;album_id=<?php echo $album->id; ?>">
- <?php echo get_user_icon('random'); ?>
- </a>
- <?php if (batch_ok()) { ?>
- <a href="<?php echo $web_path; ?>/batch.php?action=alb&amp;id=<?php echo $album->id; ?>">
- <?php echo get_user_icon('batch_download'); ?>
- </a>
- <?php } ?>
- <?php if ($GLOBALS['user']->has_access('50')) { ?>
- <a href="<?php echo $web_path; ?>/admin/flag.php?action=show_edit_album&amp;album_id=<?php echo $album->id; ?>">
- <?php echo get_user_icon('edit'); ?>
- </a>
- <?php } ?>
- </td>
- </tr>
-<?php } //end foreach ($albums as $album) ?>
-<tr class="table-header">
- <td>
- <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.name&amp;sort_order=0"><?php echo _("Album"); ?></a>
- </td>
- <td>
- <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=artist.name&amp;type=album_sort"><?php echo _('Artist'); ?></a>
- </td>
- <td><?php echo _('Songs'); ?></td>
- <td>
- <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.year&amp;sort_order=0"><?php echo _("Year"); ?></a>
- </td>
- <td><?php echo _('Action'); ?></td>
-</tr>
-<tr class="even" align="center">
- <td colspan="5">
- <?php if ($view->offset_limit) { require (conf('prefix') . "/templates/list_header.inc"); } ?>
- </td>
+<tr class="<?php echo flip_class(); ?>">
+ <td><?php echo $album->f_name; ?></td>
+ <td><?php echo $album->f_artist; ?></td>
+ <td><?php echo $album->songs; ?></td>
+ <td><?php echo $album->year; ?></td>
</tr>
+<?php } //end foreach ($albums as $album) ?>
</table>
-<?php require(conf('prefix') . '/templates/show_box_bottom.inc.php'); ?>