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']);
61 ltitle = l("Show items in list");
63 url = mkurl(baseurl, {}, ['id', 'edit_notes']);
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">
114 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
115 [% INCLUDE "opac/parts/filtersort.tt2"
116 value=CGI.param('sort') mode='bookbag' %]
117 <input type="hidden" name="id"
118 value="[% CGI.param('id') | html %]" />
119 <input type="submit" value="[% l('Sort') %]" />
122 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
123 <input type="hidden" name="list" value="[% bbag.id %]" />
124 <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
125 <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
126 <thead id="acct_list_header">
128 <td class="list_checkbox">
129 <input type="checkbox" onclick="
130 var inputs=document.getElementsByTagName('input');
131 for (i = 0; i < inputs.length; i++) {
132 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %])
133 inputs[i].checked = this.checked;}"/>
136 <td class="list_entry">
137 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
139 <td class="list_entry">
140 <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
142 <td class="list_entry">
144 [% IF CGI.param("edit_notes") != bbag.id %]
145 | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
148 <td class="list_actions">
149 <select name="action">
150 <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
151 <option value="place_hold">[% l('Place hold') %]</option>
152 <option value="del_item">[% l('Remove from list') %]</option>
154 <input type="submit" value="[% l('Go') %]" />
159 [% UNLESS bbag.items.size %]
160 <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
161 [% l("This list contains no items.") %]
164 [% FOR item IN bbag.items;
165 rec_id = item.target_biblio_record_entry.id;
166 attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
167 PROCESS get_marc_attrs args=attrs %]
168 <tr class="bookbag-item-row">
169 <td class="list_checkbox">
170 <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
172 <td class="list_entry">
173 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a>
175 <td class="list_entry">
177 authorquery = attrs.author | replace('[,\.:;]', '');
178 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'id', 'edit_notes'])
179 -%]">[% attrs.author | html %]</a>
180 [% IF CGI.param("edit_notes") == bbag.id %]
181 <td class="list_entry">
182 [% FOR note IN item.notes %]
183 <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
185 <input type="text" name="item-[% item.id %]" />
188 <td class="list_entry">
189 [% FOR note IN item.notes %]
190 <div>[% note.note | html %]</div>
196 [% IF CGI.param("edit_notes") == bbag.id %]
198 <td colspan="3"><!-- All space left of notes column --></td>
199 <td class="save-notes">
200 <input type="hidden" name="id" value="[% CGI.param('id') | html %]" />
201 <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
213 <span id='bb_publish_text' class='hide_me'>
214 [% |l %]Sharing a Bookbag means that the contents
215 of the Bookbag will be visible to others.
216 To see the public view of a shared Bookbag,
217 click on the Bookbag's name in the Bookbag list.[% END %]