2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Share a list › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
12 <ol class="breadcrumb">
13 <li class="breadcrumb-item">
14 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
16 [% IF ( loggedinusername ) %]
17 <li class="breadcrumb-item">
18 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
21 <li class="breadcrumb-item">
22 <a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
24 <li class="breadcrumb-item active">
25 <a href="#" aria-current="page">Share a list</a>
27 </ol> <!-- / .breadcrumb -->
28 </nav> <!-- /#breadcrumbs -->
30 <div class="container-fluid">
33 <div class="col-lg-2">
35 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
40 <div class="col-10 order-first order-md-first order-lg-2">
41 <div id="shareshelf" class="maincontent">
43 [%# This section contains the essential code for error messages and three operations: invite, confirm_invite and accept. %]
44 <h1>Share a list with another patron</h1>
47 [% IF errcode==1 && op %]
48 <div class="alert alert-warning">The operation [% op | html %] is not supported.</div>
50 [% IF errcode==1 && !op %]
51 <div class="alert alert-warning">No operation parameter has been passed.</div>
54 <div class="alert alert-warning">Invalid shelf number.</div>
57 <div class="alert alert-warning">The feature of sharing lists is not in use in this library.</div>
60 <div class="alert alert-warning">You can only share a list if you are the owner.</div>
63 <div class="alert alert-warning">You cannot share a public list.</div>
66 <div class="alert alert-warning">Sorry, but you did not enter a valid email address.</div>
69 <div class="alert alert-warning">Sorry, but we could not accept this key. The invitation may have expired. Contact the patron who sent you the invitation.</div>
72 <div class="alert alert-warning">As owner of a list you cannot accept an invitation for sharing it.</div>
74 <p><a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=1">Return to your lists</a></p>
76 [% ELSIF op=='invite' %]
78 <form id="share_list">
79 <legend class="sr-only">Share list</legend>
80 <fieldset class="rows">
81 <input type="hidden" name="op" value="conf_invite"/>
82 <input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]"/>
85 <label for="name">List name:</label> [% shelfname | html %]
88 <label for="invite_address">Email address:</label>
89 <input type="text" id="invite_address" name="invite_address" size="40" />
93 <fieldset class="action">
94 <input type="submit" value="Send" class="btn btn-primary" />
95 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=1" class="cancel">Cancel</a>
97 </form> <!-- /#share_list -->
98 </div> <!-- /#invite -->
100 [% ELSIF op=='conf_invite' %]
101 <div id="conf_invite">
102 [% IF approvedaddress %]
103 <p>An invitation to share list <em>[% shelfname | html %]</em> will be sent shortly to [% approvedaddress | html %].</p>
106 <p>Something went wrong while processing the following addresses. Please check them. These are: [% failaddress | html %]</p>
108 [% IF approvedaddress %]
109 <p>You will receive an email notification if someone accepts your share before it expires.</p>
111 <p><a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=1">Return to your lists</a></p>
114 [% ELSIF op=='accept' %]
115 [%# Nothing to do: we already display an error or we redirect. %]
117 [%# End of essential part %]
119 </div> <!-- / #shareshelf.maincontent -->
120 </div> <!-- / .span10 -->
121 </div> <!-- / .row -->
122 </div> <!-- / .container-fluid -->
123 </div> <!-- / .main -->
125 [% INCLUDE 'opac-bottom.inc' %]
126 [% BLOCK jsinclude %]
128 $(document).ready(function(){
129 $("#share_list").on('submit', function(e) {
130 var address = $("#invite_address").val();
131 if ( address.length == 0) {