Switch Add/Update to use CBV, combine templates into one.

This commit is contained in:
2012-06-06 20:59:29 +01:00
parent a39fe76e47
commit f4e08ca8ad
7 changed files with 85 additions and 117 deletions

View File

@@ -99,7 +99,7 @@
<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>{% ifswitch api-disableprocessing %}{% else %}<a href="{% url eveapi-refresh acc.api_user_id %}" onclick="javascript:refresh_apikey({{ acc.api_user_id }}); return false;">Refresh</a>,&nbsp;
<a href="{% url eve_api.views.eveapi_update acc.api_user_id %}">Update Key</a>,&nbsp;{% endifswitch %}
<a href="{% url eveapi-update acc.api_user_id %}">Update Key</a>,&nbsp;{% endifswitch %}
<a href="{% url eveapi-log acc.api_user_id %}">Logs</a>{% ifswitch eve-keydelete %},&nbsp;
<a href="{% url eveapi-delete acc.api_user_id %}">Delete</a>{% endifswitch %}</td>
</tr>
@@ -112,7 +112,7 @@
<p>
{% ifswitch api-disableprocessing %}
{% else %}
<a href="{% url eve_api.views.eveapi_add %}" class="btn primary" title="Adds a new EVE API key to your account">Add a Eve API key</a>
<a href="{% url eveapi-add %}" class="btn primary" title="Adds a new EVE API key to your account">Add a Eve API key</a>
<a href="https://support.eveonline.com/api/Key/CreatePredefined/59638024/0/false" class="btn" title="Create a API key with all the permissions Auth needs">Create API Key</a>
<a href="{% url sso.views.refresh_access %}" class="btn {% if not user.eveaccount_set.all %}disabled{% else %}danger{% endif %}" title="Forces auth to recheck your permissions and update your services as needed">Force Access Update</a>
{% endifswitch %}