.acq-lit-distrib-applied-row th { border-bottom: 1px #999 solid;padding-bottom: 4px;}
.acq-lit-table-spacer { height:20px; }
.acq-lit-row td[name="selector"] { width:1.5em; font-weight:bold; color:blue; font-size:110%;}
+span[name="worksheet"] { padding: 0 6px; }
+
+#acq-worksheet-contents thead th { font-weight: bold; background-color: #ccc; text-align: center; border-bottom: 1px #000 solid; border-right: 1px #000 solid; padding: 0 6px; }
+#acq-worksheet-contents tbody td { text-align: left; vertical-align: top; border: 1px #999 inset; padding: 0 2px; }
.acq-menu-bar {width:99%; text-align:left; border:1px solid #aaa; margin:5px 0px 10px 0px;}
.acq-notes-note-row { margin: 6px 0; }
'NO' : "No",
'VENDOR_SAYS_PREPAY_NOT_NEEDED': "The selected vendor does not necessarily require prepayment, according\nto records. Require prepayment on this PO anyway?",
'VENDOR_SAYS_PREPAY_NEEDED': "The selected vendor requires prepayment, according to records.\nProceed anyway without required prepayment on this PO?",
- 'PREPAYMENT_REQUIRED_REMINDER': "This PO requires prepayment. Are you certain you're ready to activate it?"
+ 'PREPAYMENT_REQUIRED_REMINDER': "This PO requires prepayment. Are you certain you're ready to activate it?",
+ 'LI_FORMAT_ERROR': "Unexpected error retrieving formatted lineitem information."
}
dojo.query('[name=jacket]', row)[0].setAttribute('src', '/opac/extras/ac/jacket/small/' + isbn);
}
+ nodeByName("worksheet_link", row).href =
+ "/eg/acq/lineitem/worksheet/" + li.id();
+
dojo.query('[attr=title]', row)[0].onclick = function() {self.drawInfo(li.id())};
dojo.query('[name=copieslink]', row)[0].onclick = function() {self.drawCopies(li.id())};
dojo.query('[name=noteslink]', row)[0].onclick = function() {self.drawLiNotes(li)};
--- /dev/null
+dojo.require("openils.Util");
+
+function load() {
+ fieldmapper.standardRequest(
+ ["open-ils.acq", "open-ils.acq.lineitem.format"], {
+ "params": [openils.User.authtoken, liId, "html"],
+ "async": true,
+ "oncomplete": function(r) {
+ r = openils.Util.readResponse(r);
+ var d = dojo.byId("acq-worksheet-contents");
+ if (r.template_output())
+ d.innerHTML = r.template_output().data();
+ else if (r.error_output())
+ d.innerHTML = r.error_output().data();
+ else
+ d.innerHTML = localeStrings.LI_FORMAT_ERROR;
+ }
+ }
+ );
+}
+
+openils.Util.addOnLoad(load);
<td rowspan='2' style='width:43px;'><img style='width:40px;height:65px;' name='jacket'></img></td>
<td style='width:70%;font-weight:bold;'>
<a attr='title' href='javascript:void(0);'></a>
+ <span name="worksheet">(<a name="worksheet_link" href="javascript:void(0);">✍</a>)</span>
<span name='pl' class='hidden'>(<a name='pl_link' href='javascript:void(0);'></a>)</span>
<span name='po' class='hidden'>(<a name='po_link' href='javascript:void(0);'>PO</a>)</span>
</td>
--- /dev/null
+[% WRAPPER "default/base.tt2" %]
+[% ctx.page_title = "Lineitem Worksheet" %]
+<script src="[% ctx.media_prefix %]/js/ui/default/acq/lineitem/worksheet.js"></script>
+<script type="text/javascript">var liId = "[% ctx.page_args.0 %]";</script>
+<h1>Lineitem Worksheet</h1>
+<div id="acq-worksheet-contents"></div>
+[% END %]