Commit 77f5d911ff7fcd7942f9fdd0526eb5d42948d91b
1 parent
2c692f9c05
Exists in
master
and in
1 other branch
Коммит работника - сообщения коммит2
Showing 1 changed file with 1 additions and 0 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 ($it->user_from->is_worker) | 58 | @if ($it->user_from->is_worker) |
59 | @if (isset($it->user_from->workers[0]->photo)) | 59 | @if (isset($it->user_from->workers[0]->photo)) |
60 | <img src="{{ asset(Storage::url($it->user_to->workers[0]->photo)) }}" alt=""> | 60 | <img src="{{ asset(Storage::url($it->user_to->workers[0]->photo)) }}" alt=""> |
61 | @else | 61 | @else |
62 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> | 62 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
63 | @endif | 63 | @endif |
64 | @else | 64 | @else |
65 | @if (isset($it->user_from->employers[0]->logo)) | 65 | @if (isset($it->user_from->employers[0]->logo)) |
66 | <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | 66 | <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> |
67 | @else | 67 | @else |
68 | <img src=" asset('images/default_man.jpg') }}" alt=""> | 68 | <img src=" asset('images/default_man.jpg') }}" alt=""> |
69 | @endif | 69 | @endif |
70 | @endif | 70 | @endif |
71 | @endif | 71 | @endif |
72 | 72 | ||
73 | <!-- Обновление исходящих сообщений - фотографии компании и работника --> | 73 | <!-- Обновление исходящих сообщений - фотографии компании и работника --> |
74 | <!-- коммит 2 --> | ||
74 | @if ($type_message == 'output') | 75 | @if ($type_message == 'output') |
75 | @if ($it->user_from->is_worker) | 76 | @if ($it->user_from->is_worker) |
76 | @if (isset($it->user_from->workers[0]->photo)) | 77 | @if (isset($it->user_from->workers[0]->photo)) |
77 | <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> | 78 | <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> |
78 | @else | 79 | @else |
79 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> | 80 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
80 | @endif | 81 | @endif |
81 | @else | 82 | @else |
82 | @if (isset($it->user_from->employers->logo)) | 83 | @if (isset($it->user_from->employers->logo)) |
83 | <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> | 84 | <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> |
84 | @else | 85 | @else |
85 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> | 86 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
86 | @endif | 87 | @endif |
87 | @endif | 88 | @endif |
88 | @endif | 89 | @endif |
89 | </div> | 90 | </div> |
90 | <div class="messages__item-text"> | 91 | <div class="messages__item-text"> |
91 | <div> | 92 | <div> |
92 | От: @if (isset($it->user_from)) | 93 | От: @if (isset($it->user_from)) |
93 | @if ($it->user_from->id !== $user_id) | 94 | @if ($it->user_from->id !== $user_id) |
94 | <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline"> | 95 | <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline"> |
95 | {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} | 96 | {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} |
96 | </a> | 97 | </a> |
97 | @else | 98 | @else |
98 | {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} | 99 | {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} |
99 | @endif | 100 | @endif |
100 | @else | 101 | @else |
101 | Удаленный пользователь | 102 | Удаленный пользователь |
102 | @endif | 103 | @endif |
103 | <br> | 104 | <br> |
104 | К: @if (isset($it->user_to)) | 105 | К: @if (isset($it->user_to)) |
105 | @if ($it->user_to->id !== $user_id) | 106 | @if ($it->user_to->id !== $user_id) |
106 | <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline"> | 107 | <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline"> |
107 | {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} | 108 | {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} |
108 | </a> | 109 | </a> |
109 | @else | 110 | @else |
110 | {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} | 111 | {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} |
111 | @endif | 112 | @endif |
112 | @else | 113 | @else |
113 | Удаленный пользователь | 114 | Удаленный пользователь |
114 | @endif | 115 | @endif |
115 | </div> | 116 | </div> |
116 | <div><span>Вакансия:</span>@if (isset($it->vacancies)) {{ $it->vacancies->name." (".($it->vacancies->id).")" }} @else Удалена @endif</div> | 117 | <div><span>Вакансия:</span>@if (isset($it->vacancies)) {{ $it->vacancies->name." (".($it->vacancies->id).")" }} @else Удалена @endif</div> |
117 | <div><span>Текст:</span>{{ $it->text }}</div> | 118 | <div><span>Текст:</span>{{ $it->text }}</div> |
118 | </div> | 119 | </div> |
119 | </div> | 120 | </div> |
120 | <div class="messages__item-date">{{ $it->created_at }}</div> | 121 | <div class="messages__item-date">{{ $it->created_at }}</div> |
121 | </div> | 122 | </div> |
122 | @endforeach | 123 | @endforeach |
123 | 124 | ||
124 | <div style="margin-top: 20px"> | 125 | <div style="margin-top: 20px"> |
125 | {{ $messages->onEachSide(0)->appends($_GET)->links('paginate') }} | 126 | {{ $messages->onEachSide(0)->appends($_GET)->links('paginate') }} |
126 | </div><!-- конец --> | 127 | </div><!-- конец --> |
127 | 128 | ||
128 | @else | 129 | @else |
129 | <div class="notify"> | 130 | <div class="notify"> |
130 | <svg> | 131 | <svg> |
131 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> | 132 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> |
132 | </svg> | 133 | </svg> |
133 | <span>Сообщений не найдено</span> | 134 | <span>Сообщений не найдено</span> |
134 | </div> | 135 | </div> |
135 | @endif | 136 | @endif |
136 | </div> | 137 | </div> |
137 | </div> | 138 | </div> |
138 | </div> | 139 | </div> |
139 | </div> | 140 | </div> |
140 | </section> | 141 | </section> |
141 | </div> | 142 | </div> |
142 | <div> | 143 | <div> |
143 | @endsection | 144 | @endsection |
144 | 145 |