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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-136 / +140 lines)
Lines 308-459 Link Here
308
        <div class="container-fluid">
308
        <div class="container-fluid">
309
            <div class="row">
309
            <div class="row">
310
                <div class="col order-first order-md-first order-lg-2">
310
                <div class="col order-first order-md-first order-lg-2">
311
                    <ul class="nav nav-tabs" role="tablist">
311
                    [% WRAPPER tabs %]
312
                        <li class="nav-item" role="presentation">
312
                        [% WRAPPER tabs_nav %]
313
                            <a class="nav-link active" href="#checkouts-tab" id="checkouts" aria-controls="home" aria-selected="true" data-bs-toggle="tab">Checkouts ([% issues_count | html %])</a>
313
                            [% WRAPPER tab_item tabname= "checkouts" bt_active= 1 %]
314
                        </li>
314
                                <span>Checkouts ([% issues_count | html %])</span>
315
                        <li class="nav-item" role="presentation">
315
                            [% END %]
316
                            <a class="nav-link" href="#holds-tab" id="holds" aria-controls="home" aria-selected="false" data-bs-toggle="tab">
316
                            [% WRAPPER tab_item tabname= "holds" %]
317
                                [% IF waiting_holds_count %]
317
                                [% IF waiting_holds_count %]
318
                                    <i class="fa fa-exclamation-circle" aria-hidden="true"></i>
318
                                    <i class="fa fa-exclamation-circle" aria-hidden="true"></i>
319
                                [% END %]
319
                                [% END %]
320
                                Holds ([% HOLDS.count | html %])
320
                                <span>Holds</span> ([% HOLDS.count | html %])
321
                            </a>
321
                            [% END %]
322
                        </li>
322
                            [% WRAPPER tab_item tabname= "account" %]
323
                        <li class="nav-item" role="presentation">
323
                                <span>Charges ([% total | $Price %])</span>
324
                            <a class="nav-link" href="#account-tab" id="account" aria-controls="home" aria-selected="false" data-bs-toggle="tab">Charges ([% total | $Price %])</a>
324
                            [% END %]
325
                        </li>
325
                        [% END # /WRAPPER tabs_nav %]
326
                    </ul>
326
327
                    <div class="tab-content">
327
                        [% WRAPPER tab_panels %]
328
                        <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts">
328
                            [% WRAPPER tab_panel tabname="checkouts" bt_active= 1 %]
329
                            <div id="borrowerdetails">
329
                                <div id="checkouts-tab" class="tab-pane show active" aria-labelledby="checkouts">
330
                                [% IF ( new_issue ) %]
330
                                    <div id="borrowerdetails">
331
                                    <div class="lastchecked">
331
                                        [% IF ( new_issue ) %]
332
                                        <p>
332
                                            <div class="lastchecked">
333
                                            <strong>Checked out: </strong>
333
                                                <p>
334
                                            [% new_issue.item.biblio.title | html %] ([% new_issue.item.barcode | html %]).
334
                                                    <strong>Checked out: </strong>
335
335
                                                    [% new_issue.item.biblio.title | html %] ([% new_issue.item.barcode | html %]).
336
                                            [% IF new_issue.item.is_bundle %]
336
337
                                                [% SET bundle_items_count = new_issue.item.bundle_items.count %]
337
                                                    [% IF new_issue.item.is_bundle %]
338
                                                [% tnx('Bundle of {count} item', 'Bundle of {count} items', bundle_items_count, { count = bundle_items_count }) | html %].
338
                                                        [% SET bundle_items_count = new_issue.item.bundle_items.count %]
339
                                            [% END %]
339
                                                        [% tnx('Bundle of {count} item', 'Bundle of {count} items', bundle_items_count, { count = bundle_items_count }) | html %].
340
                                                    [% END %]
340
341
341
                                            Due on [% new_issue.date_due | $KohaDates as_due_date => 1 %]
342
                                                    Due on [% new_issue.date_due | $KohaDates as_due_date => 1 %]
342
                                        </p>
343
                                                </p>
343
                                    </div>
344
                                            </div>
344
                                [% END %]
345
                                        [% END %]
345
                                [% IF ( issues_count ) %]
346
                                        [% IF ( issues_count ) %]
346
                                    [% IF ( Koha.Preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %]
347
                                            [% IF ( Koha.Preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %]
347
                                    <table id="loanTable" class="table table-bordered table-striped">
348
                                            <table id="loanTable" class="table table-bordered table-striped">
348
                                        <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
349
                                                <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
349
                                        <!-- ISSUES TABLE ROWS -->
350
                                                <!-- ISSUES TABLE ROWS -->
350
                                        <thead>
351
                                                <thead>
351
                                            <tr>
352
                                                    <tr>
352
                                                <th class="noshow">Checked out on</th>
353
                                                        <th class="noshow">Checked out on</th>
353
                                                <th class="all anti-the">Title</th>
354
                                                        <th class="all anti-the">Title</th>
354
                                                <th>Call number</th>
355
                                                        <th>Call number</th>
355
                                                <th class="psort">Due</th>
356
                                                        <th class="psort">Due</th>
356
                                                <th class="all nosort">Renew</th>
357
                                                        <th class="all nosort">Renew</th>
357
                                                [% UNLESS ( nofines ) %]
358
                                                        [% UNLESS ( nofines ) %]
358
                                                    <th>Fines</th>
359
                                                            <th>Fines</th>
359
                                                [% END %]
360
                                                <th></th>
361
                                            </tr>
362
                                        </thead>
363
                                        <tbody>
364
                                            [% FOREACH ISSUE IN ISSUES %]
365
                                                <tr>
366
                                                    <td>[% ISSUE.issuedate | html %]</td>
367
                                                    <td>
368
                                                        [% UNLESS ( noitemlinks ) %]
369
                                                            <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE.  biblionumber | uri %]">[% ISSUE.title | html %]</a>
370
                                                        [% ELSE %]
371
                                                            <strong>[% ISSUE.title | html %]</strong>
372
                                                        [% END %]
373
                                                        [% IF ( newissues.match(ISSUE.barcode)) %]
374
                                                            <span class="badge text-bg-info">NEW</span>
375
                                                        [% END %]
360
                                                        [% END %]
376
                                                        <span class="item-details">[% ISSUE.author | html %]</span>
361
                                                        <th></th>
377
                                                        ([% ISSUE.barcode | html %])
362
                                                    </tr>
378
                                                    </td>
363
                                                </thead>
379
                                                    <td>[% ISSUE.itemcallnumber | html %]</td>
364
                                                <tbody>
380
                                                    [% IF ( ISSUE.overdue ) %]
365
                                                    [% FOREACH ISSUE IN ISSUES %]
381
                                                        <td class="overdue" data-order="[% ISSUE.date_due | html %]">
366
                                                        <tr>
382
                                                            [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
367
                                                            <td>[% ISSUE.issuedate | html %]</td>
383
                                                        </td>
368
                                                            <td>
384
                                                    [% ELSE   %]
369
                                                                [% UNLESS ( noitemlinks ) %]
385
                                                        <td data-order="[% ISSUE.date_due | html %]">
370
                                                                    <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE.  biblionumber | uri %]">[% ISSUE.title | html %]</a>
386
                                                            [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
387
                                                        </td>
388
                                                    [% END %]
389
                                                    <td>
390
                                                        <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
391
                                                            [% INCLUDE 'csrf-token.inc' %]
392
                                                            <legend class="sr-only">Issue renews</legend>
393
                                                            <input type="hidden" name="patronid" value="[% patronid | html %]" />
394
                                                            <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" />
395
                                                            <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
396
                                                            <input type="hidden" name="newissues" value="[% newissues | html %]" />
397
                                                            [% IF ISSUE.can_be_renewed %]
398
                                                                <input type="hidden" name="op" value="cud-renew" />
399
                                                                <input type="hidden" name="confirmed" value="1" />
400
                                                                [% UNLESS ( ISSUE.renew ) %]
401
                                                                    <input type="submit" value="Renew item"  name="confirm  " class="btn btn-primary btn-sm renew" />
402
                                                                [% ELSE %]
371
                                                                [% ELSE %]
403
                                                                    <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" />
372
                                                                    <strong>[% ISSUE.title | html %]</strong>
404
                                                                [% END %]
373
                                                                [% END %]
405
                                                            [% ELSE %]
374
                                                                [% IF ( newissues.match(ISSUE.barcode)) %]
406
                                                                [% IF ISSUE.renew_error == 'onsite_checkout' %]
375
                                                                    <span class="badge text-bg-info">NEW</span>
407
                                                                    <span>This is a on-site checkout, it cannot be renewed.</span>
408
                                                                [% ELSIF ISSUE.renew_error == 'too_unseen' %]
409
                                                                    <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span>
410
                                                                [% ELSIF ISSUE.renew_error == 'too_soon' %]
411
                                                                    <span>This item cannot yet be renewed.</span>
412
                                                                [% ELSE %]
413
                                                                    <span>No renewals allowed</span>
414
                                                                [% END %]
415
                                                                [% IF Koha.Preference('SCOAllowCheckin') %]
416
                                                                    <div>
417
                                                                        <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
418
                                                                        <input type="hidden" name="op" value="cud-returnbook" />
419
                                                                        <input type="hidden" name="confirmed" value=""  />
420
                                                                    </div>
421
                                                                [% END %]
376
                                                                [% END %]
377
                                                                <span class="item-details">[% ISSUE.author | html %]</span>
378
                                                                ([% ISSUE.barcode | html %])
379
                                                            </td>
380
                                                            <td>[% ISSUE.itemcallnumber | html %]</td>
381
                                                            [% IF ( ISSUE.overdue ) %]
382
                                                                <td class="overdue" data-order="[% ISSUE.date_due | html %]">
383
                                                                    [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
384
                                                                </td>
385
                                                            [% ELSE   %]
386
                                                                <td data-order="[% ISSUE.date_due | html %]">
387
                                                                    [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
388
                                                                </td>
422
                                                            [% END %]
389
                                                            [% END %]
423
                                                            [% IF ISSUE.auto_renew %]
390
                                                            <td>
424
                                                                <br><span>This item is scheduled for automatic renewal</span>
391
                                                                <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
392
                                                                    [% INCLUDE 'csrf-token.inc' %]
393
                                                                    <legend class="sr-only">Issue renews</legend>
394
                                                                    <input type="hidden" name="patronid" value="[% patronid | html %]" />
395
                                                                    <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" />
396
                                                                    <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
397
                                                                    <input type="hidden" name="newissues" value="[% newissues | html %]" />
398
                                                                    [% IF ISSUE.can_be_renewed %]
399
                                                                        <input type="hidden" name="op" value="cud-renew" />
400
                                                                        <input type="hidden" name="confirmed" value="1" />
401
                                                                        [% UNLESS ( ISSUE.renew ) %]
402
                                                                            <input type="submit" value="Renew item"  name="confirm  " class="btn btn-primary btn-sm renew" />
403
                                                                        [% ELSE %]
404
                                                                            <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" />
405
                                                                        [% END %]
406
                                                                    [% ELSE %]
407
                                                                        [% IF ISSUE.renew_error == 'onsite_checkout' %]
408
                                                                            <span>This is a on-site checkout, it cannot be renewed.</span>
409
                                                                        [% ELSIF ISSUE.renew_error == 'too_unseen' %]
410
                                                                            <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span>
411
                                                                        [% ELSIF ISSUE.renew_error == 'too_soon' %]
412
                                                                            <span>This item cannot yet be renewed.</span>
413
                                                                        [% ELSE %]
414
                                                                            <span>No renewals allowed</span>
415
                                                                        [% END %]
416
                                                                        [% IF Koha.Preference('SCOAllowCheckin') %]
417
                                                                            <div>
418
                                                                                <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
419
                                                                                <input type="hidden" name="op" value="cud-returnbook" />
420
                                                                                <input type="hidden" name="confirmed" value=""  />
421
                                                                            </div>
422
                                                                        [% END %]
423
                                                                    [% END %]
424
                                                                    [% IF ISSUE.auto_renew %]
425
                                                                        <br><span>This item is scheduled for automatic renewal</span>
426
                                                                    [% END %]
427
                                                                </form>
428
                                                            </td>
429
                                                            [% UNLESS ( nofines ) %]
430
                                                                <td>
431
                                                                    [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
432
                                                                </td>
425
                                                            [% END %]
433
                                                            [% END %]
426
                                                        </form>
434
                                                            <td></td>
427
                                                    </td>
435
                                                        </tr>
428
                                                    [% UNLESS ( nofines ) %]
436
                                                    [% END # / FOREACH ISSUE %]
429
                                                        <td>
437
                                                </tbody>
430
                                                            [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
438
                                            </table>
431
                                                        </td>
439
                                            [% ELSE %]
432
                                                    [% END %]
440
                                                <a class="btn btn-secondary" href="?load_checkouts=1#scan_form"><i class="fa fa-book" aria-hidden="true"></i> Show your checkouts</a>
433
                                                    <td></td>
441
                                            [% END # / IF ( Koha.preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %]
434
                                                </tr>
442
                                        [% ELSE %]
435
                                            [% END # / FOREACH ISSUE %]
443
                                            <h3>You currently have nothing checked out.</h3>
436
                                        </tbody>
444
                                        [% END # / IF issues_count %]
437
                                    </table>
445
                                    </div> <!-- / #borrowerdetails -->
438
                                    [% ELSE %]
446
                                </div>
439
                                        <a class="btn btn-secondary" href="?load_checkouts=1#scan_form"><i class="fa fa-book" aria-hidden="true"></i> Show your checkouts</a>
447
                            [% END # /tab_panel %]
440
                                    [% END # / IF ( Koha.preference('SCOLoadCheckoutsByDefault') || load_checkouts ) %]
448
                            [% WRAPPER tab_panel tabname="holds" %]
449
                                [% IF HOLDS.count > 0 %]
450
                                    [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
441
                                [% ELSE %]
451
                                [% ELSE %]
442
                                    <h3>You currently have nothing checked out.</h3>
452
                                    <h3>You currently have no pending holds.</h3>
443
                                [% END # / IF issues_count %]
453
                                [% END %]
444
                            </div> <!-- / #borrowerdetails -->
454
                            [% END # /tab_panel %]
445
                        </div>
455
                            [% WRAPPER tab_panel tabname="account" %]
446
                        <div id="holds-tab" class="tab-pane" role="tabpanel" aria-labelledby="holds">
456
                                [% PROCESS 'account-table.inc' %]
447
                            [% IF HOLDS.count > 0 %]
457
                            [% END # /tab_panel %]
448
                                [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
458
                        [% END # /WRAPPER tab_panels %]
449
                            [% ELSE %]
459
                    [% END # /WRAPPER tabs %]
450
                                <h3>You currently have no pending holds.</h3>
460
451
                            [% END %]
461
452
                        </div>
453
                        <div id="account-tab" class="tab-pane" role="tabpanel" aria-labelledby="account">
454
                            [% PROCESS 'account-table.inc' %]
455
                        </div>
456
                    </div>
457
                        [% ELSE # IF validuser %]
462
                        [% ELSE # IF validuser %]
458
                            <div class="sco_entry" >
463
                            <div class="sco_entry" >
459
                                <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
464
                                <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
460
- 

Return to bug 37048