diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-06-04 02:45:03 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-06-04 02:45:03 +0000 |
commit | 19276f57a9eeacae7829629baa35fcb28d77419f (patch) | |
tree | 35c2d658e6cb4e3b9e1a1706e0e3d3ab8af88f0d /templates | |
parent | 848a1bc5388301e128cb5c2c4d8dcb5d06721bb4 (diff) | |
download | ampache-19276f57a9eeacae7829629baa35fcb28d77419f.tar.gz ampache-19276f57a9eeacae7829629baa35fcb28d77419f.tar.bz2 ampache-19276f57a9eeacae7829629baa35fcb28d77419f.zip |
fixed genre and artist view... mostly also fixed batch downloads
Diffstat (limited to 'templates')
-rw-r--r-- | templates/footer.inc.php | 7 | ||||
-rw-r--r-- | templates/header.inc.php | 4 | ||||
-rw-r--r-- | templates/show_albums.inc.php | 2 | ||||
-rw-r--r-- | templates/show_artists.inc.php | 44 | ||||
-rw-r--r-- | templates/show_genres.inc.php | 28 | ||||
-rw-r--r-- | templates/show_playlist_bar.inc.php | 5 | ||||
-rw-r--r-- | templates/sidebar_home.inc.php | 4 |
7 files changed, 56 insertions, 38 deletions
diff --git a/templates/footer.inc.php b/templates/footer.inc.php index 5eb6075b..2b306aa5 100644 --- a/templates/footer.inc.php +++ b/templates/footer.inc.php @@ -20,12 +20,13 @@ */ ?> +</div> <!-- end id="content"--> <!-- I really hate IE --> </td></tr></table> -</div> <!-- end id="content"--> </div> <!-- end id="maincontainer"--> -<div id="footer-content"> - <a href="http://www.ampache.org/index.php">Ampache v.<?php echo Config::get('version'); ?></a> +<div id="footer"> + <a href="http://www.ampache.org/index.php">Ampache v.<?php echo Config::get('version'); ?></a><br /> + Copyright (c) 2001 - 2007 Ampache.org </div> </body> </html> diff --git a/templates/header.inc.php b/templates/header.inc.php index c5a96f5b..cf0deabd 100644 --- a/templates/header.inc.php +++ b/templates/header.inc.php @@ -73,9 +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="content"> <!-- I hate IE... --> -<table class="smeg-ie"><tr><td> +<table class="smeg-ie" width="100%"><tr><td> +<div id="content"> <?php if (Config::get('int_config_version') != Config::get('config_version') AND $GLOBALS['user']->has_access(100)) { ?> <div class="fatalerror"> <?php echo _('Error Config File Out of Date'); ?> diff --git a/templates/show_albums.inc.php b/templates/show_albums.inc.php index f91203f3..de69d27d 100644 --- a/templates/show_albums.inc.php +++ b/templates/show_albums.inc.php @@ -54,9 +54,11 @@ $ajax_url = Config::get('ajax_url'); <td><?php echo $album->song_count; ?></td> <td><?php echo $album->year; ?></td> <td> + <?php if (Access::check_function('batch_download')) { ?> <a href="<?php echo Config::get('web_path'); ?>/batch.php?action=album&id=<?php echo $album->id; ?>"> <?php echo get_user_icon('batch_download','',_('Batch Download')); ?> </a> + <?php } ?> <span onclick="ajaxPut('<?php echo Config::get('ajax_url'); ?>?action=album&type=edit&id=<?php echo $album->id; ?>');return true;" > <?php echo get_user_icon('edit','',_('Edit')); ?> </span> diff --git a/templates/show_artists.inc.php b/templates/show_artists.inc.php index 4f52e257..1bb92cb7 100644 --- a/templates/show_artists.inc.php +++ b/templates/show_artists.inc.php @@ -18,22 +18,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$web_path = conf('web_path'); +$web_path = Config::get('web_path'); -// Build array of the table classes we are using -$total_items = $view->total_items; ?> -<?php require(conf('prefix') . '/templates/show_box_top.inc.php'); ?> <table class="tabledata" cellspacing="0" cellpadding="0" border="0"> <tr class="table-header" align="center"> <td colspan="5"> - <?php if ($GLOBALS['view']->offset_limit) { require (conf('prefix') . "/templates/list_header.inc"); } ?> + <?php if ($GLOBALS['view']->offset_limit) { require Config::get('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']; ?>&keep_view=true&sort_type=artist.name&sort_order=0"> <?php echo _('Artist'); ?> </a> - </td> + <td><?php echo _('Add'); ?> + <td><?php echo _('Artist'); ?></td> <td> <?php echo _('Songs'); ?> </td> <td> <?php echo _('Albums'); ?> </td> <td> <?php echo _('Action'); ?> </td> @@ -41,18 +37,28 @@ $total_items = $view->total_items; <?php /* Foreach through every artist that has been passed to us */ //FIXME: These should come in as objects... -foreach ($artists as $artist) { ?> +foreach ($object_ids as $artist_id) { + $artist = new Artist($artist_id); + $artist->format(); +?> <tr class="<?php echo flip_class(); ?>"> - <td><?php echo $artist->link; ?></td> + <td> + <span onclick="ajaxPut('<?php echo Config::get('ajax_url'); ?>?action=basket&type=artist&id=<?php echo $artist->id; ?>');return true;" > + <?php echo get_user_icon('add'); ?> + </span> + <span onclick="ajaxPut('<?php echo Config::get('ajax_url'); ?>?action=basket&type=artist_random&id=<?php echo $artist->id; ?>');return true;" > + <?php echo get_user_icon('random'); ?> + </span> + </td> + <td><?php echo $artist->f_name_link; ?></td> <td><?php echo $artist->songs; ?></td> <td><?php echo $artist->albums; ?></td> <td nowrap="nowrap"> - <a href="<?php echo $web_path; ?>/song.php?action=artist&artist_id=<?php echo $artist->id; ?>"> - <?php echo get_user_icon('all'); ?> - </a> - <a href="<?php echo $web_path; ?>/song.php?action=artist_random&artist_id=<?php echo $artist->id; ?>"> - <?php echo get_user_icon('random'); ?> - </a> + <?php if (Access::check_function('batch_download')) { ?> + <a href="<?php echo Config::get('web_path'); ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>"> + <?php echo get_user_icon('batch_download','',_('Batch Download')); ?> + </a> + <?php } ?> <?php if ($GLOBALS['user']->has_access(100)) { ?> <a href="<?php echo $web_path; ?>/admin/flag.php?action=show_edit_artist&artist_id=<?php echo $artist->id; ?>"> <?php echo get_user_icon('edit'); ?> @@ -62,9 +68,8 @@ foreach ($artists as $artist) { ?> </tr> <?php } //end foreach ($artists as $artist) ?> <tr class="table-header"> - <td> - <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&keep_view=true&sort_type=artist.name&sort_order=0"> <?php echo _("Artist"); ?> </a> - </td> + <td><?php echo _('Add'); ?> + <td><?php echo _("Artist"); ?></td> <td><?php echo _('Songs'); ?></td> <td><?php echo _('Albums'); ?></td> <td><?php echo _('Action'); ?></td> @@ -76,4 +81,3 @@ foreach ($artists as $artist) { ?> </td> </tr> </table> -<?php require(conf('prefix') . '/templates/show_box_bottom.inc.php'); ?> diff --git a/templates/show_genres.inc.php b/templates/show_genres.inc.php index 59daf51d..e3ae1223 100644 --- a/templates/show_genres.inc.php +++ b/templates/show_genres.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 @@ -23,9 +23,7 @@ * Show Genres * Takes an array of genre objects and displays them out */ -$total_items = $view->total_items; ?> -<?php require(conf('prefix') . '/templates/show_box_top.inc.php'); ?> <table class="tabledata" cellspacing="0" cellpadding="0" border="0"> <tr class="table-header" align="center"> <td colspan="5"> @@ -33,24 +31,29 @@ $total_items = $view->total_items; </td> </tr> <tr class="table-header"> + <td><?php echo _('Add'); ?></td> <td><?php echo _('Genre'); ?></td> <td><?php echo _('Songs'); ?></td> <td><?php echo _('Action'); ?></td> </tr> <?php -foreach ($genres as $genre) { - $genre->format_genre();?> +foreach ($object_ids as $genre_id) { + $genre = new Genre($genre_id); + $genre->format_genre(); +?> <tr class="<?php echo flip_class(); ?>"> + <td> + <span onclick="ajaxPut('<?php echo Config::get('ajax_url'); ?>?action=basket&type=genre&id=<?php echo $genre->id; ?>');return true;" > + <?php echo get_user_icon('add'); ?> + </span> + <span onclick="ajaxPut('<?php echo Config::get('ajax_url'); ?>?action=basket&type=genre_random&id=<?php echo $genre->id; ?>');return true;" > + <?php echo get_user_icon('random'); ?> + </span> + </td> <td><?php echo $genre->link; ?></td> <td><?php echo $genre->get_song_count(); ?></td> <td> - <a href="<?php echo $genre->play_link; ?>"> - <?php echo get_user_icon('all'); ?> - </a> - <a href="<?php echo $genre->random_link; ?>"> - <?php echo get_user_icon('random'); ?> - </a> - <?php if (batch_ok()) { ?> + <?php if (Access::check_function('batch_download')) { ?> <a href="<?php echo $genre->download_link; ?>"> <?php echo get_user_icon('batch_download'); ?> </a> @@ -64,4 +67,3 @@ foreach ($genres as $genre) { </td> </tr> </table> -<?php require(conf('prefix') . '/templates/show_box_bottom.inc.php'); ?> diff --git a/templates/show_playlist_bar.inc.php b/templates/show_playlist_bar.inc.php index 43b1712f..fd85dc9d 100644 --- a/templates/show_playlist_bar.inc.php +++ b/templates/show_playlist_bar.inc.php @@ -27,5 +27,10 @@ $ajax_url = Config::get('ajax_url'); <?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&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> diff --git a/templates/sidebar_home.inc.php b/templates/sidebar_home.inc.php index 4791f0fd..9d08e6ed 100644 --- a/templates/sidebar_home.inc.php +++ b/templates/sidebar_home.inc.php @@ -1,3 +1,7 @@ +<h4><?php echo _('Information'); ?></h4> +<span><a href="<?php echo $web_path; ?>/index.php"><?php echo _('Currently Playing'); ?></a></span> +<span><a href="<?php echo $web_path; ?>/stats.php"><?php echo _('Statistics'); ?></a></span> +<hr /> <h4><?php echo _('Search'); ?></h4> <div id="sidebar_subsearch"> <form name="sub_search" method="post" action="<?php echo $web_path; ?>/search.php" enctype="multipart/form-data" style="Display:inline"> |