Commit 4f7ef4a2e20d9ed55bec72096d9e2907844786ce
1 parent
272ce289
test
Showing
4 changed files
with
125 additions
and
95 deletions
Show diff stats
frontend/views/layouts/company.php
@@ -157,39 +157,49 @@ | @@ -157,39 +157,49 @@ | ||
157 | <ul> | 157 | <ul> |
158 | <li class="activejob"> | 158 | <li class="activejob"> |
159 | <?php | 159 | <?php |
160 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
161 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
162 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
163 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | 160 | + if($this->params[ 'company' ]->userInfo->is_freelancer xor $this->params[ 'company' ]->userInfo->is_customer) { |
161 | + if(!empty($this->params[ 'type' ]) && $this->params[ 'type' ] == 'customer') { | ||
162 | + echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); | ||
163 | + } else { | ||
164 | + echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); | ||
165 | + } | ||
164 | } else { | 166 | } else { |
165 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | 167 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { |
168 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
169 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
170 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
171 | + } else { | ||
172 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
173 | + } | ||
174 | + ?> | ||
175 | + <div class="sidebar-droped-wr style"> | ||
176 | + <ul> | ||
177 | + <li> | ||
178 | + <?php | ||
179 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
180 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
181 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
182 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
183 | + } else { | ||
184 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
185 | + } | ||
186 | + ?> | ||
187 | + </li> | ||
188 | + <li style="display: none"> | ||
189 | + <?php | ||
190 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
191 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
192 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
193 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
194 | + } else { | ||
195 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
196 | + } | ||
197 | + ?> | ||
198 | + </ul> | ||
199 | + </div> | ||
200 | + <?php | ||
166 | } | 201 | } |
167 | ?> | 202 | ?> |
168 | - <div class="sidebar-droped-wr style"> | ||
169 | - <ul> | ||
170 | - <li> | ||
171 | - <?php | ||
172 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
173 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
174 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
175 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
176 | - } else { | ||
177 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
178 | - } | ||
179 | - ?> | ||
180 | - </li> | ||
181 | - <li style="display: none"> | ||
182 | - <?php | ||
183 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
184 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
185 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
186 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
187 | - } else { | ||
188 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
189 | - } | ||
190 | - ?> | ||
191 | - </ul> | ||
192 | - </div> | ||
193 | </li> | 203 | </li> |
194 | </ul> | 204 | </ul> |
195 | </div> | 205 | </div> |
frontend/views/layouts/gallery-company.php
@@ -154,39 +154,49 @@ | @@ -154,39 +154,49 @@ | ||
154 | <ul> | 154 | <ul> |
155 | <li class="activejob"> | 155 | <li class="activejob"> |
156 | <?php | 156 | <?php |
157 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
158 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
159 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
160 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | 157 | + if($this->params[ 'company' ]->userInfo->is_freelancer xor $this->params[ 'company' ]->userInfo->is_customer) { |
158 | + if(!empty($this->params[ 'type' ]) && $this->params[ 'type' ] == 'customer') { | ||
159 | + echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); | ||
160 | + } else { | ||
161 | + echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); | ||
162 | + } | ||
161 | } else { | 163 | } else { |
162 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | 164 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { |
165 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
166 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
167 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
168 | + } else { | ||
169 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
170 | + } | ||
171 | + ?> | ||
172 | + <div class="sidebar-droped-wr style"> | ||
173 | + <ul> | ||
174 | + <li> | ||
175 | + <?php | ||
176 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
177 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
178 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
179 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
180 | + } else { | ||
181 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
182 | + } | ||
183 | + ?> | ||
184 | + </li> | ||
185 | + <li style="display: none"> | ||
186 | + <?php | ||
187 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
188 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
189 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
190 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
191 | + } else { | ||
192 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
193 | + } | ||
194 | + ?> | ||
195 | + </ul> | ||
196 | + </div> | ||
197 | + <?php | ||
163 | } | 198 | } |
164 | ?> | 199 | ?> |
165 | - <div class="sidebar-droped-wr style"> | ||
166 | - <ul> | ||
167 | - <li> | ||
168 | - <?php | ||
169 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
170 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
171 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
172 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
173 | - } else { | ||
174 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
175 | - } | ||
176 | - ?> | ||
177 | - </li> | ||
178 | - <li style="display: none"> | ||
179 | - <?php | ||
180 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
181 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
182 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
183 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
184 | - } else { | ||
185 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
186 | - } | ||
187 | - ?> | ||
188 | - </ul> | ||
189 | - </div> | ||
190 | </li> | 200 | </li> |
191 | </ul> | 201 | </ul> |
192 | </div> | 202 | </div> |
frontend/views/layouts/gallery.php
@@ -68,8 +68,8 @@ | @@ -68,8 +68,8 @@ | ||
68 | ], | 68 | ], |
69 | ], | 69 | ], |
70 | [ | 70 | [ |
71 | - 'label' => 'Портфолио', | ||
72 | - 'url' => [ | 71 | + 'label' => 'Портфолио', |
72 | + 'url' => [ | ||
73 | 'performer/portfolio', | 73 | 'performer/portfolio', |
74 | 'performer_id' => $this->params[ 'user' ]->id, | 74 | 'performer_id' => $this->params[ 'user' ]->id, |
75 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 75 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
@@ -77,8 +77,8 @@ | @@ -77,8 +77,8 @@ | ||
77 | 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, | 77 | 'visible' => ( empty( $this->params[ 'type' ] ) || $this->params[ 'type' ] == 'implementer' ) ? true : false, |
78 | ], | 78 | ], |
79 | [ | 79 | [ |
80 | - 'label' => 'Заказанные работы', | ||
81 | - 'url' => [ | 80 | + 'label' => 'Заказанные работы', |
81 | + 'url' => [ | ||
82 | 'performer/projects', | 82 | 'performer/projects', |
83 | 'performer_id' => $this->params[ 'user' ]->id, | 83 | 'performer_id' => $this->params[ 'user' ]->id, |
84 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, | 84 | 'type' => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL, |
@@ -134,39 +134,49 @@ | @@ -134,39 +134,49 @@ | ||
134 | <ul> | 134 | <ul> |
135 | <li class="activejob"> | 135 | <li class="activejob"> |
136 | <?php | 136 | <?php |
137 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
138 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
139 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
140 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | 137 | + if($this->params[ 'user' ]->userInfo->is_freelancer xor $this->params[ 'user' ]->userInfo->is_customer) { |
138 | + if(!empty($this->params[ 'type' ]) && $this->params[ 'type' ] == 'customer') { | ||
139 | + echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); | ||
140 | + } else { | ||
141 | + echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); | ||
142 | + } | ||
141 | } else { | 143 | } else { |
142 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | 144 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { |
145 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
146 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
147 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
148 | + } else { | ||
149 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
150 | + } | ||
151 | + ?> | ||
152 | + <div class="sidebar-droped-wr style"> | ||
153 | + <ul> | ||
154 | + <li> | ||
155 | + <?php | ||
156 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
157 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
158 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
159 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
160 | + } else { | ||
161 | + echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
162 | + } | ||
163 | + ?> | ||
164 | + </li> | ||
165 | + <li style="display: none"> | ||
166 | + <?php | ||
167 | + if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
168 | + echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
169 | + } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
170 | + echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
171 | + } else { | ||
172 | + echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
173 | + } | ||
174 | + ?> | ||
175 | + </ul> | ||
176 | + </div> | ||
177 | + <?php | ||
143 | } | 178 | } |
144 | ?> | 179 | ?> |
145 | - <div class="sidebar-droped-wr style"> | ||
146 | - <ul> | ||
147 | - <li> | ||
148 | - <?php | ||
149 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
150 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
151 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
152 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
153 | - } else { | ||
154 | - echo Html::a('Заказчик', Url::current([ 'type' => 'customer' ])); | ||
155 | - } | ||
156 | - ?> | ||
157 | - </li> | ||
158 | - <li style="display: none"> | ||
159 | - <?php | ||
160 | - if(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'implementer') { | ||
161 | - echo Html::a('Исполнитель', Url::current([ 'type' => 'implementer' ])); | ||
162 | - } elseif(!empty( $this->params[ 'type' ] ) && $this->params[ 'type' ] == 'customer') { | ||
163 | - echo Html::a('Заказчик', Url::current([ 'type' => NULL ])); | ||
164 | - } else { | ||
165 | - echo Html::a('Исполнитель', Url::current([ 'type' => NULL ])); | ||
166 | - } | ||
167 | - ?> | ||
168 | - </ul> | ||
169 | - </div> | ||
170 | </li> | 180 | </li> |
171 | </ul> | 181 | </ul> |
172 | </div> | 182 | </div> |
frontend/views/layouts/performer.php
@@ -140,7 +140,7 @@ | @@ -140,7 +140,7 @@ | ||
140 | <li class="activejob"> | 140 | <li class="activejob"> |
141 | <?php | 141 | <?php |
142 | if($this->params[ 'user' ]->userInfo->is_freelancer xor $this->params[ 'user' ]->userInfo->is_customer) { | 142 | if($this->params[ 'user' ]->userInfo->is_freelancer xor $this->params[ 'user' ]->userInfo->is_customer) { |
143 | - if($this->params[ 'type' ] == 'customer') { | 143 | + if(!empty($this->params[ 'type' ]) && $this->params[ 'type' ] == 'customer') { |
144 | echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); | 144 | echo Html::tag('span', 'Заказчик', [ 'class' => 'activejob_span' ]); |
145 | } else { | 145 | } else { |
146 | echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); | 146 | echo Html::tag('span', 'Исполнитель', [ 'class' => 'activejob_span' ]); |