1 [% PROCESS "opac/parts/header.tt2";
2 PROCESS "opac/parts/misc_util.tt2";
3 WRAPPER "opac/parts/myopac/base.tt2";
4 myopac_page = "lists" %]
5 <div id='myopac_bookbag_div' style="padding:5px;">
7 <!-- new list creation -->
8 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST" id="create_form">
9 <h1>[% l('Create new list') %]</h1><a name="createnewlist"></a>
10 <table cellpadding="0" border="0" id="list_create_table">
13 <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
16 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
17 <input id="list_create_name" type="text" name="name" />
18 <input type="hidden" name="action" value="create" />
20 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
22 [% IF ctx.where_from %]
23 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
27 <label for="list_create_shared">[% l('Share this list?') %]</label>
28 <select name="shared" id="list_create_shared">
29 <option value="0">[% l('No') %]
30 <option value="1">[% l('Yes') %]
32 <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
33 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
35 <td class="list-create-table-buttons">
37 value="[% l('Submit') %]"
38 alt="[% l('Submit') %]"
40
42 value="[% l('Cancel') %]"
43 alt="[% l('Cancel') %]"
44 class="opac-button" />
48 <td class="text-right-top">
49 <label for="list_description">[% l("List description (optional):") %]</label>
52 <textarea cols="40" rows="3" name="description"
53 id="list_description"></textarea>
58 <h1>[% l("Your existing lists") %]</h1>
59 [% INCLUDE "opac/parts/anon_list.tt2" %]
60 [% IF ctx.bookbags.size %]
61 <div id='acct_lists_prime'>
62 [% FOR bbag IN ctx.bookbags %]
63 <div class="bookbag-controls-holder">
64 <div class="bookbag-controls most">
65 [% baseurl = ctx.opac_root _ '/myopac/lists';
66 IF bbag.id != CGI.param("bbid");
67 url = mkurl(baseurl,{bbid => bbag.id},['edit_notes','sort']);
68 ltitle = l("Show items in list");
70 url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
71 ltitle = l("Hide items in list");
73 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
74 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
77 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update', {}, 1) %]" method="POST">
78 <div class="bookbag-controls">
79 <input type="hidden" name="action" value="add_rec" />
80 <input type="hidden" name="list" value="[% bbag.id %]" />
81 <input type="hidden" name="add_rec" value="[% ctx.add_rec %]" />
82 [% IF ctx.where_from %]
83 <input type="hidden" name="where_from" value="[% ctx.where_from %]" />
85 <input class="fixed" type="submit" value="[% l('Add to this list') %]" />
89 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
90 <div class="bookbag-share">
91 <input type="hidden" name="list" value="[% bbag.id %]" />
92 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
93 [% IF bbag.pub != 't' %]
94 <input type="hidden" name="action" value="show" />
95 <input class="fixed" type="submit" value="[% l('Share') %]" />
97 <input type="hidden" name="action" value="hide" />
98 <input class="fixed" type="submit" value="[% l('Hide') %]" />
102 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
103 <div class="bookbag-controls">
104 <input type="hidden" name="list" value="[% bbag.id %]" />
105 <input type="hidden" name="action" value="delete" />
106 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
107 <input type="submit" value="[% l('Delete List') %]" />
110 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="POST">
111 <div class="bookbag-controls">
112 <input type="hidden" name="list" value="[% bbag.id %]" />
113 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
114 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
115 <input type="submit" value="[% l('Download CSV') %]" />
118 <div class="bookbag-controls">
119 [% IF bbag.pub == 't'; %]
120 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
121 alt="[% l('RSS Feed') %]" border="0"
122 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
125 <div class="bookbag-controls">
126 [% IF bbag.pub == 't'; %]
129 ctx.opac_root _ '/results',
130 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
133 -%]'>[% l('HTML View') %]</a>
136 [% setting = 'opac.default_list'; %]
137 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
138 <div class="bookbag-controls">
139 <input type="hidden" name="list" value="[% bbag.id %]" />
140 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
141 [% IF ctx.user_setting_map.$setting == bbag.id %]
142 <input type="hidden" name="action" value="remove_default" />
143 <input type="submit" value="[% l('Remove Default List') %]" />
145 <input type="hidden" name="action" value="make_default" />
146 <input type="submit" value="[% l('Make Default List') %]" />
150 <div class="clear-both pad-bottom-five"></div>
152 [% IF CGI.param("bbid") == bbag.id %]
153 <div class="bookbag-specific">
156 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
157 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
158 [% INCLUDE "opac/parts/filtersort.tt2"
159 value=CGI.param('sort') mode='bookbag' %]
160 <input type="hidden" name="bbid"
161 value="[% CGI.param('bbid') | html %]" />
162 <input type="submit" value="[% l('Sort') %]" />
167 <input type="hidden" name="bbid" value="[% bbag.id %]" />
168 <input type="hidden" name="action" value="editmeta" />
169 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
170 <table id="bbag-name-desc-form">
173 <label for="bbag-edit-name">[% l('Name:') %]</label>
176 <input name="name" type="text"
177 value="[% bbag.name | html %]"
178 id="bbag-edit-name" />
180 <td rowspan="2" class="saver">
181 [% l("Save changes to name or description?") %]<br />
182 <input type="submit" value="[% l('Save') %]" />
186 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
188 <textarea name="description"
189 id="bbag-edit-description">[% bbag.description | html %]</textarea>
196 <br class="clear-both" />
197 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
198 <input type="hidden" name="list" value="[% bbag.id %]" />
199 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
200 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
201 <thead id="acct_list_header">
203 <td class="list_checkbox">
204 <input type="checkbox" onclick="
205 var inputs=document.getElementsByTagName('input');
206 for (i = 0; i < inputs.length; i++) {
207 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
208 inputs[i].checked = this.checked;}"/>
211 <td class="list_entry">
212 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
214 <td class="list_entry">
215 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
217 <td class="list_entry">
219 [% IF CGI.param("edit_notes") != bbag.id %]
220 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
223 <td class="list_actions">
224 <select name="action">
225 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
226 <option value="place_hold">[% l('Place hold') %]</option>
227 <option value="del_item">[% l('Remove from list') %]</option>
229 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
230 <input type="submit" value="[% l('Go') %]" />
235 [% UNLESS bbag.items.size %]
236 <tr><td colspan="4" class="list_is_empty">
237 [% l("This list contains no items.") %]
240 [% FOR item IN bbag.items;
241 rec_id = item.target_biblio_record_entry.id;
242 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
243 PROCESS get_marc_attrs args=attrs %]
244 <tr class="bookbag-item-row">
245 <td class="list_checkbox">
246 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
248 <td class="list_entry">
249 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
251 <td class="list_entry">
253 authorquery = attrs.author | replace('[,\.:;]', '');
254 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
255 -%]">[% attrs.author | html %]</a>
256 [% IF CGI.param("edit_notes") == bbag.id %]
257 <td class="list_entry">
258 [% FOR note IN item.notes %]
259 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
261 <input type="text" name="item-[% item.id %]" />
264 <td class="list_entry">
265 [% FOR note IN item.notes %]
266 <div>[% note.note | html %]</div>
272 [% IF CGI.param("edit_notes") == bbag.id %]
274 <td colspan="3"><!-- All space left of notes column --></td>
275 <td class="save-notes">
276 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
277 <input type="hidden" name="bbid" value="[% CGI.param('bbid') | html %]" />
278 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
290 <span id='bb_publish_text' class='hide_me'>
291 [% |l %]Sharing a Bookbag means that the contents
292 of the Bookbag will be visible to others.
293 To see the public view of a shared Bookbag,
294 click on the Bookbag's name in the Bookbag list.[% END %]