Commit ea7bb14d3305f0f580a762a73fa4f76ea4518ecf

Authored by Андрей Ларионов
1 parent b504585f88

Коммит добавления картинки - у работника

Showing 1 changed file with 2 additions and 2 deletions Inline Diff

resources/views/workers/messages.blade.php
1 @extends('layout.frontend', ['title' => 'Мои сообщения - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Мои сообщения - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 4
5 @endsection 5 @endsection
6 6
7 @section('content') 7 @section('content')
8 <section class="cabinet"> 8 <section class="cabinet">
9 <div class="container"> 9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs"> 10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li> 11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li> 12 <li><b>Личный кабинет</b></li>
13 </ul> 13 </ul>
14 <div class="cabinet__wrapper"> 14 <div class="cabinet__wrapper">
15 <div class="cabinet__side"> 15 <div class="cabinet__side">
16 <div class="cabinet__side-toper"> 16 <div class="cabinet__side-toper">
17 @include('workers.emblema') 17 @include('workers.emblema')
18 18
19 </div> 19 </div>
20 20
21 @include('workers.menu', ['item' => 2]) 21 @include('workers.menu', ['item' => 2])
22 </div> 22 </div>
23 <div class="cabinet__body"> 23 <div class="cabinet__body">
24 <div class="cabinet__body-item"> 24 <div class="cabinet__body-item">
25 <h2 class="title cabinet__title">Сообщения</h2> 25 <h2 class="title cabinet__title">Сообщения</h2>
26 </div> 26 </div>
27 <div class="cabinet__body-item"> 27 <div class="cabinet__body-item">
28 <div class="cabinet__filters"> 28 <div class="cabinet__filters">
29 <div class="cabinet__filters-item"> 29 <div class="cabinet__filters-item">
30 <div class="cabinet__filters-buttons"> 30 <div class="cabinet__filters-buttons">
31 <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a> 31 <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a>
32 <a href="{{ route('worker.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a> 32 <a href="{{ route('worker.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a>
33 </div> 33 </div>
34 </div> 34 </div>
35 <!--<div class="cabinet__filters-item"> 35 <!--<div class="cabinet__filters-item">
36 <div class="select"> 36 <div class="select">
37 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 37 <select class="js-select2" id="sort_ajax" name="sort_ajax">
38 <option value="default">Сортировка (по умолчанию)</option> 38 <option value="default">Сортировка (по умолчанию)</option>
39 <option value="name (asc)">По имени (возрастание)</option> 39 <option value="name (asc)">По имени (возрастание)</option>
40 <option value="name (desc)">По имени (убывание)</option> 40 <option value="name (desc)">По имени (убывание)</option>
41 <option value="created_at (asc)">По дате (возрастание)</option> 41 <option value="created_at (asc)">По дате (возрастание)</option>
42 <option value="created_at (desc)">По дате (убывание)</option> 42 <option value="created_at (desc)">По дате (убывание)</option>
43 </select> 43 </select>
44 </div> 44 </div>
45 </div>--> 45 </div>-->
46 </div> 46 </div>
47 @if ($messages->count()) 47 @if ($messages->count())
48 @foreach($messages as $it) 48 @foreach($messages as $it)
49 <div class="messages__item"> 49 <div class="messages__item">
50 <div class="messages__item-info"> 50 <div class="messages__item-info">
51 <!--<pre> print_r(asset(Storage::url($it->user_from->employers[0]->logo))) }}</pre>--> 51 <!--<pre> print_r(asset(Storage::url($it->user_from->employers[0]->logo))) }}</pre>-->
52 <div class="messages__item-photo"> 52 <div class="messages__item-photo">
53 <svg> 53 <svg>
54 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 54 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
55 </svg> 55 </svg>
56 <!-- Комментарий: обновление структуры вывода картинок, все корректное --> 56 <!-- Комментарий: обновление структуры вывода картинок, все корректное -->
57 @if ($type_message == 'input') 57 @if ($type_message == 'input')
58 @if (isset($it->user_from->is_worker)) 58 @if (isset($it->user_from->is_worker))
59 @if ($it->user_from->is_worker) 59 @if ($it->user_from->is_worker)
60 @if (isset($it->user_from->workers[0]->photo)) 60 @if (isset($it->user_from->workers[0]->photo))
61 <img src="{{ asset(Storage::url($it->user_to->workers[0]->photo)) }}" alt=""> 61 <img src="{{ asset(Storage::url($it->user_to->workers[0]->photo)) }}" alt="">
62 @else 62 @else
63 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 63 <img src="{{ asset('images/default_man.jpg') }}" alt="">
64 @endif 64 @endif
65 @else 65 @else
66 @if (isset($it->user_from->employers[0]->logo)) 66 @if (isset($it->user_from->employers[0]->logo))
67 <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> 67 <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt="">
68 @else 68 @else
69 <img src=" asset('images/default_man.jpg') }}" alt=""> 69 <img src="{{ asset('images/default_man.jpg') }}" alt="">
70 @endif 70 @endif
71 @endif 71 @endif
72 @else 72 @else
73 <img src=" asset('images/default_man.jpg') }}" alt=""> 73 <img src="{{ asset('images/default_man.jpg') }}" alt="">
74 @endif 74 @endif
75 @endif 75 @endif
76 76
77 <!-- Обновление исходящих сообщений - фотографии компании и работника --> 77 <!-- Обновление исходящих сообщений - фотографии компании и работника -->
78 <!-- коммит 2 --> 78 <!-- коммит 2 -->
79 @if ($type_message == 'output') 79 @if ($type_message == 'output')
80 @if (isset($it->user_from->is_worker)) 80 @if (isset($it->user_from->is_worker))
81 @if ($it->user_from->is_worker) 81 @if ($it->user_from->is_worker)
82 @if (isset($it->user_from->workers[0]->photo)) 82 @if (isset($it->user_from->workers[0]->photo))
83 <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> 83 <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt="">
84 @else 84 @else
85 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 85 <img src="{{ asset('images/default_man.jpg') }}" alt="">
86 @endif 86 @endif
87 @else 87 @else
88 @if (isset($it->user_from->employers->logo)) 88 @if (isset($it->user_from->employers->logo))
89 <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> 89 <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt="">
90 @else 90 @else
91 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 91 <img src="{{ asset('images/default_man.jpg') }}" alt="">
92 @endif 92 @endif
93 @endif 93 @endif
94 @else 94 @else
95 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 95 <img src="{{ asset('images/default_man.jpg') }}" alt="">
96 @endif 96 @endif
97 @endif 97 @endif
98 </div> 98 </div>
99 <div class="messages__item-text"> 99 <div class="messages__item-text">
100 <div> 100 <div>
101 От: @if (isset($it->user_from)) 101 От: @if (isset($it->user_from))
102 @if ($it->user_from->id !== $user_id) 102 @if ($it->user_from->id !== $user_id)
103 <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline"> 103 <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline">
104 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} 104 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }}
105 </a> 105 </a>
106 @else 106 @else
107 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} 107 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }}
108 @endif 108 @endif
109 @else 109 @else
110 Удаленный пользователь 110 Удаленный пользователь
111 @endif 111 @endif
112 <br> 112 <br>
113 К: @if (isset($it->user_to)) 113 К: @if (isset($it->user_to))
114 @if ($it->user_to->id !== $user_id) 114 @if ($it->user_to->id !== $user_id)
115 <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline"> 115 <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline">
116 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} 116 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }}
117 </a> 117 </a>
118 @else 118 @else
119 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} 119 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }}
120 @endif 120 @endif
121 @else 121 @else
122 Удаленный пользователь 122 Удаленный пользователь
123 @endif 123 @endif
124 </div> 124 </div>
125 <div><span>Вакансия:</span>@if (isset($it->vacancies)) {{ $it->vacancies->name." (".($it->vacancies->id).")" }} @else Удалена @endif</div> 125 <div><span>Вакансия:</span>@if (isset($it->vacancies)) {{ $it->vacancies->name." (".($it->vacancies->id).")" }} @else Удалена @endif</div>
126 <div><span>Текст:</span>{{ $it->text }}</div> 126 <div><span>Текст:</span>{{ $it->text }}</div>
127 </div> 127 </div>
128 </div> 128 </div>
129 <div class="messages__item-date">{{ $it->created_at }}</div> 129 <div class="messages__item-date">{{ $it->created_at }}</div>
130 </div> 130 </div>
131 @endforeach 131 @endforeach
132 132
133 <div style="margin-top: 20px"> 133 <div style="margin-top: 20px">
134 {{ $messages->onEachSide(0)->appends($_GET)->links('paginate') }} 134 {{ $messages->onEachSide(0)->appends($_GET)->links('paginate') }}
135 </div><!-- конец --> 135 </div><!-- конец -->
136 136
137 @else 137 @else
138 <div class="notify"> 138 <div class="notify">
139 <svg> 139 <svg>
140 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> 140 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use>
141 </svg> 141 </svg>
142 <span>Сообщений не найдено</span> 142 <span>Сообщений не найдено</span>
143 </div> 143 </div>
144 @endif 144 @endif
145 </div> 145 </div>
146 </div> 146 </div>
147 </div> 147 </div>
148 </div> 148 </div>
149 </section> 149 </section>
150 </div> 150 </div>
151 <div> 151 <div>
152 @endsection 152 @endsection
153 153