Commit b20e4b532deba3bfa68edd236a3f376d2efaf67a
1 parent
02524a34
tokar commit
Showing
4 changed files
with
188 additions
and
39 deletions
Show diff stats
common/widgets/views/image_sizer.php
@@ -53,6 +53,7 @@ $id = $model::tableName().'_id'; | @@ -53,6 +53,7 @@ $id = $model::tableName().'_id'; | ||
53 | var block = $("#<?= $field?>_img_block .admin-avatar-pattern"); | 53 | var block = $("#<?= $field?>_img_block .admin-avatar-pattern"); |
54 | block.find('img').remove(); | 54 | block.find('img').remove(); |
55 | block.append(img); | 55 | block.append(img); |
56 | + block.parents('.file-uploader-block').parent().addClass('success_download'); | ||
56 | $("#<?=$field?>_picture_link").val(data.result.link); | 57 | $("#<?=$field?>_picture_link").val(data.result.link); |
57 | $("#<?=$field?>_new_img").val(data.result.link); | 58 | $("#<?=$field?>_new_img").val(data.result.link); |
58 | } | 59 | } |
@@ -70,6 +71,8 @@ $id = $model::tableName().'_id'; | @@ -70,6 +71,8 @@ $id = $model::tableName().'_id'; | ||
70 | }); | 71 | }); |
71 | 72 | ||
72 | $('body').on('click', '#<?=$field?>_remove_img',function(){ | 73 | $('body').on('click', '#<?=$field?>_remove_img',function(){ |
74 | + $("#<?= $field?>_img_block").parent().parent().parent().removeClass('success_download') | ||
75 | + | ||
73 | $("#<?=$field?>_buttons_block").remove(); | 76 | $("#<?=$field?>_buttons_block").remove(); |
74 | var old_url = $('#<?=$field?>_old_img').val(); | 77 | var old_url = $('#<?=$field?>_old_img').val(); |
75 | var new_url = $('#<?=$field?>_new_img').val(); | 78 | var new_url = $('#<?=$field?>_new_img').val(); |
frontend/views/accounts/_blog_form.php
@@ -8,24 +8,40 @@ | @@ -8,24 +8,40 @@ | ||
8 | use yii\helpers\Html; | 8 | use yii\helpers\Html; |
9 | use yii\widgets\ActiveForm; | 9 | use yii\widgets\ActiveForm; |
10 | 10 | ||
11 | - $this->title = 'Мой профиль'; | 11 | + $this->title = 'Блог'; |
12 | $this->params[ 'breadcrumbs' ][] = $this->title; | 12 | $this->params[ 'breadcrumbs' ][] = $this->title; |
13 | ?> | 13 | ?> |
14 | -<h1><?= $this->title ?></h1> | 14 | +<div class="login-left-column-title"><?= $this->title ?></div> |
15 | 15 | ||
16 | <?php | 16 | <?php |
17 | $form = ActiveForm::begin(); | 17 | $form = ActiveForm::begin(); |
18 | ?> | 18 | ?> |
19 | 19 | ||
20 | -<?= $blog->date_add ?> | 20 | +<div class="input-blocks-wrapper full-blocks data-block"> |
21 | + <?= !empty($blog->date_add)? "Дата создания: $blog->date_add" :""?> | ||
22 | +</div> | ||
23 | +<div class="style"> | ||
24 | + <div class="input-blocks-wrapper full-blocks"> | ||
25 | + <div class="input-blocks"> | ||
26 | + <?= $form->field($blog, 'name') | ||
27 | + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> | ||
28 | + </div> | ||
29 | + </div> | ||
30 | + <div class="input-blocks-wrapper full-blocks"> | ||
31 | + <div class="input-blocks"> | ||
32 | + <?= $form->field($blog, 'link') | ||
33 | + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> | ||
34 | + </div> | ||
35 | + </div> | ||
21 | 36 | ||
22 | -<?= $form->field($blog, 'name') | ||
23 | - ->textInput() ?> | 37 | + <div class="input-blocks-wrapper full-blocks admin-editor-bl"> |
38 | + <div class="input-blocks"> | ||
39 | + <?= $form->field($blog, 'description')->widget(CKEditor::className()) ?> | ||
40 | + </div> | ||
41 | + </div> | ||
24 | 42 | ||
25 | -<?= $form->field($blog, 'link') | ||
26 | - ->textInput() ?> | 43 | +</div> |
27 | 44 | ||
28 | -<?= $form->field($blog, 'description')->widget(CKEditor::className()) ?> | ||
29 | 45 | ||
30 | <?php /* | 46 | <?php /* |
31 | <?= ImageUploader::widget([ | 47 | <?= ImageUploader::widget([ |
@@ -39,8 +55,13 @@ | @@ -39,8 +55,13 @@ | ||
39 | ]); | 55 | ]); |
40 | ?> | 56 | ?> |
41 | */ ?> | 57 | */ ?> |
58 | +<div class="input-blocks-wrapper full-blocks"> | ||
59 | + <div class="admin-save-btn style"> | ||
60 | + <?= Html::submitButton('Добавить', ['class' => 'input-blocks-wrapper button']) ?> | ||
61 | + <?= Html::submitButton('Удалить', ['class' => ' remove input-blocks-wrapper button']) ?> | ||
62 | + </div> | ||
63 | +</div> | ||
42 | 64 | ||
43 | -<?= Html::submitButton('Добавить') ?> | ||
44 | 65 | ||
45 | <?php | 66 | <?php |
46 | $form->end(); | 67 | $form->end(); |
frontend/views/accounts/_portfolio_form.php
@@ -9,50 +9,117 @@ | @@ -9,50 +9,117 @@ | ||
9 | use yii\helpers\Html; | 9 | use yii\helpers\Html; |
10 | use yii\widgets\ActiveForm; | 10 | use yii\widgets\ActiveForm; |
11 | use \common\widgets\MultiLangForm; | 11 | use \common\widgets\MultiLangForm; |
12 | +use kartik\select2\Select2; | ||
13 | +use yii\web\JsExpression; | ||
12 | 14 | ||
13 | - $this->title = 'Мой профиль'; | 15 | + $this->title = 'Портфолио'; |
14 | $this->params[ 'breadcrumbs' ][] = $this->title; | 16 | $this->params[ 'breadcrumbs' ][] = $this->title; |
15 | ?> | 17 | ?> |
16 | -<h1><?= $this->title ?></h1> | 18 | +<div class="login-left-column-title"><?= $this->title ?></div> |
17 | 19 | ||
18 | <?php | 20 | <?php |
19 | $form = ActiveForm::begin(); | 21 | $form = ActiveForm::begin(); |
20 | ?> | 22 | ?> |
23 | +<div class="input-blocks-wrapper full-blocks data-block"> | ||
24 | + <?= !empty($portfolio->date_add) ? "Дата создания: $portfolio->date_add" :""?> | ||
21 | 25 | ||
22 | -<?= $form->field($portfolio, 'date_add') | ||
23 | - ->textInput([ 'disabled' => 'disabled' ]) ?> | ||
24 | - | ||
25 | -<?= $form->field($portfolio, 'name') | ||
26 | - ->textInput() ?> | 26 | +</div> |
27 | +<div class="style"> | ||
27 | 28 | ||
28 | -<?= $form->field($portfolio, 'link') | ||
29 | - ->textInput() ?> | 29 | + <div class="input-blocks-wrapper"> |
30 | + <div class="input-blocks"> | ||
31 | + <?= $form->field($portfolio, 'name') | ||
32 | + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> | ||
33 | + </div> | ||
34 | + </div> | ||
30 | 35 | ||
31 | -<?= $form->field($portfolio, 'specializationInput') | ||
32 | - ->checkboxList($specialization) ?> | 36 | + <div class="input-blocks-wrapper"> |
37 | + <div class="input-blocks"> | ||
38 | + <?= $form->field($portfolio, 'link') | ||
39 | + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> | ||
40 | + </div> | ||
41 | + </div> | ||
33 | 42 | ||
34 | -<?= ImageUploader::widget([ | ||
35 | - 'model'=> $portfolio, | ||
36 | - 'field'=>'cover', | ||
37 | - 'width'=>100, | ||
38 | - 'height'=>100, | ||
39 | - 'multi'=>false, | ||
40 | - 'gallery' =>$portfolio->cover, | ||
41 | - 'name' => 'Загрузить главное фото' | ||
42 | -]); | ||
43 | -?> | ||
44 | 43 | ||
45 | -<div class="form-inline"> | ||
46 | - Адрес: | ||
47 | - <?= $form->field($portfolio, 'city', ['template' => "{input}{label}{hint}{error}"])->textInput() ?> | ||
48 | - <?= $form->field($portfolio, 'street', ['template' => "{input}{label}{hint}{error}"])->textInput() ?> | ||
49 | - <?= $form->field($portfolio, 'house', ['template' => "{input}{label}{hint}{error}"])->textInput() ?> | 44 | +<div class="input-blocks-wrapper"> |
45 | + <?= $form->field($portfolio, 'specializationInput') | ||
46 | + ->checkboxList($specialization) ?> | ||
50 | </div> | 47 | </div> |
51 | 48 | ||
52 | -<?= $form->field($portfolio, 'description')->widget(CKEditor::className()) ?> | ||
53 | 49 | ||
54 | -<?= Html::submitButton('Добавить') ?> | ||
55 | 50 | ||
51 | + <div class="input-blocks-wrapper admin-avatar portfolio-foto-admin hidden-foto foto-portfolio-adm"> | ||
52 | + <div class="gen-admin-title">Фото главное</div> | ||
53 | + <div class="not-file-txt-adm">Файл не выбран</div> | ||
54 | + <?= ImageUploader::widget([ | ||
55 | + 'model'=> $portfolio, | ||
56 | + 'field'=>'cover', | ||
57 | + 'width'=>100, | ||
58 | + 'height'=>100, | ||
59 | + 'multi'=>false, | ||
60 | + 'gallery' =>$portfolio->cover, | ||
61 | + 'name' => 'Загрузить' | ||
62 | + ]); | ||
63 | + ?> | ||
64 | + <div class="not-file-mb-adm">До 3 Мб файл</div> | ||
65 | + </div> | ||
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + <div class="input-blocks-wrapper"> | ||
71 | + <div class="input-blocks"> | ||
72 | + <?= | ||
73 | + $form->field($portfolio, 'city')->widget(Select2::classname(), [ | ||
74 | + 'options' => ['placeholder' => 'Выбор города ...'], | ||
75 | + 'pluginOptions' => [ | ||
76 | + 'allowClear' => true, | ||
77 | + 'minimumInputLength' => 3, | ||
78 | + 'ajax' => [ | ||
79 | + 'url' => \yii\helpers\Url::to(['site/city']), | ||
80 | + 'dataType' => 'json', | ||
81 | + 'data' => new JsExpression('function(params) { return {q:params.term}; }') | ||
82 | + ], | ||
83 | + 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), | ||
84 | + 'templateResult' => new JsExpression('function(city) { return city.text; }'), | ||
85 | + 'templateSelection' => new JsExpression('function (city) { return city.text; }'), | ||
86 | + ], | ||
87 | + ]); | ||
88 | + ?> | ||
89 | + | ||
90 | + </div> | ||
91 | + | ||
92 | + <div class="input-blocks street-input"> | ||
93 | + <?= $form->field ($portfolio, 'street', ['options' => ['class' => 'form-group company_info']]) | ||
94 | + ->label ('Улица') | ||
95 | + ->textInput (['class'=> 'custom-input-2']); | ||
96 | + ?> | ||
97 | + </div> | ||
98 | + | ||
99 | + <div class="input-blocks home-input"> | ||
100 | + <?= $form->field ($portfolio, 'house', ['options' => ['class' => 'form-group company_info']]) | ||
101 | + ->label ('Дом') | ||
102 | + ->textInput (['class'=> 'custom-input-2']); | ||
103 | + ?> | ||
104 | + </div> | ||
105 | + </div> | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + <div class="input-blocks-wrapper full-blocks admin-editor-bl"> | ||
110 | + <div class="input-blocks"> | ||
111 | + <?= $form->field($portfolio, 'description')->widget(CKEditor::className()) ?> | ||
112 | + </div> | ||
113 | + </div> | ||
114 | + | ||
115 | +</div> | ||
116 | + | ||
117 | +<div class="input-blocks-wrapper full-blocks"> | ||
118 | + <div class="admin-save-btn style"> | ||
119 | + <?= Html::submitButton('Добавить', ['class' => 'input-blocks-wrapper button']) ?> | ||
120 | + <?= Html::submitButton('Удалить', ['class' => ' remove input-blocks-wrapper button']) ?> | ||
121 | + </div> | ||
122 | +</div> | ||
56 | <?php | 123 | <?php |
57 | $form->end(); | 124 | $form->end(); |
58 | ?> | 125 | ?> |
frontend/web/css/style.css
@@ -4544,6 +4544,8 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | @@ -4544,6 +4544,8 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | ||
4544 | .input-blocks-wrapper { | 4544 | .input-blocks-wrapper { |
4545 | width: 100%;float: left;margin-top: 11px; position: relative; | 4545 | width: 100%;float: left;margin-top: 11px; position: relative; |
4546 | } | 4546 | } |
4547 | +.input-blocks-wrapper.full-blocks {} | ||
4548 | +.input-blocks-wrapper.full-blocks .input-blocks{width: 100%} | ||
4547 | .input-blocks-wrapper:first-child{margin-top: 0} | 4549 | .input-blocks-wrapper:first-child{margin-top: 0} |
4548 | .input-blocks { | 4550 | .input-blocks { |
4549 | width: 300px; | 4551 | width: 300px; |
@@ -4562,7 +4564,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | @@ -4562,7 +4564,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | ||
4562 | padding-left: 8px; | 4564 | padding-left: 8px; |
4563 | margin-top: 5px; | 4565 | margin-top: 5px; |
4564 | } | 4566 | } |
4565 | - | 4567 | +.custom-input-2.fix-input-2 {width: 100%} |
4566 | .custom-input-2:focus, .selectize-input input:focus {box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s} | 4568 | .custom-input-2:focus, .selectize-input input:focus {box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s} |
4567 | 4569 | ||
4568 | .input-blocks label { | 4570 | .input-blocks label { |
@@ -4922,6 +4924,11 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | @@ -4922,6 +4924,11 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | ||
4922 | padding: 15px 0; | 4924 | padding: 15px 0; |
4923 | display: none; | 4925 | display: none; |
4924 | } | 4926 | } |
4927 | +.input-blocks-wrapper.full-blocks .help-block{ | ||
4928 | + margin: 25px auto 0 auto; | ||
4929 | + width: 430px; | ||
4930 | +} | ||
4931 | + | ||
4925 | .input-blocks-wrapper.captcha-wr .help-block {float: left} | 4932 | .input-blocks-wrapper.captcha-wr .help-block {float: left} |
4926 | .has-error .help-block {display: block ;color: inherit} | 4933 | .has-error .help-block {display: block ;color: inherit} |
4927 | .help-block:before { | 4934 | .help-block:before { |
@@ -5355,4 +5362,55 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | @@ -5355,4 +5362,55 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | ||
5355 | .header-cabinet-profile.not-login > div {width: 116px; float: right} | 5362 | .header-cabinet-profile.not-login > div {width: 116px; float: right} |
5356 | .admin-avatar .file-uploader-block {width: 180px; float: left} | 5363 | .admin-avatar .file-uploader-block {width: 180px; float: left} |
5357 | .admin-pattern.admin-avatar .file-uploader-block {width: 100%} | 5364 | .admin-pattern.admin-avatar .file-uploader-block {width: 100%} |
5358 | -.file-help-1 {width: 520px; float: right;height: 130px} | ||
5359 | \ No newline at end of file | 5365 | \ No newline at end of file |
5366 | +.file-help-1 {width: 520px; float: right;height: 130px} | ||
5367 | +.admin-editor-bl label{ | ||
5368 | + margin-bottom: 5px; | ||
5369 | +} | ||
5370 | +.admin-editor-bl .cke_top { | ||
5371 | + background-image: none; | ||
5372 | + background: #dcdcdc !important; | ||
5373 | + padding-top: 9px; | ||
5374 | +} | ||
5375 | +.admin-editor-bl .cke_bottom { | ||
5376 | + background-image: none; | ||
5377 | + background: #dcdcdc !important; | ||
5378 | +} | ||
5379 | +.remove.input-blocks-wrapper button {margin-left: 10px} | ||
5380 | +.data-block {font-size: 13px; color: #b7b7b7; text-align: right} | ||
5381 | +.hidden-foto .file-uploader-block, .hidden-foto .tst, .hidden-foto .admin-avatar-pattern-wr {width: 100%} | ||
5382 | +.hidden-foto .tst {height: auto} | ||
5383 | +.hidden-foto .admin-avatar-pattern {width: 100%; height: auto; background: none} | ||
5384 | +.hidden-foto .tst .admin-ava-wr{display: none} | ||
5385 | + | ||
5386 | +.not-file-txt-adm { | ||
5387 | + width: 100px; | ||
5388 | + float: left; | ||
5389 | + height: 29px; | ||
5390 | + line-height: 29px; | ||
5391 | + font-size: 13px; | ||
5392 | + overflow: hidden; | ||
5393 | + white-space: nowrap; | ||
5394 | +} | ||
5395 | + | ||
5396 | +.foto-portfolio-adm {position: relative} | ||
5397 | +.foto-portfolio-adm .file-uploader-block { | ||
5398 | + width: 620px; | ||
5399 | + height: 29px; | ||
5400 | +} | ||
5401 | +.foto-portfolio-adm .btn {margin-top: 0; margin-left: 8px} | ||
5402 | +.foto-portfolio-adm .tst { | ||
5403 | + float: right; | ||
5404 | + width: 452px; | ||
5405 | + height: 29px; | ||
5406 | +} | ||
5407 | +.not-file-mb-adm { | ||
5408 | + font-size: 13px; | ||
5409 | + color: #b7b7b7; | ||
5410 | + float: left; | ||
5411 | + height: 29px; | ||
5412 | + line-height: 29px; | ||
5413 | + position: absolute; | ||
5414 | + top: 25px; | ||
5415 | + left: 288px; | ||
5416 | +} | ||
5417 | +.success_download .not-file-mb-adm{display: none} | ||
5360 | \ No newline at end of file | 5418 | \ No newline at end of file |