added simple course-browse screen.
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 13 Mar 2009 16:14:50 +0000 (16:14 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 13 Mar 2009 16:14:50 +0000 (16:14 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@172 6d9bc8c9-1ec2-4278-b937-99fde70a366f

conifer/templates/browse_courses.xhtml
conifer/templates/courses.xhtml [new file with mode: 0644]

index bcdfba4..cca8b5d 100644 (file)
@@ -14,9 +14,11 @@ title = _('Browse the Reserves')
     to <a href="/accounts/login/?next=/syrup/">log in</a>)
     <h2>Choose from one of the options below:</h2>
     <ul>
-        <li><a href="instructors">Browse by Instructor</a></li>
-        <li><a href="departments">Browse by Department</a></li>
         <li><a href="courses">Browse by Course Name</a></li>
+        <li><a style="text-decoration: line-through;"
+              href="instructors">Browse by Instructor</a> (not working yet)</li>
+        <li><a  style="text-decoration: line-through;"
+               href="#departments">Browse by Department</a> (not working yet)</li>
     </ul>
   <div class="gap"/>
 </body>
diff --git a/conifer/templates/courses.xhtml b/conifer/templates/courses.xhtml
new file mode 100644 (file)
index 0000000..838d69d
--- /dev/null
@@ -0,0 +1,26 @@
+<?python
+title = _('Courses')
+?>
+<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="paginate.xhtml"/>
+<head>
+  <title>${title}</title>
+  <script type="text/javascript">
+    <!-- !This ought to be in paginate.xhtml, not here. how to do? -->
+    $(function() { $('.pagetable').tablesorter(); });
+  </script>
+</head>
+<body>
+  <h1>${title}</h1>
+  <tr py:def="pageheader()">
+    <th>Name</th>
+  </tr>
+  <span py:def="pagerow(item)">
+    <td><a href="${item.course_url()}">${item.title}, ${item.term}</a></td>
+  </span>
+  ${pagetable(paginator, count, pagerow, pageheader)}
+</body>
+</html>