Commit df1b36d6cb0f91e05ebad052f562688e6d15ca5e
1 parent
e4b2a652
tokar commit
Showing
3 changed files
with
108 additions
and
74 deletions
Show diff stats
frontend/views/accounts/_portfolio_form.php
| @@ -59,12 +59,16 @@ use yii\web\JsExpression; | @@ -59,12 +59,16 @@ use yii\web\JsExpression; | ||
| 59 | <?php if($child_first instanceof Specialization): ?> | 59 | <?php if($child_first instanceof Specialization): ?> |
| 60 | <li> | 60 | <li> |
| 61 | <a href="#"> | 61 | <a href="#"> |
| 62 | - <?= $form->field($portfolio, "specializationInput[{$child_second->specialization_id}]") | ||
| 63 | - ->checkbox([ | ||
| 64 | - 'value' => $child_second->specialization_id, | ||
| 65 | - 'label' => $child_second->specialization_name, | ||
| 66 | - 'uncheck' => NULL, | ||
| 67 | - ]) ?> | 62 | + <?= $form->field($portfolio, "specializationInput[{$child_second->specialization_id}]", [ |
| 63 | + 'template' => '{input}{label}{hint}{error}', | ||
| 64 | + ]) | ||
| 65 | + ->label('<span></span>' . $child_second->specialization_name) | ||
| 66 | + ->checkbox([ | ||
| 67 | + 'value' => $child_second->specialization_id, | ||
| 68 | + 'label' => NULL, | ||
| 69 | + 'uncheck' => NULL, | ||
| 70 | + 'class' => 'custom-check', | ||
| 71 | + ], false) ?> | ||
| 68 | </a> | 72 | </a> |
| 69 | </li> | 73 | </li> |
| 70 | <?php endif; ?> | 74 | <?php endif; ?> |
frontend/views/accounts/portfolio.php
| @@ -17,78 +17,80 @@ | @@ -17,78 +17,80 @@ | ||
| 17 | <div class="admin-all-pages-add"> | 17 | <div class="admin-all-pages-add"> |
| 18 | <?= Html::a(Yii::t('app', 'Добавить'), [ 'portfolio-create' ], [ 'class' => 'btn btn-success' ]) ?> | 18 | <?= Html::a(Yii::t('app', 'Добавить'), [ 'portfolio-create' ], [ 'class' => 'btn btn-success' ]) ?> |
| 19 | </div> | 19 | </div> |
| 20 | -<?= GridView::widget([ | ||
| 21 | - 'options' => ['class'=>'style admin-all-pages-wr'], | ||
| 22 | - 'dataProvider' => $dataProvider, | ||
| 23 | - 'filterModel' => $searchModel, | ||
| 24 | - 'columns' => [ | ||
| 25 | - [ | ||
| 26 | - 'attribute' => 'portfolio_id', | ||
| 27 | - 'label' => 'ID', | ||
| 28 | - ], | ||
| 29 | - 'name', | ||
| 30 | - [ | ||
| 31 | - 'attribute' => 'date_add', | ||
| 32 | - 'filter' => "<div class=\"input-group input-group-xs input-daterange\"> | 20 | +<div class="admin-table-portfolio"> |
| 21 | + <?= GridView::widget([ | ||
| 22 | + 'options' => ['class'=>'style admin-all-pages-wr'], | ||
| 23 | + 'dataProvider' => $dataProvider, | ||
| 24 | + 'filterModel' => $searchModel, | ||
| 25 | + 'columns' => [ | ||
| 26 | + [ | ||
| 27 | + 'attribute' => 'portfolio_id', | ||
| 28 | + 'label' => 'ID', | ||
| 29 | + ], | ||
| 30 | + 'name', | ||
| 31 | + [ | ||
| 32 | + 'attribute' => 'date_add', | ||
| 33 | + 'filter' => "<div class=\"input-group input-group-xs input-daterange\"> | ||
| 33 | <span class='field-teamsearch-experience_from_from'>". | 34 | <span class='field-teamsearch-experience_from_from'>". |
| 34 | - DatePicker::widget([ | ||
| 35 | - 'model' => $searchModel, | ||
| 36 | - 'attribute' => 'date_add_from', | ||
| 37 | - 'language' => 'ru', | ||
| 38 | - 'dateFormat' => 'yyyy-MM-dd', | ||
| 39 | - 'clientOptions' => [ | ||
| 40 | - 'changeYear' => true, | ||
| 41 | - 'changeMonth' => true, | ||
| 42 | - ], | ||
| 43 | - ]). | ||
| 44 | - "</span> | 35 | + DatePicker::widget([ |
| 36 | + 'model' => $searchModel, | ||
| 37 | + 'attribute' => 'date_add_from', | ||
| 38 | + 'language' => 'ru', | ||
| 39 | + 'dateFormat' => 'yyyy-MM-dd', | ||
| 40 | + 'clientOptions' => [ | ||
| 41 | + 'changeYear' => true, | ||
| 42 | + 'changeMonth' => true, | ||
| 43 | + ], | ||
| 44 | + ]). | ||
| 45 | + "</span> | ||
| 45 | <span class=\"input-group-addon kv-field-separator\"> | 46 | <span class=\"input-group-addon kv-field-separator\"> |
| 46 | <i class=\"glyphicon glyphicon-resize-horizontal\"></i> | 47 | <i class=\"glyphicon glyphicon-resize-horizontal\"></i> |
| 47 | </span> | 48 | </span> |
| 48 | <span class='field-teamsearch-experience_from_to'>". | 49 | <span class='field-teamsearch-experience_from_to'>". |
| 49 | - DatePicker::widget([ | ||
| 50 | - 'model' => $searchModel, | ||
| 51 | - 'attribute' => 'date_add_to', | ||
| 52 | - 'language' => 'ru', | ||
| 53 | - 'dateFormat' => 'yyyy-MM-dd', | ||
| 54 | - 'clientOptions' => [ | ||
| 55 | - 'changeYear' => true, | ||
| 56 | - 'changeMonth' => true, | ||
| 57 | - ], | ||
| 58 | - ]) | ||
| 59 | - ."</span> | 50 | + DatePicker::widget([ |
| 51 | + 'model' => $searchModel, | ||
| 52 | + 'attribute' => 'date_add_to', | ||
| 53 | + 'language' => 'ru', | ||
| 54 | + 'dateFormat' => 'yyyy-MM-dd', | ||
| 55 | + 'clientOptions' => [ | ||
| 56 | + 'changeYear' => true, | ||
| 57 | + 'changeMonth' => true, | ||
| 58 | + ], | ||
| 59 | + ]) | ||
| 60 | + ."</span> | ||
| 60 | </div>", | 61 | </div>", |
| 61 | - 'format' => 'html', | ||
| 62 | - ], | ||
| 63 | - 'view_count', | ||
| 64 | - [ | ||
| 65 | - 'attribute' => 'specializationString', | ||
| 66 | - ], | ||
| 67 | - [ | ||
| 68 | - 'class' => ActionColumn::className(), | ||
| 69 | - 'buttons' => [ | ||
| 70 | - 'update' => function($url, $model, $key) { | ||
| 71 | - return Html::a('<img src="/images/ico_pencil.png" alt="">', [ | ||
| 72 | - 'portfolio-update', | ||
| 73 | - 'id' => $model->portfolio_id, | ||
| 74 | - ],[ | ||
| 75 | - 'title' => 'Редактировать', | ||
| 76 | - ]); | ||
| 77 | - }, | ||
| 78 | - 'delete' => function($url, $model, $key) { | ||
| 79 | - return Html::a('<img src="/images/delete-ico.png" alt="">', [ | ||
| 80 | - 'portfolio-delete', | ||
| 81 | - 'id' => $model->portfolio_id, | ||
| 82 | - ], [ | ||
| 83 | - 'title' => 'Удалить', | ||
| 84 | - 'aria-label' => 'Удалить', | ||
| 85 | - 'data-confirm' => 'Вы уверены, что хотите удалить этот элемент?', | ||
| 86 | - 'data-method' => 'post', | ||
| 87 | - 'data-pjax' => '0', | ||
| 88 | - ]); | ||
| 89 | - }, | 62 | + 'format' => 'html', |
| 63 | + ], | ||
| 64 | + 'view_count', | ||
| 65 | + [ | ||
| 66 | + 'attribute' => 'specializationString', | ||
| 67 | + ], | ||
| 68 | + [ | ||
| 69 | + 'class' => ActionColumn::className(), | ||
| 70 | + 'buttons' => [ | ||
| 71 | + 'update' => function($url, $model, $key) { | ||
| 72 | + return Html::a('<img src="/images/ico_pencil.png" alt="">', [ | ||
| 73 | + 'portfolio-update', | ||
| 74 | + 'id' => $model->portfolio_id, | ||
| 75 | + ],[ | ||
| 76 | + 'title' => 'Редактировать', | ||
| 77 | + ]); | ||
| 78 | + }, | ||
| 79 | + 'delete' => function($url, $model, $key) { | ||
| 80 | + return Html::a('<img src="/images/delete-ico.png" alt="">', [ | ||
| 81 | + 'portfolio-delete', | ||
| 82 | + 'id' => $model->portfolio_id, | ||
| 83 | + ], [ | ||
| 84 | + 'title' => 'Удалить', | ||
| 85 | + 'aria-label' => 'Удалить', | ||
| 86 | + 'data-confirm' => 'Вы уверены, что хотите удалить этот элемент?', | ||
| 87 | + 'data-method' => 'post', | ||
| 88 | + 'data-pjax' => '0', | ||
| 89 | + ]); | ||
| 90 | + }, | ||
| 91 | + ], | ||
| 92 | + 'template' => '{update} {delete}', | ||
| 90 | ], | 93 | ], |
| 91 | - 'template' => '{update} {delete}', | ||
| 92 | ], | 94 | ], |
| 93 | - ], | ||
| 94 | -]); ?> | 95 | + ]); ?> |
| 96 | +</div> |
frontend/web/css/style.css
| @@ -6188,9 +6188,37 @@ input[disabled], select[disabled] { | @@ -6188,9 +6188,37 @@ input[disabled], select[disabled] { | ||
| 6188 | width: 360px; | 6188 | width: 360px; |
| 6189 | height: 29px; | 6189 | height: 29px; |
| 6190 | cursor: pointer; | 6190 | cursor: pointer; |
| 6191 | + margin-top: 8px; | ||
| 6191 | } | 6192 | } |
| 6192 | .admin-project-file .not-file-mb-adm{ | 6193 | .admin-project-file .not-file-mb-adm{ |
| 6193 | position: static; | 6194 | position: static; |
| 6194 | margin-left: 10px; | 6195 | margin-left: 10px; |
| 6195 | width: 540px; | 6196 | width: 540px; |
| 6196 | -} | ||
| 6197 | \ No newline at end of file | 6197 | \ No newline at end of file |
| 6198 | +} | ||
| 6199 | +.admin-table-portfolio .input-group.input-group-xs input{ | ||
| 6200 | + height: 29px; | ||
| 6201 | + border: 1px solid #dcdcdc; | ||
| 6202 | + outline: none; | ||
| 6203 | + padding-left: 8px; | ||
| 6204 | + width: 85px; | ||
| 6205 | + float: left; | ||
| 6206 | +} | ||
| 6207 | +.admin-table-portfolio .input-group.input-group-xs input:focus{ | ||
| 6208 | + box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s; outline: none | ||
| 6209 | +} | ||
| 6210 | +.admin-table-portfolio .field-teamsearch-experience_from_from, .admin-table-portfolio .field-teamsearch-experience_from_to {float: left} | ||
| 6211 | +.admin-table-portfolio .input-group-addon.kv-field-separator { | ||
| 6212 | + float: left; | ||
| 6213 | + width: 30px; | ||
| 6214 | + margin-top: -1px; | ||
| 6215 | + padding: 0; | ||
| 6216 | + height: 31px; | ||
| 6217 | + line-height: 31px; | ||
| 6218 | +} | ||
| 6219 | +.admin-table-portfolio .input-group.input-group-xs.input-daterange {width: 200px} | ||
| 6220 | +.admin-page .content-menu-first {border-top: 1px solid #dfdfdf;} | ||
| 6221 | + | ||
| 6222 | + | ||
| 6223 | + | ||
| 6224 | + | ||
| 6225 | + |