summaryrefslogtreecommitdiffstats
path: root/idp/extra/modules/identities_ui.ptl
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@0d.be>2008-05-02 08:13:52 (GMT)
committerFrederic Peters <fpeters@0d.be>2008-05-02 08:13:52 (GMT)
commitb48c0515cfdfc85831e2996807217b310700f1fb (patch)
treea8431e8121c8a219ac0baf4345d04cb8507fdfff /idp/extra/modules/identities_ui.ptl
parent54ec411bcd1e565ed1cb043ad1c1d6ccd91d0c37 (diff)
downloadpratic-b48c0515cfdfc85831e2996807217b310700f1fb.zip
pratic-b48c0515cfdfc85831e2996807217b310700f1fb.tar.gz
pratic-b48c0515cfdfc85831e2996807217b310700f1fb.tar.bz2
identities displayed by letter
Diffstat (limited to 'idp/extra/modules/identities_ui.ptl')
-rw-r--r--idp/extra/modules/identities_ui.ptl18
1 files changed, 17 insertions, 1 deletions
diff --git a/idp/extra/modules/identities_ui.ptl b/idp/extra/modules/identities_ui.ptl
index ef35a4c..53ae7da 100644
--- a/idp/extra/modules/identities_ui.ptl
+++ b/idp/extra/modules/identities_ui.ptl
@@ -7,6 +7,7 @@ from qommon.admin.menu import command_icon
from qommon import errors
from qommon.form import *
+import string
import directory
class AgentDirectory(Directory):
@@ -208,8 +209,23 @@ class IdentitiesDirectory(Directory):
if (user.is_admin() or user.is_local_admin()) and (self.collectivity.ou != 'admin'):
'- <a href="authorizations">%s</a>' % _('Manage Authorizations')
'</p>'
+
+ current_letter = get_request().form.get('letter', 'A')
+ if str(current_letter) not in string.letters:
+ current_letter = 'A'
+ '<div class="letters-nav">'
+ for letter in string.uppercase:
+ if letter == current_letter:
+ '<span class="current-letter">%s</span>' % letter
+ else:
+ '<a href="?letter=%s">%s</a>' % (letter, letter)
+ if letter != string.uppercase[-1]:
+ '-'
+ '</div>'
+
'<ul class="biglist">'
- for agent in directory.get_agents(self.collectivity, sorted = True):
+ for agent in directory.get_agents(self.collectivity,
+ first_letter = current_letter, sorted = True):
if agent.cdg59isDisabled:
'<li class="biglistitem disabled">'
elif agent.cdg59isAdmin: