diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php index ee6c2e60..f12a78a7 100644 --- a/includes/controller/angeltypes_controller.php +++ b/includes/controller/angeltypes_controller.php @@ -286,7 +286,7 @@ function angeltypes_list_controller() button( page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype['id']]), __('view'), - 'btn-xs' + 'btn-sm' ) ]; @@ -294,12 +294,12 @@ function angeltypes_list_controller() $actions[] = button( page_link_to('angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype['id']]), __('edit'), - 'btn-xs' + 'btn-sm' ); $actions[] = button( page_link_to('angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype['id']]), __('delete'), - 'btn-xs' + 'btn-sm' ); } @@ -310,13 +310,13 @@ function angeltypes_list_controller() ['action' => 'delete', 'user_angeltype_id' => $angeltype['user_angeltype_id']] ), __('leave'), - 'btn-xs' + 'btn-sm' ); } else { $actions[] = button( page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype['id']]), __('join'), - 'btn-xs' + 'btn-sm' ); } diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php index 15d5a405..1d6fbf50 100644 --- a/includes/pages/admin_active.php +++ b/includes/pages/admin_active.php @@ -231,7 +231,7 @@ function admin_active() $parameters['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('set active'), 'btn-xs', false)], + [form_submit('submit', __('set active'), 'btn-sm', false)], page_link_to('admin_active', $parameters) ); } @@ -244,7 +244,7 @@ function admin_active() $parametersRemove['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('remove active'), 'btn-xs', false)], + [form_submit('submit', __('remove active'), 'btn-sm', false)], page_link_to('admin_active', $parametersRemove) ); } @@ -257,7 +257,7 @@ function admin_active() $parametersShirt['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('got t-shirt'), 'btn-xs', false)], + [form_submit('submit', __('got t-shirt'), 'btn-sm', false)], page_link_to('admin_active', $parametersShirt) ); } @@ -270,7 +270,7 @@ function admin_active() $parameters['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('remove t-shirt'), 'btn-xs', false)], + [form_submit('submit', __('remove t-shirt'), 'btn-sm', false)], page_link_to('admin_active', $parameters) ); } diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php index 5f340dea..15cee8dd 100644 --- a/includes/pages/admin_arrive.php +++ b/includes/pages/admin_arrive.php @@ -95,7 +95,9 @@ function admin_arrive() $plannedDepartureDate = $usr->personalData->planned_departure_date; $arrivalDate = $usr->state->arrival_date; $plannedArrivalDate = $usr->personalData->planned_arrival_date; - $usr['rendered_planned_departure_date'] = $plannedDepartureDate ? $plannedDepartureDate->format(__('Y-m-d')) : '-'; + $usr['rendered_planned_departure_date'] = $plannedDepartureDate + ? $plannedDepartureDate->format(__('Y-m-d')) + : '-'; $usr['rendered_planned_arrival_date'] = $plannedArrivalDate ? $plannedArrivalDate->format(__('Y-m-d')) : '-'; $usr['rendered_arrival_date'] = $arrivalDate ? $arrivalDate->format(__('Y-m-d')) : '-'; $usr['arrived'] = icon_bool($usr->state->arrived); @@ -103,8 +105,11 @@ function admin_arrive() form_hidden('action', $usr->state->arrived ? 'reset' : 'arrived'), form_hidden('user', $usr->id), form_submit( - 'submit', $usr->state->arrived ? __('reset') : __('arrived'), 'btn-xs', true, - $usr->state->arrived ? 'default' : 'primary' + 'submit', + $usr->state->arrived ? __('reset') : __('arrived'), + 'btn-sm', + true, + $usr->state->arrived ? 'secondary' : 'primary' ), ]); diff --git a/includes/pages/admin_free.php b/includes/pages/admin_free.php index 4b2e6586..9008debc 100644 --- a/includes/pages/admin_free.php +++ b/includes/pages/admin_free.php @@ -97,7 +97,7 @@ function admin_free() : icon('eye-slash'), 'actions' => auth()->can('admin_user') - ? button(page_link_to('admin_user', ['id' => $usr->id]), __('edit'), 'btn-xs') + ? button(page_link_to('admin_user', ['id' => $usr->id]), __('edit'), 'btn-sm') : '' ]; } diff --git a/includes/pages/admin_groups.php b/includes/pages/admin_groups.php index 0dea8145..21621690 100644 --- a/includes/pages/admin_groups.php +++ b/includes/pages/admin_groups.php @@ -42,7 +42,7 @@ function admin_groups() page_link_to('admin_groups', ['action' => 'edit', 'id' => $group['UID']]), __('edit'), - 'btn-xs' + 'btn-sm' ) ]; } diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php index 017fea58..b6f13ceb 100644 --- a/includes/pages/admin_rooms.php +++ b/includes/pages/admin_rooms.php @@ -27,12 +27,12 @@ function admin_rooms() button( page_link_to('admin_rooms', ['show' => 'edit', 'id' => $room->id]), __('edit'), - 'btn-xs' + 'btn-sm' ), button( page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room->id]), __('delete'), - 'btn-xs' + 'btn-sm' ) ]) ]; diff --git a/includes/pages/user_messages.php b/includes/pages/user_messages.php index 48dc651c..ad756f8e 100644 --- a/includes/pages/user_messages.php +++ b/includes/pages/user_messages.php @@ -87,14 +87,14 @@ function user_messages() $messages_table_entry['actions'] = button( page_link_to('user_messages', ['action' => 'read', 'id' => $message->id]), __('mark as read'), - 'btn-xs' + 'btn-sm' ); } } else { $messages_table_entry['actions'] = button( page_link_to('user_messages', ['action' => 'delete', 'id' => $message->id]), __('delete message'), - 'btn-xs' + 'btn-sm' ); } $messages_table[] = $messages_table_entry; diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index ec896eaa..e098eade 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -313,7 +313,7 @@ function ical_hint() page_link_to('shifts_json_export', ['key' => $user->api_key]), page_link_to('user_myshifts', ['reset' => 1]) ) - . ' ' . '

' diff --git a/includes/sys_form.php b/includes/sys_form.php index 874ccc51..fccdfacc 100644 --- a/includes/sys_form.php +++ b/includes/sys_form.php @@ -30,10 +30,10 @@ function form_spinner($name, $label, $value)
- -
diff --git a/includes/sys_template.php b/includes/sys_template.php index c18eeda5..f3010dc4 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -386,7 +386,7 @@ function render_table($columns, $rows, $data = true) */ function button($href, $label, $class = '') { - return '' . $label . ''; + return '' . $label . ''; } /** @@ -399,7 +399,7 @@ function button($href, $label, $class = '') */ function button_js($javascript, $label, $class = '') { - return '' . $label . ''; + return '' . $label . ''; } /** diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index 9f4d3f03..93cc4ba1 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -222,7 +222,7 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a ['action' => 'confirm', 'user_angeltype_id' => $member['user_angeltype_id']] ), __('confirm'), - 'btn-xs' + 'btn-sm' ), button( page_link_to( @@ -230,7 +230,7 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a ['action' => 'delete', 'user_angeltype_id' => $member['user_angeltype_id']] ), __('deny'), - 'btn-xs' + 'btn-sm' ) ]); $members_unconfirmed[] = $member; @@ -244,7 +244,7 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a 'supporter' => 0 ]), __('Remove supporter rights'), - 'btn-xs' + 'btn-sm' ) ]); } else { @@ -260,7 +260,7 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a 'user_angeltype_id' => $member['user_angeltype_id'], 'supporter' => 1 ]), - __('Add supporter rights'), 'btn-xs') + __('Add supporter rights'), 'btn-sm') : '', button( page_link_to('user_angeltypes', [ @@ -268,7 +268,7 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a 'user_angeltype_id' => $member['user_angeltype_id'] ]), __('remove'), - 'btn-xs' + 'btn-sm' ) ]); } diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php index 3502b3e5..210bcb7f 100644 --- a/includes/view/ShiftCalendarShiftRenderer.php +++ b/includes/view/ShiftCalendarShiftRenderer.php @@ -136,7 +136,7 @@ class ShiftCalendarShiftRenderer $html .= '
  • '; $html .= button(shift_entry_create_link_admin($shift), icon('plus-lg') . __('Add more angels'), - 'btn-xs' + 'btn-sm' ); $html .= '
  • '; } @@ -193,7 +193,7 @@ class ShiftCalendarShiftRenderer . ' ' . button( shift_entry_create_link($shift, $angeltype), - __('Sign up'), 'btn-xs btn-primary hidden-print' + __('Sign up'), 'btn-sm btn-primary hidden-print' ); break; @@ -224,7 +224,7 @@ class ShiftCalendarShiftRenderer ['action' => 'add', 'angeltype_id' => $angeltype['id']] ), sprintf(__('Become %s'), $angeltype['name']), - 'btn-xs' + 'btn-sm' ); } break; @@ -265,12 +265,12 @@ class ShiftCalendarShiftRenderer button( page_link_to('user_shifts', ['edit_shift' => $shift['SID']]), icon('pencil'), - "btn-$class btn-xs" + "btn-$class btn-sm" ), button( page_link_to('user_shifts', ['delete_shift' => $shift['SID']]), icon('trash'), - "btn-$class btn-xs" + "btn-$class btn-sm" ) ]) . '
    '; } diff --git a/includes/view/ShiftTypes_view.php b/includes/view/ShiftTypes_view.php index c81a6c47..5a4b1322 100644 --- a/includes/view/ShiftTypes_view.php +++ b/includes/view/ShiftTypes_view.php @@ -121,12 +121,12 @@ function ShiftTypes_list_view($shifttypes) ['action' => 'edit', 'shifttype_id' => $shifttype['id']] ), __('edit'), - 'btn-xs' + 'btn-sm' ), button( page_link_to('shifttypes', ['action' => 'delete', 'shifttype_id' => $shifttype['id']]), __('delete'), - 'btn-xs' + 'btn-sm' ) ]); } diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php index dc3236df..5d9d3075 100644 --- a/includes/view/Shifts_view.php +++ b/includes/view/Shifts_view.php @@ -258,10 +258,10 @@ function Shift_view_render_shift_entry($shift_entry, $user_shift_admin, $angelty $entry .= button_icon( page_link_to('user_myshifts', ['edit' => $shift_entry['id'], 'id' => $shift_entry['UID']]), 'pencil', - 'btn-xs' + 'btn-sm' ); } - $entry .= button_icon(shift_entry_delete_link($shift_entry), 'trash', 'btn-xs'); + $entry .= button_icon(shift_entry_delete_link($shift_entry), 'trash', 'btn-sm'); $entry .= ''; } return $entry; diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 4eb7d9d1..3420402d 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -221,7 +221,7 @@ function Users_view( ? $user->personalData->planned_departure_date->format(__('Y-m-d')) : ''; $u['last_login_at'] = $user->last_login_at ? $user->last_login_at->format(__('m/d/Y h:i a')) : ''; $u['actions'] = table_buttons([ - button_icon(page_link_to('admin_user', ['id' => $user->id]), 'pencil-square', 'btn-xs') + button_icon(page_link_to('admin_user', ['id' => $user->id]), 'pencil-square', 'btn-sm') ]); $usersList[] = $u; } @@ -418,20 +418,20 @@ function User_view_myshift($shift, $user_source, $its_me) } $myshift['actions'] = [ - button(shift_link($shift), icon('eye') . __('view'), 'btn-xs') + button(shift_link($shift), icon('eye') . __('view'), 'btn-sm') ]; if ($its_me || auth()->can('user_shifts_admin')) { $myshift['actions'][] = button( page_link_to('user_myshifts', ['edit' => $shift['id'], 'id' => $user_source->id]), icon('pencil-square') . __('edit'), - 'btn-xs' + 'btn-sm' ); } if (Shift_signout_allowed($shift, ['id' => $shift['TID']], $user_source->id)) { $myshift['actions'][] = button( shift_entry_delete_link($shift), icon('trash') . __('sign off'), - 'btn-xs' + 'btn-sm' ); } $myshift['actions'] = table_buttons($myshift['actions']); @@ -519,12 +519,12 @@ function User_view_worklog(Worklog $worklog, $admin_user_worklog_privilege) button( user_worklog_edit_link($worklog), icon('pencil-square') . __('edit'), - 'btn-xs' + 'btn-sm' ), button( user_worklog_delete_link($worklog), icon('trash') . __('delete'), - 'btn-xs' + 'btn-sm' ) ]); } @@ -630,7 +630,7 @@ function User_view( form([ form_hidden('action', 'arrived'), form_hidden('user', $user_source->id), - form_submit('submit', __('arrived'), '', false, 'default') + form_submit('submit', __('arrived'), '', false, 'primary') ], page_link_to('admin_arrive'), true) : '', $admin_user_privilege ? button( page_link_to( diff --git a/resources/views/admin/schedule/index.twig b/resources/views/admin/schedule/index.twig index 120faf10..d2c8425e 100644 --- a/resources/views/admin/schedule/index.twig +++ b/resources/views/admin/schedule/index.twig @@ -40,12 +40,12 @@
    + class="btn btn-sm btn-primary"> {{ __('form.import') }} + class="btn btn-sm btn-primary"> {{ __('form.edit') }}
    diff --git a/resources/views/macros/form.twig b/resources/views/macros/form.twig index 07523f35..4d3b3719 100644 --- a/resources/views/macros/form.twig +++ b/resources/views/macros/form.twig @@ -66,7 +66,7 @@ {%- endmacro %} {% macro button(label, opt) %} -