def cat_search(query, start=1, limit=10):
bibid=0
+ bc = re.search('\d{14}', query.strip())
if query.startswith(EG_BASE):
# query is an Evergreen URL
# snag the bibid at this point
bibid = params[key]
results = M.marcxml_to_records(I.url_to_marcxml(query))
numhits = len(results)
+ elif bc:
+ results = []
+ numhits = 0
+ bib = E1('open-ils.search.bib_id.by_barcode', bc.group(0))
+ if bib:
+ copy = E1('open-ils.supercat.record.object.retrieve', bib)
+ rec = copy[0]
+ marc = unicode(rec['marc'], 'utf-8')
+ tree = M.marcxml_to_records(marc)[0]
+ results.append(tree)
+ numhits = 1
else:
# query is an actual query
if USE_Z3950:
author=dublin.get('dc:creator'),
publisher=dublin.get('dc:publisher',''),
published=pubdate,
- bib_id=request.POST.get('bibid'),
marcxml=raw_pickitem,
**dct)
item.save()
<tr><th>Issue</th><td><input type="text" name="issue" value="${item.issue}"/></td></tr>
<tr><th>Pages</th><td><input type="text" name="pages" value="${item.pages}"/></td></tr>
<tr><th>ISBN</th><td><input type="text" name="isbn" value="${item.isbn}"/></td></tr>
+ <tr><th>Bib Id of Item</th><td><input type="text" name="bib_id" value="${item.bib_id}"/></td></tr>
<tr py:if="user.is_staff and item.item_type == 'ELEC'">
<th>Copyright Status</th>
<td>
</tr>
</tbody>
-</html>
\ No newline at end of file
+</html>