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;
8 <div id='myopac_bookbag_div' style="padding:5px;">
10 <!-- new list creation -->
11 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post" id="create_form">
12 <h1>[% l('Create New List') %]</h1><a name="createnewlist"></a>
13 <table cellpadding="0" border="0" id="list_create_table">
16 <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
19 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
20 <input id="list_create_name" type="text" name="name" />
21 <input type="hidden" name="action" value="create" />
23 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
25 [% IF ctx.where_from %]
26 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
30 <label for="list_create_shared">[% l('Share this list?') %]</label>
31 <select name="shared" id="list_create_shared">
32 <option value="0">[% l('No') %]
33 <option value="1">[% l('Yes') %]
35 <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
36 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
38 <td class="list-create-table-buttons">
40 value="[% l('Submit') %]"
41 alt="[% l('Submit') %]"
43
45 value="[% l('Cancel') %]"
46 alt="[% l('Cancel') %]"
47 class="opac-button" />
51 <td class="text-right-top">
52 <label for="list_description">[% l("List description (optional):") %]</label>
55 <textarea cols="40" rows="3" name="description"
56 id="list_description"></textarea>
61 <h1>[% l("My Existing Lists") %]</h1>
62 [% INCLUDE "opac/parts/anon_list.tt2" %]
63 [% IF ctx.bookbags.size %]
64 <div class="header_middle">
65 <span class="float-left">[% l('Saved Lists') %]</span>
66 [% IF limit < ctx.bookbag_count; %]
67 <span class='float-left' style='padding-left: 10px;'>
69 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
70 limit => limit, offset => (offset - limit)
71 }) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
73 [%- IF (ctx.bookbag_count - offset) > limit; -%]
74 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
75 limit => limit, offset => (offset + limit)
76 }) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
81 <div class="clear-both"></div>
83 <div id='acct_lists_prime'>
84 [% FOR bbag IN ctx.bookbags %]
85 <div class="bookbag-controls-holder">
86 <div class="bookbag-controls most">
87 [% baseurl = ctx.opac_root _ '/myopac/lists';
88 IF bbag.id != CGI.param("bbid");
89 url = mkurl(baseurl,{bbid => bbag.id},['edit_notes','sort']);
90 ltitle = l("Show items in list");
92 url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
93 ltitle = l("Hide items in list");
95 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
96 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
99 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update', {}, 1) %]" method="post">
100 <div class="bookbag-controls">
101 <input type="hidden" name="action" value="add_rec" />
102 <input type="hidden" name="list" value="[% bbag.id %]" />
103 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
104 [% IF ctx.where_from %]
105 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
107 <input class="fixed" type="submit" value="[% l('Add to this list') %]" />
111 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
112 <div class="bookbag-share">
113 <input type="hidden" name="list" value="[% bbag.id %]" />
114 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
115 [% IF bbag.pub != 't' %]
116 <input type="hidden" name="action" value="show" />
117 <input class="fixed" type="submit" value="[% l('Share') %]" />
119 <input type="hidden" name="action" value="hide" />
120 <input class="fixed" type="submit" value="[% l('Hide') %]" />
124 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
125 <div class="bookbag-controls">
126 <input type="hidden" name="list" value="[% bbag.id %]" />
127 <input type="hidden" name="action" value="delete" />
128 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
129 <input type="submit" value="[% l('Delete List') %]" />
132 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="post">
133 <div class="bookbag-controls">
134 <input type="hidden" name="list" value="[% bbag.id %]" />
135 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
136 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
137 <input type="submit" value="[% l('Download CSV') %]" />
140 [% setting = 'opac.default_list'; %]
141 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
142 <div class="bookbag-controls">
143 <input type="hidden" name="list" value="[% bbag.id %]" />
144 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
145 [% IF ctx.user_setting_map.$setting == bbag.id %]
146 <input type="hidden" name="action" value="remove_default" />
147 <input type="submit" value="[% l('Remove Default List') %]" />
149 <input type="hidden" name="action" value="make_default" />
150 <input type="submit" value="[% l('Make Default List') %]" />
154 [% IF ctx.is_staff %]
155 <div class="bookbag-controls">
160 "oils://remote/xul/server/cat/bucketz39_dialog.xul";
162 xulG.url_prefix(path),
164 "width=800,height=500",
166 "[% ctx.authtoken %]",
167 "[% ctx.user.ws_ou %]",
171 value="[% l('Locate Z39.59 Matches') %]"
175 <div class="bookbag-controls">
176 [% IF bbag.pub == 't'; %]
177 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
178 alt="[% l('RSS Feed') %]" border="0"
179 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
182 <div class="bookbag-controls">
183 [% IF bbag.pub == 't'; %]
186 ctx.opac_root _ '/results',
187 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
190 -%]'>[% l('HTML View') %]</a>
193 <div class="clear-both pad-bottom-five"></div>
195 [% IF CGI.param("bbid") == bbag.id %]
196 <div class="bookbag-specific">
199 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
200 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
201 [% INCLUDE "opac/parts/filtersort.tt2"
202 value=CGI.param('sort') mode='bookbag' %]
203 <input type="hidden" name="bbid"
204 value="[% CGI.param('bbid') | html %]" />
205 <input type="submit" value="[% l('Sort') %]" />
210 <input type="hidden" name="bbid" value="[% bbag.id %]" />
211 <input type="hidden" name="action" value="editmeta" />
212 <input type="hidden" name="limit" value="[% limit %]" />
213 <input type="hidden" name="offset" value="[% offset %]" />
214 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
215 <table id="bbag-name-desc-form">
218 <label for="bbag-edit-name">[% l('Name:') %]</label>
221 <input name="name" type="text"
222 value="[% bbag.name | html %]"
223 id="bbag-edit-name" />
225 <td rowspan="2" class="saver">
226 [% l("Save changes to name or description?") %]<br />
227 <input type="submit" value="[% l('Save') %]" />
231 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
233 <textarea name="description"
234 id="bbag-edit-description">[% bbag.description | html %]</textarea>
241 <br class="clear-both" />
242 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
243 <input type="hidden" name="list" value="[% bbag.id %]" />
244 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
245 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
246 <thead id="acct_list_header">
248 <td class="list_checkbox">
249 <input type="checkbox" onclick="
250 var inputs=document.getElementsByTagName('input');
251 for (i = 0; i < inputs.length; i++) {
252 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
253 inputs[i].checked = this.checked;}"/>
256 <td class="list_entry">
257 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
259 <td class="list_entry">
260 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
262 <td class='list_entry'>
263 [% l('Local Call Number') %]
265 <td class="list_entry">
266 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'pubdate' ? 'pubdate.descending' : 'pubdate')}) %]">[% l('Publication Date') %]</a>
268 <td class="list_entry">
271 <td class="list_entry">
273 [% IF CGI.param("edit_notes") != bbag.id %]
274 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
277 <td class="list_actions">
278 <select name="action">
279 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
280 <option value="place_hold">[% l('Place hold') %]</option>
281 <option value="del_item">[% l('Remove from list') %]</option>
283 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
284 <input type="submit" value="[% l('Go') %]" />
289 [% UNLESS bbag.items.size %]
290 <tr><td colspan="6" class="list_is_empty">
291 [% l("This list contains no items.") %]
294 [% FOR item IN bbag.items;
295 rec_id = item.target_biblio_record_entry.id;
296 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
297 PROCESS get_marc_attrs args=attrs %]
298 <tr class="bookbag-item-row">
299 <td class="list_checkbox">
300 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
302 <td class="list_entry">
303 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
305 <td class="list_entry">
307 authorquery = attrs.author | replace('[,\.:;]', '');
308 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
309 -%]">[% attrs.author | html %]</a>
311 <td class="list_entry">
313 copy = attrs.holdings.0;
315 # only show a relevant call number
316 copy_org = ctx.get_aou_by_shortname(copy.owner);
317 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
319 ctx_org = ctx.get_aou(ctx_org);
320 IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
321 l('[_1] ([_2])', copy.label, copy_org.name) | html;
328 <td class="list_entry">
329 [% attrs.pubdate | html %]
331 <td class="list_entry">
332 [% attrs.format_label | html %]
334 [% IF CGI.param("edit_notes") == bbag.id %]
335 <td class="list_entry">
336 [% FOR note IN item.notes %]
337 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
339 <input type="text" name="item-[% item.id %]" />
342 <td class="list_entry">
343 [% FOR note IN item.notes %]
344 <div>[% note.note | html %]</div>
350 [% IF CGI.param("edit_notes") == bbag.id %]
352 <td colspan="3"><!-- All space left of notes column --></td>
353 <td class="save-notes">
354 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
355 <input type="hidden" name="bbid" value="[% CGI.param('bbid') | html %]" />
356 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
368 <span id='bb_publish_text' class='hide_me'>
369 [% |l %]Sharing a Bookbag means that the contents
370 of the Bookbag will be visible to others.
371 To see the public view of a shared Bookbag,
372 click on the Bookbag's name in the Bookbag list.[% END %]