Advertisement
Guest User

Spine label template

a guest
May 15th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.75 KB | None | 0 0
  1. {"new test":{"content":"<!--\nTemplate for printing item labels (spine, pocket, etc.).\n\nLike receipt slip templates, this template uses AngularJS\nwhich fuses HTML and code together. The code portion is\nmostly used to bind data for the item labels being printed\nto various HTML elements, but you can also use code to\nperform conditional logic, transform the data, etc.\n\n-->\n<!--\n\nThe <style> section is for holding most of our CSS, which\nis a language for controlling the{"new test":{"content":"<!--\nTemplate for printing item labels (spine, pocket, etc.).\n\nLike receipt slip templates, this template uses AngularJS\nwhich fuses HTML and code together. The code portion is\nmostly used to bind data for the item labels being printed\nto various HTML elements, but you can also use code to\nperform conditional logic, transform the data, etc.\n\n-->\n<!--\n\nThe <style> section is for holding most of our CSS, which\nis a language for controlling the appearance of HTML markup.\n\nThe {{ and }} markers are similar to HTML's < and > characters,\nbut are for separating AngularJS variables and code from the\nHTML itself.\n\n-->\n<style>\n /* The .spine here defines a CSS \"class\", which in this case, is used by our\n left label */\n .spine {\n\n /* this pulls from the \"Item Print Label Font Family\" setting, but will\n default to 'monospace' */\n font-family: {{settings['webstaff.cat.label.font.family'] || 'monospace'}};\n\n /* this pulls from the \"Item Print Label Font Size\" setting, but will\n default to 'normal' */\n font-size: {{settings['webstaff.cat.label.font.size'] || '10'}};\n\n /* this pulls from the \"Item Print Label Font Weight\" setting, but will\n default to 'normal' */\n font-weight: {{settings['webstaff.cat.label.font.weight'] || 'normal'}};\n\n /* this pulls from the \"Item Print Label - Height for Left Label\"\n setting, but will default to '1.25in' */\n height: {{settings['webstaff.cat.label.left_label.height'] || '1.25in'}};\n min-height: {{settings['webstaff.cat.label.left_label.height'] || '1.25in'}};\n max-height: {{settings['webstaff.cat.label.left_label.height'] || '1.25in'}};\n\n /* this pulls from the \"Item Print Label - Width for Left Label\"\n setting, but will default to '1in' */\n width: {{settings['webstaff.cat.label.left_label.width'] || '1in'}};\n min-width: {{settings['webstaff.cat.label.left_label.width'] || '1in'}};\n max-width: {{settings['webstaff.cat.label.left_label.width'] || '1in'}};\n\n /* this pulls from the \"Item Print Label - Left Margin for Left Label\"\n setting, but will default to '0in' */\n margin-left: {{settings['webstaff.cat.label.left_label.left_margin'] || '0in'}};\n }\n\n /* This CSS class is used by our right label */\n .pocket {\n\n /* this pulls from the \"Item Print Label Font Family\" setting, but will\n default to 'monospace' */\n font-family: {{settings['webstaff.cat.label.font.family'] || 'monospace'}};\n\n /* this pulls from the \"Item Print Label Font Size\" setting, but will\n default to 'normal' */\n font-size: {{settings['webstaff.cat.label.font.size'] || '10'}};\n\n /* this pulls from the \"Item Print Label Font Weight\" setting, but will\n default to 'normal' */\n font-weight: {{settings['webstaff.cat.label.font.weight'] || 'normal'}};\n\n /* this pulls from the \"Item Print Label - Height for Left Label\"\n setting, but will default to '1.25in' */\n height: {{settings['webstaff.cat.label.right_label.height'] || '1.25in'}};\n min-height: {{settings['webstaff.cat.label.right_label.height'] || '1.25in'}};\n max-height: {{settings['webstaff.cat.label.right_label.height'] || '1.25in'}};\n\n /* this pulls from the \"Item Print Label - Width for Left Label\"\n setting, but will default to '2.625in' */\n width: {{settings['webstaff.cat.label.right_label.width'] || '2.625in'}};\n min-width: {{settings['webstaff.cat.label.right_label.width'] || '2.625in'}};\n max-width: {{settings['webstaff.cat.label.right_label.width'] || '2.625in'}};\n\n /* this pulls from the \"Item Print Label - Left Margin for Left Label\"\n setting, but will default to '0in' */\n margin-left: {{settings['webstaff.cat.label.right_label.left_margin'] || '0in'}};\n\n }\n\n /* This is to help mitigate artifacts in the Preview pane which don't\n actually print */\n .labels ::-webkit-scrollbar { \n display: none; \n }\n\n /* This pulls from the \"Item Print Label - Inline CSS\" setting */\n {{settings['webstaff.cat.label.inline_css']||''}}\n\n</style>\n\n<!-- Here we are implementing our combined label as 2-column HTML <table>, with\n each table containing a <pre> tag for preserving whitespace and linefeeds.\n\n The ng-repeat attribute is from AngularJS, and in this case is looping\n through a list of all the items that were selected when the Print Label\n interface was invoked. Each iteration puts item data into the variable\n \"copy\", which may be referenced in the HTML by escaping it with {{ and }}\n\n The following are available, and you may treat these similar to the\n \"macros\" in earlier versions of Evergreen:\n\n copy['active_date']\n copy['age_protect']\n copy['alert_message']\n copy['barcode']\n copy['call_number.copies']\n copy['call_number.create_date']\n copy['call_number.deleted']\n copy['call_number.edit_date']\n copy['call_number.id']\n copy['call_number.label']\n copy['call_number.label_class']\n copy['call_number.label_sortkey']\n copy['call_number.notes']\n copy['call_number.owning_lib']\n copy['call_number.prefix.id']\n copy['call_number.prefix.label']\n copy['call_number.prefix.label_sortkey']\n copy['call_number.prefix.owning_lib']\n copy['call_number.record.active']\n copy['call_number.record.author_field_entries']\n copy['call_number.record.call_numbers']\n copy['call_number.record.create_date']\n copy['call_number.record.creator.ws_ou']\n copy['call_number.record.deleted']\n copy['call_number.record.edit_date']\n copy['call_number.record.fingerprint']\n copy['call_number.record.fixed_fields']\n copy['call_number.record.full_record_entries']\n copy['call_number.record.id']\n copy['call_number.record.identifier_field_entries']\n copy['call_number.record.keyword_field_entries']\n copy['call_number.record.language']\n copy['call_number.record.last_xact_id']\n copy['call_number.record.marc']\n copy['call_number.record.metarecord']\n copy['call_number.record.notes']\n copy['call_number.record.owner']\n copy['call_number.record.quality']\n copy['call_number.record.series_field_entries']\n copy['call_number.record.share_depth']\n copy['call_number.record.simple_record.author']\n copy['call_number.record.simple_record.fingerprint']\n copy['call_number.record.simple_record.id']\n copy['call_number.record.simple_record.isbn']\n copy['call_number.record.simple_record.issn']\n copy['call_number.record.simple_record.pubdate']\n copy['call_number.record.simple_record.publisher']\n copy['call_number.record.simple_record.quality']\n copy['call_number.record.simple_record.tcn_source']\n copy['call_number.record.simple_record.tcn_value']\n copy['call_number.record.simple_record.title']\n copy['call_number.record.source']\n copy['call_number.record.subject_field_entries']\n copy['call_number.record.tcn_source']\n copy['call_number.record.tcn_value']\n copy['call_number.record.title_field_entries']\n copy['call_number.suffix.id']\n copy['call_number.suffix.label']\n copy['call_number.suffix.label_sortkey']\n copy['call_number.suffix.owning_lib']\n copy['call_number.uri_maps']\n copy['call_number.uris']\n copy['circ_as_type']\n copy['circ_lib']\n copy['circ_modifier']\n copy['circulate']\n copy['copy_number']\n copy['cost']\n copy['create_date']\n copy['deleted']\n copy['deposit']\n copy['deposit_amount']\n copy['dummy_author']\n copy['dummy_isbn']\n copy['dummy_title']\n copy['edit_date']\n copy['fine_level']\n copy['floating']\n copy['holdable']\n copy['id']\n copy['loan_duration']\n copy['location.checkin_alert']\n copy['location.circulate']\n copy['location.copies']\n copy['location.deleted']\n copy['location.holdable']\n copy['location.hold_verify']\n copy['location.id']\n copy['location.label_prefix']\n copy['location.label_suffix']\n copy['location.name']\n copy['location.opac_visible']\n copy['location.orders']\n copy['location.owning_lib']\n copy['mint_condition']\n copy['opac_visible']\n copy['price']\n copy['ref']\n copy['status_changed_time']\n copy['status.copy_active']\n copy['status.holdable']\n copy['status.id']\n copy['status.is_available']\n copy['status.name']\n copy['status.opac_visible']\n copy['status.restrict_copy_delete']\n\n There are also two functions available. The following pulls manually\n edited call numbers for a given item:\n\n get_cn_for(copy)\n\n And this one pulls bibliographic data for a given item:\n\n get_bib_for(copy)\n\n It returns a data structure similar to \"copy\" that has the following fields:\n\n get_bib_for(copy)['author']\n get_bib_for(copy)['copy_count']\n get_bib_for(copy)['doc_id']\n get_bib_for(copy)['doc_type']\n get_bib_for(copy)['edition']\n get_bib_for(copy)['isbn']\n get_bib_for(copy)['physical_description']\n get_bib_for(copy)['pubdate']\n get_bib_for(copy)['publisher']\n get_bib_for(copy)['series.0']\n get_bib_for(copy)['synopsis']\n get_bib_for(copy)['tcn']\n get_bib_for(copy)['title']\n get_bib_for(copy)['toc']\n get_bib_for(copy)['types_of_resource.0']\n\n Finally, there are filter functions which can be used to modify or transform\n data being outputted. For example, consider the following:\n\n get_bib_for(copy)['title'] | limitTo:28\n\n This would show up to the first 28 characters for an item's title and\n truncate the rest. Now, this:\n\n get_bib_for(copy)['title'] | wrap:28\n\n This would try to the wrap the item's title every 28 characters.\n\n get_bib_for(copy)['title'] | wrap:28:multi:' '\n\n This does the same thing but indents subsequent lines with 2 spaces each.\n \n get_bib_for(copy)['title'] | wrap:28:once:' '\n\n This wraps the title just once, prefixes the second line with two spaces,\n and truncates anything after the 2nd line.\n\n-->\n\n<table class=\"labels\" style=\"page-break-after: always;\" ng-repeat=\"copy in copies\"><tr valign=\"top\"><td>\n\n<!-- Spine Label contents -->\n<pre class=\"spine\" style=\"border:none\" ng-show=\"true\">\n{{get_cn_for(copy)}}\n</pre>\n\n</td><td>\n\n<!-- Pocket Label contents -->\n<pre class=\"pocket\" style=\"border:none\" ng-show=\"true\">\n{{copy.barcode}}\n{{copy['call_number.label']}}\n{{get_bib_for(copy).author }}\n{{get_bib_for(copy).title | wrap:28:'once':' '}}\n</pre>\n\n</td></tr></table>\n\n","cn_content":"<pre>\n{{\n [\n get_cn_and_location_prefix(copy)\n ,copy['call_number.label']\n ,get_cn_and_location_suffix(copy)\n ]\n | cn_wrap:settings['webstaff.cat.label.call_number_wrap_filter_width']:settings['webstaff.cat.label.call_number_wrap_filter_height']:copy['call_number.label_class']\n}}\n</pre>\n","settings":{"lib.timezone":null,"ui.staff.max_recent_patrons":"2","webstaff.format.date_and_time":null,"webstaff.format.dates":null,"webstaff.cat.label.call_number_wrap_filter_width":null,"webstaff.cat.label.right_label.height":null,"webstaff.cat.label.font.size":null,"webstaff.cat.label.left_label.left_margin":null,"webstaff.cat.label.right_label.left_margin":null,"webstaff.cat.label.inline_css":null,"webstaff.cat.label.font.weight":null,"webstaff.cat.label.call_number_wrap_filter_height":null,"webstaff.cat.label.font.family":null,"webstaff.cat.label.left_label.width":"3in","webstaff.cat.label.right_label.width":null,"webstaff.cat.label.left_label.height":"2.5in","circ.staff_client.receipt.notice_text":null,"circ.staff_client.receipt.footer_text":null,"circ.staff_client.receipt.alert_text":null,"circ.staff_client.receipt.header_text":null,"circ.staff_client.receipt.event_text":null}}} appearance of HTML markup.\n\nThe {{ and }} markers are similar to HTML's < and > characters,\nbut are for separating AngularJS variables and code from the\nHTML itself.\n\n-->\n<style>\n /* The .spine here defines a CSS \"class\", which in this case, is used by our\n left label */\n .spine {\n\n /* this pulls from the \"Item Print Label Font Family\" setting, but will\n default to 'monospace' */\n font-family: {{settings['webstaff.cat.label.font.family'] || 'monospace'}};\n\n /* this pulls from the \"Item Print Label Font Size\" setting, but will\n default to 'normal' */\n font-size: {{settings['webstaff.cat.label.font.size'] || '10'}};\n\n /* this pulls from the \"Item Print Label Font Weight\" setting, but will\n default to 'normal' */\n font-weight: {{settings['webstaff.cat.label.font.weight'] || 'normal'}};\n\n /* this pulls from the \"Item Print Label - Height for Left Label\"\n setting, but will default to '1.25in' */\n height: {{settings['webstaff.cat.label.left_label.height'] || '1.25in'}};\n min-height: {{settings['webstaff.cat.label.left_label.height'] || '1.25in'}};\n max-height: {{settings['webstaff.cat.label.left_label.height'] || '1.25in'}};\n\n /* this pulls from the \"Item Print Label - Width for Left Label\"\n setting, but will default to '1in' */\n width: {{settings['webstaff.cat.label.left_label.width'] || '1in'}};\n min-width: {{settings['webstaff.cat.label.left_label.width'] || '1in'}};\n max-width: {{settings['webstaff.cat.label.left_label.width'] || '1in'}};\n\n /* this pulls from the \"Item Print Label - Left Margin for Left Label\"\n setting, but will default to '0in' */\n margin-left: {{settings['webstaff.cat.label.left_label.left_margin'] || '0in'}};\n }\n\n /* This CSS class is used by our right label */\n .pocket {\n\n /* this pulls from the \"Item Print Label Font Family\" setting, but will\n default to 'monospace' */\n font-family: {{settings['webstaff.cat.label.font.family'] || 'monospace'}};\n\n /* this pulls from the \"Item Print Label Font Size\" setting, but will\n default to 'normal' */\n font-size: {{settings['webstaff.cat.label.font.size'] || '10'}};\n\n /* this pulls from the \"Item Print Label Font Weight\" setting, but will\n default to 'normal' */\n font-weight: {{settings['webstaff.cat.label.font.weight'] || 'normal'}};\n\n /* this pulls from the \"Item Print Label - Height for Left Label\"\n setting, but will default to '1.25in' */\n height: {{settings['webstaff.cat.label.right_label.height'] || '1.25in'}};\n min-height: {{settings['webstaff.cat.label.right_label.height'] || '1.25in'}};\n max-height: {{settings['webstaff.cat.label.right_label.height'] || '1.25in'}};\n\n /* this pulls from the \"Item Print Label - Width for Left Label\"\n setting, but will default to '2.625in' */\n width: {{settings['webstaff.cat.label.right_label.width'] || '2.625in'}};\n min-width: {{settings['webstaff.cat.label.right_label.width'] || '2.625in'}};\n max-width: {{settings['webstaff.cat.label.right_label.width'] || '2.625in'}};\n\n /* this pulls from the \"Item Print Label - Left Margin for Left Label\"\n setting, but will default to '0in' */\n margin-left: {{settings['webstaff.cat.label.right_label.left_margin'] || '0in'}};\n\n }\n\n /* This is to help mitigate artifacts in the Preview pane which don't\n actually print */\n .labels ::-webkit-scrollbar { \n display: none; \n }\n\n /* This pulls from the \"Item Print Label - Inline CSS\" setting */\n {{settings['webstaff.cat.label.inline_css']||''}}\n\n</style>\n\n<!-- Here we are implementing our combined label as 2-column HTML <table>, with\n each table containing a <pre> tag for preserving whitespace and linefeeds.\n\n The ng-repeat attribute is from AngularJS, and in this case is looping\n through a list of all the items that were selected when the Print Label\n interface was invoked. Each iteration puts item data into the variable\n \"copy\", which may be referenced in the HTML by escaping it with {{ and }}\n\n The following are available, and you may treat these similar to the\n \"macros\" in earlier versions of Evergreen:\n\n copy['active_date']\n copy['age_protect']\n copy['alert_message']\n copy['barcode']\n copy['call_number.copies']\n copy['call_number.create_date']\n copy['call_number.deleted']\n copy['call_number.edit_date']\n copy['call_number.id']\n copy['call_number.label']\n copy['call_number.label_class']\n copy['call_number.label_sortkey']\n copy['call_number.notes']\n copy['call_number.owning_lib']\n copy['call_number.prefix.id']\n copy['call_number.prefix.label']\n copy['call_number.prefix.label_sortkey']\n copy['call_number.prefix.owning_lib']\n copy['call_number.record.active']\n copy['call_number.record.author_field_entries']\n copy['call_number.record.call_numbers']\n copy['call_number.record.create_date']\n copy['call_number.record.creator.ws_ou']\n copy['call_number.record.deleted']\n copy['call_number.record.edit_date']\n copy['call_number.record.fingerprint']\n copy['call_number.record.fixed_fields']\n copy['call_number.record.full_record_entries']\n copy['call_number.record.id']\n copy['call_number.record.identifier_field_entries']\n copy['call_number.record.keyword_field_entries']\n copy['call_number.record.language']\n copy['call_number.record.last_xact_id']\n copy['call_number.record.marc']\n copy['call_number.record.metarecord']\n copy['call_number.record.notes']\n copy['call_number.record.owner']\n copy['call_number.record.quality']\n copy['call_number.record.series_field_entries']\n copy['call_number.record.share_depth']\n copy['call_number.record.simple_record.author']\n copy['call_number.record.simple_record.fingerprint']\n copy['call_number.record.simple_record.id']\n copy['call_number.record.simple_record.isbn']\n copy['call_number.record.simple_record.issn']\n copy['call_number.record.simple_record.pubdate']\n copy['call_number.record.simple_record.publisher']\n copy['call_number.record.simple_record.quality']\n copy['call_number.record.simple_record.tcn_source']\n copy['call_number.record.simple_record.tcn_value']\n copy['call_number.record.simple_record.title']\n copy['call_number.record.source']\n copy['call_number.record.subject_field_entries']\n copy['call_number.record.tcn_source']\n copy['call_number.record.tcn_value']\n copy['call_number.record.title_field_entries']\n copy['call_number.suffix.id']\n copy['call_number.suffix.label']\n copy['call_number.suffix.label_sortkey']\n copy['call_number.suffix.owning_lib']\n copy['call_number.uri_maps']\n copy['call_number.uris']\n copy['circ_as_type']\n copy['circ_lib']\n copy['circ_modifier']\n copy['circulate']\n copy['copy_number']\n copy['cost']\n copy['create_date']\n copy['deleted']\n copy['deposit']\n copy['deposit_amount']\n copy['dummy_author']\n copy['dummy_isbn']\n copy['dummy_title']\n copy['edit_date']\n copy['fine_level']\n copy['floating']\n copy['holdable']\n copy['id']\n copy['loan_duration']\n copy['location.checkin_alert']\n copy['location.circulate']\n copy['location.copies']\n copy['location.deleted']\n copy['location.holdable']\n copy['location.hold_verify']\n copy['location.id']\n copy['location.label_prefix']\n copy['location.label_suffix']\n copy['location.name']\n copy['location.opac_visible']\n copy['location.orders']\n copy['location.owning_lib']\n copy['mint_condition']\n copy['opac_visible']\n copy['price']\n copy['ref']\n copy['status_changed_time']\n copy['status.copy_active']\n copy['status.holdable']\n copy['status.id']\n copy['status.is_available']\n copy['status.name']\n copy['status.opac_visible']\n copy['status.restrict_copy_delete']\n\n There are also two functions available. The following pulls manually\n edited call numbers for a given item:\n\n get_cn_for(copy)\n\n And this one pulls bibliographic data for a given item:\n\n get_bib_for(copy)\n\n It returns a data structure similar to \"copy\" that has the following fields:\n\n get_bib_for(copy)['author']\n get_bib_for(copy)['copy_count']\n get_bib_for(copy)['doc_id']\n get_bib_for(copy)['doc_type']\n get_bib_for(copy)['edition']\n get_bib_for(copy)['isbn']\n get_bib_for(copy)['physical_description']\n get_bib_for(copy)['pubdate']\n get_bib_for(copy)['publisher']\n get_bib_for(copy)['series.0']\n get_bib_for(copy)['synopsis']\n get_bib_for(copy)['tcn']\n get_bib_for(copy)['title']\n get_bib_for(copy)['toc']\n get_bib_for(copy)['types_of_resource.0']\n\n Finally, there are filter functions which can be used to modify or transform\n data being outputted. For example, consider the following:\n\n get_bib_for(copy)['title'] | limitTo:28\n\n This would show up to the first 28 characters for an item's title and\n truncate the rest. Now, this:\n\n get_bib_for(copy)['title'] | wrap:28\n\n This would try to the wrap the item's title every 28 characters.\n\n get_bib_for(copy)['title'] | wrap:28:multi:' '\n\n This does the same thing but indents subsequent lines with 2 spaces each.\n \n get_bib_for(copy)['title'] | wrap:28:once:' '\n\n This wraps the title just once, prefixes the second line with two spaces,\n and truncates anything after the 2nd line.\n\n-->\n\n<table class=\"labels\" style=\"page-break-after: always;\" ng-repeat=\"copy in copies\"><tr valign=\"top\"><td>\n\n<!-- Spine Label contents -->\n<pre class=\"spine\" style=\"border:none\" ng-show=\"true\">\n{{get_cn_for(copy)}}\n</pre>\n\n</td><td>\n\n<!-- Pocket Label contents -->\n<pre class=\"pocket\" style=\"border:none\" ng-show=\"true\">\n{{copy.barcode}}\n{{copy['call_number.label']}}\n{{get_bib_for(copy).author }}\n{{get_bib_for(copy).title | wrap:28:'once':' '}}\n</pre>\n\n</td></tr></table>\n\n","cn_content":"<pre>\n{{\n [\n get_cn_and_location_prefix(copy)\n ,copy['call_number.label']\n ,get_cn_and_location_suffix(copy)\n ]\n | cn_wrap:settings['webstaff.cat.label.call_number_wrap_filter_width']:settings['webstaff.cat.label.call_number_wrap_filter_height']:copy['call_number.label_class']\n}}\n</pre>\n","settings":{"lib.timezone":null,"ui.staff.max_recent_patrons":"2","webstaff.format.date_and_time":null,"webstaff.format.dates":null,"webstaff.cat.label.call_number_wrap_filter_width":null,"webstaff.cat.label.right_label.height":null,"webstaff.cat.label.font.size":null,"webstaff.cat.label.left_label.left_margin":null,"webstaff.cat.label.right_label.left_margin":null,"webstaff.cat.label.inline_css":null,"webstaff.cat.label.font.weight":null,"webstaff.cat.label.call_number_wrap_filter_height":null,"webstaff.cat.label.font.family":null,"webstaff.cat.label.left_label.width":"3in","webstaff.cat.label.right_label.width":null,"webstaff.cat.label.left_label.height":"2.5in","circ.staff_client.receipt.notice_text":null,"circ.staff_client.receipt.footer_text":null,"circ.staff_client.receipt.alert_text":null,"circ.staff_client.receipt.header_text":null,"circ.staff_client.receipt.event_text":null}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement