From fe7eb3c35a3886ec230c19b25fa7f8878bd699ba Mon Sep 17 00:00:00 2001
From: Julian Maurice
Date: Thu, 2 Aug 2012 16:03:32 +0200
Subject: [PATCH] Bug 9117: Reports hierarchies management improvements
- Filter by groups using tabs
- Filter by subgroups using a dropdown list under each tab
- Allow to create new group and subgroups when building a new report or
editing an existing report (no need to go through admin AV interface)
+ Possibility to duplicate a report (new link in the table)
---
C4/Koha.pm | 21 +
.../en/modules/reports/guided_reports_start.tt | 459 +++++++++++---------
reports/guided_reports.pl | 42 ++-
3 files changed, 315 insertions(+), 207 deletions(-)
diff --git a/C4/Koha.pm b/C4/Koha.pm
index d38729a..b90502b 100644
--- a/C4/Koha.pm
+++ b/C4/Koha.pm
@@ -63,6 +63,7 @@ BEGIN {
&GetAuthorisedValueByCode
&GetKohaImageurlFromAuthorisedValues
&GetAuthValCode
+ &AddAuthorisedValue
&GetNormalizedUPC
&GetNormalizedISBN
&GetNormalizedEAN
@@ -1202,6 +1203,26 @@ sub GetKohaAuthorisedValueLib {
return $value;
}
+=head2 AddAuthorisedValue
+
+ AddAuthorisedValue($category, $authorised_value, $lib, $lib_opac);
+
+Create a new authorised value.
+
+=cut
+
+sub AddAuthorisedValue {
+ my ($category, $authorised_value, $lib, $lib_opac) = @_;
+
+ my $dbh = C4::Context->dbh;
+ my $query = qq{
+ INSERT INTO authorised_values (category, authorised_value, lib, lib_opac)
+ VALUES (?,?,?,?)
+ };
+ my $sth = $dbh->prepare($query);
+ $sth->execute($category, $authorised_value, $lib, $lib_opac);
+}
+
=head2 display_marc_indicators
my $display_form = C4::Koha::display_marc_indicators($field);
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
index fa0ae38..60927ed 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
@@ -14,36 +14,107 @@
[% END %]
[% END %]
+
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
-
-
-
+
+[% INCLUDE 'datatables-strings.inc' %]
+
@@ -148,65 +250,78 @@ canned reports and writing custom SQL reports.