Skip to content

Commit

Permalink
Updating the naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Dec 17, 2016
1 parent 71c1d9d commit f78dbba
Show file tree
Hide file tree
Showing 52 changed files with 214 additions and 270 deletions.
5 changes: 2 additions & 3 deletions config/foundation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
*/
'route' => [
'prefix' => 'dashboard',
'as' => 'foundation::',

'middleware' => ['web', 'auth', 'admin'],
'namespace' => 'Arcanesoft\\Foundation\\Http\\Controllers',
],

/* ------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -52,7 +51,7 @@
'log-viewer' => [
'per-page' => 30,

'filter-route' => 'foundation::system.log-viewer.logs.filter',
'filter-route' => 'admin::foundation.system.log-viewer.logs.filter',
],

/* ------------------------------------------------------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions config/sidebar/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
return [
'title' => 'Dashboard',
'name' => 'foundation-home',
'route' => 'foundation::home',
'route' => 'admin::foundation.home',
'icon' => 'fa fa-fw fa-dashboard',
'roles' => [Role::ADMINISTRATOR, Role::MODERATOR],
'permissions' => [],
'permissions' => [
//
],
];
6 changes: 3 additions & 3 deletions config/sidebar/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
[
'title' => 'Generals',
'name' => 'foundation-settings-generals',
'route' => 'foundation::settings.index',
'route' => 'admin::foundation.settings.index',
'icon' => 'fa fa-fw fa-wrench',
'roles' => [Role::ADMINISTRATOR],
'permissions' => [],
],
// [
// 'title' => 'Modules',
// 'name' => 'foundation-settings-modules',
// 'route' => 'auth::foundation.dashboard',
// 'name' => 'foundation-modules',
// 'route' => 'admin::foundation.modules.index',
// 'icon' => 'fa fa-fw fa-cubes',
// 'roles' => [Role::ADMINISTRATOR],
// 'permissions' => [],
Expand Down
6 changes: 3 additions & 3 deletions config/sidebar/system.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[
'title' => 'Informations',
'name' => 'foundation-system-information',
'route' => 'foundation::system.information.index',
'route' => 'admin::foundation.system.information.index',
'icon' => 'fa fa-fw fa-info-circle',
'roles' => [Role::ADMINISTRATOR],
'permissions' => [
Expand All @@ -23,15 +23,15 @@
[
'title' => 'LogViewer',
'name' => 'foundation-system-logviewer',
'route' => 'foundation::system.log-viewer.index',
'route' => 'admin::foundation.system.log-viewer.index',
'icon' => 'fa fa-fw fa-book',
'roles' => [Role::ADMINISTRATOR, 'logviewer-manager'],
'permissions' => [LogViewerPolicy::PERMISSION_DASHBOARD],
],
[
'title' => 'Routes',
'name' => 'foundation-system-routes',
'route' => 'foundation::system.routes.index',
'route' => 'admin::foundation.system.routes.index',
'icon' => 'fa fa-fw fa-map-signs',
'roles' => [Role::ADMINISTRATOR],
'permissions' => [],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@section('content')
<div class="row">
<div class="col-md-4">
@include('foundation::system.information._includes.application')
@include('foundation::admin.system.information._includes.application')
</div>
<div class="col-md-4">
@include(Arcanesoft\Foundation\ViewComposers\System\ServerRequirementsComposer::VIEW_NAME)
Expand All @@ -15,7 +15,7 @@
</div>
</div>

@include('foundation::system.information._includes.php-env')
@include('foundation::admin.system.information._includes.php-env')
@endsection

@section('modals')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ trans('foundation::pagination.pages', ['current' => $entries->currentPage(), 'last' => $entries->lastPage()]) }}
</span>
</li>
@include('foundation::system.log-viewer._includes.timeline-pagination', compact('entries'))
@include('foundation::admin.system.log-viewer._includes.timeline-pagination', compact('entries'))
@endif

@foreach($entries as $key => $entry)
Expand Down Expand Up @@ -34,7 +34,7 @@
@endforeach

@if ($entries->hasPages())
@include('foundation::system.log-viewer._includes.timeline-pagination', compact('entries'))
@include('foundation::admin.system.log-viewer._includes.timeline-pagination', compact('entries'))
@endif

<li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<li>
<div class="timeline-item">
<div class="timeline-body text-center">
{!! $entries->render('foundation::_partials.pagination.small') !!}
{!! $entries->render('foundation::admin_partials.pagination.small') !!}
</div>
</div>
</li>
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<h3 class="box-title"><i class="fa fa-fw fa-dashboard"></i> Dashboard</h3>
<div class="box-tools">
<div class="btn-group">
<a href="{{ route('foundation::system.log-viewer.index') }}" class="btn btn-sm btn-default {{ route_is('foundation::system.log-viewer.index') ? 'active' : '' }}">
<a href="{{ route('admin::foundation.system.log-viewer.index') }}" class="btn btn-sm btn-default {{ route_is('admin::foundation.system.log-viewer.index') ? 'active' : '' }}">
<i class="fa fa-fw fa-dashboard"></i> Dashboard
</a>
<a href="{{ route('foundation::system.log-viewer.logs.list') }}" class="btn btn-sm btn-default {{ route_is('foundation::system.log-viewer.logs.list') ? 'active' : '' }}">
<a href="{{ route('admin::foundation.system.log-viewer.logs.list') }}" class="btn btn-sm btn-default {{ route_is('admin::foundation.system.log-viewer.logs.list') ? 'active' : '' }}">
<i class="fa fa-fw fa-list"></i> Logs list
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<h3 class="box-title"><i class="fa fa-fw fa-list"></i> Logs List</h3>
<div class="box-tools">
<div class="btn-group">
<a href="{{ route('foundation::system.log-viewer.index') }}" class="btn btn-sm btn-default {{ route_is('foundation::system.log-viewer.index') ? 'active' : '' }}">
<a href="{{ route('admin::foundation.system.log-viewer.index') }}" class="btn btn-sm btn-default {{ route_is('admin::foundation.system.log-viewer.index') ? 'active' : '' }}">
<i class="fa fa-fw fa-dashboard"></i> Dashboard
</a>
<a href="{{ route('foundation::system.log-viewer.logs.list') }}" class="btn btn-sm btn-default {{ route_is('foundation::system.log-viewer.logs.list') ? 'active' : '' }}">
<a href="{{ route('admin::foundation.system.log-viewer.logs.list') }}" class="btn btn-sm btn-default {{ route_is('admin::foundation.system.log-viewer.logs.list') ? 'active' : '' }}">
<i class="fa fa-fw fa-list"></i> Logs list
</a>
</div>
Expand Down Expand Up @@ -52,10 +52,10 @@
</td>
@endforeach
<td class="text-right">
<a href="{{ route('foundation::system.log-viewer.logs.show', [$date]) }}" class="btn btn-xs btn-info" data-toggle="tooltip" data-original-title="Show">
<a href="{{ route('admin::foundation.system.log-viewer.logs.show', [$date]) }}" class="btn btn-xs btn-info" data-toggle="tooltip" data-original-title="Show">
<i class="fa fa-search"></i>
</a>
<a href="{{ route('foundation::system.log-viewer.logs.download', [$date]) }}" class="btn btn-xs btn-success" data-toggle="tooltip" data-original-title="Download">
<a href="{{ route('admin::foundation.system.log-viewer.logs.download', [$date]) }}" class="btn btn-xs btn-success" data-toggle="tooltip" data-original-title="Download">
<i class="fa fa-download"></i>
</a>
<a href="#delete-log-modal" class="btn btn-xs btn-danger" data-log-date="{{ $date }}" data-toggle="tooltip" data-original-title="Delete">
Expand Down Expand Up @@ -88,7 +88,7 @@
@section('modals')
<div id="delete-log-modal" class="modal fade">
<div class="modal-dialog">
{{ Form::open(['route' => 'foundation::system.log-viewer.logs.delete', 'method' => 'DELETE', 'id' => 'delete-log-form', 'autocomplete' => 'off']) }}
{{ Form::open(['route' => 'admin::foundation.system.log-viewer.logs.delete', 'method' => 'DELETE', 'id' => 'delete-log-form', 'autocomplete' => 'off']) }}
{{ Form::hidden('date') }}
<div class="modal-content">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</div>
</div>
<div class="box-footer text-right">
<a href="{{ route('foundation::system.log-viewer.logs.download', [$log->date]) }}" class="btn btn-sm btn-success">
<a href="{{ route('admin::foundation.system.log-viewer.logs.download', [$log->date]) }}" class="btn btn-sm btn-success">
<i class="fa fa-fw fa-download"></i> DOWNLOAD
</a>
<a href="#deleteLogModal" data-toggle="modal" class="btn btn-sm btn-danger">
Expand All @@ -56,18 +56,18 @@
</div>
<div class="row">
<div class="col-md-3">
@include('foundation::system.log-viewer._includes.menu')
@include('admin::foundation.system.log-viewer._includes.menu')
</div>
<div class="col-md-9">
@include('foundation::system.log-viewer._includes.timeline-entries', compact('entries'))
@include('admin::foundation.system.log-viewer._includes.timeline-entries', compact('entries'))
</div>
</div>
@endsection

@section('modals')
<div id="deleteLogModal" class="modal fade">
<div class="modal-dialog">
{{ Form::open(['route' => 'foundation::system.log-viewer.logs.delete', 'method' => 'DELETE', 'id' => 'deleteLogForm', 'autocomplete' => 'off']) }}
{{ Form::open(['route' => 'admin::foundation.system.log-viewer.logs.delete', 'method' => 'DELETE', 'id' => 'deleteLogForm', 'autocomplete' => 'off']) }}
{{ Form::hidden('date', $log->date) }}
<div class="modal-content">
<div class="modal-header">
Expand Down Expand Up @@ -109,7 +109,7 @@
success: function(data) {
if (data.status === 'success') {
$deleteLogModal.modal('hide');
location.replace("{{ route('foundation::system.log-viewer.logs.list') }}");
location.replace("{{ route('admin::foundation.system.log-viewer.logs.list') }}");
}
else {
alert('AJAX ERROR ! Check the console !');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php namespace Arcanesoft\Foundation\Http\Controllers;
<?php namespace Arcanesoft\Foundation\Http\Controllers\Admin;

use Arcanesoft\Core\Bases\FoundationController;

/**
* Class Controller
*
* @package Arcanesoft\Foundation\Http\Controllers
* @package Arcanesoft\Foundation\Http\Controllers\Admin
* @author ARCANEDEV <[email protected]>
*/
abstract class Controller extends FoundationController
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php namespace Arcanesoft\Foundation\Http\Controllers;
<?php namespace Arcanesoft\Foundation\Http\Controllers\Admin;

/**
* Class DashboardController
*
* @package Arcanesoft\Foundation\Http\Controllers
* @package Arcanesoft\Foundation\Http\Controllers\Admin
* @author ARCANEDEV <[email protected]>
*/
class DashboardController extends Controller
Expand All @@ -20,10 +20,9 @@ class DashboardController extends Controller
public function index()
{
$this->setCurrentPage('foundation-home');
$title = 'Dashboard';
$this->setTitle($title);
$this->setTitle($title = 'Dashboard');
$this->addBreadcrumb($title);

return $this->view('dashboard');
return $this->view('admin.dashboard');
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php namespace Arcanesoft\Foundation\Http\Controllers;
<?php namespace Arcanesoft\Foundation\Http\Controllers\Admin;

use Arcanesoft\Core\Traits\Notifyable;

/**
* Class SettingsController
*
* @package Arcanesoft\Foundation\Http\Controllers
* @package Arcanesoft\Foundation\Http\Controllers\Admin
* @author ARCANEDEV <[email protected]>
*/
class SettingsController extends Controller
Expand All @@ -28,7 +28,7 @@ public function __construct()
parent::__construct();

$this->setCurrentPage('foundation-settings');
$this->addBreadcrumbRoute('Settings', 'foundation::settings.index');
$this->addBreadcrumbRoute('Settings', 'admin::foundation.settings.index');
}

/* ------------------------------------------------------------------------------------------------
Expand All @@ -38,10 +38,10 @@ public function __construct()
public function index()
{
$title = 'Generals';
$this->setTitle('Settings - ' . $title);
$this->setTitle("Settings - {$title}");
$this->addBreadcrumb($title);
$this->setCurrentPage('foundation-settings-generals');

return $this->view('settings.index');
return $this->view('admin.settings.index');
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php namespace Arcanesoft\Foundation\Http\Controllers\System;
<?php namespace Arcanesoft\Foundation\Http\Controllers\Admin\System;

use Arcanesoft\Foundation\Http\Controllers\Controller as BaseController;
use Arcanesoft\Foundation\Http\Controllers\Admin\Controller as BaseController;

/**
* Class Controller
*
* @package Arcanesoft\Foundation\Http\Controllers\System
* @package Arcanesoft\Foundation\Http\Controllers\Admin\System
* @author ARCANEDEV <[email protected]>
*/
abstract class Controller extends BaseController
Expand All @@ -21,6 +21,6 @@ public function __construct()
{
parent::__construct();

$this->addBreadcrumbRoute('System', 'foundation::system.information.index');
$this->addBreadcrumbRoute('System', 'admin::foundation.system.information.index');
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php namespace Arcanesoft\Foundation\Http\Controllers\System;
<?php namespace Arcanesoft\Foundation\Http\Controllers\Admin\System;

/**
* Class InformationController
*
* @package Arcanesoft\Foundation\Http\Controllers\System
* @package Arcanesoft\Foundation\Http\Controllers\Admin\System
* @author ARCANEDEV <[email protected]>
*/
class InformationController extends Controller
Expand All @@ -20,7 +20,7 @@ public function __construct()
parent::__construct();

$this->setCurrentPage('foundation-system-information');
$this->addBreadcrumbRoute('Information', 'foundation::system.information.index');
$this->addBreadcrumbRoute('Information', 'admin::foundation.system.information.index');
}

/* ------------------------------------------------------------------------------------------------
Expand All @@ -31,6 +31,6 @@ public function index()
{
$this->setTitle('System information');

return $this->view('system.information.index');
return $this->view('admin.system.information.index');
}
}
Loading

0 comments on commit f78dbba

Please sign in to comment.