Bug 25627: Move OPAC problem reports from administration to tools
authorOwen Leonard <oleonard@myacpl.org>
Thu, 4 Jun 2020 11:51:38 +0000 (11:51 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 15 Jun 2020 09:53:36 +0000 (11:53 +0200)
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 <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt [moved from koha-tmpl/intranet-tmpl/prog/en/modules/admin/problem-reports.tt with 98% similarity]
koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt
tools/problem-reports.pl [moved from admin/problem-reports.pl with 97% similarity]

index 53d1610..1be43b1 100644 (file)
             [% IF ( Koha.Preference('EnableAdvancedCatalogingEditor') && CAN_user_parameters_manage_keyboard_shortcuts ) %]
                 <li><a href="/cgi-bin/koha/admin/adveditorshortcuts.pl">Keyboard shortcuts</a></li>
             [% END %]
-            [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %]
-                <li><a href="/cgi-bin/koha/admin/problem-reports.pl">OPAC problem reports</a></li>
-            [% END %]
         </ul>
     [% END %]
 </div>
index 6526d0c..ba3f54a 100644 (file)
     [% IF ( CAN_user_tools_access_files ) %]
     <li><a href="/cgi-bin/koha/tools/access_files.pl">Access files</a></li>
     [% END %]
+    [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %]
+        <li><a href="/cgi-bin/koha/tools/problem-reports.pl">OPAC problem reports</a></li>
+    [% END %]
 </ul>
 [% END %]
 </div></div>
index bb6a94b..f1ef9fc 100644 (file)
                         <dt><a href="/cgi-bin/koha/admin/adveditorshortcuts.pl">Keyboard shortcuts</a></dt>
                         <dd>Define which keys trigger actions in the advanced cataloging editor</dd>
                     [% END %]
-                    [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %]
-                        <dt><a href="/cgi-bin/koha/admin/problem-reports.pl">OPAC problem reports</a></dt>
-                        <dd>Manage OPAC problem reports submitted by patrons</dd>
-                    [% END %]
                 </dl>
             [% END %]
             </div>
index fbf727b..569af7a 100644 (file)
 
                                 [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) %]
                                     <div class="pending-info" id="problem_reports_pending">
-                                        <a href="/cgi-bin/koha/admin/problem-reports.pl">OPAC problem reports pending</a>:
+                                        <a href="/cgi-bin/koha/tools/problem-reports.pl">OPAC problem reports pending</a>:
                                         <span class="pending-number-link">[% pending_problem_reports.count | html %]</span>
                                     </div>
                                 [% END %]
@@ -14,7 +14,7 @@
 [% INCLUDE 'prefs-admin-search.inc' %]
 <div id="breadcrumbs">
     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
-    <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;
+    <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
     OPAC problem reports
 </div>
 
@@ -42,7 +42,7 @@
             [% END %]
 
             [% IF ( problem_reports.count ) %]
-                <form id="mark_selected" method="post" action="/cgi-bin/koha/admin/problem-reports.pl">
+                <form id="mark_selected" method="post" action="/cgi-bin/koha/tools/problem-reports.pl">
                     <div id="toolbar" class="btn-toolbar">
                         <button type="submit" class="btn btn-default markviewed" name="mark_selected-viewed" value="viewed" disabled="disabled"><i class="fa fa-eye"></i> Mark viewed</button>
                         <button type="submit" class="btn btn-default markclosed" name="mark_selected-closed" value="closed" disabled="disabled"><i class="fa fa-times-circle"></i> Mark closed</button>
 
         <div class="col-sm-2 col-sm-pull-10">
             <aside>
-                [% INCLUDE 'admin-menu.inc' %]
+                [% INCLUDE 'tools-menu.inc' %]
             </aside>
         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
 
index f0a35aa..ae4608c 100644 (file)
@@ -78,6 +78,7 @@
     <dt><a href="/cgi-bin/koha/tools/picture-upload.pl">Upload patron images</a></dt>
     <dd>Upload patron images in a batch or one at a time</dd>
     [% END %]
+
     </dl>
 </div>
 
         [% END %]
     [% END %]
 
+    [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %]
+        <dt><a href="/cgi-bin/koha/tools/problem-reports.pl">OPAC problem reports</a></dt>
+        <dd>Manage OPAC problem reports submitted by patrons</dd>
+    [% END %]
 
 </dl>
 </div>
similarity index 97%
rename from admin/problem-reports.pl
rename to tools/problem-reports.pl
index 70b9727..c9a1afd 100755 (executable)
@@ -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,