コード例 #1
0
ファイル: Staff.php プロジェクト: simplator/staff
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => Module::t('staff', 'ID'), 'userid' => Module::t('staff', 'User on site'), 'fio' => Module::t('staff', 'Name'), 'photoid' => Module::t('staff', 'Photo'), 'ind' => Module::t('staff', 'Ind'), 'capacity' => Module::t('staff', 'Capacity'), 'rank' => Module::t('staff', 'Rank'), 'degree' => Module::t('staff', 'Degree'), 'contact' => Module::t('staff', 'Contacts'), 'structid' => Module::t('staff', 'Structid'), 'about' => Module::t('staff', 'About')];
 }
コード例 #2
0
ファイル: view.php プロジェクト: simplator/staff
echo Html::img(simplator\medialib\models\File::picture($model->logoid, 'preview', 'stafflogo'), ['style' => 'float:left']);
?>
 <h1><?php 
echo $model->fulltitle;
?>
</h1>
		<div>Адресс: <?php 
echo $model->address;
?>
</div>
		<div>Описание: <?php 
echo $model->about;
?>
</div>
	</div>
		
	</div>

	<h3>Персонал</h3>
    <?php 
echo GridView::widget(['dataProvider' => $staff, 'columns' => [['class' => 'yii\\grid\\ActionColumn'], ['attribute' => 'fio', 'value' => function ($data) {
    return Html::a($data->fio, Url::to(['staff/view', 'id' => $data->id]));
}, 'format' => 'raw']]]);
?>
	<p>
		<?php 
echo Html::a(Module::t('staff', 'Create staff'), ['staff/create', 'structid' => $model->id], ['class' => 'btn btn-primary']);
?>
    </p>
</div>
コード例 #3
0
ファイル: structure.php プロジェクト: simplator/staff
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use simplator\staff\Module;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $model simplator\staff\models\Structure */
\simplator\base\BaseAssetBundle::register($this);
$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => Module::t('staff', 'Structure'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="structure-view">

	<div>	
		<?php 
echo Html::img(simplator\medialib\models\File::picture($model->logoid, 'preview', 'stafflogo'), ['style' => 'float:left']);
?>
 <h1><?php 
echo $model->fulltitle;
?>
</h1>
		<div>Адресс: <?php 
echo $model->address;
?>
</div>
	</div>
	<div><?php 
echo $model->about;
?>
コード例 #4
0
ファイル: _form.php プロジェクト: simplator/staff
<div class="right-side">
    <?php 
echo $form->field($model, 'logoid')->widget(simplator\medialib\widgets\PicSelect::className());
?>

    <?php 
echo $form->field($model, 'view')->dropDownList(['tile' => Module::t('staff', 'tile'), 'list' => Module::t('staff', 'list')]);
?>
	
    <?php 
echo Html::submitButton(Module::t('staff', 'Save'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'style' => 'width:100%']);
?>
<br/><br/>
	
	<?php 
echo Html::a(Module::t('staff', 'Delete structure'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'style' => 'width: 100%', 'data' => ['confirm' => Module::t('staff', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
</div>
<div class="central-block">
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'fulltitle')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'address')->textarea(['rows' => 2]);
?>
コード例 #5
0
ファイル: update.php プロジェクト: simplator/staff
<?php

use yii\helpers\Html;
use simplator\staff\Module;
/* @var $this yii\web\View */
/* @var $model simplator\staff\models\Structure */
$this->title = Module::t('staff', 'Update {modelClass}: ', ['modelClass' => 'Structure']) . ' ' . $model->title;
$this->params['breadcrumbs'][] = ['label' => Module::t('staff', 'Structures'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Module::t('staff', 'Update');
?>
<div class="structure-update">

    <?php 
echo $this->render('_form', ['model' => $model]);
?>

</div>
コード例 #6
0
ファイル: index.php プロジェクト: simplator/staff
<?php

use simplator\staff\Module;
use yii\helpers\Html;
use yii\widgets\ListView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('staff', 'Staff');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="staff-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a(Module::t('staff', 'Create Staff'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo ListView::widget(['dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'item'], 'itemView' => function ($model, $key, $index, $widget) {
    return Html::a(Html::encode($model->id), ['view', 'id' => $model->id]);
}]);
?>

</div>
コード例 #7
0
ファイル: Structure.php プロジェクト: simplator/staff
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => Module::t('staff', 'ID'), 'logoid' => Module::t('staff', 'Logo'), 'title' => Module::t('staff', 'Title'), 'fulltitle' => Module::t('staff', 'Fulltitle'), 'view' => Module::t('staff', 'View'), 'address' => Module::t('staff', 'Address'), 'about' => Module::t('staff', 'About'), 'tree' => Module::t('staff', 'Tree'), 'lft' => Module::t('staff', 'Lft'), 'rgt' => Module::t('staff', 'Rgt'), 'depth' => Module::t('staff', 'Depth')];
 }
コード例 #8
0
ファイル: _form.php プロジェクト: simplator/staff
?>

    <?php 
echo $form->field($model, 'fulltitle')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'parentid')->dropDownList($model->itemList());
?>

    <?php 
echo $form->field($model, 'address')->textarea(['rows' => 6]);
?>

    <?php 
echo $form->field($model, 'about')->textarea(['rows' => 6]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton(Module::t('staff', 'Save'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

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

</div>
</div>
コード例 #9
0
ファイル: staff.php プロジェクト: simplator/staff
<?php

use simplator\staff\Module;
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model simplator\staff\models\Staff */
$this->title = $model->fio;
$this->params['breadcrumbs'][] = ['label' => Module::t('staff', 'Staff'), 'url' => ['allstaff']];
$this->params['breadcrumbs'][] = $model->fio;
?>
<div class="staff-view">

	<?php 
echo Html::img(simplator\medialib\models\File::picture($model->photoid, 'preview', 'stafflogo'), ['style' => 'float:left']);
?>
 <h1><?php 
echo $model->rank . ' ' . $model->fio;
?>
</h1>
	<div class="capacoty"><?php 
echo $model->capacity;
?>
</div>
	<div class="contacts"><?php 
$contacts = $model->contacts;
foreach ($contacts as $c) {
    echo '<div class="contact"><b>' . $c['name'] . '</b>: ' . Html::a($c['value'], $c['url'], ['class' => 'contact-' . $c['type']]) . '</div>';
}
?>
</div>
コード例 #10
0
ファイル: _form.php プロジェクト: simplator/staff
			<?php 
echo $form->field($model, 'capacity')->textInput();
?>

			<?php 
echo $form->field($model, 'rank')->textInput();
?>

			<?php 
echo $form->field($model, 'degree')->textarea(['rows' => 3]);
?>

			<?php 
echo $form->field($model, 'about')->widget(dosamigos\ckeditor\CKEditor::className(), ['options' => ['rows' => 6], 'preset' => 'default']);
?>
			
		</div>
	</div>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Module::t('staff', 'Create') : Module::t('staff', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

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

</div>