Bug 33596: Merge result page is missing page-section

This patch adds a "page-section" container around the contents of the
page seen when you complete the process of merging catalog records.

The patch also adds the "merge was successful" message into the standard
message dialog.

Perform a catalog search which will return more than one record.

- Select two records in your search results and click "Edit" -> "Merge
  records."
- Complete the process of merging your selected records.
- On the last page you should see a "merge was successful" message
  styled as the standard information box.
- The "Report" section should be shown inside a "page-section" div.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c2991bd6b0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2023-04-24 19:09:00 +00:00 committed by Martin Renvoize
parent b6a8c6ce59
commit 0442b15a89
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 40 additions and 38 deletions

View File

@ -50,48 +50,50 @@ div#result { margin-top: 1em; }
[% END %]
[% ELSE %]
<p>The merge was successful. <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% ref_biblionumber | uri %]">View the merged record.</a></p>
<h3>Report</h3>
<table>
<thead>
<tr>
<th>Biblionumber</th>
[% FOREACH key IN report_header.keys.sort %]
[% tag = key.substr(0, 3) %]
[% code = key.substr(3, 1) %]
[% IF code == '@' %]
[% header = tag %]
[% ELSE %]
[% header = tag _ '$' _ code %]
[% END %]
<th>[% header | html %]</th>
[% END %]
</tr>
</thead>
<tbody>
[% FOREACH record IN report_records %]
<div class="dialog message">The merge was successful. <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% ref_biblionumber | uri %]">View the merged record.</a></div>
<div class="page-section">
<h3>Report</h3>
<table>
<thead>
<tr>
<td>
[% record.biblionumber | html %]
[% IF loop.first %]
<span>(record kept)</span>
[% END %]
</td>
<th>Biblionumber</th>
[% FOREACH key IN report_header.keys.sort %]
<td>
[% values = record.fields.$key %]
[% IF values %]
[% FOREACH value IN record.fields.$key %]
[% value | html %]
[% UNLESS loop.last %]<br />[% END %]
[% END %]
[% END %]
</td>
[% tag = key.substr(0, 3) %]
[% code = key.substr(3, 1) %]
[% IF code == '@' %]
[% header = tag %]
[% ELSE %]
[% header = tag _ '$' _ code %]
[% END %]
<th>[% header | html %]</th>
[% END %]
</tr>
[% END %]
</tbody>
</table>
</thead>
<tbody>
[% FOREACH record IN report_records %]
<tr>
<td>
[% record.biblionumber | html %]
[% IF loop.first %]
<span>(record kept)</span>
[% END %]
</td>
[% FOREACH key IN report_header.keys.sort %]
<td>
[% values = record.fields.$key %]
[% IF values %]
[% FOREACH value IN record.fields.$key %]
[% value | html %]
[% UNLESS loop.last %]<br />[% END %]
[% END %]
[% END %]
</td>
[% END %]
</tr>
[% END %]
</tbody>
</table>
</div> <!-- /.page-section -->
[% END %]
[% ELSE %]