/[glsr]/trunk/htdocs/memberlist.py
Gentoo

Contents of /trunk/htdocs/memberlist.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 134 - (show annotations) (download) (as text)
Mon Sep 19 00:29:32 2005 UTC (8 years, 10 months ago) by hadfield
File MIME type: text/x-python
File size: 1812 byte(s)
improved the table_listing code. made search domain inherit from TableListing.
1 # Copyright 2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 #
4
5 """Displays the memberlist page."""
6
7 __revision__ = '$Id$'
8 __authors__ = ["Scott Hadfield <hadfield@gentoo.org>",
9 "Ian Leitch <port001@gentoo.org>"]
10 __modulename__ = 'memberlist'
11
12 import os
13
14 from harmonious.utils import exposed, default
15
16 from glsr.setup import config
17 from glsr.site import table_listing, user
18
19 class Memberlist(table_listing.TableListing):
20
21 @default
22 @exposed
23 def show(self):
24
25 self._domain = __modulename__
26 self._page = "show"
27 self._list_title = "Member List"
28
29 self._fields = [{"name": "user_id", "title": "ID"},
30 {"name": "user_alias", "title": "Username"},
31 {"name": "user_fullname", "title": "Full Name"},
32 {"name": "user_email", "title": "Email"},
33 {"name": "user_rank", "title": "Rank"},
34 {"name": "user_location", "title": "Location"},
35 {"name": "user_joined", "title": "Joined"},
36 {"name": "user_language", "title": "Language"},
37 {"name": "user_website", "title": "Website"}]
38
39 # Get our list of members and tally their scripts.
40 member_list = user.list_all(
41 ["user_id", "user_alias", "user_fullname", "user_email",
42 "user_rank", "user_location", "user_joined", "user_language",
43 "user_website"])
44 for member in member_list:
45 member.update({"script_count": "NA"})
46
47 self._loop_data = member_list
48
49 self._do_header()
50 self._make_table()
51 self._harm.response.append_body(self._template.output())
52 self._do_footer()

Properties

Name Value
svn:keywords Id

  ViewVC Help
Powered by ViewVC 1.1.20