Skip to content

Commit

Permalink
sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
jjanampa committed Jul 15, 2021
1 parent db5226b commit 29ae259
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@foreach($pages as $item)
<tr>
<td>{{ $item->id }}</td>
<td>{{ $item->title }}</td><td>{{ $item->content }}</td>
<td>{{ $item->title }}</td><td>{!! $item->content !!}</td>
<td class="text-right">
<a href="{{ route('admin.pages.show' , $item) }}" title="{{ __('View Page') }}"><button class="btn btn-info btn-sm"><i class="fa fa-eye" aria-hidden="true"></i></button></a>
<a href="{{ route('admin.pages.edit' , $item) }}" title="{{ __('Edit Page') }}"><button class="btn btn-primary btn-sm"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></button></a>
Expand Down
10 changes: 5 additions & 5 deletions publish/Admin/Resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<link href="{{ asset('material') }}/css/material-dashboard.css?v=2.1.1" rel="stylesheet" />

<!-- main Styles -->
<link href="{{ asset('css/admin.css') }}" rel="stylesheet">
<link href="{{ asset('static-admin/css/app.css') }}" rel="stylesheet">
@stack('styles')
</head>
<body class="{{ $class ?? '' }}">
Expand All @@ -44,13 +44,13 @@
<script src="{{ asset('material') }}/js/material-dashboard.js?v=2.1.1" type="text/javascript"></script>

<!-- Scripts -->
<script defer src="{{ asset('js/admin.js') }}"></script>
<script defer src="{{ asset('static-admin/js/app.js') }}"></script>
@stack('scripts')
<script>
document.addEventListener("DOMContentLoaded", function(event) {
@foreach (['error', 'warning', 'success', 'info'] as $key)
@if(Session::has($key))
showNotification('{{ $key }}', '{{ Session::get($key) }}')
@foreach (['error', 'warning', 'success', 'info'] as $typeAlert)
@if(session()->has($typeAlert))
showNotification('{{ session()->get($typeAlert) }}', '{{ $typeAlert }}')
@endif
@endforeach
});
Expand Down
4 changes: 2 additions & 2 deletions publish/Admin/Resources/views/layouts/auth.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- CSS Files -->
<link href="{{ asset('material') }}/css/material-dashboard.css?v=2.1.1" rel="stylesheet" />
<!-- main Styles -->
<link href="{{ asset('css/admin.css') }}" rel="stylesheet">
<link href="{{ asset('static-admin/css/app.css') }}" rel="stylesheet">
</head>
<body class="{{ $class ?? '' }}">
<div class="wrapper wrapper-full-page">
Expand All @@ -36,7 +36,7 @@
<script src="{{ asset('material') }}/js/material-dashboard.js?v=2.1.1" type="text/javascript"></script>

<!-- Scripts -->
<script src="{{ asset('js/admin.js') }}"></script>
<script src="{{ asset('static-admin/js/app.js') }}"></script>
@stack('scripts')
</body>
</html>
7 changes: 3 additions & 4 deletions publish/Admin/Resources/views/layouts/partial/nav.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@
<li class="nav-item dropdown">
<a class="nav-link" href="#pablo" id="navbarDropdownProfile" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="material-icons">person</i>
<p class="d-lg-none d-md-block">
{{ __('Account') }}
</p>
<i class="material-icons">person</i>
{{ __('Account') }}

</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownProfile">
<a class="dropdown-item" href="{{ route('admin.profile.edit') }}">{{ __('Profile') }}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
</li>

<li class="nav-item active-pro">
<a class="nav-link" data-toggle="collapse" href="#userManagement" aria-expanded="true">
<a class="nav-link" data-toggle="collapse" href="#configManagement" aria-expanded="true">
<i class="material-icons">settings</i>
<p>{{ __('Settings') }}
<b class="caret"></b>
</p>
</a>
<div class="collapse show" id="userManagement">
<div class="collapse show" id="configManagement">
<ul class="nav">
<li class="nav-item {{ Request::routeIs('admin.settings.*') ? 'active' : '' }}">
<a class="nav-link" href="{{ route('admin.settings.index') }}">
Expand Down
4 changes: 2 additions & 2 deletions publish/Admin/webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require('laravel-mix-merge-manifest');

mix.setPublicPath('../../public').mergeManifest();

mix.js(__dirname + '/Resources/assets/js/app.js', 'js/admin.js')
.sass( __dirname + '/Resources/assets/sass/app.scss', 'css/admin.css');
mix.js(__dirname + '/Resources/assets/js/app.js', 'static-admin/js')
.sass( __dirname + '/Resources/assets/sass/app.scss', 'static-admin/css');

if (mix.inProduction()) {
mix.version();
Expand Down
1 change: 0 additions & 1 deletion publish/public/css/admin.css

This file was deleted.

1 change: 1 addition & 0 deletions publish/public/static-admin/css/app.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion publish/public/js/admin.js → publish/public/static-admin/js/app.js
100755 → 100644

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 9 additions & 12 deletions src/LaravelAdminCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,15 @@ public function handle()

protected function cleanModule()
{
$this->call('module:migrate-reset', ['Admin']);

(new Filesystem)->deleteDirectory($this->getModulePath());
Schema::dropIfExists('admin_permission_role');
Schema::dropIfExists('admin_role_user');
Schema::dropIfExists('admin_roles');
Schema::dropIfExists('admin_permissions');
Schema::dropIfExists('admin_users');
Schema::dropIfExists('pages');
Schema::dropIfExists('settings');
}

/**
Expand All @@ -106,18 +113,8 @@ protected function publishModule()
protected function updateAssets()
{
$this->info("Publishing the assets");
if (!(new Filesystem)->isDirectory(public_path('css')))
{
(new Filesystem)->makeDirectory(public_path('css'));
}
if (!(new Filesystem)->isDirectory(public_path('js')))
{
(new Filesystem)->makeDirectory(public_path('js'));
}

static::copyFile('public/css/admin.css', public_path('css/admin.css'));
static::copyFile('public/js/admin.js', public_path('js/admin.js'));
static::copyDirectory('public/material', public_path('material'));
static::copyDirectory('public/static-admin', public_path('static-admin'));
}

protected function migrate()
Expand Down

0 comments on commit 29ae259

Please sign in to comment.