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 cellpadding="0" border="0" 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">
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') %]"
162 onClick="if(confirm('[% l('Do you really want to delete this list?') %]')) return true; return false"
166 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="post">
167 <div class="bookbag-controls">
168 <input type="hidden" name="list" value="[% bbag.id %]" />
169 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
170 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
171 <input type="submit" value="[% l('Download CSV') %]" />
174 [% setting = 'opac.default_list'; %]
175 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
176 <div class="bookbag-controls">
177 <input type="hidden" name="list" value="[% bbag.id %]" />
178 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
179 [% IF ctx.user_setting_map.$setting == bbag.id %]
180 <input type="hidden" name="action" value="remove_default" />
181 <input type="submit" value="[% l('Remove Default List') %]" />
183 <input type="hidden" name="action" value="make_default" />
184 <input type="submit" value="[% l('Make Default List') %]" />
188 [% IF ctx.is_staff %]
189 <div class="bookbag-controls">
194 "oils://remote/xul/server/cat/bucketz39_dialog.xul";
196 xulG.url_prefix(path),
198 "width=800,height=500",
200 "[% ctx.authtoken %]",
201 "[% ctx.user.ws_ou %]",
205 value="[% l('Locate Z39.50 Matches') %]"
209 <div class="bookbag-controls">
210 [% IF bbag.pub == 't'; %]
211 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
212 alt="[% l('RSS Feed') %]" border="0"
213 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
216 <div class="bookbag-controls">
217 [% IF bbag.pub == 't'; %]
220 ctx.opac_root _ '/results',
221 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
224 -%]'>[% l('HTML View') %]</a>
227 <div class="clear-both pad-bottom-five"></div>
229 [% IF CGI.param("bbid") == bbag.id %]
230 <div class="bookbag-specific">
233 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
234 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
235 [% INCLUDE "opac/parts/filtersort.tt2"
236 value=CGI.param('sort') mode='bookbag' %]
237 <input type="hidden" name="bbid"
238 value="[% CGI.param('bbid') | html %]" />
239 <input type="submit" value="[% l('Sort') %]" />
244 <input type="hidden" name="bbid" value="[% bbag.id %]" />
245 <input type="hidden" name="action" value="editmeta" />
246 <input type="hidden" name="limit" value="[% limit %]" />
247 <input type="hidden" name="offset" value="[% offset %]" />
248 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
249 <table id="bbag-name-desc-form">
252 <label for="bbag-edit-name">[% l('Name:') %]</label>
255 <input name="name" type="text"
256 value="[% bbag.name | html %]"
257 id="bbag-edit-name" />
259 <td rowspan="2" class="saver">
260 [% l("Save changes to name or description?") %]<br />
261 <input type="submit" value="[% l('Save') %]" />
265 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
267 <textarea name="description"
268 id="bbag-edit-description">[% bbag.description | html %]</textarea>
275 <br class="clear-both" />
276 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
277 <input type="hidden" name="list" value="[% bbag.id %]" />
278 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
279 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
280 <thead id="acct_list_header">
282 <td class="list_checkbox">
283 <input type="checkbox" onclick="
284 var inputs=document.getElementsByTagName('input');
285 for (i = 0; i < inputs.length; i++) {
286 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
287 inputs[i].checked = this.checked;}"/>
290 <td class="list_entry">
291 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
293 <td class="list_entry">
294 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
296 <td class='list_entry'>
297 [% l('Local Call Number') %]
299 <td class="list_entry">
300 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'pubdate' ? 'pubdate.descending' : 'pubdate')}) %]">[% l('Publication Date') %]</a>
302 <td class="list_entry">
305 <td class="list_entry">
307 [% IF CGI.param("edit_notes") != bbag.id %]
308 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
311 <td class="list_actions">
312 <select name="action">
313 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
314 <option value="place_hold">[% l('Place hold') %]</option>
315 <option value="del_item">[% l('Remove from list') %]</option>
317 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
318 <input type="submit" value="[% l('Go') %]" />
323 [% UNLESS bbag.items.size %]
324 <tr><td colspan="6" class="list_is_empty">
325 [% l("This list contains no items.") %]
328 [% FOR item IN bbag.items;
329 rec_id = item.target_biblio_record_entry.id;
330 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
331 PROCESS get_marc_attrs args=attrs %]
332 <tr class="bookbag-item-row">
333 <td class="list_checkbox">
334 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
336 <td class="list_entry">
337 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
339 <td class="list_entry">
341 authorquery = attrs.author | replace('[,\.:;]', '');
342 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
343 -%]">[% attrs.author | html %]</a>
345 <td class="list_entry">
347 copy = attrs.holdings.0;
349 # only show a relevant call number
350 copy_org = ctx.get_aou_by_shortname(copy.owner);
351 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
353 ctx_org = ctx.get_aou(ctx_org);
354 IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
355 l('[_1] ([_2])', copy.label, copy_org.name) | html;
362 <td class="list_entry">
363 [% attrs.pubdate | html %]
365 <td class="list_entry">
366 [% attrs.format_label | html %]
368 [% IF CGI.param("edit_notes") == bbag.id %]
369 <td class="list_entry">
370 [% FOR note IN item.notes %]
371 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
373 <input type="text" name="item-[% item.id %]" />
376 <td class="list_entry">
377 [% FOR note IN item.notes %]
378 <div>[% note.note | html %]</div>
384 [% IF CGI.param("edit_notes") == bbag.id %]
386 <td colspan="3"><!-- All space left of notes column --></td>
387 <td class="save-notes">
388 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
389 <input type="hidden" name="bbid" value="[% CGI.param('bbid') | html %]" />
390 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
397 [% IF ctx.bb_page_count > 1; %]
398 <div class="header_middle" style="padding-top:7px;">
399 <span class="float-left" style="padding-left:34px;">[% l('Navigate Selected List ') %]</span>
400 <span class='float-left' style='padding-left: 10px;'>
401 [%- IF item_page > 1 -%]
402 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
403 item_page => item_page - 1
404 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
407 [%- IF (item_page - 3) >= 1 -%]
408 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
409 item_page => item_page - 3
410 }) %]'>[% item_page - 3 %]</a>
412 [%- IF (item_page - 2) >= 1 -%]
413 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
414 item_page => item_page - 2
415 }) %]'>[% item_page - 2 %]</a>
417 [%- IF (item_page - 1) >= 1 -%]
418 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
419 item_page => item_page - 1
420 }) %]'>[% item_page - 1%]</a>
422 <span class="bookbag-paginator-selected" >[% item_page %]</span>
423 [%- IF (item_page + 1) <= ctx.bb_page_count -%]
424 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
425 item_page => item_page + 1
426 }) %]'>[% item_page + 1 %]</a>
428 [%- IF (item_page + 2) <= ctx.bb_page_count -%]
429 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
430 item_page => item_page + 2
431 }) %]'>[% item_page + 2 %]</a>
433 [%- IF (item_page + 3) <= ctx.bb_page_count -%]
434 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
435 item_page => item_page + 3
436 }) %]'>[% item_page + 3 %]</a>
439 [%- IF (item_page + 1) <= ctx.bb_page_count; -%]
440 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
441 item_page => item_page + 1
442 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
446 <div class="clear-both"></div>
456 <span id='bb_publish_text' class='hide_me'>
457 [% l("Sharing a Bookbag means that the contents " _
458 "of the Bookbag will be visible to others. " _
459 "To see the public view of a shared Bookbag, " _
460 "click on the Bookbag's name in the Bookbag list.") %]