From f62a04b427a6e897ba376beb706b56d8314cdacb Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Fri, 10 Aug 2007 21:08:11 -0700 Subject: [PATCH] Clean up templates more, update to work in Fedora environment. --- fas/fas/controllers.py | 2 +- fas/fas/fasLDAP.py | 8 +- fas/fas/feeds.py | 2 +- fas/fas/static/css/style.css | 10 +- fas/fas/templates/dump.kid | 14 +-- fas/fas/templates/error.kid | 18 ++-- fas/fas/templates/groupList.kid | 12 +-- fas/fas/templates/home.kid | 46 ++++----- fas/fas/templates/invite.kid | 2 +- fas/fas/templates/login.kid | 4 +- fas/fas/templates/master.kid | 158 +++++++++++++++--------------- fas/fas/templates/userList.kid | 8 +- fas/fas/templates/viewAccount.kid | 12 +-- fas/fas/templates/viewGroup.kid | 30 +++--- fas/fas/templates/welcome.kid | 46 ++++----- 15 files changed, 186 insertions(+), 186 deletions(-) diff --git a/fas/fas/controllers.py b/fas/fas/controllers.py index f9eaff7..9cebfd5 100644 --- a/fas/fas/controllers.py +++ b/fas/fas/controllers.py @@ -45,7 +45,7 @@ class newPerson(widgets.WidgetsList): # cn = widgets.TextField(label='Username', validator=validators.PlainText(not_empty=True, max=10)) cn = widgets.TextField(label=_('Username'), validator=validators.All(knownUser(not_empty=True, max=10), validators.String(max=32, min=3))) givenName = widgets.TextField(label=_('Full Name'), validator=validators.String(not_empty=True, max=42)) - mail = widgets.TextField(label=_('email'), validator=validators.Email(not_empty=True, strip=True)) + mail = widgets.TextField(label=_('Email'), validator=validators.Email(not_empty=True, strip=True)) telephoneNumber = widgets.TextField(label=_('Telephone Number'), validator=validators.PhoneNumber(not_empty=True)) postalAddress = widgets.TextArea(label=_('Postal Address'), validator=validators.NotEmpty) diff --git a/fas/fas/fasLDAP.py b/fas/fas/fasLDAP.py index 75851e0..5f661ca 100644 --- a/fas/fas/fasLDAP.py +++ b/fas/fas/fasLDAP.py @@ -457,7 +457,7 @@ def delete(base, ldapServer=None): s = Server() ldapServer = s.ldapConn - ldapServer.simple_bind_s('cn=directory manager', 'fedoraproject') + ldapServer.simple_bind_s('cn=directory manager', 'test') print "Deleteing %s " % base ldapServer.delete_s(base) @@ -468,7 +468,7 @@ def add(base, attributes, ldapServer=None): ldapServer = s.ldapConn attributes=[ (k,v) for k,v in attributes.items() ] - ldapServer.simple_bind_s('cn=directory manager', 'fedoraproject') + ldapServer.simple_bind_s('cn=directory manager', 'test') ldapServer.add_s(base, attributes) def modify(base, attribute, new, old=None, ldapServer=None): @@ -481,7 +481,7 @@ def modify(base, attribute, new, old=None, ldapServer=None): ldapServer = s.ldapConn from ldap import modlist - ldapServer.simple_bind_s('cn=directory manager', 'fedoraproject') + ldapServer.simple_bind_s('cn=directory manager', 'test') if old == None: old = 'None' @@ -505,7 +505,7 @@ def search(base, filter, attributes=None, ldapServer=None): scope = ldap.SCOPE_SUBTREE count = 0 timeout = 2 - ldapServer.simple_bind_s('cn=directory manager', 'fedoraproject') + ldapServer.simple_bind_s('cn=directory manager', 'test') result_set = [] try: result_id = ldapServer.search(base, scope, filter, attributes) diff --git a/fas/fas/feeds.py b/fas/fas/feeds.py index f758bdb..93a64c8 100644 --- a/fas/fas/feeds.py +++ b/fas/fas/feeds.py @@ -3,7 +3,7 @@ from xml.dom import minidom class Koji: - def __init__(self, userName, url='http://publictest8.fedora.redhat.com/koji/recentbuilds?user='): + def __init__(self, userName, url='http://publictest8/koji/recentbuilds?user='): buildFeed = minidom.parse(urllib.urlopen(url + userName)) try: self.userLink = buildFeed.getElementsByTagName('link')[0].childNodes[0].data diff --git a/fas/fas/static/css/style.css b/fas/fas/static/css/style.css index 69ba0e3..42ec9fc 100644 --- a/fas/fas/static/css/style.css +++ b/fas/fas/static/css/style.css @@ -203,7 +203,6 @@ a #content h3 { font-size: 2.2ex; - border-bottom: 1px solid #C0C0C0; margin-bottom: 0.25ex; } @@ -411,16 +410,17 @@ pre form ul { list-style: none; + margin: 1ex 0!important; } -form li +form ul li { margin: 0 0 1ex; text-align: left; - overflow: auto; + overflow: hidden; } -form li label +form ul label { float: left; clear: left; @@ -430,7 +430,7 @@ form li label padding: 0 2ex 0 0; } -form li input, form li textarea +form ul input, form ul textarea { margin: 0; } diff --git a/fas/fas/templates/dump.kid b/fas/fas/templates/dump.kid index be628d7..26a1308 100644 --- a/fas/fas/templates/dump.kid +++ b/fas/fas/templates/dump.kid @@ -1,7 +1,7 @@ - - - -
${user},${Person.byUserName(user).mail},${Person.byUserName(user).givenName},${groups[user].fedoraRoleType},0 -
- - + + + +
${user},${Person.byUserName(user).mail},${Person.byUserName(user).givenName},${groups[user].fedoraRoleType},0 +
+ + diff --git a/fas/fas/templates/error.kid b/fas/fas/templates/error.kid index cf6a1c3..32b89a7 100644 --- a/fas/fas/templates/error.kid +++ b/fas/fas/templates/error.kid @@ -1,9 +1,9 @@ - - - - Crap! - - - ${exception} - - + + + + Crap! + + + ${exception} + + diff --git a/fas/fas/templates/groupList.kid b/fas/fas/templates/groupList.kid index f2ab431..c7a6b45 100644 --- a/fas/fas/templates/groupList.kid +++ b/fas/fas/templates/groupList.kid @@ -7,7 +7,7 @@

List (${search})

Search Groups

-
+

"*" is a wildcard (Ex: "cvs*")

@@ -16,8 +16,8 @@

Results

@@ -30,14 +30,14 @@ keys.sort() ?> - + diff --git a/fas/fas/templates/home.kid b/fas/fas/templates/home.kid index 765cbec..1548cdf 100644 --- a/fas/fas/templates/home.kid +++ b/fas/fas/templates/home.kid @@ -1,23 +1,23 @@ - - - - Fedora Accounts System - - -

Recent Builds (Koji)

-
${group.cn}${group.cn} ${group.fedoraGroupDesc} - + Approved Unapproved - Not a Member + Not a Member
- - - - - - - - -
BuildBuild Date
- ${builds.builds[build]['title']} - ${builds.builds[build]['title']} - ${builds.builds[build]['pubDate']}
- - - + + + + Fedora Accounts System + + +

Recent Builds (Koji)

+ + + + + + + + + +
BuildBuild Date
+ ${builds.builds[build]['title']} + ${builds.builds[build]['title']} + ${builds.builds[build]['pubDate']}
+ + + diff --git a/fas/fas/templates/invite.kid b/fas/fas/templates/invite.kid index ebe1db2..515454a 100644 --- a/fas/fas/templates/invite.kid +++ b/fas/fas/templates/invite.kid @@ -13,7 +13,7 @@ Message:

- ${user.givenName} <${user.mail}> has invited you to join the Fedora + ${user.givenName} <${user.mail}> has invited you to join the Fedora Project! We are a community of users and developers who produce a complete operating system from entirely free and open source software (FOSS). ${user.givenName} thinks that you have knowledge and skills diff --git a/fas/fas/templates/login.kid b/fas/fas/templates/login.kid index c078aeb..46607ee 100644 --- a/fas/fas/templates/login.kid +++ b/fas/fas/templates/login.kid @@ -26,8 +26,8 @@

diff --git a/fas/fas/templates/master.kid b/fas/fas/templates/master.kid index ee01806..1c56f54 100644 --- a/fas/fas/templates/master.kid +++ b/fas/fas/templates/master.kid @@ -1,79 +1,79 @@ - - - - - Title - - - - -
- - -
-
- - Logged in: ${tg.identity.user.user_name} - -
-
- -
-
-
- -
-
- ${tg_flash} -
-
-
- -
-
- - + + + + + Title + + + + +
+ + +
+
+ + Logged in: ${tg.identity.user.user_name} + +
+
+ +
+
+
+ +
+
+ ${tg_flash} +
+
+
+ +
+
+ + diff --git a/fas/fas/templates/userList.kid b/fas/fas/templates/userList.kid index 8d851e4..3edfdd4 100644 --- a/fas/fas/templates/userList.kid +++ b/fas/fas/templates/userList.kid @@ -5,7 +5,7 @@

List (${search})

-
+

"*" is a wildcard (Ex: "cvs*")

@@ -14,8 +14,8 @@

Results

@@ -29,7 +29,7 @@ users.sort() ?> - +
${user}${user} Done Done diff --git a/fas/fas/templates/viewAccount.kid b/fas/fas/templates/viewAccount.kid index 2af1abb..ff6c549 100644 --- a/fas/fas/templates/viewAccount.kid +++ b/fas/fas/templates/viewAccount.kid @@ -6,7 +6,7 @@ -

Account Details (edit)

+

Account Details (edit)

Account Name
${user.cn}
@@ -18,7 +18,7 @@
Telephone Number
${user.telephoneNumber}
Postal Address
${user.postalAddress}
Description
${user.description}
-
Password
Valid (change)
+
Password
Valid (change)
Account Status
Approved, Active
CLA
Done Not Done
@@ -33,7 +33,7 @@ ?>
  • ${groupdata[group.cn].fedoraGroupDesc} (${group.cn})
  • -
  • ${groupdata[group.cn].fedoraGroupDesc} (groupsPending.cn)
  • +
  • ${groupdata[group.cn].fedoraGroupDesc} (${group.cn})