From 770edabef6c05bea82ccc12a1afb856c05647ab9 Mon Sep 17 00:00:00 2001 From: gfawcett Date: Thu, 26 Mar 2009 02:26:35 +0000 Subject: [PATCH] cleanup of item-metadata interface ('about' links) git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@228 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/static/main.css | 18 +++++++++++++++++- conifer/syrup/models.py | 2 +- conifer/templates/components/course.xhtml | 2 +- conifer/templates/item_metadata.xhtml | 27 +++++++++++++++------------ 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/conifer/static/main.css b/conifer/static/main.css index d2e75c7..fae3418 100644 --- a/conifer/static/main.css +++ b/conifer/static/main.css @@ -241,13 +241,29 @@ p.todo, div.todo { background-color: #fdd; padding: 6; margin: 12; border-left: font-weight: normal; } +.metadata_table tbody th, +.metadata_table tbody td { + padding: 8; border: #ddd 1px solid; +} + +.metadata_table tbody th { + background-color: #eee; +} + +.metadata_table a.bigdownload { padding: 8 58; font-weight: bold; font-size: 105%; } + +h2.metadata_subhead {font-size: 105%; padding: 0; margin: 18 0 9 0;} + +.metadata_table tbody th { + text-align: left; width: 120; +} .gap { height: 24; } /* panels that appear when specific OPTIONs or radio-buttons are selected. */ .specific { padding: 8; margin: 0 16; background-color: #eef; } -li.sort_item { margin-top: 20px !important; +li.sort_item { margin-top: 20px} !important; border: gray 1px dotted; width: 400; } li.sort_item:hover { background-color: #eee; } diff --git a/conifer/syrup/models.py b/conifer/syrup/models.py index d5853bb..7209447 100644 --- a/conifer/syrup/models.py +++ b/conifer/syrup/models.py @@ -426,7 +426,7 @@ class Item(m.Model): def needs_meta_link(self): """Should an 'About' link be displayed for this item?""" - return self.item_type in ('ELEC', 'URL') + return self.item_type in ('ELEC', 'URL', 'PHYS') def item_url(self, suffix='', force_local_url=False): if self.item_type == 'ELEC' and suffix == '': diff --git a/conifer/templates/components/course.xhtml b/conifer/templates/components/course.xhtml index 95a34a5..6208a76 100644 --- a/conifer/templates/components/course.xhtml +++ b/conifer/templates/components/course.xhtml @@ -38,7 +38,7 @@ searchtext = _('search this course...') - about • edit • put under heading + about • edit • put under heading diff --git a/conifer/templates/item_metadata.xhtml b/conifer/templates/item_metadata.xhtml index 089a204..8f05df1 100644 --- a/conifer/templates/item_metadata.xhtml +++ b/conifer/templates/item_metadata.xhtml @@ -2,6 +2,7 @@ course_title = '%s: %s (%s)' % (course.code, course.title, course.term) hier = item.hierarchy()[:-1] title = item.title +metadata = item.metadata_set.all() ?> ${course_banner(course)} ${nested_title(item)} - - +
- +
Title${item.title}
Type${item.item_type}
Type${item.get_item_type_display()}
URL${item.url}
-

Download

- + +
- + +
- - - - - -
${attr.get_name_display()}${attr.value}
+
+ + + + + + +
-- 2.11.0