<?php
/**
 * @package BILLETS
 * @link 	http://www.dioscouri.com
 * @license GNU/GPLv2
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

jimport( 'joomla.application.component.view' );

/**
 * Billets View
 *
 * @package BILLETS
 */
class BilletsViewAddons extends JView {
	/**
	 * Billets view display method
	 * @return void
	 **/
	 // **********************************************
	function display($tpl = null) {
		global $mainframe;
        jimport('joomla.utilities.date');
         
        JToolBarHelper::title( JText::_( _BILLETS_ADDONS ), 'billets' );
		// JHTML::_('stylesheet', 'billets.css', 'administrator/components/com_billets/css/');
		JToolBarHelper::deleteList( '', 'uninstall', _BILLETS_UNINSTALL );
		
        // Get data from the model
        $items =& $this->get( 'Data');
		$pagination = $this->get( 'Pagination' );
		$type = $this->get( 'Type' );
		$types = $this->get( 'Types' );
				
		$this->assignRef( 'pagination' , $pagination);
        $this->assignRef( 'items', $items );
        $this->assignRef( 'type', $type );
        $this->assignRef( 'types', $types );
		
		$this->assignRef( 'order', strval( htmlspecialchars( $mainframe->getUserStateFromRequest( "order", 'order', 'title' ) ) ) );
		$this->assignRef( 'order_dir', strval( htmlspecialchars( $mainframe->getUserStateFromRequest( "order_dir", 'order_dir', 'asc' ) ) ) );

        parent::display($tpl);
    }
}
// ************************************************************************