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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt (-120 / +121 lines)
Lines 38-166 Link Here
38
            <main>
38
            <main>
39
                <div class="row">
39
                <div class="row">
40
40
41
                [% IF Koha.Preference('CircSidebar') %]
41
                    [% IF Koha.Preference('CircSidebar') %]
42
                    <div class="col-sm-10 col-sm-push-2">
42
                        <div class="col-sm-10 col-sm-push-2">
43
                [% ELSE %]
43
                    [% ELSE %]
44
                    <div class="col-sm-12">
44
                        <div class="col-sm-12">
45
                [% END %]
45
                    [% END %]
46
47
            <h1>Holds awaiting pickup for your library on: [% show_date | $KohaDates %]</h1>
48
            <h2>
49
            [% IF ( all_branches_link ) %]
50
            <span><a href="[% all_branches_link | url %]">
51
            View all libraries</a></span>
52
            [% END %]
53
        </h2>
54
    [% IF reject_result_error %]
55
        <div class="error message">
56
        [% IF reject_result_error.invalid_status %]
57
            <p>There was a problem rejecting the cancellation request. Cannot reject an already completed cancellation request.</p>
58
        [% ELSE %]
59
            <p>Some error occurred while rejecting the cancellation request. Please check the logs</p>
60
        [% END %]
61
        </div>
62
    [% END %]
63
    [% IF ( cancel_result ) %]
64
        [% FOREACH cancel_result %]
65
            [% IF ( messagetransfert ) %]
66
                <div class="dialog message">
67
                    <h2>This item is on hold for pick-up at [% Branches.GetName( branchname ) | html %]</h2>
68
                    <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong> [% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
69
                    Please retain this item and check it in to process the hold.
70
                    </p>
71
                    <form name="cancelReservewithtransfert" action="waitingreserves.pl#[% tab | html %]" method="post">
72
                        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
73
                    </form>
74
                </div>
75
            [% END %]
76
            [% IF ( waiting ) %]
77
                <div class="dialog message">
78
                    <h2>This item is on hold for pick-up at your library</h2>
79
                    <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong>[% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
80
                    Please retain this item and check it in to process the hold.
81
                    </p>
82
                    <form name="cancelReservewithwaiting" action="waitingreserves.pl#[% tab | html %]" method="post">
83
                        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
84
                    </form>
85
                </div>
86
            [% END %]
87
        [% END %]
88
    [% ELSE %]
89
        [% IF enqueued %]
90
            <div class="dialog message">
91
                <p>The job has been enqueued! It will be processed as soon as possible.</p>
92
                <p><a href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=[% job_id | uri %]" title="View detail of the enqueued job">View detail of the enqueued job</a></p>
93
            </div>
94
        [% END %]
95
        <div id="resultlist" class="toptabs">
96
            <ul class="nav nav-tabs" role="tablist">
97
                <li role="presentation" class="active"><a href="#holdswaiting" aria-controls="holdswaiting" role="tab" data-toggle="tab">Holds waiting: [% reservecount | html %]</a></li>
98
                <li role="presentation">
99
                    <a href="#holdsover" aria-controls="holdsover" role="tab" data-toggle="tab">
100
                        Holds waiting over [% Koha.Preference('ReservesMaxPickUpDelay') | html %] days: [% overcount | html %]
101
                    </a>
102
                </li>
103
                <li role="presentation">
104
                    <a href="#holdscancelled" aria-controls="holdscancelled" role="tab" data-toggle="tab">
105
                        Holds with cancellation requests: [% cancel_reqs_count | html %]
106
                    </a>
107
                </li>
108
            </ul>
109
            <div class="tab-content">
110
            <div role="tabpanel" class="tab-pane active" id="holdswaiting">
111
        [% IF ( reserveloop ) %]
112
            <div id="toolbar" class="btn-toolbar">
113
                <button class="btn btn-default cancel_selected_holds" data-bulk="true"></button>
114
            </div>
115
            [% INCLUDE waiting_holds.inc table_name='holdst' reserveloop=reserveloop tab='holdwaiting' %]
116
        [% ELSE %]
117
            <div class="dialog message">No holds found.</div>
118
        [% END %]
119
        </div>
120
        <div role="tabpanel" class="tab-pane" id="holdsover">
121
            [% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay | html %] days.</p>[% END %]
122
            [% IF ( overloop ) %]
123
                <span id="holdsover-cancel-all">
124
                   <button class="cancel_selected_holds" data-bulk="true"></button>
125
                   <form name="cancelAllReserve" action="waitingreserves.pl" method="post">
126
                       <input type="hidden" name="cancelall" value="1" />
127
                       <input type="hidden" name="allbranches" value="[% allbranches | html %]" />
128
                       <input type="hidden" name="tab" value="holdsover">
129
                       [% IF TransferWhenCancelAllWaitingHolds %]
130
                           <input type="submit" class="btn btn-primary" value="Cancel and transfer all" />
131
                       [% ELSE %]
132
                           <input type="submit" class="btn btn-primary" value="Cancel all" />
133
                       [% END %]
134
                   </form>
135
                   [% UNLESS TransferWhenCancelAllWaitingHolds %]
136
                        Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds syspref)
137
                   [% END %]
138
46
139
                </span>
47
                        <h1>Holds awaiting pickup for your library on: [% show_date | $KohaDates %]</h1>
140
               [% INCLUDE waiting_holds.inc table_name='holdso' reserveloop=overloop tab='holdsover' %]
48
                        <h2>
141
            [% ELSE %]
49
                            [% IF ( all_branches_link ) %]
142
                <div class="dialog message">No holds found.</div>
50
                                <span><a href="[% all_branches_link | url %]">
143
            [% END %]
51
                                View all libraries</a></span>
144
        </div>
52
                            [% END %]
145
        <div role="tabpanel" class="tab-pane" id="holdscancelled">
53
                        </h2>
146
            [% IF cancel_reqs_count %]
54
                        [% IF reject_result_error %]
147
                [% INCLUDE waiting_holds.inc select_column='1' table_name='holdscr' reserveloop=cancel_reqs tab='holdscr' %]
55
                            <div class="error message">
148
            [% ELSE %]
56
                                [% IF reject_result_error.invalid_status %]
149
                <div class="dialog message">No holds found.</div>
57
                                    <p>There was a problem rejecting the cancellation request. Cannot reject an already completed cancellation request.</p>
150
            [% END %]
58
                                [% ELSE %]
151
        </div>
59
                                    <p>Some error occurred while rejecting the cancellation request. Please check the logs</p>
152
        </div>
60
                                [% END %]
153
    [% END %]
61
                            </div>
62
                        [% END %]
63
                        [% IF ( cancel_result ) %]
64
                            [% FOREACH cancel_result %]
65
                                [% IF ( messagetransfert ) %]
66
                                    <div class="dialog message">
67
                                        <h2>This item is on hold for pick-up at [% Branches.GetName( branchname ) | html %]</h2>
68
                                        <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong> [% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
69
                                        Please retain this item and check it in to process the hold.
70
                                        </p>
71
                                        <form name="cancelReservewithtransfert" action="waitingreserves.pl#[% tab | html %]" method="post">
72
                                            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
73
                                        </form>
74
                                    </div>
75
                                [% END %]
76
                                [% IF ( waiting ) %]
77
                                    <div class="dialog message">
78
                                        <h2>This item is on hold for pick-up at your library</h2>
79
                                        <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong>[% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
80
                                        Please retain this item and check it in to process the hold.
81
                                        </p>
82
                                        <form name="cancelReservewithwaiting" action="waitingreserves.pl#[% tab | html %]" method="post">
83
                                            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
84
                                        </form>
85
                                    </div>
86
                                [% END %]
87
                            [% END %]
88
                        [% ELSE %]
89
                            [% IF enqueued %]
90
                                <div class="dialog message">
91
                                    <p>The job has been enqueued! It will be processed as soon as possible.</p>
92
                                    <p><a href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=[% job_id | uri %]" title="View detail of the enqueued job">View detail of the enqueued job</a></p>
93
                                </div>
94
                            [% END %]
95
                            <div id="resultlist" class="toptabs">
96
                                <ul class="nav nav-tabs" role="tablist">
97
                                    <li role="presentation" class="active"><a href="#holdswaiting" aria-controls="holdswaiting" role="tab" data-toggle="tab">Holds waiting: [% reservecount | html %]</a></li>
98
                                    <li role="presentation">
99
                                        <a href="#holdsover" aria-controls="holdsover" role="tab" data-toggle="tab">
100
                                            Holds waiting over [% Koha.Preference('ReservesMaxPickUpDelay') | html %] days: [% overcount | html %]
101
                                        </a>
102
                                    </li>
103
                                    <li role="presentation">
104
                                        <a href="#holdscancelled" aria-controls="holdscancelled" role="tab" data-toggle="tab">
105
                                            Holds with cancellation requests: [% cancel_reqs_count | html %]
106
                                        </a>
107
                                    </li>
108
                                </ul>
109
                                <div class="tab-content">
110
                                    <div role="tabpanel" class="tab-pane active" id="holdswaiting">
111
                                        [% IF ( reserveloop ) %]
112
                                            <div id="toolbar" class="btn-toolbar">
113
                                                <button class="btn btn-default cancel_selected_holds" data-bulk="true"></button>
114
                                            </div>
115
                                            [% INCLUDE waiting_holds.inc table_name='holdst' reserveloop=reserveloop tab='holdwaiting' %]
116
                                        [% ELSE %]
117
                                            <div class="dialog message">No holds found.</div>
118
                                        [% END %]
119
                                    </div>
120
                                    <div role="tabpanel" class="tab-pane" id="holdsover">
121
                                        [% IF ( ReservesMaxPickUpDelay ) %]
122
                                            <p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay | html %] days.</p>
123
                                        [% END %]
124
                                        [% IF ( overloop ) %]
125
                                            <span id="holdsover-cancel-all">
126
                                                <button class="cancel_selected_holds" data-bulk="true"></button>
127
                                                <form name="cancelAllReserve" action="waitingreserves.pl" method="post">
128
                                                    <input type="hidden" name="cancelall" value="1" />
129
                                                    <input type="hidden" name="allbranches" value="[% allbranches | html %]" />
130
                                                    <input type="hidden" name="tab" value="holdsover">
131
                                                    [% IF TransferWhenCancelAllWaitingHolds %]
132
                                                        <input type="submit" class="btn btn-primary" value="Cancel and transfer all" />
133
                                                    [% ELSE %]
134
                                                        <input type="submit" class="btn btn-primary" value="Cancel all" />
135
                                                    [% END %]
136
                                                </form>
137
                                                [% UNLESS TransferWhenCancelAllWaitingHolds %]
138
                                                    Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds syspref)
139
                                                [% END %]
140
                                            </span>
141
                                            [% INCLUDE waiting_holds.inc table_name='holdso' reserveloop=overloop tab='holdsover' %]
142
                                        [% ELSE %]
143
                                            <div class="dialog message">No holds found.</div>
144
                                        [% END %]
145
                                    </div>
146
                                    <div role="tabpanel" class="tab-pane" id="holdscancelled">
147
                                        [% IF cancel_reqs_count %]
148
                                            [% INCLUDE waiting_holds.inc select_column='1' table_name='holdscr' reserveloop=cancel_reqs tab='holdscr' %]
149
                                        [% ELSE %]
150
                                            <div class="dialog message">No holds found.</div>
151
                                        [% END %]
152
                                    </div>
153
                                </div>
154
                            </div>
155
                        [% END %]
156
                    </div> <!-- /.col-sm-10.col-sm-push-2 -->
154
157
155
                    [% IF Koha.Preference('CircSidebar') %]
158
                    [% IF Koha.Preference('CircSidebar') %]
156
                            </div> <!-- /.col-sm-10.col-sm-push-2 -->
159
                        <div class="col-sm-2 col-sm-pull-10">
157
                            <div class="col-sm-2 col-sm-pull-10">
160
                            <aside>
158
                                <aside>
161
                                [% INCLUDE 'circ-nav.inc' %]
159
                                    [% INCLUDE 'circ-nav.inc' %]
162
                            </aside>
160
                                </aside>
163
                        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
161
                            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
162
                        </div> <!-- /.row -->
163
                    [% END %]
164
                    [% END %]
165
                </div> <!-- /.row -->
164
166
165
            </main>
167
            </main>
166
        </div> <!-- /.col-sm-12 -->
168
        </div> <!-- /.col-sm-12 -->
167
- 

Return to bug 32482