2 # You can supply a trunc_length parameter to override the default contents_truncate_length value
5 label => l('General Note: '),
7 xpath => '//*[@tag="500"]'
9 label => l('With Note: '),
10 xpath => '//*[@tag="501"]'
12 display_field => 'thesis',
13 label => l('Dissertation Note: '),
14 xpath => '//*[@tag="502"]'
16 display_field => 'bibliography',
17 label => l('Bibliography, etc. Note: '),
18 xpath => '//*[@tag="504"]'
20 display_field => 'toc',
21 label => l('Formatted Contents Note: '),
22 xpath => '//*[@tag="505"]'
24 label => l('Restrictions on Access Note: '),
25 xpath => '//*[@tag="506"]'
27 label => l('Scale Note for Graphic Material: '),
28 xpath => '//*[@tag="507"]'
30 display_field => 'production_credits',
31 label => l('Creation/Production Credits Note: '),
32 xpath => '//*[@tag="508"]'
34 label => l('Citation/References Note: '),
35 xpath => '//*[@tag="510"]'
37 display_field => 'performers',
38 label => l('Participant or Performer Note: '),
39 xpath => '//*[@tag="511"]'
41 label => l('Type of Report and Period Covered Note: '),
42 xpath => '//*[@tag="513"]'
44 label => l('Data Quality Note: '),
45 xpath => '//*[@tag="514"]'
47 label => l('Numbering Peculiarities Note: '),
48 xpath => '//*[@tag="515"]'
50 label => l('Type of Computer File or Data Note: '),
51 xpath => '//*[@tag="516"]'
53 label => l('Date/Time and Place of an Event Note: '),
54 xpath => '//*[@tag="518"]'
56 display_field => 'abstract',
57 label => l('Summary, etc.: '),
58 xpath => '//*[@tag="520"]'
60 label => l('Target Audience Note: '),
61 xpath => '//*[@tag="521"]'
63 label => l('Geographic Coverage Note: '),
64 xpath => '//*[@tag="522"]'
66 label => l('Preferred Citation of Described Materials Note: '),
67 xpath => '//*[@tag="524"]'
69 label => l('Supplement Note: '),
70 xpath => '//*[@tag="525"]'
72 label => l('Study Program Information Note: '),
73 xpath => '//*[@tag="526"]'
75 label => l('Additional Physical Form available Note: '),
76 xpath => '//*[@tag="530"]'
78 label => l('Reproduction Note: '),
79 xpath => '//*[@tag="533"]'
81 label => l('Original Version Note: '),
82 xpath => '//*[@tag="534"]'
84 label => l('Location of Originals/Duplicates Note: '),
85 xpath => '//*[@tag="535"]'
87 label => l('Funding Information Note: '),
88 xpath => '//*[@tag="536"]'
90 label => l('System Details Note: '),
91 xpath => '//*[@tag="538"]'
93 label => l('Terms Governing Use and Reproduction Note: '),
94 xpath => '//*[@tag="540"]'
96 label => l('Immediate Source of Acquisition Note: '),
97 xpath => '//*[@tag="541"]'
99 label => l('Information Relating to Copyright Status: '),
100 xpath => '//*[@tag="542"]'
102 label => l('Location of Other Archival Materials Note: '),
103 xpath => '//*[@tag="544"]'
105 label => l('Biographical or Historical Data: '),
106 xpath => '//*[@tag="545"]'
108 label => l('Language Note: '),
109 xpath => '//*[@tag="546"]'
111 label => l('Former Title Complexity Note: '),
112 xpath => '//*[@tag="547"]'
114 label => l('Issuing Body Note: '),
115 xpath => '//*[@tag="550"]'
117 label => l('Entity and Attribute Information Note: '),
118 xpath => '//*[@tag="552"]'
120 label => l('Cumulative Index/Finding Aids Note: '),
121 xpath => '//*[@tag="555"]'
123 label => l('Information About Documentation Note: '),
124 xpath => '//*[@tag="556"]'
126 label => l('Ownership and Custodial History: '),
127 xpath => '//*[@tag="561"]'
129 label => l('Copy and Version Identification Note: '),
130 xpath => '//*[@tag="562"]'
132 label => l('Binding Information: '),
133 xpath => '//*[@tag="563"]'
135 label => l('Case File Characteristics Note: '),
136 xpath => '//*[@tag="565"]'
138 label => l('Methodology Note: '),
139 xpath => '//*[@tag="567"]'
141 label => l('Linking Entry Complexity Note: '),
142 xpath => '//*[@tag="580"]'
144 label => l('Publications About Described Materials Note: '),
145 xpath => '//*[@tag="581"]'
147 label => l('Action Note: '),
148 xpath => '//*[@tag="583"]'
150 label => l('Accumulation and Frequency of Use Note: '),
151 xpath => '//*[@tag="584"]'
153 label => l('Exhibitions Note: '),
154 xpath => '//*[@tag="585"]'
156 label => l('Awards Note: '),
157 xpath => '//*[@tag="586"]'
159 label => l('Source of Description Note: '),
160 xpath => '//*[@tag="588"]'
164 BLOCK render_contents;
165 xpath = xpath || '//*[starts-with(@tag,"5")]';
166 FOR node IN ctx.marc_xml.findnodes(xpath);
169 FOR subfield IN node.childNodes;
170 NEXT UNLESS subfield.nodeName == "subfield";
171 code = subfield.getAttribute('code');
173 linked_fields = [subfield.textContent()];
174 target_field = node.getAttribute('tag');
177 NEXT UNLESS code.match('[a-z]');
178 all_content.push(subfield.textContent);
180 total_contents = all_content.join(" ").replace('\s+$', '');
181 %] [% IF total_contents.size;
182 trunc_length = cont.trunc_length || contents_truncate_length || 100;
184 "<div class='content_field'>"; accordion(total_contents, trunc_length); "</div>";
186 "<div class='content_field'>"; accordion(total_contents); "</div>";
188 FOREACH link880 IN graphics;
189 '<div class="graphic880"' _ link880.dir _ '>';
190 accordion(link880.value);
196 BLOCK render_all_contents;
197 FOREACH cont IN contents;
200 df = cont.display_field;
201 trunc_length = cont.trunc_length || contents_truncate_length || 100;
202 IF df AND attrs.hl.$df.size; -%]
204 <td class='rdetail_content_type'>[% cont.label %]</td>
205 <td class='rdetail_content_value' property='keywords'>
206 [%- FOREACH note IN attrs.hl.$df;
207 "<div class='content_field'>"; accordion(note, trunc_length); "</div>";
211 content = PROCESS render_contents(xpath=cont.xpath);
212 IF content.match('\S'); -%]
214 <td class='rdetail_content_type'>[% cont.label %]</td>
215 <td class='rdetail_content_value' property='keywords'>[% content %]</td>
222 [%- content_html = PROCESS render_all_contents;
223 IF content_html.length > 0;
225 <h2 class='rdetail_contents'>[% l('Content descriptions') %]</h2>
226 <table class='rdetail_content'>