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("id");
61 url = mkurl(baseurl,{id => bbag.id},['edit_notes','sort']);
62 ltitle = l("Show items in list");
64 url = mkurl(baseurl, {}, ['id', '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'; %]
109 mkurl( ctx.opac_root _ '/results', {page => '0', bookbag => bbag.id} )
110 -%]'>[% l('HTML View') %]</a>
113 <div class="clear-both pad-bottom-five"></div>
115 [% IF CGI.param("id") == bbag.id %]
116 <div class="bookbag-specific">
119 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
120 [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
121 [% INCLUDE "opac/parts/filtersort.tt2"
122 value=CGI.param('sort') mode='bookbag' %]
123 <input type="hidden" name="id"
124 value="[% CGI.param('id') | html %]" />
125 <input type="submit" value="[% l('Sort') %]" />
130 <input type="hidden" name="id" value="[% bbag.id %]" />
131 <input type="hidden" name="action" value="editmeta" />
132 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
133 <table id="bbag-name-desc-form">
136 <label for="bbag-edit-name">[% l('Name:') %]</label>
139 <input name="name" type="text"
140 value="[% bbag.name | html %]"
141 id="bbag-edit-name" />
143 <td rowspan="2" class="saver">
144 [% l("Save changes to name or description?") %]<br />
145 <input type="submit" value="[% l('Save') %]" />
149 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
151 <textarea name="description"
152 id="bbag-edit-description">[% bbag.description | html %]</textarea>
159 <br class="clear-both" />
160 <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
161 <input type="hidden" name="list" value="[% bbag.id %]" />
162 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
163 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
164 <thead id="acct_list_header">
166 <td class="list_checkbox">
167 <input type="checkbox" onclick="
168 var inputs=document.getElementsByTagName('input');
169 for (i = 0; i < inputs.length; i++) {
170 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
171 inputs[i].checked = this.checked;}"/>
174 <td class="list_entry">
175 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
177 <td class="list_entry">
178 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
180 <td class="list_entry">
182 [% IF CGI.param("edit_notes") != bbag.id %]
183 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
186 <td class="list_actions">
187 <select name="action">
188 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
189 <option value="place_hold">[% l('Place hold') %]</option>
190 <option value="del_item">[% l('Remove from list') %]</option>
192 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
193 <input type="submit" value="[% l('Go') %]" />
198 [% UNLESS bbag.items.size %]
199 <tr><td colspan="4" class="list_is_empty">
200 [% l("This list contains no items.") %]
203 [% FOR item IN bbag.items;
204 rec_id = item.target_biblio_record_entry.id;
205 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
206 PROCESS get_marc_attrs args=attrs %]
207 <tr class="bookbag-item-row">
208 <td class="list_checkbox">
209 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
211 <td class="list_entry">
212 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a>
214 <td class="list_entry">
216 authorquery = attrs.author | replace('[,\.:;]', '');
217 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'id', 'edit_notes'])
218 -%]">[% attrs.author | html %]</a>
219 [% IF CGI.param("edit_notes") == bbag.id %]
220 <td class="list_entry">
221 [% FOR note IN item.notes %]
222 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
224 <input type="text" name="item-[% item.id %]" />
227 <td class="list_entry">
228 [% FOR note IN item.notes %]
229 <div>[% note.note | html %]</div>
235 [% IF CGI.param("edit_notes") == bbag.id %]
237 <td colspan="3"><!-- All space left of notes column --></td>
238 <td class="save-notes">
239 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
240 <input type="hidden" name="id" value="[% CGI.param('id') | html %]" />
241 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
253 <span id='bb_publish_text' class='hide_me'>
254 [% |l %]Sharing a Bookbag means that the contents
255 of the Bookbag will be visible to others.
256 To see the public view of a shared Bookbag,
257 click on the Bookbag's name in the Bookbag list.[% END %]