<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
JHTML::stylesheet('chalange.css','administrator/components/com_chalange/assets/css/');
jimport('joomla.application.component.view');
/**
* HTML View class for the mycomponent component
* @package Mycomponent
*/
class ChalangeAdminViewRaceAdmin extends JView{
function display($tpl=null){
$model=$this->getModel();
$raceTypesList=$model->getRaceTypesList();
JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');
$row=& JTable::getInstance('Races','Table');
$categories=$model->getCategories(null);//retorna todas las categorÃas disponibles
$this->assignRef('chalangeId',JRequest::getCmd('chalangeId'));
$cid= JRequest::getVar('cid',array(0),'','array');
$id=$cid[0];
$task='';
if ($id==0){
$task='new';
}else{
$task='edit';
$row->load($id);
$this->assignRef('row',$row);
$categories=$model->getCategories($id);//retorna todas las categorÃas disponibles
}
$this->assignRef('categories',$categories);
$this->assignRef('task',$task);
$this->assignRef('raceTypesList',$raceTypesList);
parent::display($tpl);
}
}
?>