This patch modifies the output of reports so that if certain columns are
returned the data in the colums automatically offer menus of actions:
- borrowernumber: View, edit, check out
- cardnumber: Check out
- itemnumber: View, edit
- biblionumber: View, edit
Like the menu of batch operations, this functionality is available only
if the column is returned with its original name (e.g. biblionumber or
[[biblionumber|Biblio number]] but not "biblionumber AS `Biblio
number`).
To test, apply the patch and run a report which will return examples of
each kind of data. I used:
SELECT biblio.biblionumber , biblio.title, items.itemnumber,
items.itemcallnumber, items.barcode, borrowers.firstname,
borrowers.surname, borrowers.borrowernumber, borrowers.cardnumber
FROM issues
LEFT JOIN borrowers ON borrowers.borrowernumber=issues.borrowernumber
LEFT JOIN items ON issues.itemnumber=items.itemnumber
LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber
ORDER BY RAND() LIMIT 50
When the report runs you should see that the data in each affected
column is displayed as a link, each of which should trigger the correct
menu. Test each case to confirm that the correct page is opened.
Test the "toggle data menus" control. Clicking it should hide and show
the menus in the report results. The selection persists until the
user logs out.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>