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 <!-- <div class="header_middle">
8 <span id="acct_holds_header" style="float:left;">[% l('My Lists') %]</span>
9 <span style="float:right;"><a class="hide_me" href="#">[% l('Export List') %]</a></span>
11 <div style="float:right;width:85px;">
12 <div style="position:absolute">
13 <div style="position:relative;top:13px;">
14 <a href="#" style="position:relative;top:-3px;left:-5px;"><img alt="[% l('Saving Help') %]"
15 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
16 <a href="#"><img alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png"/></a>
20 <div id="temp_wrapper">
23 <!-- new list creation -->
24 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST" id="create_form">
25 <h1>[% l('Create new list') %]</h1><a name="createnewlist"></a>
26 <table cellpadding="0" border="0" id="list_create_table">
29 <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
32 <input id="list_create_name" type="text" name="name" />
33 <input type="hidden" name="action" value="create" />
36 <label for="list_create_shared">[% l('Share this list?') %]</label>
37 <select name="shared" id="list_create_shared">
38 <option value="0">[% l('No') %]
39 <option value="1">[% l('Yes') %]
41 <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
42 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
44 <td class="list-create-table-buttons">
46 value="[% l('Submit') %]"
47 alt="[% l('Submit') %]"
49
51 value="[% l('Cancel') %]"
52 alt="[% l('Cancel') %]"
53 class="opac-button" />
57 <td class="text-right-top">
58 <label for="list_description">[% l("List description (optional):") %]</label>
61 <textarea cols="40" rows="3" name="description"
62 id="list_description"></textarea>
67 <h1>[% l("Your existing lists") %]</h1>
68 [% INCLUDE "opac/parts/anon_list.tt2" %]
69 [% IF ctx.bookbags.size %]
70 <div id='acct_lists_prime'>
71 [% FOR bbag IN ctx.bookbags %]
72 <div class="bookbag-controls-holder">
73 <div class="bookbag-controls most">
74 [% baseurl = ctx.opac_root _ '/myopac/lists';
75 IF bbag.id != CGI.param("id");
76 url = mkurl(baseurl,{id => bbag.id},['edit_notes','sort']);
77 ltitle = l("Show items in list");
79 url = mkurl(baseurl, {}, ['id', 'edit_notes', 'sort']);
80 ltitle = l("Hide items in list");
82 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
83 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
85 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
86 <div class="bookbag-share">
87 <input type="hidden" name="list" value="[% bbag.id %]" />
88 [% IF bbag.pub != 't' %]
89 <input type="hidden" name="action" value="show" />
90 <input class="fixed" type="submit" value="[% l('Share') %]" />
92 <input type="hidden" name="action" value="hide" />
93 <input class="fixed" type="submit" value="[% l('Hide') %]" />
97 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
98 <div class="bookbag-controls">
99 <input type="hidden" name="list" value="[% bbag.id %]" />
100 <input type="hidden" name="action" value="delete" />
101 <input type="submit" value="[% l('Delete List') %]" />
104 <form action="[% ctx.opac_root %]/myopac/list/print" method="POST">
105 <div class="bookbag-controls">
106 <input type="hidden" name="list" value="[% bbag.id %]" />
107 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
108 <input type="submit" value="[% l('Download CSV') %]" />
111 <div class="bookbag-controls">
112 [% IF bbag.pub == 't'; %]
113 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
114 alt="[% l('RSS Feed') %]" border="0"
115 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
118 <div class="bookbag-controls">
119 [% IF bbag.pub == 't'; %]
121 mkurl( ctx.opac_root _ '/results', {page => '0', query => 'container(bre,bookbag,' _ bbag.id _ ')'} )
122 -%]'>[% l('HTML View') %]</a>
125 <div class="clear-both pad-bottom-five"></div>
127 [% IF CGI.param("id") == bbag.id %]
128 <div class="bookbag-specific">
131 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
132 [% INCLUDE "opac/parts/filtersort.tt2"
133 value=CGI.param('sort') mode='bookbag' %]
134 <input type="hidden" name="id"
135 value="[% CGI.param('id') | html %]" />
136 <input type="submit" value="[% l('Sort') %]" />
141 <input type="hidden" name="id" value="[% bbag.id %]" />
142 <input type="hidden" name="action" value="editmeta" />
143 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
144 <table id="bbag-name-desc-form">
147 <label for="bbag-edit-name">[% l('Name:') %]</label>
150 <input name="name" type="text"
151 value="[% bbag.name | html %]"
152 id="bbag-edit-name" />
154 <td rowspan="2" class="saver">
155 [% l("Save changes to name or description?") %]<br />
156 <input type="submit" value="[% l('Save') %]" />
160 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
162 <textarea name="description"
163 id="bbag-edit-description">[% bbag.description | html %]</textarea>
170 <br class="clear-both" />
171 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
172 <input type="hidden" name="list" value="[% bbag.id %]" />
173 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
174 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
175 <thead id="acct_list_header">
177 <td width="1%" style="padding-left: 10px;">
178 <input type="checkbox" onclick="
179 var inputs=document.getElementsByTagName('input');
180 for (i = 0; i < inputs.length; i++) {
181 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
182 inputs[i].checked = this.checked;}"/>
185 <td width="32%" style="padding-left: 5px;">
186 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
189 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
193 [% IF CGI.param("edit_notes") != bbag.id %]
194 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
197 <td width="1%" class="nowrap">
198 <select name="action">
199 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
200 <option value="place_hold">[% l('Place hold') %]</option>
201 <option value="del_item">[% l('Remove from list') %]</option>
203 <input type="submit" value="[% l('Go') %]" />
208 [% UNLESS bbag.items.size %]
209 <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
210 [% l("This list contains no items.") %]
213 [% FOR item IN bbag.items;
214 rec_id = item.target_biblio_record_entry.id;
215 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
216 PROCESS get_marc_attrs args=attrs %]
217 <tr class="bookbag-item-row">
218 <td class="item_list_padding" style="padding-left: 10px;">
219 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
221 <td class="item_list_padding" style="padding-left: 5px;">
222 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a>
224 <td class="item_list_padding">
226 authorquery = attrs.author | replace('[,\.:;]', '');
227 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'id', 'edit_notes'])
228 -%]">[% attrs.author | html %]</a>
229 [% IF CGI.param("edit_notes") == bbag.id %]
230 <td class="opac-auto-097b">
231 [% FOR note IN item.notes %]
232 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
234 <input type="text" name="item-[% item.id %]" />
237 <td class="opac-auto-097b">
238 [% FOR note IN item.notes %]
239 <div>[% note.note | html %]</div>
245 [% IF CGI.param("edit_notes") == bbag.id %]
247 <td colspan="3"><!-- All space left of notes column --></td>
248 <td class="save-notes">
249 <input type="hidden" name="id" value="[% CGI.param('id') | html %]" />
250 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
262 <div id='myopac_delete_bookbag_warn' class='hide_me'>
263 [% l("This will remove the selected bookbag and all items contained within the bookbag. Are you sure you wish to continue?") %]
265 <div style='text-align: center; font-weight: bold;'
266 class='hide_me' id='myopac_bookbags_none'>[% l("You have not created any bookbags") %]</div>
267 <div style='width: 99%; text-align: center'>
268 <b id='myopac_bookbag_items_name'> </b>
270 <span id='bb_publish_text' class='hide_me'>
271 [% |l %]Sharing a Bookbag means that the contents
272 of the Bookbag will be visible to others.
273 To see the public view of a shared Bookbag,
274 click on the Bookbag's name in the Bookbag list.[% END %]
276 <span id='myopac_remove_bb_item_confirm' class='hide_me'>
277 [% l("Are you sure you wish to remove this bookbag item?") %]
279 <span id='myopac_make_published_confirm' class='hide_me'>
280 [% l("Sharing this bookbag will allow the contents of the bookbag to be seen by others. Are you sure you wish to share this bookbag?") %]
282 <span id='myopac_make_unpublished_confirm' class='hide_me'>
283 [% l("Are you sure you wish to hide this bookbag?") %]
285 <span id='myopac_bb_update_success' class='hide_me'>
286 [% l("The Bookbag was successfully updated.") %]
288 <span id='bb_create_warning' class='hide_me'>
289 [% l("Warning: Adding items to a bookbag creates a link between you and the items in the database. The contents of the bookbag are NOT publicly viewable unless the bookbag is shared. However, if you prefer not to have any link between your patron record and a particular item or items, we suggest that you do not place said items in a bookbag or that you avoid using bookbags all together. Thank you.") %]
291 <span id='myopac_bb_what_are' class='hide_me'>
292 [% l("Bookbags are...") %]
294 <span class='hide_me' id='bb_update_success'>
295 [% l("Bookbag successfully updated") %]