Hi!
It is possible put a CTreeView inside on one of the CJuiAccordion’s panel??
How can I get this?
Regards
Hi!
It is possible put a CTreeView inside on one of the CJuiAccordion’s panel??
How can I get this?
Regards
I believe you can do it this way (not tested)
$this->widget('zii.widgets.jui.CJuiAccordion', array(
'panels'=>array(
'panel 1'=>$this->renderPartial('_partial',null,true),
),
));
Then on your _partial view you render the tree
Cheers
for the momment I’ve solved the problem with jquery
view
$tree1='<ul class="tree">
<li>'.CHtml::link('Administracion',array('../user/admin')).'</li>
</ul>';
$tree2='<ul class="tree">
<li>'.CHtml::link('Asignaciones',array('../rights/assignment/view')).'</li>
<li>'.CHtml::link('Permisos',array('../rights/authItem/permissions')).'</li>
</ul>';
$this->widget('zii.widgets.jui.CJuiAccordion', array(
'panels' => array(
CHtml::image(bUrl().'/images/icons/icon1.png', '').' Gestión de Usuarios' => $tree1,
CHtml::image(bUrl().'/images/icons/icon2.png', '').' Gestión de Permisos' => $tree2,
),
'options' => array(
'animated' => 'slide',
'collapsible' => true,
'autoHeight' => false,
'active' => false,
'navigation' => true,
'autoHeight' => true,
),
));
//para los treeview
$js = '$("ul.tree").treeview({
collapsed:true,
persist: "location",
animated: "fast"
});';
Yii::app()->clientScript->registerScript('tree', $js, CClientScript::POS_LOAD);
regards