From 1649f0de727f402015099b75af98b10b0475896a Mon Sep 17 00:00:00 2001 From: gfawcett Date: Sun, 11 Jan 2009 21:55:49 +0000 Subject: [PATCH] more CSS and display tweaks. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@106 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/static/main.css | 34 +++++++++++++++++++++++++++++---- conifer/syrup/views.py | 4 ++-- conifer/templates/components/item.xhtml | 6 ++---- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/conifer/static/main.css b/conifer/static/main.css index 6b968c5..8d0dd69 100644 --- a/conifer/static/main.css +++ b/conifer/static/main.css @@ -77,7 +77,18 @@ a:hover { text-decoration: underline; } .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,7 +99,24 @@ a:hover { text-decoration: underline; } } .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; @@ -119,5 +147,3 @@ p.todo, div.todo { background-color: #fdd; padding: 6; margin: 12; border-left: .newsitem { max-width: 600; } - -.nestedtitle h2 { margin-top: 8; } \ No newline at end of file diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index 3ee61b9..710454a 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -186,7 +186,7 @@ def item_add(request, course_id, item_id): 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 @@ def item_add(request, course_id, item_id): 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) diff --git a/conifer/templates/components/item.xhtml b/conifer/templates/components/item.xhtml index 28680a8..82bff2b 100644 --- a/conifer/templates/components/item.xhtml +++ b/conifer/templates/components/item.xhtml @@ -5,12 +5,10 @@