From eb2e6eac3df3bb299295435fd4dc639ec6de53a1 Mon Sep 17 00:00:00 2001 From: gfawcett Date: Thu, 26 Mar 2009 01:01:24 +0000 Subject: [PATCH] better relocate interface (tree of folders, rather than a wrong-sorted SELECT) git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@225 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/static/main.css | 8 +++++++- conifer/syrup/views.py | 2 +- conifer/templates/components/course.xhtml | 12 ++++++++++++ conifer/templates/item_relocate.xhtml | 11 +++++------ 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/conifer/static/main.css b/conifer/static/main.css index 9b7204f..c1b0038 100644 --- a/conifer/static/main.css +++ b/conifer/static/main.css @@ -41,6 +41,8 @@ min-height: 300; #header a.loginbutton { background-color: #a44; padding: 8 16; } #header a:hover { background-color: #fb7; color: black; text-decoration: none; } +tbody td, tbody th { vertical-align: top; } + #footer { margin: 12; padding-bottom: 12; @@ -243,4 +245,8 @@ p.todo, div.todo { background-color: #fdd; padding: 6; margin: 12; border-left: li.sort_item { margin-top: 20px !important; border: gray 1px dotted; width: 400; } -li.sort_item:hover { background-color: #eee; } \ No newline at end of file +li.sort_item:hover { background-color: #eee; } + +ul.heading_tree li { list-style: none; } +ul.heading_tree { margin: 0; padding-left: 0; } +ul.heading_tree ul { margin: 0; padding-left: 25; } \ No newline at end of file diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index ac3162f..03b2cff 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -1160,7 +1160,7 @@ def item_relocate(request, course_id, item_id): if request.method != 'POST': return g.render('item_relocate.xhtml', **locals()) else: - newheading = int(request.POST['newheading']) + newheading = int(request.POST['heading']) if newheading == 0: new_parent = None else: diff --git a/conifer/templates/components/course.xhtml b/conifer/templates/components/course.xhtml index f71a2c5..353a486 100644 --- a/conifer/templates/components/course.xhtml +++ b/conifer/templates/components/course.xhtml @@ -46,6 +46,18 @@ searchtext = _('search this course...') ${show_tree(subs, edit)} + + + +
Item title:${item.title} - Current heading:${item.parent_heading and item.parent_heading.title or 'Top Level'} + Current heading: + ${item.parent_heading and item.parent_heading.title or 'Top Level'} +
New heading: - + ${heading_tree(course.item_tree(), stop_at=item)} +
-- 2.11.0