View | Details | Raw Unified | Return to bug 9032
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt (+90 lines)
Line 0 Link Here
1
[% USE Koha %]
2
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Share a list
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% BLOCK cssinclude %][% END %]
5
</head>
6
7
<body id="opac-shareshelf" class="scrollto">
8
[% INCLUDE 'masthead.inc' %]
9
<div class="main">
10
    <ul class="breadcrumb">
11
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
12
        [% IF ( loggedinusername ) %]
13
            <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">&rsaquo;</span></li>
14
        [% END %]
15
        <li>Share a list</li>
16
    </ul> <!-- / .breadcrumb -->
17
18
    <div class="container-fluid">
19
        <div class="row-fluid">
20
            [% IF ( OpacNav ) %]
21
                <div class="span2">
22
                    <div id="navigation">
23
                        [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
24
                    </div>
25
                </div>
26
            [% END %]
27
28
[%# This section contains the essential code for error messages and three operations: invite, confirm_invite and accept. %]
29
    <h2>Share a list with another patron</h2>
30
    <div class="span10">
31
        <div id="shareshelf" class="maincontent">
32
33
    [% IF errcode %]
34
        [% IF errcode==1 && op %]<div class="alert">The operation [% op %] is not supported.</div>[% END %]
35
        [% IF errcode==1 && !op %]<div class="alert">No operation parameter has been passed.</div>[% END %]
36
        [% IF errcode==2 %]<div class="alert">Invalid shelf number.</div>[% END %]
37
        [% IF errcode==3 %]<div class="alert">The feature of sharing lists is not in use in this library.</div>[% END %]
38
        [% IF errcode==4 %]<div class="alert">You can only share a list if you are the owner.</div>[% END %]
39
        [% IF errcode==5 %]<div class="alert">You cannot share a public list.</div>[% END %]
40
        [% IF errcode==6 %]<div class="alert">Sorry, but you did not enter any valid email address.</div>[% END %]
41
        [% 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 %]
42
        [% IF errcode==8 %]<div class="alert">As owner of a list you cannot accept an invitation for sharing it.</div>[% END %]
43
44
    [% ELSIF op=='invite' %]
45
        <div id="invite">
46
        <form method="post" onsubmit="return $('#invite_address').val().trim()!='';">
47
        <fieldset class="rows">
48
            <ol>
49
            <input type="hidden" name="op" value="conf_invite"/>
50
            <input type="hidden" name="shelfnumber" value="[% shelfnumber %]"/>
51
            <li><label for="name">List name:</label> [% shelfname %]</li>
52
            <li>
53
                <label for="invite_address">Email address:</label>
54
                <input id="invite_address" name="invite_address"/>
55
            </li>
56
            </ol>
57
        </fieldset>
58
        <fieldset class="action">
59
            <input type="submit" value="Send" class="btn" />
60
        </fieldset>
61
        </form>
62
        </div>
63
64
    [% ELSIF op=='conf_invite' %]
65
        <div id="conf_invite">
66
        [% IF approvedaddress %]
67
        <p>An invitation to share list <i>[% shelfname %]</i> has been sent to [% approvedaddress %].</p>
68
        [% END %]
69
        [% IF failaddress %]
70
            <p>Something went wrong while processing the following addresses. Please check them. These are: [% failaddress %]</p>
71
        [% END %]
72
        [% IF approvedaddress %]
73
        <p>You will receive an email notification if someone accepts your share within two weeks.</p>
74
        [% END %]
75
        <p><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Return to your lists</a></p>
76
        </div>
77
78
    [% ELSIF op=='accept' %]
79
        [%# Nothing to do: we already display an error or we redirect. %]
80
    [% END %]
81
82
        </div> <!-- / .span10 -->
83
    </div> <!-- / .maincontent -->
84
[%# End of essential part %]
85
86
        </div> <!-- / .row-fluid -->
87
    </div> <!-- / .container-fluid -->
88
</div> <!-- / .main -->
89
[% INCLUDE 'opac-bottom.inc' %]
90
[% BLOCK jsinclude %][% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-6 / +26 lines)
Lines 33-38 Link Here
33
        &nbsp;<span>anyone to remove other contributed entries.</span>
33
        &nbsp;<span>anyone to remove other contributed entries.</span>
34
    </li>
34
    </li>
35
[% END %]
35
[% END %]
36
[% BLOCK remove_share %]
37
    [%# Use: add parameter shelfnumber and add end form tag %]
38
    <form action="opac-shelves.pl" method="post" class="form-inline">
39
        <input type="hidden" name="shelves" value="1" />
40
        <input type="hidden" name="display" value="privateshelves" />
41
        <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
42
[% END %]
36
43
37
[% INCLUDE 'masthead.inc' %]
44
[% INCLUDE 'masthead.inc' %]
38
<div class="main">
45
<div class="main">
Lines 173-178 Link Here
173
                                            [% END %]
180
                                            [% END %]
174
                                            <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
181
                                            <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
175
                                        </form>
182
                                        </form>
183
                                        [% IF showprivateshelves && Koha.Preference('OpacAllowSharingPrivateLists') %]
184
                                            <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelfnumber %]" class="">Share list</a>
185
                                        [% END %]
186
                                    [% ELSIF showprivateshelves # not manageshelf and private means shared %]
187
                                        [% INCLUDE remove_share %]
188
                                            <input type="hidden" name="REMSHR-[% shelfnumber %]" value="1" />
189
                                        </form>
176
                                    [% END # / IF manageshelf %]
190
                                    [% END # / IF manageshelf %]
177
                                </div>
191
                                </div>
178
192
Lines 584-592 Link Here
584
                                <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
598
                                <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
585
                                    [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
599
                                    [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
586
                                        [% IF ( showprivateshelves ) %]
600
                                        [% IF ( showprivateshelves ) %]
587
                                            <li id="privateshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your private lists</a></li>
601
                                            <li id="privateshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your lists</a></li>
588
                                        [% ELSE %]
602
                                        [% ELSE %]
589
                                            <li id="privateshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your private lists</a></li>
603
                                            <li id="privateshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your lists</a></li>
590
                                        [% END %]
604
                                        [% END %]
591
                                    [% END %]
605
                                    [% END %]
592
                                    [% IF ( showpublicshelves ) %]
606
                                    [% IF ( showpublicshelves ) %]
Lines 618-625 Link Here
618
                                                                    <td><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves&amp;viewshelf=[% shelveslooppri.shelf %]&amp;sortfield=[% shelveslooppri.sortfield %]">[% shelveslooppri.shelfname |html %]</a></td>
632
                                                                    <td><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves&amp;viewshelf=[% shelveslooppri.shelf %]&amp;sortfield=[% shelveslooppri.sortfield %]">[% shelveslooppri.shelfname |html %]</a></td>
619
                                                                    <td>[% IF ( shelveslooppri.count ) %][% shelveslooppri.count %] [% IF ( shelveslooppri.single ) %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
633
                                                                    <td>[% IF ( shelveslooppri.count ) %][% shelveslooppri.count %] [% IF ( shelveslooppri.single ) %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
620
                                                                    <td>
634
                                                                    <td>
621
                                                                        [% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
635
                                                                        [% IF ( shelveslooppri.viewcategory1 ) %][% IF !shelveslooppri.shares %]Private[% ELSE %]Shared[% END %][% END %]
622
                                                                        [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
623
                                                                    </td>
636
                                                                    </td>
624
                                                                    <td>
637
                                                                    <td>
625
                                                                        [% IF ( shelveslooppri.mine ) %]
638
                                                                        [% IF ( shelveslooppri.mine ) %]
Lines 641-646 Link Here
641
                                                                                <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
654
                                                                                <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
642
                                                                            [% END %]
655
                                                                            [% END %]
643
                                                                        </form>
656
                                                                        </form>
657
                                                                            [% IF Koha.Preference('OpacAllowSharingPrivateLists') %]
658
                                                                                <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelveslooppri.shelf %]" class="">Share</a>
659
                                                                            [% END %]
660
                                                                        [% ELSE # not shelveslooppri.mine, so shared %]
661
                                                                            [% INCLUDE remove_share  # if pref is off, you should still be able to remove shares %]
662
                                                                            <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
663
                                                                            <input type="hidden" name="REMSHR-[% shelveslooppri.shelf %]" value="1" />
664
                                                                            </form>
644
                                                                        [% END %]&nbsp;
665
                                                                        [% END %]&nbsp;
645
                                                                    </td>
666
                                                                    </td>
646
                                                                </tr>
667
                                                                </tr>
Lines 685-691 Link Here
685
                                                        <td><a class="title" href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelvesloo.shelf %]&amp;sortfield=[% shelvesloo.sortfield %]">[% shelvesloo.shelfname |html %]</a></td>
706
                                                        <td><a class="title" href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelvesloo.shelf %]&amp;sortfield=[% shelvesloo.sortfield %]">[% shelvesloo.shelfname |html %]</a></td>
686
                                                        <td>[% shelvesloo.count %] [% IF ( shelvesloo.single ) %]item[% ELSE %]item(s)[% END %]</td>
707
                                                        <td>[% shelvesloo.count %] [% IF ( shelvesloo.single ) %]item[% ELSE %]item(s)[% END %]</td>
687
                                                        <td>
708
                                                        <td>
688
                                                            [% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
689
                                                            [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
709
                                                            [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
690
                                                        </td>
710
                                                        </td>
691
                                                        <td>
711
                                                        <td>
Lines 787-792 Link Here
787
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
807
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
788
var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
808
var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
789
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
809
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
810
var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
790
811
791
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
812
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
792
    function holdSelections() {
813
    function holdSelections() {
793
- 

Return to bug 9032