[open-ils-commits] r102 - in servres/trunk/conifer: syrup templates
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Jan 10 23:01:43 EST 2009
Author: gfawcett
Date: 2009-01-10 23:01:41 -0500 (Sat, 10 Jan 2009)
New Revision: 102
Added:
servres/trunk/conifer/templates/item_add_heading.xhtml
Removed:
servres/trunk/conifer/templates/item_add.xhtml
Modified:
servres/trunk/conifer/syrup/views.py
Log:
renamed item-add, since it's heading-specific.
Probably better to factor this template out. Real items have more in
common with each other.
Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py 2009-01-11 02:18:31 UTC (rev 101)
+++ servres/trunk/conifer/syrup/views.py 2009-01-11 04:01:41 UTC (rev 102)
@@ -171,7 +171,7 @@
assert item_type == 'HEADING', 'Sorry, only HEADINGs can be added right now.'
if request.method == 'GET':
- return g.render('item_add.xhtml', **locals())
+ return g.render('item_add_heading.xhtml', **locals())
else:
title = request.POST.get('title', '').strip()
if not title:
Deleted: servres/trunk/conifer/templates/item_add.xhtml
===================================================================
--- servres/trunk/conifer/templates/item_add.xhtml 2009-01-11 02:18:31 UTC (rev 101)
+++ servres/trunk/conifer/templates/item_add.xhtml 2009-01-11 04:01:41 UTC (rev 102)
@@ -1,28 +0,0 @@
-<!--
- fixme, this is heading-specific. Should accommodate other types of item too.
--->
-<?python
-title = 'Add a new subheading'
-course_title = '%s: %s (%s)' % (course.code, course.title, course.term)
-?>
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- xmlns:py="http://genshi.edgewall.org/">
- <xi:include href="master.xhtml"/>
- <head>
- <title>${title}</title>
- </head>
- <body>
- <div class="courseident">
- <div>${course.department}</div>
- <h1><a href="${course_url(course)}">${course_title}</a></h1>
- <h2>${title}</h2>
- <form action=".?item_type=${item_type}" method="POST">
- <table>
- <tr><th>Heading</th><td><input type="text" name="title"/></td></tr>
- </table>
- <p><input type="submit" value="Create heading"/></p>
- </form>
- </div>
-</body>
-</html>
Copied: servres/trunk/conifer/templates/item_add_heading.xhtml (from rev 101, servres/trunk/conifer/templates/item_add.xhtml)
===================================================================
--- servres/trunk/conifer/templates/item_add_heading.xhtml (rev 0)
+++ servres/trunk/conifer/templates/item_add_heading.xhtml 2009-01-11 04:01:41 UTC (rev 102)
@@ -0,0 +1,27 @@
+<?python
+title = 'Add a new subheading'
+course_title = '%s: %s (%s)' % (course.code, course.title, course.term)
+?>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:py="http://genshi.edgewall.org/">
+ <xi:include href="master.xhtml"/>
+ <xi:include href="components/item.xhtml"/>
+ <head>
+ <title>${title}</title>
+ </head>
+ <body>
+ <div class="courseident">
+ <div>${course.department}</div>
+ <h1><a href="${course_url(course)}">${course_title}</a></h1>
+ <div py:if="parent_item">${nested_title(parent_item)}</div>
+ <h2>${title}</h2>
+ <form action=".?item_type=${item_type}" method="POST">
+ <table>
+ <tr><th>Heading</th><td><input type="text" name="title"/></td></tr>
+ </table>
+ <p><input type="submit" value="Create heading"/></p>
+ </form>
+ </div>
+</body>
+</html>
More information about the open-ils-commits
mailing list