Hi Devs!
My setup:
Tiki: 18.0
PHP: 7.0.32
Linux: CentOS 7
mPDF: v7.0.3
One feature that bothered me was the lack of repetition of the header in PLUGIN DBReport when generated in PDF (usually via PLUGIN LISTEXECUTE) in tables that were divided into more than one page.
Reading the mPDF documentation I discovered that the header line that was wrapped around the < thead> TAG is repeated on each page that the table is split.
If a table is split onto more than one page, the first row of the table will be repeated at the top of the new page if < thead> or < tfoot> is defined
I changed the code in /lib/wiki-plugins/wikiplugin_dbreport.php file as the snippet below:
615 public function header_row_html($data) 616 { 617 $html = ''; 618 // generate a new table 619 if (isset($this->style)) { 620 $html .= '<table' . $this->style->attributes() . '>' . "\n" . '<thead>' . "\n"; 621 } else { 622 $html .= '<table>' . "\n" . '<thead>' . "\n"; 623 } 624 // write headers 625 $style_index = 0; 626 if (isset($this->headers)) { 627 $html .= $this->line_row_html($this->headers, $data, true); 628 } 629 $html .= '</thead>'; NEW return $html; 630 }
After this change, all tables generated by PLUGIN DBReport that split on more than one page in the PDF file automatically repeats the header.
I believe that other PLUGINS that generate tables (like PLUGIN LIST, for example) can benefit from this functionality (thead TAG involving the header line).
I have helped in something.
Salutes from Brazil!
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |