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("Your 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 <div class="bookbag-controls">
155 [% IF bbag.pub == 't'; %]
156 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
157 alt="[% l('RSS Feed') %]" border="0"
158 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
161 <div class="bookbag-controls">
162 [% IF bbag.pub == 't'; %]
165 ctx.opac_root _ '/results',
166 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
169 -%]'>[% l('HTML View') %]</a>
172 <div class="clear-both pad-bottom-five"></div>
174 [% IF CGI.param("bbid") == bbag.id %]
175 <div class="bookbag-specific">
178 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
179 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
180 [% INCLUDE "opac/parts/filtersort.tt2"
181 value=CGI.param('sort') mode='bookbag' %]
182 <input type="hidden" name="bbid"
183 value="[% CGI.param('bbid') | html %]" />
184 <input type="submit" value="[% l('Sort') %]" />
189 <input type="hidden" name="bbid" value="[% bbag.id %]" />
190 <input type="hidden" name="action" value="editmeta" />
191 <input type="hidden" name="limit" value="[% limit %]" />
192 <input type="hidden" name="offset" value="[% offset %]" />
193 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
194 <table id="bbag-name-desc-form">
197 <label for="bbag-edit-name">[% l('Name:') %]</label>
200 <input name="name" type="text"
201 value="[% bbag.name | html %]"
202 id="bbag-edit-name" />
204 <td rowspan="2" class="saver">
205 [% l("Save changes to name or description?") %]<br />
206 <input type="submit" value="[% l('Save') %]" />
210 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
212 <textarea name="description"
213 id="bbag-edit-description">[% bbag.description | html %]</textarea>
220 <br class="clear-both" />
221 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="post">
222 <input type="hidden" name="list" value="[% bbag.id %]" />
223 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
224 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
225 <thead id="acct_list_header">
227 <td class="list_checkbox">
228 <input type="checkbox" onclick="
229 var inputs=document.getElementsByTagName('input');
230 for (i = 0; i < inputs.length; i++) {
231 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
232 inputs[i].checked = this.checked;}"/>
235 <td class="list_entry">
236 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
238 <td class="list_entry">
239 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
241 <td class="list_entry">
242 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'pubdate' ? 'pubdate.descending' : 'pubdate')}) %]">[% l('Publication Date') %]</a>
244 <td class="list_entry">
247 <td class="list_entry">
249 [% IF CGI.param("edit_notes") != bbag.id %]
250 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
253 <td class="list_actions">
254 <select name="action">
255 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
256 <option value="place_hold">[% l('Place hold') %]</option>
257 <option value="del_item">[% l('Remove from list') %]</option>
259 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
260 <input type="submit" value="[% l('Go') %]" />
265 [% UNLESS bbag.items.size %]
266 <tr><td colspan="6" class="list_is_empty">
267 [% l("This list contains no items.") %]
270 [% FOR item IN bbag.items;
271 rec_id = item.target_biblio_record_entry.id;
272 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
273 PROCESS get_marc_attrs args=attrs %]
274 <tr class="bookbag-item-row">
275 <td class="list_checkbox">
276 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
278 <td class="list_entry">
279 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
281 <td class="list_entry">
283 authorquery = attrs.author | replace('[,\.:;]', '');
284 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
285 -%]">[% attrs.author | html %]</a>
287 <td class="list_entry">
288 [% attrs.pubdate | html %]
290 <td class="list_entry">
291 [% attrs.format_label | html %]
293 [% IF CGI.param("edit_notes") == bbag.id %]
294 <td class="list_entry">
295 [% FOR note IN item.notes %]
296 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
298 <input type="text" name="item-[% item.id %]" />
301 <td class="list_entry">
302 [% FOR note IN item.notes %]
303 <div>[% note.note | html %]</div>
309 [% IF CGI.param("edit_notes") == bbag.id %]
311 <td colspan="3"><!-- All space left of notes column --></td>
312 <td class="save-notes">
313 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
314 <input type="hidden" name="bbid" value="[% CGI.param('bbid') | html %]" />
315 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
327 <span id='bb_publish_text' class='hide_me'>
328 [% |l %]Sharing a Bookbag means that the contents
329 of the Bookbag will be visible to others.
330 To see the public view of a shared Bookbag,
331 click on the Bookbag's name in the Bookbag list.[% END %]