Skip to content

Commit

Permalink
Notification widgets styling..
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Jun 27, 2021
1 parent 1e18b19 commit 72e664a
Show file tree
Hide file tree
Showing 6 changed files with 630 additions and 586 deletions.
2 changes: 1 addition & 1 deletion resources/views/common/notifications/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

@stack('bills_recurring')

<livewire:common.notifications.recurring type="bill" text-title="widgets.recurring_bills" />
<livewire:common.notifications.recurring type="bill" text-title="notifications.recurring_bills" />

@stack('bills_reminder')

Expand Down
150 changes: 80 additions & 70 deletions resources/views/livewire/common/notifications/exports.blade.php
Original file line number Diff line number Diff line change
@@ -1,83 +1,95 @@
@if ($notifications->total())
<div class="card" id="exports">
<div class="card-header">
<div class="accordion" id="exports">
<div class="card">
<div class="card-header" id="heading-exports" data-toggle="collapse" data-target="#collapse-exports"
aria-expanded="false" aria-controls="collapse-exports">
<div class="row align-items-center">
<div class="col-8">
<h5 class="h3 mb-0">{{ trans('general.export') }}</h5>
</div>
<div class="col-12">
<h3 class="mb-0">
{{ trans('general.export') }}

<div class="col-4 text-right">
<button type="button" class="btn btn-outline-success rounded-circle btn-icon-only btn-sm mr-2"
data-toggle="tooltip"
data-placement="right"
title="{{ trans('notifications.mark_read_all') }}"
wire:click="markReadAll()"
>
<span class="btn-inner--icon"><i class="fas fa-check-double"></i></span>
</button>
@if ($notifications->total())
<button type="button" class="btn btn-outline-success rounded-circle btn-icon-only btn-sm ml-2"
data-toggle="tooltip"
data-placement="right"
title="{{ trans('notifications.mark_read_all') }}"
wire:click="markReadAll()"
>
<span class="btn-inner--icon"><i class="fas fa-check-double"></i></span>
</button>
@endif
</h3>
</div>
</div>
</div>

<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-export">
<tbody>
@foreach ($notifications as $notification)
<tr class="row align-items-center border-top-1">
<td class="col-xs-8 col-sm-10 col-md-10 col-lg-11 col-xl-11 text-left text-wrap">
@if (empty($notification->message))
{!! trans('notifications.messages.export', [
'type' => $notification->translation,
'file_name' => $notification->file_name,
'url' => $notification->download_url
]) !!}
@else
{!! $notification->message !!}
@endif
</td>
<div id="collapse-exports" class="collapse" aria-labelledby="heading-exports" data-parent="#exports">
@if ($notifications->total())
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-export">
<tbody>
@foreach ($notifications as $notification)
<tr class="row align-items-center border-top-1">
<td class="col-xs-8 col-sm-10 col-md-10 col-lg-11 col-xl-11 text-left text-wrap">
@if (empty($notification->message))
{!! trans('notifications.messages.export', [
'type' => $notification->translation,
'file_name' => $notification->file_name,
'url' => $notification->download_url
]) !!}
@else
{!! $notification->message !!}
@endif
</td>

<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">
<button type="button" class="btn btn-outline-success rounded-circle btn-icon-only btn-sm"
data-toggle="tooltip"
data-placement="right"
title="{{ trans('notifications.mark_read') }}"
wire:click="markRead('{{ $notification->notification_id }}')"
>
<span class="btn-inner--icon"><i class="fa fa-check"></i></span>
</button>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">
<button type="button" class="btn btn-outline-success rounded-circle btn-icon-only btn-sm"
data-toggle="tooltip"
data-placement="right"
title="{{ trans('notifications.mark_read') }}"
wire:click="markRead('{{ $notification->notification_id }}')"
>
<span class="btn-inner--icon"><i class="fa fa-check"></i></span>
</button>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>

@if ($notifications->total() > 5)
<div class="card-footer table-action">
<div class="row">
@if ($notifications->count())
<div class="col-xs-12 col-sm-5 d-flex align-items-center">
{!! Form::select('limit', ['5' => '5'], request('limit', 5), ['class' => 'disabled form-control form-control-sm d-inline-block w-auto d-none d-md-block', 'disabled' => 'disabled']) !!}
<span class="table-text d-none d-lg-block ml-2">
{{ trans('pagination.page') }}
{{ trans('pagination.showing', ['first' => $notifications->firstItem(), 'last' => $notifications->lastItem(), 'total' => $notifications->total()]) }}
</span>
</div>
@if ($notifications->total() > 5)
<div class="card-footer table-action">
<div class="row">
@if ($notifications->count())
<div class="col-xs-12 col-sm-5 d-flex align-items-center">
{!! Form::select('limit', ['5' => '5'], request('limit', 5), ['class' => 'disabled form-control form-control-sm d-inline-block w-auto d-none d-md-block', 'disabled' => 'disabled']) !!}
<span class="table-text d-none d-lg-block ml-2">
{{ trans('pagination.page') }}
{{ trans('pagination.showing', ['first' => $notifications->firstItem(), 'last' => $notifications->lastItem(), 'total' => $notifications->total()]) }}
</span>
</div>

<div class="col-xs-12 col-sm-7 pagination-xs">
<nav class="float-right">
{!! $notifications->withPath(request()->url())->withQueryString()->links() !!}
</nav>
<div class="col-xs-12 col-sm-7 pagination-xs">
<nav class="float-right">
{!! $notifications->withPath(request()->url())->withQueryString()->links() !!}
</nav>
</div>
@else
<div class="col-xs-12 col-sm-12" id="datatable-basic_info" role="status" aria-live="polite">
<small>{{ trans('general.no_records') }}</small>
</div>
@endif
</div>
@else
<div class="col-xs-12 col-sm-12" id="datatable-basic_info" role="status" aria-live="polite">
<small>{{ trans('general.no_records') }}</small>
</div>
@endif
</div>
@endif
@else
<div class="col-xs-12 col-sm-12 mt-4 mb-4 text-center">
<small>{{ trans('general.no_records') }}</small>
</div>
</div>
@endif
@endif
</div>
</div>
</div>

@push('body_js')
<script type="text/javascript">
Expand All @@ -98,5 +110,3 @@
});
</script>
@endpush

@endif

0 comments on commit 72e664a

Please sign in to comment.