Bug 32336: (QA follow-up) Use $metadata->schema
[srvgit] / mainpage.pl
index f5872e6..855913a 100755 (executable)
@@ -30,11 +30,13 @@ use Koha::Patron::Modifications;
 use Koha::Patron::Discharge;
 use Koha::Reviews;
 use Koha::ArticleRequests;
+use Koha::BiblioFrameworks;
 use Koha::ProblemReports;
 use Koha::Quotes;
 use Koha::Suggestions;
 use Koha::BackgroundJobs;
 use Koha::CurbsidePickups;
+use Koha::Tickets;
 
 my $query = CGI->new;
 
@@ -49,6 +51,9 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
 
 my $logged_in_user = Koha::Patrons->find($loggedinuser);
 
+# Checking if there is a Fast Cataloging Framework
+$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
+
 my $homebranch;
 if (C4::Context->userenv) {
     $homebranch = C4::Context->userenv->{'branch'};
@@ -103,6 +108,17 @@ my $pending_article_requests = Koha::ArticleRequests->search_limited(
 )->count;
 my $pending_problem_reports = Koha::ProblemReports->search({ status => 'New' });
 
+if ( C4::Context->preference('OpacCatalogConcerns') || C4::Context->preference('CatalogConcerns') ) {
+    my $pending_biblio_tickets = Koha::Tickets->search(
+        {
+            resolved_date => undef,
+            biblio_id     => { '!=' => undef }
+        }
+    );
+    $template->param(
+        pending_biblio_tickets => $pending_biblio_tickets->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;