Commit ad81f2277d81bb02b1de75c2322a3aa2ca54874c
1 parent
68232afe
29.12.2016
Showing
3 changed files
with
92 additions
and
74 deletions
Show diff stats
frontend/views/chat/message.php
... | ... | @@ -114,50 +114,57 @@ |
114 | 114 | </div> |
115 | 115 | </div> |
116 | 116 | <div class="cabinet-message-read-wr style"> |
117 | - <div class="comments_block"> | |
118 | - <div class="content"> | |
119 | - <?php foreach($chat->messages as $message): ?> | |
120 | - <?php if($message->isMy()): ?> | |
121 | - <div class="comment right"> | |
122 | - <div class="author_pic"><?= Html::a(Html::img($message->user->minImg($message->user->image, 48, 48)), User::findIdentity($message->user_id)->link, ['target' => '_blank']); ?></div> | |
123 | - <div class="comment_text"> | |
124 | - <?= $message->text ?> | |
125 | - <div class="comment_time"> | |
126 | - <?= $message->date ?> | |
117 | + <?php | |
118 | + if(!empty($chat->messages)) { | |
119 | + ?> | |
120 | + <div class="comments_block"> | |
121 | + <div class="content"> | |
122 | + <?php foreach($chat->messages as $message): ?> | |
123 | + | |
124 | + <?php if($message->isMy()): ?> | |
125 | + <div class="comment right"> | |
126 | + <div class="author_pic"><?= Html::a(Html::img($message->user->minImg($message->user->image, 48, 48)), User::findIdentity($message->user_id)->link, ['target' => '_blank']); ?></div> | |
127 | + <div class="comment_text"> | |
128 | + <?= $message->text ?> | |
129 | + <div class="comment_time"> | |
130 | + <?= $message->date ?> | |
131 | + </div> | |
127 | 132 | </div> |
133 | + <?php if($message->filesList): ?> | |
134 | + <div class="offer_link"> | |
135 | + <?php foreach($message->filesList as $file): ?> | |
136 | + <?= Html::a($file->name, $file->dir, [ 'target' => '_blank' ]); ?> | |
137 | + <?php endforeach; ?> | |
138 | + </div> | |
139 | + <?php endif; ?> | |
140 | + <div style="clear:both;"></div> | |
128 | 141 | </div> |
129 | - <?php if($message->filesList): ?> | |
130 | - <div class="offer_link"> | |
131 | - <?php foreach($message->filesList as $file): ?> | |
132 | - <?= Html::a($file->name, $file->dir, [ 'target' => '_blank' ]); ?> | |
133 | - <?php endforeach; ?> | |
134 | - </div> | |
135 | - <?php endif; ?> | |
136 | - <div style="clear:both;"></div> | |
137 | - </div> | |
138 | - <?php else: $message->status = $message::READ_MESSAGE; $message->update();?> | |
139 | - <div class="comment left"> | |
140 | - <div class="author_pic"><?= Html::a(Html::img($message->user->minImg($message->user->image, 48, 48)), User::findIdentity($message->user_id)->link, ['target' => '_blank']); ?></div> | |
141 | - <div class="comment_text"> | |
142 | - <?= $message->text ?> | |
143 | - <div class="comment_time"> | |
144 | - <?= $message->date ?> | |
142 | + <?php else: $message->status = $message::READ_MESSAGE; $message->update();?> | |
143 | + <div class="comment left"> | |
144 | + <div class="author_pic"><?= Html::a(Html::img($message->user->minImg($message->user->image, 48, 48)), User::findIdentity($message->user_id)->link, ['target' => '_blank']); ?></div> | |
145 | + <div class="comment_text"> | |
146 | + <?= $message->text ?> | |
147 | + <div class="comment_time"> | |
148 | + <?= $message->date ?> | |
149 | + </div> | |
145 | 150 | </div> |
151 | + <?php if($message->filesList): ?> | |
152 | + <div class="offer_link"> | |
153 | + <?php foreach($message->filesList as $file): ?> | |
154 | + <?= Html::a($file->name, $file->dir, [ 'target' => '_blank' ]); ?> | |
155 | + <?php endforeach; ?> | |
156 | + </div> | |
157 | + <?php endif; ?> | |
158 | + <div style="clear:both;"></div> | |
146 | 159 | </div> |
147 | - <?php if($message->filesList): ?> | |
148 | - <div class="offer_link"> | |
149 | - <?php foreach($message->filesList as $file): ?> | |
150 | - <?= Html::a($file->name, $file->dir, [ 'target' => '_blank' ]); ?> | |
151 | - <?php endforeach; ?> | |
152 | - </div> | |
153 | - <?php endif; ?> | |
154 | - <div style="clear:both;"></div> | |
155 | - </div> | |
156 | - <?php endif; ?> | |
157 | - <?php endforeach; ?> | |
158 | - <div style="height:20px;"></div> | |
160 | + <?php endif; ?> | |
161 | + <?php endforeach; ?> | |
162 | + <div style="height:20px;"></div> | |
163 | + </div> | |
159 | 164 | </div> |
160 | - </div> | |
165 | + <?php | |
166 | + } | |
167 | + ?> | |
161 | 168 | <div class="comment_type"> |
162 | 169 | <?php $form = ActiveForm::begin([ |
163 | 170 | 'method' => 'post', | ... | ... |
frontend/views/layouts/main.php
... | ... | @@ -260,7 +260,7 @@ |
260 | 260 | ]); |
261 | 261 | unset( $items ); |
262 | 262 | ?> |
263 | - <div class="footer-menu-project"> | |
263 | + <div class="footer-menu-project" style="height: 50px;width: 258px;"> | |
264 | 264 | <?php |
265 | 265 | echo Menu::widget([ |
266 | 266 | 'options' => [ |
... | ... | @@ -274,17 +274,28 @@ |
274 | 274 | 'linkTemplate' => '<a target="_blank" href="{url}">{label}</a>', |
275 | 275 | 'items' => [ |
276 | 276 | [ |
277 | - 'label' => "<img src='/images/soc-ico-1.png' alt=''/>", | |
278 | - 'url' => 'http://rss.com', | |
277 | + 'label' => "<img src='/images/soc-ico-6.png' alt=''/>", | |
278 | + 'url' => 'https://www.instagram.com/proektant_net/', | |
279 | 279 | ], |
280 | 280 | [ |
281 | 281 | 'label' => "<img src='/images/soc-ico-2.png' alt=''/>", |
282 | - 'url' => 'http://twitter.com', | |
282 | + 'url' => 'https://twitter.com/PROektant_net', | |
283 | + ], | |
284 | + [ | |
285 | + 'label' => "<img src='/images/soc-ico-3.png' alt=''/>", | |
286 | + 'url' => 'https://www.facebook.com/proektant', | |
287 | + ], | |
288 | + [ | |
289 | + 'label' => "<img src='/images/soc-ico-4.png' alt=''/>", | |
290 | + 'url' => 'https://vk.com/proektant', | |
291 | + ], | |
292 | + [ | |
293 | + 'label' => "<img src='/images/soc-ico-5.png' alt=''/>", | |
294 | + 'url' => 'https://plus.google.com/u/0/115070539531803354950', | |
283 | 295 | ], |
284 | 296 | ], |
285 | 297 | ]); |
286 | 298 | ?> |
287 | - <div class="footer-menu-project-ico-txt">новые проекты</div> | |
288 | 299 | </div> |
289 | 300 | </div> |
290 | 301 | |
... | ... | @@ -313,36 +324,36 @@ |
313 | 324 | ]); |
314 | 325 | unset( $items ); |
315 | 326 | ?> |
316 | - <div class="footer-menu-project-two"> | |
317 | - <?php | |
318 | - echo Menu::widget([ | |
319 | - 'options' => [ | |
320 | - 'tag' => 'div', | |
321 | - 'class' => 'footer-menu-project-ico', | |
322 | - ], | |
323 | - 'encodeLabels' => false, | |
324 | - 'itemOptions' => [ | |
325 | - 'tag' => false, | |
326 | - ], | |
327 | - 'linkTemplate' => '<a target="_blank" href="{url}">{label}</a>', | |
328 | - 'items' => [ | |
329 | - [ | |
330 | - 'label' => "<img src='/images/soc-ico-3.png' alt=''/>", | |
331 | - 'url' => 'http://fb.com', | |
332 | - ], | |
333 | - [ | |
334 | - 'label' => "<img src='/images/soc-ico-4.png' alt=''/>", | |
335 | - 'url' => 'http://vk.com', | |
336 | - ], | |
337 | - [ | |
338 | - 'label' => "<img src='/images/soc-ico-5.png' alt=''/>", | |
339 | - 'url' => 'http://plus.google.com', | |
340 | - ], | |
341 | - ], | |
342 | - ]); | |
343 | - ?> | |
344 | - <div class="footer-menu-project-ico-txt">новости сервера</div> | |
345 | - </div> | |
327 | +<!-- <div class="footer-menu-project-two">--> | |
328 | +<!-- --><?php | |
329 | +// echo Menu::widget([ | |
330 | +// 'options' => [ | |
331 | +// 'tag' => 'div', | |
332 | +// 'class' => 'footer-menu-project-ico', | |
333 | +// ], | |
334 | +// 'encodeLabels' => false, | |
335 | +// 'itemOptions' => [ | |
336 | +// 'tag' => false, | |
337 | +// ], | |
338 | +// 'linkTemplate' => '<a target="_blank" href="{url}">{label}</a>', | |
339 | +// 'items' => [ | |
340 | +// [ | |
341 | +// 'label' => "<img src='/images/soc-ico-3.png' alt=''/>", | |
342 | +// 'url' => 'https://www.facebook.com/proektant', | |
343 | +// ], | |
344 | +// [ | |
345 | +// 'label' => "<img src='/images/soc-ico-4.png' alt=''/>", | |
346 | +// 'url' => 'https://vk.com/proektant', | |
347 | +// ], | |
348 | +// [ | |
349 | +// 'label' => "<img src='/images/soc-ico-5.png' alt=''/>", | |
350 | +// 'url' => 'https://plus.google.com/u/0/115070539531803354950', | |
351 | +// ], | |
352 | +// ], | |
353 | +// ]); | |
354 | +// ?> | |
355 | +<!----> | |
356 | +<!-- </div>--> | |
346 | 357 | </div> |
347 | 358 | |
348 | 359 | <div class="footer-menu-wrapper last-footer-menu"> | ... | ... |
3.94 KB