diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php index fe8607d7..3d61c7fc 100644 --- a/includes/controller/angeltypes_controller.php +++ b/includes/controller/angeltypes_controller.php @@ -272,6 +272,7 @@ function angeltype_controller_shiftsFilter(AngelType $angeltype, $days) function angeltypes_list_controller() { $user = auth()->user(); + $admin_angeltypes = auth()->can('admin_angel_types'); if (!auth()->can('angeltypes')) { throw_redirect(url('/')); @@ -282,21 +283,27 @@ function angeltypes_list_controller() $actions = [ button( url('/angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]), - icon('eye') . __('view'), - 'btn-sm' + icon('eye') . ($admin_angeltypes ? '' : __('View')), + 'btn-sm btn-info', + '', + ($admin_angeltypes ? __('View') : '') ), ]; - if (auth()->can('admin_angel_types')) { + if ($admin_angeltypes) { $actions[] = button( url('/angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]), - icon('pencil') . __('edit'), - 'btn-sm' + icon('pencil'), + 'btn-sm', + '', + __('form.edit') ); $actions[] = button( url('/angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype->id]), - icon('trash') . __('delete'), - 'btn-sm' + icon('trash'), + 'btn-sm btn-danger', + '', + __('form.delete') ); } @@ -307,14 +314,18 @@ function angeltypes_list_controller() '/user-angeltypes', ['action' => 'delete', 'user_angeltype_id' => $angeltype->user_angel_type_id] ), - icon('box-arrow-right') . __('leave'), - 'btn-sm' + icon('box-arrow-right') . ($admin_angeltypes ? '' : __('Leave')), + 'btn-sm', + '', + ($admin_angeltypes ? __('Leave') : '') ); } else { $actions[] = button( url('/user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]), - icon('box-arrow-in-right') . __('join'), - 'btn-sm' + icon('box-arrow-in-right') . ($admin_angeltypes ? '' : __('Join')), + 'btn-sm', + '', + ($admin_angeltypes ? __('Join') : '') ); } diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php index 462f1c1a..5ec5eb5c 100644 --- a/includes/controller/shifts_controller.php +++ b/includes/controller/shifts_controller.php @@ -201,7 +201,7 @@ function shift_edit_controller() ); } - $link = button(url('/shifts', ['action' => 'view', 'shift_id' => $shift_id]), icon('chevron-left'), 'btn-sm'); + $link = button(url('/shifts', ['action' => 'view', 'shift_id' => $shift_id]), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title( $link . ' ' . shifts_title(), [ @@ -222,7 +222,7 @@ function shift_edit_controller() ), '

' . __('Needed angels') . '

', $angel_types_spinner, - form_submit('submit', __('form.save')), + form_submit('submit', icon('save') . __('form.save')), ]), ] ); @@ -276,7 +276,7 @@ function shift_delete_controller() throw_redirect(url('/user-shifts')); } - $link = button(url('/shifts', ['action' => 'view', 'shift_id' => $shift_id]), icon('chevron-left'), 'btn-sm'); + $link = button(url('/shifts', ['action' => 'view', 'shift_id' => $shift_id]), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title( $link . ' ' . shifts_title(), [ @@ -288,7 +288,7 @@ function shift_delete_controller() ), true), form([ form_hidden('delete_shift', $shift->id), - form_submit('delete', __('delete')), + form_submit('delete', icon('trash') . __('form.delete'), '', true, 'danger'), ]), ] ); diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php index 48bd5338..6e036c4d 100644 --- a/includes/pages/admin_active.php +++ b/includes/pages/admin_active.php @@ -97,8 +97,8 @@ function admin_active() $msg = success(__('Marked angels.'), true); } else { $set_active = form([ - button(url('/admin-active', ['search' => $search]), '« ' . __('back')), - form_submit('ack', '» ' . __('apply')), + button(url('/admin-active', ['search' => $search]), '« ' . __('general.back')), + form_submit('ack', '» ' . __('Apply')), ], url('/admin-active', ['search' => $search, 'count' => $count, 'set_active' => 1])); } } @@ -236,7 +236,7 @@ function admin_active() $parameters['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('set active'), 'btn-sm', false, 'secondary')], + [form_submit('submit', icon('plus-lg') . __('set active'), 'btn-sm', false, 'secondary')], url('/admin-active', $parameters), false, true @@ -251,7 +251,7 @@ function admin_active() $parametersRemove['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('remove active'), 'btn-sm', false, 'secondary')], + [form_submit('submit', icon('dash-lg') . __('Remove active'), 'btn-sm', false, 'secondary')], url('/admin-active', $parametersRemove), false, true @@ -268,7 +268,7 @@ function admin_active() if ($goodie_enabled) { $actions[] = form( - [form_submit('submit', ($goodie_tshirt ? __('got T-shirt') : __('got goodie')), 'btn-sm', false, 'secondary')], + [form_submit('submit', icon('person') . ($goodie_tshirt ? __('Got T-shirt') : __('Got goodie')), 'btn-sm', false, 'secondary')], url('/admin-active', $parametersShirt), false, true @@ -286,7 +286,7 @@ function admin_active() if ($goodie_enabled) { $actions[] = form( - [form_submit('submit', ($goodie_tshirt ? __('remove T-shirt') : __('remove goodie')), 'btn-sm', false, 'secondary')], + [form_submit('submit', icon('person') . ($goodie_tshirt ? __('Remove T-shirt') : __('Remove goodie')), 'btn-sm', false, 'secondary')], url('/admin-active', $parameters), false, true @@ -295,7 +295,7 @@ function admin_active() } if ($goodie_tshirt) { - $actions[] = button(url('/admin/user/' . $usr->id . '/goodie'), __('form.edit'), 'btn-secondary btn-sm'); + $actions[] = button(url('/admin/user/' . $usr->id . '/goodie'), icon('pencil') . __('form.edit'), 'btn-secondary btn-sm'); } $userData['actions'] = buttons($actions); @@ -328,11 +328,11 @@ function admin_active() form([ form_text('search', __('Search angel:'), $search), form_checkbox('show_all_shifts', __('Show all shifts'), $show_all_shifts), - form_submit('submit', __('form.search')), + form_submit('submit', icon('search') . __('form.search')), ], url('/admin-active')), $set_active == '' ? form([ form_text('count', __('How much angels should be active?'), $count ?: $forced_count), - form_submit('set_active', __('form.preview')), + form_submit('set_active', icon('eye') . __('form.preview'), 'btn-info'), ]) : $set_active, $msg . msg(), table( @@ -350,7 +350,7 @@ function admin_active() ], ($goodie_enabled ? ['tshirt' => ($goodie_tshirt ? __('T-shirt?') : __('Goodie?'))] : []), [ - 'actions' => '', + 'actions' => __('general.actions'), ] ), $matched_users diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php index 2e4bce1a..fa3c877e 100644 --- a/includes/pages/admin_arrive.php +++ b/includes/pages/admin_arrive.php @@ -117,10 +117,15 @@ function admin_arrive() form_hidden('user', $usr->id), form_submit( 'submit', - $usr->state->arrived ? __('reset') : __('user.arrived'), + $usr->state->arrived + ? icon('arrow-counterclockwise') + : icon('house'), 'btn-sm', true, - $usr->state->arrived ? 'secondary' : 'primary' + $usr->state->arrived ? 'secondary' : 'primary', + $usr->state->arrived + ? __('Reset') + : __('user.arrive') ), ]); @@ -201,7 +206,7 @@ function admin_arrive() $msg . msg(), form([ form_text('search', __('form.search'), $search), - form_submit('submit', __('form.search')), + form_submit('submit', icon('search') . __('form.search')), ], url('/admin-arrive')), table([ 'name' => __('general.name'), @@ -209,7 +214,7 @@ function admin_arrive() 'arrived' => __('Arrived?'), 'rendered_arrival_date' => __('Arrival date'), 'rendered_planned_departure_date' => __('Planned departure'), - 'actions' => '', + 'actions' => __('general.actions'), ], $users_matched), div('row', [ div('col-md-4', [ diff --git a/includes/pages/admin_free.php b/includes/pages/admin_free.php index 19f13133..505d6974 100644 --- a/includes/pages/admin_free.php +++ b/includes/pages/admin_free.php @@ -110,7 +110,7 @@ function admin_free() : icon('eye-slash'), 'actions' => auth()->can('admin_user') - ? button(url('/admin-user', ['id' => $usr->id]), icon('pencil') . __('edit'), 'btn-sm') + ? button(url('/admin-user', ['id' => $usr->id]), icon('pencil'), 'btn-sm', '', __('form.edit')) : '', ]; } @@ -121,7 +121,7 @@ function admin_free() div('row', [ form_text('search', __('form.search'), $search, null, null, null, 'col'), form_select('angeltype', __('Angeltype'), $angel_types, $angelType, '', 'col'), - form_submit('submit', __('form.search')), + form_submit('submit', icon('search') . __('form.search')), ]), ]), ]), diff --git a/includes/pages/admin_groups.php b/includes/pages/admin_groups.php index 7086ebf2..c8539274 100644 --- a/includes/pages/admin_groups.php +++ b/includes/pages/admin_groups.php @@ -42,7 +42,10 @@ function admin_groups() '/admin-groups', ['action' => 'edit', 'id' => $group->id] ), - icon('pencil') . __('edit'), + icon('pencil'), + '', + '', + __('form.edit'), 'btn-sm' ), ]; @@ -79,7 +82,7 @@ function admin_groups() ); } - $privileges_form[] = form_submit('submit', __('form.save')); + $privileges_form[] = form_submit('submit', icon('save') . __('form.save')); $html .= page_with_title(__('Edit group') . ' ' . htmlspecialchars($group->name), [ form( $privileges_form, diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php index 1b0e402e..96d073ea 100644 --- a/includes/pages/admin_shifts.php +++ b/includes/pages/admin_shifts.php @@ -371,7 +371,7 @@ function admin_shifts() form_hidden('change_hours', implode(', ', $change_hours)), form_hidden('angelmode', $angelmode), form_hidden('shift_over_midnight', $shift_over_midnight ? 'true' : 'false'), - form_submit('back', icon('chevron-left') . __('back')), + form_submit('back', icon('chevron-left') . __('general.back')), $shiftsCreationHint, table([ 'timeslot' => __('Time and location'), @@ -449,7 +449,7 @@ function admin_shifts() . ''; } - $link = button(url('/user-shifts'), icon('chevron-left'), 'btn-sm'); + $link = button(url('/user-shifts'), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title( $link . ' ' . admin_shifts_title() . ' ' . sprintf( '%s', @@ -556,7 +556,7 @@ function admin_shifts() ]), ]), ]), - form_submit('preview', icon('search') . __('form.preview')), + form_submit('preview', icon('eye') . __('form.preview'), 'btn-info'), ]), ] ); diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index 4f304479..0444457e 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -151,7 +151,8 @@ function admin_user() $html .= '' . "\n"; $html .= '' . "\n" . '
' . "\n"; - $html .= '' . "\n"; + $html .= '' . "\n"; $html .= ''; $html .= '
'; @@ -174,7 +175,8 @@ function admin_user() . '' . "\n"; $html .= '' . "\n" . '
' . "\n"; - $html .= '' . "\n"; + $html .= '' . "\n"; $html .= ''; $html .= '
'; @@ -212,14 +214,15 @@ function admin_user() $html .= '
'; - $html .= '' . "\n"; + $html .= '' . "\n"; $html .= ''; $html .= '
'; } $html .= buttons([ - button(user_delete_link($user_source->id), icon('trash') . __('delete'), 'btn-danger'), + button(user_delete_link($user_source->id), icon('trash') . __('form.delete'), 'btn-danger'), ]); $html .= '
'; @@ -350,7 +353,7 @@ function admin_user() } } - $link = button(url('/users', ['action' => 'view', 'user_id' => $user_id]), icon('chevron-left'), 'btn-sm'); + $link = button(url('/users', ['action' => 'view', 'user_id' => $user_id]), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title( $link . ' ' . __('Edit user'), [ diff --git a/includes/sys_form.php b/includes/sys_form.php index 9970fc9c..676a4986 100644 --- a/includes/sys_form.php +++ b/includes/sys_form.php @@ -143,9 +143,9 @@ function form_info($label, $text = '') * @param string $buttonType * @return string */ -function form_submit($name, $label, $class = '', $wrapForm = true, $buttonType = 'primary') +function form_submit($name, $label, $class = '', $wrapForm = true, $buttonType = 'primary', $title = '') { - $button = ''; diff --git a/includes/sys_template.php b/includes/sys_template.php index 3adbffce..f269baef 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -351,7 +351,7 @@ function render_table($columns, $rows, $data = true) * @param string $id * @return string */ -function button($href, $label, $class = '', $id = '') +function button($href, $label, $class = '', $id = '', $title = '') { if (!Str::contains(str_replace(['btn-sm', 'btn-xl'], '', $class), 'btn-')) { $class = 'btn-secondary' . ($class ? ' ' . $class : ''); @@ -359,7 +359,8 @@ function button($href, $label, $class = '', $id = '') $idAttribute = $id ? 'id="' . $id . '"' : ''; - return '' . $label . ''; + return '' . $label . ''; } /** @@ -385,9 +386,9 @@ function button_checkbox_selection($name, $label, $value) * * @return string */ -function button_icon($href, $icon, $class = '') +function button_icon($href, $icon, $class = '', $title = '') { - return button($href, icon($icon), $class); + return button($href, icon($icon), $class, '', $title); } /** diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index 1ccdcdf5..f01c2a6b 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -62,13 +62,13 @@ function AngelType_delete_view(AngelType $angeltype) { $link = button($angeltype->id ? url('/angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]) - : url('/angeltypes'), icon('chevron-left'), 'btn-sm'); + : url('/angeltypes'), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title($link . ' ' . sprintf(__('Delete angeltype %s'), htmlspecialchars($angeltype->name)), [ info(sprintf(__('Do you want to delete angeltype %s?'), $angeltype->name), true), form([ buttons([ button(url('/angeltypes'), icon('x-lg') . __('form.cancel')), - form_submit('delete', icon('trash') . __('delete'), 'btn-danger', false), + form_submit('delete', icon('trash'), 'btn-danger', false, 'primary', __('form.delete')), ]), ]), ], true); @@ -85,7 +85,7 @@ function AngelType_edit_view(AngelType $angeltype, bool $supporter_mode) { $link = button($angeltype->id ? url('/angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]) - : url('/angeltypes'), icon('chevron-left'), 'btn-sm'); + : url('/angeltypes'), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title( $link . ' ' . ( $angeltype->id ? @@ -169,7 +169,7 @@ function AngelType_edit_view(AngelType $angeltype, bool $supporter_mode) form_text('contact_name', __('general.name'), $angeltype->contact_name), config('enable_dect') ? form_text('contact_dect', __('general.dect'), $angeltype->contact_dect) : '', form_text('contact_email', __('general.email'), $angeltype->contact_email), - form_submit('submit', __('form.save')), + form_submit('submit', icon('save') . __('form.save')), ]), ] ); @@ -210,8 +210,10 @@ function AngelType_view_buttons( if (is_null($user_angeltype)) { $buttons[] = button( url('/user-angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]), - icon('box-arrow-in-right') . __('join'), - 'add' + icon('box-arrow-in-right') . ($admin_angeltypes ? '' : __('Join')), + 'add', + '', + ($admin_angeltypes ? 'Join' : ''), ); } else { if ($angeltype->requires_driver_license && !$user_driver_license->wantsToDrive()) { @@ -234,20 +236,29 @@ function AngelType_view_buttons( } $buttons[] = button( url('/user-angeltypes', ['action' => 'delete', 'user_angeltype_id' => $user_angeltype->id]), - icon('box-arrow-right') . __('leave') + icon('box-arrow-right') . ($admin_angeltypes ? '' : __('Leave')), + '', + '', + ($admin_angeltypes ? __('Leave') : ''), ); } if ($admin_angeltypes || $supporter) { $buttons[] = button( url('/angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]), - icon('pencil') . __('edit') + icon('pencil'), + '', + '', + __('form.edit') ); } if ($admin_angeltypes) { $buttons[] = button( url('/angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype->id]), - icon('trash') . __('delete') + icon('trash'), + 'btn-danger', + '', + __('form.delete') ); } @@ -296,7 +307,7 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange '/user-angeltypes', ['action' => 'confirm', 'user_angeltype_id' => $member->pivot->id] ), - __('confirm'), + __('Confirm'), 'btn-sm' ), button( @@ -304,7 +315,7 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange '/user-angeltypes', ['action' => 'delete', 'user_angeltype_id' => $member->pivot->id] ), - __('deny'), + __('Deny'), 'btn-sm' ), ]); @@ -318,8 +329,10 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange 'user_angeltype_id' => $member->pivot->id, 'supporter' => 0, ]), - icon('person-fill-down') . __('Remove supporter rights'), - 'btn-sm' + icon('person-fill-down'), + 'btn-sm', + '', + __('Remove supporter rights'), ), ]); } else { @@ -336,8 +349,10 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange 'user_angeltype_id' => $member->pivot->id, 'supporter' => 1, ]), - icon('person-fill-up') . __('Add supporter rights'), - 'btn-sm' + icon('person-fill-up'), + 'btn-sm', + '', + __('Add supporter rights'), ) : '', button( @@ -345,8 +360,10 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange 'action' => 'delete', 'user_angeltype_id' => $member->pivot->id, ]), - icon('trash') . __('remove'), - 'btn-sm' + icon('trash'), + 'btn-sm btn-danger', + '', + __('Remove'), ), ]); } @@ -432,7 +449,7 @@ function AngelType_view( ShiftCalendarRenderer $shiftCalendarRenderer, $tab ) { - $link = button(url('/angeltypes'), icon('chevron-left'), 'btn-sm'); + $link = button(url('/angeltypes'), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title( $link . ' ' . sprintf(__('Team %s'), htmlspecialchars($angeltype->name)), [ @@ -537,7 +554,7 @@ function AngelType_view_info( '/user-angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id] ), - __('Add'), + icon('plus-lg') . __('Add'), 'add' ), ]); @@ -549,11 +566,11 @@ function AngelType_view_info( $info[] = buttons([ button( url('/user-angeltypes', ['action' => 'confirm_all', 'angeltype_id' => $angeltype->id]), - icon('check-lg') . __('confirm all') + icon('check-lg') . __('Confirm all') ), button( url('/user-angeltypes', ['action' => 'delete_all', 'angeltype_id' => $angeltype->id]), - icon('trash') . __('deny all') + icon('trash') . __('Deny all') ), ]); $info[] = table($table_headers, $members_unconfirmed); diff --git a/includes/view/EventConfig_view.php b/includes/view/EventConfig_view.php index 901a2bd8..7a9c026d 100644 --- a/includes/view/EventConfig_view.php +++ b/includes/view/EventConfig_view.php @@ -42,7 +42,7 @@ function EventConfig_edit_view( ]), div('row', [ div('col-md-6', [ - form_submit('submit', __('form.save')), + form_submit('submit', icon('save') . __('form.save')), ]), ]), ]), diff --git a/includes/view/Locations_view.php b/includes/view/Locations_view.php index 2461c5a8..caac3c43 100644 --- a/includes/view/Locations_view.php +++ b/includes/view/Locations_view.php @@ -60,7 +60,7 @@ function location_view(Location $location, ShiftsFilterRenderer $shiftsFilterRen $selected_tab = count($tabs) - 1; } - $link = button(url('/admin/locations'), icon('chevron-left'), 'btn-sm'); + $link = button(url('/admin/locations'), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title( (auth()->can('admin_locations') ? $link . ' ' : '') . icon('pin-map-fill') . htmlspecialchars($location->name), @@ -69,7 +69,10 @@ function location_view(Location $location, ShiftsFilterRenderer $shiftsFilterRen auth()->can('admin_locations') ? buttons([ button( url('/admin/locations/edit/' . $location->id), - icon('pencil') . __('edit') + icon('pencil'), + '', + '', + __('form.edit') ), ]) : '', $dect, diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php index 7d0358a8..4a20e722 100644 --- a/includes/view/ShiftCalendarShiftRenderer.php +++ b/includes/view/ShiftCalendarShiftRenderer.php @@ -249,12 +249,16 @@ class ShiftCalendarShiftRenderer button( url('/user-shifts', ['edit_shift' => $shift->id]), icon('pencil'), - 'btn-' . $class . ' btn-sm border-light text-white' + 'btn-' . $class . ' btn-sm border-light text-white', + '', + __('form.edit') ), button( url('/user-shifts', ['delete_shift' => $shift->id]), icon('trash'), - 'btn-' . $class . ' btn-sm border-light text-white' + 'btn-' . $class . ' btn-sm border-light text-white', + '', + __('form.delete') ), ]) . ''; } diff --git a/includes/view/ShiftEntry_view.php b/includes/view/ShiftEntry_view.php index 1979a27d..4420b414 100644 --- a/includes/view/ShiftEntry_view.php +++ b/includes/view/ShiftEntry_view.php @@ -28,7 +28,7 @@ function ShiftEntry_delete_view_admin(Shift $shift, AngelType $angeltype, User $ form([ buttons([ button(user_link($signoff_user->id), icon('x-lg') . __('form.cancel')), - form_submit('delete', icon('trash') . __('sign off'), 'btn-danger', false), + form_submit('delete', icon('trash'), 'btn-danger', false, 'primary', __('Sign off')), ]), ]), ]); @@ -57,7 +57,14 @@ function ShiftEntry_delete_view(Shift $shift, AngelType $angeltype, User $signof form([ buttons([ button(user_link($signoff_user->id), icon('x-lg') . __('form.cancel')), - form_submit('delete', icon('trash') . __('delete'), 'btn-danger', false), + form_submit( + 'delete', + icon('trash'), + 'btn-danger', + false, + 'danger', + __('Sign off') + ), ]), ]), ]); @@ -100,7 +107,7 @@ function ShiftEntry_create_view_admin( form([ form_select('angeltype_id', __('Angeltype'), $angeltypes_select, $angeltype->id), form_select('user_id', __('general.user'), $users_select, $signup_user->id), - form_submit('submit', icon('check-lg') . __('form.save')), + form_submit('submit', icon('save') . __('form.save')), ]), ] ); @@ -135,7 +142,7 @@ function ShiftEntry_create_view_supporter( ), true), form([ form_select('user_id', __('general.user'), $users_select, $signup_user->id), - form_submit('submit', icon('check-lg') . __('form.save')), + form_submit('submit', icon('save') . __('form.save')), ]), ] ); @@ -161,7 +168,7 @@ function ShiftEntry_create_view_user(Shift $shift, Location $location, AngelType info(sprintf(__('Do you want to sign up for this shift as %s?'), $angeltype->name), true), form([ form_textarea('comment', __('Comment (for your eyes only):'), $comment), - form_submit('submit', icon('check-lg') . __('form.save')), + form_submit('submit', icon('save') . __('form.save')), ]), ] ); @@ -221,7 +228,9 @@ function ShiftEntry_edit_view( $link = button( url('/users', ['action' => 'view', 'user_id' => $angel->id]), icon('chevron-left'), - 'btn-sm' + 'btn-sm', + '', + __('general.back'), ); return page_with_title( $link . ' ' . __('Edit shift entry'), @@ -235,7 +244,7 @@ function ShiftEntry_edit_view( form_info(__('Type:'), htmlspecialchars($type)), $comment, join('', $freeload_form), - form_submit('submit', __('form.save')), + form_submit('submit', icon('save') . __('form.save')), ]), ] ); diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php index 5cc6a8eb..6eca497f 100644 --- a/includes/view/Shifts_view.php +++ b/includes/view/Shifts_view.php @@ -173,8 +173,8 @@ function Shift_view( $buttons = []; if ($shift_admin || $admin_shifttypes || $admin_locations) { $buttons = [ - $shift_admin ? button(shift_edit_link($shift), icon('pencil') . __('edit')) : '', - $shift_admin ? button(shift_delete_link($shift), icon('trash') . __('delete')) : '', + $shift_admin ? button(shift_edit_link($shift), icon('pencil'), '', '', __('form.edit')) : '', + $shift_admin ? button(shift_delete_link($shift), icon('trash'), 'btn-danger', '', __('form.delete')) : '', $admin_shifttypes ? button(url('/admin/shifttypes/' . $shifttype->id), htmlspecialchars($shifttype->name)) : '', @@ -211,7 +211,7 @@ function Shift_view( $start = $shift->start->format(__('general.datetime')); - $link = button(url('/user-shifts'), icon('chevron-left'), 'btn-sm'); + $link = button(url('/user-shifts'), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title( $link . ' ' . htmlspecialchars($shift->shiftType->name) @@ -290,12 +290,13 @@ function Shift_view_render_shift_entry(ShiftEntry $shift_entry, $user_shift_admi $entry .= button_icon( url('/user-myshifts', ['edit' => $shift_entry->id, 'id' => $shift_entry->user_id]), 'pencil', - 'btn-sm' + 'btn-sm', + __('form.edit') ); } $angeltype = $shift_entry->angelType; $disabled = Shift_signout_allowed($shift, $angeltype, $shift_entry->user_id) ? '' : ' btn-disabled'; - $entry .= button_icon(shift_entry_delete_link($shift_entry), 'trash', 'btn-sm' . $disabled); + $entry .= button_icon(shift_entry_delete_link($shift_entry), 'trash', 'btn-sm btn-danger' . $disabled, __('form.delete')); $entry .= ''; } return $entry; diff --git a/includes/view/UserAngelTypes_view.php b/includes/view/UserAngelTypes_view.php index 2123786e..931793f6 100644 --- a/includes/view/UserAngelTypes_view.php +++ b/includes/view/UserAngelTypes_view.php @@ -140,21 +140,20 @@ function UserAngelType_add_view(AngelType $angeltype, $users_source, $user_id) foreach ($users_source as $user_source) { $users[$user_source->id] = $user_source->displayName; } - - return page_with_title(__('Add user to angeltype'), [ + $link = button( + url('/angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]), + icon('chevron-left'), + 'btn-sm', + '', + __('general.back') + ); + return page_with_title($link . ' ' . __('Add user to angeltype'), [ msg(), - buttons([ - button( - url('/angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]), - __('back'), - 'back' - ), - ]), form([ form_info(__('Angeltype'), htmlspecialchars($angeltype->name)), form_checkbox('auto_confirm_user', __('Confirm user'), true), form_select('user_id', __('general.user'), $users, $user_id), - form_submit('submit', __('Add')), + form_submit('submit', icon('plus-lg') . __('Add')), ]), ]); } @@ -177,7 +176,7 @@ function UserAngelType_join_view($user, AngelType $angeltype) auth()->can('admin_user_angeltypes') ? form_checkbox('auto_confirm_user', __('Confirm user'), true) : '', buttons([ button(angeltype_link($angeltype->id), icon('x-lg') . __('form.cancel')), - form_submit('submit', icon('check-lg') . __('form.save'), 'btn-primary', false), + form_submit('submit', icon('save') . __('form.save'), 'btn-primary', false), ]), ], url( '/user-angeltypes', diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 59f40d11..3b9e7b55 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -19,18 +19,16 @@ use Illuminate\Support\Str; */ function User_delete_view($user) { - return page_with_title(sprintf(__('Delete %s'), User_Nick_render($user)), [ + $link = button(user_edit_link($user->id), icon('chevron-left'), 'btn-sm', '', __('general.back')); + return page_with_title($link . ' ' . sprintf(__('Delete %s'), User_Nick_render($user)), [ msg(), - buttons([ - button(user_edit_link($user->id), icon('chevron-left') . __('back')), - ]), error( __('Do you really want to delete the user including all his shifts and every other piece of his data?'), true ), form([ form_password('password', __('Your password'), 'current-password'), - form_submit('submit', __('Delete')), + form_submit('submit', __('form.delete')), ]), ]); } @@ -43,7 +41,7 @@ function User_delete_view($user) */ function User_edit_vouchers_view($user) { - $link = button(user_link($user->id), icon('chevron-left'), 'btn-sm'); + $link = button(user_link($user->id), icon('chevron-left'), 'btn-sm', '', __('general.back')); return page_with_title( $link . ' ' . sprintf(__('%s\'s vouchers'), User_Nick_render($user)), [ @@ -57,7 +55,7 @@ function User_edit_vouchers_view($user) form( [ form_spinner('vouchers', __('Number of vouchers given out'), $user->state->got_voucher), - form_submit('submit', __('form.save')), + form_submit('submit', icon('save') . __('form.save')), ], url('/users', ['action' => 'edit_vouchers', 'user_id' => $user->id]) ), @@ -119,7 +117,15 @@ function Users_view( ? $user->personalData->planned_departure_date->format(__('general.date')) : ''; $u['last_login_at'] = $user->last_login_at ? $user->last_login_at->format(__('general.datetime')) : ''; $u['actions'] = table_buttons([ - button_icon(url('/admin-user', ['id' => $user->id]), 'pencil', 'btn-sm'), + button( + url( + '/admin-user', + ['id' => $user->id] + ), + 'pencil', + 'btn-sm', + __('form.edit') + ), ]); $usersList[] = $u; } @@ -344,24 +350,28 @@ function User_view_myshift(Shift $shift, $user_source, $its_me) } $myshift['actions'] = [ - button(shift_link($shift), icon('eye') . __('view'), 'btn-sm'), + button(shift_link($shift), icon('eye'), 'btn-sm btn-info', '', __('View')), ]; if ($its_me || auth()->can('user_shifts_admin')) { $myshift['actions'][] = button( url('/user-myshifts', ['edit' => $shift->shift_entry_id, 'id' => $user_source->id]), - icon('pencil') . __('edit'), - 'btn-sm' + icon('pencil'), + 'btn-sm', + '', + __('form.edit') ); } if (Shift_signout_allowed($shift, (new AngelType())->forceFill(['id' => $shift->angel_type_id]), $user_source->id)) { $myshift['actions'][] = button( shift_entry_delete_link($shift), - icon('trash') . __('sign off'), - 'btn-sm' + icon('trash'), + 'btn-sm btn-danger', + '', + __('Sign off') ); } - $myshift['actions'] = table_buttons($myshift['actions']); + $myshift['actions'] = '
' . table_buttons($myshift['actions']) . '
'; return $myshift; } @@ -458,18 +468,22 @@ function User_view_worklog(Worklog $worklog, $admin_user_worklog_privilege) { $actions = ''; if ($admin_user_worklog_privilege) { - $actions = table_buttons([ + $actions = '
' . table_buttons([ button( url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id), - icon('pencil') . __('edit'), - 'btn-sm' + icon('pencil'), + 'btn-sm', + '', + __('form.edit') ), button( url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id . '/delete'), - icon('trash') . __('delete'), - 'btn-sm' + icon('trash'), + 'btn-sm btn-danger', + '', + __('form.delete') ), - ]); + ]) . '
'; } return [ @@ -546,7 +560,7 @@ function User_view( 'location' => __('Location'), 'shift_info' => __('Name & Workmates'), 'comment' => __('worklog.comment'), - 'actions' => __('Action'), + 'actions' => __('general.actions'), ], $my_shifts)); } elseif ($user_source->state->force_active) { $myshifts_table = success(__('You have done enough.'), true); @@ -594,13 +608,13 @@ function User_view( ) : '', $admin_user_privilege ? button( url('/admin-user', ['id' => $user_source->id]), - icon('pencil') . __('edit') + icon('pencil') . __('form.edit'), ) : '', (($admin_user_privilege || $auth->can('admin_arrive')) && !$user_source->state->arrived) ? form([ form_hidden('action', 'arrived'), form_hidden('user', $user_source->id), - form_submit('submit', __('user.arrived'), '', false), + form_submit('submit', icon('house') . __('user.arrive'), '', false), ], url('/admin-arrive'), true) : '', ($admin_user_privilege || $auth->can('voucher.edit')) && config('enable_voucher') ? button( diff --git a/resources/lang/de_DE/default.po b/resources/lang/de_DE/default.po index fd48cc5a..2899b481 100644 --- a/resources/lang/de_DE/default.po +++ b/resources/lang/de_DE/default.po @@ -183,20 +183,14 @@ msgstr "Team %s" msgid "%s (not \"%s\")" msgstr "%s (kein \"%s\")" -msgid "view" -msgstr "ansehen" +msgid "View" +msgstr "Ansehen" -msgid "edit" -msgstr "bearbeiten" +msgid "Leave" +msgstr "Verlassen" -msgid "delete" -msgstr "löschen" - -msgid "leave" -msgstr "verlassen" - -msgid "join" -msgstr "mitmachen" +msgid "Join" +msgstr "Mitmachen" msgid "Event config" msgstr "Event Einstellungen" @@ -497,11 +491,11 @@ msgstr "" msgid "Marked angels." msgstr "Engel wurden markiert." -msgid "back" -msgstr "zurück" +msgid "general.back" +msgstr "Zurück" -msgid "apply" -msgstr "anwenden" +msgid "Apply" +msgstr "Anwenden" msgid "Angel has been marked as active." msgstr "Engel wurde als aktiv markiert." @@ -521,13 +515,13 @@ msgstr "Engel hat kein T-Shirt bekommen." msgid "set active" msgstr "setze aktiv" -msgid "remove active" +msgid "Remove active" msgstr "entferne aktiv" -msgid "got T-shirt" +msgid "Got T-shirt" msgstr "T-Shirt bekommen" -msgid "remove T-shirt" +msgid "Remove T-shirt" msgstr "entferne T-Shirt" msgid "Sum" @@ -578,8 +572,8 @@ msgstr "Zurückgesetzt. Engel ist nicht angekommen." msgid "Angel has been marked as arrived." msgstr "Engel wurde als angekommen markiert." -msgid "reset" -msgstr "zurücksetzen" +msgid "Reset" +msgstr "Zurücksetzen" msgid "Planned arrival" msgstr "Geplanter Ankunftstag" @@ -641,9 +635,6 @@ msgstr "Bitte einen Schichttyp wählen." msgid "Location" msgstr "Ort" -msgid "Delete" -msgstr "löschen" - msgid "Answer questions" msgstr "Fragen beantworten" @@ -931,14 +922,14 @@ msgstr "" "Du bist noch nicht für diesen Engeltyp bestätigt. Bitte gehe zur Einführung " "für %s um bestätigt zu werden." -msgid "confirm" -msgstr "bestätigen" +msgid "Confirm" +msgstr "Bestätigen" -msgid "deny" -msgstr "ablehnen" +msgid "Deny" +msgstr "Ablehnen" -msgid "remove" -msgstr "entfernen" +msgid "Remove" +msgstr "Entfernen" msgid "Driver" msgstr "Fahrer" @@ -958,10 +949,10 @@ msgstr "Mitglieder" msgid "Add" msgstr "Hinzufügen" -msgid "confirm all" +msgid "Confirm all" msgstr "Alle bestätigen" -msgid "deny all" +msgid "Deny all" msgstr "Alle ablehnen" msgid "Membership" @@ -1184,8 +1175,8 @@ msgstr "Schicht endet %c" msgid "Shift ended %c" msgstr "Schicht endete %c" -msgid "sign off" -msgstr "austragen" +msgid "Sign off" +msgstr "Austragen" msgid "Sum:" msgstr "Summe:" @@ -1208,9 +1199,6 @@ msgstr "Dauer" msgid "Name & Workmates" msgstr "Name & Kollegen" -msgid "Action" -msgstr "Aktion" - msgid "You have done enough." msgstr "Du hast genug gemacht." @@ -1363,10 +1351,10 @@ msgstr "Ausgegebene Goodies" msgid "Goodie statistic" msgstr "Goodie Statistik" -msgid "remove goodie" -msgstr "entferne Goodie" +msgid "Remove goodie" +msgstr "Goodie entfernen" -msgid "got goodie" +msgid "Got goodie" msgstr "Goodie bekommen" msgid "Goodie?" @@ -1830,6 +1818,9 @@ msgstr "Aktiv (erzwungen)" msgid "user.arrived" msgstr "Angekommen" +msgid "user.arrive" +msgstr "Ankommen" + msgid "user.got_shirt" msgstr "T-Shirt bekommen" diff --git a/resources/lang/en_US/default.po b/resources/lang/en_US/default.po index 17045da4..06c97b45 100644 --- a/resources/lang/en_US/default.po +++ b/resources/lang/en_US/default.po @@ -531,6 +531,9 @@ msgstr "Active (forced)" msgid "user.arrived" msgstr "Arrived" +msgid "user.arrive" +msgstr "Arrive" + msgid "user.got_shirt" msgstr "Got T-shirt" @@ -848,3 +851,9 @@ msgstr "" msgid "form.recover" msgstr "Recover" + +msgid "general.actions" +msgstr "Actions" + +msgid "general.back" +msgstr "Back" diff --git a/resources/views/admin/locations/index.twig b/resources/views/admin/locations/index.twig index c5da1425..b32dc4a3 100644 --- a/resources/views/admin/locations/index.twig +++ b/resources/views/admin/locations/index.twig @@ -8,7 +8,9 @@

{% if not is_index|default(false) %} - {{ m.button(m.icon('chevron-left'), location ? url('/locations', {'action': 'view', 'location_id': location.id}) : url('/admin/locations'), 'secondary', 'sm') }} + {{ m.button(m.icon('chevron-left'), location + ? url('/locations', {'action': 'view', 'location_id': location.id}) + : url('/admin/locations'), 'secondary', 'sm', __('general.back')) }} {% endif %} {{ block('title') }} diff --git a/resources/views/admin/log.twig b/resources/views/admin/log.twig index ab7c8448..b4a76da8 100644 --- a/resources/views/admin/log.twig +++ b/resources/views/admin/log.twig @@ -19,7 +19,7 @@ 'hide_label': true, }) }} - {{ f.submit(__('form.search')) }} + {{ f.submit(__('form.search'), {'icon_left': 'search'}) }}

diff --git a/resources/views/admin/schedule/edit.twig b/resources/views/admin/schedule/edit.twig index bec38322..178130a1 100644 --- a/resources/views/admin/schedule/edit.twig +++ b/resources/views/admin/schedule/edit.twig @@ -5,7 +5,7 @@ {% block title %}{{ schedule ? __('schedule.edit.title') : __('schedule.import.title') }}{% endblock %} {% block content_title %} - {{ m.button(m.icon('chevron-left'), url('/admin/schedule'), 'secondary', 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/admin/schedule'), 'secondary', 'sm', __('general.back')) }} {{ block('title') }} {% endblock %} diff --git a/resources/views/admin/schedule/load.twig b/resources/views/admin/schedule/load.twig index ff6575d9..723f04e7 100644 --- a/resources/views/admin/schedule/load.twig +++ b/resources/views/admin/schedule/load.twig @@ -5,7 +5,7 @@ {% block title %}{{ __('schedule.import.load.title') }}{% endblock %} {% block content_title %} - {{ m.button(m.icon('chevron-left'), url('/admin/schedule'), 'secondary', 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/admin/schedule'), 'secondary', 'sm', __('general.back')) }} {{ block('title') }} {% endblock %} @@ -28,7 +28,7 @@

{{ __('schedule.import.shifts.delete') }}

{{ _self.shiftsTable(shifts.delete) }} - {{ f.submit(__('form.import')) }} + {{ f.submit(__('form.import'), {'icon_left': 'box-arrow-in-down'}) }} {% endblock %} diff --git a/resources/views/admin/shifts/history.twig b/resources/views/admin/shifts/history.twig index badd0a07..34b108de 100644 --- a/resources/views/admin/shifts/history.twig +++ b/resources/views/admin/shifts/history.twig @@ -7,7 +7,7 @@ {% block content %}

- {{ m.button(m.icon('chevron-left'), url('/admin-shifts'), null, 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/admin-shifts'), null, 'sm', __('general.back')) }} {% block content_title %}{{ block('title') }}{% endblock %}

diff --git a/resources/views/admin/shifttypes/edit.twig b/resources/views/admin/shifttypes/edit.twig index b470564c..a63ef907 100644 --- a/resources/views/admin/shifttypes/edit.twig +++ b/resources/views/admin/shifttypes/edit.twig @@ -29,7 +29,8 @@
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }} {% if shifttype %} - {{ f.delete(__('form.delete'), {'confirm_title': __('shifttype.delete.title', [shifttype.name|e])}) }} + {{ f.delete(__('form.delete'), + {'title' : '', 'confirm_title': __('shifttype.delete.title', [shifttype.name|e])}) }} {% endif %}
diff --git a/resources/views/admin/shifttypes/index.twig b/resources/views/admin/shifttypes/index.twig index 990a96d8..301606ca 100644 --- a/resources/views/admin/shifttypes/index.twig +++ b/resources/views/admin/shifttypes/index.twig @@ -8,7 +8,7 @@

{% if not is_index|default(false) %} - {{ m.button(m.icon('chevron-left'), url('/admin/shifttypes'), 'secondary', 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/admin/shifttypes'), 'secondary', 'sm', __('general.back')) }} {% endif %} {{ block('title') }} diff --git a/resources/views/admin/user/delete-worklog.twig b/resources/views/admin/user/delete-worklog.twig index 97df9e1e..fc5813b1 100644 --- a/resources/views/admin/user/delete-worklog.twig +++ b/resources/views/admin/user/delete-worklog.twig @@ -12,8 +12,13 @@
{{ m.alert(__('worklog.delete.info', [m.user(user)]), 'danger', true) }} - {{ m.button(__('form.cancel'), url('/users?action=view&user_id=' ~ user.id)) }} - {{ f.submit(__('form.delete'), {'btn_type': 'danger'}) }} + {{ m.button(__('form.cancel'), + url('/users?action=view&user_id=' ~ user.id), + null, + null, + null, + 'x-lg') }} + {{ f.delete(__('form.delete')) }}
diff --git a/resources/views/admin/user/edit-shirt.twig b/resources/views/admin/user/edit-shirt.twig index 2f7ac183..f1640bb4 100644 --- a/resources/views/admin/user/edit-shirt.twig +++ b/resources/views/admin/user/edit-shirt.twig @@ -9,7 +9,7 @@ {% block content %}

- {{ m.button(m.icon('chevron-left'), url('/admin-active'), null, 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/admin-active'), null, 'sm', __('general.back')) }} {{ block('title') }}: {{ m.user(userdata) }}

@@ -51,7 +51,7 @@ }) }}
- {{ f.submit(__('form.save')) }} + {{ f.submit(__('form.save'), {'icon_left': 'save'}) }}

diff --git a/resources/views/admin/user/edit-worklog.twig b/resources/views/admin/user/edit-worklog.twig index 0e789a15..e7bad20a 100644 --- a/resources/views/admin/user/edit-worklog.twig +++ b/resources/views/admin/user/edit-worklog.twig @@ -7,7 +7,8 @@ {% block content %}

- {{ m.button(m.icon('chevron-left'), url('/users', {action: 'view', user_id: user.id}), null, 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/users', {action: 'view', user_id: user.id}), + null, 'sm', __('general.back')) }} {{ block('title') }}

@@ -40,7 +41,7 @@ 'required': true, 'max_length': 200, }) }} - {{ f.submit(__('form.save')) }} + {{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
diff --git a/resources/views/pages/design.twig b/resources/views/pages/design.twig index e6ee4034..62abd39d 100644 --- a/resources/views/pages/design.twig +++ b/resources/views/pages/design.twig @@ -159,6 +159,68 @@

+
+ +

Icons {{ m.icon('link') }}

+
+
+ cancel: {{ m.icon('x-lg') }}
+ delete: {{ m.icon('trash', 'danger') }}
+ edit: {{ m.icon('pencil') }}
+ preview: {{ m.icon('eye','info') }}
+ reset: {{ m.icon('arrow-counterclockwise') }}
+ save: {{ m.icon('save', 'primary') }}
+
+ {{ f.button('Cancel', {'icon_left': 'x-lg'}) }}
+ {{ f.delete('Delete') }}
+ {{ f.button('Edit', {'icon_left': 'pencil'}) }}
+ {{ f.button('Reset', {'icon_left': 'arrow-counterclockwise'}) }}
+ {{ f.submit('Save', {'icon_left': 'save'}) }}
+ {{ f.button('View', {'icon_left': 'eye', 'btn_type': 'info'}) }} +
+
+ angel: {{ m.angel() }}
+ dashboard: {{ m.icon('speedometer2') }}
+ documentation: {{ m.icon('question-circle') }}
+ drivers license / ifsg: {{ m.icon('card-checklist') }}
+ form required: {{ f.entry_required() }}
+ heading add / add anything else: {{ m.icon('plus-lg') }}
+ heading back: {{ m.icon('chevron-left') }}
+ info: {{ m.icon('info-circle') }} / {{ m.icon('info-circle-fill', 'info') }}
+ info hidden: {{ m.icon('eye-slash') }}
+ language: {{ m.icon('translate') }}
+ location: {{ m.icon('pin-map-fill') }}
+ remove / substract: {{ m.icon('dash-lg') }}
+ requires introduction: {{ m.icon('mortarboard-fill') }}
+ search: {{ m.icon('search') }}
+ settings: {{ m.icon('gear-fill') }}
+ sign off / leave: {{ m.icon('box-arrow-right') }}
+ sign up / import: {{ m.icon('box-arrow-in-right') }}
+ sign up allowed: {{ m.icon('pencil-square') }}
+ yes / no: {{ m.iconBool(true) }} / {{ m.iconBool(false) }}
+
+
+ angeltypes: {{ m.icon('person-lines-fill') }}
+ arrived: {{ m.icon('house') }}
+ comment: {{ m.icon('chat-left-text') }}
+ email: {{ m.icon('envelope') }}
+ iCal: {{ m.icon('calendar-week') }}
+ json export: {{ m.icon('braces') }}
+ lists: {{ m.icon('list') }}
+ logout: {{ m.icon('box-arrow-left') }}
+ message: {{ m.icon('envelope') }}
+ next shift: {{ m.icon('clock') }}
+ occupancy: {{ m.icon('person-fill-slash') }}
+ password: {{ m.icon('key-fill') }}
+ phone: {{ m.icon('phone') }}
+ T-shirt / goodie: {{ m.icon('person') }}
+ supporter: {{ m.icon('patch-check') }}
+ user settings: {{ m.icon('person-fill-gear') }}
+ voucher: {{ m.icon('valentine') }}
+ worklog / history: {{ m.icon('clock-history') }} +
+
+
diff --git a/resources/views/pages/faq/edit.twig b/resources/views/pages/faq/edit.twig index 4fc4dee8..01f6b086 100644 --- a/resources/views/pages/faq/edit.twig +++ b/resources/views/pages/faq/edit.twig @@ -7,7 +7,7 @@ {% block content %}

- {{ m.button(m.icon('chevron-left'), url('/faq'), 'secondary', 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/faq'), 'secondary', 'sm', __('general.back')) }} {{ block('title') }}

diff --git a/resources/views/pages/faq/overview.twig b/resources/views/pages/faq/overview.twig index 5d110761..8b82826c 100644 --- a/resources/views/pages/faq/overview.twig +++ b/resources/views/pages/faq/overview.twig @@ -54,7 +54,7 @@ {% if has_permission_to('faq.edit') %} - {{ m.button(m.icon('pencil'), url('/admin/faq/' ~ item.id), 'secondary', 'sm') }} + {{ m.button(m.icon('pencil'), url('/admin/faq/' ~ item.id), 'secondary', 'sm', __('form.edit')) }}
@@ -31,7 +31,7 @@ enctype="multipart/form-data" method="post" class="ms-2" > {{ csrf() }} - {{ f.submit(m.icon('trash'), {'btn_type': 'primary', 'size': 'sm'}) }} + {{ f.delete(null, {'btn_type': 'sm btn-danger'}) }}
{% endif %}
diff --git a/resources/views/pages/news/edit.twig b/resources/views/pages/news/edit.twig index e3ff2d3f..c6ba285e 100644 --- a/resources/views/pages/news/edit.twig +++ b/resources/views/pages/news/edit.twig @@ -7,7 +7,7 @@ {% block content %}

- {{ m.button(m.icon('chevron-left'), url('/news'), null, 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/news'), null, 'sm', __('general.back')) }} {{ block('title') }}

diff --git a/resources/views/pages/news/overview.twig b/resources/views/pages/news/overview.twig index 818cceb2..1bbb968d 100644 --- a/resources/views/pages/news/overview.twig +++ b/resources/views/pages/news/overview.twig @@ -9,7 +9,7 @@

{% if not is_overview|default(false) %} - {{ m.button(m.icon('chevron-left'), url('/news'), null, 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/news'), null, 'sm', __('general.back')) }} {% endif %} {{ block('title') }} {%- if has_permission_to('admin_news') and is_overview|default(false) -%} @@ -99,7 +99,7 @@ {% if has_permission_to('admin_news') %}
- {{ m.button(m.icon('pencil'), url('/admin/news/' ~ news.id), 'secondary', 'sm') }} + {{ m.button(m.icon('pencil'), url('/admin/news/' ~ news.id), 'secondary', 'sm', __('form.edit')) }}

- {{ m.button(m.icon('chevron-left'), url('/questions'), null, 'sm') }} + {{ m.button(m.icon('chevron-left'), url('/questions'), null, 'sm', __('general.back')) }} {{ block('title') }}

diff --git a/resources/views/pages/questions/overview.twig b/resources/views/pages/questions/overview.twig index 5ec80003..88862e69 100644 --- a/resources/views/pages/questions/overview.twig +++ b/resources/views/pages/questions/overview.twig @@ -44,7 +44,7 @@
{% if has_permission_to('question.edit') %} - {{ m.button(m.icon('pencil'), url('/admin/questions/' ~ question.id), null, 'sm') }} + {{ m.button(m.icon('pencil'), url('/admin/questions/' ~ question.id), null, 'sm', __('form.edit')) }} {% endif %} {% if question.user.id == user.id or has_permission_to('question.edit') %} diff --git a/resources/views/pages/registration.twig b/resources/views/pages/registration.twig index 416e3bcf..bb59eb4b 100644 --- a/resources/views/pages/registration.twig +++ b/resources/views/pages/registration.twig @@ -9,7 +9,7 @@

{{ has_permission_to('admin_user') - ? m.button(m.icon('chevron-left'), url('/users'), null, 'sm') + ? m.button(m.icon('chevron-left'), url('/users'), null, 'sm', __('general.back')) : '' }} {{ __('registration.title') }} diff --git a/resources/views/pages/settings/certificates.twig b/resources/views/pages/settings/certificates.twig index e452d22a..d0d1eb78 100644 --- a/resources/views/pages/settings/certificates.twig +++ b/resources/views/pages/settings/certificates.twig @@ -20,7 +20,7 @@ {{ f.checkbox('ifsg_certificate', __('settings.certificates.ifsg'), { 'checked': certificates.ifsg_certificate, }) }} - {{ f.submit(__('form.save')) }} + {{ f.submit(__('form.save'), {'icon_left': 'save'}) }}

{% endif %} @@ -52,7 +52,7 @@ 'checked': certificates.has_car, }) }} - {{ f.submit(__('form.save')) }} + {{ f.submit(__('form.save'), {'icon_left': 'save'} ) }}
{% endif %} diff --git a/resources/views/pages/settings/language.twig b/resources/views/pages/settings/language.twig index b6b086cd..98b593d8 100644 --- a/resources/views/pages/settings/language.twig +++ b/resources/views/pages/settings/language.twig @@ -14,7 +14,7 @@ {{ f.select('select_language', __('settings.language'), languages, { 'selected': current_language, }) }} - {{ f.submit(__('form.save')) }} + {{ f.submit(__('form.save'), {'icon_left': 'save'}) }}

diff --git a/resources/views/pages/settings/oauth.twig b/resources/views/pages/settings/oauth.twig index 929a3a80..9fd43909 100644 --- a/resources/views/pages/settings/oauth.twig +++ b/resources/views/pages/settings/oauth.twig @@ -35,13 +35,13 @@
{{ csrf() }} - {{ f.submit(__('form.connect'), {'size' : 'sm'}) }} + {{ f.submit(__('form.connect'), {'size' : 'sm', 'icon_left': 'box-arrow-in-right'}) }}
{% else %}
{{ csrf() }} - {{ f.submit(__('form.disconnect'), {'btn_type': 'danger', 'size' : 'sm'}) }} + {{ f.submit(__('form.disconnect'), {'btn_type': 'danger', 'size' : 'sm', 'icon_left': 'box-arrow-right'}) }}
{% endif %} diff --git a/resources/views/pages/settings/password.twig b/resources/views/pages/settings/password.twig index 00bf6063..d4fa0739 100644 --- a/resources/views/pages/settings/password.twig +++ b/resources/views/pages/settings/password.twig @@ -32,7 +32,7 @@ 'required': true, 'autocomplete': 'new-password', }) }} - {{ f.submit(__('form.save')) }} + {{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
diff --git a/resources/views/pages/settings/profile.twig b/resources/views/pages/settings/profile.twig index 043f89dc..eaa3b608 100644 --- a/resources/views/pages/settings/profile.twig +++ b/resources/views/pages/settings/profile.twig @@ -163,7 +163,7 @@
- {{ f.submit(__('form.save')) }} + {{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
diff --git a/resources/views/pages/settings/sessions.twig b/resources/views/pages/settings/sessions.twig index 8a5c1cd2..93401026 100644 --- a/resources/views/pages/settings/sessions.twig +++ b/resources/views/pages/settings/sessions.twig @@ -20,7 +20,7 @@
{{ csrf() }} {{ f.hidden('id', 'all') }} - {{ f.delete(__('form.delete_all'), {'size': 'sm', 'confirm_title': __('form.delete_all')}) }} + {{ f.delete(__('form.delete_all'), {'size': 'sm', 'confirm_title': __('form.delete_all'), 'title': ''}) }}
{% endif %} @@ -41,7 +41,7 @@ {{ f.hidden('id', session.id[:15]) }} {{ f.submit( ' ', - {'name': 'delete', 'btn_type': 'danger', 'size': 'sm', 'icon_left': 'trash'} + {'name': 'delete', 'btn_type': 'danger', 'size': 'sm', 'icon_left': 'trash', 'title': __('form.delete'),} ) }} {% else %} diff --git a/resources/views/pages/settings/theme.twig b/resources/views/pages/settings/theme.twig index 6ffaa9ab..4faf8aec 100644 --- a/resources/views/pages/settings/theme.twig +++ b/resources/views/pages/settings/theme.twig @@ -14,7 +14,7 @@ {{ f.select('select_theme', __('settings.theme'), themes, { 'selected': current_theme, }) }} - {{ f.submit(__('form.save')) }} + {{ f.submit(__('form.save'), {'icon_left': 'save'}) }}