Files
test-auth/templates/hr/applications/view.html

168 lines
6.3 KiB
HTML

{% extends "base.html" %}
{% load humanize %}
{% load if_extra %}
{% load installed %}
{% block title %}View Application{% endblock %}
{% block content %}
<h3>Application Details</h3>
<ul>
<li>Applying Auth User: <a href="{% url sso.views.user_view app.user %}">{{ app.user }}</a></li>
<li>Applying Character: <a href="{% url eve_api.views.eveapi_character app.character.id %}">{{ app.character }}</a></li>
<li>Applying To: <a href="{% url eve_api.views.eveapi_corporation app.corporation.id %}">{{ app.corporation }}</a></li>
<li>Application Status: <b>{{ app.get_status_display }}</b></li>
<li>Blacklist Status: <b>{% if app.blacklisted %}<font color='red'>BLACKLISTED</font>{% else %}<font color='geen'>OK</font>{% endif %}</b></li>
</ul>
{% ifnotequal app.status 5 %}
<h3>Actions</h3>
<div class="skill_controls">
<p>
{% if app.status < 1 %}
<a href="{% url hr.views.update_application app.id 1 %}">Submit Application</a>
{% else %}
<a href="{% url hr.views.update_application app.id 0 %}">Withdraw Application</a>
{% endif %}
<a href="{% url hr.views.add_message app.id %}">Add Message</a>
{% if hrstaff %}
<a href="{% url hr.views.add_note app.id %}">Add Staff Note</a>
{% if app.status < 2 or app.status = 4 %}
<a href="{% url hr.views.reject_application app.id %}">Reject Application</a>
{% ifequal app.blacklisted 0 %}
<a href="{% url hr.views.accept_application app.id %}">Accept Application</a>
{% endifequal %}
{% ifnotequal app.status 4 %}
<a href="{% url hr.views.update_application app.id 4 %}">Mark as In Query</a>
{% endifnotequal %}
{% endif %}
{% ifequal app.status 3 %}
<a href="{% url hr.views.update_application app.id 5 %}">Mark as Complete</a>
{% endifequal %}
{% endif %}
</p>
</div>
{% endifnotequal %}
{% if audit %}
<h3>Event Log</h3>
<table width="100%">
<tr><th width="50px">Event Type</th><th width="75px">User</th><th width="50px">Date</th><th>Event Details</th></tr>
{% for a in audit %}
<tr><td>{{ a.get_event_display }}</td><td>{{ a.user }}</td><td>{{ a.date|date:"Y/m/d H:i:s" }}</td><td>{{ a.text|linebreaks }}</td></tr>
{% endfor %}
</table>
{% endif %}
{% if app.blacklisted %}
<h3>Blacklist Triggers</h3>
<table>
<tr><th>Blacklist Type</th><th>Blacklisted Value</th><th>Reason</th><th>Source</th></tr>
{% for a in app.blacklist_values %}
<tr><td>{{ a.get_type_display }}</td><td>{{ a.value }}</td><td>{{ a.reason }}</td><td>{{ a.source }}</td></tr>
{% endfor %}
</table>
{% endif %}
{% if app.recommendation_set.all %}
<h3>Recommendations</h3>
<table>
<tr><th>User</th><th>Character</th><th>Corporation</th><th>Valid Recommendation</th></tr>
{% for rec in app.recommendation_set.all %}
<tr><td><a href="{% url sso.views.user_view rec.user %}">{{ rec.user }}</a></td>
<td><a href="{% url eve_api.views.eveapi_character rec.user_character.id %}">{{ rec.user_character }}</a></td>
<td><a href="http://evemaps.dotlan.net/corp/{{ rec.user_character.corporation.name }}">{{ rec.user_character.corporation }}</a></td>
<td>{% if rec.is_valid %}<font color="green">Yes</font>{% else %}<font color="red">No</font>{% endif %}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if hrstaff %}
<h3>EVE Characters</h3>
<table>
<tr><th>Character</th><th>Corp / Alliance</th><th>ISK</th><th>SP</th><th>Links</th></tr>
{% for acc in app.user.eveaccount_set.all %}
{% for char in acc.characters.all %}
<tr><td><a href="{% url eve_api.views.eveapi_character char.id %}">{{ char.name }}</a></td>
<td><a href="http://evemaps.dotlan.net/corp/{{ char.corporation }}">{{ char.corporation }}</a>{% if char.corporation.alliance %} /
<a href="http://evemaps.dotlan.net/alliance/{{ char.corporation.alliance }}">{{ char.corporation.alliance }}</a>{% endif %}
</td>
<td align="right">{{ char.balance|intcomma }} ISK</td>
<td align="right">{{ char.total_sp|intcomma }} SP</td>
<td>{% if request.is_igb %}<a href="javascript:CCPEVE.showInfo(1377, {{ char.id }})">Show In Eve</a> / {% endif %}<a href="https://gate.eveonline.com/Profile/{{ char.name }}/">EveGate Profile</a> / <a href="http://eve-search.com/search/author/{{ char.name }}">EveSearch</a></td>
</tr>
{% endfor %}
{% endfor %}
</table>
{% if "reddit"|installed %}
{% if app.user.redditaccount_set.all %}
<h3>Reddit Accounts</h3>
<table>
<tr><th>Account</th><th>Karma</th><th>Validated</th><th>Creation Date</th><th>Matches Criteria?</th></tr>
{% for acc in app.user.redditaccount_set.all %}
<tr><td><a href="http://reddit.com/user/{{ acc.username }}/">{{ acc.username }}</a></td>
<td>{{ acc.link_karma }} / {{ acc.comment_karma }}</td>
<td>{% if acc.validated %}Validated{%else %}<b>NOT VALIDATED</b>{% endif %}</td>
<td>{{ acc.date_created }}</td>
<td>{% if acc.is_valid %}<font color="green">Yes</font>{% else %}<font color="red">No</font>{% endif %}</td>
</tr>
{% endfor %}
</table>
<h3>Recent Reddit Posts</h3>
<span id="loadlink">
<a href="javascript:redditposts()">Load recent Reddit posts</a>
</span>
<script type="text/javascript">
function createRequestObject() {
var ro;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
ro = new ActiveXObject("Microsoft.XMLHTTP");
}else{
ro = new XMLHttpRequest();
}
return ro;
}
var http = createRequestObject();
function redditposts(action) {
http.open('get', '{% url hr.views.view_application app.id %}?redditxhr');
http.onreadystatechange = handleResponse;
http.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
http.send(null);
}
function handleResponse() {
if(http.readyState == 4){
var response = eval('(' + http.responseText + ')');
var update = new Array();
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>";
} else {
var out = out + "<p>" + response[obj]['body'] + "<br/><b>/r/" + response[obj]['subreddit'] + "</b> <a href=\"" + response[obj]['permalink'] + "\">Permalink</a></p>";
}
}
document.getElementById('redditposts').innerHTML = out;
}
}
</script>
<div id="redditposts">
</div>
{% endif %}
{% endif %}
{% endif %}
{% endblock %}