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>