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;'>
68 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {limit => limit, offset => (offset - limit)}) %]'
69 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
70 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {limit => limit, offset => (offset + limit)}) %]'
71 [% IF ctx.bookbags.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
75 <div class="clear-both"></div>
77 <div id='acct_lists_prime'>
78 [% FOR bbag IN ctx.bookbags %]
79 <div class="bookbag-controls-holder">
80 <div class="bookbag-controls most">
81 [% baseurl = ctx.opac_root _ '/myopac/lists';
82 IF bbag.id != CGI.param("bbid");
83 url = mkurl(baseurl,{bbid => bbag.id},['edit_notes','sort']);
84 ltitle = l("Show items in list");
86 url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
87 ltitle = l("Hide items in list");
89 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
90 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
93 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update', {}, 1) %]" method="POST">
94 <div class="bookbag-controls">
95 <input type="hidden" name="action" value="add_rec" />
96 <input type="hidden" name="list" value="[% bbag.id %]" />
97 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
98 [% IF ctx.where_from %]
99 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
101 <input class="fixed" type="submit" value="[% l('Add to this list') %]" />
105 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
106 <div class="bookbag-share">
107 <input type="hidden" name="list" value="[% bbag.id %]" />
108 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
109 [% IF bbag.pub != 't' %]
110 <input type="hidden" name="action" value="show" />
111 <input class="fixed" type="submit" value="[% l('Share') %]" />
113 <input type="hidden" name="action" value="hide" />
114 <input class="fixed" type="submit" value="[% l('Hide') %]" />
118 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
119 <div class="bookbag-controls">
120 <input type="hidden" name="list" value="[% bbag.id %]" />
121 <input type="hidden" name="action" value="delete" />
122 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
123 <input type="submit" value="[% l('Delete List') %]" />
126 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="POST">
127 <div class="bookbag-controls">
128 <input type="hidden" name="list" value="[% bbag.id %]" />
129 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
130 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
131 <input type="submit" value="[% l('Download CSV') %]" />
134 [% setting = 'opac.default_list'; %]
135 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
136 <div class="bookbag-controls">
137 <input type="hidden" name="list" value="[% bbag.id %]" />
138 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
139 [% IF ctx.user_setting_map.$setting == bbag.id %]
140 <input type="hidden" name="action" value="remove_default" />
141 <input type="submit" value="[% l('Remove Default List') %]" />
143 <input type="hidden" name="action" value="make_default" />
144 <input type="submit" value="[% l('Make Default List') %]" />
148 <div class="bookbag-controls">
149 [% IF bbag.pub == 't'; %]
150 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
151 alt="[% l('RSS Feed') %]" border="0"
152 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
155 <div class="bookbag-controls">
156 [% IF bbag.pub == 't'; %]
159 ctx.opac_root _ '/results',
160 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
163 -%]'>[% l('HTML View') %]</a>
166 <div class="clear-both pad-bottom-five"></div>
168 [% IF CGI.param("bbid") == bbag.id %]
169 <div class="bookbag-specific">
172 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
173 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
174 [% INCLUDE "opac/parts/filtersort.tt2"
175 value=CGI.param('sort') mode='bookbag' %]
176 <input type="hidden" name="bbid"
177 value="[% CGI.param('bbid') | html %]" />
178 <input type="submit" value="[% l('Sort') %]" />
183 <input type="hidden" name="bbid" value="[% bbag.id %]" />
184 <input type="hidden" name="action" value="editmeta" />
185 <input type="hidden" name="limit" value="[% limit %]" />
186 <input type="hidden" name="offset" value="[% offset %]" />
187 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
188 <table id="bbag-name-desc-form">
191 <label for="bbag-edit-name">[% l('Name:') %]</label>
194 <input name="name" type="text"
195 value="[% bbag.name | html %]"
196 id="bbag-edit-name" />
198 <td rowspan="2" class="saver">
199 [% l("Save changes to name or description?") %]<br />
200 <input type="submit" value="[% l('Save') %]" />
204 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
206 <textarea name="description"
207 id="bbag-edit-description">[% bbag.description | html %]</textarea>
214 <br class="clear-both" />
215 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
216 <input type="hidden" name="list" value="[% bbag.id %]" />
217 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
218 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
219 <thead id="acct_list_header">
221 <td class="list_checkbox">
222 <input type="checkbox" onclick="
223 var inputs=document.getElementsByTagName('input');
224 for (i = 0; i < inputs.length; i++) {
225 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
226 inputs[i].checked = this.checked;}"/>
229 <td class="list_entry">
230 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
232 <td class="list_entry">
233 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
235 <td class="list_entry">
237 [% IF CGI.param("edit_notes") != bbag.id %]
238 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
241 <td class="list_actions">
242 <select name="action">
243 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
244 <option value="place_hold">[% l('Place hold') %]</option>
245 <option value="del_item">[% l('Remove from list') %]</option>
247 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
248 <input type="submit" value="[% l('Go') %]" />
253 [% UNLESS bbag.items.size %]
254 <tr><td colspan="4" class="list_is_empty">
255 [% l("This list contains no items.") %]
258 [% FOR item IN bbag.items;
259 rec_id = item.target_biblio_record_entry.id;
260 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
261 PROCESS get_marc_attrs args=attrs %]
262 <tr class="bookbag-item-row">
263 <td class="list_checkbox">
264 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
266 <td class="list_entry">
267 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
269 <td class="list_entry">
271 authorquery = attrs.author | replace('[,\.:;]', '');
272 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
273 -%]">[% attrs.author | html %]</a>
274 [% IF CGI.param("edit_notes") == bbag.id %]
275 <td class="list_entry">
276 [% FOR note IN item.notes %]
277 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
279 <input type="text" name="item-[% item.id %]" />
282 <td class="list_entry">
283 [% FOR note IN item.notes %]
284 <div>[% note.note | html %]</div>
290 [% IF CGI.param("edit_notes") == bbag.id %]
292 <td colspan="3"><!-- All space left of notes column --></td>
293 <td class="save-notes">
294 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
295 <input type="hidden" name="bbid" value="[% CGI.param('bbid') | html %]" />
296 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
308 <span id='bb_publish_text' class='hide_me'>
309 [% |l %]Sharing a Bookbag means that the contents
310 of the Bookbag will be visible to others.
311 To see the public view of a shared Bookbag,
312 click on the Bookbag's name in the Bookbag list.[% END %]