mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-24 15:19:30 +00:00
Massive reworking of HR to a class view based system.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block content %}
|
||||
<p>Fill in a note you want to send to the user.</p>
|
||||
<form action="{% url hr.views.accept_application applicationid %}" method="post">
|
||||
<form action="{% url hr-acceptapplication application.id %}" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
{% csrf_token %}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% block content %}
|
||||
<p>Select the character you wish to apply with, then the corporation you wish to apply for.</p>
|
||||
|
||||
<form action="{% url hr.views.add_application %}" method="post">
|
||||
<form action="{% url hr-addapplication %}" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% block title %}Send Message to Applicant{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{% url hr.views.add_message applicationid %}" method="post">
|
||||
<form action="{% url hr-addmessage application.id %}" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% block title %}Add Note to Application{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{% url hr.views.add_note applicationid %}" method="post">
|
||||
<form action="{% url hr-addnote application.id %}" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
@@ -5,21 +5,21 @@
|
||||
{% block content %}
|
||||
|
||||
<h1>Search All Applications</h1>
|
||||
<form method="GET" action="{% url hr.views.admin_applications %}">
|
||||
<form method="GET" action="{% url hr-admin %}">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Search" />
|
||||
</form>
|
||||
|
||||
{% if apps %}
|
||||
<table>
|
||||
<tr><th><a href="{% url hr.views.admin_applications %}?o=id">Application ID</a></th>
|
||||
<th><a href="{% url hr.views.admin_applications %}?o=character__name">Character</a></th>
|
||||
<th><a href="{% url hr.views.admin_applications %}?o=corporation__name">Corporation</a></th>
|
||||
<tr><th><a href="{% url hr-admin %}?o=id">Application ID</a></th>
|
||||
<th><a href="{% url hr-admin %}?o=character__name">Character</a></th>
|
||||
<th><a href="{% url hr-admin %}?o=corporation__name">Corporation</a></th>
|
||||
<th>Application Status</th>
|
||||
<th>Last Action Date</th>
|
||||
<th>Last Action User</th></tr>
|
||||
{% for app in apps %}
|
||||
<tr {% if app.alt_application %}id="alt-application"{% endif %}><td><a href="{% url hr.views.view_application app.id %}">{{ app.id }}</a></td>
|
||||
<tr {% if app.alt_application %}id="alt-application"{% endif %}><td><a href="{% url hr-viewapplication app.id %}">{{ app.id }}</a></td>
|
||||
<td>{{ app.character }}</td>
|
||||
<td>{{ app.corporation }}</td>
|
||||
<td>{{ app.get_status_display }}</td>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block content %}
|
||||
<p>Fill in the rejection reason below, please note, this will be sent out to the user.</p>
|
||||
<form action="{% url hr.views.reject_application applicationid %}" method="post">
|
||||
<form action="{% url hr-rejectapplication application.id %}" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
@@ -27,29 +27,29 @@
|
||||
<div class="skill_controls">
|
||||
<p>
|
||||
{% if app.status < 1 %}
|
||||
<a href="{% url hr.views.update_application app.id 1 %}">Submit Application</a>
|
||||
<a href="{% url hr-updateapplication app.id 1 %}">Submit Application</a>
|
||||
{% else %}
|
||||
<a href="{% url hr.views.update_application app.id 0 %}">Withdraw Application</a>
|
||||
<a href="{% url hr-updateapplication app.id 0 %}">Withdraw Application</a>
|
||||
{% endif %}
|
||||
<a href="{% url hr.views.add_message app.id %}">Add Message</a>
|
||||
<a href="{% url hr-addmessage app.id %}">Add Message</a>
|
||||
{% if hrstaff %}
|
||||
<a href="{% url hr.views.add_note app.id %}">Add Staff Note</a>
|
||||
<a href="{% url hr-addnote app.id %}">Add Staff Note</a>
|
||||
{% if app.status < 2 or app.status = 4 or app.status = 6 %}
|
||||
{% if perms.hr.can_accept %}
|
||||
<a href="{% url hr.views.reject_application app.id %}">Reject Application</a>
|
||||
<a href="{% url hr-rejectapplication app.id %}">Reject Application</a>
|
||||
{% ifequal app.blacklisted 0 %}
|
||||
<a href="{% url hr.views.accept_application app.id %}">Accept Application</a>
|
||||
<a href="{% url hr-acceptapplication app.id %}">Accept Application</a>
|
||||
{% endifequal %}
|
||||
{% endif %}
|
||||
{% ifnotequal app.status 4 %}
|
||||
<a href="{% url hr.views.update_application app.id 4 %}">Mark as In Query</a>
|
||||
<a href="{% url hr-updateapplication app.id 4 %}">Mark as In Query</a>
|
||||
{% endifnotequal %}
|
||||
{% ifnotequal app.status 6 %}
|
||||
<a href="{% url hr.views.update_application app.id 6 %}">Flag for Review</a>
|
||||
<a href="{% url hr-updateapplication app.id 6 %}">Flag for Review</a>
|
||||
{% endifnotequal %}
|
||||
{% endif %}
|
||||
{% ifequal app.status 3 %}
|
||||
<a href="{% url hr.views.update_application app.id 5 %}">Mark as Complete</a>
|
||||
<a href="{% url hr-updateapplication app.id 5 %}">Mark as Complete</a>
|
||||
{% endifequal %}
|
||||
{% endif %}
|
||||
</p>
|
||||
@@ -166,7 +166,7 @@ function createRequestObject() {
|
||||
var http = createRequestObject();
|
||||
|
||||
function redditposts(action) {
|
||||
http.open('get', '{% url hr.views.view_application app.id %}?redditxhr');
|
||||
http.open('get', '{% url reddit-commentsjson %}?userid={{ app.user.id }}');
|
||||
http.onreadystatechange = handleResponse;
|
||||
http.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
http.send(null);
|
||||
@@ -180,11 +180,11 @@ function handleResponse() {
|
||||
document.getElementById('loadlink').style.display = 'none';
|
||||
|
||||
var out = '';
|
||||
for (var obj in response) {
|
||||
if (response[obj]['kind'] == 2) {
|
||||
var out = out + "<p><b><a href=\"http://reddit.com" + response[obj]['permalink'] + "\">" + response[obj]['title'] + "</a></b> - (/r/" + response[obj]['subreddit']+ ")</p>";
|
||||
for (var obj in response['posts']) {
|
||||
if (response['posts'][obj]['kind'] == 2) {
|
||||
var out = out + "<p><b><a href=\"http://reddit.com" + response['posts'][obj]['permalink'] + "\">" + response['posts'][obj]['title'] + "</a></b> - (/r/" + response['posts'][obj]['subreddit']+ ")</p>";
|
||||
} else {
|
||||
var out = out + "<p>" + response[obj]['body'] + "<br/><b>/r/" + response[obj]['subreddit'] + "</b> <a href=\"" + response[obj]['permalink'] + "\">Permalink</a></p>";
|
||||
var out = out + "<p>" + response['posts'][obj]['body'] + "<br/><b>/r/" + response['posts'][obj]['subreddit'] + "</b> <a href=\"" + response['posts'][obj]['permalink'] + "\">Permalink</a></p>";
|
||||
}
|
||||
}
|
||||
document.getElementById('redditposts').innerHTML = out;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<table>
|
||||
<tr><th>Application ID</th><th>Character</th><th>Corporation</th><th>Application Status</th></tr>
|
||||
{% for app in apps %}
|
||||
<tr><td><a href="{% url hr.views.view_application app.id %}">{{ app.id }}</a></td>
|
||||
<tr><td><a href="{% url hr-viewapplication app.id %}">{{ app.id }}</a></td>
|
||||
<td>{{ app.character }}</td>
|
||||
<td>{{ app.corporation }}</td>
|
||||
<td>{{ app.get_status_display }}</td>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load installed %}
|
||||
{% block title %}Blacklist User{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -10,12 +10,14 @@
|
||||
<li>EVE API Keys</li>
|
||||
<li>Characters</li>
|
||||
<li>Email Addresses</li>
|
||||
{% if "reddit"|installed %}
|
||||
<li>Reddit Accounts</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<form action="{% url hr.views.blacklist_user u.id %}" method="post">
|
||||
<form action="{% url hr-blacklistuser blacklistuser.id %}" method="post">
|
||||
<table>
|
||||
<tr><th><label>User:</label></th><td>{{ u.username }}</td></tr>
|
||||
<tr><th><label>User:</label></th><td>{{ blacklistuser.username }}</td></tr>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
|
||||
@@ -6,20 +6,21 @@
|
||||
<H1>HR</H1>
|
||||
|
||||
<h3>Applications</h3>
|
||||
<p><a href="{% url hr.views.view_applications %}">View your current open applications</a><br/>
|
||||
<a href="{% url hr.views.add_application %}">Create a application</a><br/></p>
|
||||
<p><a href="{% url hr-userapplications %}">View your current open applications</a><br/>
|
||||
<a href="{% url hr-addapplication %}">Create a application</a><br/></p>
|
||||
|
||||
{% if can_recommend %}
|
||||
<h3>Recommendations</h3>
|
||||
<p>
|
||||
<a href="{% url hr.views.view_recommendations %}">View your current open recommendations</a><br/>
|
||||
<a href="{% url hr.views.add_recommendation %}">Add a recommendation</a><br/>
|
||||
<a href="{% url hr-viewrecommendations %}">View your current open recommendations</a><br/>
|
||||
<a href="{% url hr-addrecommendation %}">Add a recommendation</a><br/>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if hrstaff %}
|
||||
<h3>HR Admin</h3>
|
||||
<p>
|
||||
<a href="{% url hr.views.admin_applications %}">View applications</a><br/>
|
||||
<a href="{% url hr-admin %}">View applications</a><br/>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
The person you are recommending needs to have created their application before you can add a recommendation.</p>
|
||||
|
||||
<form action="{% url hr.views.add_recommendation %}" method="post">
|
||||
<form action="{% url hr-addrecommendation %}" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
{% block content %}
|
||||
<p>This list shows your current open recommendations that are yet to be submitted, as
|
||||
soon as the recommended user submits their application your recommendation will be removed from this list.</p>
|
||||
{% if recs %}
|
||||
{% if recommendations %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Recommender</th><th>Recommended Application</th><th>Application Status</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for rec in recs %}
|
||||
{% for rec in recommendations %}
|
||||
<tr><td>{{ rec.user_character }}</td>
|
||||
<td>{{ rec.application }}</td>
|
||||
<td>{{ rec.application.get_status_display }}</td>
|
||||
|
||||
Reference in New Issue
Block a user