1 [% PROCESS "opac/parts/header.tt2";
2 PROCESS "opac/parts/misc_util.tt2";
3 WRAPPER "opac/parts/myopac/base.tt2";
5 limit = ctx.bookbags_limit;
6 offset = ctx.bookbags_offset;
7 item_page = ctx.bookbags_item_page;
9 "Sharing a Bookbag means that the contents " _
10 "of the Bookbag will be visible to others. " _
11 "To see the public view of a shared Bookbag, " _
12 "click on the Bookbag\\'s name in the Bookbag list.");
14 <h3 class="sr-only">[% l('My Lists') %]</h3>
15 <div id='myopac_bookbag_div' style="padding:5px;">
17 <!-- new list creation -->
18 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post" id="create_form">
19 <h1>[% l('Create New List') %]</h1><a name="createnewlist"></a>
20 <table class="table_no_cell_pad" id="list_create_table">
23 <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
26 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
27 <input id="list_create_name" type="text" name="name" />
28 <input type="hidden" name="action" value="create" />
30 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
32 [% IF ctx.where_from %]
33 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
37 <label for="list_create_shared">[% l('Share this list?') %]</label>
38 <select name="shared" id="list_create_shared">
39 <option value="0">[% l('No') %]
40 <option value="1">[% l('Yes') %]
42 <a href="javascript:void(0);"
43 onclick="alert('[% bb_publish_text %]')">
44 <img alt="[% l('Sharing Help') %]"
45 [% html_text_attr('title', bb_publish_text) %]
46 src="[% ctx.media_prefix %]/images/question-mark.png" />
49 <td class="list-create-table-buttons">
51 value="[% l('Submit') %]"
52 alt="[% l('Submit') %]"
54
56 value="[% l('Cancel') %]"
57 alt="[% l('Cancel') %]"
58 class="opac-button" />
62 <td class="text-right-top">
63 <label for="list_description">[% l("List description (optional):") %]</label>
66 <textarea cols="40" rows="3" name="description"
67 id="list_description"></textarea>
72 <h1>[% l("My Existing Lists") %]</h1>
73 [% INCLUDE "opac/parts/anon_list.tt2" %]
74 [% IF ctx.bookbags.size %]
75 <div class="header_middle">
76 <span class="float-left">[% l('Saved Lists') %]</span>
77 [% IF limit < ctx.bookbag_count; %]
78 <span class='float-left' style='padding-left: 10px;'>
80 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
81 offset => (offset - limit)
82 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
84 [%- IF (offset - (limit * 3)) >= 0 -%]
85 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
86 offset => (offset - (limit * 3))
87 }) %]'>[% ((offset - (limit * 3)) / limit) + 1 %]</a>
89 [%- IF (offset - (limit * 2)) >= 0 -%]
90 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
91 offset => (offset - (limit * 2))
92 }) %]'>[% ((offset - (limit * 2)) / limit) + 1 %]</a>
94 [%- IF (offset - limit) >= 0 -%]
95 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
96 offset => (offset - limit)
97 }) %]'>[% ((offset - limit) / limit) + 1 %]</a>
99 <span class="bookbag-paginator-selected" >[% (offset / limit) + 1 %]</span>
100 [%- IF (offset + limit) < ctx.bookbag_count -%]
101 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
102 offset => (offset + limit)
103 }) %]'>[% ((offset + limit) / limit) + 1 %]</a>
105 [%- IF (offset + (limit * 2)) < ctx.bookbag_count -%]
106 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
107 offset => (offset + (limit * 2))
108 }) %]'>[% ((offset + (limit * 2)) / limit) + 1 %]</a>
110 [%- IF (offset + (limit * 3)) < ctx.bookbag_count -%]
111 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
112 offset => (offset + (limit * 3))
113 }) %]'>[% ((offset + (limit * 3)) / limit) + 1 %]</a>
115 [%- IF (ctx.bookbag_count - offset) > limit; -%]
116 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
117 offset => (offset + limit)
118 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
123 <div class="clear-both"></div>
125 <div id='acct_lists_prime'>
126 [% FOR bbag IN ctx.bookbags %]
127 <div class="bookbag-controls-holder">
128 <div class="bookbag-controls most">
129 [% baseurl = ctx.opac_root _ '/myopac/lists';
130 IF bbag.id != CGI.param("bbid");
131 url = mkurl(baseurl,{bbid => bbag.id, item_page => 1},['edit_notes','sort']);
132 ltitle = l("Show items in list");
134 url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
135 ltitle = l("Hide items in list");
137 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
138 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
141 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update', {}, 1) %]" method="post">
142 <div class="bookbag-controls">
143 <input type="hidden" name="action" value="add_rec" />
144 <input type="hidden" name="list" value="[% bbag.id %]" />
145 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
146 [% IF ctx.where_from %]
147 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
149 <input class="fixed" type="submit" value="[% l('Add to this list') %]" />
153 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
154 <div class="bookbag-share">
155 <input type="hidden" name="list" value="[% bbag.id %]" />
156 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
157 [% IF bbag.pub != 't' %]
158 <input type="hidden" name="action" value="show" />
159 <input class="fixed" type="submit" value="[% l('Share') %]" />
161 <input type="hidden" name="action" value="hide" />
162 <input class="fixed" type="submit" value="[% l('Hide') %]" />
166 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post" onsubmit="return confirm('[% l('Do you really want to delete this list?') %]')">
167 <div class="bookbag-controls">
168 <input type="hidden" name="list" value="[% bbag.id %]" />
169 <input type="hidden" name="action" value="delete" />
170 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
171 <input type="submit" value="[% l('Delete List') %]" />
174 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="post">
175 <div class="bookbag-controls">
176 <input type="hidden" name="list" value="[% bbag.id %]" />
177 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
178 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
179 <input type="submit" value="[% l('Download CSV') %]" />
182 [% setting = 'opac.default_list'; %]
183 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
184 <div class="bookbag-controls">
185 <input type="hidden" name="list" value="[% bbag.id %]" />
186 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
187 [% IF ctx.user_setting_map.$setting == bbag.id %]
188 <input type="hidden" name="action" value="remove_default" />
189 <input type="submit" value="[% l('Remove Default List') %]" />
191 <input type="hidden" name="action" value="make_default" />
192 <input type="submit" value="[% l('Make Default List') %]" />
196 [% IF ctx.is_staff %]
197 <div class="bookbag-controls">
202 "oils://remote/xul/server/cat/bucketz39_dialog.xul";
204 xulG.url_prefix(path),
206 "width=800,height=500",
208 "[% ctx.authtoken %]",
209 "[% ctx.user.ws_ou %]",
213 value="[% l('Locate Z39.50 Matches') %]"
217 <div class="bookbag-controls">
218 [% IF bbag.pub == 't'; %]
219 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
220 alt="[% l('RSS Feed') %]" border="0"
221 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
224 <div class="bookbag-controls">
225 [% IF bbag.pub == 't'; %]
228 ctx.opac_root _ '/results',
229 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
232 -%]'>[% l('HTML View') %]</a>
235 <div class="clear-both pad-bottom-five"></div>
237 [% IF CGI.param("bbid") == bbag.id %]
238 <div class="bookbag-specific">
241 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
242 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
243 [% INCLUDE "opac/parts/filtersort.tt2"
244 value=CGI.param('sort') mode='bookbag' %]
245 <input type="hidden" name="bbid"
246 value="[% CGI.param('bbid') | html %]" />
247 <input type="submit" value="[% l('Sort') %]" />
252 <input type="hidden" name="bbid" value="[% bbag.id %]" />
253 <input type="hidden" name="action" value="editmeta" />
254 <input type="hidden" name="limit" value="[% limit %]" />
255 <input type="hidden" name="offset" value="[% offset %]" />
256 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
257 <table id="bbag-name-desc-form">
260 <label for="bbag-edit-name">[% l('Name:') %]</label>
263 <input name="name" type="text"
264 value="[% bbag.name | html %]"
265 id="bbag-edit-name" />
267 <td rowspan="2" class="saver">
268 [% l("Save changes to name or description?") %]<br />
269 <input type="submit" value="[% l('Save') %]" />
273 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
275 <textarea name="description"
276 id="bbag-edit-description">[% bbag.description | html %]</textarea>
283 <br class="clear-both" />
284 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
285 <input type="hidden" name="list" value="[% bbag.id %]" />
286 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
287 <table class="bookbag-specific table_no_cell_pad table_no_border_space table_no_border">
288 <thead id="acct_list_header">
290 <td class="list_checkbox">
291 <input type="checkbox"
292 onclick="var inputs=document.getElementsByTagName('input');
293 for (i = 0; i < inputs.length; i++) {
294 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
295 inputs[i].checked = this.checked;}"/>
298 <td class="list_entry">
299 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
301 <td class="list_entry">
302 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
304 <td class='list_entry'>
305 [% l('Local Call Number') %]
307 <td class="list_entry">
308 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'pubdate' ? 'pubdate.descending' : 'pubdate')}) %]">[% l('Publication Date') %]</a>
310 <td class="list_entry">
313 <td class="list_entry">
315 [% IF CGI.param("edit_notes") != bbag.id %]
316 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
319 <td class="list_actions">
320 <select name="action">
321 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
322 <option value="place_hold">[% l('Place hold') %]</option>
323 <option value="del_item">[% l('Remove from list') %]</option>
325 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
326 <input type="submit" value="[% l('Go') %]" />
331 [% UNLESS bbag.items.size %]
332 <tr><td colspan="6" class="list_is_empty">
333 [% l("This list contains no items.") %]
336 [% FOR item IN bbag.items;
337 rec_id = item.target_biblio_record_entry.id;
338 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
339 PROCESS get_marc_attrs args=attrs %]
340 <tr class="bookbag-item-row">
341 <td class="list_checkbox">
342 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
344 <td class="list_entry">
345 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
347 <td class="list_entry">
349 authorquery = attrs.author | replace('[,\.:;]', '');
350 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
351 -%]">[% attrs.author | html %]</a>
353 <td class="list_entry">
355 copy = attrs.holdings.0;
357 # only show a relevant call number
358 copy_org = ctx.get_aou_by_shortname(copy.owner);
359 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
361 ctx_org = ctx.get_aou(ctx_org);
362 IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
363 l('[_1] ([_2])', copy.label, copy_org.name) | html;
370 <td class="list_entry">
371 [% attrs.pubdate | html %]
373 <td class="list_entry">
374 [% attrs.format_label | html %]
376 [% IF CGI.param("edit_notes") == bbag.id %]
377 <td class="list_entry">
378 [% FOR note IN item.notes %]
379 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
381 <input type="text" name="item-[% item.id %]" />
384 <td class="list_entry">
385 [% FOR note IN item.notes %]
386 <div>[% note.note | html %]</div>
392 [% IF CGI.param("edit_notes") == bbag.id %]
394 <td colspan="3"><!-- All space left of notes column --></td>
395 <td class="save-notes">
396 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
397 <input type="hidden" name="bbid" value="[% CGI.param('bbid') | html %]" />
398 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
405 [% IF ctx.bb_page_count > 1; %]
406 <div class="header_middle" style="padding-top:7px;">
407 <span class="float-left" style="padding-left:34px;">[% l('Navigate Selected List ') %]</span>
408 <span class='float-left' style='padding-left: 10px;'>
409 [%- IF item_page > 1 -%]
410 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
411 item_page => item_page - 1
412 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
415 [%- IF (item_page - 3) >= 1 -%]
416 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
417 item_page => item_page - 3
418 }) %]'>[% item_page - 3 %]</a>
420 [%- IF (item_page - 2) >= 1 -%]
421 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
422 item_page => item_page - 2
423 }) %]'>[% item_page - 2 %]</a>
425 [%- IF (item_page - 1) >= 1 -%]
426 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
427 item_page => item_page - 1
428 }) %]'>[% item_page - 1%]</a>
430 <span class="bookbag-paginator-selected" >[% item_page %]</span>
431 [%- IF (item_page + 1) <= ctx.bb_page_count -%]
432 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
433 item_page => item_page + 1
434 }) %]'>[% item_page + 1 %]</a>
436 [%- IF (item_page + 2) <= ctx.bb_page_count -%]
437 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
438 item_page => item_page + 2
439 }) %]'>[% item_page + 2 %]</a>
441 [%- IF (item_page + 3) <= ctx.bb_page_count -%]
442 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
443 item_page => item_page + 3
444 }) %]'>[% item_page + 3 %]</a>
447 [%- IF (item_page + 1) <= ctx.bb_page_count; -%]
448 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
449 item_page => item_page + 1
450 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
454 <div class="clear-both"></div>