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/sidebar.inc.php | |
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/sidebar.inc.php')
-rw-r--r-- | templates/sidebar.inc.php | 182 |
1 files changed, 6 insertions, 176 deletions
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> ---> |