Bugzilla – Attachment 143248 Details for
Bug 31028
Add 'Report a concern' feature for patrons to report concerns about catalog records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31028: Add ability to report concerns from the staff interface
Bug-31028-Add-ability-to-report-concerns-from-the-.patch (text/plain), 26.73 KB, created by
Martin Renvoize (ashimema)
on 2022-11-04 15:52:18 UTC
(
hide
)
Description:
Bug 31028: Add ability to report concerns from the staff interface
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-11-04 15:52:18 UTC
Size:
26.73 KB
patch
obsolete
>From e48e13701fdcf9fce9d1eadeb454059ac19e56b7 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 25 Oct 2022 15:33:04 +0100 >Subject: [PATCH] Bug 31028: Add ability to report concerns from the staff > interface > >This patch brings the CatalogConcerns feature to the staff client >allowing non-cataloguers to report issues with catalog records from the >record details page. > >Test plan >1) Enable the new `CatalogConcerns` system preference >2) Confirm that without the `edit_catalogue` permission your user can > submit a catalog concern via `New -> New catalog concern` from the > toolbar on a records detail display. >3) Confirm that the right user was recorded as the reporter on the > catalog concern management page (You must have logged in again as a > user with the `edit_catalogue` permission to see this page. >--- > .../data/mysql/atomicupdate/bug_31028.pl | 8 +++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../prog/en/includes/cat-menu.inc | 4 +- > .../prog/en/includes/cat-toolbar.inc | 5 +- > .../includes/modals/add_catalog_concern.inc | 49 +++++++++++++++++++ > .../admin/preferences/cataloguing.pref | 8 +++ > .../en/modules/admin/preferences/opac.pref | 1 + > .../prog/en/modules/catalogue/ISBDdetail.tt | 11 +++++ > .../prog/en/modules/catalogue/MARCdetail.tt | 10 ++++ > .../prog/en/modules/catalogue/detail.tt | 11 +++++ > .../prog/en/modules/catalogue/imageviewer.tt | 11 +++++ > .../en/modules/catalogue/labeledMARCdetail.tt | 11 +++++ > .../prog/en/modules/catalogue/moredetail.tt | 11 +++++ > .../en/modules/cataloguing/cataloging-home.tt | 4 +- > .../prog/en/modules/circ/returns.tt | 12 ++++- > .../prog/en/modules/intranet-main.tt | 4 +- > .../prog/js/modals/add_catalog_concern.js | 43 ++++++++++++++++ > mainpage.pl | 2 +- > 18 files changed, 197 insertions(+), 9 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/modals/add_catalog_concern.inc > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js > >diff --git a/installer/data/mysql/atomicupdate/bug_31028.pl b/installer/data/mysql/atomicupdate/bug_31028.pl >index 3292dfe7d8..1333089b50 100644 >--- a/installer/data/mysql/atomicupdate/bug_31028.pl >+++ b/installer/data/mysql/atomicupdate/bug_31028.pl >@@ -125,5 +125,13 @@ return { > } > ); > say $out "Added new notice 'TICKET_NOTIFY'"; >+ >+ $dbh->do( >+ q{ >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >+ ('CatalogConcerns', '0', NULL, 'Allow users to report catalog concerns', 'YesNo') >+ } >+ ); >+ say $out "`CatalogConcerns` preference added"; > } > } >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 563692878c..caccf118a0 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -129,6 +129,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('casLogout','0','','Does a logout from Koha should also log the user out of CAS?','YesNo'), > ('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'), > ('casServerVersion','2', '2|3','Version of the CAS server Koha will connect to.','Choice'), >+('CatalogConcerns', '0', NULL, 'Allow users to report catalog concerns', 'YesNo'), > ('CatalogerEmails', '', '', 'Notify these catalogers by email when a catalog concern is submitted', 'free'), > ('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'), > ('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc >index 024b0c47e9..90cbd56bf2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc >@@ -29,7 +29,7 @@ > </ul> > [% END %] > >- [% IF ( CAN_user_tools_inventory || ( Koha.Preference('OpacCatalogConcerns') && CAN_user_editcatalogue_edit_catalogue ) ) %] >+ [% IF ( CAN_user_tools_inventory || ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) ) %] > <h5>Reports</h5> > <ul> > [% IF ( CAN_user_tools_inventory ) %] >@@ -37,7 +37,7 @@ > <a href="/cgi-bin/koha/tools/inventory.pl">Inventory</a> > </li> > [% END %] >- [% IF Koha.Preference('OpacCatalogConcerns') && CAN_user_editcatalogue_edit_catalogue %] >+ [% IF ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue %] > <li> > <a href="/cgi-bin/koha/cataloguing/concerns.pl">Catalog concerns</a> > </li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index a1ca101dba..b9a4c3184f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -2,7 +2,7 @@ > [% INCLUDE 'blocking_errors.inc' %] > <div id="toolbar" class="btn-toolbar"> > >-[% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_serials_create_subscription ) %] >+[% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_serials_create_subscription || Koha.Preference('CatalogConcerns') ) %] > <div class="btn-group"> > <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New <span class="caret"></span></button> > <ul class="dropdown-menu"> >@@ -23,6 +23,9 @@ > [% IF CAN_user_editcatalogue_edit_catalogue && ! EasyAnalyticalRecords %] > <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?parentbiblionumber=[% biblionumber | uri %]">New child record</a></li> > [% END %] >+ [% IF Koha.Preference('CatalogConcerns') %] >+ <li><a id="newconcern" role="button" href="#" data-toggle="modal" data-target="#addConcernModal">New catalog concern</a></li> >+ [% END %] > </ul> > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/add_catalog_concern.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/add_catalog_concern.inc >new file mode 100644 >index 0000000000..41028320be >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/add_catalog_concern.inc >@@ -0,0 +1,49 @@ >+[% USE AdditionalContents %] >+[% SET CatalogConcernHelp = AdditionalContents.get( location => "CatalogConcernHelp", lang => lang, library => logged_in_user.branchcode ) %] >+[% SET CatalogConcernTemplate = AdditionalContents.get( location => "CatalogConcernTemplate", lang => lang, library => logged_in_user.branchcode ) %] >+<!-- Add concern modal --> >+<div class="modal" id="addConcernModal" tabindex="-1" role="dialog" aria-labelledby="addConcernModalLabel" aria-hidden="true"> >+ <div class="modal-dialog modal-lg" role="document"> >+ <div class="modal-content modal-lg"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"> >+ <span aria-hidden="true">×</span> >+ </button> >+ <h4 class="modal-title" id="addConcernModalLabel">Add concern</h4> >+ </div> >+ <div class="modal-body"> >+ <fieldset id="concern_fieldset"> >+ <ol> >+ <li class="form-group row"> >+ <label for="concern_title" class="col-sm-1 col-form-label">Title: </label> >+ <div class="col-sm-11"> >+ <input type="text" name="concern_title" id="concern_title" class="form-control" required="required"/> >+ </div> >+ </li> >+ <li class="form-group"> >+ <label class="required" for="concern_body">Please describe your concern: </label> >+ <textarea class="form-control" id="concern_body" name="concern_body" required="required" rows="15"></textarea> >+ [%- IF CatalogConcernHelp && CatalogConcernHelp.content && CatalogConcernHelp.content.count > 0 -%] >+ [%- FOREACH help IN CatalogConcernHelp.content -%] >+ <p id="helpBlock" class="help-block">[%- help.content | $raw -%]</p> >+ [%- END -%] >+ [%- END -%] >+ <div class="hidden" id="concern_template"> >+ [%- IF CatalogConcernTemplate && CatalogConcernTemplate.content && CatalogConcernTemplate.content.count > 0 -%] >+ [%- FOREACH template IN CatalogConcernTemplate.content -%] >+ [%- template.content | $raw -%] >+ [%- END -%] >+ [%- END -%] >+ </div> >+ </li> >+ </ol> >+ </fieldset> >+ </div> <!-- /.modal-body --> >+ <div class="modal-footer"> >+ <input type="hidden" id="concern_biblio" name="biblio_id" value="[% biblionumber %]"> >+ <button type="submit" class="btn btn-primary" id="addConfirm">Submit <i id="concern-submit-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i></button> >+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> >+ </div> <!-- /.modal-footer --> >+ </div> <!-- /.modal-content --> >+ </div> <!-- /.modal-dialog --> >+</div> <!-- /#addConcernModal --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >index 6990d4b92c..33f5572863 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >@@ -42,6 +42,14 @@ Cataloging: > 1: "Allow" > 0: "Don't allow" > - authorized values to be created within the cataloguing module. Librarian will need the manage_auth_values subpermission. >+ - >+ - pref: CatalogConcerns >+ default: 0 >+ choices: >+ 0: "Don't allow" >+ 1: Allow >+ - "staff to report concerns about catalog records." >+ - '<p><strong>Note:</strong> You can also enable `<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacCatalogConcerns">OpacCatalogConcerns</a>` to allow OPAC users the same option.</p>' > - > - "Use " > - pref: CatalogerEmails >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 52419e66bc..8e9badac6a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -341,6 +341,7 @@ OPAC: > 0: "Don't allow" > 1: Allow > - "OPAC users to report concerns about catalog records." >+ - '<p><strong>Note:</strong> Enabling `<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CatalogConcerns">CatalogConcerns</a>` will allow concern submissions from the staff client.</p>' > - > - pref: OPACReportProblem > choices: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt >index 1b92e5b512..11e0567a4c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt >@@ -85,10 +85,21 @@ > </div> <!-- /.col-sm-2.col-sm-pull-10 --> > </div> <!-- /.row --> > >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ [% INCLUDE 'modals/add_catalog_concern.inc' %] >+ [% END %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'catalog-strings.inc' %] > [% Asset.js("js/catalog.js") | $raw %] > [% Asset.js("js/browser.js") | $raw %] >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ <script> >+ /* Set a variable needed by add_catalog_concern.js */ >+ var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >+ </script> >+ [% Asset.js("js/modals/add_catalog_concern.js") | $raw %] >+ [% END %] > <script> > var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10)); > browser.show(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt >index 49a287254d..eae6a1960d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt >@@ -209,11 +209,21 @@ > > [% END %] > >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ [% INCLUDE 'modals/add_catalog_concern.inc' %] >+ [% END %] > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'catalog-strings.inc' %] > [% Asset.js("js/catalog.js") | $raw %] > [% Asset.js("js/browser.js") | $raw %] >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ <script> >+ /* Set a variable needed by add_catalog_concern.js */ >+ var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >+ </script> >+ [% Asset.js("js/modals/add_catalog_concern.js") | $raw %] >+ [% END %] > <script> > var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10)); > browser.show(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 93aa33516e..c20772c09a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -1304,12 +1304,23 @@ Note that permanent location is a code, and location may be an authval. > </div> > [% END %] > >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ [% INCLUDE 'modals/add_catalog_concern.inc' %] >+ [% END %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'catalog-strings.inc' %] > [% Asset.js("js/catalog.js") | $raw %] > [% Asset.js("js/recalls.js") | $raw %] > [% Asset.js("js/coce.js") | $raw %] > [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %] >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ <script> >+ /* Set a variable needed by add_catalog_concern.js */ >+ var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >+ </script> >+ [% Asset.js("js/modals/add_catalog_concern.js") | $raw %] >+ [% END %] > <script> > var interface = "[% interface | html %]"; > var theme = "[% theme | html %]"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >index c2e11e7154..8397ce8b2a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >@@ -133,9 +133,20 @@ > </div> <!-- /.col-sm-2.col-sm-pull-10 --> > </div> <!-- /.row --> > >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ [% INCLUDE 'modals/add_catalog_concern.inc' %] >+ [% END %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'catalog-strings.inc' %] > [% Asset.js("js/catalog.js") | $raw %] >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ <script> >+ /* Set a variable needed by add_catalog_concern.js */ >+ var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >+ </script> >+ [% Asset.js("js/modals/add_catalog_concern.js") | $raw %] >+ [% END %] > <script> > var interface = "[% interface | html %]"; > var theme = "[% theme | html %]"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt >index cff5a1e7ac..cb1e6c65a1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt >@@ -95,10 +95,21 @@ > </div> <!-- /.row --> > [% END %] > >+[% IF ( Koha.Preference('CatalogConcerns') ) %] >+[% INCLUDE 'modals/add_catalog_concern.inc' %] >+[% END %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'catalog-strings.inc' %] > [% Asset.js("js/catalog.js") | $raw %] > [% Asset.js("js/browser.js") | $raw %] >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ <script> >+ /* Set a variable needed by add_catalog_concern.js */ >+ var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >+ </script> >+ [% Asset.js("js/modals/add_catalog_concern.js") | $raw %] >+ [% END %] > <script> > //<![CDATA[ > var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10)); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 553dfd8b02..7b16a2f49e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -389,6 +389,10 @@ > </div> <!-- /.col-sm-2.col-sm-pull-10 --> > </div> <!-- /.row --> > >+[% IF ( Koha.Preference('CatalogConcerns') ) %] >+[% INCLUDE 'modals/add_catalog_concern.inc' %] >+[% END %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'catalog-strings.inc' %] > [% INCLUDE 'modals/checkout_renewals.inc' %] >@@ -398,6 +402,13 @@ > [% Asset.js("js/catalog.js") | $raw %] > [% Asset.js("js/browser.js") | $raw %] > [% Asset.js("js/checkout_renewals_modal.js") | $raw %] >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ <script> >+ /* Set a variable needed by add_catalog_concern.js */ >+ var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >+ </script> >+ [% Asset.js("js/modals/add_catalog_concern.js") | $raw %] >+ [% END %] > <script> > var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10)); > browser.show(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >index dddb726456..0418628b33 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >@@ -91,7 +91,7 @@ > </ul> > [% END %] > >- [% IF ( CAN_user_tools_inventory || ( Koha.Preference('OpacCatalogConcerns') && CAN_user_editcatalogue_edit_catalogue ) ) %] >+ [% IF ( CAN_user_tools_inventory || ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) ) %] > <h3>Reports</h3> > <ul class="buttons-list"> > [% IF ( CAN_user_tools_inventory ) %] >@@ -100,7 +100,7 @@ > </li> > [% END %] > >- [% IF ( Koha.Preference('OpacCatalogConcerns') && CAN_user_editcatalogue_edit_catalogue ) %] >+ [% IF ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %] > <li> > <a class="circ-button" href="/cgi-bin/koha/cataloguing/concerns.pl"><i class="fa fa-list-ul"></i> Catalog concerns</a> > </li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index b396df21ba..b7d7009374 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -1364,6 +1364,10 @@ > </div> <!-- /#bundleMissingModal --> > [% END %] > >+[% IF ( Koha.Preference('CatalogConcerns') ) %] >+[% INCLUDE 'modals/add_catalog_concern.inc' %] >+[% END %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] >@@ -1376,7 +1380,13 @@ > </script> > [% Asset.js("js/resolve_claim_modal.js") | $raw %] > [% END %] >- >+ [% IF ( Koha.Preference('CatalogConcerns') ) %] >+ <script> >+ /* Set a variable needed by add_catalog_concern.js */ >+ var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >+ </script> >+ [% Asset.js("js/modals/add_catalog_concern.js") | $raw %] >+ [% END %] > <script> > function Dopop(link) { > var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); >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 0f25c1bcc8..a407807816 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -170,7 +170,7 @@ > <div class="row"> > <div class="col-sm-12"> > [%# Following statement must be in one line for translatability %] >- [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_suggestions_suggestions_manage && ( pendingsuggestions || all_pendingsuggestions )) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) || ( Koha.preference('OpacCatalogConcerns') && pending_biblio_tickets && CAN_user_editcatalogue_edit_catalogue ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs || new_curbside_pickups.count %] >+ [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_suggestions_suggestions_manage && ( pendingsuggestions || all_pendingsuggestions )) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) || ( ( Koha.preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && pending_biblio_tickets && CAN_user_editcatalogue_edit_catalogue ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs || new_curbside_pickups.count %] > <div id="area-pending" class="page-section"> > [% IF pending_article_requests %] > <div class="pending-info" id="article_requests_pending"> >@@ -225,7 +225,7 @@ > </div> > [% END %] > >- [% IF ( Koha.Preference('OpacCatalogConcerns') && CAN_user_editcatalogue_edit_catalogue ) %] >+ [% IF ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %] > <div class="pending-info" id="catalog_concerns_pending"> > <a href="/cgi-bin/koha/cataloguing/concerns.pl">Catalog concerns pending</a>: > <span class="pending-number-link">[% pending_biblio_tickets | html %]</span> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js b/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js >new file mode 100644 >index 0000000000..462a4b0b8f >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js >@@ -0,0 +1,43 @@ >+$(document).ready(function() { >+ >+ // Pre-populate empty message with template >+ $('#addConcernModal').on('show.bs.modal', function (e) { >+ let concern_body = $('#concern_body'); >+ if ( concern_body.val() === "" ) { >+ let template = $('#concern_template').text(); >+ concern_body.val(template); >+ } >+ }); >+ >+ $('#addConcernModal').on('click', '#addConfirm', function(e) { >+ let concern_title = $('#concern_title').val(); >+ let concern_body = $('#concern_body').val(); >+ let biblio_id = $('#concern_biblio').val(); >+ let reporter_id = $('#concern_reporter').val(); >+ >+ let params = { >+ title: concern_title, >+ body: concern_body, >+ biblio_id: biblio_id, >+ reporter_id: logged_in_user_borrowernumber, >+ }; >+ >+ $('#concern-submit-spinner').show(); >+ >+ $.ajax({ >+ url: '/api/v1/tickets', >+ type: 'POST', >+ data: JSON.stringify(params), >+ success: function(data) { >+ $('#concern-submit-spinner').hide(); >+ $('#addConcernModal').modal('hide'); >+ $('#concern_body').val(''); >+ $('#concern_title').val(''); >+ if ($.fn.dataTable.isDataTable("#table_concerns")) { >+ $("#table_concerns").DataTable().ajax.reload(); >+ } >+ }, >+ contentType: "json" >+ }); >+ }); >+}); >diff --git a/mainpage.pl b/mainpage.pl >index a1bc19d4d5..53f633500b 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -104,7 +104,7 @@ my $pending_article_requests = Koha::ArticleRequests->search_limited( > )->count; > my $pending_problem_reports = Koha::ProblemReports->search({ status => 'New' }); > >-if ( C4::Context->preference('OpacCatalogConcerns') ) { >+if ( C4::Context->preference('OpacCatalogConcerns') || C4::Context->preference('CatalogConcerns') ) { > my $pending_biblio_tickets = Koha::Tickets->search( > { > resolved_date => undef, >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31028
:
137412
|
139222
|
139223
|
139224
|
139225
|
139226
|
139227
|
139228
|
139229
|
139230
|
139231
|
139232
|
139233
|
139234
|
139235
|
139236
|
139237
|
139238
|
139572
|
139573
|
139574
|
139575
|
139576
|
139577
|
139578
|
139579
|
139580
|
139581
|
139582
|
139583
|
139584
|
139585
|
139586
|
139587
|
139588
|
139589
|
139590
|
139591
|
140289
|
140290
|
140291
|
140292
|
140293
|
140294
|
140295
|
140296
|
140297
|
140298
|
140299
|
140300
|
140301
|
140302
|
140303
|
140304
|
140305
|
140306
|
140307
|
140308
|
140436
|
140437
|
140438
|
140439
|
140440
|
140441
|
140442
|
140443
|
140444
|
140445
|
140446
|
140447
|
140448
|
140449
|
140450
|
140451
|
140452
|
140453
|
140454
|
140455
|
140764
|
140765
|
140766
|
140767
|
140768
|
140769
|
140770
|
140771
|
140772
|
140773
|
140774
|
140775
|
140776
|
140777
|
140778
|
140779
|
140780
|
140781
|
140782
|
140783
|
140793
|
140929
|
140930
|
140931
|
140932
|
140933
|
140934
|
140935
|
140936
|
140937
|
140938
|
140939
|
140940
|
140941
|
140942
|
140943
|
140944
|
140945
|
140946
|
140947
|
140948
|
140949
|
140950
|
141133
|
141134
|
141135
|
141136
|
141137
|
141138
|
141139
|
141140
|
141141
|
141142
|
141143
|
141144
|
141145
|
141146
|
141147
|
141148
|
141149
|
141150
|
141151
|
141152
|
141153
|
141154
|
141440
|
141441
|
141442
|
141443
|
141444
|
141445
|
141446
|
141447
|
141448
|
141449
|
141450
|
141451
|
141452
|
141453
|
141454
|
141455
|
141456
|
141457
|
141458
|
141459
|
141460
|
142164
|
142165
|
142166
|
142167
|
142168
|
142169
|
142170
|
142171
|
142172
|
142173
|
142174
|
142175
|
142177
|
142179
|
142180
|
142181
|
142182
|
142183
|
142184
|
142185
|
142186
|
142187
|
142188
|
142189
|
142190
|
142191
|
142616
|
142617
|
142618
|
142619
|
142620
|
142621
|
142622
|
142623
|
142624
|
142625
|
142626
|
142627
|
142932
|
142933
|
142934
|
142935
|
142936
|
142937
|
142938
|
142939
|
142940
|
142941
|
142942
|
142943
|
142944
|
142945
|
142946
|
142947
|
142948
|
142949
|
143238
|
143239
|
143240
|
143241
|
143242
|
143243
|
143244
|
143245
|
143246
|
143247
|
143248
|
143249
|
143250
|
143251
|
143252
|
143253
|
143254
|
143255
|
143256
|
143257
|
143302
|
143303
|
143304
|
143305
|
143306
|
143307
|
143308
|
143309
|
143310
|
143311
|
143312
|
143313
|
143314
|
143315
|
143316
|
143317
|
143318
|
143319
|
143320
|
143321
|
143322
|
143323
|
143324
|
143325
|
143326
|
143327
|
143328
|
143329
|
143330
|
143331
|
143332
|
143333
|
143334
|
143335
|
143336
|
143337
|
143338
|
143339
|
143340
|
143341
|
143470
|
143471
|
143472
|
143473
|
143474
|
143475
|
143476
|
143477
|
143478
|
143479
|
143480
|
143481
|
143482
|
143483
|
143484
|
143485
|
143486
|
143487
|
143488
|
143489
|
143490
|
143647
|
143648
|
143649
|
143650
|
143651
|
143652
|
143653
|
143654
|
143655
|
143656
|
143657
|
143658
|
143659
|
143660
|
143661
|
143662
|
143663
|
143664
|
143665
|
143666
|
143667
|
143708
|
143709
|
143710
|
143711
|
143712
|
143713
|
143714
|
143715
|
143716
|
143717
|
143718
|
143719
|
143720
|
143721
|
143722
|
143723
|
143724
|
143725
|
143726
|
143727
|
144647
|
144648
|
144649
|
144650
|
144651
|
144652
|
144653
|
144654
|
144655
|
144656
|
144657
|
144658
|
144659
|
144660
|
144661
|
144662
|
144663
|
144664
|
144665
|
144666
|
144667
|
144668
|
145542
|
146214
|
146215
|
146216
|
146217
|
146218
|
146219
|
146220
|
146221
|
146222
|
146223
|
146224
|
146225
|
146226
|
146227
|
146228
|
146229
|
146230
|
146231
|
146232
|
146233
|
146234
|
146235
|
146236
|
146237
|
146238
|
146239
|
146240
|
146241
|
146242
|
146243
|
146244
|
146245
|
146246
|
146247
|
146248
|
146249
|
146250
|
146251
|
146252
|
146253
|
146254
|
146255
|
146256
|
146257
|
146258
|
146259
|
146260
|
146261
|
146262
|
146697
|
146870
|
146871
|
146872
|
146873
|
146874
|
146875
|
146876
|
146877
|
146878
|
146879
|
146880
|
146881
|
146882
|
146883
|
146884
|
146885
|
146886
|
146887
|
146888
|
146889
|
146890
|
146891
|
146892
|
146893
|
146894
|
146895
|
146896
|
147797
|
147840
|
147841
|
147844
|
147859
|
147860
|
147861
|
147866
|
148673
|
149931