]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/lists.tt2
TPAC: Strip inline styles from bookbags page
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / lists.tt2
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;">
6
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>
10     </div>
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>
17             </div>
18         </div>
19     </div> -->
20     <div id="temp_wrapper">
21
22
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">
27             <tr>
28                 <td>
29                     <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
30                 </td>
31                 <td>
32                     <input id="list_create_name" type="text" name="name" />
33                     <input type="hidden" name="action" value="create" />
34                 </td>
35                 <td>
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') %]
40                     </select>
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>
43                 </td>
44                 <td class="list-create-table-buttons">
45                     <input type="submit"
46                         value="[% l('Submit') %]"
47                         alt="[% l('Submit') %]"
48                         class="opac-button"/>
49                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
50                     <input type="reset"
51                         value="[% l('Cancel') %]"
52                         alt="[% l('Cancel') %]"
53                         class="opac-button" />
54                 </td>
55             </tr>
56             <tr>
57                 <td class="text-right-top">
58                     <label for="list_description">[% l("List description (optional):") %]</label>
59                 </td>
60                 <td colspan="3">
61                     <textarea cols="40" rows="3" name="description"
62                         id="list_description"></textarea>
63                 </td>
64         </table>
65     </form>
66
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']);
77                     ltitle = l("Show items in list");
78                 ELSE;
79                     url = mkurl(baseurl, {}, ['id', 'edit_notes']);
80                     ltitle = l("Hide items in list");
81                 END %]
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 %]
84             </div>
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') %]" />
91                     [% ELSE %]
92                     <input type="hidden" name="action" value="hide" />
93                     <input class="fixed" type="submit" value="[% l('Hide') %]" />
94                     [% END %]
95                 </div>
96             </form>
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') %]" />
102                 </div>
103             </form>
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') %]" />
109                 </div>
110             </form>
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>
116                 [% END %]
117             </div>
118             <div class="bookbag-controls">
119                 [% IF bbag.pub == 't'; %]
120                 <a href='[%-
121                     mkurl( ctx.opac_root _ '/results', {page => '0', query => 'container(bre,bookbag,' _ bbag.id _ ')'} )
122                 -%]'>[% l('HTML View') %]</a>
123                 [% END %]
124             </div>
125             <div class="clear-both pad-bottom-five"></div>
126         </div>
127         [% IF CGI.param("id") == bbag.id %]
128         <div class="bookbag-specific">
129             <form method="GET">
130                 <label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
131                 [% INCLUDE "opac/parts/filtersort.tt2"
132                     value=CGI.param('sort') mode='bookbag' %]
133                 <input type="hidden" name="id"
134                     value="[% CGI.param('id') | html %]" />
135                 <input type="submit" value="[% l('Sort') %]" />
136             </form>
137         </div>
138         <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
139         <input type="hidden" name="list" value="[% bbag.id %]" />
140         <input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
141         <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
142             <thead id="acct_list_header">
143                 <tr>
144                     <td class="list_checkbox">
145                     <input type="checkbox" onclick="
146                         var inputs=document.getElementsByTagName('input'); 
147                         for (i = 0; i < inputs.length; i++) { 
148                             if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
149                                 inputs[i].checked = this.checked;}"/>
150
151                     </td>
152                     <td class="list_entry">
153                         <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
154                     </td>
155                     <td class="list_entry">
156                         <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
157                     </td>
158                     <td class="list_entry">
159                         [% l('Notes') %]
160                         [% IF CGI.param("edit_notes") != bbag.id %]
161                         | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
162                         [% END %]
163                     </td>
164                     <td class="list_actions">
165                         <select name="action">
166                             <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
167                             <option value="place_hold">[% l('Place hold') %]</option>
168                             <option value="del_item">[% l('Remove from list') %]</option>
169                         </select>
170                         <input type="submit" value="[% l('Go') %]" />
171                     </td>
172                 </tr>
173             </thead>
174             <tbody>
175                 [% UNLESS bbag.items.size %]
176                 <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
177                     [% l("This list contains no items.") %]
178                 </td></tr>
179                 [% END %]
180                 [% FOR item IN bbag.items;
181                     rec_id = item.target_biblio_record_entry.id;
182                     attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
183                     PROCESS get_marc_attrs args=attrs %]
184                 <tr class="bookbag-item-row">
185                     <td class="list_checkbox">
186                         <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
187                     </td>
188                     <td class="list_entry">
189                         <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a>
190                     </td>
191                     <td class="list_entry">
192                         <a href="[%- 
193                             authorquery = attrs.author | replace('[,\.:;]', '');
194                             mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'id', 'edit_notes'])
195                             -%]">[% attrs.author | html %]</a>
196                     [% IF CGI.param("edit_notes") == bbag.id %]
197                     <td class="list_entry">
198                         [% FOR note IN item.notes %]
199                         <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
200                         [% END %]
201                         <input type="text" name="item-[% item.id %]" />
202                     </td>
203                     [% ELSE %]
204                     <td class="list_entry">
205                         [% FOR note IN item.notes %]
206                         <div>[% note.note | html %]</div>
207                         [% END %]
208                     </td>
209                     [% END %]
210                 </tr>
211                 [% END %]
212                 [% IF CGI.param("edit_notes") == bbag.id %]
213                 <tr>
214                     <td colspan="3"><!-- All space left of notes column --></td>
215                     <td class="save-notes">
216                         <input type="hidden" name="id" value="[% CGI.param('id') | html %]" />
217                         <input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
218                     </td>
219                 </tr>
220                 [% END %]
221             </tbody>
222         </table>
223         </form>
224         [% END %]
225         [% END %]
226     </div>
227     [% END %]
228
229     <div id='myopac_delete_bookbag_warn' class='hide_me'>
230         [% l("This will remove the selected bookbag and all items contained within the bookbag.  Are you sure you wish to continue?") %]
231     </div>
232     <div style='text-align: center; font-weight: bold;' 
233         class='hide_me' id='myopac_bookbags_none'>[% l("You have not created any bookbags") %]</div>
234     <div style='width: 99%; text-align: center'>
235         <b id='myopac_bookbag_items_name'> </b>
236     </div>
237     <span id='bb_publish_text' class='hide_me'>
238 [% |l %]Sharing a Bookbag means that the contents 
239 of the Bookbag will be visible to others.  
240 To see the public view of a shared Bookbag, 
241 click on the Bookbag's name in the Bookbag list.[% END %]
242     </span>
243     <span id='myopac_remove_bb_item_confirm' class='hide_me'>
244         [% l("Are you sure you wish to remove this bookbag item?") %]
245     </span>
246     <span id='myopac_make_published_confirm' class='hide_me'>
247         [% 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?") %]
248     </span>
249     <span id='myopac_make_unpublished_confirm' class='hide_me'>
250         [% l("Are you sure you wish to hide this bookbag?") %]
251     </span>
252     <span id='myopac_bb_update_success' class='hide_me'>
253         [% l("The Bookbag was successfully updated.") %]
254     </span>
255     <span id='bb_create_warning' class='hide_me'>
256         [% 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.") %]
257     </span>
258     <span id='myopac_bb_what_are' class='hide_me'>
259         [% l("Bookbags are...") %]
260     </span>
261     <span class='hide_me' id='bb_update_success'>
262         [% l("Bookbag successfully updated") %]
263     </span>
264
265 </div>
266 [% END %]