From 98b93b7b2dde0810b0e0a37af599ba9e536d9719 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sun, 29 May 2011 13:57:49 +0100 Subject: [PATCH] Updated templates from Live --- app/hr/templates/hr/applications/view.html | 2 +- app/sso/templates/sso/lookup/user.html | 2 -- app/sso/templates/sso/profile.html | 12 ++++++------ app/templates/base.html | 4 +++- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/hr/templates/hr/applications/view.html b/app/hr/templates/hr/applications/view.html index 5a8a62a..6089922 100644 --- a/app/hr/templates/hr/applications/view.html +++ b/app/hr/templates/hr/applications/view.html @@ -98,7 +98,7 @@

API Keys

-{% for acc in user.eveaccount_set.all %} +{% for acc in app.user.eveaccount_set.all %} diff --git a/app/sso/templates/sso/lookup/user.html b/app/sso/templates/sso/lookup/user.html index 55573d1..4c3361a 100644 --- a/app/sso/templates/sso/lookup/user.html +++ b/app/sso/templates/sso/lookup/user.html @@ -28,7 +28,6 @@

-{% if is_admin %}
{% if services %}

Service Accounts

@@ -127,6 +126,5 @@
User IDAPI KeyDescriptionTypeActiveLast Updated
{{ acc.api_user_id }} {{ acc.api_key }} {{ acc.description }}
{% endif %} {% endif %} -{% endif %} {% endblock %} diff --git a/app/sso/templates/sso/profile.html b/app/sso/templates/sso/profile.html index a739ac3..e9a1d36 100644 --- a/app/sso/templates/sso/profile.html +++ b/app/sso/templates/sso/profile.html @@ -14,23 +14,23 @@ function refresh_apikey(key) { $("#api-status-" + key).html("
"); $("#api-time-" + key).html("
"); $.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; } }); diff --git a/app/templates/base.html b/app/templates/base.html index f8f3b64..2bfd197 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -23,8 +23,10 @@
  • HR
  • {% endif %}
  • Characters
  • - {% if request.user.is_staff %} + {% if perms.sso.can_search_users %}
  • Lookup User
  • + {% endif %} + {% if request.user.is_staff %}
  • Admin
  • {% endif %}
  • Logout