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