mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-23 14:49:31 +00:00
Added the ability to add notes to user's accounts
This commit is contained in:
24
app/sso/templates/sso/add_usernote.html
Normal file
24
app/sso/templates/sso/add_usernote.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Add User Note{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Add User Note</h1>
|
||||
</div>
|
||||
|
||||
<p>This will add a note to {{ user.username }}'s account that'll be visible to everyone able to view user profiles</p>
|
||||
|
||||
<form action="{% url sso-addusernote user.username %}" method="post">
|
||||
<fieldset>
|
||||
{% include "formtools/formerror.html" %}
|
||||
{% include "formtools/formfield.html" with field=form.user %}
|
||||
{% include "formtools/formfield.html" with field=form.note class="xxlarge" %}
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="Add Note" class="btn primary" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -28,8 +28,27 @@
|
||||
<a href="{% url hr-blacklistuser user.id %}" class="btn error">Blacklist User</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if perms.sso.add_ssousernote %}
|
||||
<a href="{% url sso-addusernote user %}" class="btn">Add Note</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
{% if user.notes.count %}
|
||||
<h2>User Notes</h2>
|
||||
|
||||
<table class="zebra-striped">
|
||||
<thead>
|
||||
<tr><th width="600px">Note</th><th>Date</th><th>Added By</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for note in user.notes.all %}
|
||||
<tr><td>{{ note.note|linebreaks }}</td><td>{{ note.date_created|date:"Y/m/d H:i:s" }}</td><td><a href="{% url sso-viewuser note.created_by %}">{{ note.created_by }}</a></td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if services %}
|
||||
<section id="services">
|
||||
<h2>Service Accounts</h2>
|
||||
|
||||
Reference in New Issue
Block a user