parent
f4c3f7a39e
commit
ac73489aed
|
@ -272,6 +272,7 @@ function angeltype_controller_shiftsFilter(AngelType $angeltype, $days)
|
||||||
function angeltypes_list_controller()
|
function angeltypes_list_controller()
|
||||||
{
|
{
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
|
$admin_angeltypes = auth()->can('admin_angel_types');
|
||||||
|
|
||||||
if (!auth()->can('angeltypes')) {
|
if (!auth()->can('angeltypes')) {
|
||||||
throw_redirect(url('/'));
|
throw_redirect(url('/'));
|
||||||
|
@ -282,21 +283,27 @@ function angeltypes_list_controller()
|
||||||
$actions = [
|
$actions = [
|
||||||
button(
|
button(
|
||||||
url('/angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
url('/angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('eye') . __('view'),
|
icon('eye') . ($admin_angeltypes ? '' : __('View')),
|
||||||
'btn-sm'
|
'btn-sm btn-info',
|
||||||
|
'',
|
||||||
|
($admin_angeltypes ? __('View') : '')
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (auth()->can('admin_angel_types')) {
|
if ($admin_angeltypes) {
|
||||||
$actions[] = button(
|
$actions[] = button(
|
||||||
url('/angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]),
|
url('/angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('pencil') . __('edit'),
|
icon('pencil'),
|
||||||
'btn-sm'
|
'btn-sm',
|
||||||
|
'',
|
||||||
|
__('form.edit')
|
||||||
);
|
);
|
||||||
$actions[] = button(
|
$actions[] = button(
|
||||||
url('/angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype->id]),
|
url('/angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('trash') . __('delete'),
|
icon('trash'),
|
||||||
'btn-sm'
|
'btn-sm btn-danger',
|
||||||
|
'',
|
||||||
|
__('form.delete')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,14 +314,18 @@ function angeltypes_list_controller()
|
||||||
'/user-angeltypes',
|
'/user-angeltypes',
|
||||||
['action' => 'delete', 'user_angeltype_id' => $angeltype->user_angel_type_id]
|
['action' => 'delete', 'user_angeltype_id' => $angeltype->user_angel_type_id]
|
||||||
),
|
),
|
||||||
icon('box-arrow-right') . __('leave'),
|
icon('box-arrow-right') . ($admin_angeltypes ? '' : __('Leave')),
|
||||||
'btn-sm'
|
'btn-sm',
|
||||||
|
'',
|
||||||
|
($admin_angeltypes ? __('Leave') : '')
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$actions[] = button(
|
$actions[] = button(
|
||||||
url('/user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
url('/user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('box-arrow-in-right') . __('join'),
|
icon('box-arrow-in-right') . ($admin_angeltypes ? '' : __('Join')),
|
||||||
'btn-sm'
|
'btn-sm',
|
||||||
|
'',
|
||||||
|
($admin_angeltypes ? __('Join') : '')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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(
|
return page_with_title(
|
||||||
$link . ' ' . shifts_title(),
|
$link . ' ' . shifts_title(),
|
||||||
[
|
[
|
||||||
|
@ -222,7 +222,7 @@ function shift_edit_controller()
|
||||||
),
|
),
|
||||||
'<h2>' . __('Needed angels') . '</h2>',
|
'<h2>' . __('Needed angels') . '</h2>',
|
||||||
$angel_types_spinner,
|
$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'));
|
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(
|
return page_with_title(
|
||||||
$link . ' ' . shifts_title(),
|
$link . ' ' . shifts_title(),
|
||||||
[
|
[
|
||||||
|
@ -288,7 +288,7 @@ function shift_delete_controller()
|
||||||
), true),
|
), true),
|
||||||
form([
|
form([
|
||||||
form_hidden('delete_shift', $shift->id),
|
form_hidden('delete_shift', $shift->id),
|
||||||
form_submit('delete', __('delete')),
|
form_submit('delete', icon('trash') . __('form.delete'), '', true, 'danger'),
|
||||||
]),
|
]),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
|
@ -97,8 +97,8 @@ function admin_active()
|
||||||
$msg = success(__('Marked angels.'), true);
|
$msg = success(__('Marked angels.'), true);
|
||||||
} else {
|
} else {
|
||||||
$set_active = form([
|
$set_active = form([
|
||||||
button(url('/admin-active', ['search' => $search]), '« ' . __('back')),
|
button(url('/admin-active', ['search' => $search]), '« ' . __('general.back')),
|
||||||
form_submit('ack', '» ' . __('apply')),
|
form_submit('ack', '» ' . __('Apply')),
|
||||||
], url('/admin-active', ['search' => $search, 'count' => $count, 'set_active' => 1]));
|
], url('/admin-active', ['search' => $search, 'count' => $count, 'set_active' => 1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ function admin_active()
|
||||||
$parameters['show_all_shifts'] = 1;
|
$parameters['show_all_shifts'] = 1;
|
||||||
}
|
}
|
||||||
$actions[] = form(
|
$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),
|
url('/admin-active', $parameters),
|
||||||
false,
|
false,
|
||||||
true
|
true
|
||||||
|
@ -251,7 +251,7 @@ function admin_active()
|
||||||
$parametersRemove['show_all_shifts'] = 1;
|
$parametersRemove['show_all_shifts'] = 1;
|
||||||
}
|
}
|
||||||
$actions[] = form(
|
$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),
|
url('/admin-active', $parametersRemove),
|
||||||
false,
|
false,
|
||||||
true
|
true
|
||||||
|
@ -268,7 +268,7 @@ function admin_active()
|
||||||
|
|
||||||
if ($goodie_enabled) {
|
if ($goodie_enabled) {
|
||||||
$actions[] = form(
|
$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),
|
url('/admin-active', $parametersShirt),
|
||||||
false,
|
false,
|
||||||
true
|
true
|
||||||
|
@ -286,7 +286,7 @@ function admin_active()
|
||||||
|
|
||||||
if ($goodie_enabled) {
|
if ($goodie_enabled) {
|
||||||
$actions[] = form(
|
$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),
|
url('/admin-active', $parameters),
|
||||||
false,
|
false,
|
||||||
true
|
true
|
||||||
|
@ -295,7 +295,7 @@ function admin_active()
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($goodie_tshirt) {
|
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);
|
$userData['actions'] = buttons($actions);
|
||||||
|
@ -328,11 +328,11 @@ function admin_active()
|
||||||
form([
|
form([
|
||||||
form_text('search', __('Search angel:'), $search),
|
form_text('search', __('Search angel:'), $search),
|
||||||
form_checkbox('show_all_shifts', __('Show all shifts'), $show_all_shifts),
|
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')),
|
], url('/admin-active')),
|
||||||
$set_active == '' ? form([
|
$set_active == '' ? form([
|
||||||
form_text('count', __('How much angels should be active?'), $count ?: $forced_count),
|
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,
|
]) : $set_active,
|
||||||
$msg . msg(),
|
$msg . msg(),
|
||||||
table(
|
table(
|
||||||
|
@ -350,7 +350,7 @@ function admin_active()
|
||||||
],
|
],
|
||||||
($goodie_enabled ? ['tshirt' => ($goodie_tshirt ? __('T-shirt?') : __('Goodie?'))] : []),
|
($goodie_enabled ? ['tshirt' => ($goodie_tshirt ? __('T-shirt?') : __('Goodie?'))] : []),
|
||||||
[
|
[
|
||||||
'actions' => '',
|
'actions' => __('general.actions'),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
$matched_users
|
$matched_users
|
||||||
|
|
|
@ -117,10 +117,15 @@ function admin_arrive()
|
||||||
form_hidden('user', $usr->id),
|
form_hidden('user', $usr->id),
|
||||||
form_submit(
|
form_submit(
|
||||||
'submit',
|
'submit',
|
||||||
$usr->state->arrived ? __('reset') : __('user.arrived'),
|
$usr->state->arrived
|
||||||
|
? icon('arrow-counterclockwise')
|
||||||
|
: icon('house'),
|
||||||
'btn-sm',
|
'btn-sm',
|
||||||
true,
|
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(),
|
$msg . msg(),
|
||||||
form([
|
form([
|
||||||
form_text('search', __('form.search'), $search),
|
form_text('search', __('form.search'), $search),
|
||||||
form_submit('submit', __('form.search')),
|
form_submit('submit', icon('search') . __('form.search')),
|
||||||
], url('/admin-arrive')),
|
], url('/admin-arrive')),
|
||||||
table([
|
table([
|
||||||
'name' => __('general.name'),
|
'name' => __('general.name'),
|
||||||
|
@ -209,7 +214,7 @@ function admin_arrive()
|
||||||
'arrived' => __('Arrived?'),
|
'arrived' => __('Arrived?'),
|
||||||
'rendered_arrival_date' => __('Arrival date'),
|
'rendered_arrival_date' => __('Arrival date'),
|
||||||
'rendered_planned_departure_date' => __('Planned departure'),
|
'rendered_planned_departure_date' => __('Planned departure'),
|
||||||
'actions' => '',
|
'actions' => __('general.actions'),
|
||||||
], $users_matched),
|
], $users_matched),
|
||||||
div('row', [
|
div('row', [
|
||||||
div('col-md-4', [
|
div('col-md-4', [
|
||||||
|
|
|
@ -110,7 +110,7 @@ function admin_free()
|
||||||
: icon('eye-slash'),
|
: icon('eye-slash'),
|
||||||
'actions' =>
|
'actions' =>
|
||||||
auth()->can('admin_user')
|
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', [
|
div('row', [
|
||||||
form_text('search', __('form.search'), $search, null, null, null, 'col'),
|
form_text('search', __('form.search'), $search, null, null, null, 'col'),
|
||||||
form_select('angeltype', __('Angeltype'), $angel_types, $angelType, '', 'col'),
|
form_select('angeltype', __('Angeltype'), $angel_types, $angelType, '', 'col'),
|
||||||
form_submit('submit', __('form.search')),
|
form_submit('submit', icon('search') . __('form.search')),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -42,7 +42,10 @@ function admin_groups()
|
||||||
'/admin-groups',
|
'/admin-groups',
|
||||||
['action' => 'edit', 'id' => $group->id]
|
['action' => 'edit', 'id' => $group->id]
|
||||||
),
|
),
|
||||||
icon('pencil') . __('edit'),
|
icon('pencil'),
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
__('form.edit'),
|
||||||
'btn-sm'
|
'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), [
|
$html .= page_with_title(__('Edit group') . ' ' . htmlspecialchars($group->name), [
|
||||||
form(
|
form(
|
||||||
$privileges_form,
|
$privileges_form,
|
||||||
|
|
|
@ -371,7 +371,7 @@ function admin_shifts()
|
||||||
form_hidden('change_hours', implode(', ', $change_hours)),
|
form_hidden('change_hours', implode(', ', $change_hours)),
|
||||||
form_hidden('angelmode', $angelmode),
|
form_hidden('angelmode', $angelmode),
|
||||||
form_hidden('shift_over_midnight', $shift_over_midnight ? 'true' : 'false'),
|
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,
|
$shiftsCreationHint,
|
||||||
table([
|
table([
|
||||||
'timeslot' => __('Time and location'),
|
'timeslot' => __('Time and location'),
|
||||||
|
@ -449,7 +449,7 @@ function admin_shifts()
|
||||||
. '</div>';
|
. '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$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(
|
return page_with_title(
|
||||||
$link . ' ' . admin_shifts_title() . ' ' . sprintf(
|
$link . ' ' . admin_shifts_title() . ' ' . sprintf(
|
||||||
'<a href="%s">%s</a>',
|
'<a href="%s">%s</a>',
|
||||||
|
@ -556,7 +556,7 @@ function admin_shifts()
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
form_submit('preview', icon('search') . __('form.preview')),
|
form_submit('preview', icon('eye') . __('form.preview'), 'btn-info'),
|
||||||
]),
|
]),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
|
@ -151,7 +151,8 @@ function admin_user()
|
||||||
|
|
||||||
$html .= '</td></tr>' . "\n";
|
$html .= '</td></tr>' . "\n";
|
||||||
$html .= '</table>' . "\n" . '<br>' . "\n";
|
$html .= '</table>' . "\n" . '<br>' . "\n";
|
||||||
$html .= '<button type="submit" class="btn btn-primary">' . __('form.save') . '</button>' . "\n";
|
$html .= '<button type="submit" class="btn btn-primary">'
|
||||||
|
. icon('save') . __('form.save') . '</button>' . "\n";
|
||||||
$html .= '</form>';
|
$html .= '</form>';
|
||||||
|
|
||||||
$html .= '<hr>';
|
$html .= '<hr>';
|
||||||
|
@ -174,7 +175,8 @@ function admin_user()
|
||||||
. '</td></tr>' . "\n";
|
. '</td></tr>' . "\n";
|
||||||
|
|
||||||
$html .= '</table>' . "\n" . '<br>' . "\n";
|
$html .= '</table>' . "\n" . '<br>' . "\n";
|
||||||
$html .= '<button type="submit" class="btn btn-primary">' . __('form.save') . '</button>' . "\n";
|
$html .= '<button type="submit" class="btn btn-primary">'
|
||||||
|
. icon('save') . __('form.save') . '</button>' . "\n";
|
||||||
$html .= '</form>';
|
$html .= '</form>';
|
||||||
|
|
||||||
$html .= '<hr>';
|
$html .= '<hr>';
|
||||||
|
@ -212,14 +214,15 @@ function admin_user()
|
||||||
|
|
||||||
$html .= '</div><br>';
|
$html .= '</div><br>';
|
||||||
|
|
||||||
$html .= '<button type="submit" class="btn btn-primary">' . __('form.save') . '</button>' . "\n";
|
$html .= '<button type="submit" class="btn btn-primary">'
|
||||||
|
. icon('save') . __('form.save') . '</button>' . "\n";
|
||||||
$html .= '</form>';
|
$html .= '</form>';
|
||||||
|
|
||||||
$html .= '<hr>';
|
$html .= '<hr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= buttons([
|
$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 .= '<hr>';
|
$html .= '<hr>';
|
||||||
|
@ -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(
|
return page_with_title(
|
||||||
$link . ' ' . __('Edit user'),
|
$link . ' ' . __('Edit user'),
|
||||||
[
|
[
|
||||||
|
|
|
@ -143,9 +143,9 @@ function form_info($label, $text = '')
|
||||||
* @param string $buttonType
|
* @param string $buttonType
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function form_submit($name, $label, $class = '', $wrapForm = true, $buttonType = 'primary')
|
function form_submit($name, $label, $class = '', $wrapForm = true, $buttonType = 'primary', $title = '')
|
||||||
{
|
{
|
||||||
$button = '<button class="btn btn-' . $buttonType . ($class ? ' ' . $class : '') . '" type="submit" name="' . $name . '">'
|
$button = '<button class="btn btn-' . $buttonType . ($class ? ' ' . $class : '') . '" type="submit" name="' . $name . '" title="' . $title . '">'
|
||||||
. $label
|
. $label
|
||||||
. '</button>';
|
. '</button>';
|
||||||
|
|
||||||
|
|
|
@ -351,7 +351,7 @@ function render_table($columns, $rows, $data = true)
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @return string
|
* @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-')) {
|
if (!Str::contains(str_replace(['btn-sm', 'btn-xl'], '', $class), 'btn-')) {
|
||||||
$class = 'btn-secondary' . ($class ? ' ' . $class : '');
|
$class = 'btn-secondary' . ($class ? ' ' . $class : '');
|
||||||
|
@ -359,7 +359,8 @@ function button($href, $label, $class = '', $id = '')
|
||||||
|
|
||||||
$idAttribute = $id ? 'id="' . $id . '"' : '';
|
$idAttribute = $id ? 'id="' . $id . '"' : '';
|
||||||
|
|
||||||
return '<a ' . $idAttribute . ' href="' . $href . '" class="btn ' . $class . '">' . $label . '</a>';
|
return '<a ' . $idAttribute . ' href="' . $href
|
||||||
|
. '" class="btn ' . $class . '" title="' . $title . '">' . $label . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -385,9 +386,9 @@ function button_checkbox_selection($name, $label, $value)
|
||||||
*
|
*
|
||||||
* @return string
|
* @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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -62,13 +62,13 @@ function AngelType_delete_view(AngelType $angeltype)
|
||||||
{
|
{
|
||||||
$link = button($angeltype->id
|
$link = button($angeltype->id
|
||||||
? url('/angeltypes', ['action' => 'view', 'angeltype_id' => $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)), [
|
return page_with_title($link . ' ' . sprintf(__('Delete angeltype %s'), htmlspecialchars($angeltype->name)), [
|
||||||
info(sprintf(__('Do you want to delete angeltype %s?'), $angeltype->name), true),
|
info(sprintf(__('Do you want to delete angeltype %s?'), $angeltype->name), true),
|
||||||
form([
|
form([
|
||||||
buttons([
|
buttons([
|
||||||
button(url('/angeltypes'), icon('x-lg') . __('form.cancel')),
|
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);
|
], true);
|
||||||
|
@ -85,7 +85,7 @@ function AngelType_edit_view(AngelType $angeltype, bool $supporter_mode)
|
||||||
{
|
{
|
||||||
$link = button($angeltype->id
|
$link = button($angeltype->id
|
||||||
? url('/angeltypes', ['action' => 'view', 'angeltype_id' => $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(
|
return page_with_title(
|
||||||
$link . ' ' . (
|
$link . ' ' . (
|
||||||
$angeltype->id ?
|
$angeltype->id ?
|
||||||
|
@ -169,7 +169,7 @@ function AngelType_edit_view(AngelType $angeltype, bool $supporter_mode)
|
||||||
form_text('contact_name', __('general.name'), $angeltype->contact_name),
|
form_text('contact_name', __('general.name'), $angeltype->contact_name),
|
||||||
config('enable_dect') ? form_text('contact_dect', __('general.dect'), $angeltype->contact_dect) : '',
|
config('enable_dect') ? form_text('contact_dect', __('general.dect'), $angeltype->contact_dect) : '',
|
||||||
form_text('contact_email', __('general.email'), $angeltype->contact_email),
|
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)) {
|
if (is_null($user_angeltype)) {
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
url('/user-angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
url('/user-angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('box-arrow-in-right') . __('join'),
|
icon('box-arrow-in-right') . ($admin_angeltypes ? '' : __('Join')),
|
||||||
'add'
|
'add',
|
||||||
|
'',
|
||||||
|
($admin_angeltypes ? 'Join' : ''),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if ($angeltype->requires_driver_license && !$user_driver_license->wantsToDrive()) {
|
if ($angeltype->requires_driver_license && !$user_driver_license->wantsToDrive()) {
|
||||||
|
@ -234,20 +236,29 @@ function AngelType_view_buttons(
|
||||||
}
|
}
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
url('/user-angeltypes', ['action' => 'delete', 'user_angeltype_id' => $user_angeltype->id]),
|
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) {
|
if ($admin_angeltypes || $supporter) {
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
url('/angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]),
|
url('/angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('pencil') . __('edit')
|
icon('pencil'),
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
__('form.edit')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($admin_angeltypes) {
|
if ($admin_angeltypes) {
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
url('/angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype->id]),
|
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',
|
'/user-angeltypes',
|
||||||
['action' => 'confirm', 'user_angeltype_id' => $member->pivot->id]
|
['action' => 'confirm', 'user_angeltype_id' => $member->pivot->id]
|
||||||
),
|
),
|
||||||
__('confirm'),
|
__('Confirm'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
|
@ -304,7 +315,7 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
'/user-angeltypes',
|
'/user-angeltypes',
|
||||||
['action' => 'delete', 'user_angeltype_id' => $member->pivot->id]
|
['action' => 'delete', 'user_angeltype_id' => $member->pivot->id]
|
||||||
),
|
),
|
||||||
__('deny'),
|
__('Deny'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
@ -318,8 +329,10 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
'user_angeltype_id' => $member->pivot->id,
|
'user_angeltype_id' => $member->pivot->id,
|
||||||
'supporter' => 0,
|
'supporter' => 0,
|
||||||
]),
|
]),
|
||||||
icon('person-fill-down') . __('Remove supporter rights'),
|
icon('person-fill-down'),
|
||||||
'btn-sm'
|
'btn-sm',
|
||||||
|
'',
|
||||||
|
__('Remove supporter rights'),
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -336,8 +349,10 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
'user_angeltype_id' => $member->pivot->id,
|
'user_angeltype_id' => $member->pivot->id,
|
||||||
'supporter' => 1,
|
'supporter' => 1,
|
||||||
]),
|
]),
|
||||||
icon('person-fill-up') . __('Add supporter rights'),
|
icon('person-fill-up'),
|
||||||
'btn-sm'
|
'btn-sm',
|
||||||
|
'',
|
||||||
|
__('Add supporter rights'),
|
||||||
) :
|
) :
|
||||||
'',
|
'',
|
||||||
button(
|
button(
|
||||||
|
@ -345,8 +360,10 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
'action' => 'delete',
|
'action' => 'delete',
|
||||||
'user_angeltype_id' => $member->pivot->id,
|
'user_angeltype_id' => $member->pivot->id,
|
||||||
]),
|
]),
|
||||||
icon('trash') . __('remove'),
|
icon('trash'),
|
||||||
'btn-sm'
|
'btn-sm btn-danger',
|
||||||
|
'',
|
||||||
|
__('Remove'),
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -432,7 +449,7 @@ function AngelType_view(
|
||||||
ShiftCalendarRenderer $shiftCalendarRenderer,
|
ShiftCalendarRenderer $shiftCalendarRenderer,
|
||||||
$tab
|
$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(
|
return page_with_title(
|
||||||
$link . ' ' . sprintf(__('Team %s'), htmlspecialchars($angeltype->name)),
|
$link . ' ' . sprintf(__('Team %s'), htmlspecialchars($angeltype->name)),
|
||||||
[
|
[
|
||||||
|
@ -537,7 +554,7 @@ function AngelType_view_info(
|
||||||
'/user-angeltypes',
|
'/user-angeltypes',
|
||||||
['action' => 'add', 'angeltype_id' => $angeltype->id]
|
['action' => 'add', 'angeltype_id' => $angeltype->id]
|
||||||
),
|
),
|
||||||
__('Add'),
|
icon('plus-lg') . __('Add'),
|
||||||
'add'
|
'add'
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
@ -549,11 +566,11 @@ function AngelType_view_info(
|
||||||
$info[] = buttons([
|
$info[] = buttons([
|
||||||
button(
|
button(
|
||||||
url('/user-angeltypes', ['action' => 'confirm_all', 'angeltype_id' => $angeltype->id]),
|
url('/user-angeltypes', ['action' => 'confirm_all', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('check-lg') . __('confirm all')
|
icon('check-lg') . __('Confirm all')
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
url('/user-angeltypes', ['action' => 'delete_all', 'angeltype_id' => $angeltype->id]),
|
url('/user-angeltypes', ['action' => 'delete_all', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('trash') . __('deny all')
|
icon('trash') . __('Deny all')
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
$info[] = table($table_headers, $members_unconfirmed);
|
$info[] = table($table_headers, $members_unconfirmed);
|
||||||
|
|
|
@ -42,7 +42,7 @@ function EventConfig_edit_view(
|
||||||
]),
|
]),
|
||||||
div('row', [
|
div('row', [
|
||||||
div('col-md-6', [
|
div('col-md-6', [
|
||||||
form_submit('submit', __('form.save')),
|
form_submit('submit', icon('save') . __('form.save')),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -60,7 +60,7 @@ function location_view(Location $location, ShiftsFilterRenderer $shiftsFilterRen
|
||||||
$selected_tab = count($tabs) - 1;
|
$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(
|
return page_with_title(
|
||||||
(auth()->can('admin_locations') ? $link . ' ' : '') .
|
(auth()->can('admin_locations') ? $link . ' ' : '') .
|
||||||
icon('pin-map-fill') . htmlspecialchars($location->name),
|
icon('pin-map-fill') . htmlspecialchars($location->name),
|
||||||
|
@ -69,7 +69,10 @@ function location_view(Location $location, ShiftsFilterRenderer $shiftsFilterRen
|
||||||
auth()->can('admin_locations') ? buttons([
|
auth()->can('admin_locations') ? buttons([
|
||||||
button(
|
button(
|
||||||
url('/admin/locations/edit/' . $location->id),
|
url('/admin/locations/edit/' . $location->id),
|
||||||
icon('pencil') . __('edit')
|
icon('pencil'),
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
__('form.edit')
|
||||||
),
|
),
|
||||||
]) : '',
|
]) : '',
|
||||||
$dect,
|
$dect,
|
||||||
|
|
|
@ -249,12 +249,16 @@ class ShiftCalendarShiftRenderer
|
||||||
button(
|
button(
|
||||||
url('/user-shifts', ['edit_shift' => $shift->id]),
|
url('/user-shifts', ['edit_shift' => $shift->id]),
|
||||||
icon('pencil'),
|
icon('pencil'),
|
||||||
'btn-' . $class . ' btn-sm border-light text-white'
|
'btn-' . $class . ' btn-sm border-light text-white',
|
||||||
|
'',
|
||||||
|
__('form.edit')
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
url('/user-shifts', ['delete_shift' => $shift->id]),
|
url('/user-shifts', ['delete_shift' => $shift->id]),
|
||||||
icon('trash'),
|
icon('trash'),
|
||||||
'btn-' . $class . ' btn-sm border-light text-white'
|
'btn-' . $class . ' btn-sm border-light text-white',
|
||||||
|
'',
|
||||||
|
__('form.delete')
|
||||||
),
|
),
|
||||||
]) . '</div>';
|
]) . '</div>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ function ShiftEntry_delete_view_admin(Shift $shift, AngelType $angeltype, User $
|
||||||
form([
|
form([
|
||||||
buttons([
|
buttons([
|
||||||
button(user_link($signoff_user->id), icon('x-lg') . __('form.cancel')),
|
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([
|
form([
|
||||||
buttons([
|
buttons([
|
||||||
button(user_link($signoff_user->id), icon('x-lg') . __('form.cancel')),
|
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([
|
||||||
form_select('angeltype_id', __('Angeltype'), $angeltypes_select, $angeltype->id),
|
form_select('angeltype_id', __('Angeltype'), $angeltypes_select, $angeltype->id),
|
||||||
form_select('user_id', __('general.user'), $users_select, $signup_user->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),
|
), true),
|
||||||
form([
|
form([
|
||||||
form_select('user_id', __('general.user'), $users_select, $signup_user->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')),
|
||||||
]),
|
]),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -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),
|
info(sprintf(__('Do you want to sign up for this shift as %s?'), $angeltype->name), true),
|
||||||
form([
|
form([
|
||||||
form_textarea('comment', __('Comment (for your eyes only):'), $comment),
|
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(
|
$link = button(
|
||||||
url('/users', ['action' => 'view', 'user_id' => $angel->id]),
|
url('/users', ['action' => 'view', 'user_id' => $angel->id]),
|
||||||
icon('chevron-left'),
|
icon('chevron-left'),
|
||||||
'btn-sm'
|
'btn-sm',
|
||||||
|
'',
|
||||||
|
__('general.back'),
|
||||||
);
|
);
|
||||||
return page_with_title(
|
return page_with_title(
|
||||||
$link . ' ' . __('Edit shift entry'),
|
$link . ' ' . __('Edit shift entry'),
|
||||||
|
@ -235,7 +244,7 @@ function ShiftEntry_edit_view(
|
||||||
form_info(__('Type:'), htmlspecialchars($type)),
|
form_info(__('Type:'), htmlspecialchars($type)),
|
||||||
$comment,
|
$comment,
|
||||||
join('', $freeload_form),
|
join('', $freeload_form),
|
||||||
form_submit('submit', __('form.save')),
|
form_submit('submit', icon('save') . __('form.save')),
|
||||||
]),
|
]),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
|
@ -173,8 +173,8 @@ function Shift_view(
|
||||||
$buttons = [];
|
$buttons = [];
|
||||||
if ($shift_admin || $admin_shifttypes || $admin_locations) {
|
if ($shift_admin || $admin_shifttypes || $admin_locations) {
|
||||||
$buttons = [
|
$buttons = [
|
||||||
$shift_admin ? button(shift_edit_link($shift), icon('pencil') . __('edit')) : '',
|
$shift_admin ? button(shift_edit_link($shift), icon('pencil'), '', '', __('form.edit')) : '',
|
||||||
$shift_admin ? button(shift_delete_link($shift), icon('trash') . __('delete')) : '',
|
$shift_admin ? button(shift_delete_link($shift), icon('trash'), 'btn-danger', '', __('form.delete')) : '',
|
||||||
$admin_shifttypes
|
$admin_shifttypes
|
||||||
? button(url('/admin/shifttypes/' . $shifttype->id), htmlspecialchars($shifttype->name))
|
? button(url('/admin/shifttypes/' . $shifttype->id), htmlspecialchars($shifttype->name))
|
||||||
: '',
|
: '',
|
||||||
|
@ -211,7 +211,7 @@ function Shift_view(
|
||||||
|
|
||||||
$start = $shift->start->format(__('general.datetime'));
|
$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(
|
return page_with_title(
|
||||||
$link . ' '
|
$link . ' '
|
||||||
. htmlspecialchars($shift->shiftType->name)
|
. htmlspecialchars($shift->shiftType->name)
|
||||||
|
@ -290,12 +290,13 @@ function Shift_view_render_shift_entry(ShiftEntry $shift_entry, $user_shift_admi
|
||||||
$entry .= button_icon(
|
$entry .= button_icon(
|
||||||
url('/user-myshifts', ['edit' => $shift_entry->id, 'id' => $shift_entry->user_id]),
|
url('/user-myshifts', ['edit' => $shift_entry->id, 'id' => $shift_entry->user_id]),
|
||||||
'pencil',
|
'pencil',
|
||||||
'btn-sm'
|
'btn-sm',
|
||||||
|
__('form.edit')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$angeltype = $shift_entry->angelType;
|
$angeltype = $shift_entry->angelType;
|
||||||
$disabled = Shift_signout_allowed($shift, $angeltype, $shift_entry->user_id) ? '' : ' btn-disabled';
|
$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 .= '</div>';
|
$entry .= '</div>';
|
||||||
}
|
}
|
||||||
return $entry;
|
return $entry;
|
||||||
|
|
|
@ -140,21 +140,20 @@ function UserAngelType_add_view(AngelType $angeltype, $users_source, $user_id)
|
||||||
foreach ($users_source as $user_source) {
|
foreach ($users_source as $user_source) {
|
||||||
$users[$user_source->id] = $user_source->displayName;
|
$users[$user_source->id] = $user_source->displayName;
|
||||||
}
|
}
|
||||||
|
$link = button(
|
||||||
return page_with_title(__('Add user to angeltype'), [
|
|
||||||
msg(),
|
|
||||||
buttons([
|
|
||||||
button(
|
|
||||||
url('/angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
url('/angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
||||||
__('back'),
|
icon('chevron-left'),
|
||||||
'back'
|
'btn-sm',
|
||||||
),
|
'',
|
||||||
]),
|
__('general.back')
|
||||||
|
);
|
||||||
|
return page_with_title($link . ' ' . __('Add user to angeltype'), [
|
||||||
|
msg(),
|
||||||
form([
|
form([
|
||||||
form_info(__('Angeltype'), htmlspecialchars($angeltype->name)),
|
form_info(__('Angeltype'), htmlspecialchars($angeltype->name)),
|
||||||
form_checkbox('auto_confirm_user', __('Confirm user'), true),
|
form_checkbox('auto_confirm_user', __('Confirm user'), true),
|
||||||
form_select('user_id', __('general.user'), $users, $user_id),
|
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) : '',
|
auth()->can('admin_user_angeltypes') ? form_checkbox('auto_confirm_user', __('Confirm user'), true) : '',
|
||||||
buttons([
|
buttons([
|
||||||
button(angeltype_link($angeltype->id), icon('x-lg') . __('form.cancel')),
|
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(
|
], url(
|
||||||
'/user-angeltypes',
|
'/user-angeltypes',
|
||||||
|
|
|
@ -19,18 +19,16 @@ use Illuminate\Support\Str;
|
||||||
*/
|
*/
|
||||||
function User_delete_view($user)
|
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(),
|
msg(),
|
||||||
buttons([
|
|
||||||
button(user_edit_link($user->id), icon('chevron-left') . __('back')),
|
|
||||||
]),
|
|
||||||
error(
|
error(
|
||||||
__('Do you really want to delete the user including all his shifts and every other piece of his data?'),
|
__('Do you really want to delete the user including all his shifts and every other piece of his data?'),
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
form([
|
form([
|
||||||
form_password('password', __('Your password'), 'current-password'),
|
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)
|
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(
|
return page_with_title(
|
||||||
$link . ' ' . sprintf(__('%s\'s vouchers'), User_Nick_render($user)),
|
$link . ' ' . sprintf(__('%s\'s vouchers'), User_Nick_render($user)),
|
||||||
[
|
[
|
||||||
|
@ -57,7 +55,7 @@ function User_edit_vouchers_view($user)
|
||||||
form(
|
form(
|
||||||
[
|
[
|
||||||
form_spinner('vouchers', __('Number of vouchers given out'), $user->state->got_voucher),
|
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])
|
url('/users', ['action' => 'edit_vouchers', 'user_id' => $user->id])
|
||||||
),
|
),
|
||||||
|
@ -119,7 +117,15 @@ function Users_view(
|
||||||
? $user->personalData->planned_departure_date->format(__('general.date')) : '';
|
? $user->personalData->planned_departure_date->format(__('general.date')) : '';
|
||||||
$u['last_login_at'] = $user->last_login_at ? $user->last_login_at->format(__('general.datetime')) : '';
|
$u['last_login_at'] = $user->last_login_at ? $user->last_login_at->format(__('general.datetime')) : '';
|
||||||
$u['actions'] = table_buttons([
|
$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;
|
$usersList[] = $u;
|
||||||
}
|
}
|
||||||
|
@ -344,24 +350,28 @@ function User_view_myshift(Shift $shift, $user_source, $its_me)
|
||||||
}
|
}
|
||||||
|
|
||||||
$myshift['actions'] = [
|
$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')) {
|
if ($its_me || auth()->can('user_shifts_admin')) {
|
||||||
$myshift['actions'][] = button(
|
$myshift['actions'][] = button(
|
||||||
url('/user-myshifts', ['edit' => $shift->shift_entry_id, 'id' => $user_source->id]),
|
url('/user-myshifts', ['edit' => $shift->shift_entry_id, 'id' => $user_source->id]),
|
||||||
icon('pencil') . __('edit'),
|
icon('pencil'),
|
||||||
'btn-sm'
|
'btn-sm',
|
||||||
|
'',
|
||||||
|
__('form.edit')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Shift_signout_allowed($shift, (new AngelType())->forceFill(['id' => $shift->angel_type_id]), $user_source->id)) {
|
if (Shift_signout_allowed($shift, (new AngelType())->forceFill(['id' => $shift->angel_type_id]), $user_source->id)) {
|
||||||
$myshift['actions'][] = button(
|
$myshift['actions'][] = button(
|
||||||
shift_entry_delete_link($shift),
|
shift_entry_delete_link($shift),
|
||||||
icon('trash') . __('sign off'),
|
icon('trash'),
|
||||||
'btn-sm'
|
'btn-sm btn-danger',
|
||||||
|
'',
|
||||||
|
__('Sign off')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$myshift['actions'] = table_buttons($myshift['actions']);
|
$myshift['actions'] = '<div class="text-end">' . table_buttons($myshift['actions']) . '</div>';
|
||||||
|
|
||||||
return $myshift;
|
return $myshift;
|
||||||
}
|
}
|
||||||
|
@ -458,18 +468,22 @@ function User_view_worklog(Worklog $worklog, $admin_user_worklog_privilege)
|
||||||
{
|
{
|
||||||
$actions = '';
|
$actions = '';
|
||||||
if ($admin_user_worklog_privilege) {
|
if ($admin_user_worklog_privilege) {
|
||||||
$actions = table_buttons([
|
$actions = '<div class="text-end">' . table_buttons([
|
||||||
button(
|
button(
|
||||||
url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id),
|
url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id),
|
||||||
icon('pencil') . __('edit'),
|
icon('pencil'),
|
||||||
'btn-sm'
|
'btn-sm',
|
||||||
|
'',
|
||||||
|
__('form.edit')
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id . '/delete'),
|
url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id . '/delete'),
|
||||||
icon('trash') . __('delete'),
|
icon('trash'),
|
||||||
'btn-sm'
|
'btn-sm btn-danger',
|
||||||
|
'',
|
||||||
|
__('form.delete')
|
||||||
),
|
),
|
||||||
]);
|
]) . '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -546,7 +560,7 @@ function User_view(
|
||||||
'location' => __('Location'),
|
'location' => __('Location'),
|
||||||
'shift_info' => __('Name & Workmates'),
|
'shift_info' => __('Name & Workmates'),
|
||||||
'comment' => __('worklog.comment'),
|
'comment' => __('worklog.comment'),
|
||||||
'actions' => __('Action'),
|
'actions' => __('general.actions'),
|
||||||
], $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);
|
||||||
|
@ -594,13 +608,13 @@ function User_view(
|
||||||
) : '',
|
) : '',
|
||||||
$admin_user_privilege ? button(
|
$admin_user_privilege ? button(
|
||||||
url('/admin-user', ['id' => $user_source->id]),
|
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) ?
|
(($admin_user_privilege || $auth->can('admin_arrive')) && !$user_source->state->arrived) ?
|
||||||
form([
|
form([
|
||||||
form_hidden('action', 'arrived'),
|
form_hidden('action', 'arrived'),
|
||||||
form_hidden('user', $user_source->id),
|
form_hidden('user', $user_source->id),
|
||||||
form_submit('submit', __('user.arrived'), '', false),
|
form_submit('submit', icon('house') . __('user.arrive'), '', false),
|
||||||
], url('/admin-arrive'), true) : '',
|
], url('/admin-arrive'), true) : '',
|
||||||
($admin_user_privilege || $auth->can('voucher.edit')) && config('enable_voucher') ?
|
($admin_user_privilege || $auth->can('voucher.edit')) && config('enable_voucher') ?
|
||||||
button(
|
button(
|
||||||
|
|
|
@ -183,20 +183,14 @@ msgstr "Team %s"
|
||||||
msgid "%s (not \"%s\")"
|
msgid "%s (not \"%s\")"
|
||||||
msgstr "%s (kein \"%s\")"
|
msgstr "%s (kein \"%s\")"
|
||||||
|
|
||||||
msgid "view"
|
msgid "View"
|
||||||
msgstr "ansehen"
|
msgstr "Ansehen"
|
||||||
|
|
||||||
msgid "edit"
|
msgid "Leave"
|
||||||
msgstr "bearbeiten"
|
msgstr "Verlassen"
|
||||||
|
|
||||||
msgid "delete"
|
msgid "Join"
|
||||||
msgstr "löschen"
|
msgstr "Mitmachen"
|
||||||
|
|
||||||
msgid "leave"
|
|
||||||
msgstr "verlassen"
|
|
||||||
|
|
||||||
msgid "join"
|
|
||||||
msgstr "mitmachen"
|
|
||||||
|
|
||||||
msgid "Event config"
|
msgid "Event config"
|
||||||
msgstr "Event Einstellungen"
|
msgstr "Event Einstellungen"
|
||||||
|
@ -497,11 +491,11 @@ msgstr ""
|
||||||
msgid "Marked angels."
|
msgid "Marked angels."
|
||||||
msgstr "Engel wurden markiert."
|
msgstr "Engel wurden markiert."
|
||||||
|
|
||||||
msgid "back"
|
msgid "general.back"
|
||||||
msgstr "zurück"
|
msgstr "Zurück"
|
||||||
|
|
||||||
msgid "apply"
|
msgid "Apply"
|
||||||
msgstr "anwenden"
|
msgstr "Anwenden"
|
||||||
|
|
||||||
msgid "Angel has been marked as active."
|
msgid "Angel has been marked as active."
|
||||||
msgstr "Engel wurde als aktiv markiert."
|
msgstr "Engel wurde als aktiv markiert."
|
||||||
|
@ -521,13 +515,13 @@ msgstr "Engel hat kein T-Shirt bekommen."
|
||||||
msgid "set active"
|
msgid "set active"
|
||||||
msgstr "setze aktiv"
|
msgstr "setze aktiv"
|
||||||
|
|
||||||
msgid "remove active"
|
msgid "Remove active"
|
||||||
msgstr "entferne aktiv"
|
msgstr "entferne aktiv"
|
||||||
|
|
||||||
msgid "got T-shirt"
|
msgid "Got T-shirt"
|
||||||
msgstr "T-Shirt bekommen"
|
msgstr "T-Shirt bekommen"
|
||||||
|
|
||||||
msgid "remove T-shirt"
|
msgid "Remove T-shirt"
|
||||||
msgstr "entferne T-Shirt"
|
msgstr "entferne T-Shirt"
|
||||||
|
|
||||||
msgid "Sum"
|
msgid "Sum"
|
||||||
|
@ -578,8 +572,8 @@ msgstr "Zurückgesetzt. Engel ist nicht angekommen."
|
||||||
msgid "Angel has been marked as arrived."
|
msgid "Angel has been marked as arrived."
|
||||||
msgstr "Engel wurde als angekommen markiert."
|
msgstr "Engel wurde als angekommen markiert."
|
||||||
|
|
||||||
msgid "reset"
|
msgid "Reset"
|
||||||
msgstr "zurücksetzen"
|
msgstr "Zurücksetzen"
|
||||||
|
|
||||||
msgid "Planned arrival"
|
msgid "Planned arrival"
|
||||||
msgstr "Geplanter Ankunftstag"
|
msgstr "Geplanter Ankunftstag"
|
||||||
|
@ -641,9 +635,6 @@ msgstr "Bitte einen Schichttyp wählen."
|
||||||
msgid "Location"
|
msgid "Location"
|
||||||
msgstr "Ort"
|
msgstr "Ort"
|
||||||
|
|
||||||
msgid "Delete"
|
|
||||||
msgstr "löschen"
|
|
||||||
|
|
||||||
msgid "Answer questions"
|
msgid "Answer questions"
|
||||||
msgstr "Fragen beantworten"
|
msgstr "Fragen beantworten"
|
||||||
|
|
||||||
|
@ -931,14 +922,14 @@ msgstr ""
|
||||||
"Du bist noch nicht für diesen Engeltyp bestätigt. Bitte gehe zur Einführung "
|
"Du bist noch nicht für diesen Engeltyp bestätigt. Bitte gehe zur Einführung "
|
||||||
"für %s um bestätigt zu werden."
|
"für %s um bestätigt zu werden."
|
||||||
|
|
||||||
msgid "confirm"
|
msgid "Confirm"
|
||||||
msgstr "bestätigen"
|
msgstr "Bestätigen"
|
||||||
|
|
||||||
msgid "deny"
|
msgid "Deny"
|
||||||
msgstr "ablehnen"
|
msgstr "Ablehnen"
|
||||||
|
|
||||||
msgid "remove"
|
msgid "Remove"
|
||||||
msgstr "entfernen"
|
msgstr "Entfernen"
|
||||||
|
|
||||||
msgid "Driver"
|
msgid "Driver"
|
||||||
msgstr "Fahrer"
|
msgstr "Fahrer"
|
||||||
|
@ -958,10 +949,10 @@ msgstr "Mitglieder"
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr "Hinzufügen"
|
msgstr "Hinzufügen"
|
||||||
|
|
||||||
msgid "confirm all"
|
msgid "Confirm all"
|
||||||
msgstr "Alle bestätigen"
|
msgstr "Alle bestätigen"
|
||||||
|
|
||||||
msgid "deny all"
|
msgid "Deny all"
|
||||||
msgstr "Alle ablehnen"
|
msgstr "Alle ablehnen"
|
||||||
|
|
||||||
msgid "Membership"
|
msgid "Membership"
|
||||||
|
@ -1184,8 +1175,8 @@ msgstr "Schicht endet %c"
|
||||||
msgid "Shift ended %c"
|
msgid "Shift ended %c"
|
||||||
msgstr "Schicht endete %c"
|
msgstr "Schicht endete %c"
|
||||||
|
|
||||||
msgid "sign off"
|
msgid "Sign off"
|
||||||
msgstr "austragen"
|
msgstr "Austragen"
|
||||||
|
|
||||||
msgid "Sum:"
|
msgid "Sum:"
|
||||||
msgstr "Summe:"
|
msgstr "Summe:"
|
||||||
|
@ -1208,9 +1199,6 @@ msgstr "Dauer"
|
||||||
msgid "Name & Workmates"
|
msgid "Name & Workmates"
|
||||||
msgstr "Name & Kollegen"
|
msgstr "Name & Kollegen"
|
||||||
|
|
||||||
msgid "Action"
|
|
||||||
msgstr "Aktion"
|
|
||||||
|
|
||||||
msgid "You have done enough."
|
msgid "You have done enough."
|
||||||
msgstr "Du hast genug gemacht."
|
msgstr "Du hast genug gemacht."
|
||||||
|
|
||||||
|
@ -1363,10 +1351,10 @@ msgstr "Ausgegebene Goodies"
|
||||||
msgid "Goodie statistic"
|
msgid "Goodie statistic"
|
||||||
msgstr "Goodie Statistik"
|
msgstr "Goodie Statistik"
|
||||||
|
|
||||||
msgid "remove goodie"
|
msgid "Remove goodie"
|
||||||
msgstr "entferne Goodie"
|
msgstr "Goodie entfernen"
|
||||||
|
|
||||||
msgid "got goodie"
|
msgid "Got goodie"
|
||||||
msgstr "Goodie bekommen"
|
msgstr "Goodie bekommen"
|
||||||
|
|
||||||
msgid "Goodie?"
|
msgid "Goodie?"
|
||||||
|
@ -1830,6 +1818,9 @@ msgstr "Aktiv (erzwungen)"
|
||||||
msgid "user.arrived"
|
msgid "user.arrived"
|
||||||
msgstr "Angekommen"
|
msgstr "Angekommen"
|
||||||
|
|
||||||
|
msgid "user.arrive"
|
||||||
|
msgstr "Ankommen"
|
||||||
|
|
||||||
msgid "user.got_shirt"
|
msgid "user.got_shirt"
|
||||||
msgstr "T-Shirt bekommen"
|
msgstr "T-Shirt bekommen"
|
||||||
|
|
||||||
|
|
|
@ -531,6 +531,9 @@ msgstr "Active (forced)"
|
||||||
msgid "user.arrived"
|
msgid "user.arrived"
|
||||||
msgstr "Arrived"
|
msgstr "Arrived"
|
||||||
|
|
||||||
|
msgid "user.arrive"
|
||||||
|
msgstr "Arrive"
|
||||||
|
|
||||||
msgid "user.got_shirt"
|
msgid "user.got_shirt"
|
||||||
msgstr "Got T-shirt"
|
msgstr "Got T-shirt"
|
||||||
|
|
||||||
|
@ -848,3 +851,9 @@ msgstr ""
|
||||||
|
|
||||||
msgid "form.recover"
|
msgid "form.recover"
|
||||||
msgstr "Recover"
|
msgstr "Recover"
|
||||||
|
|
||||||
|
msgid "general.actions"
|
||||||
|
msgstr "Actions"
|
||||||
|
|
||||||
|
msgid "general.back"
|
||||||
|
msgstr "Back"
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{% if not is_index|default(false) %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
{{ block('title') }}
|
{{ block('title') }}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
'hide_label': true,
|
'hide_label': true,
|
||||||
}) }}
|
}) }}
|
||||||
|
|
||||||
{{ f.submit(__('form.search')) }}
|
{{ f.submit(__('form.search'), {'icon_left': 'search'}) }}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% block title %}{{ schedule ? __('schedule.edit.title') : __('schedule.import.title') }}{% endblock %}
|
{% block title %}{{ schedule ? __('schedule.edit.title') : __('schedule.import.title') }}{% endblock %}
|
||||||
|
|
||||||
{% block content_title %}
|
{% 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') }}
|
{{ block('title') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% block title %}{{ __('schedule.import.load.title') }}{% endblock %}
|
{% block title %}{{ __('schedule.import.load.title') }}{% endblock %}
|
||||||
|
|
||||||
{% block content_title %}
|
{% 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') }}
|
{{ block('title') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<h2>{{ __('schedule.import.shifts.delete') }}</h2>
|
<h2>{{ __('schedule.import.shifts.delete') }}</h2>
|
||||||
{{ _self.shiftsTable(shifts.delete) }}
|
{{ _self.shiftsTable(shifts.delete) }}
|
||||||
|
|
||||||
{{ f.submit(__('form.import')) }}
|
{{ f.submit(__('form.import'), {'icon_left': 'box-arrow-in-down'}) }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{{ 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 %}
|
{% block content_title %}{{ block('title') }}{% endblock %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
||||||
{% if shifttype %}
|
{% 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 %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{% if not is_index|default(false) %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
{{ block('title') }}
|
{{ block('title') }}
|
||||||
|
|
|
@ -12,8 +12,13 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{{ m.alert(__('worklog.delete.info', [m.user(user)]), 'danger', true) }}
|
{{ m.alert(__('worklog.delete.info', [m.user(user)]), 'danger', true) }}
|
||||||
{{ m.button(__('form.cancel'), url('/users?action=view&user_id=' ~ user.id)) }}
|
{{ m.button(__('form.cancel'),
|
||||||
{{ f.submit(__('form.delete'), {'btn_type': 'danger'}) }}
|
url('/users?action=view&user_id=' ~ user.id),
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
'x-lg') }}
|
||||||
|
{{ f.delete(__('form.delete')) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{{ 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') }}: <small>{{ m.user(userdata) }}</small>
|
{{ block('title') }}: <small>{{ m.user(userdata) }}</small>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
}) }}
|
}) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{{ f.submit(__('form.save')) }}
|
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{{ 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') }}
|
{{ block('title') }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
@ -40,7 +41,7 @@
|
||||||
'required': true,
|
'required': true,
|
||||||
'max_length': 200,
|
'max_length': 200,
|
||||||
}) }}
|
}) }}
|
||||||
{{ f.submit(__('form.save')) }}
|
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -159,6 +159,68 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-6 col-md-12 mb-4">
|
||||||
|
<span id="icons" class="ref-id"></span>
|
||||||
|
<h3>Icons <a href="#icons" class="ref-link">{{ m.icon('link') }}</a></h3>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 col-lg-4 mb-4">
|
||||||
|
cancel: {{ m.icon('x-lg') }}<br>
|
||||||
|
delete: {{ m.icon('trash', 'danger') }}<br>
|
||||||
|
edit: {{ m.icon('pencil') }}<br>
|
||||||
|
preview: {{ m.icon('eye','info') }}<br>
|
||||||
|
reset: {{ m.icon('arrow-counterclockwise') }}<br>
|
||||||
|
save: {{ m.icon('save', 'primary') }}<br>
|
||||||
|
<br>
|
||||||
|
{{ f.button('Cancel', {'icon_left': 'x-lg'}) }}<br class="mb-3">
|
||||||
|
{{ f.delete('Delete') }}<br class="mb-3">
|
||||||
|
{{ f.button('Edit', {'icon_left': 'pencil'}) }}<br class="mb-3">
|
||||||
|
{{ f.button('Reset', {'icon_left': 'arrow-counterclockwise'}) }}<br class="mb-3">
|
||||||
|
{{ f.submit('Save', {'icon_left': 'save'}) }}<br class="mb-3">
|
||||||
|
{{ f.button('View', {'icon_left': 'eye', 'btn_type': 'info'}) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 col-lg-4 mb-4">
|
||||||
|
angel: {{ m.angel() }}<br>
|
||||||
|
dashboard: {{ m.icon('speedometer2') }}<br>
|
||||||
|
documentation: {{ m.icon('question-circle') }}<br>
|
||||||
|
drivers license / ifsg: {{ m.icon('card-checklist') }}<br>
|
||||||
|
form required: {{ f.entry_required() }}<br>
|
||||||
|
heading add / add anything else: {{ m.icon('plus-lg') }}<br>
|
||||||
|
heading back: {{ m.icon('chevron-left') }}<br>
|
||||||
|
info: {{ m.icon('info-circle') }} / {{ m.icon('info-circle-fill', 'info') }}<br>
|
||||||
|
info hidden: {{ m.icon('eye-slash') }}<br>
|
||||||
|
language: {{ m.icon('translate') }}<br>
|
||||||
|
location: {{ m.icon('pin-map-fill') }}<br>
|
||||||
|
remove / substract: {{ m.icon('dash-lg') }}<br>
|
||||||
|
requires introduction: {{ m.icon('mortarboard-fill') }}<br>
|
||||||
|
search: {{ m.icon('search') }}<br>
|
||||||
|
settings: {{ m.icon('gear-fill') }}<br>
|
||||||
|
sign off / leave: {{ m.icon('box-arrow-right') }}<br>
|
||||||
|
sign up / import: {{ m.icon('box-arrow-in-right') }}<br>
|
||||||
|
sign up allowed: {{ m.icon('pencil-square') }}<br>
|
||||||
|
yes / no: {{ m.iconBool(true) }} / {{ m.iconBool(false) }}<br>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 col-lg-4 mb-4">
|
||||||
|
angeltypes: {{ m.icon('person-lines-fill') }}<br>
|
||||||
|
arrived: {{ m.icon('house') }}<br>
|
||||||
|
comment: {{ m.icon('chat-left-text') }}<br>
|
||||||
|
email: {{ m.icon('envelope') }}<br>
|
||||||
|
iCal: {{ m.icon('calendar-week') }}<br>
|
||||||
|
json export: {{ m.icon('braces') }}<br>
|
||||||
|
lists: {{ m.icon('list') }}<br>
|
||||||
|
logout: {{ m.icon('box-arrow-left') }}<br>
|
||||||
|
message: {{ m.icon('envelope') }}<br>
|
||||||
|
next shift: {{ m.icon('clock') }}<br>
|
||||||
|
occupancy: {{ m.icon('person-fill-slash') }}<br>
|
||||||
|
password: {{ m.icon('key-fill') }}<br>
|
||||||
|
phone: {{ m.icon('phone') }}<br>
|
||||||
|
T-shirt / goodie: {{ m.icon('person') }}<br>
|
||||||
|
supporter: {{ m.icon('patch-check') }}<br>
|
||||||
|
user settings: {{ m.icon('person-fill-gear') }}<br>
|
||||||
|
voucher: {{ m.icon('valentine') }}<br>
|
||||||
|
worklog / history: {{ m.icon('clock-history') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{{ m.button(m.icon('chevron-left'), url('/faq'), 'secondary', 'sm') }}
|
{{ m.button(m.icon('chevron-left'), url('/faq'), 'secondary', 'sm', __('general.back')) }}
|
||||||
{{ block('title') }}
|
{{ block('title') }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
{% if has_permission_to('faq.edit') %}
|
{% if has_permission_to('faq.edit') %}
|
||||||
<span class="ms-auto">
|
<span class="ms-auto">
|
||||||
{{ 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')) }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<form class="ps-1"
|
<form class="ps-1"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>
|
<h1>
|
||||||
{{ m.button(m.icon('chevron-left'), url('/messages'), null, 'sm') }}
|
{{ m.button(m.icon('chevron-left'), url('/messages'), null, 'sm', __('general.back')) }}
|
||||||
{{ __('message.title') }}: {{ m.user(other_user, {'pronoun': true}) }}
|
{{ __('message.title') }}: {{ m.user(other_user, {'pronoun': true}) }}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
enctype="multipart/form-data" method="post" class="ms-2"
|
enctype="multipart/form-data" method="post" class="ms-2"
|
||||||
>
|
>
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ f.submit(m.icon('trash'), {'btn_type': 'primary', 'size': 'sm'}) }}
|
{{ f.delete(null, {'btn_type': 'sm btn-danger'}) }}
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{{ m.button(m.icon('chevron-left'), url('/news'), null, 'sm') }}
|
{{ m.button(m.icon('chevron-left'), url('/news'), null, 'sm', __('general.back')) }}
|
||||||
{{ block('title') }}
|
{{ block('title') }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{% if not is_overview|default(false) %}
|
{% 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 %}
|
{% endif %}
|
||||||
{{ block('title') }}
|
{{ block('title') }}
|
||||||
{%- if has_permission_to('admin_news') and is_overview|default(false) -%}
|
{%- if has_permission_to('admin_news') and is_overview|default(false) -%}
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
|
|
||||||
{% if has_permission_to('admin_news') %}
|
{% if has_permission_to('admin_news') %}
|
||||||
<div class="d-flex ms-auto">
|
<div class="d-flex ms-auto">
|
||||||
{{ 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')) }}
|
||||||
|
|
||||||
<form class="ps-1"
|
<form class="ps-1"
|
||||||
action="{{ url('/admin/news/' ~ news.id) }}" enctype="multipart/form-data"
|
action="{{ url('/admin/news/' ~ news.id) }}" enctype="multipart/form-data"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{{ m.button(m.icon('chevron-left'), url('/questions'), null, 'sm') }}
|
{{ m.button(m.icon('chevron-left'), url('/questions'), null, 'sm', __('general.back')) }}
|
||||||
{{ block('title') }}
|
{{ block('title') }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
<div class="d-flex ms-auto">
|
<div class="d-flex ms-auto">
|
||||||
{% if has_permission_to('question.edit') %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
{% if question.user.id == user.id or has_permission_to('question.edit') %}
|
{% if question.user.id == user.id or has_permission_to('question.edit') %}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<h1>
|
<h1>
|
||||||
{{ has_permission_to('admin_user')
|
{{ 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') }}
|
{{ __('registration.title') }}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
{{ f.checkbox('ifsg_certificate', __('settings.certificates.ifsg'), {
|
{{ f.checkbox('ifsg_certificate', __('settings.certificates.ifsg'), {
|
||||||
'checked': certificates.ifsg_certificate,
|
'checked': certificates.ifsg_certificate,
|
||||||
}) }}
|
}) }}
|
||||||
{{ f.submit(__('form.save')) }}
|
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
'checked': certificates.has_car,
|
'checked': certificates.has_car,
|
||||||
}) }}
|
}) }}
|
||||||
|
|
||||||
{{ f.submit(__('form.save')) }}
|
{{ f.submit(__('form.save'), {'icon_left': 'save'} ) }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
{{ f.select('select_language', __('settings.language'), languages, {
|
{{ f.select('select_language', __('settings.language'), languages, {
|
||||||
'selected': current_language,
|
'selected': current_language,
|
||||||
}) }}
|
}) }}
|
||||||
{{ f.submit(__('form.save')) }}
|
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -35,13 +35,13 @@
|
||||||
<form method="post" action="{{ url('/oauth/' ~ name ~ '/connect') }}">
|
<form method="post" action="{{ url('/oauth/' ~ name ~ '/connect') }}">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
|
|
||||||
{{ f.submit(__('form.connect'), {'size' : 'sm'}) }}
|
{{ f.submit(__('form.connect'), {'size' : 'sm', 'icon_left': 'box-arrow-in-right'}) }}
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
<form method="post" action="{{ url('/oauth/' ~ name ~ '/disconnect') }}">
|
<form method="post" action="{{ url('/oauth/' ~ name ~ '/disconnect') }}">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
|
|
||||||
{{ f.submit(__('form.disconnect'), {'btn_type': 'danger', 'size' : 'sm'}) }}
|
{{ f.submit(__('form.disconnect'), {'btn_type': 'danger', 'size' : 'sm', 'icon_left': 'box-arrow-right'}) }}
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
'required': true,
|
'required': true,
|
||||||
'autocomplete': 'new-password',
|
'autocomplete': 'new-password',
|
||||||
}) }}
|
}) }}
|
||||||
{{ f.submit(__('form.save')) }}
|
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{{ f.submit(__('form.save')) }}
|
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<form action="" enctype="multipart/form-data" method="post">
|
<form action="" enctype="multipart/form-data" method="post">
|
||||||
{{ csrf() }}
|
{{ csrf() }}
|
||||||
{{ f.hidden('id', 'all') }}
|
{{ 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': ''}) }}
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</th>
|
</th>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
{{ f.hidden('id', session.id[:15]) }}
|
{{ f.hidden('id', session.id[:15]) }}
|
||||||
{{ f.submit(
|
{{ 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'),}
|
||||||
) }}
|
) }}
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
{{ f.select('select_theme', __('settings.theme'), themes, {
|
{{ f.select('select_theme', __('settings.theme'), themes, {
|
||||||
'selected': current_theme,
|
'selected': current_theme,
|
||||||
}) }}
|
}) }}
|
||||||
{{ f.submit(__('form.save')) }}
|
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue