2 [% USE AdditionalContents %]
3 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
4 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Share a list › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
11 [% INCLUDE 'bodytag.inc' bodyid='opac-shareshelf' bodyclass='scrollto' %]
12 [% INCLUDE 'masthead.inc' %]
14 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
15 <ol class="breadcrumb">
16 <li class="breadcrumb-item">
17 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
19 [% IF ( loggedinusername ) %]
20 <li class="breadcrumb-item">
21 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
24 <li class="breadcrumb-item">
25 <a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
27 <li class="breadcrumb-item active">
28 <a href="#" aria-current="page">Share a list</a>
30 </ol> <!-- / .breadcrumb -->
31 </nav> <!-- /#breadcrumbs -->
33 <div class="container-fluid">
36 <div class="col-lg-2">
38 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
43 <div class="col-10 order-first order-md-first order-lg-2">
44 <div id="shareshelf" class="maincontent">
46 [%# This section contains the essential code for error messages and three operations: invite, confirm_invite and accept. %]
47 <h1>Share a list with another patron</h1>
50 [% IF errcode==1 && op %]
51 <div class="alert alert-warning">The operation [% op | html %] is not supported.</div>
53 [% IF errcode==1 && !op %]
54 <div class="alert alert-warning">No operation parameter has been passed.</div>
57 <div class="alert alert-warning">Invalid shelf number.</div>
60 <div class="alert alert-warning">The feature of sharing lists is not in use in this library.</div>
63 <div class="alert alert-warning">You can only share a list if you are the owner.</div>
66 <div class="alert alert-warning">You cannot share a public list.</div>
69 <div class="alert alert-warning">Sorry, but you did not enter a valid email address.</div>
72 <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>
75 <div class="alert alert-warning">As owner of a list you cannot accept an invitation for sharing it.</div>
77 <p><a href="/cgi-bin/koha/opac-shelves.pl?op=list">Return to your lists</a></p>
79 [% ELSIF op=='invite' %]
81 <form id="share_list">
82 <legend class="sr-only">Share list</legend>
83 <fieldset class="rows">
84 <input type="hidden" name="op" value="conf_invite"/>
85 <input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]"/>
88 <label for="name">List name:</label> [% shelfname | html %]
91 <label for="invite_address">Email address:</label>
92 <input type="text" id="invite_address" name="invite_address" size="40" />
96 <fieldset class="action">
97 <input type="submit" value="Send" class="btn btn-primary" />
98 <a href="/cgi-bin/koha/opac-shelves.pl?op=list" class="cancel">Cancel</a>
100 </form> <!-- /#share_list -->
101 </div> <!-- /#invite -->
103 [% ELSIF op=='conf_invite' %]
104 <div id="conf_invite">
105 [% IF approvedaddress %]
106 <p>An invitation to share list <em>[% shelfname | html %]</em> will be sent shortly to [% approvedaddress | html %].</p>
109 <p>Something went wrong while processing the following addresses. Please check them. These are: [% failaddress | html %]</p>
111 [% IF approvedaddress %]
112 <p>You will receive an email notification if someone accepts your share before it expires.</p>
114 <p><a href="/cgi-bin/koha/opac-shelves.pl?op=list">Return to your lists</a></p>
117 [% ELSIF op=='accept' %]
118 [%# Nothing to do: we already display an error or we redirect. %]
120 [%# End of essential part %]
122 </div> <!-- / #shareshelf.maincontent -->
123 </div> <!-- / .span10 -->
124 </div> <!-- / .row -->
125 </div> <!-- / .container-fluid -->
126 </div> <!-- / .main -->
128 [% INCLUDE 'opac-bottom.inc' %]
129 [% BLOCK jsinclude %]
131 $(document).ready(function(){
132 $("#share_list").on('submit', function(e) {
133 var address = $("#invite_address").val();
134 if ( address.length == 0) {