From b3a52d4c2021a5ecd098b6167cceca8faf1fa14e Mon Sep 17 00:00:00 2001 From: gfawcett Date: Thu, 26 Mar 2009 01:36:13 +0000 Subject: [PATCH] more visual tweaks. It's looking pretty good IMHO. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@226 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/static/main.css | 13 +++++++++---- conifer/syrup/views.py | 10 +++++++--- conifer/templates/components/course.xhtml | 9 ++++----- conifer/templates/course_detail.xhtml | 7 +++++-- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/conifer/static/main.css b/conifer/static/main.css index c1b0038..d2e75c7 100644 --- a/conifer/static/main.css +++ b/conifer/static/main.css @@ -137,22 +137,27 @@ padding-left: 15; } .itemadd a { color: navy; } +.itemtree li .mainline { margin-left: 24; } /* specialized display of items in tree, by type */ .itemtree li.item_HEADING { list-style-image: url(tango/folder.png); - margin-top: 4; + margin: 9 0; } .itemtree li.item_HEADING > a { color: navy; } -li.item_HEADING > a.mainlink { +li.item_HEADING > .mainline { + margin-bottom: 12; +} + +li.item_HEADING > div.mainline a.mainlink { border-bottom: #aaa 1px solid; } -li.item_HEADING > a.mainlink:hover { +li.item_HEADING > .mainline a.mainlink:hover { border-bottom: none; } @@ -207,7 +212,7 @@ p.todo, div.todo { background-color: #fdd; padding: 6; margin: 12; border-left: font-size: 80%; color: navy; } -.menublockopener { margin-left: 0.25em; color: #aaa !important; font-weight: normal !important; } +.menublockopener { margin-left: 0.25em; color: #bbb !important; font-weight: normal !important; } .menublock { background-color: #f0f0e0; font-size: 95%; padding: 1 4; } #coursebanner { background-color: #f2e4cc; margin: -12 -12 0 -12; padding: 8; } diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index 03b2cff..ed279fb 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -156,14 +156,18 @@ def members_only(handler): allowed = user.is_superuser if not allowed: course = models.Course.objects.get(pk=course_id) - allowed = ((user.is_anonymous and course.access=='ANON') or \ - (user.is_authenticated and course.access=='LOGIN')) + allowed = ((user.is_anonymous() and course.access=='ANON') or \ + (user.is_authenticated() and course.access=='LOGIN')) if not allowed: allowed = _fast_user_membership_query(user.id, course_id) if allowed: return handler(request, course_id, *args, **kwargs) else: - return _access_denied(_('Only course members are allowed here.')) + if course.access=='LOGIN': + msg = _('Please log in, so that you can enter this site.') + else: + msg = _('Only course members are allowed here.') + return _access_denied(msg) return hdlr # decorator diff --git a/conifer/templates/components/course.xhtml b/conifer/templates/components/course.xhtml index 353a486..b00eedf 100644 --- a/conifer/templates/components/course.xhtml +++ b/conifer/templates/components/course.xhtml @@ -31,8 +31,9 @@ searchtext = _('search this course...') class="itemtree">
  • - ${item} - +
    + ${item} + about @@ -42,6 +43,7 @@ searchtext = _('search this course...') • put under heading +
    ${show_tree(subs, edit)}
  • @@ -109,9 +111,6 @@ searchtext = _('search this course...')
    - diff --git a/conifer/templates/course_detail.xhtml b/conifer/templates/course_detail.xhtml index 8c99bb9..51054d9 100644 --- a/conifer/templates/course_detail.xhtml +++ b/conifer/templates/course_detail.xhtml @@ -17,10 +17,13 @@ is_editor = course.can_edit(request.user)

    There are no items associated with this course yet.

    -
    + - ${item_resequence_panel()} + +
    ${item_resequence_panel()}
    ${show_tree(item_tree, edit=is_editor)}
    ${add_subs()}
    -- 2.11.0