<th field="author" fpath="url.item.target_biblio_record_entry.simple_record.author"></th>
<th field="isbn" fpath="url.item.target_biblio_record_entry.simple_record.isbn" _visible="false"></th>
<th field="issn" fpath="url.item.target_biblio_record_entry.simple_record.issn" _visible="false"></th>
- <th field="bib_id" fpath="url.item.target_biblio_record_entry.id" _visible="false"></th>
+ <th field="bib_id" fpath="url.item.target_biblio_record_entry.id" _visible="false" formatter="module.format_bib_id"></th>
</tr>
</thead>
</table>
dojo.require("dojo.string");
dojo.require("openils.CGI");
dojo.require("openils.PermaCrud");
+ dojo.require("openils.XUL");
dojo.require("dijit.Tooltip");
dojo.requireLocalization("openils.URLVerify", "URLVerify");
module.progress_dialog.hide();
};
+ module.open_marc_editor = function(/* bib id */ id) {
+ openils.XUL.newTabEasy(
+ "oils://remote/xul/server/cat/marcedit.xul",
+ dojo.string.substitute(localeStrings.MARC_EDITOR_TITLE, [id]), {
+ "record": {
+ "url": "/opac/extras/supercat/retrieve/marcxml/record/"+id,
+ "id": id,
+ "rtype": "bre"
+ },
+ "save": {
+ "label": localeStrings.MARC_EDITOR_SAVE_RECORD,
+ "func": function(marcxml) {
+ fieldmapper.standardRequest(
+ ["open-ils.cat", "open-ils.cat.biblio.record.xml.update"], {
+ "async": true,
+ "params": [openils.User.authtoken, id, marcxml],
+ "onresponse": function(r) {
+ /* just to do /something/ upon error */
+ openils.Util.readResponse(r);
+ }
+ }
+ );
+ /* marcedit.js just expects this kind of result; meh */
+ return {"id": id, "oncomplete": function() { }};
+ }
+ }
+ }
+ );
+ };
+
+ module.format_bib_id = function(id) {
+ if (!id) return "";
+
+ return "<a title='" + localeStrings.MARC_EDITOR_LINK +
+ "' href='javascript:void(0);' " +
+ "onclick='openils.URLVerify.ReviewAttempt.open_marc_editor(" +
+ id + "); return false;'>" + id + "</a>";
+ };
+
}());
}
"CLONE_SESSION_NAME": "Copy of ${0}",
"XPATH": "XPath",
"SESSION_NAME": "Session '${0}'",
- "SELECT_MORE": "Click here to review all session URLs and/or select other URLs to verify"
+ "SELECT_MORE": "Click here to review all session URLs and/or select other URLs to verify",
+ "MARC_EDITOR_LINK": "Click to open MARC Editor for this record",
+ "MARC_EDITOR_TITLE": "Record ID #${0}",
+ "MARC_EDITOR_SAVE_RECORD": "Save Record"
}