* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @date $Date$
 * @revision $Revision$
 * @author $Author$
 * @headurl $HeadURL$
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
//Load JavaScripts for light box
JHtml::_('behavior.modal');
//Load PlayJoom Slider
JLoader::import('helpers.pjslider', JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_playjoom');
$artist = base64_decode(JRequest::getVar('artist'));
$artist_infos = PlayJoomModelArtist::getArtistInfos($artist);
$artist_count = PlayJoomModelArtist::getArtistCount($artist);
$number_of_albums = PlayJoomArtistHelper::getOptions('album', base64_decode(JRequest::getVar('artist')));
if ($artist_count->counter == 1 && $artist_infos->infotxt != '' || $artist_count->counter == 1 && $artist_infos->members != '' || $artist_count->counter == 1 && $artist_infos->formation != '0000-00-00') {
    $artist_content = '<div class="infotxt">' . $artist_infos->infotxt . '</div>' . '<ul class="infolist">';
    if ($artist_infos->members != '') {
        $artist_content .= '<li>' . JText::_('COM_PLAYJOOM_ALBUM_MEMBERS') . ': ' . $artist_infos->members . '</li>';
    }
    if ($artist_infos->formation != '0000-00-00') {
        $artist_content .= '<li>' . JText::_('COM_PLAYJOOM_ALBUM_FOUNDED') . ': ' . $artist_infos->formation . '</li>';
    }
    $artist_content .= '</ul>';
    echo '<div class="trackbox">';
    echo '<h3 class="subheader">' . $artist . ' | ' . $this->pagination->total . ' Tracks</h3>';
    echo JHtml::_('PlayJoomSliders.start');
    echo JHtml::_('PlayJoomSliders.panel', JText::_('COM_PLAYJOOM_ALBUM_MORE_INFO'), 'more');
    echo $artist_content;
    echo JHtml::_('PlayJoomSliders.end');
</button>
		                            
                                          <?php 
echo '<p class="filter-selector">';
if (count($number_of_albums) > 1) {
    echo '<select name="filter_album" class="PJ-filtermenu" onchange="this.form.submit()">';
    echo '<option value="">' . JText::_('COM_PLAYJOOM_FILTER_ALBUM') . '</option>';
    echo JHtml::_('select.options', PlayJoomArtistHelper::getOptions('album', base64_decode(JRequest::getVar('artist'))), 'value', 'text', $this->state->get('filter.album'));
    echo '</select>';
}
?>
	
			                              <select name="filter_category_id" class="PJ-filtermenu" onchange="this.form.submit()">
				                              <option value=""><?php 
echo JText::_('COM_PLAYJOOM_FILTER_GENRE');
?>
</option>
				                              <?php 
echo JHtml::_('select.options', JHtml::_('category.options', 'com_playjoom'), 'value', 'text', $this->state->get('filter.category_id'));
?>
			                              </select>
			                              <?php 
if (count($number_of_years) > 1) {
    echo '<select name="filter_year" class="PJ-filtermenu" onchange="this.form.submit()">';
    echo '<option value="">' . JText::_('COM_PLAYJOOM_FILTER_YEAR') . '</option>';
    echo JHtml::_('select.options', PlayJoomArtistHelper::getOptions('year', base64_decode(JRequest::getVar('artist'))), 'value', 'text', $this->state->get('filter.year'));
    echo '</select>';
}
echo '</p>';
echo '</fieldset>';
echo '<div class="divider-view"></div>';