mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 11:04:41 -04:00
Merge pull request #1904 from Dagolin/#1873-only-allow-admin-create-expense-category
Hide `New Expense Category` if user has no right to create
This commit is contained in:
commit
058e3bfd33
@ -90,12 +90,18 @@
|
||||
['label' => trans('texts.new_recurring_expense'), 'url' => url('/recurring_expenses/create')],
|
||||
]
|
||||
)->split() !!}
|
||||
@if (Auth::user()->can('create', ENTITY_EXPENSE_CATEGORY))
|
||||
{!! DropdownButton::normal(trans('texts.categories'))
|
||||
->withAttributes(['class'=>'categoriesDropdown'])
|
||||
->withContents([
|
||||
['label' => trans('texts.new_expense_category'), 'url' => url('/expense_categories/create')],
|
||||
]
|
||||
)->split() !!}
|
||||
@else
|
||||
{!! DropdownButton::normal(trans('texts.categories'))
|
||||
->withAttributes(['class'=>'categoriesDropdown'])
|
||||
->split() !!}
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.recurringDropdown:not(.dropdown-toggle)').click(function(event) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user