| Lines 25-31
          This script displays items in the tmp_holdsqueue table
      
      
        Link Here | 
        
          | 25 | use Modern::Perl; | 25 | use Modern::Perl; | 
        
          | 26 | use CGI qw ( -utf8 ); | 26 | use CGI qw ( -utf8 ); | 
        
          | 27 | use C4::Auth qw( get_template_and_user ); | 27 | use C4::Auth qw( get_template_and_user ); | 
          
            
              | 28 | use C4::Output qw( output_html_with_http_headers ); | 28 | use C4::Output qw( output_html_with_http_headers pagination_bar ); | 
        
          | 29 | use C4::HoldsQueue qw( GetHoldsQueueItems ); | 29 | use C4::HoldsQueue qw( GetHoldsQueueItems ); | 
        
          | 30 | use Koha::BiblioFrameworks; | 30 | use Koha::BiblioFrameworks; | 
        
          | 31 | use Koha::ItemTypes; | 31 | use Koha::ItemTypes; | 
  
    | Lines 43-58
          my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
      
      
        Link Here | 
        
          | 43 | my $params = $query->Vars; | 43 | my $params = $query->Vars; | 
        
          | 44 | my $run_report     = $params->{'run_report'}; | 44 | my $run_report     = $params->{'run_report'}; | 
        
          | 45 | my $branchlimit    = $params->{'branchlimit'}; | 45 | my $branchlimit    = $params->{'branchlimit'}; | 
          
            
              | 46 | my $itemtypeslimit = $params->{'itemtypeslimit'}; | 46 | my $limit          = $params->{'limit'} || 20; | 
            
              |  |  | 47 | my $page           = $params->{'page'}  || 1; | 
        
          | 47 |  | 48 |  | 
        
          | 48 | if ( $run_report ) { | 49 | if ( $run_report ) { | 
          
            
              | 49 |     # XXX GetHoldsQueueItems() does not support $itemtypeslimit! | 50 |     my ( $items, $total ) = GetHoldsQueueItems( $branchlimit, $limit, $page ); | 
            
              | 50 |     my $items = GetHoldsQueueItems($branchlimit, $itemtypeslimit); | 51 |  | 
            
              |  |  | 52 |     my $pages = int( $total / $limit ) + ( ( $total % $limit ) > 0 ? 1 : 0 ); | 
        
          | 51 |     $template->param( | 53 |     $template->param( | 
          
            
              | 52 |         branchlimit     => $branchlimit, | 54 |         branchlimit    => $branchlimit, | 
            
              | 53 |         total      => scalar @$items, | 55 |         total          => $total, | 
            
              | 54 |         itemsloop  => $items, | 56 |         itemsloop      => $items, | 
            
              | 55 |         run_report => $run_report, | 57 |         run_report     => $run_report, | 
            
              |  |  | 58 |         page           => $page, | 
            
              | 59 |         limit          => $limit, | 
            
              | 60 |         pagination_bar => pagination_bar( | 
            
              | 61 |             'view_holdsqueue.pl', | 
            
              | 62 |             $pages, | 
            
              | 63 |             $page, | 
            
              | 64 |             'page', | 
            
              | 65 |             { | 
            
              | 66 |                 branchlimit    => $branchlimit, | 
            
              | 67 |                 itemtypeslimit => $itemtypeslimit, | 
            
              | 68 |                 ccodeslimit    => $ccodeslimit, | 
            
              | 69 |                 locationslimit => $locationslimit, | 
            
              | 70 |                 limit          => $limit, | 
            
              | 71 |                 run_report     => 1, | 
            
              | 72 |             } | 
            
              | 73 |         ), | 
        
          | 56 |     ); | 74 |     ); | 
        
          | 57 | } | 75 | } | 
        
          | 58 |  | 76 |  |