Finish moving the eve_api functions out to the eve_api app

This commit is contained in:
2011-01-13 12:58:41 +00:00
parent 846964f778
commit d34ca5bfa5
9 changed files with 144 additions and 94 deletions

View File

@@ -7,7 +7,7 @@
href="http://eve-online.com/api">EVE Online API
page</a> and a optional description.</p>
<form action="{% url sso.views.eveapi_add %}" method="post">
<form action="{% url eve_api.views.eveapi_add %}" method="post">
<table>
{{ form.as_table }}
</table>
@@ -15,6 +15,5 @@ page</a> and a optional description.</p>
{% csrf_token %}
<input type="submit" value="Add Key" />
</form>
<p>Once you have added your EVE API key, don't forget to apply in game, as well as add an application through our
<a href="{% url hr.applications.add}">HR system.</a></p>
{% endblock %}

View File

@@ -13,7 +13,7 @@
function refresh_apikey(key) {
$("#api-status-" + key).html("<center><img src='/static/img/spinner.gif'/></center>");
$("#api-time-" + key).html("<center><img src='/static/img/spinner.gif'/></center>");
$.getJSON("/profile/refresh/eveapi/" + key + "/", function(json) {
$.getJSON("/eve/eveapi/refresh/" + key + "/", function(json) {
$("#api-time-" + json[0].fields.api_user_id).html("a moment ago");
switch(json[0].fields.api_status) {
@@ -107,15 +107,15 @@ setup.</p>
<td id="api-status-{{ acc.api_user_id }}">{{ acc.get_api_status_display }}</td>
<td id="api-time-{{ acc.api_user_id }}">{{ acc.api_last_updated|naturaltimediff }}</td>
<td><a href="javascript:refresh_apikey({{ acc.api_user_id }})">Refresh</a>,&nbsp;
<a href="{% url sso.views.eveapi_log acc.api_user_id %}">Logs</a>,&nbsp;
<a href="{% url sso.views.eveapi_del acc.api_user_id %}">Delete</a></td>
<a href="{% url eve_api.views.eveapi_log acc.api_user_id %}">Logs</a>,&nbsp;
<a href="{% url eve_api.views.eveapi_del acc.api_user_id %}">Delete</a></td>
</tr>
</tbody>
{% endfor %}
</table>
{% endif %}
<p>
<a href="{% url sso.views.eveapi_add %}">Add a Eve API key</a>
<a href="{% url eve_api.views.eveapi_add %}">Add a Eve API key</a>
</p>
<br/>