2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Share a list</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% BLOCK cssinclude %][% END %]
8 [% INCLUDE 'bodytag.inc' bodyid='opac-shareshelf' bodyclass='scrollto' %]
9 [% INCLUDE 'masthead.inc' %]
11 <ul class="breadcrumb">
12 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
13 [% IF ( loggedinusername ) %]
14 <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">›</span></li>
17 </ul> <!-- / .breadcrumb -->
19 <div class="container-fluid">
20 <div class="row-fluid">
24 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
29 [%# This section contains the essential code for error messages and three operations: invite, confirm_invite and accept. %]
30 <h2>Share a list with another patron</h2>
32 <div id="shareshelf" class="maincontent">
35 [% IF errcode==1 && op %]<div class="alert">The operation [% op %] is not supported.</div>[% END %]
36 [% IF errcode==1 && !op %]<div class="alert">No operation parameter has been passed.</div>[% END %]
37 [% IF errcode==2 %]<div class="alert">Invalid shelf number.</div>[% END %]
38 [% IF errcode==3 %]<div class="alert">The feature of sharing lists is not in use in this library.</div>[% END %]
39 [% IF errcode==4 %]<div class="alert">You can only share a list if you are the owner.</div>[% END %]
40 [% IF errcode==5 %]<div class="alert">You cannot share a public list.</div>[% END %]
41 [% IF errcode==6 %]<div class="alert">Sorry, but you did not enter a valid email address.</div>[% END %]
42 [% IF errcode==7 %]<div class="alert">Sorry, but we could not accept this key. The invitation may have expired. Contact the patron who sent you the invitation.</div>[% END %]
43 [% IF errcode==8 %]<div class="alert">As owner of a list you cannot accept an invitation for sharing it.</div>[% END %]
44 <p><a href="/cgi-bin/koha/opac-shelves.pl?op=view&category=1">Return to your lists</a></p>
46 [% ELSIF op=='invite' %]
48 <form id="share_list">
49 <fieldset class="rows">
51 <input type="hidden" name="op" value="conf_invite"/>
52 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]"/>
53 <li><label for="name">List name:</label> [% shelfname %]</li>
55 <label for="invite_address">Email address:</label>
56 <input id="invite_address" name="invite_address" size="40" />
60 <fieldset class="action">
61 <input type="submit" value="Send" class="btn" />
62 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=1" class="cancel">Cancel</a>
67 [% ELSIF op=='conf_invite' %]
68 <div id="conf_invite">
69 [% IF approvedaddress %]
70 <p>An invitation to share list <i>[% shelfname %]</i> will be sent shortly to [% approvedaddress %].</p>
73 <p>Something went wrong while processing the following addresses. Please check them. These are: [% failaddress %]</p>
75 [% IF approvedaddress %]
76 <p>You will receive an email notification if someone accepts your share within two weeks.</p>
78 <p><a href="/cgi-bin/koha/opac-shelves.pl?op=view&category=1">Return to your lists</a></p>
81 [% ELSIF op=='accept' %]
82 [%# Nothing to do: we already display an error or we redirect. %]
85 </div> <!-- / .span10 -->
86 </div> <!-- / .maincontent -->
87 [%# End of essential part %]
89 </div> <!-- / .row-fluid -->
90 </div> <!-- / .container-fluid -->
91 </div> <!-- / .main -->
92 [% INCLUDE 'opac-bottom.inc' %]
94 <script type="text/javascript">
96 $(document).ready(function(){
97 $("#share_list").on('submit', function(e) {
98 var address = $("#invite_address").val();
99 if ( address.length == 0) {