diff --git a/includes/sys_template.php b/includes/sys_template.php index cbee4149..bad1cf2a 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -427,7 +427,7 @@ function buttons($buttons = []) * @param array $buttons * @return string */ -function table_buttons($buttons = []) +function table_buttons($buttons = [], $additionalClass = '') { - return '
' . join('', $buttons) . '
'; + return '
' . join('', $buttons) . '
'; } diff --git a/includes/view/ShiftCalendarRenderer.php b/includes/view/ShiftCalendarRenderer.php index 3ad705c7..ad8542bc 100644 --- a/includes/view/ShiftCalendarRenderer.php +++ b/includes/view/ShiftCalendarRenderer.php @@ -312,7 +312,7 @@ class ShiftCalendarRenderer badge(__('Help needed'), 'danger'), badge(__('Other angeltype needed / collides with my shifts'), 'warning'), badge(__('Shift is full'), 'success'), - badge(__('Shift running/ended or user not arrived/allowed'), 'secondary'), + badge(__('Shift running/ended or you have not arrived'), 'secondary'), ]); } } diff --git a/includes/view/User_view.php b/includes/view/User_view.php index aa6e5b79..80107602 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -516,14 +516,14 @@ function User_view( $admin_user_worklog_privilege ); if (count($my_shifts) > 0) { - $myshifts_table = table([ + $myshifts_table = div('table-responsive', table([ 'date' => __('Day & time'), 'duration' => __('Duration'), 'room' => __('Location'), 'shift_info' => __('Name & workmates'), 'comment' => __('Comment'), 'actions' => __('Action'), - ], $my_shifts); + ], $my_shifts)); } elseif ($user_source->state->force_active) { $myshifts_table = success(__('You have done enough.'), true); } @@ -547,7 +547,7 @@ function User_view( msg(), div('row', [ div('col-md-12', [ - buttons([ + table_buttons([ $auth->can('user.edit.shirt') && $goodie_enabled ? button( url('/admin/user/' . $user_source->id . '/goodie'), icon('person') . ($goodie_tshirt ? __('Shirt') : __('Goodie')) @@ -579,27 +579,29 @@ function User_view( url('/admin/user/' . $user_source->id . '/worklog'), icon('clock-history') . __('worklog.add') ) : '', - $its_me ? button( + ], 'mb-2'), + $its_me ? table_buttons([ + button( page_link_to('settings/profile'), icon('person-fill-gear') . __('Settings') - ) : '', - ($its_me && $auth->can('ical')) ? button( + ), + $auth->can('ical') ? button( page_link_to('ical', ['key' => $user_source->api_key]), icon('calendar-week') . __('iCal Export') ) : '', - ($its_me && $auth->can('shifts_json_export')) ? button( + $auth->can('shifts_json_export') ? button( page_link_to('shifts_json_export', ['key' => $user_source->api_key]), icon('braces') . __('JSON Export') ) : '', - ($its_me && ( - $auth->can('shifts_json_export') - || $auth->can('ical') - || $auth->can('atom') - )) ? button( - page_link_to('user_myshifts', ['reset' => 1]), - icon('arrow-repeat') . __('Reset API key') - ) : '', - ]), + ( + $auth->can('shifts_json_export') + || $auth->can('ical') + || $auth->can('atom') + ) ? button( + page_link_to('user_myshifts', ['reset' => 1]), + icon('arrow-repeat') . __('Reset API key') + ) : '', + ], 'mb-2') : '', ]), ]), div('row user-info', [ diff --git a/resources/lang/de_DE/default.po b/resources/lang/de_DE/default.po index 8be1d5b2..a7e1f9c1 100644 --- a/resources/lang/de_DE/default.po +++ b/resources/lang/de_DE/default.po @@ -2159,10 +2159,8 @@ msgid "Shift is full" msgstr "Schicht ist voll" #: includes/view/ShiftCalendarRenderer.php:316 -msgid "Shift running/ended or user not arrived/allowed" -msgstr "" -"Schicht läuft/vorbei oder du bist noch nicht angekommen/darfst dich noch " -"nicht anmelden" +msgid "Shift running/ended or you have not arrived" +msgstr "Schicht läuft/vorbei oder du bist noch nicht angekommen" #: includes/view/ShiftCalendarShiftRenderer.php:135 msgid "Add more angels"