From 362c4c31cd0bffb23ecba34135b552c7d0878a25 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sun, 27 Nov 2011 22:26:20 +0000 Subject: [PATCH] Added basic interface to add to the blacklist from inside auth --- app/hr/templates/hr/blacklist_add.html | 17 ++++++ app/hr/templates/hr/blacklist_list.html | 43 +++++++++++++++ app/hr/templates/hr/index.html | 9 ++++ app/hr/urls.py | 4 +- app/hr/views.py | 69 ++++++++++++++++++++++++- 5 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 app/hr/templates/hr/blacklist_add.html create mode 100644 app/hr/templates/hr/blacklist_list.html diff --git a/app/hr/templates/hr/blacklist_add.html b/app/hr/templates/hr/blacklist_add.html new file mode 100644 index 0000000..a96ae2c --- /dev/null +++ b/app/hr/templates/hr/blacklist_add.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% block title %}Add Blacklist Entry{% endblock %} + +{% block content %} +

Add Blacklist Entry

+ +
+ +{{ form.as_table }} +
+{% csrf_token %} + + +
+{% endblock %} + + diff --git a/app/hr/templates/hr/blacklist_list.html b/app/hr/templates/hr/blacklist_list.html new file mode 100644 index 0000000..cd309a3 --- /dev/null +++ b/app/hr/templates/hr/blacklist_list.html @@ -0,0 +1,43 @@ +{% extends "base.html" %} +{% load naturaltimediff %} +{% block title %}Blacklist{% endblock %} + +{% block content %} +

Blacklist

+ +{% if object_list %} +
+ + +
+ + + + + + {% for obj in object_list %} + + {% endfor %} + +
IDTypeValueLevelReasonExpiry
{{ obj.id }}{{ obj.get_type_display }}{{ obj.value }}{{ obj.get_level_display }}{{ obj.reason }}{{ obj.expiry_date }}
+ +{% if is_paginated %} + +{% endif %} +{% else %} +

No blacklist entries {% if query %}containing "{{ query }}" {% endif %}were found.

+{% endif %} + +{% if perms.hr.add_blacklist %} +

Add a blacklist entry

+{% endif %} +{% endblock %} + diff --git a/app/hr/templates/hr/index.html b/app/hr/templates/hr/index.html index 4a11b4b..385cfaf 100644 --- a/app/hr/templates/hr/index.html +++ b/app/hr/templates/hr/index.html @@ -24,4 +24,13 @@

{% endif %} +{% if perms.add_blacklist %} +

Blacklist Management

+

+