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 <div id='myopac_bookbag_div' style="padding:5px;">
16 <!-- new list creation -->
17 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post" id="create_form">
18 <h1>[% l('Create New List') %]</h1><a name="createnewlist"></a>
19 <table class="table_no_cell_pad" id="list_create_table">
22 <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
25 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
26 <input id="list_create_name" type="text" name="name" />
27 <input type="hidden" name="action" value="create" />
29 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
31 [% IF ctx.where_from %]
32 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
36 <label for="list_create_shared">[% l('Share this list?') %]</label>
37 <select name="shared" id="list_create_shared">
38 <option value="0">[% l('No') %]
39 <option value="1">[% l('Yes') %]
41 <a href="javascript:void(0);"
42 onclick="alert('[% bb_publish_text %]')">
43 <img alt="[% l('Sharing Help') %]"
44 [% html_text_attr('title', bb_publish_text) %]
45 src="[% ctx.media_prefix %]/images/question-mark.png" />
48 <td class="list-create-table-buttons">
50 value="[% l('Submit') %]"
51 alt="[% l('Submit') %]"
53
55 value="[% l('Cancel') %]"
56 alt="[% l('Cancel') %]"
57 class="opac-button" />
61 <td class="text-right-top">
62 <label for="list_description">[% l("List description (optional):") %]</label>
65 <textarea cols="40" rows="3" name="description"
66 id="list_description"></textarea>
71 <h1>[% l("My Existing Lists") %]</h1>
72 [% INCLUDE "opac/parts/anon_list.tt2" %]
73 [% IF ctx.bookbags.size %]
74 <div class="header_middle">
75 <span class="float-left">[% l('Saved Lists') %]</span>
76 [% IF limit < ctx.bookbag_count; %]
77 <span class='float-left' style='padding-left: 10px;'>
79 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
80 offset => (offset - limit)
81 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
83 [%- IF (offset - (limit * 3)) >= 0 -%]
84 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
85 offset => (offset - (limit * 3))
86 }) %]'>[% ((offset - (limit * 3)) / limit) + 1 %]</a>
88 [%- IF (offset - (limit * 2)) >= 0 -%]
89 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
90 offset => (offset - (limit * 2))
91 }) %]'>[% ((offset - (limit * 2)) / limit) + 1 %]</a>
93 [%- IF (offset - limit) >= 0 -%]
94 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
95 offset => (offset - limit)
96 }) %]'>[% ((offset - limit) / limit) + 1 %]</a>
98 <span class="bookbag-paginator-selected" >[% (offset / limit) + 1 %]</span>
99 [%- IF (offset + limit) < ctx.bookbag_count -%]
100 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
101 offset => (offset + limit)
102 }) %]'>[% ((offset + limit) / limit) + 1 %]</a>
104 [%- IF (offset + (limit * 2)) < ctx.bookbag_count -%]
105 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
106 offset => (offset + (limit * 2))
107 }) %]'>[% ((offset + (limit * 2)) / limit) + 1 %]</a>
109 [%- IF (offset + (limit * 3)) < ctx.bookbag_count -%]
110 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
111 offset => (offset + (limit * 3))
112 }) %]'>[% ((offset + (limit * 3)) / limit) + 1 %]</a>
114 [%- IF (ctx.bookbag_count - offset) > limit; -%]
115 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
116 offset => (offset + limit)
117 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
122 <div class="clear-both"></div>
124 <div id='acct_lists_prime'>
125 [% FOR bbag IN ctx.bookbags %]
126 <div class="bookbag-controls-holder">
127 <div class="bookbag-controls most">
128 [% baseurl = ctx.opac_root _ '/myopac/lists';
129 IF bbag.id != CGI.param("bbid");
130 url = mkurl(baseurl,{bbid => bbag.id, item_page => 1},['edit_notes','sort']);
131 ltitle = l("Show items in list");
133 url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
134 ltitle = l("Hide items in list");
136 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
137 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
140 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update', {}, 1) %]" method="post">
141 <div class="bookbag-controls">
142 <input type="hidden" name="action" value="add_rec" />
143 <input type="hidden" name="list" value="[% bbag.id %]" />
144 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
145 [% IF ctx.where_from %]
146 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
148 <input class="fixed" type="submit" value="[% l('Add to this list') %]" />
152 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
153 <div class="bookbag-share">
154 <input type="hidden" name="list" value="[% bbag.id %]" />
155 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
156 [% IF bbag.pub != 't' %]
157 <input type="hidden" name="action" value="show" />
158 <input class="fixed" type="submit" value="[% l('Share') %]" />
160 <input type="hidden" name="action" value="hide" />
161 <input class="fixed" type="submit" value="[% l('Hide') %]" />
165 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post" onsubmit="return confirm('[% l('Do you really want to delete this list?') %]')">
166 <div class="bookbag-controls">
167 <input type="hidden" name="list" value="[% bbag.id %]" />
168 <input type="hidden" name="action" value="delete" />
169 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
170 <input type="submit" value="[% l('Delete List') %]" />
173 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="post">
174 <div class="bookbag-controls">
175 <input type="hidden" name="list" value="[% bbag.id %]" />
176 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
177 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
178 <input type="submit" value="[% l('Download CSV') %]" />
181 [% setting = 'opac.default_list'; %]
182 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
183 <div class="bookbag-controls">
184 <input type="hidden" name="list" value="[% bbag.id %]" />
185 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
186 [% IF ctx.user_setting_map.$setting == bbag.id %]
187 <input type="hidden" name="action" value="remove_default" />
188 <input type="submit" value="[% l('Remove Default List') %]" />
190 <input type="hidden" name="action" value="make_default" />
191 <input type="submit" value="[% l('Make Default List') %]" />
195 [% IF ctx.is_staff %]
196 <div class="bookbag-controls">
201 "oils://remote/xul/server/cat/bucketz39_dialog.xul";
203 xulG.url_prefix(path),
205 "width=800,height=500",
207 "[% ctx.authtoken %]",
208 "[% ctx.user.ws_ou %]",
212 value="[% l('Locate Z39.50 Matches') %]"
216 <div class="bookbag-controls">
217 [% IF bbag.pub == 't'; %]
218 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
219 alt="[% l('RSS Feed') %]" border="0"
220 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
223 <div class="bookbag-controls">
224 [% IF bbag.pub == 't'; %]
227 ctx.opac_root _ '/results',
228 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
231 -%]'>[% l('HTML View') %]</a>
234 <div class="clear-both pad-bottom-five"></div>
236 [% IF CGI.param("bbid") == bbag.id %]
237 <div class="bookbag-specific">
240 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
241 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
242 [% INCLUDE "opac/parts/filtersort.tt2"
243 value=CGI.param('sort') mode='bookbag' %]
244 <input type="hidden" name="bbid"
245 value="[% CGI.param('bbid') | html %]" />
246 <input type="submit" value="[% l('Sort') %]" />
251 <input type="hidden" name="bbid" value="[% bbag.id %]" />
252 <input type="hidden" name="action" value="editmeta" />
253 <input type="hidden" name="limit" value="[% limit %]" />
254 <input type="hidden" name="offset" value="[% offset %]" />
255 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
256 <table id="bbag-name-desc-form">
259 <label for="bbag-edit-name">[% l('Name:') %]</label>
262 <input name="name" type="text"
263 value="[% bbag.name | html %]"
264 id="bbag-edit-name" />
266 <td rowspan="2" class="saver">
267 [% l("Save changes to name or description?") %]<br />
268 <input type="submit" value="[% l('Save') %]" />
272 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
274 <textarea name="description"
275 id="bbag-edit-description">[% bbag.description | html %]</textarea>
282 <br class="clear-both" />
283 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
284 <input type="hidden" name="list" value="[% bbag.id %]" />
285 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
286 <table class="bookbag-specific table_no_cell_pad table_no_border_space table_no_border">
287 <thead id="acct_list_header">
289 <td class="list_checkbox">
290 <input type="checkbox"
291 onclick="var inputs=document.getElementsByTagName('input');
292 for (i = 0; i < inputs.length; i++) {
293 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
294 inputs[i].checked = this.checked;}"/>
297 <td class="list_entry">
298 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
300 <td class="list_entry">
301 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
303 <td class='list_entry'>
304 [% l('Local Call Number') %]
306 <td class="list_entry">
307 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'pubdate' ? 'pubdate.descending' : 'pubdate')}) %]">[% l('Publication Date') %]</a>
309 <td class="list_entry">
312 <td class="list_entry">
314 [% IF CGI.param("edit_notes") != bbag.id %]
315 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
318 <td class="list_actions">
319 <select name="action">
320 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
321 <option value="place_hold">[% l('Place hold') %]</option>
322 <option value="del_item">[% l('Remove from list') %]</option>
324 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
325 <input type="submit" value="[% l('Go') %]" />
330 [% UNLESS bbag.items.size %]
331 <tr><td colspan="6" class="list_is_empty">
332 [% l("This list contains no items.") %]
335 [% FOR item IN bbag.items;
336 rec_id = item.target_biblio_record_entry.id;
337 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
338 PROCESS get_marc_attrs args=attrs %]
339 <tr class="bookbag-item-row">
340 <td class="list_checkbox">
341 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
343 <td class="list_entry">
344 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
346 <td class="list_entry">
348 authorquery = attrs.author | replace('[,\.:;]', '');
349 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
350 -%]">[% attrs.author | html %]</a>
352 <td class="list_entry">
354 copy = attrs.holdings.0;
356 # only show a relevant call number
357 copy_org = ctx.get_aou_by_shortname(copy.owner);
358 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
360 ctx_org = ctx.get_aou(ctx_org);
361 IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
362 l('[_1] ([_2])', copy.label, copy_org.name) | html;
369 <td class="list_entry">
370 [% attrs.pubdate | html %]
372 <td class="list_entry">
373 [% attrs.format_label | html %]
375 [% IF CGI.param("edit_notes") == bbag.id %]
376 <td class="list_entry">
377 [% FOR note IN item.notes %]
378 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
380 <input type="text" name="item-[% item.id %]" />
383 <td class="list_entry">
384 [% FOR note IN item.notes %]
385 <div>[% note.note | html %]</div>
391 [% IF CGI.param("edit_notes") == bbag.id %]
393 <td colspan="3"><!-- All space left of notes column --></td>
394 <td class="save-notes">
395 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
396 <input type="hidden" name="bbid" value="[% CGI.param('bbid') | html %]" />
397 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
404 [% IF ctx.bb_page_count > 1; %]
405 <div class="header_middle" style="padding-top:7px;">
406 <span class="float-left" style="padding-left:34px;">[% l('Navigate Selected List ') %]</span>
407 <span class='float-left' style='padding-left: 10px;'>
408 [%- IF item_page > 1 -%]
409 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
410 item_page => item_page - 1
411 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
414 [%- IF (item_page - 3) >= 1 -%]
415 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
416 item_page => item_page - 3
417 }) %]'>[% item_page - 3 %]</a>
419 [%- IF (item_page - 2) >= 1 -%]
420 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
421 item_page => item_page - 2
422 }) %]'>[% item_page - 2 %]</a>
424 [%- IF (item_page - 1) >= 1 -%]
425 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
426 item_page => item_page - 1
427 }) %]'>[% item_page - 1%]</a>
429 <span class="bookbag-paginator-selected" >[% item_page %]</span>
430 [%- IF (item_page + 1) <= ctx.bb_page_count -%]
431 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
432 item_page => item_page + 1
433 }) %]'>[% item_page + 1 %]</a>
435 [%- IF (item_page + 2) <= ctx.bb_page_count -%]
436 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
437 item_page => item_page + 2
438 }) %]'>[% item_page + 2 %]</a>
440 [%- IF (item_page + 3) <= ctx.bb_page_count -%]
441 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
442 item_page => item_page + 3
443 }) %]'>[% item_page + 3 %]</a>
446 [%- IF (item_page + 1) <= ctx.bb_page_count; -%]
447 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
448 item_page => item_page + 1
449 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
453 <div class="clear-both"></div>