Merge branch 'master' of github.com:akaunting/akaunting
This commit is contained in:
commit
04592a8d23
@ -13,6 +13,17 @@ use Illuminate\Support\Facades\Cache;
|
|||||||
|
|
||||||
class Reports extends Controller
|
class Reports extends Controller
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Instantiate a new controller instance.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
// Add CRUD permission check
|
||||||
|
$this->middleware('permission:create-common-reports')->only('create', 'store', 'duplicate', 'import');
|
||||||
|
$this->middleware('permission:read-common-reports')->only('index', 'show', 'export');
|
||||||
|
$this->middleware('permission:update-common-reports')->only('edit', 'update', 'enable', 'disable');
|
||||||
|
$this->middleware('permission:delete-common-reports')->only('destroy');
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*
|
*
|
||||||
|
@ -19,13 +19,16 @@
|
|||||||
@foreach($reports as $report)
|
@foreach($reports as $report)
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="card card-stats">
|
<div class="card card-stats">
|
||||||
|
@canany(['create-common-reports', 'update-common-reports', 'delete-common-reports'])
|
||||||
<span>
|
<span>
|
||||||
<div class="dropdown card-action-button">
|
<div class="dropdown card-action-button">
|
||||||
<a class="btn btn-sm items-align-center py-2 mr-0 shadow-none--hover" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<a class="btn btn-sm items-align-center py-2 mr-0 shadow-none--hover" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="fa fa-ellipsis-v text-primary"></i>
|
<i class="fa fa-ellipsis-v text-primary"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||||
<a class="dropdown-item" href="{{ route('reports.edit', $report->id) }}">{{ trans('general.edit') }}</a>
|
@can('update-common-reports')
|
||||||
|
<a class="dropdown-item" href="{{ route('reports.edit', $report->id) }}">{{ trans('general.edit') }}</a>
|
||||||
|
@endcan
|
||||||
@can('create-common-reports')
|
@can('create-common-reports')
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="{{ route('reports.duplicate', $report->id) }}">{{ trans('general.duplicate') }}</a>
|
<a class="dropdown-item" href="{{ route('reports.duplicate', $report->id) }}">{{ trans('general.duplicate') }}</a>
|
||||||
@ -37,6 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
|
@endcanany
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user