@php
$disabled = "";
if($model->published)
{
$icon = "far fa-check-square fa-2x";
$style = "";
$value = "1";
}
else
{
$icon = "far fa-square fa-2x";
$style = "";
$value = "0";
}
@endphp
@if(( Auth::user()->can('Administrator')
|| Auth::user()->can(__("permissions.:model edit (all)", ['model' => ucfirst($url)]))
|| ((Auth::user()->id == $model['user_id']) && Auth::user()->can(__("permissions.:model edit (own)", ['model' => ucfirst($url)]))))
&& !isset($model->deleted_at))
@else
@php
$disabled = "disabled";
@endphp
@endif
@if($model->published)
@endif
@if($model->publication('stadtanzeiger')->isPublished())
@endif
@if($model->type != 'dienst')
@if($model->publication('facebook')->isPublished())
@endif
@if($model->publication('twitter')->isPublished())
@endif
@endif
@include('inc.forms.button', [
'url' => '#',
'style' => $style,
'class' => 'publish-modal '.$disabled,
'icon' => $icon,
'label' => '',
'value' => $value,
'data' => [
'id' => $model->id,
'type' => $model->type
]
])