Exemplo n.º 1
0
$imageExists = $model->fileExists() && $model->isImage();
?>


<div class="page-title icon media">
    <h2>
        <span class="no-bold"><?php 
echo Yii::t('media', 'File: ');
?>
</span>
        <?php 
echo $model->renderAttribute($model->drive || !empty($model->name) ? "name" : "fileName");
?>
    </h2>
<?php 
echo X2Html::editRecordbutton($model);
?>
</div>

<div class='<?php 
echo $imageExists ? 'x2-layout-island ' : '';
?>
tray media-tray'>
    <?php 
if ($imageExists) {
    ?>
    <div class='column'>
    <?php 
}
$assoc = X2Model::getAssociationModel($model->associationType, $model->associationId);
$this->widget('DetailView', array('model' => $model, 'scenario' => 'Default', 'specialFields' => array('associationId' => $assoc ? $assoc->link : ''), 'htmlOptions' => array('class' => $imageLink ? 'x2-layout-island' : '')));