echo $arItem->id; ?> "> <?php foreach ($arItem->links as $link) { ?> <li class="list-group-item" id="link<?php echo $link->id; ?> "> <?php echo Html::a($link->subtitle, ['/link/update', 'id' => $link->id], ['class' => $link->status == $link::STATUS_DISABLE ? ' disabled' : '']); ?> <?php echo Editable::widget(['model' => $link, 'attribute' => 'status', 'url' => 'block/link', 'type' => 'select2', 'mode' => 'pop', 'options' => ['id' => 'link-status-' . $link->id, 'class' => 'pull-right'], 'clientOptions' => ['pk' => $link->id, 'autotext' => 'always', 'select2' => ['width' => '150px'], 'value' => $link->status, 'source' => $link::getStatusesArrayValue()]]); ?> </li> <?php } ?> </ul> <div class="panel-footer clearfix"> <div class="pull-right"> <?php echo Html::a(Yii::t('app', 'BUTTON_EDIT'), ['update', 'id' => $arItem->id], ['class' => 'btn btn-primary btn-xs']); ?> <?php
:</th> <td> <?php echo Editable::widget(['model' => $model, 'attribute' => 'ot', 'url' => $url, 'mode' => 'pop', 'clientOptions' => ['emptytext' => 'Не задано']]); ?> </td> </tr> <tr> <th><?php echo Yii::t('app', 'BIRTH_DATE'); ?> :</th> <td> <?php echo Editable::widget(['model' => $model, 'attribute' => 'dr', 'type' => 'date', 'url' => $url, 'mode' => 'pop', 'clientOptions' => ['emptytext' => 'Не задано', 'format' => 'yyyy-mm-dd', 'viewformat' => 'dd.mm.yyyy', 'datetimepicker' => ['orientation' => 'top auto']]]); ?> </td> </tr> </tbody> </table> </div> <div class="col-md-6"> <?php echo $this->render('_roles', ['model' => $model]); ?> </div>
</title> <?php $this->head(); ?> </head> <body> <?php $this->beginBody(); ?> <div class="wrap"> <?php NavBar::begin(['brandLabel' => 'KIMS', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]); // show school switcher if (Yii::$app->user->can('changeSchool')) { echo Editable::widget(['model' => Yii::$app->user->identity, 'attribute' => 'schoolId', 'value' => 'school.name', 'url' => 'user/editable', 'type' => 'select', 'mode' => 'inline', 'options' => ['class' => 'navbar-brand'], 'clientOptions' => ['showbuttons' => false, 'value' => Yii::$app->user->identity->schoolId, 'source' => Url::to(['school/select']), 'success' => new JsExpression('function(a){' . '$("<div>").addClass("alert alert-info").html("Switching schools...").appendTo("#alerts");' . 'location.reload(true);' . '}')]]); } else { if (!Yii::$app->user->isGuest) { echo '<a href="/" class="navbar-brand">' . Yii::$app->user->identity->school->name . '</a>'; } } echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'Home', 'url' => ['/site/index']], ['label' => 'Contact', 'url' => ['/site/contact']], Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/auth/default/login']] : ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/auth/default/logout'], 'linkOptions' => ['data-method' => 'post']], '<li><a href="' . Url::to(['/user/config']) . '" title="Profile">' . '<span class="glyphicon glyphicon-user"></span></a></li>']]); NavBar::end(); ?> <div class="container"> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> <div id="alerts"><?php echo alerts();
<div class="caption"> <h4> <?php echo Editable::widget(ArrayHelper::merge($titleOptions, ['options' => ['id' => 'ed' . $media->id], 'clientOptions' => ['pk' => $media->id]])); ?> </h4> <div class="row"> <div class="col-md-6"> <small><?php echo \kato\helpers\KatoBase::formatBytes($media->byteSize, 'MB', 3); ?> </small> </div> <div class="col-md-6 status"> <?php echo Editable::widget(ArrayHelper::merge($statusOptions, ['options' => ['id' => 'edw' . $media->id], 'clientOptions' => ArrayHelper::merge($statusClientOptions, ['pk' => $media->id . '2'])])); ?> </div> </div> </div> </div> </div> <?php if (isset($isNew)) { ?> <script type="text/javascript"> jQuery('#ed<?php echo $media->id; ?> ').editable(<?php
<p> <?php echo Html::a('Reset To Attendance Sort', ['index'], ['class' => 'btn btn-success']); ?> <?php echo Html::a('Create Student', ['create'], ['class' => 'btn btn-success']); ?> <?php echo Html::a('Not Authorized to Spar', ['/report/sparauth'], ['class' => 'btn btn-success']); ?> <?php echo Html::a('Create Attendance Sheet', ['/report/attendance'], ['class' => 'btn btn-success']); ?> <?php echo 'Report Month: ' . Editable::widget(['model' => Yii::$app->user->identity, 'attribute' => 'reportMonth', 'url' => '/user/editable', 'type' => 'combodate', 'clientOptions' => ['value' => Yii::$app->user->reportMonth, 'viewformat' => 'MMM YYYY', 'template' => 'MMM / YYYY', 'format' => 'MMM YYYY']]); ?> </p> <?php // calculate the total # of active contract students, plus guests $currentSchoolId = Yii::$app->user->schoolId; $contractStudents = $searchModel::find()->where(['student.active' => 1, 'contract_school_id' => $currentSchoolId])->count(); $guestStudents = $searchModel::find()->joinWith('affiliations')->where(['student.active' => 1, 'affiliation.active' => 1, 'affiliation.school_id' => $currentSchoolId])->andWhere(['not in', 'contract_school_id', [$currentSchoolId]])->count(); echo sprintf('%d active contract students, plus %d guest%s', $contractStudents, $guestStudents, (int) $guestStudents === 1 ? '' : 's'); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => $columns]); ?>
<h3><?php echo Yii::t('app', 'VISUAL_STYLE'); ?> </h3> <div class="row"> <div class="col-md-4"> <ul class="list-group"> <?php foreach ($model as $item) { ?> <li class="list-group-item"> <?php echo $item->name; ?> <?php echo Editable::widget(['model' => $item, 'attribute' => 'title', 'url' => 'reference/updateStyle', 'mode' => 'pop', 'options' => ['id' => 'state-' . $item->name, 'class' => 'pull-right']]); ?> </li> <?php } ?> </ul> </div> </div> <?php echo $this->render('_back');
public static function select2($name, $pk, $defaultValue, $defaultText, $url, $sourceArray, $pluginOptions = []) { return XEditable::widget(ArrayHelper::merge(['name' => $name, 'value' => $defaultText, 'url' => $url, 'type' => 'select2', 'mode' => 'pop', 'clientOptions' => ['pk' => $pk, 'defaultValue' => $defaultValue, 'placement' => 'top', 'select2' => ['width' => '230px'], 'source' => self::compileSourceArray($sourceArray)]], $pluginOptions)); }
<div class="row"> <div class="col-md-4"> <?php foreach ($model as $state) { ?> <div class="panel panel-<?php echo $state->name; ?> "> <div class="panel-heading"> <?php echo $state->name; ?> </div> <div class="panel-body"> <?php echo Editable::widget(['model' => $state, 'attribute' => 'title', 'url' => 'reference/updateState', 'mode' => 'pop', 'options' => ['id' => 'state-' . $state->name]]); ?> </div> </div> <?php } ?> </div> </div> <?php echo $this->render('_back');