From c7971bf4b4d2f22f89a9f22d01b14a8417a56c7d Mon Sep 17 00:00:00 2001 From: icemate Date: Tue, 19 Apr 2016 17:35:21 +0300 Subject: [PATCH] git --- frontend/views/accounts/_portfolio_form.php | 252 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------- frontend/views/ajax/project_user.php | 62 +++++++++++++++++++++++++++++++++++++++++--------------------- frontend/web/css/style.css | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 224 insertions(+), 156 deletions(-) diff --git a/frontend/views/accounts/_portfolio_form.php b/frontend/views/accounts/_portfolio_form.php index 7dc0d73..30279de 100644 --- a/frontend/views/accounts/_portfolio_form.php +++ b/frontend/views/accounts/_portfolio_form.php @@ -1,35 +1,35 @@ title = 'Портфолио'; - $this->params[ 'breadcrumbs' ][] = $this->title; +$this->title = 'Портфолио'; +$this->params[ 'breadcrumbs' ][] = $this->title; ?>
title ?>
date_add ) ? "Дата создания: $portfolio->date_add" : "" ?> @@ -40,7 +40,7 @@
field($portfolio, 'name') - ->textInput([ 'class' => 'custom-input-2 fix-input-2' ]); ?> + ->textInput([ 'class' => 'custom-input-2 fix-input-2' ]); ?>
@@ -71,13 +71,13 @@ field($portfolio, "specializationInput[{$child_second->specialization_id}]", [ 'template' => '{input}{label}{hint}{error}', ]) - ->label('' . $child_second->specialization_name) - ->checkbox([ - 'value' => $child_second->specialization_id, - 'label' => NULL, - 'uncheck' => NULL, - 'class' => 'custom-check', - ], false) ?> + ->label('' . $child_second->specialization_name) + ->checkbox([ + 'value' => $child_second->specialization_id, + 'label' => NULL, + 'uncheck' => NULL, + 'class' => 'custom-check', + ], false) ?> @@ -105,126 +105,126 @@
Фото главное
field($portfolio, 'cover') - ->widget(ImageUploaderInput::className(), [ - 'size' => [ - [ - 'width' => 720, - 'height' => 280, - ], - [ - 'width' => 318, - 'height' => 228, - ], - [ - 'width' => 152, - 'height' => 108, - ], - [ - 'width' => 210, - 'height' => 150, - ], - ], - 'multi' => false, - 'gallery' => $portfolio->cover, - 'name' => 'Загрузить фото', - ]); ?> + ->widget(ImageUploaderInput::className(), [ + 'size' => [ + [ + 'width' => 720, + 'height' => 280, + ], + [ + 'width' => 318, + 'height' => 228, + ], + [ + 'width' => 152, + 'height' => 108, + ], + [ + 'width' => 210, + 'height' => 150, + ], + ], + 'multi' => false, + 'gallery' => $portfolio->cover, + 'name' => 'Загрузить фото', + ]); ?>
field($portfolio, 'gallery_id') - ->hint("

Для создания галереи перейдите по " . Html::a('ссылке', [ 'accounts/gallery-create' ], [ 'target' => '_BLANK' ]) . "

") - ->dropDownList($galleries, [ 'prompt' => 'Выберите галерею' ]) ?> + ->hint("

Для создания галереи перейдите по " . Html::a('ссылке', [ 'accounts/gallery-create' ], [ 'target' => '_BLANK' ]) . "

") + ->dropDownList($galleries, [ 'prompt' => 'Выберите галерею' ]) ?>
field($portfolio, 'city') - ->widget(Select2::classname(), [ - 'options' => [ 'class' => 'Выбор города ...' ], - 'pluginOptions' => [ - 'allowClear' => true, - 'minimumInputLength' => 3, - 'ajax' => [ - 'url' => \yii\helpers\Url::to([ 'site/city' ]), - 'dataType' => 'json', - 'data' => new JsExpression('function(params) { return {q:params.term}; }'), - ], - 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), - 'templateResult' => new JsExpression('function(city) { return city.text; }'), - 'templateSelection' => new JsExpression('function (city) { return city.text; }'), - ], - ]); ?> + ->widget(Select2::classname(), [ + 'options' => [ 'class' => 'Выбор города ...' ], + 'pluginOptions' => [ + 'allowClear' => true, + 'minimumInputLength' => 3, + 'ajax' => [ + 'url' => \yii\helpers\Url::to([ 'site/city' ]), + 'dataType' => 'json', + 'data' => new JsExpression('function(params) { return {q:params.term}; }'), + ], + 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), + 'templateResult' => new JsExpression('function(city) { return city.text; }'), + 'templateSelection' => new JsExpression('function (city) { return city.text; }'), + ], + ]); ?>
field($portfolio, 'street', [ 'options' => [ 'class' => 'form-group company_info' ] ]) - ->label('Улица') - ->textInput([ 'class' => 'custom-input-2' ]); ?> + ->label('Улица') + ->textInput([ 'class' => 'custom-input-2' ]); ?>
field($portfolio, 'house', [ 'options' => [ 'class' => 'form-group company_info' ] ]) - ->label('Дом') - ->textInput([ 'class' => 'custom-input-2' ]); ?> + ->label('Дом') + ->textInput([ 'class' => 'custom-input-2' ]); ?>
field($portfolio, 'preview') - ->widget(CKEditor::className(), [ 'editorOptions' => [ 'preset' => 'basic' ] ]) ?> + ->widget(CKEditor::className(), [ 'editorOptions' => [ 'preset' => 'basic' ] ]) ?>
field($portfolio, 'description') - ->widget(CKEditor::className()) ?> + ->widget(CKEditor::className()) ?>
-

Добавить пользователя

-

'add_project_user_link' ]) ?>

-

Отправлено предложение:

-
+
Добавить участника(ов) проекта
+
'add_project_user_link add-participant' ]) ?>
+ +
render('@frontend/views/ajax/project_user', [ - 'model' => $portfolioUser, - 'user' => $portfolioUser->user, - ]); - } + foreach($portfolioUsers as $portfolioUser) { + echo $this->render('@frontend/views/ajax/project_user', [ + 'model' => $portfolioUser, + 'user' => $portfolioUser->user, + ]); + } ?>
-

Подтвержденные:

-
- render('@frontend/views/ajax/project_user', [ - 'model' => $portfolioUserConfirmed, - 'user' => $portfolioUserConfirmed->user, - ]); - } - ?> -
+ if(!empty( $portfolioUsersConfirmed )) { + ?> +
Подтвержденные предложения:
+
render('@frontend/views/ajax/project_user', [ + 'model' => $portfolioUserConfirmed, + 'user' => $portfolioUserConfirmed->user, + ]); + } + ?> +
+
@@ -234,18 +234,18 @@ isNewRecord ? Yii::t('app', 'add') : 'Обновить', [ 'class' => 'input-blocks-wrapper button' ]) ?>
isNewRecord) { - echo Html::a(Yii::t('app', 'delete'), [ - 'accounts/portfolio-delete', - 'id' => $portfolio->portfolio_id, - ], [ - 'title' => Yii::t('app', 'delete'), - 'aria-label' => Yii::t('app', 'delete'), - 'data-confirm' => Yii::t('app', 'delete_confirm'), - 'data-method' => 'post', - 'data-pjax' => 0, - ]); - } + if(!$portfolio->isNewRecord) { + echo Html::a(Yii::t('app', 'delete'), [ + 'accounts/portfolio-delete', + 'id' => $portfolio->portfolio_id, + ], [ + 'title' => Yii::t('app', 'delete'), + 'aria-label' => Yii::t('app', 'delete'), + 'data-confirm' => Yii::t('app', 'delete_confirm'), + 'data-method' => 'post', + 'data-pjax' => 0, + ]); + } ?>
@@ -255,12 +255,11 @@
end(); +$form->end(); ?> diff --git a/frontend/views/ajax/project_user.php b/frontend/views/ajax/project_user.php index a2517c3..95e4b64 100644 --- a/frontend/views/ajax/project_user.php +++ b/frontend/views/ajax/project_user.php @@ -10,30 +10,50 @@ use yii\web\View; ?> -
status == 1) { echo 'data-portfolio="'.$model->portfolio_id.'"'; } ?>> +
status == 1) { echo 'data-portfolio="'.$model->portfolio_id.'"'; } ?>>
-
- -

name, ['performer/common', 'performer_id' => $user->id], ['target' => '_blank'])?>

- id}]user_id", ['value' => $user->id])?> - status == 1) { - echo Html::activeHiddenInput($model, "[{$user->id}]status", ['value' => $model->status]); - } - ?> - id}]user_id", ['value' => $user->id])?> -
-
- Yii::t('app', 'Должность: ')])?> - id}]position", ['class' => 'form-control'])?> -
-
- Yii::t('app', 'Часы: ')])?> - id}]time", ['class' => 'form-control'])?> + + -
- + +
+
+
+ Yii::t('app', 'Должность: ')])?> + id}]position", ['class' => 'form-control custom-input-2'])?> +
+
+
+
+ Yii::t('app', 'Часы: ')])?> + id}]time", ['class' => 'form-control custom-input-2'])?> +
+
+
+ +
+ + + +
+ \ No newline at end of file diff --git a/frontend/web/css/style.css b/frontend/web/css/style.css index bfb1739..8254e52 100755 --- a/frontend/web/css/style.css +++ b/frontend/web/css/style.css @@ -5060,22 +5060,22 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + border: 1px solid #fff; } -.input-blocks .required:before { - display: block; - content: "*"; - color: #D40000; - position: absolute; - top: 32px; - left: -12px; - width: 15px; -} +/*.input-blocks .required:before {*/ + /*display: block;*/ + /*content: "*";*/ + /*color: #D40000;*/ + /*position: absolute;*/ + /*top: 32px;*/ + /*left: -12px;*/ + /*width: 15px;*/ +/*}*/ .input-blocks .required label:before { display: block; content: "*"; color: #D40000; position: absolute; top: 0px; - right: -10px; + right: -7px; } .input-blocks .required.required-no-star:before { display: none; @@ -5749,7 +5749,7 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- text-align: center; margin-bottom: 50px; } -.admin-save-btn button { +.admin-save-btn button, .add-participant { width: 160px; height: 29px; color: #fff; @@ -5762,12 +5762,25 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- outline: none; border-radius: 4px; } -.admin-save-btn button:hover{ +.add-participant { + display: block; + text-align: center; + background: #fff; + color: #0072bc; + +} +.admin-save-btn button:hover { background: #fff; color: #0072bc; transition: 0.2s; } -.admin-save-btn button:focus{background: #00568e;color: #fff;} +.add-participant:hover { + background: #0072bc; + color: #fff; + text-decoration: none; + transition: 0.2s; +} +.admin-save-btn button:focus, .add-participant:active {background: #00568e;color: #fff} /*select-new*/ .select2-container--krajee .select2-selection--single { height: 29px; @@ -6152,7 +6165,7 @@ a {color: #0072bc} width: 340px; height: 260px; } -.admin-blog-min-img .uploader-button { +.admin-blog-min-img .uploader-button, .btn.add-participant { width: auto; padding: 0 10px; margin-left: 0} @@ -6823,3 +6836,28 @@ li.active-menu-admin:hover a .ico_num { } .hint-link-check {margin-top: 23px} .fix-color-datepicker .ui-datepicker-title {color: #fff} +.form-control-static.fix-link {font-size: 13px} +.form-control-static.fix-link a:hover {color: #0072bc; text-decoration: underline} +.form-control.custom-input-2 {width: 300px} +.autor_link_ .form-control-static { + margin: 0; + padding: 0; + min-height: 0; +} +.remove_people { + position: absolute; + width: 13px; + height: 13px; + left: 414px; + top: 30px; +} +.add_participant-wr {font-size: 18px; margin-top: 28px} +.fancybox-overlay { + z-index: 9991 !important; +} +.hidden_sentence, ._hidden_sentence { + font-size: 18px; + border-bottom: 1px solid #dcdcdc; + margin-top: 27px; + padding-bottom: 10px; +} \ No newline at end of file -- libgit2 0.21.4