diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-08 06:38:06 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-08 06:38:06 +0000 |
commit | db10ee8e7883dc00c3e2f559532124f842f59e5d (patch) | |
tree | 45f82abd3c60ae598a9f829035d2424ffe0d5794 /templates | |
parent | 2bb59dfa45f008846305c62962616bd3fff3884d (diff) | |
download | ampache-db10ee8e7883dc00c3e2f559532124f842f59e5d.tar.gz ampache-db10ee8e7883dc00c3e2f559532124f842f59e5d.tar.bz2 ampache-db10ee8e7883dc00c3e2f559532124f842f59e5d.zip |
a few tweaks
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_album_art.inc.php | 42 | ||||
-rw-r--r-- | templates/show_playlist_box.inc.php | 20 |
2 files changed, 29 insertions, 33 deletions
diff --git a/templates/show_album_art.inc.php b/templates/show_album_art.inc.php index c02b8b52..78ff1fb3 100644 --- a/templates/show_album_art.inc.php +++ b/templates/show_album_art.inc.php @@ -22,51 +22,35 @@ // Gotta do some math here! $total_images = count($images); +$rows = floor($total_images/3); -$rows = floor($total_images/6); -$spare = $total_images - ($rows * 6); $i = 0; ?> <table class="text-box"> +<tr> <?php while ($i <= $rows) { - $images[$i]; - $ii = $i+1; - $iii = $i+2; + $j=0; + while ($j < 3) { + $key = $i*3+$j; + if (!isset($images[$key])) { echo "<td> </td>\n"; } + else { ?> - <tr> <td align="center"> - <a href="<?php echo $images[$i]['url']; ?>" target="_blank"> - <img src="<?php echo scrub_out($images[$i]['url']); ?>" border="0" height="175" width="175" /><br /> + <a href="<?php echo $images[$key]['url']; ?>" target="_blank"> + <img src="<?php echo scrub_out($images[$key]['url']); ?>" border="0" height="175" width="175" /><br /> </a> <p align="center"> [<a href="<?php echo conf('web_path'); ?>/albums.php?action=select_art&image=<?php echo $i; ?>&album_id=<?php echo urlencode($_REQUEST['album_id']); ?>">Select</a>] </p> </td> - <td align="center"> - <?php if (isset($images[$ii])) { ?> - <a href="<?php echo $images[$ii]['url']; ?>" target="_blank"> - <img src="<?php echo scrub_out($images[$ii]['url']); ?>" border="0" height="175" width="175" /><br /> - </a> - <p align="center"> - [<a href="<?php echo conf('web_path'); ?>/albums.php?action=select_art&image=<?php echo $ii; ?>&album_id=<?php echo urlencode($_REQUEST['album_id']); ?>">Select</a>] - </p> - <?php } ?> - </td> - <td align="center"> - <?php if (isset($images[$iii])) { ?> - <a href="<?php echo $images[$iii]['url']; ?>" target="_blank"> - <img src="<?php echo scrub_out($images[$iii]['url']); ?>" border="0" height="175" width="175" /><br /> - </a> - <p align="center"> - [<a href="<?php echo conf('web_path'); ?>/albums.php?action=select_art&image=<?php echo $iii; ?>&album_id=<?php echo urlencode($_REQUEST['album_id']); ?>">Select</a>] - </p> - <?php } ?> - </td> - </tr> <?php + } // end else + $j++; + } // end while cells + echo "</tr>\n<tr>"; $i++; } // end while ?> diff --git a/templates/show_playlist_box.inc.php b/templates/show_playlist_box.inc.php index ee9f314c..cc67bd6a 100644 --- a/templates/show_playlist_box.inc.php +++ b/templates/show_playlist_box.inc.php @@ -19,13 +19,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/** + * Playlist Box + * This box is used for actions on the main screen and on a specific playlist page + * It changes depending on where it is + */ + +$web_path = conf('web_path'); ?> <table class="text-box"> <tr><td> - <span class="header1"><?php echo _('Playlist Actions'); ?></span><br /> - <a href="<?php echo conf('web_path'); ?>/playlist.php?action=new"><?php echo _('Create New Playlist'); ?></a><br /> - <a href="<?php echo conf('web_path'); ?>/playlist.php"><?php echo _('View All Playlists'); ?></a><br /> - <a href="<?php echo conf('web_path'); ?>/playlist.php?action=show_import_playlist"><?php echo _('Import From File'); ?></a><br /> + <span class="header1"><?php echo _('Playlist Actions'); ?></span><br /><br /> + <a href="<?php echo $web_path; ?>/playlist.php?action=new"><?php echo _('Create New Playlist'); ?></a><br /> + <a href="<?php echo $web_path; ?>/playlist.php"><?php echo _('View All Playlists'); ?></a><br /> + <a href="<?php echo $web_path; ?>/playlist.php?action=show_import_playlist"><?php echo _('Import From File'); ?></a><br /> + <?php if ($_REQUEST['playlist_id']) { ?> + <a href="<?php echo $web_path; ?>/playlist.php?action=normalize_tracks"><?php echo _('Normalize Tracks'); ?></a><br /> + <a href="<?php echo $web_path; ?>/song.php?action=play_selected&playlist_id=<?php echo $_REQUEST['playlist_id']; ?>"><?php echo _('Play This Playlist'); ?></a><br /> + <?php } ?> </td></tr> </table> +<br /> |