Make profile page layout and shifts renderer less worse for normal users
This commit is contained in:
parent
72d48de3ae
commit
983fb988b4
|
@ -427,7 +427,7 @@ function buttons($buttons = [])
|
||||||
* @param array $buttons
|
* @param array $buttons
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function table_buttons($buttons = [])
|
function table_buttons($buttons = [], $additionalClass = '')
|
||||||
{
|
{
|
||||||
return '<div class="btn-group" role="group">' . join('', $buttons) . '</div>';
|
return '<div class="btn-group ' . $additionalClass . '" role="group">' . join('', $buttons) . '</div>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -312,7 +312,7 @@ class ShiftCalendarRenderer
|
||||||
badge(__('Help needed'), 'danger'),
|
badge(__('Help needed'), 'danger'),
|
||||||
badge(__('Other angeltype needed / collides with my shifts'), 'warning'),
|
badge(__('Other angeltype needed / collides with my shifts'), 'warning'),
|
||||||
badge(__('Shift is full'), 'success'),
|
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'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -516,14 +516,14 @@ function User_view(
|
||||||
$admin_user_worklog_privilege
|
$admin_user_worklog_privilege
|
||||||
);
|
);
|
||||||
if (count($my_shifts) > 0) {
|
if (count($my_shifts) > 0) {
|
||||||
$myshifts_table = table([
|
$myshifts_table = div('table-responsive', table([
|
||||||
'date' => __('Day & time'),
|
'date' => __('Day & time'),
|
||||||
'duration' => __('Duration'),
|
'duration' => __('Duration'),
|
||||||
'room' => __('Location'),
|
'room' => __('Location'),
|
||||||
'shift_info' => __('Name & workmates'),
|
'shift_info' => __('Name & workmates'),
|
||||||
'comment' => __('Comment'),
|
'comment' => __('Comment'),
|
||||||
'actions' => __('Action'),
|
'actions' => __('Action'),
|
||||||
], $my_shifts);
|
], $my_shifts));
|
||||||
} elseif ($user_source->state->force_active) {
|
} elseif ($user_source->state->force_active) {
|
||||||
$myshifts_table = success(__('You have done enough.'), true);
|
$myshifts_table = success(__('You have done enough.'), true);
|
||||||
}
|
}
|
||||||
|
@ -547,7 +547,7 @@ function User_view(
|
||||||
msg(),
|
msg(),
|
||||||
div('row', [
|
div('row', [
|
||||||
div('col-md-12', [
|
div('col-md-12', [
|
||||||
buttons([
|
table_buttons([
|
||||||
$auth->can('user.edit.shirt') && $goodie_enabled ? button(
|
$auth->can('user.edit.shirt') && $goodie_enabled ? button(
|
||||||
url('/admin/user/' . $user_source->id . '/goodie'),
|
url('/admin/user/' . $user_source->id . '/goodie'),
|
||||||
icon('person') . ($goodie_tshirt ? __('Shirt') : __('Goodie'))
|
icon('person') . ($goodie_tshirt ? __('Shirt') : __('Goodie'))
|
||||||
|
@ -579,27 +579,29 @@ function User_view(
|
||||||
url('/admin/user/' . $user_source->id . '/worklog'),
|
url('/admin/user/' . $user_source->id . '/worklog'),
|
||||||
icon('clock-history') . __('worklog.add')
|
icon('clock-history') . __('worklog.add')
|
||||||
) : '',
|
) : '',
|
||||||
$its_me ? button(
|
], 'mb-2'),
|
||||||
|
$its_me ? table_buttons([
|
||||||
|
button(
|
||||||
page_link_to('settings/profile'),
|
page_link_to('settings/profile'),
|
||||||
icon('person-fill-gear') . __('Settings')
|
icon('person-fill-gear') . __('Settings')
|
||||||
) : '',
|
),
|
||||||
($its_me && $auth->can('ical')) ? button(
|
$auth->can('ical') ? button(
|
||||||
page_link_to('ical', ['key' => $user_source->api_key]),
|
page_link_to('ical', ['key' => $user_source->api_key]),
|
||||||
icon('calendar-week') . __('iCal Export')
|
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]),
|
page_link_to('shifts_json_export', ['key' => $user_source->api_key]),
|
||||||
icon('braces') . __('JSON Export')
|
icon('braces') . __('JSON Export')
|
||||||
) : '',
|
) : '',
|
||||||
($its_me && (
|
(
|
||||||
$auth->can('shifts_json_export')
|
$auth->can('shifts_json_export')
|
||||||
|| $auth->can('ical')
|
|| $auth->can('ical')
|
||||||
|| $auth->can('atom')
|
|| $auth->can('atom')
|
||||||
)) ? button(
|
) ? button(
|
||||||
page_link_to('user_myshifts', ['reset' => 1]),
|
page_link_to('user_myshifts', ['reset' => 1]),
|
||||||
icon('arrow-repeat') . __('Reset API key')
|
icon('arrow-repeat') . __('Reset API key')
|
||||||
) : '',
|
) : '',
|
||||||
]),
|
], 'mb-2') : '',
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
div('row user-info', [
|
div('row user-info', [
|
||||||
|
|
|
@ -2159,10 +2159,8 @@ msgid "Shift is full"
|
||||||
msgstr "Schicht ist voll"
|
msgstr "Schicht ist voll"
|
||||||
|
|
||||||
#: includes/view/ShiftCalendarRenderer.php:316
|
#: includes/view/ShiftCalendarRenderer.php:316
|
||||||
msgid "Shift running/ended or user not arrived/allowed"
|
msgid "Shift running/ended or you have not arrived"
|
||||||
msgstr ""
|
msgstr "Schicht läuft/vorbei oder du bist noch nicht angekommen"
|
||||||
"Schicht läuft/vorbei oder du bist noch nicht angekommen/darfst dich noch "
|
|
||||||
"nicht anmelden"
|
|
||||||
|
|
||||||
#: includes/view/ShiftCalendarShiftRenderer.php:135
|
#: includes/view/ShiftCalendarShiftRenderer.php:135
|
||||||
msgid "Add more angels"
|
msgid "Add more angels"
|
||||||
|
|
Loading…
Reference in New Issue