Added edit link on shift type page

This commit is contained in:
Igor Scheller 2023-12-26 16:31:21 +01:00 committed by msquare
parent b62d4b4dce
commit 8140ebd1cc
2 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,8 @@
{% if is_index|default(false) %}
{{ m.button(m.icon('plus-lg'), url('/admin/shifttypes/edit'), 'secondary') }}
{% elseif has_permission_to('shifttypes') and is_view|default(false) %}
{{ m.button(m.icon('pencil'), url('admin/shifttypes/edit/' ~ shifttype.id), null, 'sm', __('form.edit')) }}
{% endif %}
</h1>

View File

@ -70,7 +70,7 @@ class ShiftTypesController extends BaseController
return $this->response->withView(
'admin/shifttypes/view',
['shifttype' => $shiftType]
['shifttype' => $shiftType, 'is_view' => true]
);
}