Bug 9214 - Show damaged status in the OPAC for items which are not for loan

Item statuses in the OPAC displayed according to a cascading hierarchy:
If something is lost it will appear as lost, "else if" it is checked out
it will appear as checked out, etc. I don't think there is a logical
reason why statuses should appear this way.

This patch modifies the logic in the template so that multiple statuses
can be displayed at the same time. The patch also wraps each status in
its own class so that libraries can apply custom CSS if they wish.

Some tweaks have been made to the LESS file adding some style to the
common "item-status" class for display of item statuses.

To test, apply the patch and view one or more titles in the OPAC which
have items with the following statuses: lost, checked out, damaged, not
for loan, waiting, on order, in transit, withdrawn, and available.

Modify items to have more that one status simultaneously, in particular
not for loan and damaged.

Also test the display of item statuses in the OPAC cart and the OPAC's
course details page (Course reserves -> [Course name]) since these pages
use the same include file.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 9214 [Compiled CSS] Show damaged status in the OPAC for items which are not for loan

This patch contains the compiled opac.css file generated from the
revised LESS file in this bug's other patch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12258 Adds Datatables to the Fines->Account page of patrons (members/boraccount.pl). Also adds a button "Filter paid transactions" to hide fines with no outstanding value (0.00).

Test steps :

* Create a few manual invoices with fines.
* Pay a fine.
* Go back to the account tab.
* Try the "Filter paid transactions" button. It should filter everything with 0.00 in the Outstanding column.
* Try the "Show all transactions" button.
* Play around with the buttons

Followed test steps. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12258 [Template follow-up] Datatable in Patrons Account Fines

This follow-up corrects some of the QA issues affecting the other patch,
as well as changing the way the "filter" option is displayed:

- Added the use of the DataTables include file
- Removed redundant document.ready
- Fixed single quotes
- Fixed default sort (should be date descending to match the current
  functionality)
- Adding missing <tr>
- Converted filter button to a link

The last change is a judgement call, but the button in the DataTables
toolbar looked awkward and caused ugly wrapping at narrower viewport
sizes. I think a link is more keeping with the pattern established by
"select all / clear all" links.

To test, apply both patches and view the account page
(members/boraccount.pl) for a patron who has paid and unpaid fines (the
more the better).

- Confirm that the default sort is by date descending.
- Confirm that DataTables controls (paging, search, result count) work
  correctly.
- Confirm that clicking the "Filter paid transactions" link works
  correctly to toggle display of paid transactions.

Works as expected. Passed koha-qa.pl.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, no problems found.
Passes QA script and tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>