[open-ils-commits] r106 - in servres/trunk/conifer: static syrup templates/components

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Jan 11 16:55:53 EST 2009


Author: gfawcett
Date: 2009-01-11 16:55:49 -0500 (Sun, 11 Jan 2009)
New Revision: 106

Modified:
   servres/trunk/conifer/static/main.css
   servres/trunk/conifer/syrup/views.py
   servres/trunk/conifer/templates/components/item.xhtml
Log:
more CSS and display tweaks.


Modified: servres/trunk/conifer/static/main.css
===================================================================
--- servres/trunk/conifer/static/main.css	2009-01-11 21:55:40 UTC (rev 105)
+++ servres/trunk/conifer/static/main.css	2009-01-11 21:55:49 UTC (rev 106)
@@ -77,7 +77,18 @@
 .pagetable thead th { font-size: smaller; text-align: left; padding: 2 8; }
 
 
-.itemtree { margin-left: 100; }
+/* nested titles: like breadcrumbs when drilling into an itemtree */
+
+.nestedtitle h2 { margin-top: 8; }
+.nestedtitle a { color: navy; }
+
+/* item trees (tree of headings and items in a course */
+
+.itemtree { 
+    margin-left: 100; 
+    list-style-type: none; 
+}
+
 .itemtree .itemtree { margin-left: 0;}
 
 .itemtree li { width: 400; }
@@ -88,8 +99,25 @@
 		     }
 .itemtree .metalinks a { color: navy; }
 
-.itemadd { margin-left: 100; }
+.itemadd { 
+    margin-left: 100; /* should match .itemtree{margin-left} */
+}
 
+/* specialized display of items in tree, by type */
+
+.itemtree li.item_HEADING { 
+    margin-top: 4;
+}
+.itemtree li.item_HEADING > a { 
+    font-weight: bold; color: navy; 
+}
+
+.itemtree li.item_URL { 
+    list-style-type: square;	/* fixme, nice URL icon */
+    margin-top: 4;
+}
+
+
 .instructors {
   border: 1px solid #ccc;
   float: left;
@@ -119,5 +147,3 @@
 .newsitem { 
     max-width: 600;
 }
-
-.nestedtitle h2 { margin-top: 8; }
\ No newline at end of file

Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py	2009-01-11 21:55:40 UTC (rev 105)
+++ servres/trunk/conifer/syrup/views.py	2009-01-11 21:55:49 UTC (rev 106)
@@ -186,7 +186,7 @@
                     item_type='HEADING',
                     parent_heading=parent_item,
                     title=title,
-                    author=request.user.get_full_name(),
+                    author=request.user.get_full_name() or request.user,
                     activation_date=datetime.now(),
                     last_modified=datetime.now())
                 item.save()
@@ -203,7 +203,7 @@
                     item_type='URL',
                     parent_heading=parent_item,
                     title=title,
-                    author=request.user.get_full_name(),
+                    author=request.user.get_full_name() or request.user,
                     activation_date=datetime.now(),
                     last_modified=datetime.now(),
                     url = url)

Modified: servres/trunk/conifer/templates/components/item.xhtml
===================================================================
--- servres/trunk/conifer/templates/components/item.xhtml	2009-01-11 21:55:40 UTC (rev 105)
+++ servres/trunk/conifer/templates/components/item.xhtml	2009-01-11 21:55:49 UTC (rev 106)
@@ -5,12 +5,10 @@
 
   <!-- !show_tree: display a tree of items in a hierarchical style. -->
   <ul py:def="show_tree(tree)" py:if="tree" class="itemtree">
-    <li py:for="item, subs in tree">
+    <li py:for="item, subs in tree" class="item_${item.item_type}">
       <a href="/syrup/course/${item.course_id}/item/${item.id}/">${item}</a> 
       <span class="metalinks">
-	[<a href="${item_url(item)}meta/">about</a>
-	&bull; <a href="${item_url(item)}edit/">edit</a>
-	]
+	[<a href="${item_url(item)}meta/">about</a>&nbsp;&bull;&nbsp;<a href="${item_url(item)}edit/">edit</a>]
       </span>
       ${show_tree(subs)}
     </li>



More information about the open-ils-commits mailing list