1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00

fix for side bar nav (#2408)

This commit is contained in:
David Bomba 2018-10-05 00:40:40 +10:00 committed by GitHub
parent cd10003d64
commit 3d8742de1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -419,9 +419,9 @@
'expenses', 'expenses',
'vendors', 'vendors',
] as $option) ] as $option)
@if (in_array($option, ['dashboard', 'settings']) @if(!Auth::user()->account->isModuleEnabled(substr($option, 0, -1)))
|| Auth::user()->can('view', substr($option, 0, -1)) {{ '' }}
|| Auth::user()->can('create', substr($option, 0, -1))) @else
@include('partials.navigation_option') @include('partials.navigation_option')
@endif @endif
@endforeach @endforeach

View File

@ -10,6 +10,8 @@
href="{{ url('/reports/calendar') }}"> href="{{ url('/reports/calendar') }}">
<i class="fa fa-calendar" style="width:20px"></i> <i class="fa fa-calendar" style="width:20px"></i>
</a> </a>
@elseif ($option == 'dashboard')
@elseif (Auth::user()->can('create', $option) || Auth::user()->can('create', substr($option, 0, -1))) @elseif (Auth::user()->can('create', $option) || Auth::user()->can('create', substr($option, 0, -1)))
<a type="button" class="btn btn-primary btn-sm pull-right" <a type="button" class="btn btn-primary btn-sm pull-right"
href="{{ url("/{$option}/create") }}"> href="{{ url("/{$option}/create") }}">