diff --git a/templates/_partials/_tabs.html.twig b/templates/_partials/_tabs.html.twig new file mode 100644 index 0000000..bcb9cbd --- /dev/null +++ b/templates/_partials/_tabs.html.twig @@ -0,0 +1,23 @@ +{# + Renders a KnpMenu as the back link and a row of tabs above the content, for the sections of one + record (AdminMenuBuilder::createTeamerMenu()). Dividers are skipped; the item marked `back` by + AbstractMenuBuilder::addBackItem() becomes the link above the tabs. +#} +{% block root %} + {% set back = item.children|filter(child => child.extras.back is defined)|first %} + {% if back %} + + {{ icon('arrow-left', 'w-4 h-4 shrink-0') }} + {{ back.label|raw }} + + {% endif %} + +{% endblock %} diff --git a/templates/admin/teamer/availability/index.html.twig b/templates/admin/teamer/availability/index.html.twig index 6bca95a..5de5cbd 100644 --- a/templates/admin/teamer/availability/index.html.twig +++ b/templates/admin/teamer/availability/index.html.twig @@ -3,50 +3,46 @@ {% block title %}Verfügbarkeit {{ teamer }}{% endblock %} {% block content %} -
-
- {{ knp_menu_render(knp_menu_get('default_teamer')) }} -
-
-

- Verfügbarkeit {{ teamer }} -

-
- {% for year, months in groupedAvailabilities %} -
-

- {{ year }} -

-
- {% for month, availabilities in months %} -
-

- {{ month }} -

- {% for availability in availabilities %} -
- {{ availability }} - {% if is_granted('DELETE', availability) %} - - {% endif %} -
- {% endfor %} -
- {% endfor %} -
+ {{ knp_menu_render(knp_menu_get('default_teamer'), { 'template': '_partials/_tabs.html.twig' }) }} +
+

+ Verfügbarkeit {{ teamer }} +

+
+ {% for year, months in groupedAvailabilities %} +
+

+ {{ year }} +

+
+ {% for month, availabilities in months %} +
+

+ {{ month }} +

+ {% for availability in availabilities %} +
+ {{ availability }} + {% if is_granted('DELETE', availability) %} + + {% endif %} +
+ {% endfor %} +
+ {% endfor %}
- {% else %} -
- {{ teamer.firstName }} hat bisher keine Verfügbarkeiten hinterlegt. -
- {% endfor %} -
+
+ {% else %} +
+ {{ teamer.firstName }} hat bisher keine Verfügbarkeiten hinterlegt. +
+ {% endfor %}
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/admin/teamer/crm_selections.html.twig b/templates/admin/teamer/crm_selections.html.twig index 24abef5..ac10f43 100644 --- a/templates/admin/teamer/crm_selections.html.twig +++ b/templates/admin/teamer/crm_selections.html.twig @@ -3,33 +3,29 @@ {% block title %}Selektionsmerkmale {{ teamer }}{% endblock %} {% block content %} -
-
- {{ knp_menu_render(knp_menu_get('default_teamer')) }} -
-
-

- Selektionsmerkmale {{ teamer }} -

- {% for group, attributes in teamer.crmSelections %} -

- {{ group }} -

- {% if attributes|length %} -
    - {% for attribute in attributes %} -
  • - {{ icon('check', 'w-4 h-4') }} - {{ attribute }} -
  • - {% endfor %} -
- {% else %} -
- - -
- {% endif %} - {% endfor %} -
+ {{ knp_menu_render(knp_menu_get('default_teamer'), { 'template': '_partials/_tabs.html.twig' }) }} +
+

+ Selektionsmerkmale {{ teamer }} +

+ {% for group, attributes in teamer.crmSelections %} +

+ {{ group }} +

+ {% if attributes|length %} +
    + {% for attribute in attributes %} +
  • + {{ icon('check', 'w-4 h-4') }} + {{ attribute }} +
  • + {% endfor %} +
+ {% else %} +
+ - +
+ {% endif %} + {% endfor %}
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/admin/teamer/remarks_internal.html.twig b/templates/admin/teamer/remarks_internal.html.twig index 5eb11bf..0fc1dc9 100644 --- a/templates/admin/teamer/remarks_internal.html.twig +++ b/templates/admin/teamer/remarks_internal.html.twig @@ -3,23 +3,19 @@ {% block title %}Interne Anmerkungen zu {{ teamer }}{% endblock %} {% block content %} -
-
- {{ knp_menu_render(knp_menu_get('default_teamer')) }} -
-
-

- Interne Anmerkungen zu {{ teamer }} -

- {{ form_start(form) }} -
- {{ form_row(form.remarks) }} -
- - {{ form_rest(form) }} - {{ form_end(form) }} + {{ knp_menu_render(knp_menu_get('default_teamer'), { 'template': '_partials/_tabs.html.twig' }) }} +
+

+ Interne Anmerkungen zu {{ teamer }} +

+ {{ form_start(form) }} +
+ {{ form_row(form.remarks) }}
+ + {{ form_rest(form) }} + {{ form_end(form) }}
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/admin/teamer/skills.html.twig b/templates/admin/teamer/skills.html.twig index 07311b0..455bc2b 100644 --- a/templates/admin/teamer/skills.html.twig +++ b/templates/admin/teamer/skills.html.twig @@ -3,115 +3,111 @@ {% block title %}Jobprofile & Skills {{ teamer }}{% endblock %} {% block content %} -
-
- {{ knp_menu_render(knp_menu_get('default_teamer')) }} -
-
-

- Jobprofile, Skills & Status {{ teamer }} -

+ {{ knp_menu_render(knp_menu_get('default_teamer'), { 'template': '_partials/_tabs.html.twig' }) }} +
+

+ Jobprofile, Skills & Status {{ teamer }} +

-

- Status -

+

+ Status +

+
+ {{ form_start(form) }}
- {{ form_start(form) }} -
- {{ form_widget(form.status) }} -
-
- {{ form_row(form.allSeason) }} -
-
- {{ form_row(form.allowOverlappingApplications) }} -
- - {{ form_rest(form) }} - {{ form_end(form) }} + {{ form_widget(form.status) }}
+
+ {{ form_row(form.allSeason) }} +
+
+ {{ form_row(form.allowOverlappingApplications) }} +
+ + {{ form_rest(form) }} + {{ form_end(form) }} +
-

- Ausbildung -

-
    - {% for training in trainings %} -
  • -
    - {{ training.name }} - {% set attendance = teamer.trainingAttendance(training) %} - {% if attendance %} -
    - {{ attendance.date|date('m/Y') }} - -
    - {% else %} +

    + Ausbildung +

    +
      + {% for training in trainings %} +
    • +
      + {{ training.name }} + {% set attendance = teamer.trainingAttendance(training) %} + {% if attendance %} +
      + {{ attendance.date|date('m/Y') }} - {% endif %} -
      -
    • - {% endfor %} -
    - - {% include '_partials/_teamer_license_info.html.twig' %} - -
    -
    -

    - Mögliche Jobprofile -

    -
      - {% for profile in teamer.jobProfiles %} -
    • - {{ profile.name }} -
    • +
    {% else %} -
  • -
    - {{ teamer.firstName }} hat bisher keine Jobprofile ausgewählt. -
    -
  • - {% endfor %} -
-
-
-

- Sonstiges -

-
+ + {% endif %} +
+ + {% endfor %} + + + {% include '_partials/_teamer_license_info.html.twig' %} + +
+
+

+ Mögliche Jobprofile +

+
    + {% for profile in teamer.jobProfiles %} +
  • + {{ profile.name }} +
  • + {% else %} +
  • +
    + {{ teamer.firstName }} hat bisher keine Jobprofile ausgewählt. +
    +
  • + {% endfor %} +
+
+
+

+ Sonstiges +

+
+
+
+ Wünsche: +
-
- Wünsche: -
-
- {{ teamer.remarks|default('-')|nl2br }} -
+ {{ teamer.remarks|default('-')|nl2br }}
-
+
{% endblock %} diff --git a/templates/administrative/teamer/profile.html.twig b/templates/administrative/teamer/profile.html.twig index bb63f1e..19fb804 100644 --- a/templates/administrative/teamer/profile.html.twig +++ b/templates/administrative/teamer/profile.html.twig @@ -3,273 +3,130 @@ {% block title %}Stammdaten und Foto {{ teamer }}{% endblock %} {% block content %} -
-
- {{ knp_menu_render(knp_menu_get('default_teamer', [], { 'return_url': returnUrl })) }} + {{ knp_menu_render(knp_menu_get('default_teamer', [], { 'return_url': returnUrl }), { 'template': '_partials/_tabs.html.twig' }) }} +
+

+ Stammdaten und Foto {{ teamer }} +

+
-
-
-

- Stammdaten und Foto {{ teamer }} -

-
- -
-

- Persönliche Daten -

-
-
-
- Gender: -
-
- {{ teamer.gender }} -
-
-
-
- Titel: -
-
- {{ teamer.academicTitle|default('-') }} -
-
-
-
- Vorname: -
-
- {{ teamer.firstName }} -
-
-
-
- Nachname: -
-
- {{ teamer.lastName }} -
-
-
-
- Geburtsdatum: -
-
- {{ teamer.dateOfBirth|date('d.m.Y') }} -
-
-
-
- Staatsangehörigkeit: -
-
- {{ teamer.nationality|bpn_country_label('nationality') }} -
-
+
+
+
+

+ Persönliche Daten +

+ {{ _self.fields({ + 'Gender': teamer.gender, + 'Titel': teamer.academicTitle|default('-'), + 'Vorname': teamer.firstName, + 'Nachname': teamer.lastName, + 'Geburtsdatum': teamer.dateOfBirth|date('d.m.Y'), + 'Staatsangehörigkeit': teamer.nationality|bpn_country_label('nationality'), + }) }}
-
- -
{% if teamer.photo %} -
- {{ teamer.firstName }} -
+ {{ teamer.firstName }} {% endif %}
+
-
-

- Adressdaten -

-
-
-
- Straße, Hausnummer: -
-
- {{ teamer.address.street }} -
-
-
-
- PLZ: -
-
- {{ teamer.address.postCode }} -
-
-
-
- Ort: -
-
- {{ teamer.address.city }} -
-
-
-
- Land: -
-
- {{ teamer.address.country|bpn_country_label }} -
-
-
-
- E-Mail: -
-
- {{ teamer.communication.email|default('-') }} -
-
-
-
- Mobilnummer: -
-
- {{ teamer.communication.mobile|default('-') }} -
-
-
-
+
+

+ Adressdaten +

+ {{ _self.fields({ + 'Straße, Hausnummer': teamer.address.street, + 'PLZ': teamer.address.postCode, + 'Ort': teamer.address.city, + 'Land': teamer.address.country|bpn_country_label, + 'E-Mail': teamer.communication.email|default('-'), + 'Mobilnummer': teamer.communication.mobile|default('-'), + }) }} +
-
-

- Buszustiege +
+

+ Honorardaten +

+ {{ _self.fields({ + 'Steuer-ID': teamer.taxId|default('-'), + 'IBAN': teamer.bankAccount.iban|default('-'), + 'BIC': teamer.bankAccount.bic|default('-'), + 'Bank/Kreditinstitut': teamer.bankAccount.bank|default('-'), + 'Krankenversicherung': teamer.healthInsuranceCompany|default('-'), + }) }} +
+ +
+

+ Sonstiges +

+ {{ _self.fields({ + 'Sprache(n)': teamer.language|default('-'), + 'Klamottengröße': teamer.size|default('-'), + 'Ernährungsweise': teamer.mealPreference ? teamer.mealPreference.label : '-', + }) }} +
+ +
+

+ Buszustiege +

+ {% set pickupLabels = [] %} + {% for pickup in teamer.pickups %} + {% set label = pickup|bpn_pickup_label %} + {% if label is not empty %} + {% set pickupLabels = pickupLabels|merge([label]) %} + {% endif %} + {% endfor %} +
    + {% for label in pickupLabels %} +
  • + {{ label }} +
  • + {% else %} +
  • Keine Daten
  • + {% endfor %} +
+
+ + {% if teamer.allSeason %} +
+

+ Saisoneinsätze

-
    - {% set pickupLabels = [] %} - {% for pickup in teamer.pickups %} - {% set label = pickup|bpn_pickup_label %} - {% if label is not empty %} - {% set pickupLabels = pickupLabels|merge([label]) %} - {% endif %} - {% endfor %} - {% for label in pickupLabels %} -
  • - {{ label }} +
      + {% for seasonAssignment in teamer.seasonAssignments|filter(seasonAssignment => not seasonAssignment.deleted) %} +
    • + + {{ seasonAssignment.hotelCode | house_label }} + + + {{ seasonAssignment.dateFrom | date('d.m.Y') }} - {{ seasonAssignment.dateTo | date('d.m.Y') }}, + {{ seasonAssignment.jobProfile.name }} +
    • {% else %} -
    • - Keine Daten -
    • +
    • Keine Daten
    • {% endfor %}
    -

+ + {% endif %} -
-

- Honorardaten -

-
-
-
- Steuer-ID: -
-
- {{ teamer.taxId|default('-') }} -
-
-
-
- IBAN: -
-
- {{ teamer.bankAccount.iban|default('-') }} -
-
-
-
- BIC: -
-
- {{ teamer.bankAccount.bic|default('-') }} -
-
-
-
- Bank/Kreditinstitut: -
-
- {{ teamer.bankAccount.bank|default('-') }} -
-
-
-
- Krankenversicherung: -
-
- {{ teamer.healthInsuranceCompany|default('-') }} -
-
-
-
- -
-

- Sonstiges -

-
-
-
- Sprache(n): -
-
- {{ teamer.language|default('-') }} -
-
-
-
- Klamottengröße: -
-
- {{ teamer.size|default('-') }} -
-
-
-
- Ernährungsweise: -
-
- {% if teamer.mealPreference %} - {{ teamer.mealPreference.label }} - {% else %} - _ - {% endif %} -
-
-
-
- - {% if teamer.allSeason %} -
-

- Saisoneinsätze -

-
    - {% for seasonAssignment in teamer.seasonAssignments|filter(seasonAssignment => not seasonAssignment.deleted) %} -
  • - - {{ seasonAssignment.hotelCode | house_label }} - - - {{ seasonAssignment.dateFrom | date('d.m.Y') }} - {{ seasonAssignment.dateTo | date('d.m.Y') }}, - {{ seasonAssignment.jobProfile.name }} - -
  • - {% else %} -
  • - Keine Daten -
  • - {% endfor %} -
-
- {% endif %} - -
{% endblock %} + +{# Label and value pairs of one card, the labels muted beside their values. #} +{% macro fields(fields) %} +
+ {% for label, value in fields %} +
{{ label }}
+
{{ value }}
+ {% endfor %} +
+{% endmacro %} diff --git a/templates/administrative/teamer/recent_dispositions.html.twig b/templates/administrative/teamer/recent_dispositions.html.twig index 5f4f672..4e2a64e 100644 --- a/templates/administrative/teamer/recent_dispositions.html.twig +++ b/templates/administrative/teamer/recent_dispositions.html.twig @@ -3,77 +3,73 @@ {% block title %}Vergangene Einsätze & Feedback {{ teamer }}{% endblock %} {% block content %} -
-
- {{ knp_menu_render(knp_menu_get('default_teamer')) }} -
-
-

- Vergangene Einsätze & Feedback {{ teamer }} -

-
-
- - + {{ knp_menu_render(knp_menu_get('default_teamer'), { 'template': '_partials/_tabs.html.twig' }) }} +
+

+ Vergangene Einsätze & Feedback {{ teamer }} +

+
+
+
+ + + + + + + + + + {% for disposition in pagination %} - - - - - - - - {% for disposition in pagination %} - - - - - - - {% else %} - - {% endfor %} - -
+ Einsatz + + Jobprofil + + Gesamtnote + + Kommentar öffentlich/intern +
- Einsatz - - Jobprofil - - Gesamtnote - - Kommentar öffentlich/intern -
- {{ disposition.assignment.destination.dateFrom|date('d.m.Y') }} -
- {{ disposition.assignment.destination.product }} -
- {{ disposition.assignment.destination.hotel }} -
- {{ disposition.assignment.jobProfile.name }} - - {% if disposition.feedback %} - {{ disposition.feedback.averageRating|format_rating }} - {% else %} - - - {% endif %} - - {% if disposition.feedback %} -
-
- {{ disposition.feedback.comment|default('-') }} -
-
- {{ disposition.feedback.commentInternal|default('-') }} -
-
- {% else %} - - - {% endif %} -
- Keine Daten... + + {{ disposition.assignment.destination.dateFrom|date('d.m.Y') }} +
+ {{ disposition.assignment.destination.product }} +
+ {{ disposition.assignment.destination.hotel }}
- {{ knp_pagination_render(pagination) }} -
+ + {{ disposition.assignment.jobProfile.name }} + + + {% if disposition.feedback %} + {{ disposition.feedback.averageRating|format_rating }} + {% else %} + - + {% endif %} + + + {% if disposition.feedback %} +
+
+ {{ disposition.feedback.comment|default('-') }} +
+
+ {{ disposition.feedback.commentInternal|default('-') }} +
+
+ {% else %} + - + {% endif %} + + + {% else %} + + Keine Daten... + + {% endfor %} + + + {{ knp_pagination_render(pagination) }}
diff --git a/templates/administrative/teamer/upcoming_dispositions.html.twig b/templates/administrative/teamer/upcoming_dispositions.html.twig index 39ba676..b282f81 100644 --- a/templates/administrative/teamer/upcoming_dispositions.html.twig +++ b/templates/administrative/teamer/upcoming_dispositions.html.twig @@ -3,71 +3,67 @@ {% block title %}Bevorstehende Einsätze {{ teamer }}{% endblock %} {% block content %} -
-
- {{ knp_menu_render(knp_menu_get('default_teamer')) }} -
-
-

- Bevorstehende Einsätze {{ teamer }} -

-
-
- - + {{ knp_menu_render(knp_menu_get('default_teamer'), { 'template': '_partials/_tabs.html.twig' }) }} +
+

+ Bevorstehende Einsätze {{ teamer }} +

+
+
+
+ + + + + + + + + {% for row in pagination %} - - - - - - - {% for row in pagination %} - + + {% if row.seasonAssignment is not null %} + {% set seasonAssignment = row.seasonAssignment %} - {% if row.seasonAssignment is not null %} - {% set seasonAssignment = row.seasonAssignment %} - - - {% else %} - {% set assignment = row.disposition.assignment %} - - - {% endif %} - - {% else %} - - - - {% endfor %} - -
+ Zeitraum + + Einsatz + + Jobprofil +
- Zeitraum - - Einsatz - - Jobprofil -
+ {{ row.dateFrom|date('d.m.Y') }} - {{ row.dateTo|date('d.m.Y') }} + - {{ row.dateFrom|date('d.m.Y') }} - {{ row.dateTo|date('d.m.Y') }} + {% include '_partials/_season_badge.html.twig' %} + + {{ seasonAssignment|season_assignment_label }} + - {% include '_partials/_season_badge.html.twig' %} - - {{ seasonAssignment|season_assignment_label }} - - - {{ seasonAssignment.jobProfile.name }} - - {{ assignment.destination.product }} -
- {{ assignment.destination.hotel }} -
- {{ assignment.jobProfile.name }} -
- Keine Daten... + + {{ seasonAssignment.jobProfile.name }}
- {{ knp_pagination_render(pagination) }} -
+ {% else %} + {% set assignment = row.disposition.assignment %} + + {{ assignment.destination.product }} +
+ {{ assignment.destination.hotel }} + + + {{ assignment.jobProfile.name }} + + {% endif %} + + {% else %} + + + Keine Daten... + + + {% endfor %} + + + {{ knp_pagination_render(pagination) }}