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

(-)a/admin/aqbudgetperiods.pl (-21 / +14 lines)
Lines 72-78 my $budget_period_hashref= $input->Vars; Link Here
72
#my $sort1_authcat = $input->param('sort1_authcat');
72
#my $sort1_authcat = $input->param('sort1_authcat');
73
#my $sort2_authcat = $input->param('sort2_authcat');
73
#my $sort2_authcat = $input->param('sort2_authcat');
74
74
75
my $pagesize    = 20;
76
$searchfield =~ s/\,//g;
75
$searchfield =~ s/\,//g;
77
76
78
my ($template, $borrowernumber, $cookie, $staff_flags ) = get_template_and_user(
77
my ($template, $borrowernumber, $cookie, $staff_flags ) = get_template_and_user(
Lines 245-271 elsif ( $op eq 'duplicate_budget' ){ Link Here
245
# DEFAULT - DISPLAY AQPERIODS TABLE
244
# DEFAULT - DISPLAY AQPERIODS TABLE
246
# -------------------------------------------------------------------
245
# -------------------------------------------------------------------
247
# display the list of budget periods
246
# display the list of budget periods
248
    my $results = GetBudgetPeriods();
247
my $results = GetBudgetPeriods();
249
	$template->param( period_button_only => 1 ) unless (@$results) ;
248
$template->param( period_button_only => 1 ) unless (@$results) ;
250
    my $page = $input->param('page') || 1;
249
my @period_loop;
251
    my $first = ( $page - 1 ) * $pagesize;
250
foreach my $result ( @$results ) {
252
    # if we are on the last page, the number of the last word to display
251
    my $budgetperiod = $result;
253
    # must not exceed the length of the results array
252
    FormatData($budgetperiod);
254
    my $last = min( $first + $pagesize - 1, scalar @{$results} - 1, );
253
    $budgetperiod->{'budget_period_total'} =
255
    my $toggle = 0;
254
      $num->format_price( $budgetperiod->{'budget_period_total'} );
256
    my @period_loop;
255
    $budgetperiod->{budget_active} = 1;
257
    foreach my $result ( @{$results}[ $first .. $last ] ) {
256
    push( @period_loop, $budgetperiod );
258
        my $budgetperiod = $result;
257
}
259
		FormatData($budgetperiod);
260
        $budgetperiod->{'budget_period_total'}     = $num->format_price( $budgetperiod->{'budget_period_total'} );
261
        $budgetperiod->{budget_active} = 1;
262
        push( @period_loop, $budgetperiod );
263
    }
264
258
265
    $template->param(
259
$template->param(
266
        period_loop           => \@period_loop,
260
    period_loop           => \@period_loop,
267
		pagination_bar		  => pagination_bar("aqbudgetperiods.pl",getnbpages(scalar(@$results),$pagesize),$page),
261
);
268
    );
269
262
270
$template->param($op=>1);
263
$template->param($op=>1);
271
output_html_with_http_headers $input, $cookie, $template->output;
264
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt (-9 / +9 lines)
Lines 1-8 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-close.inc' %]
2
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'calendar.inc' %]
3
[% INCLUDE 'calendar.inc' %]
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js" ></script>
6
[% INCLUDE 'datatables-strings.inc' %]
7
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
4
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
8
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6
<script type="text/javascript">
9
<script type="text/javascript">
7
// #################################################################################
10
// #################################################################################
8
// Javascript
11
// Javascript
Lines 69-81 Link Here
69
                    alert(alertString2);
72
                    alert(alertString2);
70
            }
73
            }
71
    }
74
    }
72
	$(document).ready(function() {
75
    $(document).ready(function() {
73
		 $("#periodsh").tablesorter({
76
         $("#periodsh").dataTable($.extend(true, {}, dataTablesDefaults, {
74
	            widgets : ['zebra'],
77
            'sPaginationType': 'four_button'
75
	            sortList: [[0,0]],
78
         }));
76
	            headers:  {6:{sorter:false}}
79
    });
77
	     });
78
	});
79
</script>
80
</script>
80
81
81
<title>
82
<title>
82
- 

Return to bug 8654