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 <div id='myopac_bookbag_div' style="padding:5px;">
11 <!-- new list creation -->
12 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post" id="create_form">
13 <h1>[% l('Create New List') %]</h1><a name="createnewlist"></a>
14 <table class="table_no_cell_pad" id="list_create_table">
17 <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
20 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
21 <input id="list_create_name" type="text" name="name" />
22 <input type="hidden" name="action" value="create" />
24 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
26 [% IF ctx.where_from %]
27 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
31 <label for="list_create_shared">[% l('Share this list?') %]</label>
32 <select name="shared" id="list_create_shared">
33 <option value="0">[% l('No') %]
34 <option value="1">[% l('Yes') %]
36 <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
37 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
39 <td class="list-create-table-buttons">
41 value="[% l('Submit') %]"
42 alt="[% l('Submit') %]"
44
46 value="[% l('Cancel') %]"
47 alt="[% l('Cancel') %]"
48 class="opac-button" />
52 <td class="text-right-top">
53 <label for="list_description">[% l("List description (optional):") %]</label>
56 <textarea cols="40" rows="3" name="description"
57 id="list_description"></textarea>
62 <h1>[% l("My Existing Lists") %]</h1>
63 [% INCLUDE "opac/parts/anon_list.tt2" %]
64 [% IF ctx.bookbags.size %]
65 <div class="header_middle">
66 <span class="float-left">[% l('Saved Lists') %]</span>
67 [% IF limit < ctx.bookbag_count; %]
68 <span class='float-left' style='padding-left: 10px;'>
70 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
71 offset => (offset - limit)
72 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
74 [%- IF (offset - (limit * 3)) >= 0 -%]
75 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
76 offset => (offset - (limit * 3))
77 }) %]'>[% ((offset - (limit * 3)) / limit) + 1 %]</a>
79 [%- IF (offset - (limit * 2)) >= 0 -%]
80 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
81 offset => (offset - (limit * 2))
82 }) %]'>[% ((offset - (limit * 2)) / limit) + 1 %]</a>
84 [%- IF (offset - limit) >= 0 -%]
85 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
86 offset => (offset - limit)
87 }) %]'>[% ((offset - limit) / limit) + 1 %]</a>
89 <span class="bookbag-paginator-selected" >[% (offset / limit) + 1 %]</span>
90 [%- IF (offset + limit) < ctx.bookbag_count -%]
91 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
92 offset => (offset + limit)
93 }) %]'>[% ((offset + limit) / limit) + 1 %]</a>
95 [%- IF (offset + (limit * 2)) < ctx.bookbag_count -%]
96 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
97 offset => (offset + (limit * 2))
98 }) %]'>[% ((offset + (limit * 2)) / limit) + 1 %]</a>
100 [%- IF (offset + (limit * 3)) < ctx.bookbag_count -%]
101 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
102 offset => (offset + (limit * 3))
103 }) %]'>[% ((offset + (limit * 3)) / limit) + 1 %]</a>
105 [%- IF (ctx.bookbag_count - offset) > limit; -%]
106 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
107 offset => (offset + limit)
108 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
113 <div class="clear-both"></div>
115 <div id='acct_lists_prime'>
116 [% FOR bbag IN ctx.bookbags %]
117 <div class="bookbag-controls-holder">
118 <div class="bookbag-controls most">
119 [% baseurl = ctx.opac_root _ '/myopac/lists';
120 IF bbag.id != CGI.param("bbid");
121 url = mkurl(baseurl,{bbid => bbag.id, item_page => 1},['edit_notes','sort']);
122 ltitle = l("Show items in list");
124 url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
125 ltitle = l("Hide items in list");
127 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
128 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
131 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update', {}, 1) %]" method="post">
132 <div class="bookbag-controls">
133 <input type="hidden" name="action" value="add_rec" />
134 <input type="hidden" name="list" value="[% bbag.id %]" />
135 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
136 [% IF ctx.where_from %]
137 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
139 <input class="fixed" type="submit" value="[% l('Add to this list') %]" />
143 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
144 <div class="bookbag-share">
145 <input type="hidden" name="list" value="[% bbag.id %]" />
146 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
147 [% IF bbag.pub != 't' %]
148 <input type="hidden" name="action" value="show" />
149 <input class="fixed" type="submit" value="[% l('Share') %]" />
151 <input type="hidden" name="action" value="hide" />
152 <input class="fixed" type="submit" value="[% l('Hide') %]" />
156 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post" onsubmit="return confirm('[% l('Do you really want to delete this list?') %]')">
157 <div class="bookbag-controls">
158 <input type="hidden" name="list" value="[% bbag.id %]" />
159 <input type="hidden" name="action" value="delete" />
160 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
161 <input type="submit" value="[% l('Delete List') %]" />
164 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="post">
165 <div class="bookbag-controls">
166 <input type="hidden" name="list" value="[% bbag.id %]" />
167 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
168 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
169 <input type="submit" value="[% l('Download CSV') %]" />
172 [% setting = 'opac.default_list'; %]
173 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
174 <div class="bookbag-controls">
175 <input type="hidden" name="list" value="[% bbag.id %]" />
176 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
177 [% IF ctx.user_setting_map.$setting == bbag.id %]
178 <input type="hidden" name="action" value="remove_default" />
179 <input type="submit" value="[% l('Remove Default List') %]" />
181 <input type="hidden" name="action" value="make_default" />
182 <input type="submit" value="[% l('Make Default List') %]" />
186 [% IF ctx.is_staff %]
187 <div class="bookbag-controls">
192 "oils://remote/xul/server/cat/bucketz39_dialog.xul";
194 xulG.url_prefix(path),
196 "width=800,height=500",
198 "[% ctx.authtoken %]",
199 "[% ctx.user.ws_ou %]",
203 value="[% l('Locate Z39.50 Matches') %]"
207 <div class="bookbag-controls">
208 [% IF bbag.pub == 't'; %]
209 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
210 alt="[% l('RSS Feed') %]" border="0"
211 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
214 <div class="bookbag-controls">
215 [% IF bbag.pub == 't'; %]
218 ctx.opac_root _ '/results',
219 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
222 -%]'>[% l('HTML View') %]</a>
225 <div class="clear-both pad-bottom-five"></div>
227 [% IF CGI.param("bbid") == bbag.id %]
228 <div class="bookbag-specific">
231 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
232 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
233 [% INCLUDE "opac/parts/filtersort.tt2"
234 value=CGI.param('sort') mode='bookbag' %]
235 <input type="hidden" name="bbid"
236 value="[% CGI.param('bbid') | html %]" />
237 <input type="submit" value="[% l('Sort') %]" />
242 <input type="hidden" name="bbid" value="[% bbag.id %]" />
243 <input type="hidden" name="action" value="editmeta" />
244 <input type="hidden" name="limit" value="[% limit %]" />
245 <input type="hidden" name="offset" value="[% offset %]" />
246 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
247 <table id="bbag-name-desc-form">
250 <label for="bbag-edit-name">[% l('Name:') %]</label>
253 <input name="name" type="text"
254 value="[% bbag.name | html %]"
255 id="bbag-edit-name" />
257 <td rowspan="2" class="saver">
258 [% l("Save changes to name or description?") %]<br />
259 <input type="submit" value="[% l('Save') %]" />
263 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
265 <textarea name="description"
266 id="bbag-edit-description">[% bbag.description | html %]</textarea>
273 <br class="clear-both" />
274 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
275 <input type="hidden" name="list" value="[% bbag.id %]" />
276 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
277 <table class="bookbag-specific table_no_cell_pad table_no_border_space table_no_border">
278 <thead id="acct_list_header">
280 <td class="list_checkbox">
281 <input type="checkbox" onclick="
282 var inputs=document.getElementsByTagName('input');
283 for (i = 0; i < inputs.length; i++) {
284 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
285 inputs[i].checked = this.checked;}"/>
288 <td class="list_entry">
289 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
291 <td class="list_entry">
292 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
294 <td class='list_entry'>
295 [% l('Local Call Number') %]
297 <td class="list_entry">
298 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'pubdate' ? 'pubdate.descending' : 'pubdate')}) %]">[% l('Publication Date') %]</a>
300 <td class="list_entry">
303 <td class="list_entry">
305 [% IF CGI.param("edit_notes") != bbag.id %]
306 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
309 <td class="list_actions">
310 <select name="action">
311 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
312 <option value="place_hold">[% l('Place hold') %]</option>
313 <option value="del_item">[% l('Remove from list') %]</option>
315 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
316 <input type="submit" value="[% l('Go') %]" />
321 [% UNLESS bbag.items.size %]
322 <tr><td colspan="6" class="list_is_empty">
323 [% l("This list contains no items.") %]
326 [% FOR item IN bbag.items;
327 rec_id = item.target_biblio_record_entry.id;
328 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
329 PROCESS get_marc_attrs args=attrs %]
330 <tr class="bookbag-item-row">
331 <td class="list_checkbox">
332 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
334 <td class="list_entry">
335 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
337 <td class="list_entry">
339 authorquery = attrs.author | replace('[,\.:;]', '');
340 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
341 -%]">[% attrs.author | html %]</a>
343 <td class="list_entry">
345 copy = attrs.holdings.0;
347 # only show a relevant call number
348 copy_org = ctx.get_aou_by_shortname(copy.owner);
349 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
351 ctx_org = ctx.get_aou(ctx_org);
352 IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
353 l('[_1] ([_2])', copy.label, copy_org.name) | html;
360 <td class="list_entry">
361 [% attrs.pubdate | html %]
363 <td class="list_entry">
364 [% attrs.format_label | html %]
366 [% IF CGI.param("edit_notes") == bbag.id %]
367 <td class="list_entry">
368 [% FOR note IN item.notes %]
369 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
371 <input type="text" name="item-[% item.id %]" />
374 <td class="list_entry">
375 [% FOR note IN item.notes %]
376 <div>[% note.note | html %]</div>
382 [% IF CGI.param("edit_notes") == bbag.id %]
384 <td colspan="3"><!-- All space left of notes column --></td>
385 <td class="save-notes">
386 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
387 <input type="hidden" name="bbid" value="[% CGI.param('bbid') | html %]" />
388 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
395 [% IF ctx.bb_page_count > 1; %]
396 <div class="header_middle" style="padding-top:7px;">
397 <span class="float-left" style="padding-left:34px;">[% l('Navigate Selected List ') %]</span>
398 <span class='float-left' style='padding-left: 10px;'>
399 [%- IF item_page > 1 -%]
400 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
401 item_page => item_page - 1
402 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
405 [%- IF (item_page - 3) >= 1 -%]
406 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
407 item_page => item_page - 3
408 }) %]'>[% item_page - 3 %]</a>
410 [%- IF (item_page - 2) >= 1 -%]
411 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
412 item_page => item_page - 2
413 }) %]'>[% item_page - 2 %]</a>
415 [%- IF (item_page - 1) >= 1 -%]
416 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
417 item_page => item_page - 1
418 }) %]'>[% item_page - 1%]</a>
420 <span class="bookbag-paginator-selected" >[% item_page %]</span>
421 [%- IF (item_page + 1) <= ctx.bb_page_count -%]
422 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
423 item_page => item_page + 1
424 }) %]'>[% item_page + 1 %]</a>
426 [%- IF (item_page + 2) <= ctx.bb_page_count -%]
427 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
428 item_page => item_page + 2
429 }) %]'>[% item_page + 2 %]</a>
431 [%- IF (item_page + 3) <= ctx.bb_page_count -%]
432 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
433 item_page => item_page + 3
434 }) %]'>[% item_page + 3 %]</a>
437 [%- IF (item_page + 1) <= ctx.bb_page_count; -%]
438 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
439 item_page => item_page + 1
440 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
444 <div class="clear-both"></div>
454 <span id='bb_publish_text' class='hide_me'>
455 [% l("Sharing a Bookbag means that the contents " _
456 "of the Bookbag will be visible to others. " _
457 "To see the public view of a shared Bookbag, " _
458 "click on the Bookbag's name in the Bookbag list.") %]