From: Owen Leonard Date: Wed, 7 Mar 2012 19:06:45 +0000 (-0500) Subject: Bug 7668 - Improve navigation and toolbar options in guided reports X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=20b68731e3d950dddb986805f6b7bd6f79e880d7;p=koha.git Bug 7668 - Improve navigation and toolbar options in guided reports Creating new include, reports-toolbar.inc for presenting "action" options to the user, in contrast with "view" options in the left- hand navigation menu. In the toolbar: New (guided report, SQL report), Edit, Run. The presence of the toolbar allows the user to access functions more flexibly: Getting directly to 'edit' or 'run' from the 'view' page for instance. Modifications to guided_reports.pl pass report id and name to the template for clarity and for the purpose of enabling the edit/run buttons. To test: Apply the patch and go through the process of creating a new saved SQL report. Note that the toolbar is present and the buttons are functional at appropriate times. New and Edit options should only be displayed if the user has permission to create reports. Test with a user who does not have create permission to confirm. Signed-off-by: Jared Camins-Esakov Signed-off-by: Paul Poulain --- diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index e8821f589e..78dd4f9d61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -886,7 +886,16 @@ fieldset.rows .inputnote { background-repeat : no-repeat; } -#editpatron a, #editmenuc .first-child, #editshelf a, #edit a, #editsupplier a, #managelabel a, #managetemplate a, #managelabelbatch a, #manageprofile a { +#editpatron a, +#editreport a, +#editmenuc .first-child, +#editshelf a, +#edit a, +#editsupplier a, +#managelabel a, +#managetemplate a, +#managelabelbatch a, +#manageprofile a { padding-left : 34px; background-image: url("../../img/toolbar-edit.gif"); background-position : center left; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc index d3541709a7..aa03be8ad1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc @@ -1,8 +1,6 @@ -
Build and Run Reports
+
Run Reports
    - [% IF ( CAN_user_reports_create_reports ) %]
  • Build New
  • [% END %] - [% IF ( CAN_user_reports_execute_reports ) %]
  • Use Saved
  • [% END %] - [% IF ( CAN_user_reports_create_reports ) %]
  • Create from SQL
  • [% END %] + [% IF ( CAN_user_reports_execute_reports ) %]
  • Saved reports
  • [% END %]
Reports Dictionary
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc new file mode 100644 index 0000000000..a4e42262be --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc @@ -0,0 +1,44 @@ +[% UNLESS ( no_add ) %] +
    + + +
      + [% IF ( CAN_user_reports_create_reports ) %]
    • New guided report
    • [% END %] +
    • New SQL report
    • + [% IF ( showsql || execute || editsql || save_successful ) %] + [% UNLESS ( errors ) %][%# Unless there are errors saving a report %] + [% UNLESS ( editsql ) %][%# Do not show edit button on edit page %] + [% IF ( CAN_user_reports_create_reports ) %]
    • Edit
    • [% END %] + [% END %] +
    • Run report
    • + [% END %] + [% END %] +
    +
    +[% END %] \ No newline at end of file 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 03b007de30..8dbbb03bd6 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 @@ -87,6 +87,7 @@ $(document).ready(function(){
    + [% INCLUDE "reports-toolbar.inc" %] [% IF ( start ) %]

    Guided Reports

    @@ -562,7 +563,8 @@ canned reports and writing custom SQL reports.

    -
    + Cancel + [% END %] @@ -603,7 +605,13 @@ Sub report: +
    + [% reportname %] +
      + [% IF ( notes ) %]
    1. Notes: [% notes %]
    2. [% ELSE %][% END %] +
    3. +
    +
    [% END %] [% IF ( editsql ) %] @@ -611,16 +619,17 @@ Sub report:
    -Edit SQL +Edit SQL report
      -
    1. +
    -
    + Cancel + @@ -629,7 +638,7 @@ Sub report: