33 lines
1.7 KiB
PHP
33 lines
1.7 KiB
PHP
@php
|
|
$all_notifications = auth()->user()->notifications;
|
|
$unread_notifications = $all_notifications->where('read_at', null);
|
|
$total_unread = count($unread_notifications);
|
|
@endphp
|
|
<li class="dropdown notifications-menu tw-list-none">
|
|
<a type="button"
|
|
class="dropdown-toggle load_notifications admin-header-btn admin-header-btn--icon"
|
|
data-toggle="dropdown" id="show_unread_notifications" data-loaded="false">
|
|
<span class="tw-sr-only">Notifications</span>
|
|
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"
|
|
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
<path d="M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" />
|
|
<path d="M9 17v1a3 3 0 0 0 6 0v-1" />
|
|
</svg>
|
|
<span class="label label-warning notifications_count">@if (!empty($total_unread)){{$total_unread}}@endif</span>
|
|
</a>
|
|
<ul class="dropdown-menu admin-header-dropdown !tw-p-2 !tw-w-80 tw-absolute !tw-z-50 !tw-mt-2"
|
|
style="height:90vh; overflow-y: scroll; left:0; right:auto;">
|
|
<li>
|
|
<ul class="menu" id="notifications_list" style="list-style:none;padding:0;margin:0;"></ul>
|
|
</li>
|
|
@if (count($all_notifications) > 10)
|
|
<li class="footer load_more_li" style="list-style:none;text-align:center;padding:0.5rem;">
|
|
<a href="#" class="load_more_notifications" style="font-size:0.8125rem;color:#6366f1;">@lang('lang_v1.load_more')</a>
|
|
</li>
|
|
@endif
|
|
</ul>
|
|
</li>
|
|
|
|
<input type="hidden" id="notification_page" value="1">
|