@@ -, +, @@ --- cataloguing/concerns.pl | 37 +++ .../prog/en/modules/cataloguing/concerns.tt | 229 ++++++++++++++++++ .../prog/en/modules/intranet-main.tt | 9 +- .../prog/en/modules/tools/tools-home.tt | 5 + mainpage.pl | 6 + 5 files changed, 285 insertions(+), 1 deletion(-) create mode 100755 cataloguing/concerns.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt --- a/cataloguing/concerns.pl +++ a/cataloguing/concerns.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use CGI qw ( -utf8 ); +use C4::Context; +use C4::Auth qw( get_template_and_user ); +use C4::Output qw( output_html_with_http_headers ); + +my $query = CGI->new; +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "cataloguing/concerns.tt", + query => $query, + type => "intranet", + flagsrequired => { cataloguing => '*' }, + } +); + +output_html_with_http_headers $query, $cookie, $template->output; + +1; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt @@ -0,0 +1,229 @@ +[% USE raw %] +[% USE Asset %] +[% SET footerjs = 1 %] +[% USE TablesSettings %] +[% INCLUDE 'doc-head-open.inc' %] + + Concerns › Cataloging › Koha + +[% INCLUDE 'doc-head-close.inc' %] + + + + [% INCLUDE 'header.inc' %] + [% INCLUDE 'cataloging-search.inc' %] + + + +
+
+
+
+ + +

Concerns

+ +
+ + + + + + + + + + +
ReportedConcernTitleStatusActions
+
+
+ +
+ +
+
+ + + + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + [% INCLUDE 'js-date-format.inc' %] + [% INCLUDE 'js-patron-format.inc' %] + [% INCLUDE 'js-biblio-format.inc' %] + +[% END %] +[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -166,7 +166,7 @@
[%# 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('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('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && pending_catalog_concerns && CAN_user_editcatalogue_edit_catalogue ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs || new_curbside_pickups.count %]
[% IF pending_article_requests %]
@@ -221,6 +221,13 @@
[% END %] + [% IF ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue %] +
+ Catalog concerns pending: + [% pending_catalog_concerns | html %] +
+ [% END %] + [% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count %]
Checkout notes pending: --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt @@ -224,6 +224,11 @@
Perform inventory of your catalog
[% END %] + [% IF ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue %] +
Catalog concerns
+
Manage catalog concern reports
+ [% END %] + [% IF ( CAN_user_tools_label_creator ) %]
Label creator
Create printable labels and barcodes from catalog data
--- a/mainpage.pl +++ a/mainpage.pl @@ -31,6 +31,7 @@ use Koha::Patron::Discharge; use Koha::Reviews; use Koha::ArticleRequests; use Koha::ProblemReports; +use Koha::Catalog::Concerns; use Koha::Quotes; use Koha::Suggestions; use Koha::BackgroundJobs; @@ -103,6 +104,11 @@ my $pending_article_requests = Koha::ArticleRequests->search_limited( )->count; my $pending_problem_reports = Koha::ProblemReports->search({ status => 'New' }); +if ( C4::Context->preference('CatalogConcerns') || C4::Context->preference('OpacCatalogConcerns') ) { + my $concerns = Koha::Catalog::Concerns->search({ resolved_date => undef }); + $template->param( pending_catalog_concerns => $concerns->count ); +} + unless ( $logged_in_user->has_permission( { parameters => 'manage_background_jobs' } ) ) { my $already_ran_jobs = Koha::BackgroundJobs->search( { borrowernumber => $logged_in_user->borrowernumber } )->count ? 1 : 0; --