phpvms/resources/views/admin/pireps/actions.blade.php

40 lines
1.9 KiB
PHP
Raw Normal View History

2018-01-04 10:39:24 +08:00
<table class="">
<tr>
<td>
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::REJECTED)
{{ Form::open(['url' => route('admin.pirep.status', ['id' => $pirep->id]),
2018-01-04 10:39:24 +08:00
'method' => 'post',
'name' => 'accept_'.$pirep->id,
'id' => $pirep->id.'_accept',
'pirep_id' => $pirep->id,
'new_status' => PirepState::ACCEPTED,
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
{{ Form::button('Accept', ['type' => 'submit', 'class' => 'btn btn-success']) }}
{{ Form::close() }}
2018-01-04 10:39:24 +08:00
@endif
</td>
<td>&nbsp;</td>
<td>
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::ACCEPTED)
{{ Form::open(['url' => route('admin.pirep.status', ['id' => $pirep->id]),
2018-01-04 10:39:24 +08:00
'method' => 'post',
'name' => 'reject_'.$pirep->id,
'id' => $pirep->id.'_reject',
'pirep_id' => $pirep->id,
'new_status' => PirepState::REJECTED,
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
{{ Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-danger']) }}
{{ Form::close() }}
2018-01-04 10:39:24 +08:00
@endif
</td>
<td>&nbsp;</td>
<td>
2018-03-25 22:38:58 +08:00
<form action="{{ route('admin.pireps.edit', [$pirep->id]) }}">
<button type="submit"
class='btn btn-info'>
<i class="fas fa-pencil-alt"></i>&nbsp;&nbsp;Edit</button>
</form>
2018-01-04 10:39:24 +08:00
</td>
</tr>
</table>