RSS Git Download  Clone
Raw Blame History
[% content_only = 1 # no html wrappers %]

<!-- BEGIN printrun/wrapper.tt -->
<html>
<head>
  <title>PrintRun</title>
  <link type="text/css" media="print" rel="stylesheet" href="/css/print.css" />
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

    [%
        offset = c.query.param('offset') || 0; # next offset value
        count  = c.query.param('total')  || 0;  # total number of records in print run
        start  = c.query.param('start') | uri;
        end    = c.query.param('end')   | uri;
        
        offset_next  = offset + 50;
        offset_lower = offset_next + 1;  # start of next offset
        offset_upper = offset_next + 50; # end of next offset
    %]
<body>
    <!--
    count = [% count %]; offset = [% offset %]; offset_lower = [% offset_lower %];
    offset_upper = [% offset_upper %]l start = [% start %]; end = [% end %]
    -->

    [% # create url for 'next 50':        
        url = [];
        url.push("total=$count");
        url.push("offset=$offset_next");
        url.push("start=$start");
        url.push("end=$end"); # PROCESS dumper.tt dump = url;
    %]
    
  <p class="classname">[% site.html.back_button %]
    <span class="printHide" style="font-weight: bold; float: right">
      [% IF count >= offset_lower; # still more records to print: %]
        <a class"button" href="[% app_url %]/printrun/do_offset?[% url.join(';') %]">
          [% offset_lower %] to [% ( offset_upper > count ) ? count : offset_upper %]
          &#187;
        </a>
      [% ELSE %]
        [finished]
      [% END %]
    </span>
  </p>
  [% FOREACH report IN reports %]
      <div style="page-break-after: always">[% report %]</div>        
  [% END %]
</body>
</html>
<!-- END printrun/wrapper.tt -->