Updated templates from Live

This commit is contained in:
2011-05-29 13:57:49 +01:00
parent 071a21e704
commit 98b93b7b2d
4 changed files with 10 additions and 10 deletions

View File

@@ -98,7 +98,7 @@
<h3>API Keys</h3>
<table>
<tr><th>User ID</th><th>API Key</th><th>Description</th><th>Type</th><th>Active</th><th>Last Updated</th></tr>
{% for acc in user.eveaccount_set.all %}
{% for acc in app.user.eveaccount_set.all %}
<tr><td>{{ acc.api_user_id }}</td>
<td>{{ acc.api_key }}</td>
<td>{{ acc.description }}</td>

View File

@@ -28,7 +28,6 @@
</div>
</p>
{% if is_admin %}
<br/>
{% if services %}
<h2>Service Accounts</h2>
@@ -127,6 +126,5 @@
</table>
{% endif %}
{% endif %}
{% endif %}
{% endblock %}

View File

@@ -14,23 +14,23 @@ function refresh_apikey(key) {
$("#api-status-" + key).html("<center><img src='{{ STATIC_URL }}img/spinner.gif'/></center>");
$("#api-time-" + key).html("<center><img src='{{ STATIC_URL }}img/spinner.gif'/></center>");
$.getJSON("/eve/eveapi/refresh/" + key + "/", function(json) {
$("#api-time-" + json[0].fields.api_user_id).html("a moment ago");
$("#api-time-" + json[0].pk).html("a moment ago");
switch(json[0].fields.api_status) {
case 0:
$("#api-status-" + json[0].fields.api_user_id).html("Unknown");
$("#api-status-" + json[0].pk).html("Unknown");
break;
case 1:
$("#api-status-" + json[0].fields.api_user_id).html("OK");
$("#api-status-" + json[0].pk).html("OK");
break;
case 2:
$("#api-status-" + json[0].fields.api_user_id).html("Other Error");
$("#api-status-" + json[0].pk).html("Other Error");
break;
case 3:
$("#api-status-" + json[0].fields.api_user_id).html("Account Expired");
$("#api-status-" + json[0].pk).html("Account Expired");
break;
default:
$("#api-status-" + json[0].fields.api_user_id).html("Error");
$("#api-status-" + json[0].pk).html("Error");
break;
}
});

View File

@@ -23,8 +23,10 @@
<li><a href="{% url hr.views.index %}">HR</a></li>
{% endif %}
<li><a href="{% url eve_api.views.eveapi_character %}">Characters</a></li>
{% if request.user.is_staff %}
{% if perms.sso.can_search_users %}
<li><a href="{% url sso.views.user_lookup %}">Lookup User</a></li>
{% endif %}
{% if request.user.is_staff %}
<li><a href="/admin/">Admin</a></li>
{% endif %}
<li><a href="{% url django.contrib.auth.views.logout %}">Logout</a></li>