private function __getListChilds($childrens) { $html = CHtml::openTag('ul'); $urlAction = HController::getCurrentUrl(); foreach ($childrens as $index => $child) { $html .= CHtml::openTag('li'); $url = Yii::app()->createAbsoluteUrl($urlAction, array('action' => 'list', 'category' => $child['item']->id)); $html .= CHtml::link($child['item']->name, $url); $childItems = $this->__getListChilds($child['children']); if (count($childItems)) { $html .= $childItems; } $html .= CHtml::closeTag('li'); } $html .= CHtml::closeTag('ul'); return $html; }
private function __getListChilds($childrens) { if (!count($childrens)) { return ''; } $html = CHtml::openTag('ul', array('class' => 'collapsibleList')); $urlAction = HController::getCurrentUrl(); foreach ($childrens as $index => $child) { $url = Yii::app()->createUrl($urlAction, array('action' => 'list', 'category' => $child['item']->id)); $html .= CHtml::openTag('li', $url == Yii::app()->request->requestUri ? array('class' => 'active') : array()); $html .= CHtml::link($child['item']->name, $url); $childItems = $this->__getListChilds($child['children']); if (count($childItems)) { $html .= $childItems; } $html .= CHtml::closeTag('li'); } $html .= CHtml::closeTag('ul'); return $html; }
?> <h3><?php echo CHtml::encode($category->name); ?> </h3> <?php } ?> <div class="h-module-live-entries"> <ul> <?php foreach ($data as $item) { ?> <li> <?php $url = Yii::app()->createAbsoluteUrl(HController::getCurrentUrl(), array('action' => 'detail', 'live' => $item->id)); ?> <div class="h-module-live-left-content"> <a href="<?php echo $url; ?> "><img title="<?php echo CHtml::encode($item->title); ?> " alt="" src="<?php if ($item->image) { echo Yii::app()->createAbsoluteUrl('/') . '/files/live/thumb_' . $item->image; } else { echo $baseScriptUrl . '/no_image.gif'; } ?>
<div class="h-module-products-detail"> <?php $url = Yii::app()->createAbsoluteUrl(HController::getCurrentUrl(), array('action' => 'detail', 'product' => $data->id)); ?> <span><a href="<?php echo $url; ?> "><img class="h-product-img" width="240" alt="" rel="<?php echo $data->id . '|||' . $data->price; ?> " title="<?php echo CHtml::encode($data->name); ?> " src="<?php if ($data->image) { echo Yii::app()->createAbsoluteUrl('/') . '/files/products/' . $data->image; } else { echo $baseScriptUrl . '/no_image.gif'; } ?> " /></a></span> <h4> <?php echo CHtml::link($data->name, $url); ?> <?php if (!Yii::app()->user->isGuest && Yii::app()->user->superuser == 1) { ?> <a class="h-dialog-link" href="<?php echo Yii::app()->createAbsoluteUrl('/products/manage_items/update', array('id' => $data->id, 'category' => '')); ?>