mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 22:40:16 +02:00
[CHANGE] hrapplication
templates updated for BS 5
This commit is contained in:
parent
398a980fb5
commit
8bb3d35252
@ -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 %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">{% translate "Choose a Corp" %}</h1>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Choose a Corp" %}
|
||||
</h1>
|
||||
|
||||
{% if choices %}
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">{% translate "Available Corps" %}</div>
|
||||
<table class="table table-responsive">
|
||||
{% for choice in choices %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:create_view' choice.0 %}" class="btn btn-primary" title="Apply">{{ choice.1 }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">{% translate "Available Corps" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-responsive">
|
||||
{% for choice in choices %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:create_view' choice.0 %}" class="btn btn-primary" title="Apply">{{ choice.1 }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-danger">{% translate "No corps are accepting applications at this time." %}</div>
|
||||
|
@ -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 %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">{% translate "Apply To" %} {{ corp.corporation_name }}</h1>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Apply To" %} {{ corp.corporation_name }}
|
||||
</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<form class="form-signin">
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Application form" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% for question in questions %}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="id_{{ question.pk }}">{{ question.title }}</label>
|
||||
<div>
|
||||
{% if question.help_text %}
|
||||
<div class="text-center">{{ question.help_text }}</div>
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<form class="form-signin" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{% for choice in question.choices.all %}
|
||||
<input type={% if question.multi_select == False %}"radio"{% else %}"checkbox"{% endif %} name="{{ question.pk }}" id="id_{{ question.pk }}_choice_{{ forloop.counter }}" value="{{ choice.choice_text }}">
|
||||
<label for="id_{{ question.pk }}_choice_{{ forloop.counter }}">{{ choice.choice_text }}</label><br>
|
||||
{% empty %}
|
||||
<textarea class="form-control" cols="30" id="id_{{ question.pk }}" name="{{ question.pk }}" rows="4"></textarea>
|
||||
{% endfor %}
|
||||
{% for question in questions %}
|
||||
<div class="card mb-3 form-group border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">{{ question.title }}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% if question.help_text %}
|
||||
<p class="text-muted">
|
||||
{{ question.help_text }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% for choice in question.choices.all %}
|
||||
<input type="{% if question.multi_select == False %}radio{% else %}checkbox{% endif %}" name="{{ question.pk }}" id="id_{{ question.pk }}_choice_{{ forloop.counter }}" value="{{ choice.choice_text }}">
|
||||
<label for="id_{{ question.pk }}_choice_{{ forloop.counter }}">{{ choice.choice_text }}</label><br>
|
||||
{% empty %}
|
||||
<textarea class="form-control" cols="30" id="id_{{ question.pk }}" name="{{ question.pk }}" rows="10"></textarea>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit" formmethod="post">{% translate "Submit" %}</button>
|
||||
</form>
|
||||
<div class="form-group clearfix">
|
||||
{% translate "Submit" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text name="submitApplicationForm" id="submitApplicationForm" %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,12 +1,16 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load bootstrap %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% 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 %}
|
||||
@ -24,187 +28,188 @@
|
||||
</h1>
|
||||
|
||||
{% if personal_apps %}
|
||||
<div class="panel panel-default">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Username" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for personal_app in personal_apps %}
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-body">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td class="text-center">{{ personal_app.user.username }}</td>
|
||||
<td class="text-center">{{ personal_app.form.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if personal_app.approved == None %}
|
||||
<div class="badge bg-warning">{% translate "Pending" %}</div>
|
||||
{% elif personal_app.approved == True %}
|
||||
<div class="badge bg-success">{% translate "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="badge bg-danger">{% translate "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:personal_view' personal_app.id %}" class="btn btn-primary">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
|
||||
{% if personal_app.approved == None %}
|
||||
<a href="{% url 'hrapplications:personal_removal' personal_app.id %}" class="btn btn-danger">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<th class="text-center">{% translate "Username" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% for personal_app in personal_apps %}
|
||||
<tr>
|
||||
<td class="text-center">{{ personal_app.user.username }}</td>
|
||||
<td class="text-center">{{ personal_app.form.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if personal_app.approved == None %}
|
||||
<div class="badge bg-warning">{% translate "Pending" %}</div>
|
||||
{% elif personal_app.approved == True %}
|
||||
<div class="badge bg-success">{% translate "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="badge bg-danger">{% translate "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:personal_view' personal_app.id %}" class="btn btn-primary">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
|
||||
{% if personal_app.approved == None %}
|
||||
<a href="{% url 'hrapplications:personal_removal' personal_app.id %}" class="btn btn-danger">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<h1 class="page-header text-center">{% translate "Application Management" %}
|
||||
<h1 class="page-header text-center mb-3">{% translate "Application Management" %}
|
||||
<div class="text-end">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#modal-hr-search">
|
||||
{% translate "Search Applications" %}
|
||||
</button>
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#pending">{% translate "Pending" %}</a></li>
|
||||
<li><a data-toggle="tab" href="#reviewed">{% translate "Reviewed" %}</a></li>
|
||||
</ul>
|
||||
<div class="card card-default mt-4">
|
||||
<div class="card-body clearfix">
|
||||
<ul class="nav nav-tabs" id="application-list" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a
|
||||
class="nav-link active"
|
||||
id="pending"
|
||||
data-bs-toggle="tab"
|
||||
href="#tab-pending"
|
||||
role="tab"
|
||||
aria-controls="tab-pending"
|
||||
aria-selected="true"
|
||||
>
|
||||
{% translate "Pending" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<div class="tab-content">
|
||||
<div id="pending" class="tab-pane fade in active panel panel-default">
|
||||
<div class="panel-body">
|
||||
{% if applications %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Date" %}</th>
|
||||
<th class="text-center">{% translate "Username" %}</th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}</th>
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a
|
||||
class="nav-link"
|
||||
id="reviewed"
|
||||
data-bs-toggle="tab"
|
||||
href="#tab-reviewed"
|
||||
role="tab"
|
||||
aria-controls="tab-reviewed"
|
||||
aria-selected="false"
|
||||
>
|
||||
{% translate "Reviewed" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% for app in applications %}
|
||||
<div class="tab-content" id="application-list-content">
|
||||
<div id="tab-pending" class="tab-pane fade show active" role="tabpanel" aria-labelledby="tab-pending">
|
||||
{% if applications %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="text-center">{{ app.created }}</td>
|
||||
<td class="text-center">{{ app.user.username }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
<td class="text-center">{{ app.form.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer_str %}
|
||||
<div class="badge bg-info">{% translate "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% else %}
|
||||
<div class="badge bg-warning">{% translate "Pending" %}</div>
|
||||
{% endif %}
|
||||
{% elif app.approved == True %}
|
||||
<div class="badge bg-success">{% translate "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="badge bg-danger">{% translate "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:view' app.id %}" class="btn btn-primary">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
</td>
|
||||
<th class="text-center">{% translate "Date" %}</th>
|
||||
<th class="text-center">{% translate "Username" %}</th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}</th>
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No pending applications." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="reviewed" class="tab-pane fade panel panel-default">
|
||||
<div class="panel-body">
|
||||
{% if finished_applications %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Date" %}</th>
|
||||
<th class="text-center">{% translate "Username" %}</th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}</th>
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for app in finished_applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.created }}</td>
|
||||
<td class="text-center">{{ app.user.username }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
<td class="text-center">{{ app.form.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer_str %}
|
||||
<div class="badge bg-info">{% translate "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% for app in applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.created }}</td>
|
||||
<td class="text-center">{{ app.user.username }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
<td class="text-center">{{ app.form.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer_str %}
|
||||
<div class="badge bg-info">{% translate "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% else %}
|
||||
<div class="badge bg-warning">{% translate "Pending" %}</div>
|
||||
{% endif %}
|
||||
{% elif app.approved == True %}
|
||||
<div class="badge bg-success">{% translate "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="badge bg-warning">{% translate "Pending" %}</div>
|
||||
<div class="badge bg-danger">{% translate "Rejected" %}</div>
|
||||
{% endif %}
|
||||
{% elif app.approved == True %}
|
||||
<div class="badge bg-success">{% translate "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="badge bg-danger">{% translate "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:view' app.id %}" class="btn btn-primary">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
|
||||
{% if perms.hrapplications.delete_application %}
|
||||
<a href="{% url 'hrapplications:remove' app.id %}" class="btn btn-danger">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:view' app.id %}" class="btn btn-primary">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No pending applications." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="tab-reviewed" class="tab-pane fade" role="tabpanel" aria-labelledby="tab-reviewed">
|
||||
{% if finished_applications %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Date" %}</th>
|
||||
<th class="text-center">{% translate "Username" %}</th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}</th>
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No reviewed applications." %}</div>
|
||||
{% endif %}
|
||||
|
||||
{% for app in finished_applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.created }}</td>
|
||||
<td class="text-center">{{ app.user.username }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
<td class="text-center">{{ app.form.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer_str %}
|
||||
<div class="badge bg-info">{% translate "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% else %}
|
||||
<div class="badge bg-warning">{% translate "Pending" %}</div>
|
||||
{% endif %}
|
||||
{% elif app.approved == True %}
|
||||
<div class="badge bg-success">{% translate "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="badge bg-danger">{% translate "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:view' app.id %}" class="btn btn-primary">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
|
||||
{% if perms.hrapplications.delete_application %}
|
||||
<a href="{% url 'hrapplications:remove' app.id %}" class="btn btn-danger">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No reviewed applications." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span><span class="sr-only">{% translate "Close" %}</span>
|
||||
</button>
|
||||
|
||||
<h4 class="modal-title" id="myModalLabel">{% translate "Application Search" %}</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form" action="{% url 'hrapplications:search' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Search" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "hrapplications/partials/modals/search.html" %}
|
||||
{% endblock content %}
|
||||
|
@ -0,0 +1,32 @@
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="modal-hr-search" tabindex="-1" aria-labelledby="modalHrSearch" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="modal-title fs-5" id="modalHrSearchLabel">
|
||||
{% translate "Application Search" %}
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% translate 'Close' %}"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form" action="{% url 'hrapplications:search' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% bootstrap_form search_form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Search" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text name="search" id="search" %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
@ -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 %}
|
||||
<div>
|
||||
{% if perms.auth.human_resources %}
|
||||
<h1 class="page-header text-center">{% translate "Application Search Results" %}
|
||||
<div class="text-end">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
{% translate "Search Applications" %}
|
||||
</button>
|
||||
</div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Application Search Results" %}
|
||||
</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered">
|
||||
<div class="text-end mb-3">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#modal-hr-search">
|
||||
{% translate "Search Applications" %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Application ID" %}</th>
|
||||
<th class="text-center">{% translate "Username" %}</th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}</th>
|
||||
<th>{% translate "Application ID" %}</th>
|
||||
<th>{% translate "Username" %}</th>
|
||||
<th>{% translate "Main Character" %}</th>
|
||||
<th>{% translate "Corporation" %}</th>
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
<th class="text-end">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for app in applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.id }}</td>
|
||||
<td class="text-center">{{ app.user }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
<td class="text-center">{{ app.form.corp }}</td>
|
||||
<td>{{ app.id }}</td>
|
||||
<td>{{ app.user }}</td>
|
||||
<td >{{ app.main_character }}</td>
|
||||
<td>{{ app.form.corp }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved == None %}
|
||||
<div class="badge bg-warning">{% translate "Pending" %}</div>
|
||||
@ -47,7 +53,7 @@
|
||||
<div class="badge bg-danger">{% translate "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td class="text-end">
|
||||
<a href="{% url 'hrapplications:view' app.id %}" class="btn btn-primary">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
@ -59,31 +65,5 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span><span class="sr-only">{% translate "Close" %}</span>
|
||||
</button>
|
||||
|
||||
<h4 class="modal-title" id="myModalLabel">{% translate "Application Search" %}</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form" action="{% url 'hrapplications:search' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Search" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "hrapplications/partials/modals/search.html" %}
|
||||
{% endblock content %}
|
||||
|
@ -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 %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">{% translate "View Application" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="row">
|
||||
{% if app.approved %}
|
||||
<div class="alert alert-success text-center">{% translate "Approved" %}</div>
|
||||
{% elif app.approved == False %}
|
||||
<div class="alert alert-danger text-center">{% translate "Denied" %}</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "Pending" %}</div>
|
||||
{% endif %}
|
||||
{% if app.reviewer_str %}
|
||||
<div class="alert alert-info text-center">{% translate "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{% if app.approved %}
|
||||
<div class="alert alert-success text-center">{% translate "Approved" %}</div>
|
||||
{% elif app.approved == False %}
|
||||
<div class="alert alert-danger text-center">{% translate "Denied" %}</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "Pending" %}</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">{% translate "Applicant" %}</div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "User" %}</th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">{{ app.user }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% if app.reviewer_str %}
|
||||
<div class="alert alert-info text-center">{% translate "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">{% translate "Characters" %}</div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center"></th>
|
||||
<th class="text-center">{% translate "Name" %}</th>
|
||||
<th class="text-center">{% translate "Corp" %}</th>
|
||||
<th class="text-center">{% translate "Alliance" %}</th>
|
||||
</tr>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header bg-info">
|
||||
<div class="card-title mb-0">{% translate "Applicant" %}</div>
|
||||
</div>
|
||||
|
||||
{% for char in app.characters %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<img class="ra-avatar img-responsive img-circle" src="{{ char.portrait_url_32 }}" alt="{{ char.character_name }}">
|
||||
</td>
|
||||
<td class="text-center">{{ char.character_name }}</td>
|
||||
<td class="text-center">{{ char.corporation_name }}</td>
|
||||
<td class="text-center">{{ char.alliance_name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{% for response in responses %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{{ response.question.title }}</div>
|
||||
<div class="alert">{{ response.answer|linebreaksbr }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if buttons %}
|
||||
{% if perms.auth.human_resources %}
|
||||
<div class="row">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">{% translate "Actions" %}</div>
|
||||
<div class="panel-body text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer == user %}
|
||||
{% if perms.hrapplications.approve_application %}
|
||||
<a href="{% url 'hrapplications:approve' app.id %}" class="btn btn-success">{% translate "Approve" %}</a>
|
||||
{% endif %}
|
||||
{% if perms.hrapplications.reject_application %}
|
||||
<a href="{% url 'hrapplications:reject' app.id %}" class="btn btn-danger">{% translate "Reject" %}</a>
|
||||
{% endif %}
|
||||
{% if perms.hrapplications.delete_application %}
|
||||
<a href="{% url 'hrapplications:remove' app.id %}" class="btn btn-danger">{% translate "Delete" %}</a>
|
||||
{% endif %}
|
||||
{% elif not app.reviewer %}
|
||||
<a href="{% url 'hrapplications:mark_in_progress' app.id %}" class="btn btn-warning">{% translate "Mark in Progress" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if perms.hrapplications.add_applicationcomment %}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">{% translate "Comment" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab" id="headingThree">
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
|
||||
{% translate 'Comments' %} ({{ comments.count }})
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
|
||||
<div class="panel-body">
|
||||
{% for comment in comments %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab" id="">
|
||||
<div class="panel-title">
|
||||
<div class="pull-right">{{ comment.created }}</div>
|
||||
<div class="pull-left">{% if comment.user.profile.main_character %}{{ comment.user.profile.main_character }}{% else %}{{ comment.user }}{% endif %}</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">{{ comment.text|linebreaks }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "User" %}</th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">{{ app.user }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header bg-info">
|
||||
<div class="card-title mb-0">{% translate "Characters" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% translate "Name" %}</th>
|
||||
<th>{% translate "Corporation" %}</th>
|
||||
<th>{% translate "Alliance" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for char in app.characters %}
|
||||
<tr>
|
||||
<td>
|
||||
<img class="ra-avatar img-responsive rounded-circle" src="{{ char.portrait_url_32 }}" alt="{{ char.character_name }}">
|
||||
</td>
|
||||
<td>{{ char.character_name }}</td>
|
||||
<td>{{ char.corporation_name }}</td>
|
||||
<td>{{ char.alliance_name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% for response in responses %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">{{ response.question.title }}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">{{ response.answer|linebreaksbr }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if buttons %}
|
||||
{% if perms.auth.human_resources %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">{% translate "Actions" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer == user %}
|
||||
{% if perms.hrapplications.approve_application %}
|
||||
<a href="{% url 'hrapplications:approve' app.id %}" class="btn btn-success">{% translate "Approve" %}</a>
|
||||
{% endif %}
|
||||
{% if perms.hrapplications.reject_application %}
|
||||
<a href="{% url 'hrapplications:reject' app.id %}" class="btn btn-warning">{% translate "Reject" %}</a>
|
||||
{% endif %}
|
||||
{% if perms.hrapplications.delete_application %}
|
||||
<a href="{% url 'hrapplications:remove' app.id %}" class="btn btn-danger">{% translate "Delete" %}</a>
|
||||
{% endif %}
|
||||
{% elif not app.reviewer %}
|
||||
<a href="{% url 'hrapplications:mark_in_progress' app.id %}" class="btn btn-warning">{% translate "Mark in Progress" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if perms.hrapplications.add_applicationcomment %}
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modal-hr-comment">{% translate "Comment" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
<div class="card card-default">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate 'Comments' %} ({{ comments.count }})
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% if comments %}
|
||||
{% for comment in comments %}
|
||||
<div class="card card-default">
|
||||
<div class="card-header" role="tab" id="">
|
||||
<div class="card-title mb-0 clearfix">
|
||||
<div class="float-md-end">{{ comment.created }}</div>
|
||||
<div class="float-md-start">{% if comment.user.profile.main_character %}{{ comment.user.profile.main_character }}{% else %}{{ comment.user }}{% endif %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">{{ comment.text|linebreaks }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-info">
|
||||
{% translate "No comments" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if perms.hrapplications.add_applicationcomment %}
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal fade" id="modal-hr-comment" tabindex="-1" aria-labelledby="modalHrComment" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span><span class="sr-only">{% translate "Close" %}</span>
|
||||
</button>
|
||||
<div class="modal-title fs-5" id="modalHrCommentLabel">
|
||||
{% translate "Add Comment" %}
|
||||
</div>
|
||||
|
||||
<h4 class="modal-title" id="myModalLabel">{% translate "Add Comment" %}</h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% translate 'Close' %}"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ comment_form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Add Comment" %}</button>
|
||||
|
||||
{% bootstrap_form comment_form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Add comment" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text name="addComment" id="addComment" %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user