<?php
/**
 * @var $this WorkController
 * @var $b WorkBrand
 */
$models = $b->workModels;
if (count($models) == 0) return;
?>
<div class="catalog-sublist" id="brand-<?php echo $b->id?>-models"
     style="display: none;">

    <?php foreach ($models as $model): ?>
    <a href="<?php echo
    CHtml::encode($this->createUrl('work/model', array(
        'brand' => $model->workBrand->link,
        'model' => $model->link
    )));
        ?>" class="catalog-sublist-item">
        <span class="catalog-sublist-item-img">
            <?php echo CHtml::image($model->imageBehavior->getFileUrl('small'));?>
        </span>
        <span class="catalog-sublist-item-name">
            <?php echo CHtml::encode($model->i18n->name)?>
        </span>
    </a>
    <?php endforeach; ?>

</div>