From 221642252238166674cf6eb851c13dc2e750af45 Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Fri, 1 Dec 2023 10:36:52 -0500 Subject: [PATCH] Bug 35463: Link preservation module help to the manual This patch links the various pages of the preservation module to each specific section of the preservation module chapter in the manual. To test: 1. Enable the PreservationModule system preference 2. Go to the Preservation module 3. Click "help" in the top right corner --> You are brought to the manual, but not a specific page 4. Apply patch 5. Click "Help" in the top right corner --> You are brought to the Preservation chapter of the manual 6. Click "Settings" 7. Click "Help" in the top right corner --> You are brought to the Settings section of the Preservation chapter of the manual 8. Choose a not for loan status for items added to the waiting list (the mandatory field) and submit 9. Click "Add a new processing" 10. Click "Help" in the top right corner --> You are brought to the Add a new processing section of the Preservation chapter of the manual 11. Fill out the form to create the processing and submit 12. Click "Edit this processing" 13. Click "Help" in the top right corner --> You are brought to the Add a new processing section of the Preservation chapter of the manual (there is no edit a processing section) 14. Click "Waiting list" 15. Click "Help" in the top right corner --> You are brought to the Waiting list section of the Preservation chapter of the manual 16. Add items to the waiting list 17. Click "Trains" 18. Click "Help" in the top right corner --> You are brought to the Trains section of the Preservation chapter of the manual 19. Click "New train" 20. Click "Help" in the top right corner --> You are brought to the New train section of the Preservation chapter of the manual 21. Fill out the form to create a new train and submit 22. Click "Add items" 23. Click "Help" in the top right corner --> You are brought to the Add items section of the Preservation chapter of the manual 24. Also check ERM help links to make sure nothing is broken Signed-off-by: Martin Renvoize Signed-off-by: Philip Orr Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer (cherry picked from commit fed8fc8618129dd31495d9d6ba283eff829db2ea) Signed-off-by: Fridolin Somers --- Koha/Manual.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Koha/Manual.pm b/Koha/Manual.pm index 11a871490e..4db9083541 100644 --- a/Koha/Manual.pm +++ b/Koha/Manual.pm @@ -234,6 +234,16 @@ our $mapping = { 'patroncards/manage' => '/tools.html#patron-card-creator', 'plugins/plugins-home' => '/plugins.html', 'plugins/plugins-upload' => '/plugins.html', + 'preservation/home' => '/preservation.html', + 'preservation/settings/processings/add' => '/preservation.html#add-a-new-processing', + 'preservation/settings/processings/edit/' => '/preservation.html#add-a-new-processing', + 'preservation/settings' => '/preservation.html#settings', + 'preservation/settings/' => '/preservation.html#settings', + 'preservation/trains' => '/preservation.html#trains', + 'preservation/trains/' => '/preservation.html#trains', + 'preservation/trains/add' => '/preservation.html#new-train', + 'preservation/trains//items/add' => '/preservation.html#add-items', + 'preservation/waiting-list' => '/preservation.html#waiting-list', 'reports/acquisitions_stats' => '/reports.html#acquisitions-statistics', 'reports/bor_issues_top' => '/reports.html#patrons-with-the-most-checkouts', 'reports/borrowers_out' => '/reports.html#patrons-with-no-checkouts', @@ -298,15 +308,15 @@ our $mapping = { sub get_url { my ( $url, $preferred_language ) = @_; my $file; - if ($url =~ /koha\/(.*)\.pl/ || $url =~ '/koha/(erm.*)') { + if ($url =~ /koha\/(.*)\.pl/ || $url =~ '/koha/(erm.*)' || $url =~ '/koha/(preservation.*)') { $file = $1; } else { $file = 'mainpage'; } $file =~ s/[^a-zA-Z0-9_\-\/]*//g; - if ( $file =~ m|^erm| ) { - $file =~ s|\d*$||; + if ( $file =~ m|^erm| || $file =~ m|^preservation|) { + $file =~ s|\d*+||g; } my $view; -- 2.39.5