use better and more icons
This commit is contained in:
parent
3e22315caa
commit
7a376399b8
|
@ -296,7 +296,7 @@ function angeltypes_list_controller()
|
||||||
$actions = [
|
$actions = [
|
||||||
button(
|
button(
|
||||||
page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
||||||
__('view'),
|
icon('eye') . __('view'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
@ -304,12 +304,12 @@ function angeltypes_list_controller()
|
||||||
if (auth()->can('admin_angel_types')) {
|
if (auth()->can('admin_angel_types')) {
|
||||||
$actions[] = button(
|
$actions[] = button(
|
||||||
page_link_to('angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]),
|
page_link_to('angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]),
|
||||||
__('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
);
|
);
|
||||||
$actions[] = button(
|
$actions[] = button(
|
||||||
page_link_to('angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype->id]),
|
page_link_to('angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype->id]),
|
||||||
__('delete'),
|
icon('trash') . __('delete'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -321,18 +321,18 @@ function angeltypes_list_controller()
|
||||||
'user_angeltypes',
|
'user_angeltypes',
|
||||||
['action' => 'delete', 'user_angeltype_id' => $angeltype->user_angeltype_id]
|
['action' => 'delete', 'user_angeltype_id' => $angeltype->user_angeltype_id]
|
||||||
),
|
),
|
||||||
__('leave'),
|
icon('box-arrow-right') . __('leave'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$actions[] = button(
|
$actions[] = button(
|
||||||
page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
||||||
__('join'),
|
icon('box-arrow-in-right') . __('join'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$angeltype->is_restricted = $angeltype->restricted ? icon('book') : '';
|
$angeltype->is_restricted = $angeltype->restricted ? icon('mortarboard-fill') : '';
|
||||||
$angeltype->no_self_signup_allowed = $angeltype->no_self_signup ? '' : icon('pencil-square');
|
$angeltype->no_self_signup_allowed = $angeltype->no_self_signup ? '' : icon('pencil-square');
|
||||||
|
|
||||||
$angeltype->name = '<a href="'
|
$angeltype->name = '<a href="'
|
||||||
|
|
|
@ -102,7 +102,7 @@ function admin_free()
|
||||||
: icon('eye-slash'),
|
: icon('eye-slash'),
|
||||||
'actions' =>
|
'actions' =>
|
||||||
auth()->can('admin_user')
|
auth()->can('admin_user')
|
||||||
? button(page_link_to('admin_user', ['id' => $usr->id]), __('edit'), 'btn-sm')
|
? button(page_link_to('admin_user', ['id' => $usr->id]), icon('pencil') . __('edit'), 'btn-sm')
|
||||||
: ''
|
: ''
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ function admin_groups()
|
||||||
'admin_groups',
|
'admin_groups',
|
||||||
['action' => 'edit', 'id' => $group->id]
|
['action' => 'edit', 'id' => $group->id]
|
||||||
),
|
),
|
||||||
__('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
|
@ -30,12 +30,12 @@ function admin_rooms()
|
||||||
'actions' => table_buttons([
|
'actions' => table_buttons([
|
||||||
button(
|
button(
|
||||||
page_link_to('admin_rooms', ['show' => 'edit', 'id' => $room->id]),
|
page_link_to('admin_rooms', ['show' => 'edit', 'id' => $room->id]),
|
||||||
__('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room->id]),
|
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room->id]),
|
||||||
__('delete'),
|
icon('trash') . __('delete'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
|
|
|
@ -307,7 +307,7 @@ function admin_shifts()
|
||||||
foreach ($shifts as $shift) {
|
foreach ($shifts as $shift) {
|
||||||
$shifts_table_entry = [
|
$shifts_table_entry = [
|
||||||
'timeslot' =>
|
'timeslot' =>
|
||||||
icon('clock') . ' '
|
icon('clock-history') . ' '
|
||||||
. date('Y-m-d H:i', $shift['start'])
|
. date('Y-m-d H:i', $shift['start'])
|
||||||
. ' - '
|
. ' - '
|
||||||
. date('H:i', $shift['end'])
|
. date('H:i', $shift['end'])
|
||||||
|
|
|
@ -257,7 +257,12 @@ function view_user_shifts()
|
||||||
msg(),
|
msg(),
|
||||||
view(__DIR__ . '/../../resources/views/pages/user-shifts.html', [
|
view(__DIR__ . '/../../resources/views/pages/user-shifts.html', [
|
||||||
'title' => shifts_title(),
|
'title' => shifts_title(),
|
||||||
'room_select' => make_select($rooms, $shiftsFilter->getRooms(), 'rooms', __('Rooms')),
|
'room_select' => make_select(
|
||||||
|
$rooms,
|
||||||
|
$shiftsFilter->getRooms(),
|
||||||
|
'rooms',
|
||||||
|
icon('pin-map-fill') . __('Rooms')
|
||||||
|
),
|
||||||
'start_select' => html_select_key(
|
'start_select' => html_select_key(
|
||||||
'start_day',
|
'start_day',
|
||||||
'start_day',
|
'start_day',
|
||||||
|
@ -276,7 +281,7 @@ function view_user_shifts()
|
||||||
$types,
|
$types,
|
||||||
$shiftsFilter->getTypes(),
|
$shiftsFilter->getTypes(),
|
||||||
'types',
|
'types',
|
||||||
__('Angeltypes') . '<sup>1</sup>',
|
icon('person-lines-fill') . __('Angeltypes') . '<sup>1</sup>',
|
||||||
[
|
[
|
||||||
button(
|
button(
|
||||||
'javascript:checkOwnTypes(\'selection_types\', ' . json_encode($ownTypes) . ')',
|
'javascript:checkOwnTypes(\'selection_types\', ' . json_encode($ownTypes) . ')',
|
||||||
|
@ -285,7 +290,12 @@ function view_user_shifts()
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
'filled_select' => make_select($filled, $shiftsFilter->getFilled(), 'filled', __('Occupancy')),
|
'filled_select' => make_select(
|
||||||
|
$filled,
|
||||||
|
$shiftsFilter->getFilled(),
|
||||||
|
'filled',
|
||||||
|
icon('person-fill-slash') . __('Occupancy')
|
||||||
|
),
|
||||||
'task_notice' =>
|
'task_notice' =>
|
||||||
'<sup>1</sup>'
|
'<sup>1</sup>'
|
||||||
. __('The tasks shown here are influenced by the angeltypes you joined already!')
|
. __('The tasks shown here are influenced by the angeltypes you joined already!')
|
||||||
|
@ -378,7 +388,7 @@ function make_select($items, $selected, $name, $title = null, $additionalButtons
|
||||||
. '<input class="form-check-input" type="checkbox" id="' . $id . '" name="' . $name . '[]" value="' . $i['id'] . '" '
|
. '<input class="form-check-input" type="checkbox" id="' . $id . '" name="' . $name . '[]" value="' . $i['id'] . '" '
|
||||||
. (in_array($i['id'], $selected) ? ' checked="checked"' : '')
|
. (in_array($i['id'], $selected) ? ' checked="checked"' : '')
|
||||||
. '><label class="form-check-label" for="' . $id . '">' . $i['name'] . '</label>'
|
. '><label class="form-check-label" for="' . $id . '">' . $i['name'] . '</label>'
|
||||||
. (!isset($i['enabled']) || $i['enabled'] ? '' : icon('book'))
|
. (!isset($i['enabled']) || $i['enabled'] ? '' : icon('mortarboard-fill'))
|
||||||
. '</div>';
|
. '</div>';
|
||||||
}
|
}
|
||||||
$html .= '<div id="selection_' . $name . '" class="selection ' . $name . '">' . "\n";
|
$html .= '<div id="selection_' . $name . '" class="selection ' . $name . '">' . "\n";
|
||||||
|
|
|
@ -68,7 +68,7 @@ function make_user_submenu()
|
||||||
page_link_to('settings/profile'),
|
page_link_to('settings/profile'),
|
||||||
__('Settings'),
|
__('Settings'),
|
||||||
$page == 'settings/profile',
|
$page == 'settings/profile',
|
||||||
'gear'
|
'person-fill-gear'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ function make_room_navigation($menu)
|
||||||
$room_menu[] = toolbar_dropdown_item_divider();
|
$room_menu[] = toolbar_dropdown_item_divider();
|
||||||
}
|
}
|
||||||
foreach ($rooms as $room) {
|
foreach ($rooms as $room) {
|
||||||
$room_menu[] = toolbar_dropdown_item(room_link($room), $room->name, false, 'geo-alt');
|
$room_menu[] = toolbar_dropdown_item(room_link($room), $room->name, false, 'pin-map-fill');
|
||||||
}
|
}
|
||||||
if (count($room_menu) > 0) {
|
if (count($room_menu) > 0) {
|
||||||
$menu[] = toolbar_dropdown('map-marker', __('Rooms'), $room_menu);
|
$menu[] = toolbar_dropdown('map-marker', __('Rooms'), $room_menu);
|
||||||
|
|
|
@ -26,7 +26,7 @@ function AngelType_name_render(AngelType $angeltype, $plain = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<a href="' . angeltype_link($angeltype->id) . '">'
|
return '<a href="' . angeltype_link($angeltype->id) . '">'
|
||||||
. ($angeltype->restricted ? icon('book') : '') . $angeltype->name
|
. ($angeltype->restricted ? icon('mortarboard-fill') : '') . $angeltype->name
|
||||||
. '</a>';
|
. '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ function AngelType_render_membership(AngelType $user_angeltype)
|
||||||
if (!empty($user_angeltype->user_angeltype_id)) {
|
if (!empty($user_angeltype->user_angeltype_id)) {
|
||||||
if ($user_angeltype->restricted) {
|
if ($user_angeltype->restricted) {
|
||||||
if (empty($user_angeltype->confirm_user_id)) {
|
if (empty($user_angeltype->confirm_user_id)) {
|
||||||
return icon('book') . __('Unconfirmed');
|
return icon('mortarboard-fill') . __('Unconfirmed');
|
||||||
} elseif ($user_angeltype->supporter) {
|
} elseif ($user_angeltype->supporter) {
|
||||||
return icon_bool(true) . __('Supporter');
|
return icon_bool(true) . __('Supporter');
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ function AngelType_edit_view(AngelType $angeltype, bool $supporter_mode)
|
||||||
{
|
{
|
||||||
return page_with_title(sprintf(__('Edit %s'), $angeltype->name), [
|
return page_with_title(sprintf(__('Edit %s'), $angeltype->name), [
|
||||||
buttons([
|
buttons([
|
||||||
button(page_link_to('angeltypes'), __('Angeltypes'), 'back')
|
button(page_link_to('angeltypes'), icon('person-lines-fill') . __('Angeltypes'), 'back')
|
||||||
]),
|
]),
|
||||||
msg(),
|
msg(),
|
||||||
form([
|
form([
|
||||||
|
@ -152,20 +152,20 @@ function AngelType_view_buttons(
|
||||||
$user
|
$user
|
||||||
) {
|
) {
|
||||||
$buttons = [
|
$buttons = [
|
||||||
button(page_link_to('angeltypes'), __('Angeltypes'), 'back')
|
button(page_link_to('angeltypes'), icon('person-lines-fill') . __('Angeltypes'), 'back')
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($angeltype->requires_driver_license) {
|
if ($angeltype->requires_driver_license) {
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
user_driver_license_edit_link($user),
|
user_driver_license_edit_link($user),
|
||||||
icon('wallet2') . __('my driving license')
|
icon('person-vcard') . __('my driving license')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($user_angeltype)) {
|
if (is_null($user_angeltype)) {
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
||||||
__('join'),
|
icon('box-arrow-in-right') . __('join'),
|
||||||
'add'
|
'add'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -181,21 +181,21 @@ function AngelType_view_buttons(
|
||||||
}
|
}
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
page_link_to('user_angeltypes', ['action' => 'delete', 'user_angeltype_id' => $user_angeltype['id']]),
|
page_link_to('user_angeltypes', ['action' => 'delete', 'user_angeltype_id' => $user_angeltype['id']]),
|
||||||
__('leave')
|
icon('box-arrow-right') . __('leave')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($admin_angeltypes || $supporter) {
|
if ($admin_angeltypes || $supporter) {
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
page_link_to('angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]),
|
page_link_to('angeltypes', ['action' => 'edit', 'angeltype_id' => $angeltype->id]),
|
||||||
__('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'edit'
|
'edit'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($admin_angeltypes) {
|
if ($admin_angeltypes) {
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
page_link_to('angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype->id]),
|
page_link_to('angeltypes', ['action' => 'delete', 'angeltype_id' => $angeltype->id]),
|
||||||
__('delete'),
|
icon('trash') . __('delete'),
|
||||||
'delete'
|
'delete'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
'user_angeltype_id' => $member['user_angeltype_id'],
|
'user_angeltype_id' => $member['user_angeltype_id'],
|
||||||
'supporter' => 0
|
'supporter' => 0
|
||||||
]),
|
]),
|
||||||
__('Remove supporter rights'),
|
icon('person-fill-down') . __('Remove supporter rights'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
|
@ -277,7 +277,7 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
'user_angeltype_id' => $member['user_angeltype_id'],
|
'user_angeltype_id' => $member['user_angeltype_id'],
|
||||||
'supporter' => 1
|
'supporter' => 1
|
||||||
]),
|
]),
|
||||||
__('Add supporter rights'),
|
icon('person-fill-up') . __('Add supporter rights'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
) :
|
) :
|
||||||
'',
|
'',
|
||||||
|
@ -286,7 +286,7 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
'action' => 'delete',
|
'action' => 'delete',
|
||||||
'user_angeltype_id' => $member['user_angeltype_id']
|
'user_angeltype_id' => $member['user_angeltype_id']
|
||||||
]),
|
]),
|
||||||
__('remove'),
|
icon('trash') . __('remove'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
|
@ -529,7 +529,7 @@ function AngelTypes_list_view($angeltypes, bool $admin_angeltypes)
|
||||||
]),
|
]),
|
||||||
table([
|
table([
|
||||||
'name' => __('Name'),
|
'name' => __('Name'),
|
||||||
'is_restricted' => icon('book') . __('Requires introduction'),
|
'is_restricted' => icon('mortarboard-fill') . __('Requires introduction'),
|
||||||
'no_self_signup_allowed' => icon('pencil-square') . __('Self Sign Up Allowed'),
|
'no_self_signup_allowed' => icon('pencil-square') . __('Self Sign Up Allowed'),
|
||||||
'membership' => __('Membership'),
|
'membership' => __('Membership'),
|
||||||
'actions' => ''
|
'actions' => ''
|
||||||
|
@ -561,12 +561,12 @@ function AngelTypes_about_view_angeltype(AngelType $angeltype)
|
||||||
'user_angeltypes',
|
'user_angeltypes',
|
||||||
['action' => 'delete', 'user_angeltype_id' => $angeltype->user_angeltype_id]
|
['action' => 'delete', 'user_angeltype_id' => $angeltype->user_angeltype_id]
|
||||||
),
|
),
|
||||||
__('leave')
|
icon('box-arrow-right') . __('leave')
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$buttons[] = button(
|
$buttons[] = button(
|
||||||
page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
||||||
__('join'),
|
icon('box-arrow-in-right') . __('join'),
|
||||||
'add'
|
'add'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ function public_dashboard_view($stats, $free_shifts)
|
||||||
*/
|
*/
|
||||||
function public_dashboard_shift_render($shift)
|
function public_dashboard_shift_render($shift)
|
||||||
{
|
{
|
||||||
$panel_body = icon('clock') . $shift['start'] . ' - ' . $shift['end'];
|
$panel_body = icon('clock-history') . $shift['start'] . ' - ' . $shift['end'];
|
||||||
$panel_body .= ' (' . $shift['duration'] . ' h)';
|
$panel_body .= ' (' . $shift['duration'] . ' h)';
|
||||||
|
|
||||||
$panel_body .= '<br>' . icon('list-task') . $shift['shifttype_name'];
|
$panel_body .= '<br>' . icon('list-task') . $shift['shifttype_name'];
|
||||||
|
@ -76,7 +76,7 @@ function public_dashboard_shift_render($shift)
|
||||||
$panel_body .= ' (' . $shift['title'] . ')';
|
$panel_body .= ' (' . $shift['title'] . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$panel_body .= '<br>' . icon('geo-alt') . $shift['room_name'];
|
$panel_body .= '<br>' . icon('pin-map-fill') . $shift['room_name'];
|
||||||
|
|
||||||
foreach ($shift['needed_angels'] as $needed_angels) {
|
foreach ($shift['needed_angels'] as $needed_angels) {
|
||||||
$panel_body .= '<br>' . icon('person')
|
$panel_body .= '<br>' . icon('person')
|
||||||
|
|
|
@ -57,17 +57,17 @@ function Room_view(Room $room, ShiftsFilterRenderer $shiftsFilterRenderer, Shift
|
||||||
$selected_tab = count($tabs) - 1;
|
$selected_tab = count($tabs) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return page_with_title(icon('geo-alt') . $room->name, [
|
return page_with_title(icon('pin-map-fill') . $room->name, [
|
||||||
$assignNotice,
|
$assignNotice,
|
||||||
auth()->can('admin_rooms') ? buttons([
|
auth()->can('admin_rooms') ? buttons([
|
||||||
button(
|
button(
|
||||||
page_link_to('admin_rooms', ['show' => 'edit', 'id' => $room->id]),
|
page_link_to('admin_rooms', ['show' => 'edit', 'id' => $room->id]),
|
||||||
__('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'btn'
|
'btn'
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room->id]),
|
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room->id]),
|
||||||
__('delete'),
|
icon('trash') . __('delete'),
|
||||||
'btn'
|
'btn'
|
||||||
)
|
)
|
||||||
]) : '',
|
]) : '',
|
||||||
|
@ -85,8 +85,8 @@ function Room_view(Room $room, ShiftsFilterRenderer $shiftsFilterRenderer, Shift
|
||||||
function Room_name_render(Room $room)
|
function Room_name_render(Room $room)
|
||||||
{
|
{
|
||||||
if (auth()->can('view_rooms')) {
|
if (auth()->can('view_rooms')) {
|
||||||
return '<a href="' . room_link($room) . '">' . icon('geo-alt') . $room->name . '</a>';
|
return '<a href="' . room_link($room) . '">' . icon('pin-map-fill') . $room->name . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return icon('geo-alt') . $room->name;
|
return icon('pin-map-fill') . $room->name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,7 +220,7 @@ class ShiftCalendarShiftRenderer
|
||||||
case ShiftSignupState::ANGELTYPE:
|
case ShiftSignupState::ANGELTYPE:
|
||||||
if ($angeltype->restricted) {
|
if ($angeltype->restricted) {
|
||||||
// User has to be confirmed on the angeltype first
|
// User has to be confirmed on the angeltype first
|
||||||
$entry_list[] = $inner_text . icon('book');
|
$entry_list[] = $inner_text . icon('mortarboard-fill');
|
||||||
} else {
|
} else {
|
||||||
// Add link to join the angeltype first
|
// Add link to join the angeltype first
|
||||||
$entry_list[] = $inner_text . '<br />'
|
$entry_list[] = $inner_text . '<br />'
|
||||||
|
|
|
@ -73,12 +73,12 @@ function ShiftType_view(ShiftType $shifttype)
|
||||||
button(page_link_to('shifttypes'), shifttypes_title(), 'back'),
|
button(page_link_to('shifttypes'), shifttypes_title(), 'back'),
|
||||||
button(
|
button(
|
||||||
page_link_to('shifttypes', ['action' => 'edit', 'shifttype_id' => $shifttype->id]),
|
page_link_to('shifttypes', ['action' => 'edit', 'shifttype_id' => $shifttype->id]),
|
||||||
__('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'edit'
|
'edit'
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
page_link_to('shifttypes', ['action' => 'delete', 'shifttype_id' => $shifttype->id]),
|
page_link_to('shifttypes', ['action' => 'delete', 'shifttype_id' => $shifttype->id]),
|
||||||
__('delete'),
|
icon('trash') . __('delete'),
|
||||||
'delete'
|
'delete'
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
|
@ -105,12 +105,12 @@ function ShiftTypes_list_view($shifttypes)
|
||||||
'shifttypes',
|
'shifttypes',
|
||||||
['action' => 'edit', 'shifttype_id' => $shifttype->id]
|
['action' => 'edit', 'shifttype_id' => $shifttype->id]
|
||||||
),
|
),
|
||||||
__('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
page_link_to('shifttypes', ['action' => 'delete', 'shifttype_id' => $shifttype->id]),
|
page_link_to('shifttypes', ['action' => 'delete', 'shifttype_id' => $shifttype->id]),
|
||||||
__('delete'),
|
icon('trash') . __('delete'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -28,7 +28,7 @@ function Shift_view_header($shift, Room $room)
|
||||||
div('col-sm-3 col-xs-6', [
|
div('col-sm-3 col-xs-6', [
|
||||||
'<h4>' . __('Start') . '</h4>',
|
'<h4>' . __('Start') . '</h4>',
|
||||||
'<p class="lead' . (time() >= $shift['start'] ? ' text-success' : '') . '">',
|
'<p class="lead' . (time() >= $shift['start'] ? ' text-success' : '') . '">',
|
||||||
icon('calendar3') . date(__('Y-m-d'), $shift['start']),
|
icon('calendar-event') . date(__('Y-m-d'), $shift['start']),
|
||||||
'<br />',
|
'<br />',
|
||||||
icon('clock') . date('H:i', $shift['start']),
|
icon('clock') . date('H:i', $shift['start']),
|
||||||
'</p>'
|
'</p>'
|
||||||
|
@ -36,7 +36,7 @@ function Shift_view_header($shift, Room $room)
|
||||||
div('col-sm-3 col-xs-6', [
|
div('col-sm-3 col-xs-6', [
|
||||||
'<h4>' . __('End') . '</h4>',
|
'<h4>' . __('End') . '</h4>',
|
||||||
'<p class="lead' . (time() >= $shift['end'] ? ' text-success' : '') . '">',
|
'<p class="lead' . (time() >= $shift['end'] ? ' text-success' : '') . '">',
|
||||||
icon('calendar3') . date(__('Y-m-d'), $shift['end']),
|
icon('calendar-event') . date(__('Y-m-d'), $shift['end']),
|
||||||
'<br />',
|
'<br />',
|
||||||
icon('clock') . date('H:i', $shift['end']),
|
icon('clock') . date('H:i', $shift['end']),
|
||||||
'</p>'
|
'</p>'
|
||||||
|
@ -169,7 +169,7 @@ function Shift_view($shift, ShiftType $shifttype, Room $room, $angeltypes_source
|
||||||
$shift_admin ? button(shift_edit_link($shift), icon('pencil') . __('edit')) : '',
|
$shift_admin ? button(shift_edit_link($shift), icon('pencil') . __('edit')) : '',
|
||||||
$shift_admin ? button(shift_delete_link($shift), icon('trash') . __('delete')) : '',
|
$shift_admin ? button(shift_delete_link($shift), icon('trash') . __('delete')) : '',
|
||||||
$admin_shifttypes ? button(shifttype_link($shifttype), $shifttype->name) : '',
|
$admin_shifttypes ? button(shifttype_link($shifttype), $shifttype->name) : '',
|
||||||
$admin_rooms ? button(room_link($room), icon('geo-alt') . $room->name) : '',
|
$admin_rooms ? button(room_link($room), icon('pin-map-fill') . $room->name) : '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
$buttons[] = button(user_link(auth()->user()->id), '<span class="icon-icon_angel"></span> ' . __('My shifts'));
|
$buttons[] = button(user_link(auth()->user()->id), '<span class="icon-icon_angel"></span> ' . __('My shifts'));
|
||||||
|
|
|
@ -103,7 +103,7 @@ function Users_view(
|
||||||
? $user->personalData->planned_departure_date->format(__('Y-m-d')) : '';
|
? $user->personalData->planned_departure_date->format(__('Y-m-d')) : '';
|
||||||
$u['last_login_at'] = $user->last_login_at ? $user->last_login_at->format(__('m/d/Y h:i a')) : '';
|
$u['last_login_at'] = $user->last_login_at ? $user->last_login_at->format(__('m/d/Y h:i a')) : '';
|
||||||
$u['actions'] = table_buttons([
|
$u['actions'] = table_buttons([
|
||||||
button_icon(page_link_to('admin_user', ['id' => $user->id]), 'pencil-square', 'btn-sm')
|
button_icon(page_link_to('admin_user', ['id' => $user->id]), 'pencil', 'btn-sm')
|
||||||
]);
|
]);
|
||||||
$usersList[] = $u;
|
$usersList[] = $u;
|
||||||
}
|
}
|
||||||
|
@ -272,9 +272,9 @@ function User_view_myshift($shift, $user_source, $its_me)
|
||||||
}
|
}
|
||||||
|
|
||||||
$myshift = [
|
$myshift = [
|
||||||
'date' => icon('calendar3')
|
'date' => icon('calendar-event')
|
||||||
. date('Y-m-d', $shift['start']) . '<br>'
|
. date('Y-m-d', $shift['start']) . '<br>'
|
||||||
. icon('clock') . date('H:i', $shift['start'])
|
. icon('clock-history') . date('H:i', $shift['start'])
|
||||||
. ' - '
|
. ' - '
|
||||||
. date('H:i', $shift['end']),
|
. date('H:i', $shift['end']),
|
||||||
'duration' => sprintf('%.2f', ($shift['end'] - $shift['start']) / 3600) . ' h',
|
'duration' => sprintf('%.2f', ($shift['end'] - $shift['start']) / 3600) . ' h',
|
||||||
|
@ -305,7 +305,7 @@ function User_view_myshift($shift, $user_source, $its_me)
|
||||||
if ($its_me || auth()->can('user_shifts_admin')) {
|
if ($its_me || auth()->can('user_shifts_admin')) {
|
||||||
$myshift['actions'][] = button(
|
$myshift['actions'][] = button(
|
||||||
page_link_to('user_myshifts', ['edit' => $shift['id'], 'id' => $user_source->id]),
|
page_link_to('user_myshifts', ['edit' => $shift['id'], 'id' => $user_source->id]),
|
||||||
icon('pencil-square') . __('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -400,7 +400,7 @@ function User_view_worklog(Worklog $worklog, $admin_user_worklog_privilege)
|
||||||
$actions = table_buttons([
|
$actions = table_buttons([
|
||||||
button(
|
button(
|
||||||
url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id),
|
url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id),
|
||||||
icon('pencil-square') . __('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
|
@ -412,7 +412,7 @@ function User_view_worklog(Worklog $worklog, $admin_user_worklog_privilege)
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'date' => icon('calendar3') . date('Y-m-d', $worklog->worked_at->timestamp),
|
'date' => icon('calendar-event') . date('Y-m-d', $worklog->worked_at->timestamp),
|
||||||
'duration' => sprintf('%.2f', $worklog->hours) . ' h',
|
'duration' => sprintf('%.2f', $worklog->hours) . ' h',
|
||||||
'room' => '',
|
'room' => '',
|
||||||
'shift_info' => __('Work log entry'),
|
'shift_info' => __('Work log entry'),
|
||||||
|
@ -511,11 +511,11 @@ function User_view(
|
||||||
) : '',
|
) : '',
|
||||||
$admin_user_privilege ? button(
|
$admin_user_privilege ? button(
|
||||||
page_link_to('admin_user', ['id' => $user_source->id]),
|
page_link_to('admin_user', ['id' => $user_source->id]),
|
||||||
icon('pencil-square') . __('edit')
|
icon('pencil') . __('edit')
|
||||||
) : '',
|
) : '',
|
||||||
$admin_user_privilege || ($its_me && $needs_drivers_license) ? button(
|
$admin_user_privilege || ($its_me && $needs_drivers_license) ? button(
|
||||||
user_driver_license_edit_link($user_source),
|
user_driver_license_edit_link($user_source),
|
||||||
icon('wallet2') . __('driving license')
|
icon('person-vcard') . __('driving license')
|
||||||
) : '',
|
) : '',
|
||||||
(($admin_user_privilege || $auth->can('admin_arrive')) && !$user_source->state->arrived) ?
|
(($admin_user_privilege || $auth->can('admin_arrive')) && !$user_source->state->arrived) ?
|
||||||
form([
|
form([
|
||||||
|
@ -529,24 +529,24 @@ function User_view(
|
||||||
'users',
|
'users',
|
||||||
['action' => 'edit_vouchers', 'user_id' => $user_source->id]
|
['action' => 'edit_vouchers', 'user_id' => $user_source->id]
|
||||||
),
|
),
|
||||||
icon('file-binary-fill') . __('Vouchers')
|
icon('valentine') . __('Vouchers')
|
||||||
)
|
)
|
||||||
: '',
|
: '',
|
||||||
$admin_user_worklog_privilege ? button(
|
$admin_user_worklog_privilege ? button(
|
||||||
url('/admin/user/' . $user_source->id . '/worklog'),
|
url('/admin/user/' . $user_source->id . '/worklog'),
|
||||||
icon('list') . __('worklog.add')
|
icon('clock-history') . __('worklog.add')
|
||||||
) : '',
|
) : '',
|
||||||
$its_me ? button(
|
$its_me ? button(
|
||||||
page_link_to('settings/profile'),
|
page_link_to('settings/profile'),
|
||||||
icon('gear') . __('Settings')
|
icon('person-fill-gear') . __('Settings')
|
||||||
) : '',
|
) : '',
|
||||||
($its_me && $auth->can('ical')) ? button(
|
($its_me && $auth->can('ical')) ? button(
|
||||||
page_link_to('ical', ['key' => $user_source->api_key]),
|
page_link_to('ical', ['key' => $user_source->api_key]),
|
||||||
icon('calendar3') . __('iCal Export')
|
icon('calendar-week') . __('iCal Export')
|
||||||
) : '',
|
) : '',
|
||||||
($its_me && $auth->can('shifts_json_export')) ? button(
|
($its_me && $auth->can('shifts_json_export')) ? button(
|
||||||
page_link_to('shifts_json_export', ['key' => $user_source->api_key]),
|
page_link_to('shifts_json_export', ['key' => $user_source->api_key]),
|
||||||
icon('box-arrow-up-right') . __('JSON Export')
|
icon('braces') . __('JSON Export')
|
||||||
) : '',
|
) : '',
|
||||||
($its_me && (
|
($its_me && (
|
||||||
$auth->can('shifts_json_export')
|
$auth->can('shifts_json_export')
|
||||||
|
@ -705,7 +705,7 @@ function User_view_state_admin($freeloader, $user_source)
|
||||||
$availableCount = max($voucherCount, $availableCount);
|
$availableCount = max($voucherCount, $availableCount);
|
||||||
if ($user_source->state->got_voucher > 0) {
|
if ($user_source->state->got_voucher > 0) {
|
||||||
$state[] = '<span class="text-success">'
|
$state[] = '<span class="text-success">'
|
||||||
. icon('file-binary-fill')
|
. icon('valentine')
|
||||||
. __('Got %s of %s vouchers', [$voucherCount, $availableCount])
|
. __('Got %s of %s vouchers', [$voucherCount, $availableCount])
|
||||||
. '</span>';
|
. '</span>';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -56,7 +56,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-square'), url('admin/faq/' ~ item.id), 'secondary', 'sm') }}
|
{{ m.button(m.icon('pencil'), url('admin/faq/' ~ item.id), 'secondary', 'sm') }}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
{% if has_permission_to('admin_news') %}
|
{% if has_permission_to('admin_news') %}
|
||||||
<div class="ms-auto">
|
<div class="ms-auto">
|
||||||
{{ m.button(m.icon('pencil-square'), url('admin/news/' ~ news.id), 'secondary', 'sm') }}
|
{{ m.button(m.icon('pencil'), url('admin/news/' ~ news.id), 'secondary', 'sm') }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if has_permission_to('question.edit') %}
|
{% if has_permission_to('question.edit') %}
|
||||||
{{ m.button(m.icon('pencil-square'), url('admin/questions/' ~ question.id), null, 'sm') }}
|
{{ m.button(m.icon('pencil'), url('admin/questions/' ~ question.id), null, 'sm') }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue