diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-14 07:12:15 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-14 07:12:15 +0000 |
commit | 641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7 (patch) | |
tree | 66d335c53b446971aeee36de7a2ba9e6504a302b /templates | |
parent | 779f4bf4e560d7f415ea51a96ed547831745a8dc (diff) | |
download | ampache-641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7.tar.gz ampache-641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7.tar.bz2 ampache-641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7.zip |
catalog build technically works now, still working out some issues with the dynamic updating of the current state
Diffstat (limited to 'templates')
-rw-r--r-- | templates/javascript_refresh.inc.php | 4 | ||||
-rw-r--r-- | templates/show_add_catalog.inc.php | 48 | ||||
-rw-r--r-- | templates/show_index.inc.php | 2 | ||||
-rw-r--r-- | templates/show_run_add_catalog.inc.php | 25 | ||||
-rw-r--r-- | templates/sidebar.inc.php | 182 | ||||
-rw-r--r-- | templates/sidebar_admin.inc.php | 16 |
6 files changed, 64 insertions, 213 deletions
diff --git a/templates/javascript_refresh.inc.php b/templates/javascript_refresh.inc.php index c53c9cd8..7362f2f3 100644 --- a/templates/javascript_refresh.inc.php +++ b/templates/javascript_refresh.inc.php @@ -23,7 +23,7 @@ <script type="text/javascript" language="javascript"> <!-- Begin // Set refresh interval (in seconds) -var refreshinterval=<?php echo Config::get('refresh_limit'); ?>; +var refreshinterval=<?php echo $refresh_limit ?>; function doLoad() { @@ -42,7 +42,7 @@ function refresh() } // start with page-load -window.onload=doLoad; +doLoad; // End --> </script> diff --git a/templates/show_add_catalog.inc.php b/templates/show_add_catalog.inc.php index c1f74639..16661417 100644 --- a/templates/show_add_catalog.inc.php +++ b/templates/show_add_catalog.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 @@ -22,41 +22,38 @@ $default_rename = "%a - %T - %t"; $default_sort = "%a/%A"; - ?> - <?php show_box_top(_('Add a Catalog')); ?> - <p><?php echo _("In the form below enter either a local path (i.e. /data/music) or the URL to a remote Ampache installation (i.e http://theotherampache.com)"); ?></p> - -<form name="update_catalog" method="post" action="<?php echo conf('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data"> +<?php Error::display('general'); ?> +<form name="update_catalog" method="post" action="<?php echo Config::get('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data"> <table class="tabledata" cellpadding="0" border="0" cellspacing="0"> <tr> - <td><?php echo _("Catalog Name"); ?>: </td> + <td><?php echo _('Catalog Name'); ?>: </td> <td><input size="60" type="text" name="name" value="<?php echo $_REQUEST['name']; ?>" /></td> <td style="vertical-align:top; font-family: monospace;" rowspan="6"> - <strong><?php echo _("Auto-inserted Fields"); ?>:</strong><br /> - %A = <?php echo _("album name"); ?><br /> - %a = <?php echo _("artist name"); ?><br /> - %c = <?php echo _("id3 comment"); ?><br /> - %g = <?php echo _("genre"); ?><br /> - %T = <?php echo _("track number (padded with leading 0)"); ?><br /> - %t = <?php echo _("song title"); ?><br /> - %y = <?php echo _("year"); ?><br /> - %o = <?php echo _("other"); ?><br /> + <strong><?php echo _('Auto-inserted Fields'); ?>:</strong><br /> + %A = <?php echo _('album name'); ?><br /> + %a = <?php echo _('artist name'); ?><br /> + %c = <?php echo _('id3 comment'); ?><br /> + %g = <?php echo _('genre'); ?><br /> + %T = <?php echo _('track number (padded with leading 0)'); ?><br /> + %t = <?php echo _('song title'); ?><br /> + %y = <?php echo _('year'); ?><br /> + %o = <?php echo _('other'); ?><br /> </td> </tr> <tr> - <td><?php echo _("Path"); ?>: </td> + <td><?php echo _('Path'); ?>: </td> <td><input size="60" type="text" name="path" value="<?php echo $_REQUEST['path']; ?>" /></td> </tr> <tr> - <td><?php echo _("Catalog Type"); ?>: </td> + <td><?php echo _('Catalog Type'); ?>: </td> <td> <select name="type"> - <option value="local"><?php echo _("Local"); ?></option> - <option value="remote"><?php echo _("Remote"); ?></option> + <option value="local"><?php echo _('Local'); ?></option> + <option value="remote"><?php echo _('Remote'); ?></option> </select> </td> </tr> @@ -65,17 +62,17 @@ $default_sort = "%a/%A"; <td><input size="30" type="text" name="key" value="" /><span class="error">*<?php echo _('Required for Remote Catalogs'); ?></span></td> </tr> <tr> - <td><?php echo _("Filename Pattern"); ?>: </td> + <td><?php echo _('Filename Pattern'); ?>: </td> <td><input size="60" type="text" name="rename_pattern" value="<?php echo $default_rename; ?>" /></td> </tr> <tr> - <td><?php echo _("Folder Pattern"); ?>:<br /><?php echo _("(no leading or ending '/')"); ?></td> + <td><?php echo _('Folder Pattern'); ?>:<br /><?php echo _("(no leading or ending '/')"); ?></td> <td valign="top"><input size="60" type="text" name="sort_pattern" value="<?php echo $default_sort; ?>" /></td> </tr> <tr> - <td valign="top"><?php echo _("Gather Album Art"); ?>:</td> + <td valign="top"><?php echo _('Gather Album Art'); ?>:</td> <td><input type="checkbox" name="gather_art" value="1" /></td> </tr> <tr> @@ -87,12 +84,9 @@ $default_sort = "%a/%A"; <td> </td> <td> <input type="hidden" name="action" value="add_catalog" /> - <input class="button" type="submit" value="<?php echo _("Add Catalog"); ?>" /> - <input class="button" type="reset" value="<?php echo _("Reset"); ?>" /> - <input type="button" onclick="javascript:history.go(-1)" value="<?php echo _("Cancel"); ?>" /> + <input class="button" type="submit" value="<?php echo _('Add Catalog'); ?>" /> </td> </tr> - </table> </form> <?php show_box_bottom(); ?> diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php index 525ddc07..0afacb0e 100644 --- a/templates/show_index.inc.php +++ b/templates/show_index.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 diff --git a/templates/show_run_add_catalog.inc.php b/templates/show_run_add_catalog.inc.php new file mode 100644 index 00000000..65a79240 --- /dev/null +++ b/templates/show_run_add_catalog.inc.php @@ -0,0 +1,25 @@ +<?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. + +*/ + +// Get the count of the number of items in their playlist +?> +<?php echo _('Found'); ?>:<?php echo $catalog_add_found; ?><br /> +<?php echo _('Reading'); ?>:<?php echo $catalog_add_directory; ?><br /> diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php index 2a490551..13612552 100644 --- a/templates/sidebar.inc.php +++ b/templates/sidebar.inc.php @@ -19,24 +19,6 @@ */ -/** - * This is kind of the wrong place to do this, but let's define the different submenu's that could possibly be - * displayed on this page, this calls the show_submenu($items); function which takes an array of items - * that have ['title'] ['url'] ['active'] and ['cssclass'] url assumes no Config::get('web_path') - */ - -$admin_items[] = array('title'=>_('Users'),'url'=>'admin/users.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_users'); -$admin_items[] = array('title'=>_('Mail Users'),'url'=>'admin/mail.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_mail_users'); -$admin_items[] = array('title'=>_('Catalog'),'url'=>'admin/index.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_catalog'); -$admin_items[] = array('title'=>_('Config'),'url'=>'admin/preferences.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_config'); -$admin_items[] = array('title'=>_('Access List'),'url'=>'admin/access.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_access_list'); - -$browse_items[] = array('title'=>_("Albums"),'url'=>'albums.php','active'=>$location['page'], 'cssclass'=>'sidebar_browse_albums'); -$browse_items[] = array('title'=>_("Artists"),'url'=>'artists.php','active'=>$location['page'], 'cssclass'=>'sidebar_browse_artists'); -$browse_items[] = array('title'=>_("Genre"),'url'=>'browse.php?action=genre','active'=>$location['page'], 'cssclass'=>'sidebar_browse_genre'); -$browse_items[] = array('title'=>_('Song Title'),'url'=>'browse.php?action=song_title','active'=>$location['page'], 'cssclass'=>'sidebar_browse_song_title'); - - if (!$_SESSION['state']['sidebar_tab']) { $_SESSION['state']['sidebar_tab'] = 'home'; } $class_name = 'sidebar_' . $_SESSION['state']['sidebar_tab']; ${$class_name} = ' class="active" '; @@ -46,178 +28,26 @@ $ajax_url = Config::get('ajax_url'); ?> <ul id="sidebar-tabs"> <li <?php echo $sidebar_home; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&button=home');" > - <?php echo get_user_icon('home'); ?> + <?php echo get_user_icon('home','',_('Home')); ?> </li> <li <?php echo $sidebar_browse; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&button=browse');" > - <?php echo get_user_icon('browse'); ?> + <?php echo get_user_icon('browse','',_('Browse')); ?> </li> <li <?php echo $sidebar_search; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&button=search');" > - <?php echo get_user_icon('view'); ?> + <?php echo get_user_icon('view','',_('Search')); ?> </li> <li <?php echo $sidebar_preferences; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&button=preferences');" > - <?php echo get_user_icon('edit'); ?> + <?php echo get_user_icon('edit','',_('Preferences')); ?> </li> <?php if ($GLOBALS['user']->has_access('100')) { ?> <li <?php echo $sidebar_admin; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&button=admin');" > - <?php echo get_user_icon('admin'); ?> + <?php echo get_user_icon('admin','',_('Admin')); ?> </li> <?php } ?> <li <?php echo $sidebar_player; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&button=player');" > - <?php echo get_user_icon('all'); ?> + <?php echo get_user_icon('all','',_('Player')); ?> </li> </ul> <div id="sidebar-page"> <?php require_once Config::get('prefix') . '/templates/sidebar_' . $_SESSION['state']['sidebar_tab'] . '.inc.php'; ?> </div> -<!-- -<h3> </h3> -<ul id="navlist"> - <li id="sidebar_home"<?php - if ($location['page'] == "index.php"){ - echo " class=\"activetopmenu\" "; - }?>> - <a href="<?php echo $web_path; ?>/index.php"><?php echo _('Home'); ?></a> - </li> -<?php if ($GLOBALS['user']->has_access(100)) { ?> - <li id="sidebar_admin"<?php - if ($location['page'] == 'admin/index.php' || - $location['page'] == 'admin/users.php' || - $location['page'] == 'admin/mail.php' || - $location['page'] == 'admin/catalog.php' || - $location['page'] == 'admin/preferences.php' || - $location['page'] == 'admin/access.php' ){ - echo " class=\"activetopmenu\" "; - }?>> - <a href="<?php echo $web_path; ?>/admin/index.php"><?php echo _('Admin'); ?></a> - <?php - if ($GLOBALS['theme']['submenu'] != 'simple' AND $GLOBALS['theme']['submenu'] != 'full') { - show_submenu($admin_items); - echo "\t</li>\n"; - } - else { - if ($location['section'] == 'admin' || $GLOBALS['theme']['submenu'] == 'full') { - echo "\t</li>\n"; - show_submenu($admin_items); - } - } // end if browse sub menu -} // end if access - ?> - - <li id="sidebar_prefs"<?php - if ($location['page'] == "preferences.php" ){ - echo " class=\"activetopmenu\" "; - }?>> - <a href="<?php echo $web_path; ?>/preferences.php"><?php echo _('Preferences'); ?></a> - </li> - <li id="sidebar_browse"<?php - if ($location['page'] == "browse.php" || - $location['page'] == "artists.php" || - $location['page'] == "albums.php" ){ - echo " class=\"activetopmenu\" "; - }?>> - <a href="<?php echo $web_path; ?>/browse.php"><?php echo _('Browse'); ?></a> - <?php - if ($GLOBALS['theme']['submenu'] != 'simple' AND $GLOBALS['theme']['submenu'] != 'full') { - show_submenu($browse_items); - echo "\t</li>\n"; - } - else { - if ($location['section'] == 'browse' || $GLOBALS['theme']['submenu'] == 'full') { - echo "\t</li>\n"; - show_submenu($browse_items); - } - } - ?> - <li id="sidebar_plists"<?php - if ($location['page'] == "playlist.php"){ - echo " class=\"activetopmenu\" "; - }?>> - <a href="<?php echo $web_path; ?>/playlist.php"><?php echo _('Playlists'); ?></a> - </li> - <li id="sidebar_stats"<?php - if ($location['page'] == "stats.php"){ - echo " class=\"activetopmenu\" "; - }?>> - <a href="<?php echo $web_path; ?>/stats.php"><?php echo _('Statistics'); ?></a> - </li> - <li id="sidebar_search"<?php - if ($location['page'] == "search.php"){ - echo " class=\"activetopmenu\" "; - }?>> - <a href="<?php echo $web_path; ?>/search.php"><?php echo _('Search'); ?></a> - </li> -<?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?> - <li id="sidebar_subsearch"> - <form name="sub_search" method="post" action="<?php echo $web_path; ?>/search.php" enctype="multipart/form-data" style="Display:inline"> - <input type="text" name="search_string" value="" size="5" /> - <input class="smallbutton" type="submit" value="<?php echo _('Search'); ?>" /> - <input type="hidden" name="action" value="quick_search" /> - <input type="hidden" name="method" value="fuzzy" /> - <input type="hidden" name="object_type" value="song" /> - </form> - </li> -<?php } // end if ($GLOBALS['theme']['orientation'] != 'horizontal')?> - <li id="sidebar_random"<?php - if ($location['page'] == "randomplay.php"){ - echo " class=\"activetopmenu\" "; - }?>> - <a href="<?php echo $web_path; ?>/randomplay.php"><?php echo _('Random'); ?></a> - </li> -<?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?> - <li id="sidebar_form"> - <form name="sub_random" method="post" enctype="multipart/form-data" action="<?php echo $web_path; ?>/song.php?action=random&method=stream" style="Display:inline"> - <select name="random" > - <option value="1">1</option> - <option value="5" selected="selected">5</option> - <option value="10">10</option> - <option value="20">20</option> - <option value="30">30</option> - <option value="50">50</option> - <option value="100">100</option> - <option value="500">500</option> - <option value="1000">1000</option> - <option value="-1"><?php echo _('All'); ?></option> - </select> - <?php show_genre_pulldown('genre','','','13',''); ?> - <br /> - <select name="random_type" > - <option value="Songs"><?php echo _('Songs'); ?></option> - <option value="length"><?php echo _('Minutes'); ?></option> - <option value="full_artist"><?php echo _('Artists'); ?></option> - <option value="full_album"><?php echo _('Albums'); ?></option> - <option value="unplayed"><?php echo _('Less Played'); ?></option> - </select> - <br /> - <?php show_catalog_pulldown('catalog',''); ?> - <br /> - <input class="smallbutton" type="submit" value="<?php echo _('Enqueue'); ?>" /> - </form> - </li> -<?php } // end if ($GLOBALS['theme']['orientation'] != 'horizontal') ?> -<?php if ($GLOBALS['user']->prefs['localplay_level'] > 0 AND Config::get('allow_localplay_playback')) { ?> - <li id="sidebar_localplay"> - <a href="<?php echo $web_path; ?>/localplay.php"><?php echo _('Localplay'); ?></a> - </li> -<?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?> - <li id="sidebar_localplay_ctrl"> - <?php //require_once(Config::get('prefix') . '/templates/show_localplay_control.inc.php'); ?> - </li> -<?php } // if horizontal orientation ?> -<?php } // if localplay access ?> - <li> - <?php - $required_info = Config::get('ajax_info'); - $ajax_url = Config::get('ajax_url'); - ?> - <?php //require_once(Config::get('prefix') . '/templates/show_playtype_switch.inc.php'); ?> - </li> -<?php if (Config::get('allow_democratic_playback')) { ?> - <li> - <a href="<?php echo $web_path; ?>/tv.php"><?php echo _('Democratic View'); ?></a> - </li> -<?php } // if democratic play ?> -<?php if (Config::get('use_auth')) { ?> - <li id="sidebar_logout"><a href="<?php echo $web_path; ?>/logout.php"><?php echo _('Logout'); ?></a></li> -<?php } // end (Config::get('use_auth'))?> -</ul> ---> diff --git a/templates/sidebar_admin.inc.php b/templates/sidebar_admin.inc.php index e5e2867b..59ca5b2a 100644 --- a/templates/sidebar_admin.inc.php +++ b/templates/sidebar_admin.inc.php @@ -1,8 +1,10 @@ -<h4><?php echo _('Browse By'); ?></h4> -<select name="type"> - <option value="song"><?php echo _('Song Title'); ?></option> - <option value="album"><?php echo _('Albums'); ?></option> - <option value="artist"><?php echo _('Artist'); ?></option> - <option value="genre"><?php echo _('Genre'); ?></option> -</select> +<h4><?php echo _('Catalogs'); ?></h4> +<a href="<?php echo $web_path; ?>/admin/catalog.php?action=show_add_catalog"><?php echo _('Add a Catalog'); ?></a> <hr /> +<h4><?php echo _('Other Tools'); ?></h4> +<a href="<?php echo $web_path; ?>/admin/catalog.php?action=clear_now_playing"><?php echo _('Clear Now Playing'); ?></a> +<a href="<?php echo $web_path; ?>/admin/catalog.php?action=clear_stats"><?php echo _('Clear Catalog Stats'); ?></a> +<a href="<?php echo $web_path; ?>/admin/catalog.php?action=gather_album_art"><?php echo _('Gather Album Art'); ?></a> +<hr /> + + |