diff options
Diffstat (limited to 'templates/sidebar_browse.inc.php')
-rw-r--r-- | templates/sidebar_browse.inc.php | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/templates/sidebar_browse.inc.php b/templates/sidebar_browse.inc.php index fb888eb9..450108f9 100644 --- a/templates/sidebar_browse.inc.php +++ b/templates/sidebar_browse.inc.php @@ -20,7 +20,7 @@ */ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); - +$allowed_filters = Browse::get_allowed_filters(); ?> <ul class="sb2" id="sb_browse"> <li><h4><?php echo _('Browse By'); ?></h4> @@ -40,22 +40,35 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); </li> <li><h4><?php echo _('Filters'); ?></h4> <div class="sb3"> - <?php show_alphabet_list($_REQUEST['alpha_match'],$_REQUEST['action']); ?> - <form id="multi_alpha_filter_form" method="post" action="javascript:void(0);"> - <input type="textbox" id="multi_alpha_filter" name="value" value="<?php echo scrub_out($_REQUEST['alpha_match']); ?>" onChange="<?php echo Ajax::action('?page=browse&action=browse&key=alpha_match','multi_alpha_filter','multi_alpha_filter_form'); ?>"> - <label id="multi_alpha_filterLabel" for="multi_art_filter"><?php echo _('Starts With'); ?></label> - </form> - <!-- - <input type="checkbox" onclick="ajaxPut('<?php echo $ajax_info; ?>?action=browse&key=min_count&value=1');return true;" value="1" /> - <?php echo _('Minimum Count'); ?><br /> - <input type="checkbox" onclick="ajaxPut('<?php echo $ajax_info; ?>?action=browse&key=rated&value=1');return true;" value="1" /> - <?php echo _('Rated'); ?><br /> - <input id="unplayedCB" type="checkbox" <?php echo $string = Browse::get_filter('unplayed') ? 'checked="checked"' : ''; ?>/> - <label id="unplayedLabel" for="unplayedCB"><?php echo _('Unplayed'); ?></label><br /> - --> - <input id="show_artCB" type="checkbox" <?php echo $string = Browse::get_filter('show_art') ? 'checked="checked"' : ''; ?>/> - <label id="show_artLabel" for="show_artCB"><?php echo _('Show Art'); ?></label><br /> - <?php echo Ajax::observe('show_artCB','click',Ajax::action('?page=browse&action=browse&key=show_art&value=1','')); ?> + <?php if (in_array('alpha_match',$allowed_filters)) { ?> + <?php show_alphabet_list($_REQUEST['alpha_match'],$_REQUEST['action']); ?> + <form id="multi_alpha_filter_form" method="post" action="javascript:void(0);"> + <input type="textbox" id="multi_alpha_filter" name="value" value="<?php echo scrub_out($_REQUEST['alpha_match']); ?>" onChange="<?php echo Ajax::action('?page=browse&action=browse&key=alpha_match','multi_alpha_filter','multi_alpha_filter_form'); ?>"> + <label id="multi_alpha_filterLabel" for="multi_art_filter"><?php echo _('Starts With'); ?></label> + </form> + <?php } // end if alpha_match ?> + <?php if (in_array('minimum_count',$allowed_filters)) { ?> + <input id="mincountCB" type="checkbox" onclick="ajaxPut('<?php echo $ajax_info; ?>?action=browse&key=min_count&value=1');return true;" value="1" /> + <label id="mincountLabel" for="mincountCB"><?php echo _('Minimum Count'); ?></label><br /> + <?php } ?> + <?php if (in_array('rated',$allowed_filters)) { ?> + <input id="ratedCB" type="checkbox" onclick="ajaxPut('<?php echo $ajax_info; ?>?action=browse&key=rated&value=1');return true;" value="1" /> + <label id="ratedLabel" for="ratedCB"><?php echo _('Rated'); ?></label><br /> + <?php } ?> + <?php if (in_array('unplayed',$allowed_filters)) { ?> + <input id="unplayedCB" type="checkbox" <?php echo $string = Browse::get_filter('unplayed') ? 'checked="checked"' : ''; ?>/> + <label id="unplayedLabel" for="unplayedCB"><?php echo _('Unplayed'); ?></label><br /> + <?php } ?> + <?php if (in_array('show_art',$allowed_filters)) { ?> + <input id="show_artCB" type="checkbox" <?php echo $string = Browse::get_filter('show_art') ? 'checked="checked"' : ''; ?>/> + <label id="show_artLabel" for="show_artCB"><?php echo _('Show Art'); ?></label><br /> + <?php echo Ajax::observe('show_artCB','click',Ajax::action('?page=browse&action=browse&key=show_art&value=1','')); ?> + <?php } // if show_art ?> + <?php if (in_array('playlist_type',$allowed_filters)) { ?> + <input id="show_allplCB" type="checkbox" <?php echo $string = Browse::get_filter('playlist_type') ? 'checked="checked"' : ''; ?>/> + <label id="show_allplLabel" for="showallplCB"><?php echo _('All Playlists'); ?></label><br /> + <?php echo Ajax::observe('show_allplCB','click',Ajax::action('?page=browse&action=browse&key=playlist_type&value=1','')); ?> + <?php } // if playlist_type ?> </div> </li> </ul> |