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> <h3>API Keys</h3>
<table> <table>
<tr><th>User ID</th><th>API Key</th><th>Description</th><th>Type</th><th>Active</th><th>Last Updated</th></tr> <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> <tr><td>{{ acc.api_user_id }}</td>
<td>{{ acc.api_key }}</td> <td>{{ acc.api_key }}</td>
<td>{{ acc.description }}</td> <td>{{ acc.description }}</td>

View File

@@ -28,7 +28,6 @@
</div> </div>
</p> </p>
{% if is_admin %}
<br/> <br/>
{% if services %} {% if services %}
<h2>Service Accounts</h2> <h2>Service Accounts</h2>
@@ -127,6 +126,5 @@
</table> </table>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %}
{% endblock %} {% 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-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>"); $("#api-time-" + key).html("<center><img src='{{ STATIC_URL }}img/spinner.gif'/></center>");
$.getJSON("/eve/eveapi/refresh/" + key + "/", function(json) { $.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) { switch(json[0].fields.api_status) {
case 0: case 0:
$("#api-status-" + json[0].fields.api_user_id).html("Unknown"); $("#api-status-" + json[0].pk).html("Unknown");
break; break;
case 1: case 1:
$("#api-status-" + json[0].fields.api_user_id).html("OK"); $("#api-status-" + json[0].pk).html("OK");
break; break;
case 2: case 2:
$("#api-status-" + json[0].fields.api_user_id).html("Other Error"); $("#api-status-" + json[0].pk).html("Other Error");
break; break;
case 3: case 3:
$("#api-status-" + json[0].fields.api_user_id).html("Account Expired"); $("#api-status-" + json[0].pk).html("Account Expired");
break; break;
default: default:
$("#api-status-" + json[0].fields.api_user_id).html("Error"); $("#api-status-" + json[0].pk).html("Error");
break; break;
} }
}); });

View File

@@ -23,8 +23,10 @@
<li><a href="{% url hr.views.index %}">HR</a></li> <li><a href="{% url hr.views.index %}">HR</a></li>
{% endif %} {% endif %}
<li><a href="{% url eve_api.views.eveapi_character %}">Characters</a></li> <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> <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> <li><a href="/admin/">Admin</a></li>
{% endif %} {% endif %}
<li><a href="{% url django.contrib.auth.views.logout %}">Logout</a></li> <li><a href="{% url django.contrib.auth.views.logout %}">Logout</a></li>