mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
Updated hr management to actually be useful
This commit is contained in:
parent
9e432674fa
commit
d52a0d5331
@ -215,6 +215,14 @@ ALLIANCE_EXEC_CORP_ID = ''
|
||||
ALLIANCE_EXEC_CORP_VCODE = ''
|
||||
ALLIANCE_BLUE_STANDING = 5.0
|
||||
|
||||
#####################
|
||||
# HR Configuration
|
||||
#####################
|
||||
# JACK_KNIFE_URL - Url for the audit page of API Jack knife
|
||||
# Should seriously replace with your own.
|
||||
#####################
|
||||
JACK_KNIFE_URL = 'http://ridetheclown.com/eveapi/audit.php'
|
||||
|
||||
#####################
|
||||
# Forum Configuration
|
||||
#####################
|
||||
|
@ -70,10 +70,17 @@ urlpatterns = patterns('',
|
||||
name="auth_hrapplication_remove"),
|
||||
url(r'hr_application_view/(\w+)', 'hrapplications.views.hr_application_view',
|
||||
name="auth_hrapplication_view"),
|
||||
url(r'hr_application_personal_view/', 'hrapplications.views.hr_application_personal_view',
|
||||
url(r'hr_application_personal_view/(\w+)', 'hrapplications.views.hr_application_personal_view',
|
||||
name="auth_hrapplication_personal_view"),
|
||||
url(r'hr_application_personal_removal/', 'hrapplications.views.hr_application_personal_removal',
|
||||
url(r'hr_application_personal_removal/(\w+)',
|
||||
'hrapplications.views.hr_application_personal_removal',
|
||||
name="auth_hrapplication_personal_removal"),
|
||||
url(r'hr_application_approve/(\w+)', 'hrapplications.views.hr_application_approve',
|
||||
name="auth_hrapplication_approve"),
|
||||
url(r'hr_application_reject/(\w+)', 'hrapplications.views.hr_application_reject',
|
||||
name="auth_hrapplication_reject"),
|
||||
url(r'hr_application_search/', 'hrapplications.views.hr_application_search',
|
||||
name="auth_hrapplication_search"),
|
||||
|
||||
# Service Urls
|
||||
url(r'^services/', 'services.views.services_view', name='auth_services'),
|
||||
@ -100,9 +107,12 @@ urlpatterns = patterns('',
|
||||
name='auth_reset_mumble_password'),
|
||||
|
||||
# Ipboard service control
|
||||
url(r'^activate_ipboard/$', 'services.views.activate_ipboard_forum', name='auth_activate_ipboard'),
|
||||
url(r'^deactivate_ipboard/$', 'services.views.deactivate_ipboard_forum', name='auth_deactivate_ipboard'),
|
||||
url(r'^reset_ipboard_password/$', 'services.views.reset_ipboard_password', name='auth_reset_ipboard_password'),
|
||||
url(r'^activate_ipboard/$', 'services.views.activate_ipboard_forum',
|
||||
name='auth_activate_ipboard'),
|
||||
url(r'^deactivate_ipboard/$', 'services.views.deactivate_ipboard_forum',
|
||||
name='auth_deactivate_ipboard'),
|
||||
url(r'^reset_ipboard_password/$', 'services.views.reset_ipboard_password',
|
||||
name='auth_reset_ipboard_password'),
|
||||
|
||||
# Tools
|
||||
url(r'^tool/fleet_formatter_tool/$', 'services.views.fleet_formatter_view',
|
||||
|
1
hrapplications/admin.py
Normal file → Executable file
1
hrapplications/admin.py
Normal file → Executable file
@ -3,6 +3,5 @@ from django.contrib import admin
|
||||
from models import HRApplication
|
||||
from models import HRApplicationComment
|
||||
|
||||
|
||||
admin.site.register(HRApplication)
|
||||
admin.site.register(HRApplicationComment)
|
9
hrapplications/forms.py
Normal file → Executable file
9
hrapplications/forms.py
Normal file → Executable file
@ -18,3 +18,12 @@ class HRApplicationForm(forms.Form):
|
||||
is_a_spi = forms.ChoiceField(choices=[('Yes', 'Yes'), ('No', 'No')], required=True, label='Are you a spy?')
|
||||
about = forms.CharField(widget=forms.Textarea, required=False, label="About You")
|
||||
extra = forms.CharField(widget=forms.Textarea, required=False, label="Extra Application Info")
|
||||
|
||||
|
||||
class HRApplicationCommentForm(forms.Form):
|
||||
app_id = forms.CharField(widget=forms.TextInput(attrs={'readonly': 'True'}))
|
||||
comment = forms.CharField(widget=forms.Textarea, required=False, label="Comment", max_length=254)
|
||||
|
||||
|
||||
class HRApplicationSearchForm(forms.Form):
|
||||
search_string = forms.CharField(max_length=254, required=True, label="Search String")
|
14
hrapplications/models.py
Normal file → Executable file
14
hrapplications/models.py
Normal file → Executable file
@ -2,6 +2,7 @@ from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from eveonline.models import EveCorporationInfo
|
||||
from eveonline.models import EveCharacter
|
||||
|
||||
|
||||
class HRApplication(models.Model):
|
||||
@ -15,12 +16,19 @@ class HRApplication(models.Model):
|
||||
corp = models.ForeignKey(EveCorporationInfo)
|
||||
user = models.ForeignKey(User)
|
||||
|
||||
approved_denied = models.NullBooleanField(blank=True, null=True)
|
||||
reviewer_user = models.ForeignKey(User, blank=True, null=True, related_name="review_user")
|
||||
reviewer_character = models.ForeignKey(EveCharacter, blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.character_name + " - Application"
|
||||
|
||||
|
||||
class HRApplicationComment(models.Model):
|
||||
date = models.DateTimeField(auto_now=True)
|
||||
comment = models.TextField(default="")
|
||||
comment = models.CharField(max_length=254, default="")
|
||||
application = models.ForeignKey(HRApplication)
|
||||
commenter_user = models.ForeignKey(User)
|
||||
commenter_character = models.ForeignKey(EveCharacter)
|
||||
|
||||
user = models.ForeignKey(User)
|
||||
def __str__(self):
|
||||
return str(self.application.character_name) + " - Comment"
|
103
hrapplications/views.py
Normal file → Executable file
103
hrapplications/views.py
Normal file → Executable file
@ -5,7 +5,10 @@ from django.contrib.auth.decorators import login_required
|
||||
from django.shortcuts import HttpResponseRedirect
|
||||
|
||||
from models import HRApplication
|
||||
from models import HRApplicationComment
|
||||
from forms import HRApplicationForm
|
||||
from forms import HRApplicationCommentForm
|
||||
from forms import HRApplicationSearchForm
|
||||
from eveonline.models import EveCorporationInfo
|
||||
from eveonline.models import EveCharacter
|
||||
from authentication.models import AuthServicesInfo
|
||||
@ -24,13 +27,11 @@ def hr_application_management_view(request):
|
||||
if auth_info.main_char_id != "":
|
||||
main_char = EveCharacter.objects.get(character_id=auth_info.main_char_id)
|
||||
corp = EveCorporationInfo.objects.get(corporation_id=main_char.corporation_id)
|
||||
corp_applications = HRApplication.objects.filter(corp=corp)
|
||||
corp_applications = HRApplication.objects.filter(corp=corp).filter(approved_denied=None)
|
||||
|
||||
if HRApplication.objects.filter(user=request.user).exists():
|
||||
personal_app = HRApplication.objects.get(user=request.user)
|
||||
|
||||
context = {'personal_app': personal_app,
|
||||
'applications': corp_applications}
|
||||
context = {'personal_apps': HRApplication.objects.all().filter(user=request.user),
|
||||
'applications': corp_applications,
|
||||
'search_form': HRApplicationSearchForm()}
|
||||
|
||||
return render_to_response('registered/hrapplicationmanagement.html',
|
||||
context, context_instance=RequestContext(request))
|
||||
@ -63,10 +64,13 @@ def hr_application_create_view(request):
|
||||
|
||||
|
||||
@login_required
|
||||
def hr_application_personal_view(request):
|
||||
if HRApplication.objects.filter(user=request.user).exists():
|
||||
application = HRApplication.objects.get(user=request.user)
|
||||
|
||||
def hr_application_personal_view(request, app_id):
|
||||
if HRApplication.objects.filter(id=app_id).exists():
|
||||
application = HRApplication.objects.get(id=app_id)
|
||||
if application.user != request.user:
|
||||
application = HRApplication()
|
||||
else:
|
||||
application = HRApplication()
|
||||
context = {'application': application}
|
||||
|
||||
return render_to_response('registered/hrapplicationview.html',
|
||||
@ -74,9 +78,10 @@ def hr_application_personal_view(request):
|
||||
|
||||
|
||||
@login_required
|
||||
def hr_application_personal_removal(request):
|
||||
if HRApplication.objects.filter(user=request.user).exists():
|
||||
application = HRApplication.objects.get(user=request.user)
|
||||
def hr_application_personal_removal(request, app_id):
|
||||
if HRApplication.objects.filter(id=app_id).exists():
|
||||
application = HRApplication.objects.get(id=app_id)
|
||||
if application.user == request.user:
|
||||
application.delete()
|
||||
|
||||
return HttpResponseRedirect("/hr_application_management/")
|
||||
@ -85,10 +90,29 @@ def hr_application_personal_removal(request):
|
||||
@login_required
|
||||
@permission_required('auth.human_resources')
|
||||
def hr_application_view(request, app_id):
|
||||
if request.method == 'POST':
|
||||
form = HRApplicationCommentForm(request.POST)
|
||||
if form.is_valid():
|
||||
auth_info = AuthServicesInfo.objects.get(user=request.user)
|
||||
|
||||
comment = HRApplicationComment()
|
||||
comment.application = HRApplication.objects.get(id=int(form.cleaned_data['app_id']))
|
||||
comment.commenter_user = request.user
|
||||
comment.commenter_character = EveCharacter.objects.get(character_id=auth_info.main_char_id)
|
||||
comment.comment = form.cleaned_data['comment']
|
||||
comment.save()
|
||||
|
||||
else:
|
||||
form = HRApplicationCommentForm()
|
||||
|
||||
if HRApplication.objects.filter(id=app_id).exists():
|
||||
application = HRApplication.objects.get(id=app_id)
|
||||
comments = HRApplicationComment.objects.all().filter(application=application)
|
||||
else:
|
||||
application = HRApplication()
|
||||
comments = []
|
||||
|
||||
context = {'application': application}
|
||||
context = {'application': application, 'comments': comments, 'comment_form': form}
|
||||
|
||||
return render_to_response('registered/hrapplicationview.html',
|
||||
context, context_instance=RequestContext(request))
|
||||
@ -103,3 +127,54 @@ def hr_application_remove(request, app_id):
|
||||
application.delete()
|
||||
|
||||
return HttpResponseRedirect("/hr_application_management/")
|
||||
|
||||
|
||||
@login_required
|
||||
@permission_required('auth.human_resources')
|
||||
def hr_application_approve(request, app_id):
|
||||
if HRApplication.objects.filter(id=app_id).exists():
|
||||
auth_info = AuthServicesInfo.objects.get(user=request.user)
|
||||
application = HRApplication.objects.get(id=app_id)
|
||||
application.approved_denied = True
|
||||
application.reviewer_user = request.user
|
||||
application.reviewer_character = EveCharacter.objects.get(character_id=auth_info.main_char_id)
|
||||
application.save()
|
||||
|
||||
return HttpResponseRedirect("/hr_application_management/")
|
||||
|
||||
|
||||
@login_required
|
||||
@permission_required('auth.human_resources')
|
||||
def hr_application_reject(request, app_id):
|
||||
if HRApplication.objects.filter(id=app_id).exists():
|
||||
auth_info = AuthServicesInfo.objects.get(user=request.user)
|
||||
application = HRApplication.objects.get(id=app_id)
|
||||
application.approved_denied = False
|
||||
application.reviewer_user = request.user
|
||||
application.reviewer_character = EveCharacter.objects.get(character_id=auth_info.main_char_id)
|
||||
application.save()
|
||||
|
||||
return HttpResponseRedirect("/hr_application_management/")
|
||||
|
||||
|
||||
@login_required
|
||||
@permission_required('auth.human_resources')
|
||||
def hr_application_search(request):
|
||||
if request.method == 'POST':
|
||||
form = HRApplicationSearchForm(request.POST)
|
||||
if form.is_valid():
|
||||
# Really dumb search and only checks character name
|
||||
# This can be improved but it does the job for now
|
||||
searchstring = form.cleaned_data['search_string']
|
||||
applications = []
|
||||
|
||||
for application in HRApplication.objects.all():
|
||||
if searchstring in application.character_name:
|
||||
applications.append(application)
|
||||
|
||||
context = {'applications': applications, 'search_form': HRApplicationSearchForm()}
|
||||
|
||||
return render_to_response('registered/hrapplicationsearchview.html',
|
||||
context, context_instance=RequestContext(request))
|
||||
else:
|
||||
return HttpResponseRedirect("/hr_application_management/")
|
72
templates/registered/hrapplicationmanagement.html
Normal file → Executable file
72
templates/registered/hrapplicationmanagement.html
Normal file → Executable file
@ -26,31 +26,51 @@
|
||||
<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/">
|
||||
|
||||
{% 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,12 +9,38 @@
|
||||
|
||||
{% 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_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>
|
||||
|
||||
@ -78,11 +104,110 @@
|
||||
disabled>{{ application.extra }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</form>
|
||||
|
||||
{% 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 %}
|
@ -25,4 +25,5 @@ def domain_url(request):
|
||||
'ENABLE_BLUE_FORUM': settings.ENABLE_BLUE_FORUM,
|
||||
'ENABLE_BLUE_MUMBLE': settings.ENABLE_BLUE_MUMBLE,
|
||||
'ENABLE_BLUE_IPBOARD': settings.ENABLE_BLUE_IPBOARD,
|
||||
'JACK_KNIFE_URL': settings.JACK_KNIFE_URL,
|
||||
'CURRENT_UTC_TIME': timezone.now()}
|
Loading…
x
Reference in New Issue
Block a user