예제 #1
0
 public function run()
 {
     echo '<div class="row">';
     echo '<div class="col-sm-12">';
     foreach ($this->buttons as $action => $btnOptions) {
         $visibleFor = empty($btnOptions['visibleFor']) ? null : $btnOptions['visibleFor'];
         $visible = empty($btnOptions['visible']) ? true : $btnOptions['visible'];
         $options = empty($btnOptions['options']) ? [] : $btnOptions['options'];
         Html::addCssClass($options, 'btn-app');
         switch ($action) {
             case 'create':
                 $label = empty($btnOptions['label']) ? 'افزودن' : $btnOptions['label'];
                 echo Button::widget(['url' => ['create'], 'label' => $label, 'options' => $options, 'icon' => 'plus', 'type' => 'success', 'visibleFor' => $visibleFor]);
                 break;
             case 'update':
                 $label = empty($btnOptions['label']) ? 'ویرایش' : $btnOptions['label'];
                 echo Button::widget(['url' => ['update', 'id' => $this->modelID], 'label' => $label, 'options' => $options, 'icon' => 'edit', 'type' => 'primary', 'visibleFor' => $visibleFor]);
                 break;
             case 'delete':
                 $label = empty($btnOptions['label']) ? 'حذف' : $btnOptions['label'];
                 echo Button::widget(['url' => ['delete', 'id' => $this->modelID], 'label' => $label, 'icon' => 'times', 'type' => 'danger', 'visibleFor' => $visibleFor, 'options' => array_merge($options, ['data' => ['confirm' => 'آیا برای حذف مطمئن هستید؟', 'method' => 'post']])]);
                 break;
             case 'index':
                 $label = empty($btnOptions['label']) ? 'مدیریت' : $btnOptions['label'];
                 echo Button::widget(['url' => ['index'], 'label' => $label, 'icon' => 'tasks', 'type' => 'info', 'visibleFor' => $visibleFor, 'options' => $options]);
                 break;
             case 'gallery':
                 $label = empty($btnOptions['label']) ? 'گالری' : $btnOptions['label'];
                 echo Button::widget(['label' => $label, 'icon' => 'camera-retro', 'type' => 'info', 'url' => ['gallery', 'id' => $this->modelID], 'visibleFor' => $visibleFor, 'options' => $options]);
                 break;
             case 'categoriesIndex':
                 $label = empty($btnOptions['label']) ? 'مدیریت دسته ها' : $btnOptions['label'];
                 echo Button::widget(['url' => ['category/index'], 'label' => $label, 'icon' => 'tasks', 'type' => 'warning', 'visibleFor' => $visibleFor, 'options' => $options]);
                 break;
             default:
                 $button = $this->setOptions($btnOptions);
                 echo Button::widget(['url' => $button['url'], 'label' => $button['label'], 'icon' => $button['icon'], 'type' => $button['type'], 'visible' => $visible, 'visibleFor' => $visibleFor, 'options' => $options]);
                 break;
         }
     }
     echo '</div>';
     echo '</div>';
 }
예제 #2
0
파일: assign.php 프로젝트: ahb360/cms
    $accordion[$moduleId]['content'] = Html::checkboxList("permisions", $userPermissions, $allPermissions[$moduleId], ['itemOptions' => ['labelOptions' => ['class' => 'checkbox-inline']]]);
    $accordion[$moduleId]['contentOptions'] = ['class' => 'in'];
}
?>

<div class="row">
    <div class="col-sm-12">
        <?php 
Box::begin(['title' => 'اعطای دسترسی', 'options' => ['class' => 'box-solid box-primary']]);
?>
            <?php 
echo Html::beginForm();
?>
            <?php 
echo Collapse::widget(['items' => $accordion]);
?>
            <?php 
echo Html::submitButton('<i class="fa fa-save"></i> ذخیره', ['class' => 'btn btn-lg btn-flat margin bg-green']);
?>
            <?php 
echo Button::widget(['title' => 'انصراف', 'options' => ['class' => 'btn-lg btn-flat margin'], 'color' => 'orange', 'icon' => 'undo', 'url' => array('index')]);
?>
            <?php 
echo Html::endForm();
?>
        <?php 
Box::end();
?>
    </div>
</div>
예제 #3
0
use themes\admin360\widgets\ActionButtons;
use modules\user\backend\models\User;
use modules\user\common\widgets\ShowPassword;
echo ActionButtons::widget(['modelID' => $model->id, 'buttons' => ['index' => ['label' => 'مدیریت کاربران'], 'view' => ['url' => ['view', 'id' => $model->id], 'type' => 'success', 'icon' => 'eye', 'label' => 'مشاهده اطلاعات کاربر']]]);
Panel::begin(['title' => 'تغییر کلمه عبور']);
?>
    <div class="user-form">
        <?php 
$form = ActiveForm::begin(['enableClientValidation' => true, 'id' => 'user-form']);
?>
        <div class="row">
            <div class="col-md-8">
                <?php 
echo $form->field($model, 'password')->widget(ShowPassword::className(), ['options' => ['class' => 'form-control']])->label('کلمه عبور جدید');
?>
            </div>
            <div class="col-md-4">
                <?php 
echo Html::submitButton('<i class="fa fa-save"></i> ذخیره', ['class' => 'btn btn-lg btn-success']);
?>
                <?php 
echo Button::widget(['label' => 'انصراف', 'options' => ['class' => 'btn-lg'], 'type' => 'warning', 'icon' => 'undo', 'url' => ['view', 'id' => $model->id]]);
?>
            </div>
        </div>
        <?php 
ActiveForm::end();
?>
    </div>
<?php 
Panel::end();
예제 #4
0
파일: _form.php 프로젝트: ahb360/cms
    ?>
            <?php 
}
?>
            <?php 
echo $form->field($model, 'type')->dropDownList([User::TYPE_OPERATOR => 'اپراتور', User::TYPE_EDITOR => 'سردبیر', User::TYPE_SUPERUSER => 'مدیر سیستم'], ['class' => 'form-control input-small']);
?>
            <?php 
echo $form->field($model, 'status')->dropDownList(User::statusLabels(), ['class' => 'form-control input-small']);
?>
            <div class="form-group">
                <?php 
echo Html::submitButton('<i class="fa fa-save"></i> ذخیره', ['class' => 'btn btn-lg btn-success']);
?>

                <?php 
echo Button::widget(['label' => 'انصراف', 'options' => ['class' => 'btn-lg'], 'type' => 'warning', 'icon' => 'undo', 'url' => $backLink]);
?>
            </div>
        <?php 
Panel::end();
?>
        </div>
        <div class="col-md-4">
        </div>
    </div>
    <?php 
ActiveForm::end();
?>
</div>
예제 #5
0
파일: index.php 프로젝트: ahb360/cms
                <div class="row">
                        <div class="col-md-8">
                            <?php 
echo $field = $form->field($settings['website.googleAnalytics'], "[website.googleAnalytics]value")->textInput(['class' => 'form-control input-large', 'style' => 'direction:ltr', 'placeholder' => 'UA-XXXXX-X'])->label($settings['website.googleAnalytics']->getLabel());
?>
                        </div>
                    </div>
                <?php 
Panel::end();
?>
                <div class="form-group">
                    <?php 
echo Html::submitButton('<i class="fa fa-save"></i> ذخیره', ['class' => 'btn btn-lg btn-success']);
?>
                    <?php 
echo Button::widget(['label' => 'انصراف', 'options' => ['class' => 'btn-lg btn-flat margin'], 'type' => 'warning', 'icon' => 'undo', 'url' => ['/site/index']]);
?>
                </div>
            <?php 
ActiveForm::end();
?>
        </div>
    </div>
</div>

<?php 
$this->registerJs('if (!$("#deactive-user").is(":checked")) {
        $("#failed-login-attempts").hide();
    }
    $("#deactive-user").click(function () {
        $("#failed-login-attempts").toggle(this.checked);
예제 #6
0
        <?php 
echo Button::widget(['options' => ['class' => 'btn-lg dim'], 'type' => 'info']);
?>

        <?php 
echo Button::widget(['options' => ['class' => 'btn-lg btn-outline dim'], 'type' => 'warning']);
?>
        <?php 
echo Button::widget(['options' => ['class' => 'btn-lg dim'], 'type' => 'warning']);
?>

        <?php 
echo Button::widget(['options' => ['class' => 'btn-lg btn-outline dim'], 'type' => 'danger']);
?>
        <?php 
echo Button::widget(['options' => ['class' => 'btn-lg dim'], 'type' => 'danger']);
?>
    </div> -->
</div>
<hr />
<div class="row">
    <div class="col-sm-12" style="text-align: center;">
        <h3>به پنل مدیریت وب سایت <?php 
echo \Yii::$app->name;
?>
 خوش آمدید</h3>
        <?php 
echo Html::img(\Yii::$app->homeUrl . '/images/admin.png');
?>
    </div>
</div>