document more actions add action(edit, share, mail)

This commit is contained in:
Cüneyt Şentürk 2021-01-18 14:09:10 +03:00
parent 6408c15c59
commit 725d93ae8b

View File

@ -7,6 +7,18 @@
<div class="dropdown-menu" role="menu"> <div class="dropdown-menu" role="menu">
@stack('button_dropdown_start') @stack('button_dropdown_start')
@if (in_array($document->status, $hideTimelineStatuses))
@stack('edit_button_start')
@if (!$hideButtonEdit)
@can($permissionUpdate)
<a class="dropdown-item" href="{{ route($routeButtonEdit, $document->id) }}">
{{ trans('general.edit') }}
</a>
@endcan
@endif
@stack('edit_button_end')
@endif
@stack('duplicate_button_start') @stack('duplicate_button_start')
@if (!$hideButtonDuplicate) @if (!$hideButtonDuplicate)
@can($permissionCreate) @can($permissionCreate)
@ -18,9 +30,9 @@
@stack('duplicate_button_end') @stack('duplicate_button_end')
@stack('button_dropdown_divider_1_start') @stack('button_dropdown_divider_1_start')
@if (!$hideButtonGroupDivider1) @if (!$hideButtonGroupDivider1)
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
@endif @endif
@stack('button_dropdown_divider_1_end') @stack('button_dropdown_divider_1_end')
@if (!$hideButtonPrint) @if (!$hideButtonPrint)
@ -41,12 +53,40 @@
@endif @endif
@endif @endif
@stack('button_pdf_start') @if (in_array($document->status, $hideTimelineStatuses))
@if (!$hideButtonPdf) @stack('share_button_start')
<a class="dropdown-item" href="{{ route($routeButtonPdf, $document->id) }}"> @if (!$hideButtonShare)
{{ trans('general.download_pdf') }} @if ($document->status != 'cancelled')
</a> <a class="dropdown-item" href="{{ $signedUrl }}" target="_blank">
{{ trans('general.share') }}
</a>
@endif
@endif
@stack('share_button_end')
@stack('edit_button_start')
@if (!$hideButtonEmail)
@if($document->contact_email)
<a class="dropdown-item" href="{{ route($routeButtonEmail, $document->id) }}">
{{ trans($textTimelineSendStatusMail) }}
</a>
@else
<el-tooltip content="{{ trans('invoices.messages.email_required') }}" placement="right" effect="danger">
<button type="button" class="dropdown-item" disabled="disabled">
<span class="text-disabled">{{ trans($textTimelineSendStatusMail) }}</span>
</button>
</el-tooltip>
@endif
@endif
@stack('edit_button_end')
@endif @endif
@stack('button_pdf_start')
@if (!$hideButtonPdf)
<a class="dropdown-item" href="{{ route($routeButtonPdf, $document->id) }}">
{{ trans('general.download_pdf') }}
</a>
@endif
@stack('button_pdf_end') @stack('button_pdf_end')
@if (!$hideButtonCancel) @if (!$hideButtonCancel)
@ -70,9 +110,9 @@
@endif @endif
@stack('button_dropdown_divider_2_start') @stack('button_dropdown_divider_2_start')
@if (!$hideButtonGroupDivider2) @if (!$hideButtonGroupDivider2)
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
@endif @endif
@stack('button_dropdown_divider_2_end') @stack('button_dropdown_divider_2_end')
@if (!$hideButtonCustomize) @if (!$hideButtonCustomize)
@ -86,23 +126,23 @@
@endif @endif
@stack('button_dropdown_divider_3_start') @stack('button_dropdown_divider_3_start')
@if (!$hideButtonGroupDivider3) @if (!$hideButtonGroupDivider3)
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
@endif @endif
@stack('button_dropdown_divider_3_end') @stack('button_dropdown_divider_3_end')
@stack('delete_button_start') @stack('delete_button_start')
@if (!$hideButtonDelete) @if (!$hideButtonDelete)
@can($permissionDelete) @can($permissionDelete)
@if ($checkButtonReconciled) @if ($checkButtonReconciled)
@if (!$document->reconciled) @if (!$document->reconciled)
{!! Form::deleteLink($document, $routeButtonDelete, $textDeleteModal, 'document_number') !!}
@endif
@else
{!! Form::deleteLink($document, $routeButtonDelete, $textDeleteModal, 'document_number') !!} {!! Form::deleteLink($document, $routeButtonDelete, $textDeleteModal, 'document_number') !!}
@endif @endif
@else @endcan
{!! Form::deleteLink($document, $routeButtonDelete, $textDeleteModal, 'document_number') !!} @endif
@endif
@endcan
@endif
@stack('delete_button_end') @stack('delete_button_end')
@stack('button_dropdown_end') @stack('button_dropdown_end')
</div> </div>