server/mirrormanager/templates/master.kid | 11 ++---------
server/mirrormanager/templates/publiclist.kid | 5 ++---
server/mirrormanager/templates/static.kid | 11 ++---------
3 files changed, 6 insertions(+), 21 deletions(-)
New commits:
commit 35849456caf3b87d42d5fa157c5637476f3b0b3f
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Wed Apr 21 22:46:34 2010 -0500
templates: use constant titles
After hours of pain, I give up. I can't have variable titles where
one option is to not pass a title and have it auto-generate. At the
time the python calls to do this magic would happen, not enough is
loaded for the python calls to succeed. This results in odd errors
complaining that static.kid can't be read, which isn't the case at all
(it just can't be compiled).
Now all the pages have <title>MirrorManager</title> hard coded.
diff --git a/server/mirrormanager/templates/master.kid
b/server/mirrormanager/templates/master.kid
index 456af17..6e7d2bb 100644
--- a/server/mirrormanager/templates/master.kid
+++ b/server/mirrormanager/templates/master.kid
@@ -1,16 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<?python import sitetemplate
-try:
- page_title = page_title
-except NameError:
- projectname = tg.config('mirrormanager.projectname', 'Fedora')
- page_title = '%s Mirror Manager' % projectname
-?>
-
+<?python import sitetemplate ?>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate">
<head
py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'"
py:attrs="item.items()">
<meta content="text/html; charset=UTF-8"
http-equiv="content-type" py:replace="''"/>
- <title py:replace="page_title" />
+ <title>MirrorManager</title>
<link rel="stylesheet" type="text/css" media="all"
py:attrs="{'href': tg.config('mirrormanager.cssroot',
'/mirrormanager/static/css/') + 'fedora.css'}"/>
<link rel="stylesheet" type="text/css" media="all"
diff --git a/server/mirrormanager/templates/publiclist.kid
b/server/mirrormanager/templates/publiclist.kid
index e71e5ca..9db180d 100644
--- a/server/mirrormanager/templates/publiclist.kid
+++ b/server/mirrormanager/templates/publiclist.kid
@@ -1,5 +1,4 @@
-<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://purl.org/kid/ns#"
- py:extends="'static.kid'">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://purl.org/kid/ns#"
py:extends="'static.kid'">
<head/>
<body>
<div class="floatright">
@@ -7,7 +6,7 @@
<caption><strong>Mirror list filter</strong></caption>
<tr><th>Project</th><th>Version</th><th
colspan='0'>Architecture</th></tr>
<div py:for="p in products">
- <?python
+<?python
displayversions = [v for v in p.versions if v.display]
?>
<tr class="separator">
diff --git a/server/mirrormanager/templates/static.kid
b/server/mirrormanager/templates/static.kid
index 0829797..46c4dc4 100644
--- a/server/mirrormanager/templates/static.kid
+++ b/server/mirrormanager/templates/static.kid
@@ -1,16 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<?python import sitetemplate
-try:
- page_title = page_title
-except NameError:
- projectname = tg.config('mirrormanager.projectname', 'Fedora')
- page_title = '%s Mirror Manager' % projectname
-?>
-
+<?python import sitetemplate ?>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate">
<head
py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'"
py:attrs="item.items()">
<meta content="text/html; charset=UTF-8"
http-equiv="content-type" py:replace="''"/>
- <title py:replace="page_title" />
+ <title>MirrorManager</title>
<link rel="stylesheet" type="text/css" media="all"
py:attrs="{'href': tg.config('mirrormanager.cssroot',
'/mirrormanager/static/css/') + 'fedora.css'}"/>
<link rel="stylesheet" type="text/css" media="all"