Esempio n. 1
0
 /**
  * Displays a single Role model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember();
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $this->findModel($id)]);
 }
 /**
  * Lists all Less models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new LessSearch();
     $dataProvider = $searchModel->search($_GET);
     Tabs::clearLocalStorage();
     Url::remember();
     \Yii::$app->session['__crudReturnUrl'] = null;
     return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }
 /**
  * Displays a single ImageGallery model.
  * @param integer $id
  * @param null $returnUrl
  *
  * @return mixed
  */
 public function actionView($id, $returnUrl = null)
 {
     Tabs::rememberActiveTab(\Yii::$app->request->url, $this->id);
     if ($returnUrl === null) {
         $returnUrl = $this->module->id ? $this->module->id . '/' . $this->id . '/' . $this->action->id : $this->id . '/' . $this->action->id;
         $returnUrl = \Yii::$app->urlManager->createUrl([$returnUrl, 'id' => $id]);
     }
     Url::remember($returnUrl);
     return $this->render('view', ['model' => $this->findModel($id)]);
 }
 /**
  * Displays a single Country model.
  * @param integer $country_id
  *
  * @return mixed
  */
 public function actionView($country_id)
 {
     $resolved = \Yii::$app->request->resolve();
     $resolved[1]['_pjax'] = null;
     $url = Url::to(array_merge(['/' . $resolved[0]], $resolved[1]));
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember($url);
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $this->findModel($country_id)]);
 }
 /**
  * Displays a single Subdistrict model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $model = $this->findModel($id);
     if ($model->operation->allowView == FALSE) {
         throw $model->operation->exception('view');
     }
     \Yii::$app->session['__crudReturnUrl'] = ReturnUrl::getUrl(Url::previous());
     Url::remember();
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $model]);
 }
 /**
  * Displays a single Table model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $table = $this->findModel($id);
     $searchModel = null;
     $dataProvider = null;
     if ($table->model_search_class != null) {
         $class = $table->model_search_class;
         $searchModel = new $class();
         $dataProvider = $searchModel->search($_GET);
     }
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember();
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $table, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Esempio n. 7
0
 /**
  * Displays a single Budget model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $modelHistory = new BudgetHistory();
     $historySearch = new BudgetHistorySearch();
     $providerIncome = $historySearch->searchItems($id, BudgetItem::TYPE_INCOME, Yii::$app->request->queryParams);
     $providerCost = $historySearch->searchItems($id, BudgetItem::TYPE_COST, Yii::$app->request->queryParams);
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember();
     Tabs::rememberActiveState();
     try {
         if ($modelHistory->load($_POST) && $modelHistory->save()) {
             return $this->redirect(Url::previous());
         } elseif (!\Yii::$app->request->isPost) {
             $modelHistory->load($_GET);
         }
     } catch (\Exception $e) {
         $msg = isset($e->errorInfo[2]) ? $e->errorInfo[2] : $e->getMessage();
         $modelHistory->addError('_exception', $msg);
     }
     return $this->render('view', ['model' => $this->findModel($id), 'modelHistory' => $modelHistory, 'providerIncome' => $providerIncome, 'providerCost' => $providerCost]);
 }
Esempio n. 8
0
        <div class="panel-body">



    <?php 
$this->beginBlock('common\\models\\UserProfile');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'user_id', 'name', 'lastname', 'lesson_cost:url', 'currency_id', 'created_at', 'updated_ad']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . 'Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data-confirm' => '' . 'Are you sure to delete this item?' . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> UserProfile', 'content' => $this->blocks['common\\models\\UserProfile'], 'active' => true]]]);
?>
        </div>
    </div>
</div>
Esempio n. 9
0
                <div class="form-group">
                    <label class="control-label col-sm-3" for="budgetitem-date">Планируемая дата</label>
                    <div class="col-sm-6">
                        <?php 
echo kartik\date\DatePicker::widget(['model' => $model, 'attribute' => 'date', 'pluginOptions' => ['format' => 'dd.mm.yyyy', 'class' => 'col-sm-6']]);
?>
                    </div>
                </div>


                <?php 
$this->endBlock();
?>

                <?php 
echo Tabs::widget(['encodeLabels' => false, 'items' => [['label' => Yii::t('app', 'Budget Item'), 'content' => $this->blocks['main'], 'active' => true]]]);
?>
                <hr/>
                <?php 
echo $form->errorSummary($model);
?>
                <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-check"></span> ' . ($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save')), ['id' => 'save-' . $model->formName(), 'class' => 'btn btn-success']);
?>

                <?php 
ActiveForm::end();
?>

            </div>
Esempio n. 10
0
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . 'New' . ' Payment', ['payment/create', 'Payment' => ['created_by' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
$this->endBlock();
?>


<?php 
$this->beginBlock('UserProfile');
?>
<div style='position: relative'><div style='position:absolute; right: 0px; top 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . 'List All' . ' User Profile', ['user-profile/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . 'New' . ' User Profile', ['user-profile/create', 'UserProfile' => ['user_id' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> User', 'content' => $this->blocks['common\\models\\User'], 'active' => true], ['content' => $this->blocks['Students'], 'label' => '<small>Students <span class="badge badge-default">' . count($model->getStudents()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['Payments'], 'label' => '<small>Payments <span class="badge badge-default">' . count($model->getPayments()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['UserProfile'], 'label' => '<small>User Profile <span class="badge badge-default">' . count($model->getUserProfile()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
Esempio n. 11
0
        </div>

    </div>


    <?php 
$this->beginBlock('common\\models\\location\\LocationCurrent');
?>

    
    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', ['format' => 'html', 'attribute' => 'user_id', 'value' => $model->getUser()->one() ? Html::a($model->getUser()->one()->id, ['user/view', 'id' => $model->getUser()->one()->id]) : '<span class="label label-warning">?</span>'], ['format' => 'html', 'attribute' => 'event_id', 'value' => $model->getEvent()->one() ? Html::a($model->getEvent()->one()->id, ['event/view', 'id' => $model->getEvent()->one()->id]) : '<span class="label label-warning">?</span>'], 'is_origin', 'title', 'latitude', 'longitude', 'occur_at', 'created_at']]);
?>

    
    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . 'Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data-confirm' => '' . 'Are you sure to delete this item?' . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['common\\models\\location\\LocationCurrent'], 'active' => true]]]);
?>
</div>
Esempio n. 12
0
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Films', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Films ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getFilmCategories(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-filmcategories']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {delete}', 'contentOptions' => ['nowrap' => 'nowrap'], 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = 'film-category' . '/' . $action;
    return Url::toRoute($params);
}, 'buttons' => ['delete' => function ($url, $model) {
    return yii\helpers\Html::a('<span class="glyphicon glyphicon-remove"></span>', $url, ['class' => 'text-danger', 'title' => Yii::t('app', 'Remove'), 'data-confirm' => Yii::t('app', 'Are you sure you want to delete the related item?'), 'data-method' => 'post', 'data-pjax' => '0']);
}, 'view' => function ($url, $model) {
    return yii\helpers\Html::a('<span class="glyphicon glyphicon-cog"></span>', $url, ['data-title' => Yii::t('app', 'View Pivot Record'), 'data-toggle' => 'tooltip', 'data-pjax' => '0', 'class' => 'text-muted']);
}], 'controller' => 'film-category'], ["class" => yii\grid\DataColumn::className(), "attribute" => "film_id", "value" => function ($model) {
    if ($rel = $model->getFilm()->one()) {
        return yii\helpers\Html::a($rel->title, ["film/view", 'film_id' => $rel->film_id], ["data-pjax" => 0]);
    } else {
        return '';
    }
}, "format" => "raw"], 'last_update']]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Category', 'content' => $this->blocks['giiant\\sakila\\models\\Category'], 'active' => true], ['content' => $this->blocks['Films'], 'label' => '<small>Films <span class="badge badge-default">' . count($model->getFilms()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
Esempio n. 13
0
    <h3>
        <?php 
echo $model->actor_id;
?>
    </h3>


    <?php 
$this->beginBlock('app\\modules\\sakila\\models\\FilmActor');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['format' => 'html', 'attribute' => 'actor_id', 'value' => $model->getActor()->one() ? Html::a($model->getActor()->one()->label, ['actor/view', 'actor_id' => $model->getActor()->one()->actor_id]) : '<span class="label label-warning">?</span>'], ['format' => 'html', 'attribute' => 'film_id', 'value' => $model->getFilm()->one() ? Html::a($model->getFilm()->one()->title, ['film/view', 'film_id' => $model->getFilm()->one()->film_id]) : '<span class="label label-warning">?</span>'], 'last_update']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . Yii::t('app', 'Delete'), ['delete', 'actor_id' => $model->actor_id, 'film_id' => $model->film_id], ['class' => 'btn btn-danger', 'data-confirm' => '' . Yii::t('app', 'Are you sure to delete this item?') . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> FilmActor', 'content' => $this->blocks['app\\modules\\sakila\\models\\FilmActor'], 'active' => true]]]);
?>
</div>
Esempio n. 14
0
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' Vidmage Category', ['vidmage-category/create', 'VidmageCategory' => ['vidmage_id' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
$this->endBlock();
?>


<?php 
$this->beginBlock('VidmageTags');
?>
<div style='position: relative'><div style='position:absolute; right: 0px; top 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . Yii::t('app', 'List All') . ' Vidmage Tags', ['vidmage-tag/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' Vidmage Tag', ['vidmage-tag/create', 'VidmageTag' => ['vidmage_id' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['common\\models\\Vidmage'], 'active' => true], ['content' => $this->blocks['MemeVidmages'], 'label' => '<small>Meme Vidmages <span class="badge badge-default">' . count($model->getMemeVidmages()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['VidmageAuthors'], 'label' => '<small>Vidmage Authors <span class="badge badge-default">' . count($model->getVidmageAuthors()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['VidmageCategories'], 'label' => '<small>Vidmage Categories <span class="badge badge-default">' . count($model->getVidmageCategories()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['VidmageTags'], 'label' => '<small>Vidmage Tags <span class="badge badge-default">' . count($model->getVidmageTags()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
Esempio n. 15
0
?>


<?php 
$this->beginBlock('Files');
?>
<div style='position: relative'><div style='position:absolute; right: 0px; top: 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . Yii::t('app', 'List All') . ' Files', ['file/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' File', ['file/create', 'File' => ['sensorid' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Files', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Files ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getFiles(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-files']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update}', 'contentOptions' => ['nowrap' => 'nowrap'], 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = 'file' . '/' . $action;
    return $params;
}, 'buttons' => [], 'controller' => 'file'], 'id', 'filelink', 'filename', 'extension', 'startdate', 'enddate', 'status']]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['app\\models\\Sensor'], 'active' => true], ['content' => $this->blocks['Calibrations'], 'label' => '<small>Calibrations <span class="badge badge-default">' . count($model->getCalibrations()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['Files'], 'label' => '<small>Files <span class="badge badge-default">' . count($model->getFiles()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
</div>
Esempio n. 16
0
<div style='position: relative'><div style='position:absolute; right: 0px; top 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . Yii::t('app', 'List All') . ' Inventories', ['inventory/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' Inventory', ['inventory/create', 'Inventory' => ['film_id' => $model->film_id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Inventories', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Inventories ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getInventories(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-inventories']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update}', 'contentOptions' => ['nowrap' => 'nowrap'], 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = 'inventory' . '/' . $action;
    return Url::toRoute($params);
}, 'buttons' => [], 'controller' => 'inventory'], 'inventory_id', ["class" => yii\grid\DataColumn::className(), "attribute" => "store_id", "value" => function ($model) {
    if ($rel = $model->getStore()->one()) {
        return yii\helpers\Html::a($rel->label, ["store/view", 'store_id' => $rel->store_id], ["data-pjax" => 0]);
    } else {
        return '';
    }
}, "format" => "raw"], 'last_update']]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Film', 'content' => $this->blocks['app\\modules\\sakila\\models\\Film'], 'active' => true], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Actors</small>', 'content' => $this->blocks['Actors'], 'active' => false], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Categories</small>', 'content' => $this->blocks['Categories'], 'active' => false], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Inventories</small>', 'content' => $this->blocks['Inventories'], 'active' => false]]]);
?>
</div>
Esempio n. 17
0
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . 'List All' . ' Tiles Users', ['tiles-users/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . 'New' . ' Tiles User', ['tiles-users/create', 'TilesUser' => ['tile' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-TilesUsers', 'enableReplaceState' => false, 'linkSelector' => '#pjax-TilesUsers ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getTilesUsers(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-tilesusers']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => 'First', 'lastPageLabel' => 'Last'], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update}', 'contentOptions' => ['nowrap' => 'nowrap'], 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = 'tiles-users' . '/' . $action;
    return $params;
}, 'buttons' => [], 'controller' => 'tiles-users'], ['class' => yii\grid\DataColumn::className(), 'attribute' => 'level', 'value' => function ($model) {
    if ($rel = $model->getLevel()->one()) {
        return Html::a($rel->id, ['levels/view', 'id' => $rel->id], ['data-pjax' => 0]);
    } else {
        return '';
    }
}, 'format' => 'raw'], 'created_at', 'updated_at', 'created_by', 'updated_by']]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['common\\models\\Tiles'], 'active' => true], ['content' => $this->blocks['TilesUsers'], 'label' => '<small>Tiles Users <span class="badge badge-default">' . count($model->getTilesUsers()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
Esempio n. 18
0
        <div class="panel-body">



    <?php 
$this->beginBlock('giiant\\world\\models\\CountryLanguage');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['format' => 'html', 'attribute' => 'CountryCode', 'value' => $model->getCountryCode()->one() ? Html::a($model->getCountryCode()->one()->Name, ['country/view', 'Code' => $model->getCountryCode()->one()->Code]) : '<span class="label label-warning">?</span>'], 'Language', 'IsOfficial', 'Percentage']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . Yii::t('app', 'Delete'), ['delete', 'CountryCode' => $model->CountryCode, 'Language' => $model->Language], ['class' => 'btn btn-danger', 'data-confirm' => '' . Yii::t('app', 'Are you sure to delete this item?') . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> CountryLanguage', 'content' => $this->blocks['giiant\\world\\models\\CountryLanguage'], 'active' => true]]]);
?>
        </div>
    </div>
</div>
Esempio n. 19
0
<div style='position: relative'><div style='position:absolute; right: 0px; top 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . Yii::t('app', 'List All') . ' Stores', ['store/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' Store', ['store/create', 'Store' => ['address_id' => $model->address_id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Stores', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Stores ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getStores(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-stores']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update}', 'contentOptions' => ['nowrap' => 'nowrap'], 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = 'store' . '/' . $action;
    return Url::toRoute($params);
}, 'buttons' => [], 'controller' => 'store'], 'store_id', ["class" => yii\grid\DataColumn::className(), "attribute" => "manager_staff_id", "value" => function ($model) {
    if ($rel = $model->getManagerStaff()->one()) {
        return yii\helpers\Html::a($rel->label, ["staff/view", 'staff_id' => $rel->staff_id], ["data-pjax" => 0]);
    } else {
        return '';
    }
}, "format" => "raw"], 'last_update']]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Address', 'content' => $this->blocks['app\\modules\\sakila\\models\\Address'], 'active' => true], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Customers</small>', 'content' => $this->blocks['Customers'], 'active' => false], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Staff</small>', 'content' => $this->blocks['Staff'], 'active' => false], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Stores</small>', 'content' => $this->blocks['Stores'], 'active' => false]]]);
?>
</div>
Esempio n. 20
0
<div style='position: relative'><div style='position:absolute; right: 0px; top 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . Yii::t('app', 'List All') . ' Films', ['film/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' Film', ['film/create', 'Film' => ['original_language_id' => $model->language_id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Films', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Films ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getFilms(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-films']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update}', 'contentOptions' => ['nowrap' => 'nowrap'], 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = 'film' . '/' . $action;
    return Url::toRoute($params);
}, 'buttons' => [], 'controller' => 'film'], 'film_id', 'title', 'release_year', ["class" => yii\grid\DataColumn::className(), "attribute" => "language_id", "value" => function ($model) {
    if ($rel = $model->getLanguage()->one()) {
        return yii\helpers\Html::a($rel->name, ["language/view", 'language_id' => $rel->language_id], ["data-pjax" => 0]);
    } else {
        return '';
    }
}, "format" => "raw"], 'rental_duration', 'rental_rate', 'length', 'replacement_cost', 'rating']]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Language', 'content' => $this->blocks['app\\modules\\sakila\\models\\Language'], 'active' => true], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Films</small>', 'content' => $this->blocks['Films'], 'active' => false]]]);
?>
</div>
Esempio n. 21
0
        <div class="panel-body">



    <?php 
$this->beginBlock('giiant\\sakila\\models\\Payment');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['payment_id', ['format' => 'html', 'attribute' => 'customer_id', 'value' => $model->getCustomer()->one() ? Html::a($model->getCustomer()->one()->customer_id, ['customer/view', 'customer_id' => $model->getCustomer()->one()->customer_id]) : '<span class="label label-warning">?</span>'], ['format' => 'html', 'attribute' => 'staff_id', 'value' => $model->getStaff()->one() ? Html::a($model->getStaff()->one()->staff_id, ['staff/view', 'staff_id' => $model->getStaff()->one()->staff_id]) : '<span class="label label-warning">?</span>'], ['format' => 'html', 'attribute' => 'rental_id', 'value' => $model->getRental()->one() ? Html::a($model->getRental()->one()->rental_id, ['rental/view', 'rental_id' => $model->getRental()->one()->rental_id]) : '<span class="label label-warning">?</span>'], 'amount', 'payment_date', 'last_update']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . Yii::t('app', 'Delete'), ['delete', 'payment_id' => $model->payment_id], ['class' => 'btn btn-danger', 'data-confirm' => '' . Yii::t('app', 'Are you sure to delete this item?') . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Payment', 'content' => $this->blocks['giiant\\sakila\\models\\Payment'], 'active' => true]]]);
?>
        </div>
    </div>
</div>
Esempio n. 22
0
    return $model->city ? $model->city->linkTo : '<span class="label label-warning">?</span>';
}], ['attribute' => 'district_id', "format" => "raw", "options" => [], 'value' => function ($model) {
    return $model->district ? $model->district->linkTo : '<span class="label label-warning">?</span>';
}], ['attribute' => 'subdistrict_id', "format" => "raw", "options" => [], 'value' => function ($model) {
    return $model->subdistrict ? $model->subdistrict->linkTo : '<span class="label label-warning">?</span>';
}]]]) . '</div>';
?>
			<?php 
Pjax::end();
?>
			<?php 
$this->endBlock();
?>


			<?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['Province'], 'active' => true], ['content' => $this->blocks['Cities'], 'label' => '<small>Cities <span class="badge badge-default">' . count($model->getCities()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['Postcodes'], 'label' => '<small>Postcodes <span class="badge badge-default">' . count($model->getPostcodes()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>

		</div>

	</div>

	<br/>

	<?php 
echo Moderation::widget(['model' => $model]);
?>

</div>
Esempio n. 23
0
    </div>

    <hr />

    <?php 
$this->beginBlock('dmstr\\modules\\prototype\\models\\Twig');
?>


    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'key', ['attribute' => 'value', 'format' => 'raw', 'value' => "<pre>{$model->value}</pre>"]]]);
?>


    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . Yii::t('prototype', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data-confirm' => '' . Yii::t('prototype', 'Are you sure to delete this item?') . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>



    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['dmstr\\modules\\prototype\\models\\Twig'], 'active' => true]]]);
?>
</div>
Esempio n. 24
0
			<?php 
echo $form->field($model, 'enddate')->textInput();
?>
			<?php 
echo $form->field($model, 'status')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'sensorid')->dropDownList(\yii\helpers\ArrayHelper::map(app\models\Sensor::find()->all(), 'id', 'name'), ['prompt' => Yii::t('app', 'Select')]);
?>
        </p>
        <?php 
$this->endBlock();
?>
        
        <?php 
echo Tabs::widget(['encodeLabels' => false, 'items' => [['label' => $model->getAliasModel(), 'content' => $this->blocks['main'], 'active' => true]]]);
?>
        <hr/>

        <?php 
echo $form->errorSummary($model);
?>

        <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-check"></span> ' . ($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save')), ['id' => 'save-' . $model->formName(), 'class' => 'btn btn-success']);
?>

        <?php 
ActiveForm::end();
?>
Esempio n. 25
0
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . Yii::t('app', 'List All') . ' Stores', ['store/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' Store', ['store/create', 'Store' => ['address_id' => $model->address_id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Stores', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Stores ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getStores(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-stores']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update}', 'contentOptions' => ['nowrap' => 'nowrap'], 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = 'store' . '/' . $action;
    return Url::toRoute($params);
}, 'buttons' => [], 'controller' => 'store'], 'store_id', ["class" => yii\grid\DataColumn::className(), "attribute" => "manager_staff_id", "value" => function ($model) {
    if ($rel = $model->getManagerStaff()->one()) {
        return yii\helpers\Html::a($rel->staff_id, ["staff/view", 'staff_id' => $rel->staff_id], ["data-pjax" => 0]);
    } else {
        return '';
    }
}, "format" => "raw"], 'last_update']]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Address', 'content' => $this->blocks['giiant\\sakila\\models\\Address'], 'active' => true], ['content' => $this->blocks['Customers'], 'label' => '<small>Customers <span class="badge badge-default">' . count($model->getCustomers()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['Staff'], 'label' => '<small>Staff <span class="badge badge-default">' . count($model->getStaff()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['Stores'], 'label' => '<small>Stores <span class="badge badge-default">' . count($model->getStores()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
Esempio n. 26
0
        <div class="panel-body">



    <?php 
$this->beginBlock('app\\models\\base\\Kamarkos');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'kamar', 'harga', ['attribute' => 'status', 'value' => app\models\base\Kamarkos::getStatusValueLabel($model->status)], 'tanggal_add', 'tanggal_update']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . 'Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data-confirm' => '' . 'Are you sure to delete this item?' . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['app\\models\\base\\Kamarkos'], 'active' => true]]]);
?>
        </div>
    </div>
</div>
Esempio n. 27
0
    return $model->linkTo;
}], ['attribute' => 'subdistrict_id', "format" => "raw", "options" => [], 'value' => function ($model) {
    return $model->subdistrict ? $model->subdistrict->linkTo : '<span class="label label-warning">?</span>';
}]]]) . '</div>';
?>
			<?php 
Pjax::end();
?>
			<?php 
$this->endBlock();
?>



			<?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['RgnDistrict'], 'active' => true], ['content' => $this->blocks['RgnSubdistricts'], 'label' => '<small>Region Subdistricts <span class="badge badge-default">' . count($model->getRgnSubdistricts()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['RgnPostcodes'], 'label' => '<small>Region Postcodes <span class="badge badge-default">' . count($model->getRgnPostcodes()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>

			<hr/>
			<div id="map" style="margin-top: 50px;">

				<?php 
$address = "{$model->name}, " . ($model->city ? $model->city->name : "");
$title = $model->name;
?>
				<h3>Map</h3>

				<style>
					#map-canvas {
						width:100%;
						height:400px;
Esempio n. 28
0
    <h3>
        <?php 
echo $model->title;
?>
    </h3>


    <?php 
$this->beginBlock('dmstr\\modules\\news\\models\\Video');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', ['format' => 'html', 'attribute' => 'video_gallery_id', 'value' => $model->getVideoGallery()->one() ? Html::a($model->getVideoGallery()->one()->name, ['video-gallery/view', 'id' => $model->getVideoGallery()->one()->id]) : '<span class="label label-warning">?</span>'], 'title', 'youtube_url:url', 'published_at', 'created_at', 'updated_at']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . Yii::t('app', 'Delete'), ['delete', 'id' => $model->id, 'returnUrl' => $returnUrl], ['class' => 'btn btn-danger', 'data-confirm' => '' . Yii::t('app', 'Are you sure to delete this item?') . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Video', 'content' => $this->blocks['dmstr\\modules\\news\\models\\Video'], 'active' => true]]]);
?>
</div>
Esempio n. 29
0
                <p>

			<?php 
echo $form->field($model, 'question')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'part')->dropDownList(\yii\helpers\ArrayHelper::map(common\models\Parts::find()->all(), 'id', 'name'), ['prompt' => 'Select']);
?>
                </p>
                <?php 
$this->endBlock();
?>
                
                <?php 
echo Tabs::widget(['encodeLabels' => false, 'items' => [['label' => 'Questions', 'content' => $this->blocks['main'], 'active' => true]]]);
?>
                <hr/>
                <?php 
echo $form->errorSummary($model);
?>
                <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-check"></span> ' . ($model->isNewRecord ? 'Create' : 'Save'), ['id' => 'save-' . $model->formName(), 'class' => 'btn btn-success']);
?>

                <?php 
ActiveForm::end();
?>

            </div>
Esempio n. 30
0
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . 'List All' . ' Role Menuses', ['role-menu/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . 'New' . ' Role Menus', ['role-menu/create', 'RoleMenus' => ['menu_id' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-RoleMenuses', 'enableReplaceState' => false, 'linkSelector' => '#pjax-RoleMenuses ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getRoleMenuses(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-rolemenuses']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => 'First', 'lastPageLabel' => 'Last'], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update}', 'contentOptions' => ['nowrap' => 'nowrap'], 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = 'role-menu' . '/' . $action;
    return $params;
}, 'buttons' => [], 'controller' => 'role-menu'], 'id', ['class' => yii\grid\DataColumn::className(), 'attribute' => 'role_id', 'value' => function ($model) {
    if ($rel = $model->getRole()->one()) {
        return Html::a($rel->name, ['role/view', 'id' => $rel->id], ['data-pjax' => 0]);
    } else {
        return '';
    }
}, 'format' => 'raw']]]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['app\\models\\Menu'], 'active' => true], ['content' => $this->blocks['Menuses'], 'label' => '<small>Menuses <span class="badge badge-default">' . count($model->getMenuses()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['RoleMenuses'], 'label' => '<small>Role Menuses <span class="badge badge-default">' . count($model->getRoleMenuses()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>