From 8bb3d35252f6a94c0c4b63658290db6e7dc6cc3f Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Fri, 1 Dec 2023 16:43:58 +0100 Subject: [PATCH] [CHANGE] `hrapplication` templates updated for BS 5 --- .../templates/hrapplications/corpchoice.html | 35 +- .../templates/hrapplications/create.html | 69 ++-- .../templates/hrapplications/management.html | 317 +++++++++--------- .../partials/modals/search.html | 32 ++ .../templates/hrapplications/searchview.html | 72 ++-- .../templates/hrapplications/view.html | 274 ++++++++------- 6 files changed, 432 insertions(+), 367 deletions(-) create mode 100644 allianceauth/hrapplications/templates/hrapplications/partials/modals/search.html diff --git a/allianceauth/hrapplications/templates/hrapplications/corpchoice.html b/allianceauth/hrapplications/templates/hrapplications/corpchoice.html index a8a35872..e36a18ba 100644 --- a/allianceauth/hrapplications/templates/hrapplications/corpchoice.html +++ b/allianceauth/hrapplications/templates/hrapplications/corpchoice.html @@ -6,22 +6,33 @@ {% translate "Choose a Corp" %} {% endblock page_title %} +{% block header_nav_brand %} + {% translate "HR Application Management" %} +{% endblock header_nav_brand %} + {% block content %}
-

{% translate "Choose a Corp" %}

+

+ {% translate "Choose a Corp" %} +

{% if choices %} -
-
{% translate "Available Corps" %}
- - {% for choice in choices %} - - - - {% endfor %} -
- {{ choice.1 }} -
+
+
+
{% translate "Available Corps" %}
+
+ +
+ + {% for choice in choices %} + + + + {% endfor %} +
+ {{ choice.1 }} +
+
{% else %}
{% translate "No corps are accepting applications at this time." %}
diff --git a/allianceauth/hrapplications/templates/hrapplications/create.html b/allianceauth/hrapplications/templates/hrapplications/create.html index a5e29f86..55fa384b 100644 --- a/allianceauth/hrapplications/templates/hrapplications/create.html +++ b/allianceauth/hrapplications/templates/hrapplications/create.html @@ -1,4 +1,5 @@ {% extends "allianceauth/base-bs5.html" %} +{% load django_bootstrap5 %} {% load i18n %} @@ -6,36 +7,58 @@ {% translate "Apply To" %} {{ corp.corporation_name }} {% endblock page_title %} +{% block header_nav_brand %} + {% translate "HR Application Management" %} +{% endblock header_nav_brand %} + {% block content %}
-

{% translate "Apply To" %} {{ corp.corporation_name }}

+

+ {% translate "Apply To" %} {{ corp.corporation_name }} +

-
-
-
- {% endif %} {% if perms.auth.human_resources %} -

{% translate "Application Management" %} +

{% translate "Application Management" %}
-

- +
+
+
{% endif %}
- {% if perms.auth.human_resources %} - - - {% endif %} + {% include "hrapplications/partials/modals/search.html" %} {% endblock content %} diff --git a/allianceauth/hrapplications/templates/hrapplications/partials/modals/search.html b/allianceauth/hrapplications/templates/hrapplications/partials/modals/search.html new file mode 100644 index 00000000..96190abb --- /dev/null +++ b/allianceauth/hrapplications/templates/hrapplications/partials/modals/search.html @@ -0,0 +1,32 @@ +{% load django_bootstrap5 %} +{% load i18n %} + +{% if perms.auth.human_resources %} + + +{% endif %} diff --git a/allianceauth/hrapplications/templates/hrapplications/searchview.html b/allianceauth/hrapplications/templates/hrapplications/searchview.html index e9f96688..2885aa41 100644 --- a/allianceauth/hrapplications/templates/hrapplications/searchview.html +++ b/allianceauth/hrapplications/templates/hrapplications/searchview.html @@ -7,37 +7,43 @@ {% translate "HR Application Management" %} {% endblock page_title %} +{% block header_nav_brand %} + {% translate "HR Application Management" %} +{% endblock header_nav_brand %} + {% block extra_css %}{% endblock extra_css %} {% block content %}
{% if perms.auth.human_resources %} -

{% translate "Application Search Results" %} -
- - -
+

+ {% translate "Application Search Results" %}

-
- +
+ + +
+ +
+
- - - - + + + + - + {% for app in applications %} - - - - + + + + -
{% translate "Application ID" %}{% translate "Username" %}{% translate "Main Character" %}{% translate "Corporation" %}{% translate "Application ID" %}{% translate "Username" %}{% translate "Main Character" %}{% translate "Corporation" %} {% translate "Status" %}{% translate "Actions" %}{% translate "Actions" %}
{{ app.id }}{{ app.user }}{{ app.main_character }}{{ app.form.corp }}{{ app.id }}{{ app.user }}{{ app.main_character }}{{ app.form.corp }} {% if app.approved == None %}
{% translate "Pending" %}
@@ -47,7 +53,7 @@
{% translate "Rejected" %}
{% endif %}
+ @@ -59,31 +65,5 @@ {% endif %} - {% if perms.auth.human_resources %} - - - {% endif %} + {% include "hrapplications/partials/modals/search.html" %} {% endblock content %} diff --git a/allianceauth/hrapplications/templates/hrapplications/view.html b/allianceauth/hrapplications/templates/hrapplications/view.html index 87e34eab..3b056df4 100644 --- a/allianceauth/hrapplications/templates/hrapplications/view.html +++ b/allianceauth/hrapplications/templates/hrapplications/view.html @@ -1,166 +1,180 @@ {% extends "allianceauth/base-bs5.html" %} -{% load bootstrap %} +{% load django_bootstrap5 %} {% load i18n %} {% block page_title %} {% translate "View Application" %} {% endblock page_title %} +{% block header_nav_brand %} + {% translate "HR Application Management" %} +{% endblock header_nav_brand %} + {% block extra_css %}{% endblock extra_css %} {% block content %}

{% translate "View Application" %}

-
-
-
- {% if app.approved %} -
{% translate "Approved" %}
- {% elif app.approved == False %} -
{% translate "Denied" %}
- {% else %} -
{% translate "Pending" %}
- {% endif %} - {% if app.reviewer_str %} -
{% translate "Reviewer:" %} {{ app.reviewer_str }}
- {% endif %} -
+
+ {% if app.approved %} +
{% translate "Approved" %}
+ {% elif app.approved == False %} +
{% translate "Denied" %}
+ {% else %} +
{% translate "Pending" %}
+ {% endif %} -
-
-
{% translate "Applicant" %}
- - - - - - - - - -
{% translate "User" %}{% translate "Main Character" %}
{{ app.user }}{{ app.main_character }}
-
+ {% if app.reviewer_str %} +
{% translate "Reviewer:" %} {{ app.reviewer_str }}
+ {% endif %} +
-
-
{% translate "Characters" %}
- - - - - - - +
+
+
{% translate "Applicant" %}
+
- {% for char in app.characters %} -
- - - - - - {% endfor %} -
{% translate "Name" %}{% translate "Corp" %}{% translate "Alliance" %}
- {{ char.character_name }} - {{ char.character_name }}{{ char.corporation_name }}{{ char.alliance_name }}
-
-
- -
- {% for response in responses %} -
-
{{ response.question.title }}
-
{{ response.answer|linebreaksbr }}
-
- {% endfor %} -
- - {% if buttons %} - {% if perms.auth.human_resources %} -
-
-
{% translate "Actions" %}
-
- {% if app.approved == None %} - {% if app.reviewer == user %} - {% if perms.hrapplications.approve_application %} - {% translate "Approve" %} - {% endif %} - {% if perms.hrapplications.reject_application %} - {% translate "Reject" %} - {% endif %} - {% if perms.hrapplications.delete_application %} - {% translate "Delete" %} - {% endif %} - {% elif not app.reviewer %} - {% translate "Mark in Progress" %} - {% endif %} - {% endif %} - - {% if perms.hrapplications.add_applicationcomment %} - - {% endif %} -
-
-
- -
-
- - -
-
- {% for comment in comments %} -
- -
{{ comment.text|linebreaks }}
-
- {% endfor %} -
-
-
-
- {% endif %} - {% endif %} +
+ + + + + + + + + +
{% translate "User" %}{% translate "Main Character" %}
{{ app.user }}{{ app.main_character }}
+ +
+
+
{% translate "Characters" %}
+
+ +
+ + + + + + + + + {% for char in app.characters %} + + + + + + + {% endfor %} +
{% translate "Name" %}{% translate "Corporation" %}{% translate "Alliance" %}
+ {{ char.character_name }} + {{ char.character_name }}{{ char.corporation_name }}{{ char.alliance_name }}
+
+
+ + {% for response in responses %} +
+
+
{{ response.question.title }}
+
+ +
{{ response.answer|linebreaksbr }}
+
+ {% endfor %} + + {% if buttons %} + {% if perms.auth.human_resources %} +
+
+
{% translate "Actions" %}
+
+ +
+ {% if app.approved == None %} + {% if app.reviewer == user %} + {% if perms.hrapplications.approve_application %} + {% translate "Approve" %} + {% endif %} + {% if perms.hrapplications.reject_application %} + {% translate "Reject" %} + {% endif %} + {% if perms.hrapplications.delete_application %} + {% translate "Delete" %} + {% endif %} + {% elif not app.reviewer %} + {% translate "Mark in Progress" %} + {% endif %} + {% endif %} + + {% if perms.hrapplications.add_applicationcomment %} + + {% endif %} +
+
+ +
+
+
+
+ {% translate 'Comments' %} ({{ comments.count }}) +
+
+ +
+ {% if comments %} + {% for comment in comments %} +
+ +
{{ comment.text|linebreaks }}
+
+ {% endfor %} + {% else %} +
+ {% translate "No comments" %} +
+ {% endif %} +
+
+
+ {% endif %} + {% endif %}
{% if perms.hrapplications.add_applicationcomment %} -