diff options
-rw-r--r-- | modules/lib.php | 41 | ||||
-rw-r--r-- | playlist.php | 2 | ||||
-rw-r--r-- | templates/show_add_playlist.inc.php | 48 | ||||
-rw-r--r-- | templates/show_playlist_edit.inc.php | 7 | ||||
-rw-r--r-- | templates/show_search.inc | 5 |
5 files changed, 53 insertions, 50 deletions
diff --git a/modules/lib.php b/modules/lib.php index 8dcbb873..6023dbf6 100644 --- a/modules/lib.php +++ b/modules/lib.php @@ -383,47 +383,6 @@ function get_playlist_track_from_song ( $playlist_id, $song_id ) { } } -//FIXME: Pull this and put it in a template -function show_playlist_create () { - - $web_path = conf('web_path'); - - print <<<ECHO -<form name="songs" method="post" action="$web_path/playlist.php"> -<table class="border"><tr class="table-header"><td colspan="2" align="center"> -ECHO; - -print _("Create a new playlist"); - print <<<ECHO - </td> - </tr> - <tr class="even"> - <td align="left"> Name: </td> - <td align="left"><input type="text" name="playlist_name" size="20" /></td> - </tr> - <tr class="odd"> - <td align="left"> Type: </td> - <td align="left"> - <select name="type"> - <option value="private"> Private </option> - <option value="public"> Public </option> - </select> - </td> - </tr> - <tr class="even"> - <td align="left"> </td> - <td align="left"> - <input type="submit" name="action" value="Create" /> - <input type="reset" name="Reset" /> - </td> - </tr> -</table> -</form> - -ECHO; - -} - /** * show_playlist_dropdown * Hacking this for now... will fix tomorrow evening diff --git a/playlist.php b/playlist.php index 7e8fcd82..042824f0 100644 --- a/playlist.php +++ b/playlist.php @@ -120,7 +120,7 @@ switch ($action) { show_playlist_edit($_REQUEST['playlist_id']); break; case 'new': - show_playlist_create(); + require (conf('prefix') . '/templates/show_add_playlist.inc.php'); break; case 'remove_song': case _('Remote Selected Tracks'): diff --git a/templates/show_add_playlist.inc.php b/templates/show_add_playlist.inc.php new file mode 100644 index 00000000..f356d6f7 --- /dev/null +++ b/templates/show_add_playlist.inc.php @@ -0,0 +1,48 @@ +<?php +/* + + Copyright (c) 2001 - 2006 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 + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + 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. + +*/ + +?> +<?php show_box_top(_('Create a new playlist')); ?> +<form name="songs" method="post" action="<?php echo conf('web_path'); ?>/playlist.php"> +<table> +<tr> + <td><?php echo _('Name'); ?>:</td> + <td><input type="text" name="playlist_name" size="20" /></td> +</tr> +<tr> + <td><?php echo _('Type'); ?>:</td> + <td> + <select name="type"> + <option value="private"> Private </option> + <option value="public"> Public </option> + </select> + </td> +</tr> +<tr> + <td colspan="2"> + <input type="submit" value="<?php echo _('Create'); ?>" /> + <input type="hidden" name="action" value="Create" /> + </td> +</tr> +</table> +</form> +<?php show_box_bottom(); ?> diff --git a/templates/show_playlist_edit.inc.php b/templates/show_playlist_edit.inc.php index 48bd78fa..1ff9b1ad 100644 --- a/templates/show_playlist_edit.inc.php +++ b/templates/show_playlist_edit.inc.php @@ -24,10 +24,8 @@ $web_path = conf('web_path'); ?> <form method="post" action="<?php echo $web_path; ?>/playlist.php" enctype="multipart/form-data"> -<table class="text-box"> -<tr> - <td colspan="2" class="header2"><?php echo _('Editing Playlist'); ?></td> -</tr> +<?php show_box_top(_('Editing Playlist')); ?> +<table> <tr> <td><?php echo _('Name'); ?>:</td> <td align="left"> @@ -51,4 +49,5 @@ $web_path = conf('web_path'); </td> </tr> </table> +<?php show_box_bottom(); ?> </form> diff --git a/templates/show_search.inc b/templates/show_search.inc index 09262afe..116b30d3 100644 --- a/templates/show_search.inc +++ b/templates/show_search.inc @@ -24,12 +24,9 @@ * This is the template for the searches... amazing! */ ?> -<?php require (conf('prefix') . '/templates/show_box_top.inc.php'); ?> +<?php show_box_top(_('Search Ampache') . "..."); ?> <form name="search" method="post" action="<?php echo conf('web_path'); ?>/search.php" enctype="multipart/form-data" style="Display:inline"> <table class="tabledata" cellspacing="0" cellpadding="3" border="0"> -<tr class="table-header"> - <th colspan="4"><?php echo _('Search Ampache'); ?>...</th> -</tr> <tr class="<?php echo flip_class(); ?>"> <td><?php echo _('Keywords') ?></td> <td> |