[Koha-bugs] [Bug 34136] Add ability to render a report using a notice template

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 27 20:27:07 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136

--- Comment #1 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 152769
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152769&action=edit
Bug 34136: Add ability to render a report using a notice template

Sometimes it is useful to display the results of a report in a non-table
format. We should be able to create notice templates to render reports.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Create a new notice template using the new "Report" option from the
   "New notice" pulldown.
4) In the "Print" area, paste the following template:

[% FOREACH b IN data %]
<div class="panel panel-default">
  <div class="panel-heading">[% b.surname %], [% b.firstname %]</div>
  <div class="panel-body">Expiration: [% b.dateexpiry %]</div>
  <div class="panel-footer">ID: [% b.borrowernumber %]</div>
</div>
[% END %]

5) Create a report with the query: SELECT * FROM borrowers
6) Once the report is saved, use the new "Run with template" option to
   select the template you just created.
7) Note that instead of the results being a paged table, you instead
   see the results rendered as cards!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list