Bug 27653: Use div instead of caption for controls

The funds and acquisitions home page tables use captions for additional
table controls. These are more appropriate as "toolbar" divs.

This patch converts the <caption> to <div class="toolbar btn-toolbar">
and moves it just above <table> in the markup to keep it valid.

To test:
1 - View the tables on acquisitions home and budgets views
2 - Note the 'Expand all...' control row
3 - Apply patch
4 - The row remains, but is below the table controls
5 - The row is not included when printing or copying the table

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a63748e241)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d0f350314a)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2021-02-09 19:31:33 +00:00 committed by Andrew Fuerste-Henry
parent a1651a70a6
commit 52fe978a09
2 changed files with 25 additions and 21 deletions

View File

@ -67,21 +67,22 @@
<h3>All available funds</h3>
<div id="BudgetsAndFunds">
<table id="accounts">
<caption>
<span class="actions"><a href="#" id="expand_all">Expand all</a>
| <a href="#" id="collapse_all">Collapse all</a>
| <a href="#" id="hide_inactive">Hide inactive budgets</a>
| <a href="#" id="show_inactive">Show inactive budgets</a>
| <select id="library-filter">
<option value="">Filter by library</option>
[% FOREACH b IN Branches.all %]
<option value="[% b.branchname | html %]">[% b.branchname | html %]</option>
[% END %]
</select>
</span>
<div class="toolbar btn-toolbar">
<span class="actions">
<a href="#" id="expand_all">Expand all</a> |
<a href="#" id="collapse_all">Collapse all</a> |
<a href="#" id="hide_inactive">Hide inactive budgets</a> |
<a href="#" id="show_inactive">Show inactive budgets</a> |
<select id="library-filter">
<option value="">Filter by library</option>
[% FOREACH b IN Branches.all %]
<option value="[% b.branchname | html %]">[% b.branchname | html %]</option>
[% END %]
</select>
</span>
</div>
</caption>
<table id="accounts">
<thead>
<tr>

View File

@ -51,15 +51,18 @@
[% IF budgets %]
<table id="budgeth" class="group">
[% UNLESS budget_period_id %]
<caption>
<span class="actions"><a href="#" id="expand_all">Expand all</a>
| <a href="#" id="collapse_all">Collapse all</a>
| <a href="#" id="hide_inactive">Hide inactive budgets</a>
| <a href="#" id="show_inactive">Show inactive budgets</a></span>
</caption>
<div class="toolbar btn-toolbar">
<span class="actions">
<a href="#" id="expand_all">Expand all</a> |
<a href="#" id="collapse_all">Collapse all</a> |
<a href="#" id="hide_inactive">Hide inactive budgets</a> |
<a href="#" id="show_inactive">Show inactive budgets</a>
</span>
</div>
[% END %]
<table id="budgeth" class="group">
<thead>
<tr>
<th>Active</th>