summaryrefslogtreecommitdiffstats
path: root/templates/sidebar_home.inc.php
diff options
context:
space:
mode:
authorPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-06-10 05:33:57 +0000
committerPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-06-10 05:33:57 +0000
commit7f3669335313adf9108119df4186a51a5f94e292 (patch)
treef8b488a09df2198723de5661b050bc31e112b7ab /templates/sidebar_home.inc.php
parentc1ed41a16dcbf1a632ad2ac99b40174628bf072e (diff)
downloadampache-7f3669335313adf9108119df4186a51a5f94e292.tar.gz
ampache-7f3669335313adf9108119df4186a51a5f94e292.tar.bz2
ampache-7f3669335313adf9108119df4186a51a5f94e292.zip
Change Browse from static to instantiable. Among other things, fixes FS#13;
probably also breaks things. Most things appear to still work, but I may have missed some cases.
Diffstat (limited to 'templates/sidebar_home.inc.php')
-rw-r--r--templates/sidebar_home.inc.php49
1 files changed, 2 insertions, 47 deletions
diff --git a/templates/sidebar_home.inc.php b/templates/sidebar_home.inc.php
index 41e74256..3593fb50 100644
--- a/templates/sidebar_home.inc.php
+++ b/templates/sidebar_home.inc.php
@@ -24,7 +24,6 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
<ul class="sb2" id="sb_home">
<li><h4><?php echo _('Browse'); ?></h4>
<?php
- $allowed_filters = Browse::get_allowed_filters();
// Build the selected dealie
$text = scrub_in($_REQUEST['action']) . '_ac';
${$text} = ' selected="selected"';
@@ -39,52 +38,8 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
<li id="sb_browse_bb_Video"><a href="<?php echo $web_path; ?>/browse.php?action=video"><?php echo _('Videos'); ?></a></li>
</ul>
</li>
-<?php if (count($allowed_filters)) { ?>
- <li><h4><?php echo _('Filters'); ?></h4>
- <div class="sb3">
- <?php if (in_array('starts_with',$allowed_filters)) { ?>
- <form id="multi_alpha_filter_form" method="post" action="javascript:void(0);">
- <label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo _('Starts With'); ?></label>
- <input type="text" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php echo scrub_out(Browse::get_filter('starts_with')); ?>" onKeyUp="DelayRun(this,'400','ajaxState','<?php echo Config::get('ajax_url'); ?>?page=browse&action=browse&type=<?php echo Browse::get_type(); ?>&key=starts_with','multi_alpha_filter');">
- </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&amp;key=min_count&amp;type=<?php echo Browse::get_type(); ?>&amp;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&amp;type=<?php echo Browse::get_type(); ?>&amp;key=rated&amp;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&type=' . Browse::get_type() . '&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&type=' . Browse::get_type() . '&key=playlist_type&value=1','')); ?>
- <?php } // if playlist_type ?>
- <?php if (in_array('object_type',$allowed_filters)) { ?>
- <?php $string = 'otype_' . Browse::get_filter('object_type'); ${$string} = 'selected="selected"'; ?>
- <input id="typeSongRadio" type="radio" name="object_type" value="1" <?php echo $otype_song; ?>/>
- <label id="typeSongLabel" for="typeSongRadio"><?php echo _('Song Title'); ?></label><br />
- <?php echo Ajax::observe('typeSongRadio','click',Ajax::action('?page=tag&action=browse_type&type=song','')); ?>
- <input id="typeAlbumRadio" type="radio" name="object_type" value="1" />
- <label id="typeAlbumLabel" for="typeAlbumRadio"><?php echo _('Albums'); ?></label><br />
- <?php echo Ajax::observe('typeAlbumRadio','click',Ajax::action('?page=tag&action=browse_type&type=album','')); ?>
- <input id="typeArtistRadio" type="radio" name="object_type" value="1" />
- <label id="typeArtistLabel" for="typeArtistRadio"><?php echo _('Artist'); ?></label><br />
- <?php echo Ajax::observe('typeArtistRadio','click',Ajax::action('?page=tag&action=browse_type&type=artist','')); ?>
- <?php } ?>
- </div>
- </li>
-<?php } ?>
+<?php Ajax::start_container('browse_filters'); ?>
+<?php Ajax::end_container(); ?>
<li><h4><?php echo _('Playlist'); ?></h4>
<ul class="sb3" id="sb_home_info">
<li id="sb_home_info_CurrentlyPlaying"><a href="<?php echo $web_path; ?>/index.php"><?php echo _('Currently Playing'); ?></a></li>