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="[% 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 <input id="list_create_name" type="text" name="name" />
17 <input type="hidden" name="action" value="create" />
20 <label for="list_create_shared">[% l('Share this list?') %]</label>
21 <select name="shared" id="list_create_shared">
22 <option value="0">[% l('No') %]
23 <option value="1">[% l('Yes') %]
25 <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
26 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
28 <td class="list-create-table-buttons">
30 value="[% l('Submit') %]"
31 alt="[% l('Submit') %]"
33
35 value="[% l('Cancel') %]"
36 alt="[% l('Cancel') %]"
37 class="opac-button" />
41 <td class="text-right-top">
42 <label for="list_description">[% l("List description (optional):") %]</label>
45 <textarea cols="40" rows="3" name="description"
46 id="list_description"></textarea>
51 <h1>[% l("Your existing lists") %]</h1>
52 [% INCLUDE "opac/parts/anon_list.tt2" %]
53 [% IF ctx.bookbags.size %]
54 <div id='acct_lists_prime'>
55 [% FOR bbag IN ctx.bookbags %]
56 <div class="bookbag-controls-holder">
57 <div class="bookbag-controls most">
58 [% baseurl = ctx.opac_root _ '/myopac/lists';
59 IF bbag.id != CGI.param("id");
60 url = mkurl(baseurl,{id => bbag.id},['edit_notes','sort']);
61 ltitle = l("Show items in list");
63 url = mkurl(baseurl, {}, ['id', 'edit_notes', 'sort']);
64 ltitle = l("Hide items in list");
66 <h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
67 [% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
69 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
70 <div class="bookbag-share">
71 <input type="hidden" name="list" value="[% bbag.id %]" />
72 [% IF bbag.pub != 't' %]
73 <input type="hidden" name="action" value="show" />
74 <input class="fixed" type="submit" value="[% l('Share') %]" />
76 <input type="hidden" name="action" value="hide" />
77 <input class="fixed" type="submit" value="[% l('Hide') %]" />
81 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
82 <div class="bookbag-controls">
83 <input type="hidden" name="list" value="[% bbag.id %]" />
84 <input type="hidden" name="action" value="delete" />
85 <input type="submit" value="[% l('Delete List') %]" />
88 <form action="[% ctx.opac_root %]/myopac/list/print" method="POST">
89 <div class="bookbag-controls">
90 <input type="hidden" name="list" value="[% bbag.id %]" />
91 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
92 <input type="submit" value="[% l('Download CSV') %]" />
95 <div class="bookbag-controls">
96 [% IF bbag.pub == 't'; %]
97 <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
98 alt="[% l('RSS Feed') %]" border="0"
99 src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
102 <div class="bookbag-controls">
103 [% IF bbag.pub == 't'; %]
105 mkurl( ctx.opac_root _ '/results', {page => '0', query => 'container(bre,bookbag,' _ bbag.id _ ')'} )
106 -%]'>[% l('HTML View') %]</a>
109 <div class="clear-both pad-bottom-five"></div>
111 [% IF CGI.param("id") == bbag.id %]
112 <div class="bookbag-specific">
115 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
116 [% INCLUDE "opac/parts/filtersort.tt2"
117 value=CGI.param('sort') mode='bookbag' %]
118 <input type="hidden" name="id"
119 value="[% CGI.param('id') | html %]" />
120 <input type="submit" value="[% l('Sort') %]" />
125 <input type="hidden" name="id" value="[% bbag.id %]" />
126 <input type="hidden" name="action" value="editmeta" />
127 <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
128 <table id="bbag-name-desc-form">
131 <label for="bbag-edit-name">[% l('Name:') %]</label>
134 <input name="name" type="text"
135 value="[% bbag.name | html %]"
136 id="bbag-edit-name" />
138 <td rowspan="2" class="saver">
139 [% l("Save changes to name or description?") %]<br />
140 <input type="submit" value="[% l('Save') %]" />
144 <th><label for="bbag-edit-description">[% l('Description:') %]</label></th>
146 <textarea name="description"
147 id="bbag-edit-description">[% bbag.description | html %]</textarea>
154 <br class="clear-both" />
155 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
156 <input type="hidden" name="list" value="[% bbag.id %]" />
157 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
158 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
159 <thead id="acct_list_header">
161 <td class="list_checkbox">
162 <input type="checkbox" onclick="
163 var inputs=document.getElementsByTagName('input');
164 for (i = 0; i < inputs.length; i++) {
165 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
166 inputs[i].checked = this.checked;}"/>
169 <td class="list_entry">
170 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
172 <td class="list_entry">
173 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
175 <td class="list_entry">
177 [% IF CGI.param("edit_notes") != bbag.id %]
178 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
181 <td class="list_actions">
182 <select name="action">
183 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
184 <option value="place_hold">[% l('Place hold') %]</option>
185 <option value="del_item">[% l('Remove from list') %]</option>
187 <input type="submit" value="[% l('Go') %]" />
192 [% UNLESS bbag.items.size %]
193 <tr><td colspan="4" class="list_is_empty">
194 [% l("This list contains no items.") %]
197 [% FOR item IN bbag.items;
198 rec_id = item.target_biblio_record_entry.id;
199 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
200 PROCESS get_marc_attrs args=attrs %]
201 <tr class="bookbag-item-row">
202 <td class="list_checkbox">
203 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
205 <td class="list_entry">
206 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a>
208 <td class="list_entry">
210 authorquery = attrs.author | replace('[,\.:;]', '');
211 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'id', 'edit_notes'])
212 -%]">[% attrs.author | html %]</a>
213 [% IF CGI.param("edit_notes") == bbag.id %]
214 <td class="list_entry">
215 [% FOR note IN item.notes %]
216 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
218 <input type="text" name="item-[% item.id %]" />
221 <td class="list_entry">
222 [% FOR note IN item.notes %]
223 <div>[% note.note | html %]</div>
229 [% IF CGI.param("edit_notes") == bbag.id %]
231 <td colspan="3"><!-- All space left of notes column --></td>
232 <td class="save-notes">
233 <input type="hidden" name="id" value="[% CGI.param('id') | html %]" />
234 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
246 <span id='bb_publish_text' class='hide_me'>
247 [% |l %]Sharing a Bookbag means that the contents
248 of the Bookbag will be visible to others.
249 To see the public view of a shared Bookbag,
250 click on the Bookbag's name in the Bookbag list.[% END %]