* add/remove individuals in course sites
-* make sure volume, issue, source title, etc. are exposed over unAPI.
-
* make "DVD" and other media types obvious (icons, explicit descriptions, etc.)
* bookbag-URL search should import all items from the bookbag (if they don't already exist)
* repair unAPI -- it seems broken on SHOWCASE (it was just not working for non-physical items)
+* make sure volume, issue, source title, etc. are exposed over unAPI.
+
def record_to_dictionary(rec, multiples=True):
tree = _to_tree(rec)
dct = {}
+ for cf in tree.findall('{http://www.loc.gov/MARC21/slim}controlfield'):
+ t = cf.attrib['tag']
+ dct.setdefault(t, []).append(cf.text)
for df in tree.findall('{http://www.loc.gov/MARC21/slim}datafield'):
t = df.attrib['tag']
for sf in df.findall('{http://www.loc.gov/MARC21/slim}subfield'):
out = []
for r in records:
dct = {}
+ for cf in r.findall('{http://www.loc.gov/MARC21/slim}controlfield'):
+ t = cf.attrib['tag']
+ dct.setdefault(t, []).append(cf.text)
for df in r.findall('{http://www.loc.gov/MARC21/slim}datafield'):
t = df.attrib['tag']
for sf in df.findall('{http://www.loc.gov/MARC21/slim}subfield'):
list-style-image: url(tango/x-office-address-book.png);
}
+.itemtree li .videotype { font-weight: bold; font-size: 90%; }
+
.itemtree li.forbidden {
background-color: #fdd;
}
'%d total copies in library system'
% (avail, desk, lib))
+ _video_type_re = re.compile(r'tag="007">v(.)')
+ _video_types = {'c':'videocartridge',
+ 'd':'videodisc',
+ 'f':'videocassette',
+ 'r':'videoreel',
+ 'z':'video, other format'}
+ def video_type(self):
+ if not self.marcxml:
+ return None
+ m = self._video_type_re.search(self.marcxml)
+ if m:
+ vtype = m.group(1)
+ return self._video_types.get(vtype, 'video, unknown format')
+
# TODO: stuff I'm not sure about yet. I don't think it belongs here.
def title_hl(self, terms):
<a href="${item.item_url()}" class="mainlink">${item}</a>
</div>
<div class="author_pub" py:if="item.author or item.publisher or item.published">
+ <span py:with="vt=item.video_type()"><span class="videotype" py:if="vt">[${vt}]</span></span>
<span py:if="item.author">${item.author}<span py:if="item.author[-1]!='.'">.</span></span>
<span py:if="item.published">(${item.published}).</span>
<span py:if="item.source_title"><i>${item.source_title}.</i></span>
hier = item.hierarchy()[:-1]
title = item.title
is_editor = site.can_edit(request.user)
+vidtype = item.video_type()
?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xi="http://www.w3.org/2001/XInclude"
<table class="metadata_table" style="margin-top: 1em;">
<tr><th>Title</th><td>${item.title}</td></tr>
<tr py:if="item.source_title"><th>Title of source</th><td>${item.source_title}</td></tr>
+ <tr py:if="vidtype"><th>Format</th><td>${vidtype}</td></tr>
<tr py:if="item.author"><th>Author(s)</th><td>${item.author}</td></tr>
<tr py:if="item.publisher"><th>Publisher</th><td>${item.publisher}</td></tr>
<tr py:if="item.published"><th>Published</th><td>${item.published}</td></tr>