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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/patron-restrictions.inc (-1 / +1 lines)
Lines 21-27 Link Here
21
        [% END %]
21
        [% END %]
22
        <li>
22
        <li>
23
            <span>Usually the reason for freezing an account is old overdues or damage fees. If it appears that your account is clear, please contact the library.</span>
23
            <span>Usually the reason for freezing an account is old overdues or damage fees. If it appears that your account is clear, please contact the library.</span>
24
            <a href="/cgi-bin/koha/opac-account.pl">Check your charges page.</a> <a href="/cgi-bin/koha/opac-user.pl?opac-user-overdues=1">Check your overdues.</a>
24
            <a href="/cgi-bin/koha/opac-account.pl">Check your charges page.</a> <a href="/cgi-bin/koha/opac-user.pl?tab=opac-user-overdues">Check your overdues.</a>
25
        </li>
25
        </li>
26
    </ul>
26
    </ul>
27
</li>
27
</li>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-4 / +4 lines)
Lines 234-240 Link Here
234
                                    <ul id="user_summary_shortcuts">
234
                                    <ul id="user_summary_shortcuts">
235
                                        [% IF checkouts && checkouts > 0 %]
235
                                        [% IF checkouts && checkouts > 0 %]
236
                                            <li>
236
                                            <li>
237
                                                <a href="/cgi-bin/koha/opac-user.pl#opac-user-checkouts">
237
                                                <a href="/cgi-bin/koha/opac-user.pl?tab=opac-user-checkouts">
238
                                                    <span class="user_checkouts_count count_label">[% checkouts | html %]</span>
238
                                                    <span class="user_checkouts_count count_label">[% checkouts | html %]</span>
239
                                                    [% tn('checkout', 'checkouts', checkouts ) | html %]
239
                                                    [% tn('checkout', 'checkouts', checkouts ) | html %]
240
                                                </a>
240
                                                </a>
Lines 242-248 Link Here
242
                                        [% END %]
242
                                        [% END %]
243
                                        [% IF overdues && overdues > 0 %]
243
                                        [% IF overdues && overdues > 0 %]
244
                                            <li>
244
                                            <li>
245
                                                <a href="/cgi-bin/koha/opac-user.pl#opac-user-overdues">
245
                                                <a href="/cgi-bin/koha/opac-user.pl?tab=opac-user-overdues">
246
                                                    <span class="user_overdues_count count_label">[% overdues | html %]</span>
246
                                                    <span class="user_overdues_count count_label">[% overdues | html %]</span>
247
                                                    [% tn('overdue', 'overdues', overdues ) | html %]
247
                                                    [% tn('overdue', 'overdues', overdues ) | html %]
248
                                                </a>
248
                                                </a>
Lines 250-256 Link Here
250
                                        [% END %]
250
                                        [% END %]
251
                                        [% IF holds_pending && holds_pending > 0 %]
251
                                        [% IF holds_pending && holds_pending > 0 %]
252
                                            <li>
252
                                            <li>
253
                                                <a href="/cgi-bin/koha/opac-user.pl#opac-user-holds">
253
                                                <a href="/cgi-bin/koha/opac-user.pl?tab=opac-user-holds">
254
                                                    <span class="user_holds_pending_count count_label">[% holds_pending | html %]</span>
254
                                                    <span class="user_holds_pending_count count_label">[% holds_pending | html %]</span>
255
                                                    [% tn('hold pending', 'holds pending', holds_pending ) | html %]
255
                                                    [% tn('hold pending', 'holds pending', holds_pending ) | html %]
256
                                                </a>
256
                                                </a>
Lines 258-264 Link Here
258
                                        [% END %]
258
                                        [% END %]
259
                                        [% IF holds_waiting && holds_waiting > 0 %]
259
                                        [% IF holds_waiting && holds_waiting > 0 %]
260
                                            <li>
260
                                            <li>
261
                                                <a href="/cgi-bin/koha/opac-user.pl#opac-user-holds">
261
                                                <a href="/cgi-bin/koha/opac-user.pl?tab=opac-user-holds">
262
                                                    <span class="user_holds_waiting_count count_label">[% holds_waiting | html %]</span>
262
                                                    <span class="user_holds_waiting_count count_label">[% holds_waiting | html %]</span>
263
                                                    [% tn('hold waiting', 'holds waiting', holds_waiting ) | html %]
263
                                                    [% tn('hold waiting', 'holds waiting', holds_waiting ) | html %]
264
                                                </a>
264
                                                </a>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt (-1 / +1 lines)
Lines 159-165 Link Here
159
                                                            [% ELSIF ( hold.waitingdate ) %]
159
                                                            [% ELSIF ( hold.waitingdate ) %]
160
                                                                <span class="waiting"> Waiting for patron at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %]. </span>
160
                                                                <span class="waiting"> Waiting for patron at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %]. </span>
161
                                                            [% ELSIF ( hold.borrowernumber == logged_in_user.borrowernumber ) %]
161
                                                            [% ELSIF ( hold.borrowernumber == logged_in_user.borrowernumber ) %]
162
                                                                <span class="waiting"> You have already placed a <a href="/cgi-bin/koha/opac-user.pl#opac-user-holds">reserve</a> on this item. </span>
162
                                                                <span class="waiting"> You have already placed a <a href="/cgi-bin/koha/opac-user.pl?tab=opac-user-holds">reserve</a> on this item. </span>
163
                                                            [% END # / IF ( item.recall or hold ) %]
163
                                                            [% END # / IF ( item.recall or hold ) %]
164
                                                        </td>
164
                                                        </td>
165
                                                    </tr>
165
                                                    </tr>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-14 / +10 lines)
Lines 1050-1055 Link Here
1050
[% BLOCK jsinclude %]
1050
[% BLOCK jsinclude %]
1051
    [% INCLUDE 'calendar.inc' %]
1051
    [% INCLUDE 'calendar.inc' %]
1052
    [% INCLUDE 'datatables.inc' %]
1052
    [% INCLUDE 'datatables.inc' %]
1053
    <script>
1054
        const tab = "[% tab | html %]";
1055
    </script>
1053
    <script>
1056
    <script>
1054
        var AR_CAPTION_COUNT = _("(%s total)");
1057
        var AR_CAPTION_COUNT = _("(%s total)");
1055
1058
Lines 1063-1075 Link Here
1063
            }
1066
            }
1064
        }
1067
        }
1065
        $(document).ready(function(){
1068
        $(document).ready(function(){
1066
            [% IF ( opac_user_holds ) %]
1069
            if (tab){
1067
                $("#opac-user-views a[href='#opac-user-holds_panel']").tab("show");
1070
                $(`#opac-user-views a[href='#${tab}_panel']`).tab("show");
1068
            [% ELSIF ( opac_user_overdues ) %]
1071
            }
1069
                $("#opac-user-views a[href='#opac-user-overdues_panel']").tab("show");
1072
            if( $("#opac-user-views .tab-pane.active").length < 1 ){
1070
            [% ELSIF ( opac_user_article_requests ) %]
1073
                $("#opac-user-views a:first").tab("show");
1071
                $("#opac-user-views a[href='#opac-user-article-requests_panel']").tab("show");
1074
            }
1072
            [% END %]
1075
1073
            $('#article-requests-table caption .count').html(AR_CAPTION_COUNT.format('[% current_article_requests.size | html %]'));
1076
            $('#article-requests-table caption .count').html(AR_CAPTION_COUNT.format('[% current_article_requests.size | html %]'));
1074
1077
1075
            $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
1078
            $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
Lines 1340-1352 Link Here
1340
                return confirmDelete(_("Are you sure you want to dismiss this message?"));
1343
                return confirmDelete(_("Are you sure you want to dismiss this message?"));
1341
            });
1344
            });
1342
1345
1343
            [% IF ( tab ) %]
1344
                $("#opac-user-views #[% tab | html %]-tab").tab("show");
1345
            [% END %]
1346
1347
            if( $("#opac-user-views .tab-pane.active").length < 1 ){
1348
                $("#opac-user-views a:first").tab("show");
1349
            }
1350
        });
1346
        });
1351
1347
1352
        function submitNote( title, issue_id, note ){
1348
        function submitNote( title, issue_id, note ){
(-)a/opac/opac-article-request-cancel.pl (-1 / +1 lines)
Lines 50-53 if ($id) { Link Here
50
    $ar->cancel();
50
    $ar->cancel();
51
}
51
}
52
52
53
print $query->redirect("/cgi-bin/koha/opac-user.pl#opac-user-article-requests");
53
print $query->redirect("/cgi-bin/koha/opac-user.pl?tab=opac-user-article-requests");
(-)a/opac/opac-modrequest-suspend.pl (-1 / +1 lines)
Lines 54-57 if ( $op eq 'cud-suspend' ) { Link Here
54
    );
54
    );
55
}
55
}
56
56
57
print $query->redirect("/cgi-bin/koha/opac-user.pl?opac-user-holds=1");
57
print $query->redirect("/cgi-bin/koha/opac-user.pl?tab=opac-user-holds");
(-)a/opac/opac-modrequest.pl (-1 / +1 lines)
Lines 71-74 if ( $reserve_id && $borrowernumber ) { Link Here
71
    }
71
    }
72
}
72
}
73
73
74
print $query->redirect("/cgi-bin/koha/opac-user.pl?opac-user-holds=1");
74
print $query->redirect("/cgi-bin/koha/opac-user.pl?tab=opac-user-holds");
(-)a/opac/opac-request-article.pl (-1 / +1 lines)
Lines 96-102 if ( $op eq 'cud-create' ) { Link Here
96
    };
96
    };
97
97
98
    if ($success) {
98
    if ($success) {
99
        print $cgi->redirect("/cgi-bin/koha/opac-user.pl?opac-user-article-requests=1");
99
        print $cgi->redirect("/cgi-bin/koha/opac-user.pl?tab=opac-user-article-requests");
100
        exit;
100
        exit;
101
    }
101
    }
102
102
(-)a/opac/opac-reserve.pl (-1 / +1 lines)
Lines 321-327 if ( $op eq 'cud-place_reserve' ) { Link Here
321
321
322
    print $query->redirect( "/cgi-bin/koha/opac-user.pl?"
322
    print $query->redirect( "/cgi-bin/koha/opac-user.pl?"
323
            . ( @failed_holds ? "failed_holds=" . join( '|', @failed_holds ) : q|| )
323
            . ( @failed_holds ? "failed_holds=" . join( '|', @failed_holds ) : q|| )
324
            . "&opac-user-holds=1" );
324
            . "&tab=opac-user-holds" );
325
    exit;
325
    exit;
326
}
326
}
327
327
(-)a/opac/opac-user.pl (-14 / +10 lines)
Lines 420-438 if ( C4::Context->preference("ArticleRequests") ) { Link Here
420
}
420
}
421
421
422
$template->param(
422
$template->param(
423
    patron_messages            => $patron_messages,
423
    patron_messages          => $patron_messages,
424
    opacnote                   => $borr->{opacnote},
424
    opacnote                 => $borr->{opacnote},
425
    patronupdate               => $patronupdate,
425
    patronupdate             => $patronupdate,
426
    OpacRenewalAllowed         => C4::Context->preference("OpacRenewalAllowed"),
426
    OpacRenewalAllowed       => C4::Context->preference("OpacRenewalAllowed"),
427
    userview                   => 1,
427
    userview                 => 1,
428
    tab                        => scalar $query->param('tab') || 0,
428
    tab                      => scalar $query->param('tab') || q{},
429
    SuspendHoldsOpac           => C4::Context->preference('SuspendHoldsOpac'),
429
    SuspendHoldsOpac         => C4::Context->preference('SuspendHoldsOpac'),
430
    AutoResumeSuspendedHolds   => C4::Context->preference('AutoResumeSuspendedHolds'),
430
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
431
    OpacHoldNotes              => C4::Context->preference('OpacHoldNotes'),
431
    OpacHoldNotes            => C4::Context->preference('OpacHoldNotes'),
432
    failed_holds               => scalar $query->param('failed_holds'),
432
    failed_holds             => scalar $query->param('failed_holds'),
433
    opac_user_holds            => scalar $query->param('opac-user-holds')            || 0,
434
    opac_user_overdues         => scalar $query->param('opac-user-overdues')         || 0,
435
    opac_user_article_requests => scalar $query->param('opac-user-article-requests') || 0,
436
);
433
);
437
434
438
# if not an empty string this indicates to return
435
# if not an empty string this indicates to return
439
- 

Return to bug 41558