Skip to content

Commit

Permalink
responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
pratiksh404 committed Jan 4, 2022
1 parent 460ca92 commit e725c0b
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 59 deletions.
4 changes: 2 additions & 2 deletions resources/views/admin/layouts/components/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class="sr-only">Loading...</span></div><i class="close-search" data-feather="x">
<div class="header-logo-wrapper col-auto p-0">
<div class="logo-wrapper">
<a href="{{ route('dashboard') }}">
<img class="img-fluid" src="{{ logo() }}" alt="Logo">
<img class="img-fluid" src="{{ logo() }}" alt="Logo" width="50">
</a>
</div>
<div class="toggle-sidebar"><i class="status_toggle middle sidebar-toggle" data-feather="align-center"></i>
Expand Down Expand Up @@ -267,7 +267,7 @@ class="pull-right">6 hr</span></p>
data-feather="maximize"></i></a></li>
@endif
@if (config('adminetic.profile', true))
<li class="profile-nav onhover-dropdown p-0 me-0">
<li class="onhover-dropdown p-0 me-0">
<div class="media profile-media">
<img class="b-r-10 img-fluid" src="{{ getProfilePlaceholder() }}"
alt="{{ auth()->user()->name }}" height="37" width="37">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/admin/layouts/components/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
</i></div>
</div>
<div class="logo-icon-wrapper"><a href="{{ route('dashboard') }}"><img class="img-fluid" src="{{ favicon() }}"
alt="favicon"></a>
width="50" alt="favicon"></a>
</div>
<nav class="sidebar-main">
<div class="left-arrow" id="left-arrow"><i data-feather="arrow-left"></i></div>
<div id="sidebar-menu">
<ul class="sidebar-links" id="simple-bar">
<li class="back-btn"><a href="{{ route('dashboard') }}"><img class="img-fluid" src="{{ favicon() }}"
alt="favicon"></a>
width="50" alt="favicon"></a>
<div class="mobile-back text-end"><span>Back</span><i class="fa fa-angle-right ps-2"
aria-hidden="true"></i></div>
</li>
Expand Down
85 changes: 41 additions & 44 deletions resources/views/components/action.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
<div class="form-group text-center">
<!-- Outline Round Floating button -->
@if (auth()->user()->can('update', $model) &&
$edit)
<a href="{{ adminEditRoute(trim($route), $model->id) }}"
class="btn btn-warning btn-air-warning btn-sm p-2" title="Edit" data-toggle="tooltip"
placement="top"><i class="fa fa-edit"></i></a>
$edit)
<a href="{{ adminEditRoute(trim($route), $model->id) }}" class="btn btn-warning btn-air-warning btn-sm p-2"
title="Edit" data-toggle="tooltip" placement="top"><i class="fa fa-edit"></i></a>
@endif
@if (auth()->user()->can('view', $model) &&
$show)
<a href="{{ adminShowRoute(trim($route), $model->id) }}" class="btn btn-info btn-air-info btn-sm p-2"
data-toggle="tooltip" placement="top" title="Show"><i class="fa fa-eye"></i></a>
$show)
<a href="{{ adminShowRoute(trim($route), $model->id) }}" class="btn btn-info btn-air-info btn-sm p-2"
data-toggle="tooltip" placement="top" title="Show"><i class="fa fa-eye"></i></a>
@endif
@if (auth()->user()->can('delete', $model) &&
$delete)
<button class="btn btn-danger btn-air-danger btn-sm p-2" type="button" data-bs-toggle="modal"
data-original-title="Delete" data-bs-target="#delete-{{ $model->id }}"><i
class="fa fa-trash"></i></button>
$delete)
<button class="btn btn-danger btn-air-danger btn-sm p-2" type="button" data-bs-toggle="modal"
data-original-title="Delete" data-bs-target="#delete-{{ $model->id }}"><i
class="fa fa-trash"></i></button>
@endif
{{ $buttons ?? '' }}
</div>
Expand All @@ -28,44 +27,42 @@ class="fa fa-trash"></i></button>
<div class="modal-dialog" role="document">
<div class="modal-content">
@if ($deleteCondition)
<div class="modal-header bg-secondary">
<h5 class="modal-title" id="exampleModalLabel">This item cannot be deleted !</h5>
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>
This item cannot be deleted yet, since it may have dependencies on other
module
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-air-danger" data-dismiss="modal">Close</button>
</div>
<div class="modal-header bg-secondary">
<h5 class="modal-title" id="exampleModalLabel">This item cannot be deleted !</h5>
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>
This item cannot be deleted yet, since it may have dependencies on other
module
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-air-danger" data-dismiss="modal">Close</button>
</div>

@else
<div class="modal-header bg-danger">
<h5 class="modal-title" id="exampleModalLabel">Delete Item !</h5>
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Are you sure you want to delete this item.
<br>
<form action="{{ adminDeleteRoute(trim($route), $model->id) }}" method="POST">
@method('DELETE')
@csrf
<div class="modal-header bg-danger">
<h5 class="modal-title" id="exampleModalLabel">Delete Item !</h5>
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Are you sure you want to delete this item.
<br>
<form action="{{ adminDeleteRoute(trim($route), $model->id) }}" method="POST">
@method('DELETE')
@csrf

</div>
<div class="modal-footer">
<button class="close btn grey btn-danger btn-air-danger" type="button" data-bs-dismiss="modal"
aria-label="Close">Close </button>
</div>
<div class="modal-footer">
<button class="close btn grey btn-danger btn-air-danger" type="button" data-bs-dismiss="modal"
aria-label="Close">Close </button>

<button type="submit" class="btn btn-danger btn-air-danger">Yes Delete It !</button>
</div>
</form>
<button type="submit" class="btn btn-danger btn-air-danger">Yes Delete It !</button>
</div>
</form>
@endif

</div>
</div>
</div>

</div>
</div>
2 changes: 1 addition & 1 deletion resources/views/components/create-page.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@endif
<br>
<div class="row">
{{ $description ?? 'Create ' . $name . ' in the system' }} <br>
{{ $description ?? ''}} <br>
<span class="text-secondary">The field labels marked with * are required
input fields.</span>
<div class="d-flex justify-content-end">
Expand Down
18 changes: 13 additions & 5 deletions resources/views/components/edit-page.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,22 @@
@endif
<br>
<div class="row">
{{ $description ?? 'Edit ' . $name . ' in the system' }} <br>
{{ $description ?? ''}} <br>
<span class="text-secondary">The field labels marked with * are required
input fields.</span>
<div class="d-flex justify-content-end">
<a href="{{ adminCreateRoute($route, $model->id) }}"><button
class="btn btn-success btn-air-success">Create</button></a>
<a href="{{ adminRedirectRoute($route) }}"><button
class="btn btn-primary btn-air-primary">Back</button></a>
<div class="btn-group" role="group">
<button class="btn btn-primary btn-air-primary dropdown-toggle show" id="actions" type="button"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Actions</button>
<div class="dropdown-menu show" aria-labelledby="actions"
style="position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate3d(0px, 37px, 0px);"
data-popper-placement="bottom-start">
<a class="dropdown-item" href="{{ adminRedirectRoute($route) }}" title="All {{$name}}">All
{{$name}}</a>
<a class="dropdown-item" href="{{ adminCreateRoute($route, $model->id) }}"
title="Create new {{$name}}">Create new {{$name}}</a>
</div>
</div>
@isset($buttons)
{{ $buttons }}
@endisset
Expand Down
7 changes: 5 additions & 2 deletions resources/views/components/index-page.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
@endif
<br>
<div class="row">
{{ $description ?? 'List of all ' . $plural_name . ' in the system' }}
<div class="mb-3">
{{ $description ?? 'List of all ' . $plural_name . ' in the system' }}
</div>
<div class="d-flex justify-content-end">
<a href="{{ adminCreateRoute($route) }}" class="btn btn-primary">Create
{{ $name ?? '' }}</a>
Expand All @@ -43,7 +45,8 @@
</div>
</div>
</div>
<div class="card-body {{ config('adminetic.card_body', '') . ' ' . ($bg_color ?? '') }}">
<div class="card-body {{ config('adminetic.card_body', '') . ' ' . ($bg_color ?? '') }}"
style="overflow-x:auto">
{{ $content ?? '' }}
</div>
</div>
Expand Down
19 changes: 16 additions & 3 deletions resources/views/components/show-page.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,22 @@
<br>
<div class="row">
<div class="d-flex justify-content-end">
<a href="{{ adminRedirectRoute($route) }}" class="btn btn-primary btn-sm btn-air-primary">Back</a>
<a href="{{ adminEditRoute($route, $model->id) }}" class="btn btn-info btn-sm btn-air-info">Edit</a>
<a href="{{ adminCreateRoute($route) }}" class="btn btn-success btn-sm btn-air-success">Create</a>
<div class="btn-group" role="group">
<button class="btn btn-primary btn-air-primary dropdown-toggle show" id="actions" type="button"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Actions</button>
<div class="dropdown-menu show" aria-labelledby="actions"
style="position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate3d(0px, 37px, 0px);"
data-popper-placement="bottom-start">
<a class="dropdown-item" href="{{ adminRedirectRoute($route) }}" title="All {{$name}}">All
{{$name}}</a>
<a class="dropdown-item" href="{{ adminEditRoute($route, $model->id) }}"
title="Edit {{$name}}">Edit
{{$name}}</a>
<a class="dropdown-item" href="{{ adminCreateRoute($route, $model->id) }}"
title="Create new {{$name}}">Create
new {{$name}}</a>
</div>
</div>
@isset($buttons)
{{ $buttons }}
@endisset
Expand Down

0 comments on commit e725c0b

Please sign in to comment.