add needed angels from to shift view

This commit is contained in:
Xu 2024-01-14 13:08:21 +01:00 committed by Igor Scheller
parent 89d8a070d9
commit 0476083e77
3 changed files with 47 additions and 0 deletions

View File

@ -78,6 +78,29 @@ function Shift_editor_info_render(Shift $shift)
$shift->transaction_id $shift->transaction_id
); );
} }
if ($shift->schedule) {
$angeltypeSource = $shift->schedule->needed_from_shift_type
? __(
'shift.angeltype_source.shift_type',
[
'<a href="' . url('/admin/schedule/edit/' . $shift->schedule->id) . '">'
. htmlspecialchars($shift->schedule->name)
. '</a>',
'<a href="' . url('/admin/shifttypes/' . $shift->shift_type_id) . '">'
. htmlspecialchars($shift->shiftType->name)
. '</a>',
]
)
: __('shift.angeltype_source.location', [
'<a href="' . url('/admin/schedule/edit/' . $shift->schedule->id) . '">'
. htmlspecialchars($shift->schedule->name)
. '</a>',
location_name_render($shift->location),
]);
} else {
$angeltypeSource = __('Shift');
}
$info[] = sprintf(__('shift.angeltype_source'), $angeltypeSource);
return join('<br />', $info); return join('<br />', $info);
} }

View File

@ -596,6 +596,18 @@ msgstr "Engeltyp"
msgid "shift.next" msgid "shift.next"
msgstr "Nächste Schicht" msgstr "Nächste Schicht"
msgid "general.shift"
msgstr "Schicht"
msgid "shift.angeltype_source"
msgstr "Benötigte Engel von: %s"
msgid "shift.angeltype_source.shift_type"
msgstr "Programm %s via Schichttyp %s"
msgid "shift.angeltype_source.location"
msgstr "Programm %s via Ort %s"
msgid "Last shift" msgid "Last shift"
msgstr "Letzte Schicht" msgstr "Letzte Schicht"

View File

@ -853,6 +853,18 @@ msgstr "Register"
msgid "shift.next" msgid "shift.next"
msgstr "Next shift" msgstr "Next shift"
msgid "general.shift"
msgstr "Shift"
msgid "shift.angeltype_source"
msgstr "Needed angels from: %s"
msgid "shift.angeltype_source.shift_type"
msgstr "Schedule %s via shift type %s"
msgid "shift.angeltype_source.location"
msgstr "Schedule %s via location %s"
msgid "general.logout" msgid "general.logout"
msgstr "Logout" msgstr "Logout"