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 limit => limit, offset => (offset - limit)
72 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
74 [%- IF (ctx.bookbag_count - offset) > limit; -%]
75 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
76 limit => limit, offset => (offset + limit)
77 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
82 <div class="clear-both"></div>
84 <div id='acct_lists_prime'>
85 [% FOR bbag IN ctx.bookbags %]
86 <div class="bookbag-controls-holder">
87 <div class="bookbag-controls most">
88 [% baseurl = ctx.opac_root _ '/myopac/lists';
89 IF bbag.id != CGI.param("bbid");
90 url = mkurl(baseurl,{bbid => bbag.id, item_page => 1},['edit_notes','sort']);
91 ltitle = l("Show items in list");
93 url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
94 ltitle = l("Hide items in list");
96 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
97 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
100 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update', {}, 1) %]" method="post">
101 <div class="bookbag-controls">
102 <input type="hidden" name="action" value="add_rec" />
103 <input type="hidden" name="list" value="[% bbag.id %]" />
104 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
105 [% IF ctx.where_from %]
106 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
108 <input class="fixed" type="submit" value="[% l('Add to this list') %]" />
112 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
113 <div class="bookbag-share">
114 <input type="hidden" name="list" value="[% bbag.id %]" />
115 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
116 [% IF bbag.pub != 't' %]
117 <input type="hidden" name="action" value="show" />
118 <input class="fixed" type="submit" value="[% l('Share') %]" />
120 <input type="hidden" name="action" value="hide" />
121 <input class="fixed" type="submit" value="[% l('Hide') %]" />
125 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
126 <div class="bookbag-controls">
127 <input type="hidden" name="list" value="[% bbag.id %]" />
128 <input type="hidden" name="action" value="delete" />
129 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
130 <input type="submit" value="[% l('Delete List') %]" />
133 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="post">
134 <div class="bookbag-controls">
135 <input type="hidden" name="list" value="[% bbag.id %]" />
136 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
137 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
138 <input type="submit" value="[% l('Download CSV') %]" />
141 [% setting = 'opac.default_list'; %]
142 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
143 <div class="bookbag-controls">
144 <input type="hidden" name="list" value="[% bbag.id %]" />
145 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
146 [% IF ctx.user_setting_map.$setting == bbag.id %]
147 <input type="hidden" name="action" value="remove_default" />
148 <input type="submit" value="[% l('Remove Default List') %]" />
150 <input type="hidden" name="action" value="make_default" />
151 <input type="submit" value="[% l('Make Default List') %]" />
155 [% IF ctx.is_staff %]
156 <div class="bookbag-controls">
161 "oils://remote/xul/server/cat/bucketz39_dialog.xul";
163 xulG.url_prefix(path),
165 "width=800,height=500",
167 "[% ctx.authtoken %]",
168 "[% ctx.user.ws_ou %]",
172 value="[% l('Locate Z39.50 Matches') %]"
176 <div class="bookbag-controls">
177 [% IF bbag.pub == 't'; %]
178 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
179 alt="[% l('RSS Feed') %]" border="0"
180 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
183 <div class="bookbag-controls">
184 [% IF bbag.pub == 't'; %]
187 ctx.opac_root _ '/results',
188 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
191 -%]'>[% l('HTML View') %]</a>
194 <div class="clear-both pad-bottom-five"></div>
196 [% IF CGI.param("bbid") == bbag.id %]
197 <div class="bookbag-specific">
200 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
201 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
202 [% INCLUDE "opac/parts/filtersort.tt2"
203 value=CGI.param('sort') mode='bookbag' %]
204 <input type="hidden" name="bbid"
205 value="[% CGI.param('bbid') | html %]" />
206 <input type="submit" value="[% l('Sort') %]" />
211 <input type="hidden" name="bbid" value="[% bbag.id %]" />
212 <input type="hidden" name="action" value="editmeta" />
213 <input type="hidden" name="limit" value="[% limit %]" />
214 <input type="hidden" name="offset" value="[% offset %]" />
215 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
216 <table id="bbag-name-desc-form">
219 <label for="bbag-edit-name">[% l('Name:') %]</label>
222 <input name="name" type="text"
223 value="[% bbag.name | html %]"
224 id="bbag-edit-name" />
226 <td rowspan="2" class="saver">
227 [% l("Save changes to name or description?") %]<br />
228 <input type="submit" value="[% l('Save') %]" />
232 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
234 <textarea name="description"
235 id="bbag-edit-description">[% bbag.description | html %]</textarea>
242 <br class="clear-both" />
243 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
244 <input type="hidden" name="list" value="[% bbag.id %]" />
245 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
246 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
247 <thead id="acct_list_header">
249 <td class="list_checkbox">
250 <input type="checkbox" onclick="
251 var inputs=document.getElementsByTagName('input');
252 for (i = 0; i < inputs.length; i++) {
253 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
254 inputs[i].checked = this.checked;}"/>
257 <td class="list_entry">
258 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
260 <td class="list_entry">
261 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
263 <td class='list_entry'>
264 [% l('Local Call Number') %]
266 <td class="list_entry">
267 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'pubdate' ? 'pubdate.descending' : 'pubdate')}) %]">[% l('Publication Date') %]</a>
269 <td class="list_entry">
272 <td class="list_entry">
274 [% IF CGI.param("edit_notes") != bbag.id %]
275 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
278 <td class="list_actions">
279 <select name="action">
280 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
281 <option value="place_hold">[% l('Place hold') %]</option>
282 <option value="del_item">[% l('Remove from list') %]</option>
284 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
285 <input type="submit" value="[% l('Go') %]" />
290 [% UNLESS bbag.items.size %]
291 <tr><td colspan="6" class="list_is_empty">
292 [% l("This list contains no items.") %]
295 [% FOR item IN bbag.items;
296 rec_id = item.target_biblio_record_entry.id;
297 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
298 PROCESS get_marc_attrs args=attrs %]
299 <tr class="bookbag-item-row">
300 <td class="list_checkbox">
301 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
303 <td class="list_entry">
304 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
306 <td class="list_entry">
308 authorquery = attrs.author | replace('[,\.:;]', '');
309 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
310 -%]">[% attrs.author | html %]</a>
312 <td class="list_entry">
314 copy = attrs.holdings.0;
316 # only show a relevant call number
317 copy_org = ctx.get_aou_by_shortname(copy.owner);
318 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
320 ctx_org = ctx.get_aou(ctx_org);
321 IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
322 l('[_1] ([_2])', copy.label, copy_org.name) | html;
329 <td class="list_entry">
330 [% attrs.pubdate | html %]
332 <td class="list_entry">
333 [% attrs.format_label | html %]
335 [% IF CGI.param("edit_notes") == bbag.id %]
336 <td class="list_entry">
337 [% FOR note IN item.notes %]
338 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
340 <input type="text" name="item-[% item.id %]" />
343 <td class="list_entry">
344 [% FOR note IN item.notes %]
345 <div>[% note.note | html %]</div>
351 [% IF CGI.param("edit_notes") == bbag.id %]
353 <td colspan="3"><!-- All space left of notes column --></td>
354 <td class="save-notes">
355 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
356 <input type="hidden" name="bbid" value="[% CGI.param('bbid') | html %]" />
357 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
364 [% IF ctx.bb_page_count > 1; %]
365 <div class="header_middle" style="padding-top:7px;">
366 <span class="float-left" style="padding-left:34px;">[% l('Navigate Selected List ') %]</span>
367 <span class='float-left' style='padding-left: 10px;'>
368 [%- IF item_page > 1 -%]
369 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
370 item_page => item_page - 1
371 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
374 [%- IF (item_page - 3) >= 1 -%]
375 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
376 item_page => item_page - 3
377 }) %]'>[% item_page - 3 %]</a>
379 [%- IF (item_page - 2) >= 1 -%]
380 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
381 item_page => item_page - 2
382 }) %]'>[% item_page - 2 %]</a>
384 [%- IF (item_page - 1) >= 1 -%]
385 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
386 item_page => item_page - 1
387 }) %]'>[% item_page - 1%]</a>
389 <span class="bookbag-paginator-selected" >[% item_page %]</span>
390 [%- IF (item_page + 1) <= ctx.bb_page_count -%]
391 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
392 item_page => item_page + 1
393 }) %]'>[% item_page + 1 %]</a>
395 [%- IF (item_page + 2) <= ctx.bb_page_count -%]
396 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
397 item_page => item_page + 2
398 }) %]'>[% item_page + 2 %]</a>
400 [%- IF (item_page + 3) <= ctx.bb_page_count -%]
401 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
402 item_page => item_page + 3
403 }) %]'>[% item_page + 3 %]</a>
406 [%- IF (item_page + 1) <= ctx.bb_page_count; -%]
407 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
408 item_page => item_page + 1
409 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
413 <div class="clear-both"></div>
423 <span id='bb_publish_text' class='hide_me'>
424 [% l("Sharing a Bookbag means that the contents " _
425 "of the Bookbag will be visible to others. " _
426 "To see the public view of a shared Bookbag, " _
427 "click on the Bookbag's name in the Bookbag list.") %]