Bugzilla – Attachment 8138 Details for
Bug 5698
Provide datepicker for sql reports runtime parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5698: Add date picker option to SQL Runtime Parameters
Bug-5698-Add-date-picker-option-to-SQL-Runtime-Par.patch (text/plain), 3.53 KB, created by
Jared Camins-Esakov
on 2012-03-10 15:03:30 UTC
(
hide
)
Description:
Bug 5698: Add date picker option to SQL Runtime Parameters
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-03-10 15:03:30 UTC
Size:
3.53 KB
patch
obsolete
>From f436b2eb7e32711d547f6f16fa488c0f24c4cabf Mon Sep 17 00:00:00 2001 >From: Ian Walls <koha.sekjal@gmail.com> >Date: Sat, 10 Mar 2012 09:03:20 -0500 >Subject: [PATCH] Bug 5698: Add date picker option to SQL Runtime Parameters >Content-Type: text/plain; charset="UTF-8" > >Adds a date picker for SQL reports with the 'date' authorised_value. Updates help >documentation for this new feature, as well. > >To test: >1. Create a new report with two date parameters, using the syntax: ><<Label for this selection of date|date>> >2. Run the report >3. Select dates >4. The SQL generated should format the dates properly in ISO, and keep track of which >date is which > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > .../prog/en/modules/help/reports/guided_reports.tt | 2 +- > reports/guided_reports.pl | 16 +++++++++++++++- > 2 files changed, 16 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/guided_reports.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/guided_reports.tt >index f89e887..2eaba5a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/guided_reports.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/guided_reports.tt >@@ -62,7 +62,7 @@ > <ul> > <li>The << and >> are just delimiters. You must put << at the beginning and >> at the end of your parameter</li> > <li>The <strong>Question to ask</strong> will be displayed on the left of the string to enter. >-<li>The <strong>authorised_value</strong> can be omitted if not applicable. If it contains an authorised value category, or <strong>branches</strong> or <strong>itemtype</strong> or <strong>categorycode</strong>, a list with the Koha authorised values will be displayed instead of a free field</li> >+<li>The <strong>authorised_value</strong> can be omitted if not applicable. If it contains an authorised value category, or <strong>branches</strong> or <strong>itemtype</strong> or <strong>categorycode</strong>, a list with the Koha authorised values will be displayed instead of a free field. If the authorised value is <strong>date</strong>, a date selector button will be added after the input field</li> > </ul> > > <p>Note that you can have more than one parameter in a given SQL</p> >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 27377e0..ce9370a 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -420,7 +420,21 @@ elsif ($phase eq 'Run this report'){ > for(my $i=0;$i<($#split/2);$i++) { > my ($text,$authorised_value) = split /\|/,$split[$i*2+1]; > my $input; >- if ($authorised_value) { >+ if ($authorised_value eq "date") { >+ $input = qq(<input id="date_$text" type="text" value="" size="10" name="sql_params"> >+ <img id="date_picker_$text" alt="Show Calendar" src="/intranet-tmpl/prog/en/lib/calendar/cal.gif"> >+ <script type="text/javascript"> >+ Calendar.setup( >+ { >+ inputField : "date_$text", >+ ifFormat : "%Y-%m-%d", >+ button : "date_picker_$text" >+ } >+ ); >+ </script> >+ ); >+ } >+ elsif ($authorised_value) { > my $dbh=C4::Context->dbh; > my @authorised_values; > my %authorised_lib; >-- >1.7.2.5
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 5698
:
8136
| 8138 |
8220