Bug 3134: add ability to selelct multiple reports to delete at once

This patch adds the option to select multiple saved reports for
deletion.

To test you must have two or more saved reports to delete. Deletion
should work properly when:

- Selecting one report for deletion by checking the box.
- Selecting more than one report for deletion by checking boxes.
- Clicking the old "Delete" link

Clicking the delete button should prompt you to confirm. Clicking cancel
should cancel.

Clicking the delete button when no boxes are checked should trigger an
alert asking you to select reports for deletion.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Functional tests pass, template tests pass.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 3134: [Follow-up] Ability to select multiple reports to delete at once

This follow-up moves the checkboxes into a separate column from the
report ID in order to prevent visual inconsistencies.

To test, repeat the test plan from the original patch:

You must have two or more saved reports to delete. Deletion
should work properly when:

- Selecting one report for deletion by checking the box.
- Selecting more than one report for deletion by checking boxes.
- Clicking the old "Delete" link

Clicking the delete button should prompt you to confirm. Clicking cancel
should cancel.

Clicking the delete button when no boxes are checked should trigger an
alert asking you to select reports for deletion.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works really nicely, passes all tests and the QA script.

There is one little thing to note: If you delete a single report
using the option from the menu, the line you want to delete
is highlighted in red. It would be nice to do that also for
deleting multiple reports.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 3134: highlight all selected reports when confirming deletion of multiple reports

This patch adds the same behavior when deleting 1 or more reports.
When checkboxes are checked and the "delete selected" button is pressed,
checked lines are hightlighted in red.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 3134: (follow-up) improve ID and peport name sorting on saved reports page

The sort for ID is alpha instead of numerical, same for the report
names.

To test:
create id=1, name=Report 1
create id=2, name=Report 2
create id=10, name=Report 10
create id=11, name=Report 11

Sorting by id:
without this patch 1, 10, 11, 2
with this patch: 1, 2, 10, 11

Sorting by name:
without this patch: Report 1, Report 10, Report 11, Report 2
with this patch: Report 1, Report 2, Report 10, Report 11

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 3134: (follow-up) Reindent delete_report

The first patch add a bad indentation for this routine. This patch fixes
that.

Also, the $sth->finish statement is useless and was removed.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10761: UT: add unit tests for save_report and delete_report in C4::Reports::Guided

The test are wrapped in a transaction.

Note : The last test (in comment) currently doesn't pass because it
needs some modifications of delete_report.

To test:
prove t/db_dependent/Reports_Guided.t
t/db_dependent/Reports_Guided.t .. ok
All tests successful.
Files=1, Tests=7,  0 wallclock secs ( 0.01 usr  0.01 sys +  0.28 cusr  0.02 csys =  0.32 CPU)
Result: PASS

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, tested with patch for bug 10761 applied.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10761: (follow-up) change return in C4::Reports::Guided::delete_report()

1/ delete_report should return undef is no parameter is given.
2/ delete_report returns the number of affected rows.
3/ delete_report should be tested with 1 and more parameters.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10761: (follow-up) use explicit return in C4::Reports::Guided::delete_report()

Now that we care about the return value of this routine, we'll keep
perlcritic happy.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10743: Add styles to 'my privacy' page in OPAC

This patch does a couple things.  Most importantly it adds
a new div around the privacy rules summary so that it can
be easily changed. It also moves the start of the form to
right above the form's select box so that it's not in the
new privacy rules div.

To test:

* Apply patch
* Enable the use of privacy via the sys prefs
* Log in to the OPAC
* Visit the 'my privacy' tab
* Make sure it looks okay
* Submit the form and make sure it works
* Repeat in the other theme

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Edit: Replaced a few tabs with spaces to keep the QA script happy.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, privacy options can still be edited.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10761: (follow-up) remove inadvertant dependence on Perl 5.14

As with commit 8f933bc04, Perl 5.14's support for array and hash
container functions accepting hashrefs and arrayrefs is a syntax
error in Perl 5.10.

To test:

Verify that t/db_dependent/Reports_Guided.t passes when run under
a Perl version older than 5.14.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>