Merge branch 'master' of github.com:akaunting/akaunting
This commit is contained in:
commit
67a6415f77
@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Http\ViewComposers;
|
||||
|
||||
use Auth;
|
||||
use App\Utilities\Updater;
|
||||
use Illuminate\View\View;
|
||||
use App\Traits\Modules as RemoteModules;
|
||||
@ -21,11 +20,11 @@ class Header
|
||||
{
|
||||
$user = user();
|
||||
|
||||
$bills = [];
|
||||
$invoices = [];
|
||||
$notifications = 0;
|
||||
$invoices = $bills = [];
|
||||
$updates = $notifications = 0;
|
||||
$company = null;
|
||||
|
||||
if (!empty($user)) {
|
||||
// Get customer company
|
||||
if ($user->can('read-client-portal')) {
|
||||
$company = (object) [
|
||||
@ -56,6 +55,7 @@ class Header
|
||||
$updates = count(Updater::all());
|
||||
|
||||
$this->loadSuggestions();
|
||||
}
|
||||
|
||||
$view->with([
|
||||
'user' => $user,
|
||||
|
@ -19,7 +19,7 @@ class Notifications
|
||||
public function compose(View $view)
|
||||
{
|
||||
// No need to add suggestions in console
|
||||
if (app()->runningInConsole() || !env('APP_INSTALLED')) {
|
||||
if (app()->runningInConsole() || !env('APP_INSTALLED') || !user()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ class Suggestions
|
||||
|
||||
$modules = false;
|
||||
|
||||
if (user()) {
|
||||
$path = Route::current()->uri();
|
||||
|
||||
if ($path) {
|
||||
@ -35,7 +36,7 @@ class Suggestions
|
||||
$suggestion_modules = $suggestions->modules;
|
||||
|
||||
foreach ($suggestion_modules as $key => $module) {
|
||||
$installed = Module::where('company_id', '=', session('company_id'))->where('alias', '=', $module->alias)->first();
|
||||
$installed = Module::where('company_id', session('company_id'))->where('alias', $module->alias)->first();
|
||||
|
||||
if ($installed) {
|
||||
unset($suggestion_modules[$key]);
|
||||
@ -49,6 +50,7 @@ class Suggestions
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$view->with(['suggestion_modules' => $modules]);
|
||||
}
|
||||
|
@ -152,8 +152,8 @@ return [
|
||||
'subunit' => 100,
|
||||
'symbol' => 'лв',
|
||||
'symbol_first' => false,
|
||||
'decimal_mark' => '.',
|
||||
'thousands_separator' => ',',
|
||||
'decimal_mark' => ',',
|
||||
'thousands_separator' => ' ',
|
||||
],
|
||||
|
||||
'BHD' => [
|
||||
|
@ -2,23 +2,22 @@
|
||||
|
||||
return [
|
||||
|
||||
'forbidden_access' => 'Forbidden Access',
|
||||
'error_page' => 'Error Page',
|
||||
'page_not_found' => 'Page Not Found',
|
||||
|
||||
'body' => [
|
||||
'forbidden_access' => 'Oops! Forbidden Access.',
|
||||
'error_page' => 'Oops! Something went wrong.',
|
||||
'page_not_found' => 'Oops! Page not found.',
|
||||
'title' => [
|
||||
'403' => 'Oops! Forbidden Access',
|
||||
'404' => 'Oops! Page not found',
|
||||
'500' => 'Oops! Something went wrong',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'forbidden_access' => 'You can not access this page.
|
||||
Meanwhile, you may <a href=":link">return to dashboard</a>.',
|
||||
'error_page' => 'We will work on fixing that right away.
|
||||
Meanwhile, you may <a href=":link">return to dashboard</a>.',
|
||||
'page_not_found' => 'We could not find the page you were looking for.
|
||||
Meanwhile, you may <a href=":link">return to dashboard</a>.',
|
||||
'header' => [
|
||||
'403' => '403 Forbidden',
|
||||
'404' => '404 Not Found',
|
||||
'500' => '500 Internal Server Error',
|
||||
],
|
||||
|
||||
'message' => [
|
||||
'403' => 'You can not access this page.',
|
||||
'404' => 'We could not find the page you were looking for.',
|
||||
'500' => 'We will work on fixing that right away.',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -1,16 +1,16 @@
|
||||
@extends('layouts.admin')
|
||||
@extends('layouts.error')
|
||||
|
||||
@section('title', trans('errors.forbidden_access'))
|
||||
@section('title', trans('errors.title.403'))
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="mb-0 text-warning">403 Forbidden</h2>
|
||||
<h2 class="mb-0 text-danger"><i class="fa fa-exclamation-triangle text-danger"></i> {{ trans('errors.header.403') }}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h3><i class="fa fa-exclamation-triangle text-danger"></i> {{ trans('errors.body.forbidden_access') }}</h3>
|
||||
<p>{{ trans('errors.message.403') }}</p>
|
||||
|
||||
<p>{!! trans('errors.messages.forbidden_access', ['link' => url('/') ]) !!}</p>
|
||||
<a href="{{ url('/') }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> {{ trans('general.go_to', ['name' => trans('general.dashboard')]) }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
@ -1,16 +1,16 @@
|
||||
@extends('layouts.admin')
|
||||
@extends('layouts.error')
|
||||
|
||||
@section('title', trans('errors.page_not_found'))
|
||||
@section('title', trans('errors.title.404'))
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="mb-0 text-yellow">404 Not Found</h2>
|
||||
<h2 class="mb-0 text-warning"><i class="fa fa-exclamation-triangle text-warning"></i> {{ trans('errors.header.404') }}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h3><i class="fa fa-exclamation-triangle text-yellow"></i> {{ trans('errors.body.page_not_found') }}</h3>
|
||||
<p>{{ trans('errors.message.404') }}</p>
|
||||
|
||||
<p>{!! trans('errors.messages.page_not_found', ['link' => url('/')]) !!}</p>
|
||||
<a href="{{ url('/') }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> {{ trans('general.go_to', ['name' => trans('general.dashboard')]) }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
@ -1,16 +1,17 @@
|
||||
@extends('layouts.admin')
|
||||
@extends('layouts.error')
|
||||
|
||||
@section('title', trans('errors.error_page'))
|
||||
@section('title', trans('errors.title.500'))
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="mb-0 text-danger">500 Internal Server Error</h2>
|
||||
<h2 class="mb-0 text-danger"><i class="fa fa-exclamation-triangle text-danger"></i> {{ trans('errors.header.500') }}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h3><i class="fa fa-exclamation-triangle text-danger"></i> {{ trans('errors.body.error_page') }}</h3>
|
||||
<p>{{ trans('errors.message.500') }}</p>
|
||||
|
||||
<p>{!! trans('errors.messages.error_page', ['link' => url('/') ]) !!}</p>
|
||||
<a href="{{ url('/') }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> {{ trans('general.go_to', ['name' => trans('general.dashboard')]) }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
@include('partials.admin.head')
|
||||
|
||||
<body class="g-sidenav-show g-sidenav-pinned">
|
||||
|
||||
@stack('body_start')
|
||||
|
||||
@include('partials.admin.menu')
|
||||
@ -31,7 +30,6 @@
|
||||
@stack('body_end')
|
||||
|
||||
@include('partials.admin.scripts')
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -3,7 +3,6 @@
|
||||
@include('partials.auth.head')
|
||||
|
||||
<body class="login-page">
|
||||
|
||||
@stack('body_start')
|
||||
|
||||
<div class="main-content">
|
||||
@ -65,7 +64,6 @@
|
||||
@stack('body_end')
|
||||
|
||||
@include('partials.auth.scripts')
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
31
resources/views/layouts/error.blade.php
Normal file
31
resources/views/layouts/error.blade.php
Normal file
@ -0,0 +1,31 @@
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
@include('partials.admin.head')
|
||||
|
||||
<body class="g-sidenav-show g-sidenav-pinned">
|
||||
@stack('body_start')
|
||||
|
||||
<div class="main-content" id="panel">
|
||||
|
||||
<div id="main-body">
|
||||
|
||||
@include('partials.admin.header')
|
||||
|
||||
<div class="container-fluid content-layout mt--6">
|
||||
|
||||
@include('partials.admin.content')
|
||||
|
||||
@include('partials.admin.footer')
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@stack('body_end')
|
||||
|
||||
@include('partials.admin.scripts')
|
||||
</body>
|
||||
|
||||
</html>
|
@ -3,7 +3,6 @@
|
||||
@include('partials.modules.head')
|
||||
|
||||
<body class="g-sidenav-show g-sidenav-pinned">
|
||||
|
||||
@stack('body_start')
|
||||
|
||||
@include('partials.admin.menu')
|
||||
@ -31,7 +30,6 @@
|
||||
@stack('body_end')
|
||||
|
||||
@include('partials.admin.scripts')
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -3,7 +3,6 @@
|
||||
@include('partials.portal.head')
|
||||
|
||||
<body class="g-sidenav-show g-sidenav-pinned">
|
||||
|
||||
@stack('body_start')
|
||||
|
||||
@include('partials.portal.menu')
|
||||
@ -31,7 +30,6 @@
|
||||
@stack('body_end')
|
||||
|
||||
@include('partials.portal.scripts')
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -9,13 +9,11 @@
|
||||
</style>
|
||||
|
||||
<body onload="window.print();">
|
||||
|
||||
@stack('body_start')
|
||||
|
||||
@yield('content')
|
||||
|
||||
@stack('body_end')
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -2,7 +2,6 @@
|
||||
@include('partials.signed.head')
|
||||
|
||||
<body>
|
||||
|
||||
@stack('body_start')
|
||||
|
||||
<div class="container-fluid content-layout mt-4">
|
||||
@ -14,7 +13,6 @@
|
||||
</div>
|
||||
|
||||
@stack('body_end')
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -4,7 +4,6 @@
|
||||
<body class="wizard-page">
|
||||
|
||||
<div class="container mt--5">
|
||||
|
||||
@stack('body_start')
|
||||
|
||||
<div id="app">
|
||||
@ -14,11 +13,9 @@
|
||||
</div>
|
||||
|
||||
@stack('body_end')
|
||||
|
||||
</div>
|
||||
|
||||
@include('partials.wizard.scripts')
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<nav class="navbar navbar-top navbar-expand navbar-dark border-bottom">
|
||||
<div class="container-fluid">
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
@if (user()->can('read-common-search'))
|
||||
@permission('read-common-search')
|
||||
<form class="navbar-search navbar-search-light form-inline mb-0" id="navbar-search-main" autocomplete="off">
|
||||
<div id="global-search" class="form-group mb-0 mr-sm-3">
|
||||
<div class="input-group input-group-alternative input-group-merge">
|
||||
@ -34,7 +34,7 @@
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
@endpermission
|
||||
|
||||
<ul class="navbar-nav align-items-center ml-md-auto">
|
||||
<li class="nav-item d-xl-none">
|
||||
@ -53,7 +53,7 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@if (user()->can(['create-incomes-invoices', 'create-incomes-revenues', 'create-incomes-customers', 'create-expenses-bills', 'create-expenses-payments', 'create-expenses-vendors']))
|
||||
@permission(['create-incomes-invoices', 'create-incomes-revenues', 'create-incomes-customers', 'create-expenses-bills', 'create-expenses-payments', 'create-expenses-vendors'])
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-plus"></i>
|
||||
|
Loading…
x
Reference in New Issue
Block a user