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

Kyle M Hall (khall) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #183411|0                           |1
        is obsolete|                            |

--- Comment #3 from Kyle M Hall (khall) <[email protected]> ---
Created attachment 191050
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191050&action=edit
Bug 40095: Add context to intranet_js plugin hook

The get_plugins_intranet_js method now passes the current script name
(controller) to plugins via a 'page' parameter, allowing plugins to
determine which page/controller is being displayed.

This will allow plugin authors to only return JS that's relevant to the
current page when they wish to do so.

Test plan:
1. Create a plugin with an intranet_js method that logs the received parameters
2. Navigate to different pages in the staff interface
3. Verify that the plugin receives the page parameter containing the script
name
4. Confirm that the script name reflects the actual controller (e.g.,
   '/cgi-bin/koha/admin/admin-home.pl' when on the admin home page)
5. Run the test: prove t/db_dependent/Koha/Template/Plugin/KohaPlugins.t
6. Verify that the new test passes, confirming plugins receive the page
parameter

Signed-off-by: Roman Dolny <[email protected]>

Signed-off-by: Kyle M Hall <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to