Further theme updating changes.

This commit is contained in:
2011-12-04 01:39:03 +00:00
parent 1bf5099dab
commit 76c6df0fd2
20 changed files with 461 additions and 355 deletions

View File

@@ -99,12 +99,12 @@ class UserLookupForm(forms.Form):
choices = [(1, "Auth Username"),
(2, "Character"),
(4, "Email Address"),
(5, "EVE API User ID"), ]
(5, "EVE API Key ID"), ]
if installed('reddit') and gargoyle.is_active('reddit', request):
choices.append((3, "Reddit ID"))
self.fields['type'] = forms.ChoiceField(label=u'Search type', choices=choices)
self.fields['username'] = forms.CharField(label=u'User ID', max_length=64)
self.fields['username'] = forms.CharField(label=u'Value', max_length=64)
class APIPasswordForm(forms.Form):

View File

@@ -6,7 +6,9 @@
{% block content %}
<div class="page-header">
<h1>{{user.username}}'s Profile</h1>
</div>
<p>
<li><b>Username:</b> {{ user.username }}</li>
@@ -19,81 +21,90 @@
</p>
<p>
<div class="skill_controls">
<a href="{% url sso.views.refresh_access user.id %}">Update Access</a>
<a href="{% url sso.views.refresh_access user.id %}" class="btn error">Update Access</a>
{% if "hr"|installed %}
{% if perms.hr.add_blacklist %}
<a href="{% url hr-blacklistuser user.id %}">Blacklist User</a>
<a href="{% url hr-blacklistuser user.id %}" class="btn error">Blacklist User</a>
{% endif %}
{% endif %}
</div>
</p>
<br/>
{% if services %}
<h2>Service Accounts</h2>
<table>
<tr><th>Service</th><th>Username</th><th>Active</th></tr>
{% for acc in services %}
<tr><td>{{ acc.service }}</td>
<td>{{ acc.service_uid }}</td>
<td>{% if acc.active %}Yes{% else %}No{% endif %}</td>
</tr>
{% endfor %}
</table>
<section id="services">
<h2>Service Accounts</h2>
<table>
<tr><th>Service</th><th>Username</th><th>Active</th></tr>
{% for acc in services %}
<tr><td>{{ acc.service }}</td>
<td>{{ acc.service_uid }}</td>
<td>{% if acc.active %}Yes{% else %}No{% endif %}</td>
</tr>
{% endfor %}
</table>
</section>
{% endif %}
<br/>
{% if user.application_set.all %}
<h2>Applications</h2>
<table>
<tr><th>ID</th><th>Character</th><th>Applied To</th><th>Status</th></tr>
{% for app in user.application_set.all %}
<tr><td><a href="{% url hr-viewapplication app.id %}">{{ app.id }}</a></td>
<td>{{ app.character }}</td>
<td>{{ app.corporation }}</td>
<td>{{ app.get_status_display }}</td></tr>
{% endfor %}
</table>
<section id="applications">
<h2>Applications</h2>
<table class="zebra-striped">
<tr><th>ID</th><th>Character</th><th>Applied To</th><th>Status</th></tr>
{% for app in user.application_set.all %}
<tr><td><a href="{% url hr-viewapplication app.id %}">{{ app.id }}</a></td>
<td>{{ app.character }}</td>
<td>{{ app.corporation }}</td>
<td>{{ app.get_status_display }}</td></tr>
{% endfor %}
</table>
</section>
{% endif %}
{% if user.recommendation_set.all %}
<br />
<h2>Recommendations</h2>
<table>
<tr><th>Recommended Application</th><th>Recommendation Character</th><th>Recommendation Date</th></tr>
{% for rec in user.recommendation_set.all %}
<tr><td><a href="{% url hr-viewapplication rec.application.id %}">{{ rec.application.character.name }}</a></td>
<td>{{ rec.user_character }}</td>
<td>{{ rec.recommendation_date }}</td></tr>
{% endfor %}
</table>
<section id="recommendations">
<h2>Recommendations</h2>
<table>
<thead>
<tr><th>Recommended Application</th><th>Recommendation Character</th><th>Recommendation Date</th></tr>
</thead>
<tbody>
{% for rec in user.recommendation_set.all %}
<tr><td><a href="{% url hr-viewapplication rec.application.id %}">{{ rec.application.character.name }}</a></td>
<td>{{ rec.user_character }}</td>
<td>{{ rec.recommendation_date }}</td></tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
{% if perms.sso.can_view_users %}
<br/>
<h2>Eve API Keys</h2>
{% if user.eveaccount_set.all %}
<table>
<thead>
<tr><th>User ID</th><th>API Key</th><th>Description</th><th>Type</th><th>Active</th><th>Last Updated</th></tr>
</thead>
<tbody>
{% for acc in user.eveaccount_set.all %}
<tr><td>{{ acc.api_user_id }}</td>
<td>{{ acc.api_key }}</td>
<td>{{ acc.description }}</td>
<td>{{ acc.get_api_keytype_display }}</td>
<td>{{ acc.get_api_status_display }}</td>
<td>{{ acc.api_last_updated|naturaltimediff }}</td>
</tr>
</tbody>
{% endfor %}
</table>
<section id="api">
<h2>Eve API Keys</h2>
<table>
<thead>
<tr><th>User ID</th><th>API Key</th><th>Description</th><th>Type</th><th>Active</th><th>Last Updated</th></tr>
</thead>
<tbody>
{% for acc in user.eveaccount_set.all %}
<tr><td>{{ acc.api_user_id }}</td>
<td>{{ acc.api_key }}</td>
<td>{{ acc.description }}</td>
<td>{{ acc.get_api_keytype_display }}</td>
<td>{{ acc.get_api_status_display }}</td>
<td>{{ acc.api_last_updated|naturaltimediff }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
{% endif %}
<br/>
{% if user.eveaccount_set.all %}
<table>
<tr><th>Character Name</th><th>Corp</th></tr>
@@ -110,22 +121,23 @@
{% if "reddit"|installed %}
{% ifswitch reddit %}
<br/>
<h2>Reddit Accounts</h2>
{% if user.redditaccount_set.all %}
<table>
<thead>
<tr><th>Username</th><th>Created Date</th><th>Validated</th></tr>
</thead>
<tbody>
{% for acc in user.redditaccount_set.all %}
<tr><td><a href="http://reddit.com/user/{{ acc.username }}/">{{ acc.username }}</a></td>
<td>{{ acc.date_created }}</td>
<td>{% if acc.validated %}Yes{% else %}No{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
<section id="reddit">
<h2>Reddit Accounts</h2>
{% if user.redditaccount_set.all %}
<table class="zebra-striped">
<thead>
<tr><th>Username</th><th>Created Date</th><th>Validated</th></tr>
</thead>
<tbody>
{% for acc in user.redditaccount_set.all %}
<tr><td><a href="http://reddit.com/user/{{ acc.username }}/">{{ acc.username }}</a></td>
<td>{{ acc.date_created }}</td>
<td>{% if acc.validated %}Yes{% else %}No{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
{% endifswitch %}
{% endif %}

View File

@@ -3,13 +3,29 @@
{% block title %}User Lookup{% endblock %}
{% block content %}
<h1>User Lookup</h1>
<div class="page-header">
<h1>Search / User Lookup</h1>
</div>
<p>This will search Auth's database for any users matching the values you provide.</p>
<p>
<form action="{% url sso.views.user_lookup %}" method="post">
{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<br />
<input type="submit" value="Lookup" />
<formset>
{% csrf_token %}
<div class="clearfix">
{{ form.type.label_tag }}
<div class="input">
{{ form.type }}
</div>
</div>
<div class="clearfix">
{{ form.username.label_tag }}
<div class="input">
{{ form.username }}
</div>
</div>
<input type="submit" value="Lookup" class="btn primary"/>
</formset>
</form>
</p>
{% endblock %}

View File

@@ -23,7 +23,6 @@
<li><a href="#reddit">Reddit</a></li>
{% endifswitch %}
{% endif %}
<li><a href="#services">Services</a></li>
</ul>
<div class="pill-content">
@@ -32,30 +31,20 @@
<div class="active" id="overview">
<p>
<b>Username:</b> {{ user.username }}<br/>
<b>Email:</b> {{ user.email }}<br/>
<b>Primary Character:</b> {{ user.get_profile.primary_character }}<br/>
<b>Email:</b> {{ user.email }} (<a href="{% url sso.views.email_change %}">change</a>)<br/>
<b>Primary Character:</b> {{ user.get_profile.primary_character }} (<a href="{% url sso.views.primarychar_change %}">change</a>)<br/>
<b>Groups:</b> {{ user.groups.all|join:", " }}<br/>
</p>
<h2>Passwords</h2>
<p>
<a href="{% url sso.views.refresh_access %}" class="btn">Update Access</a>
<a href="{% url django.contrib.auth.views.password_change %}" class="btn">Change Password</a>
<a href="{% url sso.views.email_change %}" class="btn">Change E-mail</a>
<a href="{% url sso.views.primarychar_change %}" class="btn">Change Primary Character</a>
<a href="{% url django.contrib.auth.views.password_change %}" class="btn">Change Auth Login Password</a>
<a href="{% url sso.views.set_apipasswd %}" class="btn">Change Services Password</a><br/><br/>
<span class="label info">Note</span> Changing your services password will change it for all linked sites (forums, wiki, reimbursement tool)
</p>
</div>
<!-- Services Tabs -->
<div id="services">
<h2>Auth API Services</h2>
<p>Auth API Servies use Auth for your login information with the use of a seperate password. To reset your services password click the link below</p>
<p><a href="{% url sso.views.set_apipasswd %}" class="btn">Change External Services Password</a></p>
<br/>
{% if user.eveaccount_set.all %}
<h2>Service Accounts</h2>
<p>Services not fully integrated into Auth, and which a seperate username/password is required.</p>
<p>These are services that cannot talk to auth and require a seperate username/password.</p>
{% if user.serviceaccount_set.all %}
<table>
<tr><th>Service</th><th>Username</th><th>URL</th><th>Active</th><th>Actions</th></tr>
@@ -119,7 +108,9 @@
<p>
{% ifswitch api-disableprocessing %}
{% else %}
<a href="{% url eve_api.views.eveapi_add %}" class="btn">Add a Eve API key</a>
<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="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 %}
</p>