Commit 229730f9ff3c5cafbe699a41a6c69fe3fafc589c

Authored by Yarik
1 parent b4142e17

test

frontend/views/accounts/general.php
... ... @@ -16,7 +16,7 @@
16 16 use yii\web\JsExpression;
17 17  
18 18 $this->title = 'Учетные данные';
19   - $this->params['breadcrumbs'][] = $this->title;
  19 + $this->params[ 'breadcrumbs' ][] = $this->title;
20 20 ?>
21 21 <div class="login-left-column-title"><?= $this->title ?></div>
22 22  
... ... @@ -29,8 +29,9 @@
29 29 <div class="general-check-left">
30 30 <?= $form->field($user_info, 'is_freelancer', [ 'template' => "{input}\n{label}\n{error}" ])
31 31 ->label('<span></span>Я - исполнитель')
  32 + ->hint('hello world')
32 33 ->checkbox([
33   - 'class' => 'custom-check admin-check',
  34 + 'class' => 'custom-check admin-check',
34 35 ], false); ?>
35 36 </div>
36 37 <div class="general-check-right">
... ... @@ -43,7 +44,7 @@
43 44 <?= $form->field($user_info, 'is_customer', [ 'template' => "{input}\n{label}\n{error}" ])
44 45 ->label('<span></span>Я - заказчик')
45 46 ->checkbox([
46   - 'class' => 'custom-check admin-check',
  47 + 'class' => 'custom-check admin-check',
47 48 ], false); ?>
48 49 </div>
49 50 <div class="general-check-right">
... ... @@ -55,23 +56,22 @@
55 56 <div class="general-who style border-general">
56 57 <div class="general-who-title gen-admin-title">Кто вы:</div>
57 58  
58   - <?= $form->field ($user, 'type')
59   - ->label (false)
60   - ->radioList (
61   - [1 => 'Частное лицо', 2 => 'Компания'],
62   - [
63   - 'item' => function($index, $label, $name, $checked, $value) {
64   - $return = '<div class="admin-who-check">';
65   - $return .= '<input class="custom-radio" id="select_admin_'.$value.'" type="radio" name="' . $name . '" value="' . $value . '" '.($checked ? "checked" :"").' >';
66   - $return .= '<label for="select_admin_'.$value.'" >';
67   - $return .= '<span></span>' . ucwords($label);
68   - $return .= '</label>';
69   - $return .= '</div>';
70   - return $return;
71   - }
72   - ]
73   - );
74   - ?>
  59 + <?= $form->field($user, 'type')
  60 + ->label(false)
  61 + ->radioList([
  62 + 1 => 'Частное лицо',
  63 + 2 => 'Компания',
  64 + ], [
  65 + 'item' => function($index, $label, $name, $checked, $value) {
  66 + $return = '<div class="admin-who-check">';
  67 + $return .= '<input class="custom-radio" id="select_admin_' . $value . '" type="radio" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >';
  68 + $return .= '<label for="select_admin_' . $value . '" >';
  69 + $return .= '<span></span>' . ucwords($label);
  70 + $return .= '</label>';
  71 + $return .= '</div>';
  72 + return $return;
  73 + },
  74 + ]); ?>
75 75  
76 76  
77 77 </div>
... ... @@ -79,16 +79,17 @@
79 79 <div class="hidden-input-admin-general">
80 80 <div class="input-blocks-wrapper">
81 81 <div class="input-blocks">
82   - <?= $form->field ($company_info, 'name', ['options' => ['class' => 'form-group company_info']])
83   - ->textInput (['class'=> 'custom-input-2']);
84   - ?>
  82 + <?= $form->field($company_info, 'name', [ 'options' => [ 'class' => 'form-group company_info' ] ])
  83 + ->textInput([ 'class' => 'custom-input-2' ]); ?>
85 84 </div>
86 85 </div>
87 86 <div class="input-blocks-wrapper">
88 87 <div class="input-blocks">
89   - <?= $form->field ($company_info, 'staff', ['options' => ['class' => 'form-group company_info']])
90   - ->textInput (['class'=> 'custom-input-2','type'=>'number']);
91   - ?>
  88 + <?= $form->field($company_info, 'staff', [ 'options' => [ 'class' => 'form-group company_info' ] ])
  89 + ->textInput([
  90 + 'class' => 'custom-input-2',
  91 + 'type' => 'number',
  92 + ]); ?>
92 93 </div>
93 94 </div>
94 95 <div class="conacts-admin style">Контакты представителя:</div>
... ... @@ -96,111 +97,111 @@
96 97  
97 98 <div class="input-blocks-wrapper">
98 99 <div class="input-blocks">
99   - <?= $form->field ($user, 'firstname')
100   - ->label ('Имя')
101   - ->textInput (['class'=> 'custom-input-2']);
102   - ?>
  100 + <?= $form->field($user, 'firstname')
  101 + ->label('Имя')
  102 + ->textInput([ 'class' => 'custom-input-2' ]); ?>
103 103 </div>
104 104 </div>
105 105  
106 106 <div class="input-blocks-wrapper">
107 107 <div class="input-blocks">
108   - <?= $form->field ($user, 'lastname')
109   - ->label ('Фамилия')
110   - ->textInput (['class'=> 'custom-input-2']);
111   - ?>
  108 + <?= $form->field($user, 'lastname')
  109 + ->label('Фамилия')
  110 + ->textInput([ 'class' => 'custom-input-2' ]); ?>
112 111 </div>
113 112 </div>
114 113 <div class="input-blocks-wrapper">
115 114 <div class="input-blocks">
116   - <?=
117   - $form->field($user_info, 'country')->widget(Select2::classname(), [
118   - 'options' => ['placeholder' => 'Выбор страны ...', ],
119   - 'pluginOptions' => [
120   - 'allowClear' => true,
121   - 'minimumInputLength' => 3,
122   - 'ajax' => [
123   - 'url' => \yii\helpers\Url::to(['site/country']),
124   - 'dataType' => 'json',
125   - 'data' => new JsExpression('function(params) { return {q:params.term}; }')
126   - ],
127   - 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
128   - 'templateResult' => new JsExpression('function(country) { return country.text; }'),
129   - 'templateSelection' => new JsExpression('function (country) { return country.text; }'),
130   - ],
131   - ]);
132   - ?>
  115 + <?= $form->field($user_info, 'country')
  116 + ->widget(Select2::classname(), [
  117 + 'options' => [ 'placeholder' => 'Выбор страны ...', ],
  118 + 'pluginOptions' => [
  119 + 'allowClear' => true,
  120 + 'minimumInputLength' => 3,
  121 + 'ajax' => [
  122 + 'url' => \yii\helpers\Url::to([ 'site/country' ]),
  123 + 'dataType' => 'json',
  124 + 'data' => new JsExpression('function(params) { return {q:params.term}; }'),
  125 + ],
  126 + 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
  127 + 'templateResult' => new JsExpression('function(country) { return country.text; }'),
  128 + 'templateSelection' => new JsExpression('function (country) { return country.text; }'),
  129 + ],
  130 + ]); ?>
133 131 </div>
134 132 </div>
135 133 <div class="input-blocks-wrapper">
136 134 <div class="input-blocks">
137   - <?=
138   - $form->field($user_info, 'city')->widget(Select2::classname(), [
139   - 'options' => ['placeholder' => 'Выбор города ...'],
140   - 'pluginOptions' => [
141   - 'allowClear' => true,
142   - 'minimumInputLength' => 3,
143   - 'ajax' => [
144   - 'url' => \yii\helpers\Url::to(['site/city']),
145   - 'dataType' => 'json',
146   - 'data' => new JsExpression('function(params) { return {q:params.term}; }')
147   - ],
148   - 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
149   - 'templateResult' => new JsExpression('function(city) { return city.text; }'),
150   - 'templateSelection' => new JsExpression('function (city) { return city.text; }'),
151   - ],
152   - ]);
153   - ?>
  135 + <?= $form->field($user_info, 'city')
  136 + ->widget(Select2::classname(), [
  137 + 'options' => [ 'placeholder' => 'Выбор города ...' ],
  138 + 'pluginOptions' => [
  139 + 'allowClear' => true,
  140 + 'minimumInputLength' => 3,
  141 + 'ajax' => [
  142 + 'url' => \yii\helpers\Url::to([ 'site/city' ]),
  143 + 'dataType' => 'json',
  144 + 'data' => new JsExpression('function(params) { return {q:params.term}; }'),
  145 + ],
  146 + 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
  147 + 'templateResult' => new JsExpression('function(city) { return city.text; }'),
  148 + 'templateSelection' => new JsExpression('function (city) { return city.text; }'),
  149 + ],
  150 + ]); ?>
154 151  
155 152 </div>
156 153  
157 154 <div class="input-blocks street-input">
158   - <?= $form->field ($company_info, 'street', ['options' => ['class' => 'form-group company_info']])
159   - ->textInput (['class'=> 'custom-input-2']);
160   - ?>
  155 + <?= $form->field($company_info, 'street', [ 'options' => [ 'class' => 'form-group company_info' ] ])
  156 + ->textInput([ 'class' => 'custom-input-2' ]); ?>
161 157 </div>
162 158  
163 159 <div class="input-blocks home-input">
164   - <?= $form->field ($company_info, 'house', ['options' => ['class' => 'form-group company_info']])
165   - ->textInput (['class'=> 'custom-input-2']);
166   - ?>
  160 + <?= $form->field($company_info, 'house', [ 'options' => [ 'class' => 'form-group company_info' ] ])
  161 + ->textInput([ 'class' => 'custom-input-2' ]); ?>
167 162 </div>
168 163 </div>
169 164  
170 165 <div class="input-blocks-wrapper ">
171 166 <div class="input-blocks">
172   - <?= $form->field ($user_info, 'email')
173   - ->textInput (['class'=> 'custom-input-2', 'value' => empty($user_info->email)?$user->email:$user_info->email]);
174   - ?>
  167 + <?= $form->field($user_info, 'email')
  168 + ->textInput([
  169 + 'class' => 'custom-input-2',
  170 + 'value' => empty( $user_info->email ) ? $user->email : $user_info->email,
  171 + ]); ?>
175 172 </div>
176 173 <div class="input-blocks hide-mail-check">
177   - <?= $form->field ($user_info, 'hide_mail', ['options' => ['class' => 'form-group', ], 'template' => "{input}{label}\n{hint}\n{error}"])
178   - ->label ('<span></span>не публиковать Email')
179   - ->checkbox (['checked'=>'checked', 'class'=> 'custom-check'], false);
180   - ?>
  174 + <?= $form->field($user_info, 'hide_mail', [
  175 + 'options' => [ 'class' => 'form-group', ],
  176 + 'template' => "{input}{label}\n{hint}\n{error}",
  177 + ])
  178 + ->label('<span></span>не публиковать Email')
  179 + ->checkbox([
  180 + 'checked' => 'checked',
  181 + 'class' => 'custom-check',
  182 + ], false); ?>
181 183 </div>
182 184 </div>
183 185 </div>
184 186 <div class="input-blocks-wrapper border-general fix-marg">
185 187 <div class="input-blocks weight-normal">
186   - <div class="gen-admin-title">Статус:</div>
187   - <?= $form->field ($user_info, 'busy')
188   - ->label (false)
189   - ->radioList (
190   - [0 => 'Свободен', 1 => 'Занят'],
191   - [
192   - 'item' => function($index, $label, $name, $checked, $value) {
193   - $return = '<div class="admin-who-check">';
194   - $return .= '<input class="custom-radio" id="select_admin_status'.$value.'" type="radio" name="' . $name . '" value="' . $value . '" '.($checked ? "checked" :"").' >';
195   - $return .= '<label for="select_admin_status'.$value.'" >';
196   - $return .= '<span></span>' . ucwords($label);
197   - $return .= '</label>';
198   - $return .= '</div>';
199   - return $return;
200   - }
201   - ]
202   - );
203   - ?>
  188 + <div class="gen-admin-title">Статус:</div>
  189 + <?= $form->field($user_info, 'busy')
  190 + ->label(false)
  191 + ->radioList([
  192 + 0 => 'Свободен',
  193 + 1 => 'Занят',
  194 + ], [
  195 + 'item' => function($index, $label, $name, $checked, $value) {
  196 + $return = '<div class="admin-who-check">';
  197 + $return .= '<input class="custom-radio" id="select_admin_status' . $value . '" type="radio" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >';
  198 + $return .= '<label for="select_admin_status' . $value . '" >';
  199 + $return .= '<span></span>' . ucwords($label);
  200 + $return .= '</label>';
  201 + $return .= '</div>';
  202 + return $return;
  203 + },
  204 + ]); ?>
204 205 </div>
205 206 </div>
206 207  
... ... @@ -208,44 +209,45 @@
208 209 <div class="style border-general">
209 210 <div class="input-blocks-wrapper admin-avatar">
210 211 <div class="gen-admin-title">Аватар</div>
211   - <div class="file-help-1"><div>Формат: PNG, JPG, GIF<br />Размер: 180x180 px<br />Файлы большего размера и других пропорций будут конвертироваться</div></div>
  212 + <div class="file-help-1">
  213 + <div>Формат: PNG, JPG, GIF<br/>Размер: 180x180 px<br/>Файлы большего размера и других пропорций будут конвертироваться
  214 + </div>
  215 + </div>
212 216 <?= ImageUploader::widget([
213   - 'model'=> $user_info,
214   - 'field'=>'image',
215   - 'size' => [
  217 + 'model' => $user_info,
  218 + 'field' => 'image',
  219 + 'size' => [
216 220 [
217   - 'width'=>48,
218   - 'height'=>48,
  221 + 'width' => 48,
  222 + 'height' => 48,
219 223 ],
220 224 [
221   - 'width'=>180,
222   - 'height'=>180,
  225 + 'width' => 180,
  226 + 'height' => 180,
223 227 ],
224 228  
225 229 ],
226   - 'multi'=>false,
227   - 'gallery' =>$user_info->image,
228   - 'name' => 'Выбрать файл'
229   - ]);
230   - ?>
  230 + 'multi' => false,
  231 + 'gallery' => $user_info->image,
  232 + 'name' => 'Выбрать файл',
  233 + ]); ?>
231 234 </div>
232 235  
233 236 <div class="input-blocks-wrapper admin-avatar admin-pattern">
234 237 <div class="gen-admin-title">Подложка</div>
235   - <?= ImageUploader::widget([
236   - 'model'=> $user_info,
237   - 'field'=>'poster',
238   - 'size' => [
239   - [
240   - 'width'=>1920,
241   - 'height'=>380,
242   - ]
  238 + <?= ImageUploader::widget([
  239 + 'model' => $user_info,
  240 + 'field' => 'poster',
  241 + 'size' => [
  242 + [
  243 + 'width' => 1920,
  244 + 'height' => 380,
243 245 ],
244   - 'multi'=>false,
245   - 'gallery' =>$user_info->poster,
246   - 'name' => 'Выбрать файл'
247   - ]);
248   - ?>
  246 + ],
  247 + 'multi' => false,
  248 + 'gallery' => $user_info->poster,
  249 + 'name' => 'Выбрать файл',
  250 + ]); ?>
249 251 </div>
250 252  
251 253 </div>
... ... @@ -255,22 +257,22 @@
255 257 <div class="input-blocks weight-normal">
256 258 <div class="gen-admin-title">Членство в МФП</div>
257 259 <div class="admin-fix-mfp">
258   - <?= $form->field ($user_info, 'member')
259   - ->label (false)
260   - ->radioList ([0 => 'Не хочу', 1 => 'Хочу стать'],
261   - [
262   - 'item' => function($index, $label, $name, $checked, $value) {
263   - $return = '<div class="admin-who-check">';
264   - $return .= '<input class="custom-radio" id="select_admin_mfp'.$value.'" type="radio" name="' . $name . '" value="' . $value . '" '.($checked ? "checked" :"").' >';
265   - $return .= '<label for="select_admin_mfp'.$value.'" >';
266   - $return .= '<span></span>' . ucwords($label);
267   - $return .= '</label>';
268   - $return .= '</div>';
269   - return $return;
270   - }
271   - ]
272   - );
273   - ?>
  260 + <?= $form->field($user_info, 'member')
  261 + ->label(false)
  262 + ->radioList([
  263 + 0 => 'Не хочу',
  264 + 1 => 'Хочу стать',
  265 + ], [
  266 + 'item' => function($index, $label, $name, $checked, $value) {
  267 + $return = '<div class="admin-who-check">';
  268 + $return .= '<input class="custom-radio" id="select_admin_mfp' . $value . '" type="radio" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >';
  269 + $return .= '<label for="select_admin_mfp' . $value . '" >';
  270 + $return .= '<span></span>' . ucwords($label);
  271 + $return .= '</label>';
  272 + $return .= '</div>';
  273 + return $return;
  274 + },
  275 + ]); ?>
274 276 </div>
275 277 <div class="admin-mfp-help">Выберите если хотите стать членом МФП и наш менеджер свяжется с Вами.</div>
276 278 </div>
... ... @@ -280,9 +282,8 @@
280 282  
281 283 <div class="input-blocks-wrapper">
282 284 <div class="admin-save-btn style">
283   - <?= Html::submitButton('Сохранить', ['class' => 'input-blocks-wrapper button']);
284   - $form->end ();
285   - ?>
  285 + <?= Html::submitButton('Сохранить', [ 'class' => 'input-blocks-wrapper button' ]);
  286 + $form->end(); ?>
286 287 </div>
287 288 </div>
288 289 </div>
... ...
frontend/views/performer/project-list.php
... ... @@ -14,7 +14,7 @@
14 14  
15 15 $this->title = 'My Yii Application';
16 16 ?>
17   -<div class="proektant-profile-content">
  17 +<div class="proektant-profile-content" style="width:100%">
18 18 <div class="search-worker-title style">Сейчас <?= $dataProvider->totalCount ?> предложений</div>
19 19 <div class="search-profile-blocks-wr style">
20 20 <?= ListView::widget([
... ...