Lines 471-549
Link Here
|
471 |
[% INCLUDE 'budgets-active-currency.inc' %] |
471 |
[% INCLUDE 'budgets-active-currency.inc' %] |
472 |
|
472 |
|
473 |
<div id="budgetsTabs" class="toptabs"> |
473 |
<div id="budgetsTabs" class="toptabs"> |
474 |
<ul> |
474 |
<ul class="nav nav-tabs" role="tablist"> |
475 |
<li><a href="#active">Active budgets</a></li> |
475 |
<li role="presentation" class="active"> |
476 |
<li><a href="#inactive">Inactive budgets</a></li> |
476 |
<a href="#active" aria-controls="active" role="tab" data-toggle="tab">Active budgets</a> |
|
|
477 |
</li> |
478 |
<li role="presentation"> |
479 |
<a href="#inactive" aria-controls="inactive" role="tab" data-toggle="tab">Inactive budgets</a> |
480 |
</li> |
477 |
</ul> |
481 |
</ul> |
478 |
|
482 |
<div class="tab-content"> |
479 |
<div id="active"> |
483 |
<div id="active" role="tabpanel" class="tab-pane active"> |
480 |
[% IF ( period_active_loop ) %] |
484 |
[% IF ( period_active_loop ) %] |
481 |
<table id="activeperiodst"> |
485 |
<table id="activeperiodst"> |
482 |
<thead> |
486 |
<thead> |
483 |
<tr> |
|
|
484 |
<th>Budget name</th> |
485 |
<th>Start date</th> |
486 |
<th>End date</th> |
487 |
<th>Locked</th> |
488 |
<th>Total</th> |
489 |
<th class="noExport">Actions</th> |
490 |
</tr> |
491 |
</thead> |
492 |
<tbody> |
493 |
[% FOREACH period_active IN period_active_loop %] |
494 |
<tr> |
487 |
<tr> |
495 |
<td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_active.budget_period_id | uri %]" title="View funds for [% period_active.budget_period_description | html %]">[% period_active.budget_period_description | html %]</a></td> |
488 |
<th>Budget name</th> |
496 |
<td data-order="[% period_active.budget_period_startdate | html %]">[% period_active.budget_period_startdate | $KohaDates %]</td> |
489 |
<th>Start date</th> |
497 |
<td data-order="[% period_active.budget_period_enddate | html %]">[% period_active.budget_period_enddate | $KohaDates %]</td> |
490 |
<th>End date</th> |
498 |
<td> |
491 |
<th>Locked</th> |
499 |
[% IF ( period_active.budget_period_locked ) %] |
492 |
<th>Total</th> |
500 |
<i class="fa fa-lock"></i> Locked</span> |
493 |
<th class="noExport">Actions</th> |
501 |
[% END %] |
|
|
502 |
</td> |
503 |
<td class="data">[% period_active.budget_period_total | $Price %]</td> |
504 |
<td> |
505 |
[% PROCESS action_menu block_budget=period_active %] |
506 |
</td> |
507 |
</tr> |
494 |
</tr> |
508 |
[% END %] |
495 |
</thead> |
509 |
</tbody> |
496 |
<tbody> |
510 |
</table> |
497 |
[% FOREACH period_active IN period_active_loop %] |
511 |
[% ELSE %] |
498 |
<tr> |
512 |
No active budgets |
499 |
<td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_active.budget_period_id | uri %]" title="View funds for [% period_active.budget_period_description | html %]">[% period_active.budget_period_description | html %]</a></td> |
513 |
[% END %] |
500 |
<td data-order="[% period_active.budget_period_startdate | html %]">[% period_active.budget_period_startdate | $KohaDates %]</td> |
514 |
</div> |
501 |
<td data-order="[% period_active.budget_period_enddate | html %]">[% period_active.budget_period_enddate | $KohaDates %]</td> |
515 |
<div id="inactive"> |
502 |
<td> |
516 |
[% IF ( period_inactive_loop ) %] |
503 |
[% IF ( period_active.budget_period_locked ) %] |
517 |
<table id="inactiveperiodst"> |
504 |
<i class="fa fa-lock"></i> Locked</span> |
518 |
<thead> |
505 |
[% END %] |
519 |
<tr> |
506 |
</td> |
520 |
<th>Budget name</th> |
507 |
<td class="data">[% period_active.budget_period_total | $Price %]</td> |
521 |
<th>Start date</th> |
508 |
<td> |
522 |
<th>End date</th> |
509 |
[% PROCESS action_menu block_budget=period_active %] |
523 |
<th>Locked</th> |
510 |
</td> |
524 |
<th>Total</th> |
511 |
</tr> |
525 |
<th class="noExport">Actions</th> |
512 |
[% END %] |
526 |
</tr> |
513 |
</tbody> |
527 |
</thead> |
514 |
</table> |
528 |
<tbody> |
515 |
[% ELSE %] |
529 |
[% FOREACH period_loo IN period_inactive_loop %] |
516 |
No active budgets |
530 |
<tr> |
517 |
[% END %] |
531 |
<td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_loo.budget_period_id | uri %]" title="View funds for [% period_loo.budget_period_description | html %]">[% period_loo.budget_period_description | html %]</a></td> |
518 |
</div> |
532 |
<td data-order="[% period_loo.budget_period_startdate | html %]">[% period_loo.budget_period_startdate | $KohaDates %]</td> |
519 |
<div id="inactive" role="tabpanel" class="tab-pane"> |
533 |
<td data-order="[% period_loo.budget_period_enddate | html %]">[% period_loo.budget_period_enddate | $KohaDates %]</td> |
520 |
[% IF ( period_inactive_loop ) %] |
534 |
<td>[% IF ( period_loo.budget_period_locked ) %]<i class="fa fa-lock"></i> Locked[% END %]</td> |
521 |
<table id="inactiveperiodst"> |
535 |
<td class="data">[% period_loo.budget_period_total | $Price %]</td> |
522 |
<thead> |
536 |
<td> |
523 |
<tr> |
537 |
[% PROCESS action_menu block_budget=period_loo %] |
524 |
<th>Budget name</th> |
538 |
</td> |
525 |
<th>Start date</th> |
539 |
</tr> |
526 |
<th>End date</th> |
540 |
[% END %] |
527 |
<th>Locked</th> |
541 |
</tbody> |
528 |
<th>Total</th> |
542 |
</table> |
529 |
<th class="noExport">Actions</th> |
543 |
[% ELSE %] |
530 |
</tr> |
544 |
No inactive budgets |
531 |
</thead> |
545 |
[% END %] |
532 |
<tbody> |
546 |
</div> |
533 |
[% FOREACH period_loo IN period_inactive_loop %] |
|
|
534 |
<tr> |
535 |
<td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_loo.budget_period_id | uri %]" title="View funds for [% period_loo.budget_period_description | html %]">[% period_loo.budget_period_description | html %]</a></td> |
536 |
<td data-order="[% period_loo.budget_period_startdate | html %]">[% period_loo.budget_period_startdate | $KohaDates %]</td> |
537 |
<td data-order="[% period_loo.budget_period_enddate | html %]">[% period_loo.budget_period_enddate | $KohaDates %]</td> |
538 |
<td>[% IF ( period_loo.budget_period_locked ) %]<i class="fa fa-lock"></i> Locked[% END %]</td> |
539 |
<td class="data">[% period_loo.budget_period_total | $Price %]</td> |
540 |
<td> |
541 |
[% PROCESS action_menu block_budget=period_loo %] |
542 |
</td> |
543 |
</tr> |
544 |
[% END %] |
545 |
</tbody> |
546 |
</table> |
547 |
[% ELSE %] |
548 |
No inactive budgets |
549 |
[% END %] |
550 |
</div> |
551 |
</div> <!-- /.tab-content --> |
547 |
</div> |
552 |
</div> |
548 |
[% END %] |
553 |
[% END %] |
549 |
|
554 |
|
Lines 566-575
Link Here
|
566 |
[% Asset.js("js/acq.js") | $raw %] |
571 |
[% Asset.js("js/acq.js") | $raw %] |
567 |
<script> |
572 |
<script> |
568 |
$(document).ready(function() { |
573 |
$(document).ready(function() { |
569 |
var tabs = $('#budgetsTabs').tabs(); |
|
|
570 |
[% IF ( tab ) %] |
574 |
[% IF ( tab ) %] |
571 |
tabs.tabs("option", "active", [% tab | html %]); |
575 |
$("#budgetsTabs li:eq([% tab | html %]) a").tab("show"); |
572 |
[% END %] |
576 |
[% END %] |
|
|
577 |
|
573 |
$("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, { |
578 |
$("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, { |
574 |
"aoColumnDefs": [ |
579 |
"aoColumnDefs": [ |
575 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
580 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
576 |
- |
|
|