Example #1
0
		<div class="col-sm-10">
		<?php 
echo $form->textField($model, 'position', array('class' => 'form-control', 'maxlength' => 255, 'placeholder' => 'Позиция'));
?>
		<?php 
echo $form->error($model, 'position');
?>
		</div>
	</div>
	<div class="form-group">
                <?php 
echo $form->labelEx($model, 'active', array('class' => 'col-sm-2 control-label'));
?>
                <div class="col-sm-10">
                <?php 
echo $form->dropDownList($model, 'active', Cifer::getStatusNames(), array('encode' => false, 'class' => 'form-control', 'options' => array(Cifer::STATUS_ACTIVE => array('selected' => 'selected'))));
?>
                </div>
        </div>

     <div class="form-group">
	   <?php 
CHtml::$afterRequiredLabel = ' <span class="text-danger">*</span>';
?>
		<?php 
echo $form->labelEx($model, 'image', array('class' => 'col-sm-2 control-label'));
?>
		<div class="col-sm-10">
		<?php 
$this->widget('ext.dropzone.EDropzone', array('id' => 'part' . $model->id, 'model' => $model, 'name' => 'image', 'attribute' => 'image', 'formId' => 'cifer-form', 'sizeLimit' => $sizeLimit, 'deleteFile' => Yii::app()->createAbsoluteUrl('/admin/cifer/deletefile'), 'unlinkFile' => Yii::app()->createAbsoluteUrl('/file/upload/unlink', array('uploadsession' => $this->uploadsession)), 'url' => $this->createAbsoluteUrl('/file/upload/upload', array('inputName' => 'image', 'uploadsession' => $this->uploadsession)), 'options' => array()));
?>
Example #2
0
		        		<div class="ex_zal_text"><?php 
        echo $zal->title;
        ?>
</div>
		        	</div>
			<?php 
    }
}
?>
        	</div>
        	</div>

        </div>
        <div id="ex_dop">
        <?php 
$dops = Cifer::model()->active()->findAll(array('order' => 'position ASC'));
if ($dops) {
    foreach ($dops as $dop) {
        $src = $dop->getOrigFilePath() . $dop->image;
        ?>
        		<div class="ex_dop">
				<i style="background-image:url('<?php 
        echo $src;
        ?>
');"></i>
				    <span class="f-alger"><?php 
        echo $dop->number;
        ?>
</span>
					<span><?php 
        echo $dop->title;
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Zal the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Cifer::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }