Skip to content

Commit

Permalink
Merge pull request #573 from nasirkhan/dev
Browse files Browse the repository at this point in the history
Log viewer update, layout update
  • Loading branch information
nasirkhan committed Apr 21, 2024
2 parents 7d7f7c8 + 4c9d6e1 commit 502ef59
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 37 deletions.
2 changes: 1 addition & 1 deletion resources/views/backend/roles/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
class="text-muted">{{ __($module_action) }}</small>

<x-slot name="toolbar">
<x-backend.buttons.return-back />
<x-backend.buttons.return-back :small=true />
</x-slot>
</x-backend.section-header>

Expand Down
4 changes: 2 additions & 2 deletions resources/views/backend/roles/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
class="text-muted">{{ __($module_action) }}</small>

<x-slot name="toolbar">
<x-backend.buttons.return-back />
<x-backend.buttons.return-back :small=true />
<x-buttons.show class="ms-1" title="{{ __('Show') }} {{ ucwords(Str::singular($module_name)) }}"
route='{!! route("backend.$module_name.show", $$module_name_singular) !!}' />
route='{!! route("backend.$module_name.show", $$module_name_singular) !!}' :small=true />
</x-slot>
</x-backend.section-header>

Expand Down
8 changes: 4 additions & 4 deletions resources/views/backend/roles/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class="text-muted">{{ __($module_action) }}</small>

<x-slot name="toolbar">
<x-backend.buttons.create title="{{ __('Create') }} {{ ucwords(Str::singular($module_name)) }}"
route='{{ route("backend.$module_name.create") }}' />
route='{{ route("backend.$module_name.create") }}' :small=true />
</x-slot>
</x-backend.section-header>

Expand Down Expand Up @@ -70,14 +70,14 @@ class="text-muted">{{ __($module_action) }}</small>
</div>
<div class="card-footer">
<div class="row">
<div class="col-7">
<div class="col-12 col-sm-7">
<div class="float-left">
{!! $$module_name->total() !!} {{ __('labels.backend.total') }}
</div>
</div>
<div class="col-5">
<div class="col-12 col-sm-5">
<div class="float-end">
{!! $$module_name->render() !!}
{{ $$module_name->links('pagination::bootstrap-5') }}
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/backend/roles/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
class="text-muted">{{ __($module_title) }}</small>

<x-slot name="toolbar">
<x-backend.buttons.return-back />
<x-backend.buttons.return-back :small=true />
<x-backend.buttons.edit class="ms-1"
title="{{ __('Edit') }} {{ ucwords(Str::singular($module_name)) }}"
route='{!! route("backend.$module_name.edit", $$module_name_singular) !!}' />
route='{!! route("backend.$module_name.edit", $$module_name_singular) !!}' :small=true />
</x-slot>
</x-backend.section-header>

Expand Down
5 changes: 1 addition & 4 deletions resources/views/backend/users/changePassword.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@
<i class="{{ $module_icon }}"></i> {{ __($module_title) }} <small
class="text-muted">{{ __($module_action) }}</small>

<x-slot name="subtitle">
@lang(':module_name Management Dashboard', ['module_name' => Str::title($module_name)])
</x-slot>
<x-slot name="toolbar">
<x-backend.buttons.return-back />
<x-backend.buttons.return-back :small=true />
</x-slot>
</x-backend.section-header>

Expand Down
2 changes: 1 addition & 1 deletion resources/views/backend/users/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
class="text-muted">{{ __($module_action) }}</small>

<x-slot name="toolbar">
<x-backend.buttons.return-back />
<x-backend.buttons.return-back :small=true />
</x-slot>
</x-backend.section-header>

Expand Down
18 changes: 9 additions & 9 deletions resources/views/backend/users/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@section('breadcrumbs')
<x-backend.breadcrumbs>
<x-backend.breadcrumb-item route='{{ route("backend.$module_name.index") }}' icon='{{ $module_icon }}'>
{{ $$module_name_singular->name }} - {{ $$module_name_singular->username }}
{{ $$module_name_singular->name }}
</x-backend.breadcrumb-item>

<x-backend.breadcrumb-item type="active">{{ __($module_title) }}
Expand Down Expand Up @@ -51,7 +51,7 @@
<div class="form-group">
<?php
$field_name = 'first_name';
$field_lable = label_case($field_name);
$field_lable = __(label_case($field_name));
$field_placeholder = $field_lable;
$required = 'required';
?>
Expand All @@ -63,7 +63,7 @@
<div class="form-group">
<?php
$field_name = 'last_name';
$field_lable = label_case($field_name);
$field_lable = __(label_case($field_name));
$field_placeholder = $field_lable;
$required = 'required';
?>
Expand All @@ -75,7 +75,7 @@
<div class="form-group">
<?php
$field_name = 'email';
$field_lable = label_case($field_name);
$field_lable = __(label_case($field_name));
$field_placeholder = $field_lable;
$required = 'required';
?>
Expand All @@ -87,7 +87,7 @@
<div class="form-group">
<?php
$field_name = 'mobile';
$field_lable = label_case($field_name);
$field_lable = __(label_case($field_name));
$field_placeholder = $field_lable;
$required = '';
?>
Expand All @@ -102,7 +102,7 @@
<div class="form-group">
<?php
$field_name = 'gender';
$field_lable = label_case($field_name);
$field_lable = __(label_case($field_name));
$field_placeholder = '-- Select an option --';
$required = '';
$select_options = [
Expand All @@ -120,7 +120,7 @@
<div class="form-group">
<?php
$field_name = 'date_of_birth';
$field_lable = label_case($field_name);
$field_lable = __(label_case($field_name));
$field_placeholder = $field_lable;
$required = '';
?>
Expand All @@ -135,7 +135,7 @@
<div class="form-group">
<?php
$field_name = 'address';
$field_lable = label_case($field_name);
$field_lable = __(label_case($field_name));
$field_placeholder = $field_lable;
$required = '';
?>
Expand All @@ -147,7 +147,7 @@
<div class="form-group">
<?php
$field_name = 'bio';
$field_lable = label_case($field_name);
$field_lable = __(label_case($field_name));
$field_placeholder = $field_lable;
$required = '';
?>
Expand Down
7 changes: 2 additions & 5 deletions resources/views/backend/users/index_datatable.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
<x-backend.section-header>
<i class="{{ $module_icon }}"></i> {{ __($module_title) }} <small class="text-muted">{{ __($module_action) }}</small>

<x-slot name="subtitle">
@lang(":module_name Management Dashboard", ['module_name'=>Str::title($module_name)])
</x-slot>
<x-slot name="toolbar">
<x-backend.buttons.create route='{{ route("backend.$module_name.create") }}' title="{{__('Create')}} {{ ucwords(Str::singular($module_name)) }}" />
<x-backend.buttons.create route='{{ route("backend.$module_name.create") }}' title="{{__('Create')}} {{ ucwords(Str::singular($module_name)) }}" :small=true />

<div class="btn-group">
<button class="btn btn-secondary dropdown-toggle" type="button" data-coreui-toggle="dropdown" aria-expanded="false">
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-coreui-toggle="dropdown" aria-expanded="false">
<i class="fas fa-cog"></i>
</button>
<ul class="dropdown-menu">
Expand Down
11 changes: 5 additions & 6 deletions resources/views/backend/users/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@section('breadcrumbs')
<x-backend.breadcrumbs>
<x-backend.breadcrumb-item route='{{ route("backend.$module_name.index") }}' icon='{{ $module_icon }}'>
{{ $$module_name_singular->name }} - {{ $$module_name_singular->username }}
{{ $$module_name_singular->name }}
</x-backend.breadcrumb-item>

<x-backend.breadcrumb-item type="active">{{ __($module_title) }}
Expand All @@ -20,16 +20,15 @@
<x-backend.layouts.show :data="$user">

<x-backend.section-header>
<i class="{{ $module_icon }}"></i> {{ $$module_name_singular->name }} -
{{ $$module_name_singular->username }} <small class="text-muted">{{ __($module_title) }}
<i class="{{ $module_icon }}"></i> {{ $$module_name_singular->name }} <small class="text-muted">{{ __($module_title) }}
{{ __($module_action) }}</small>

<x-slot name="toolbar">
<x-backend.buttons.return-back />
<a class="btn btn-primary m-1" data-toggle="tooltip" href="{{ route('backend.users.index') }}"
<x-backend.buttons.return-back :small=true />
<a class="btn btn-primary btn-sm m-1" data-toggle="tooltip" href="{{ route('backend.users.index') }}"
title="List"><i class="fas fa-list"></i> List</a>
<x-buttons.edit title="{{ __('Edit') }} {{ ucwords(Str::singular($module_name)) }}"
route='{!! route("backend.$module_name.edit", $$module_name_singular) !!}' />
route='{!! route("backend.$module_name.edit", $$module_name_singular) !!}' :small=true />
</x-slot>
</x-backend.section-header>

Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/backend/buttons/save.blade.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@props(["small"=>""])
{{ html()->submit($text = icon('fas fa-save fa-fw')." Save")->class('btn btn-success m-1'.(($small=='true')? ' btn-sm' : '')) }}
{{ html()->submit($text = icon('fa-solid fa-floppy-disk fa-fw')." ".__('Save'))->class('btn btn-success m-1'.(($small=='true')? ' btn-sm' : '')) }}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class="badge badge-level-{{ $key }}">{{ $value }}</span>
</table>
</div>

{{ $rows->render() }}
{{ $rows->links('pagination::bootstrap-5') }}
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class="list-group-item list-group-item-action d-flex justify-content-between ali
</div>
</div>

{!! $entries->appends(compact('query'))->render() !!}
{!! $entries->appends(compact('query'))->render('pagination::bootstrap-5') !!}
</div>
</div>
</div>
Expand Down

0 comments on commit 502ef59

Please sign in to comment.