From fba4bce65c38eecd56d4543048117a2dfd4f0293 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 4 Jun 2020 11:51:38 +0000 Subject: [PATCH] Bug 25627: Move OPAC problem reports from administration to tools This patch moves the OPAC problem report management page from the Administration section to the Tools section. I think this makes sense because management of reports is an ongoing task, not a configuration. To test, apply the patch and enable the OPACReportProblem system preference. - Go to Administration. There should be no link to OPAC problem reports. - Open an administration page which shows the Administration menu in the left-hand sidebar, e.g. Libraries. There should be no link to OPAC problem reports in the menu. - Go to Tools. There should be a link to OPAC problem reports in the "Addional tools" section. - Open the OPAC problem reports page and confirm that it works correctly. - The breadcrumbs menu should show "Tools > OPAC problem reports." - Confirm that the link in the sidebar menu works correctly. - If necessary, submit an OPAC problem report via the OPAC so that there is a pending report. Go to the staff interface home page and check that the "OPAC problem reports pending" link works correctly. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit c2127901da52e0c35124b97ff4626d3ea943e655) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc | 3 --- koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 4 ---- koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 2 +- .../prog/en/modules/{admin => tools}/problem-reports.tt | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt | 5 +++++ {admin => tools}/problem-reports.pl | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) rename koha-tmpl/intranet-tmpl/prog/en/modules/{admin => tools}/problem-reports.tt (98%) rename {admin => tools}/problem-reports.pl (97%) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc index 53d1610c4e..1be43b1fbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -151,9 +151,6 @@ [% IF ( Koha.Preference('EnableAdvancedCatalogingEditor') && CAN_user_parameters_manage_keyboard_shortcuts ) %]
  • Keyboard shortcuts
  • [% END %] - [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %] -
  • OPAC problem reports
  • - [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc index 6526d0c3cb..ba3f54a281 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -133,6 +133,9 @@ [% IF ( CAN_user_tools_access_files ) %]
  • Access files
  • [% END %] + [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %] +
  • OPAC problem reports
  • + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt index bb6a94b811..f1ef9fc643 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -240,10 +240,6 @@
    Keyboard shortcuts
    Define which keys trigger actions in the advanced cataloging editor
    [% END %] - [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %] -
    OPAC problem reports
    -
    Manage OPAC problem reports submitted by patrons
    - [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt index fbf727b6ef..569af7ac82 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -190,7 +190,7 @@ [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) %]
    - OPAC problem reports pending: + OPAC problem reports pending: [% pending_problem_reports.count | html %]
    [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/problem-reports.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt similarity index 98% rename from koha-tmpl/intranet-tmpl/prog/en/modules/admin/problem-reports.tt rename to koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt index b2e0ea5a08..889a235733 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/problem-reports.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt @@ -14,7 +14,7 @@ [% INCLUDE 'prefs-admin-search.inc' %] @@ -42,7 +42,7 @@ [% END %] [% IF ( problem_reports.count ) %] -
    +
    @@ -109,7 +109,7 @@
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt index f0a35aa359..ae4608c684 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt @@ -78,6 +78,7 @@
    Upload patron images
    Upload patron images in a batch or one at a time
    [% END %] +
    @@ -141,6 +142,10 @@ [% END %] [% END %] + [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %] +
    OPAC problem reports
    +
    Manage OPAC problem reports submitted by patrons
    + [% END %] diff --git a/admin/problem-reports.pl b/tools/problem-reports.pl similarity index 97% rename from admin/problem-reports.pl rename to tools/problem-reports.pl index 70b97276c2..c9a1afd222 100755 --- a/admin/problem-reports.pl +++ b/tools/problem-reports.pl @@ -29,7 +29,7 @@ my $query = new CGI; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "admin/problem-reports.tt", + template_name => "tools/problem-reports.tt", query => $query, type => "intranet", authnotrequired => 0, -- 2.39.5