demo/resources/views/partials/button.blade.php
2023-03-23 18:50:47 +01:00

25 lines
877 B
PHP

@if(!isset($permission))
@if(isset($type))
<button{!! $type !== 'submit' ? ' type="' . $type . '"' : '' !!} class="btn btn-{{ $context }} text-uppercase">
<span class="fas fa-fw fa-{{ $icon }}"></span> @lang($label)
</button>
@else
<a class="btn btn-{{ $context }} text-uppercase" href="{{ route($href, $parameters) }}">
<span class="fas fa-fw fa-{{ $icon }}"></span> @lang($label)
</a>
@endif
@else
@if($currentUser->forumPermissions[$forum->uuid]->getAttribute($permission))
@if(isset($type))
<button{!! $type !== 'submit' ? ' type="' . $type . '"' : '' !!} class="btn btn-{{ $context }} text-uppercase">
<span class="fas fa-fw fa-{{ $icon }}"></span> @lang($label)
</button>
@else
<a class="btn btn-{{ $context }} text-uppercase" href="{{ route($href, $parameters) }}">
<span class="fas fa-fw fa-{{ $icon }}"></span> @lang($label)
</a>
@endif
@endif
@endif