mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-09 08:36:23 +01:00
Updated hr management to actually be useful
This commit is contained in:
98
templates/registered/hrapplicationmanagement.html
Normal file → Executable file
98
templates/registered/hrapplicationmanagement.html
Normal file → Executable file
@@ -11,46 +11,66 @@
|
||||
<div class="col-lg-12">
|
||||
{% if not perms.auth.alliance_member %}
|
||||
<h1 class="page-header text-center">Personal Applications
|
||||
<div class="text-right">
|
||||
<a href="{% url 'auth_hrapplication_create_view' %}">
|
||||
{% if personal_app %}
|
||||
<button type="button" class="btn btn-success" disabled>Create Application</button>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-success">Create Application</button>
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
</h1>
|
||||
<div class="text-right">
|
||||
<a href="{% url 'auth_hrapplication_create_view' %}">
|
||||
{% if personal_app %}
|
||||
<button type="button" class="btn btn-success" disabled>Create Application</button>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-success">Create Application</button>
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
</h1>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="text-center">Application ID</th>
|
||||
<th class="text-center">Username</th>
|
||||
<th class="text-center">Main Character</th>
|
||||
<th class="text-center">Corporation</th>
|
||||
<th class="text-center">Corporation
|
||||
<th class="text-center">Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
{% if personal_app %}
|
||||
{% for personal_app in personal_apps %}
|
||||
<tr>
|
||||
<td class="text-center">{{ personal_app.id }}</td>
|
||||
<td class="text-center">{{ personal_app.user.username }}</td>
|
||||
<td class="text-center">{{ personal_app.character_name }}</td>
|
||||
<td class="text-center">{{ personal_app.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
<a href="/hr_application_personal_view/">
|
||||
{% if personal_app.approved_denied == None %}
|
||||
<div class="panel panel-warning" role="alert">Pending</div>
|
||||
{% elif personal_app.approved_denied == True %}
|
||||
<div class="panel panel-success" role="alert">Approved</div>
|
||||
{% else %}
|
||||
<div class="panel panel-danger" role="alert">Rejected</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="/hr_application_personal_view/{{ personal_app.id }}">
|
||||
<button type="button" class="btn btn-primary"><span
|
||||
class="glyphicon glyphicon-eye-open"></span></button>
|
||||
</a>
|
||||
<a href="/hr_application_personal_removal/">
|
||||
<button type="button" class="btn btn-danger"><span
|
||||
class="glyphicon glyphicon-remove"></span></button>
|
||||
</a>
|
||||
|
||||
{% if personal_app.approved_denied == None %}
|
||||
<a href="/hr_application_personal_removal/{{ personal_app.id }}">
|
||||
<button type="button" class="btn btn-danger"><span
|
||||
class="glyphicon glyphicon-remove"></span></button>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% if perms.auth.human_resources %}
|
||||
<h1 class="page-header text-center">Application Management</h1>
|
||||
<h1 class="page-header text-center">Application Management
|
||||
<div class="text-right">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
Search Applications
|
||||
</button>
|
||||
</div>
|
||||
</h1>
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
@@ -58,6 +78,7 @@
|
||||
<th class="text-center">Username</th>
|
||||
<th class="text-center">Main Character</th>
|
||||
<th class="text-center">Corporation</th>
|
||||
<th class="text-center">Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
{% for app in applications %}
|
||||
@@ -66,15 +87,20 @@
|
||||
<td class="text-center">{{ app.user.username }}</td>
|
||||
<td class="text-center">{{ app.character_name }}</td>
|
||||
<td class="text-center">{{ app.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved_denied == None %}
|
||||
<div class="panel panel-warning" role="alert">Pending</div>
|
||||
{% elif app.approved_denied == True %}
|
||||
<div class="panel panel-success" role="alert">Approved</div>
|
||||
{% else %}
|
||||
<div class="panel panel-danger" role="alert">Rejected</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="/hr_application_view/{{ app.id }}">
|
||||
<button type="button" class="btn btn-primary"><span
|
||||
class="glyphicon glyphicon-eye-open"></span></button>
|
||||
</a>
|
||||
<a href="/hr_application_remove/{{ app.id }}">
|
||||
<button type="button" class="btn btn-danger"><span
|
||||
class="glyphicon glyphicon-remove"></span></button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -83,4 +109,30 @@
|
||||
{% 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">Close</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">Application Search</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form"
|
||||
action={% url 'auth_hrapplication_search' %} method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
||||
85
templates/registered/hrapplicationsearchview.html
Executable file
85
templates/registered/hrapplicationsearchview.html
Executable file
@@ -0,0 +1,85 @@
|
||||
{% extends "public/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}HR Application Management{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
{% if perms.auth.human_resources %}
|
||||
<h1 class="page-header text-center">Application Search Results
|
||||
<div class="text-right">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
Search Applications
|
||||
</button>
|
||||
</div>
|
||||
</h1>
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="text-center">Application ID</th>
|
||||
<th class="text-center">Username</th>
|
||||
<th class="text-center">Main Character</th>
|
||||
<th class="text-center">Corporation</th>
|
||||
<th class="text-center">Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
{% for app in applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.id }}</td>
|
||||
<td class="text-center">{{ app.user.username }}</td>
|
||||
<td class="text-center">{{ app.character_name }}</td>
|
||||
<td class="text-center">{{ app.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved_denied == None %}
|
||||
<div class="panel panel-warning" role="alert">Pending</div>
|
||||
{% elif app.approved_denied == True %}
|
||||
<div class="panel panel-success" role="alert">Approved</div>
|
||||
{% else %}
|
||||
<div class="panel panel-danger" role="alert">Rejected</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="/hr_application_view/{{ app.id }}">
|
||||
<button type="button" class="btn btn-primary"><span
|
||||
class="glyphicon glyphicon-eye-open"></span></button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</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">Close</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">Application Search</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form"
|
||||
action={% url 'auth_hrapplication_search' %} method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
131
templates/registered/hrapplicationview.html
Normal file → Executable file
131
templates/registered/hrapplicationview.html
Normal file → Executable file
@@ -9,14 +9,40 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">Create Application</h1>
|
||||
<h1 class="page-header text-center">View Application</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<form class="form-signin">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="id_character_name">User Account</label>
|
||||
<label class="control-label " for="id_extra">Status</label>
|
||||
|
||||
<div class=" ">
|
||||
{% if application.approved_denied == None %}
|
||||
<div class="alert alert-warning" role="alert">Pending</div>
|
||||
{% elif application.approved_denied %}
|
||||
<div class="alert alert-success" role="alert">Approved</div>
|
||||
{% else %}
|
||||
<div class="alert alert-danger" role="alert">Rejected</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label " for="id_extra">Reviewer</label>
|
||||
|
||||
<div class=" ">
|
||||
{% if application.reviewer_character == None %}
|
||||
<div class="alert alert-info" role="alert">pending</div>
|
||||
{% else %}
|
||||
<div class="alert alert-info"
|
||||
role="alert">{{ application.reviewer_character.character_name }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="id_character_name">User Account</label>
|
||||
|
||||
<div class=" ">
|
||||
<input class=" form-control" value="{{ application.user.username }}" disabled>
|
||||
@@ -78,11 +104,110 @@
|
||||
disabled>{{ application.extra }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<div class="form-group text-center">
|
||||
<label class="control-label text-center" for="id_extra">Actions</label>
|
||||
|
||||
<div class="container-fluid well">
|
||||
<div class="row text-center">
|
||||
<a href="/hr_application_approve/{{ application.id }}">
|
||||
<button type="button" class="btn btn-lg btn-success">Approve</button>
|
||||
</a>
|
||||
|
||||
<a href="/hr_application_reject/{{ application.id }}">
|
||||
<button type="button" class="btn btn-lg btn-info">Reject</button>
|
||||
</a>
|
||||
|
||||
<a href="/hr_application_remove/{{ application.id }}">
|
||||
<button type="button" class="btn btn-lg btn-danger">Delete</button>
|
||||
</a>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<div class="row text-center">
|
||||
<a href="{{ JACK_KNIFE_URL }}?usid={{ application.full_api_id }}&apik={{ application.full_api_key }}"
|
||||
target="_blank">
|
||||
<button type="button" class="btn btn-lg btn-primary">API Jack Knife</button>
|
||||
</a>
|
||||
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal"
|
||||
data-target="#myModal">
|
||||
Comment
|
||||
</button>
|
||||
</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">
|
||||
Comments - {{ comments|length }}
|
||||
</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">{{ comment.commenter_character.character_name }}
|
||||
- {{ comment.commenter_character.corporation_name }}</div>
|
||||
</div>
|
||||
<div class="panel-body">{{ comment.comment }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<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">Close</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">Add Comment</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ comment_form.app_id|bootstrap }}
|
||||
{{ comment_form.comment|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Add Comment</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
{% block extra_script %}
|
||||
$(document).ready(function(){
|
||||
var appid = {{ application.id }};
|
||||
|
||||
$('#id_app_id').val(appid);
|
||||
$('#id_commenter_id').val(commenterid);
|
||||
});
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user