Angeltype view: Add requires info for not members
This commit is contained in:
parent
300786e5d0
commit
40bd61fd32
|
@ -569,6 +569,13 @@ function AngelType_view_info(
|
||||||
$admin_angeltypes,
|
$admin_angeltypes,
|
||||||
$supporter
|
$supporter
|
||||||
) {
|
) {
|
||||||
|
$required_info_show = !auth()->user()
|
||||||
|
->userAngelTypes()
|
||||||
|
->where('angel_types.id', $angeltype->id)
|
||||||
|
->count()
|
||||||
|
&& !$admin_angeltypes
|
||||||
|
&& !$admin_user_angeltypes
|
||||||
|
&& !$supporter;
|
||||||
$info = [];
|
$info = [];
|
||||||
if ($angeltype->hasContactInfo()) {
|
if ($angeltype->hasContactInfo()) {
|
||||||
$info[] = AngelTypes_render_contact_info($angeltype);
|
$info[] = AngelTypes_render_contact_info($angeltype);
|
||||||
|
@ -579,6 +586,12 @@ function AngelType_view_info(
|
||||||
if ($angeltype->description != '') {
|
if ($angeltype->description != '') {
|
||||||
$info[] = $parsedown->parse(htmlspecialchars($angeltype->description));
|
$info[] = $parsedown->parse(htmlspecialchars($angeltype->description));
|
||||||
}
|
}
|
||||||
|
if ($angeltype->requires_ifsg_certificate && $required_info_show) {
|
||||||
|
$info[] = info(__('angeltype.ifsg.required.info.preview'), true);
|
||||||
|
}
|
||||||
|
if ($angeltype->requires_driver_license && $required_info_show) {
|
||||||
|
$info[] = info(__('angeltype.driving_license.required.info.preview'), true);
|
||||||
|
}
|
||||||
|
|
||||||
list($supporters, $members_confirmed, $members_unconfirmed) = AngelType_view_members(
|
list($supporters, $members_confirmed, $members_unconfirmed) = AngelType_view_members(
|
||||||
$angeltype,
|
$angeltype,
|
||||||
|
|
|
@ -906,6 +906,12 @@ msgstr "Ansprechpartner für Fragen."
|
||||||
msgid "My driving license"
|
msgid "My driving license"
|
||||||
msgstr "Meine Führerschein-Infos"
|
msgstr "Meine Führerschein-Infos"
|
||||||
|
|
||||||
|
msgid "angeltype.ifsg.required.info.preview"
|
||||||
|
msgstr "Dieser Engeltyp benötigt eine Gesundheitsbelehrung."
|
||||||
|
|
||||||
|
msgid "angeltype.driving_license.required.info.preview"
|
||||||
|
msgstr "Dieser Engeltyp benötigt Führerschein-Infos."
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"This angeltype requires a driver license. Please enter your driver license "
|
"This angeltype requires a driver license. Please enter your driver license "
|
||||||
"information!"
|
"information!"
|
||||||
|
|
|
@ -484,6 +484,9 @@ msgstr "Health instruction on site"
|
||||||
msgid "angeltype.ifsg.own"
|
msgid "angeltype.ifsg.own"
|
||||||
msgstr "My health instruction"
|
msgstr "My health instruction"
|
||||||
|
|
||||||
|
msgid "angeltype.ifsg.required.info.preview"
|
||||||
|
msgstr "This angeltype requires a health instruction."
|
||||||
|
|
||||||
msgid "angeltype.ifsg.required.info"
|
msgid "angeltype.ifsg.required.info"
|
||||||
msgstr "This angeltype requires a health instruction. Please enter your health instruction information!"
|
msgstr "This angeltype requires a health instruction. Please enter your health instruction information!"
|
||||||
|
|
||||||
|
@ -496,6 +499,9 @@ msgstr ""
|
||||||
"You joined an angeltype which requires a driving license. "
|
"You joined an angeltype which requires a driving license. "
|
||||||
"Please edit your driving license information here: %s."
|
"Please edit your driving license information here: %s."
|
||||||
|
|
||||||
|
msgid "angeltype.driving_license.required.info.preview"
|
||||||
|
msgstr "This angeltype requires a driver's license."
|
||||||
|
|
||||||
msgid "ifsg.info"
|
msgid "ifsg.info"
|
||||||
msgstr "Health instruction information"
|
msgstr "Health instruction information"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue