9d00492b453332d986106eb7ab47f6fd45e4ef1c
[koha_fer] / 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
25     [% ELSIF op=='invite' %]
26         <form method="post" onsubmit="return $('#invite_address').val().trim()!='';">
27             <input type="hidden" name="op" value="conf_invite"/>
28             <input type="hidden" name="shelfnumber" value="[% shelfnumber %]"/>
29             <fieldset class="rows">
30                 <ol>
31                     <li><span class="label">List name:</span> [% shelfname %]</li>
32                     <li><label for="invite_address">Email address:</label> <input id="invite_address" name="invite_address"/></li>
33                 </ol>
34             </fieldset>
35
36             <fieldset class="action">
37                 <input type="submit" value="Send" />
38             </fieldset>
39         </form>
40
41     [% ELSIF op=='conf_invite' %]
42         [% IF approvedaddress %]
43         <p>An invitation to share list <i>[% shelfname %]</i> has been sent to [% approvedaddress %].</p>
44         [% END %]
45         [% IF failaddress %]
46             <p>Something went wrong while processing the following addresses. Please check them. These are: [% failaddress %]</p>
47         [% END %]
48         [% IF approvedaddress %]
49         <p>You will receive an email notification if someone accepts your share within two weeks.</p>
50         [% END %]
51         <p><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Return to your lists</a></p>
52
53     [% ELSIF op=='accept' %]
54         [%# Nothing to do: we already display an error or we redirect. %]
55     [% END %]
56 [%# End of essential part %]
57
58 </div>
59 </div>
60 </div>
61
62 [% IF ( OpacNav ) %]
63     <div class="yui-b">
64         <div id="leftmenus" class="container">
65             [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
66         </div>
67     </div>
68 [% END %]
69
70 </div>
71 </div>
72 [% INCLUDE 'opac-bottom.inc' %]