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