Esempio n. 1
0
?>
<p class="note">Поля, відмічені <span class="required">*</span> обов'язкові для заповнення!</p>
<?php 
echo $form->errorSummary($model);
//echo $form->errorSummary($model->personprice)
?>
<div class="form well">
<?php 
//------------------------------------------------------------------------------------------------------------------------------------//
?>

    <div class="row-fluid">
        <div class ="span4">
        <?php 
$idperson = $model->idPersonSpeciality;
$model->CustomerName = PersonSpecialityView::model()->find("idPersonSpeciality = {$idperson}")->FIO;
echo $form->labelEx($model, 'CustomerName');
//,array('class'=>'span3'));
?>
        <?php 
echo $form->textField($model, 'CustomerName', array('id' => "CustomerName", 'class' => 'span12 '));
?>
        <?php 
echo $form->error($model, 'CustomerName');
?>
        </div>
        <div class ="span8">
        <?php 
echo $form->labelEx($model, 'DocCustumer');
//,array('class'=>'span3'));
?>
 /**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = PersonSpecialityView::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Esempio n. 3
0
$this->breadcrumbs = array('Contracts' => array('index'), $model->idContract);
$this->menu = array(array('label' => 'Змінити запис', 'url' => array('update', 'id' => $model->idContract), 'icon' => " icon-pencil"), array('label' => 'Видалити запис', 'url' => '#', 'icon' => "icon-trash", 'linkOptions' => array('submit' => array('delete', 'id' => $model->idContract), 'confirm' => 'Ви впевнені, що хочете видалити цей елемент?')), array('label' => 'Переглянути записи', 'url' => array('admin'), 'icon' => "icon-list-alt"));
?>

<h2>Контракт №<?php 
echo $model->ContractNumber;
?>
 від <?php 
echo $model->ContractDate;
?>
</h2>
<?php 
$specmodel = new PersonSpecialityView();
if ($model->isNewRecord) {
    $specmodel = PersonSpecialityView::model()->find("idPersonSpeciality = {$specid}");
} else {
    $specmodel = PersonSpecialityView::model()->find("idPersonSpeciality = " . $model->PersonSpecialityID);
}
$specid = $model->PersonSpecialityID;
$url = Yii::app()->user->getPricePrintIP($specid);
$model->PersonSpecialityID = $specmodel->SpecCodeName;
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'type' => array('bordered', 'condensed', 'striped'), 'attributes' => array('idContract', 'PersonSpecialityID', 'ContractDate', 'CustomerName', 'CustomerDoc', 'CustomerPhone', 'CustomerAddress', 'CustomerPaymentDetails', 'PaymentDate', 'Comment')));
?>
<hr/>
<?php 
$this->widget('bootstrap.widgets.TbButton', array('label' => 'Друкувати', 'type' => 'danger', 'size' => 'large', 'url' => $url, 'htmlOptions' => array('rel' => "prettyPhoto", 'title' => "Контракт")));
?>

<?php 
$this->beginWidget('ext.prettyPhoto.PrettyPhoto', array('id' => 'pretty_photo', 'options' => array('opacity' => 0.6, 'modal' => true)));
$this->endWidget('ext.prettyPhoto.PrettyPhoto');