0c22f6d93abb8e8850f7710da3b6e3cf8bac8c3d
[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         <h2>[% l('Create new list') %]</h2><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                     <input id="list_create_name" type="text" name="name" />
31                     <input type="hidden" name="action" value="create" />
32                 </td>
33                 <td>
34                     <label for="list_create_shared">[% l('Share this list?') %]</label>
35                     <select name="shared" id="list_create_shared">
36                         <option value="0">[% l('No') %]
37                         <option value="1">[% l('Yes') %]
38                     </select>
39                     <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
40                         src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
41                 </td>
42                 <td class="list-create-table-buttons">
43                     <input type="submit"
44                         value="[% l('Submit') %]"
45                         alt="[% l('Submit') %]"
46                         class="opac-button"/>
47                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
48                     <input type="reset"
49                         value="[% l('Cancel') %]"
50                         alt="[% l('Cancel') %]"
51                         class="opac-button" />
52                 </td>
53             </tr>
54         </table>
55     </form>
56
57     [% INCLUDE "opac/parts/anon_list.tt2" %]
58     [% IF ctx.bookbags.size %]
59     <div id='acct_lists_prime'>
60         [% FOR bbag IN ctx.bookbags %]
61         <div id='acct_list_template'>
62             <div style="width:100%">
63                 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
64                     <div class="bookbag-share">
65                         <input type="hidden" name="list" value="[% bbag.id %]" />
66                         [% IF bbag.pub != 't' %]
67                         <input type="hidden" name="action" value="show" />
68                         <input type="submit" value="[% l('Share') %]" />
69                         [% ELSE %]
70                         <input type="hidden" name="action" value="hide" />
71                         <input type="submit" value="[% l('Hide') %]" />
72                         [% END %]
73                     </div>
74                 </form>
75                 <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
76                     <div class="bookbag-controls">
77                         <input type="hidden" name="list" value="[% bbag.id %]" />
78                         <input type="hidden" name="action" value="delete" />
79                         <input type="submit" value="[% l('Delete List') %]" />
80                     </div>
81                 </form>
82                 <div class="bookbag-controls">
83                     <big><strong>
84                     [% IF bbag.pub == 't' %]
85                         [% url = 'http://' _ ctx.hostname _ '/opac/extras/feed/bookbag/html-full/' _ bbag.id %]
86                         <a target='_blank' href='[% url %]'>[% bbag.name | html %]</a>
87                     [% ELSE %]
88                     [% bbag.name | html %]
89                     [% END %]
90                     </strong></big>
91                 </div>
92                 <div class="bookbag-controls">
93                     [% IF bbag.pub == 't'; %]
94                     <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
95                         alt="[% l('RSS Feed') %]" border="0"
96                         src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
97                     [% END %]
98                 </div>
99                 <div class="clear-both pad-bottom-five"></div>
100             </div>
101             <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
102             <input type="hidden" name="list" value="[% bbag.id %]" />
103             <table cellpadding='0' cellspacing='0' border='0'>
104                 <thead id="acct_list_header">
105                     <tr>
106                         <td width="1%" style="padding-left: 10px;">
107                         <input type="checkbox" onclick="
108                             var inputs=document.getElementsByTagName('input'); 
109                             for (i = 0; i < inputs.length; i++) { 
110                                 if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
111                                     inputs[i].checked = this.checked;}"/>
112
113                         </td>
114                         <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
115                         <td width="49%">[% l('Author(s)') %]</td>
116                         <td width="1%" class="nowrap">
117                             <select class="selector_actions_for_list" name="action">
118                                 <option>[% l('-- Actions for this list --') %]</option>
119                                 <option value="place_hold">[% l('Place Hold') %]</option>
120                                 <option value="del_item">[% l('Remove Items') %]</option>
121                             </select>
122                             <input type="submit" value="[% l('Go') %]" />
123                         </td>
124                     </tr>
125                 </thead>
126                 <tbody>
127                     [% UNLESS bbag.items.size %]
128                     <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
129                         [% l("This list contains no items.") %]
130                     </td></tr>
131                     [% END %]
132                     [% FOR item IN bbag.items;
133                         rec_id = item.target_biblio_record_entry;
134                         attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
135                         PROCESS get_marc_attrs args=attrs %]
136                     <tr>
137                         <td class="item_list_padding" style="padding-left: 10px;">
138                             <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
139                         </td>
140                         <td class="item_list_padding" style="padding-left: 5px;">
141                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id) %]">[% attrs.title | html %]</a>
142                         </td>
143                         <td class="item_list_padding">
144                             <a href="[%- 
145                                 authorquery = attrs.author | replace('[,\.:;]', '');
146                                 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
147                                 -%]">[% attrs.author | html %]</a>
148                         </td>
149                     </tr>
150                     [% END %]
151                 </tbody>
152             </table>
153             </form>
154             <br /><br />
155         </div>
156         [% END %]
157     </div>
158     [% END %]
159
160     <div id='myopac_delete_bookbag_warn' class='hide_me'>
161         [% l("This will remove the selected bookbag and all items contained within the bookbag.  Are you sure you wish to continue?") %]
162     </div>
163     <div style='text-align: center; font-weight: bold;' 
164         class='hide_me' id='myopac_bookbags_none'>[% l("You have not created any bookbags") %]</div>
165     <div style='width: 99%; text-align: center'>
166         <b id='myopac_bookbag_items_name'> </b>
167     </div>
168     <span id='bb_publish_text' class='hide_me'>
169 [% |l %]Sharing a Bookbag means that the contents 
170 of the Bookbag will be visible to others.  
171 To see the public view of a shared Bookbag, 
172 click on the Bookbag's name in the Bookbag list.[% END %]
173     </span>
174     <span id='myopac_remove_bb_item_confirm' class='hide_me'>
175         [% l("Are you sure you wish to remove this bookbag item?") %]
176     </span>
177     <span id='myopac_make_published_confirm' class='hide_me'>
178         [% 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?") %]
179     </span>
180     <span id='myopac_make_unpublished_confirm' class='hide_me'>
181         [% l("Are you sure you wish to hide this bookbag?") %]
182     </span>
183     <span id='myopac_bb_update_success' class='hide_me'>
184         [% l("The Bookbag was successfully updated.") %]
185     </span>
186     <span id='bb_create_warning' class='hide_me'>
187         [% 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.") %]
188     </span>
189     <span id='myopac_bb_what_are' class='hide_me'>
190         [% l("Bookbags are...") %]
191     </span>
192     <span class='hide_me' id='bb_update_success'>
193         [% l("Bookbag successfully updated") %]
194     </span>
195
196 </div>
197 [% END %]