<?php
/**
 * @package 	bt_portfolio - BT Portfolio Component
 * @version		3.0.3
 * @created		Feb 2012
 * @author		BowThemes
 * @email		support@bowthems.com
 * @website		http://bowthemes.com
 * @support		Forum - http://bowthemes.com/forum/
 * @copyright	Copyright (C) 2012 Bowthemes. All rights reserved.
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
 // no direct access
defined('_JEXEC') or die;

/**
 * @package		BT.Administrator
 * @subpackage	com_bt_portfolio
 */
abstract class JHtmlBtadministrator
{
	/**
	 * @param	int $value	The state value
	 * @param	int $i
	 */
	static function featured($value = 0, $i, $canChange = true)
	{
		$states	= array(
			0	=> array('disabled.png',	'portfolios.featured',	'COM_BT_PORTFOLIO_UNFEATURED',	'COM_BT_PORTFOLIO_TOGGLE_TO_FEATURE'),
			1	=> array('featured.png',		'portfolios.unfeatured',	'COM_BT_PORTFOLIO_FEATURED',		'COM_BT_PORTFOLIO_TOGGLE_TO_UNFEATURE'),
		);
		$state	= JArrayHelper::getValue($states, (int) $value, $states[1]);
		$html	= JHtml::_('image','admin/'.$state[0], JText::_($state[2]), NULL, true);
		if ($canChange) {
			$html	= '<a href="#" onclick="return listItemTask(\'cb'.$i.'\',\''.$state[1].'\')" title="'.JText::_($state[3]).'">'
					. $html.'</a>';
		}

		return $html;
	}
}
