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" />
21 <label for="list_create_shared">[% l('Share this list?') %]</label>
22 <select name="shared" id="list_create_shared">
23 <option value="0">[% l('No') %]
24 <option value="1">[% l('Yes') %]
26 <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
27 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
29 <td class="list-create-table-buttons">
31 value="[% l('Submit') %]"
32 alt="[% l('Submit') %]"
34
36 value="[% l('Cancel') %]"
37 alt="[% l('Cancel') %]"
38 class="opac-button" />
42 <td class="text-right-top">
43 <label for="list_description">[% l("List description (optional):") %]</label>
46 <textarea cols="40" rows="3" name="description"
47 id="list_description"></textarea>
52 <h1>[% l("Your existing lists") %]</h1>
53 [% INCLUDE "opac/parts/anon_list.tt2" %]
54 [% IF ctx.bookbags.size %]
55 <div id='acct_lists_prime'>
56 [% FOR bbag IN ctx.bookbags %]
57 <div class="bookbag-controls-holder">
58 <div class="bookbag-controls most">
59 [% baseurl = ctx.opac_root _ '/myopac/lists';
60 IF bbag.id != CGI.param("bbid");
61 url = mkurl(baseurl,{bbid => bbag.id},['edit_notes','sort']);
62 ltitle = l("Show items in list");
64 url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
65 ltitle = l("Hide items in list");
67 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
68 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
70 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
71 <div class="bookbag-share">
72 <input type="hidden" name="list" value="[% bbag.id %]" />
73 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
74 [% IF bbag.pub != 't' %]
75 <input type="hidden" name="action" value="show" />
76 <input class="fixed" type="submit" value="[% l('Share') %]" />
78 <input type="hidden" name="action" value="hide" />
79 <input class="fixed" type="submit" value="[% l('Hide') %]" />
83 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
84 <div class="bookbag-controls">
85 <input type="hidden" name="list" value="[% bbag.id %]" />
86 <input type="hidden" name="action" value="delete" />
87 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
88 <input type="submit" value="[% l('Delete List') %]" />
91 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="POST">
92 <div class="bookbag-controls">
93 <input type="hidden" name="list" value="[% bbag.id %]" />
94 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
95 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
96 <input type="submit" value="[% l('Download CSV') %]" />
99 <div class="bookbag-controls">
100 [% IF bbag.pub == 't'; %]
101 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
102 alt="[% l('RSS Feed') %]" border="0"
103 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
106 <div class="bookbag-controls">
107 [% IF bbag.pub == 't'; %]
110 ctx.opac_root _ '/results',
111 {page => '0', bookbag => bbag.id, depth => 0, locg => ctx.search_ou},
114 -%]'>[% l('HTML View') %]</a>
117 <div class="clear-both pad-bottom-five"></div>
119 [% IF CGI.param("bbid") == bbag.id %]
120 <div class="bookbag-specific">
123 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
124 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
125 [% INCLUDE "opac/parts/filtersort.tt2"
126 value=CGI.param('sort') mode='bookbag' %]
127 <input type="hidden" name="id"
128 value="[% CGI.param('bbid') | html %]" />
129 <input type="submit" value="[% l('Sort') %]" />
134 <input type="hidden" name="id" value="[% bbag.id %]" />
135 <input type="hidden" name="action" value="editmeta" />
136 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
137 <table id="bbag-name-desc-form">
140 <label for="bbag-edit-name">[% l('Name:') %]</label>
143 <input name="name" type="text"
144 value="[% bbag.name | html %]"
145 id="bbag-edit-name" />
147 <td rowspan="2" class="saver">
148 [% l("Save changes to name or description?") %]<br />
149 <input type="submit" value="[% l('Save') %]" />
153 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
155 <textarea name="description"
156 id="bbag-edit-description">[% bbag.description | html %]</textarea>
163 <br class="clear-both" />
164 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
165 <input type="hidden" name="list" value="[% bbag.id %]" />
166 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
167 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
168 <thead id="acct_list_header">
170 <td class="list_checkbox">
171 <input type="checkbox" onclick="
172 var inputs=document.getElementsByTagName('input');
173 for (i = 0; i < inputs.length; i++) {
174 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
175 inputs[i].checked = this.checked;}"/>
178 <td class="list_entry">
179 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
181 <td class="list_entry">
182 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
184 <td class="list_entry">
186 [% IF CGI.param("edit_notes") != bbag.id %]
187 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
190 <td class="list_actions">
191 <select name="action">
192 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
193 <option value="place_hold">[% l('Place hold') %]</option>
194 <option value="del_item">[% l('Remove from list') %]</option>
196 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
197 <input type="submit" value="[% l('Go') %]" />
202 [% UNLESS bbag.items.size %]
203 <tr><td colspan="4" class="list_is_empty">
204 [% l("This list contains no items.") %]
207 [% FOR item IN bbag.items;
208 rec_id = item.target_biblio_record_entry.id;
209 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
210 PROCESS get_marc_attrs args=attrs %]
211 <tr class="bookbag-item-row">
212 <td class="list_checkbox">
213 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
215 <td class="list_entry">
216 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'bbid']) %]">[% attrs.title | html %]</a>
218 <td class="list_entry">
220 authorquery = attrs.author | replace('[,\.:;]', '');
221 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'bbid', 'edit_notes'])
222 -%]">[% attrs.author | html %]</a>
223 [% IF CGI.param("edit_notes") == bbag.id %]
224 <td class="list_entry">
225 [% FOR note IN item.notes %]
226 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
228 <input type="text" name="item-[% item.id %]" />
231 <td class="list_entry">
232 [% FOR note IN item.notes %]
233 <div>[% note.note | html %]</div>
239 [% IF CGI.param("edit_notes") == bbag.id %]
241 <td colspan="3"><!-- All space left of notes column --></td>
242 <td class="save-notes">
243 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
244 <input type="hidden" name="id" value="[% CGI.param('bbid') | html %]" />
245 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
257 <span id='bb_publish_text' class='hide_me'>
258 [% |l %]Sharing a Bookbag means that the contents
259 of the Bookbag will be visible to others.
260 To see the public view of a shared Bookbag,
261 click on the Bookbag's name in the Bookbag list.[% END %]