Bug 9032: (follow-up) loop variable and Cancel button
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-shareshelf.tt
1 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Share a list
2 [% INCLUDE 'doc-head-close.inc' %]
3 </head>
4 <body id="opac-shareshelf">
5 <div id="doc3" class="yui-t1">
6 <div id="bd">
7 [% INCLUDE 'masthead.inc' %]
8
9 <div id="yui-main">
10   <div class="yui-b"><div class="yui-g">
11
12 [%# This section contains the essential code for error messages and three operations: invite, confirm_invite and accept. %]
13     <h1>Share a list with another patron</h1>
14     [% IF errcode %]
15         [% IF errcode==1 && op %]<div class="dialog alert">The operation [% op %] is not supported.</div>[% END %]
16         [% IF errcode==1 && !op %]<div class="dialog alert">No operation parameter has been passed.</div>[% END %]
17         [% IF errcode==2 %]<div class="dialog alert">Invalid shelf number.</div>[% END %]
18         [% IF errcode==3 %]<div class="dialog alert">The feature of sharing lists is not in use in this library.</div>[% END %]
19         [% IF errcode==4 %]<div class="dialog alert">You can only share a list if you are the owner.</div>[% END %]
20         [% IF errcode==5 %]<div class="dialog alert">You cannot share a public list.</div>[% END %]
21         [% IF errcode==6 %]<div class="dialog alert">Sorry, but you did not enter any valid email address.</div>[% END %]
22         [% IF errcode==7 %]<div class="dialog alert">Sorry, but we could not accept this key. The invitation may have expired. Contact the patron who sent you the invitation.</div>[% END %]
23         [% IF errcode==8 %]<div class="dialog alert">As owner of a list you cannot accept an invitation for sharing it.</div>[% END %]
24         <p><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Return to your lists</a></p>
25
26     [% ELSIF op=='invite' %]
27         <form method="post" onsubmit="return $('#invite_address').val().trim()!='';">
28             <input type="hidden" name="op" value="conf_invite"/>
29             <input type="hidden" name="shelfnumber" value="[% shelfnumber %]"/>
30             <fieldset class="rows">
31                 <ol>
32                     <li><span class="label">List name:</span> [% shelfname %]</li>
33                     <li><label for="invite_address">Email address:</label> <input id="invite_address" name="invite_address"/></li>
34                 </ol>
35             </fieldset>
36
37             <fieldset class="action">
38                 <input type="submit" value="Send" />
39                 <a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves" class="cancel">Cancel</a>
40             </fieldset>
41         </form>
42
43     [% ELSIF op=='conf_invite' %]
44         [% IF approvedaddress %]
45         <p>An invitation to share list <i>[% shelfname %]</i> has been sent to [% approvedaddress %].</p>
46         [% END %]
47         [% IF failaddress %]
48             <p>Something went wrong while processing the following addresses. Please check them. These are: [% failaddress %]</p>
49         [% END %]
50         [% IF approvedaddress %]
51         <p>You will receive an email notification if someone accepts your share within two weeks.</p>
52         [% END %]
53         <p><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Return to your lists</a></p>
54
55     [% ELSIF op=='accept' %]
56         [%# Nothing to do: we already display an error or we redirect. %]
57     [% END %]
58 [%# End of essential part %]
59
60 </div>
61 </div>
62 </div>
63
64 [% IF ( OpacNav ) %]
65     <div class="yui-b">
66         <div id="leftmenus" class="container">
67             [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
68         </div>
69     </div>
70 [% END %]
71
72 </div>
73 </div>
74 [% INCLUDE 'opac-bottom.inc' %]