Bug 31773: Add page-section class to Manage staged MARC records page

To test:
1. Apply patch
2. Have some MARC records and stage them for import. It will be nessesary to add more than 1
3. Go to the Manage staged MARC records page and make sure the table looks right with the page-section added.

Note: I am also adding the Bootstrap table class to this table becuase I think it makes the table look much nicer.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2022-10-13 20:23:59 +00:00 committed by Tomas Cohen Arazi
parent 62360de779
commit 9518ddb3dc
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 62 additions and 61 deletions

View File

@ -308,69 +308,70 @@
[% IF ( pages ) %]
[% PROCESS pagination %]
[% END %]
<table>
<tr>
<th>#</th>
<th>File name</th>
<th>Profile</th>
<th>Comments</th>
<th>Type</th>
<th>Status</th>
<th>Staged</th>
<th># Records</th>
<th># Items</th>
<th>Action</th>
</tr>
[% FOREACH batch_lis IN batch_list %]
<div class="page-section">
<table class="table">
<tr>
<td>[% batch_lis.import_batch_id | html %]</td>
<td><a href="?import_batch_id=[% batch_lis.import_batch_id | uri %]">[% batch_lis.file_name | html %]</a></td>
<td>[% batch_lis.profile | html %]</td>
<td>[% batch_lis.comments | html %]</td>
<td>[% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %]</td>
<td>
[% IF ( batch_lis.import_status == 'cleaned' ) %]
<span>Cleaned</span>
[% ELSIF ( batch_lis.import_status == 'imported' ) %]
<span>Imported</span>
[% ELSIF ( batch_lis.import_status == 'importing' ) %]
<span>Importing</span>
[% ELSIF ( batch_lis.import_status == 'reverted' ) %]
<span>Reverted</span>
[% ELSIF ( batch_lis.import_status == 'reverting' ) %]
<span>Reverting</span>
[% ELSIF ( batch_lis.import_status == 'staged' ) %]
<span>Staged</span>
[% ELSE %]
<span>[% batch_lis.import_status | html %]</span>
[% END %]
</td>
<td>[% batch_lis.upload_timestamp | $KohaDates with_hours=1 %]</td>
<td>[% batch_lis.num_records | html %]</td>
<td>[% batch_lis.num_items | html %]
[% IF ( batch_lis.num_items && batch_lis.import_status == 'imported' ) %]
(<a href="?import_batch_id=[% batch_lis.import_batch_id | uri %]&amp;op=create_labels">Create label batch</a>)
[% END %]
</td>
<td class="actions">
[% IF ( batch_lis.can_clean ) %]
<form method="post" name="clean_batch_[% batch_lis.import_batch_id | html %]" id="clean_batch_[% batch_lis.import_batch_id | html %]" class="batch_form batch_clean">
<input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id | html %]" />
<input type="hidden" name="op" value="clean-batch" />
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-eraser"></i> Clean</button>
</form>
[% ELSIF ( batch_lis.import_status == 'cleaned' ) %]
<form method="post" action="/cgi-bin/koha/tools/manage-marc-import.pl" name="delete_batch_[% batch_lis.import_batch_id | html %]" id="delete_batch_[% batch_lis.import_batch_id | html %]" class="batch_form batch_delete">
<input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id | html %]" />
<input type="hidden" name="op" value="delete-batch" />
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</button>
</form>
[% END %]
</td>
<th>#</th>
<th>File name</th>
<th>Profile</th>
<th>Comments</th>
<th>Type</th>
<th>Status</th>
<th>Staged</th>
<th># Records</th>
<th># Items</th>
<th>Action</th>
</tr>
[% END # /FOREACH batch_lis %]
</table>
[% FOREACH batch_lis IN batch_list %]
<tr>
<td>[% batch_lis.import_batch_id | html %]</td>
<td><a href="?import_batch_id=[% batch_lis.import_batch_id | uri %]">[% batch_lis.file_name | html %]</a></td>
<td>[% batch_lis.profile | html %]</td>
<td>[% batch_lis.comments | html %]</td>
<td>[% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %]</td>
<td>
[% IF ( batch_lis.import_status == 'cleaned' ) %]
<span>Cleaned</span>
[% ELSIF ( batch_lis.import_status == 'imported' ) %]
<span>Imported</span>
[% ELSIF ( batch_lis.import_status == 'importing' ) %]
<span>Importing</span>
[% ELSIF ( batch_lis.import_status == 'reverted' ) %]
<span>Reverted</span>
[% ELSIF ( batch_lis.import_status == 'reverting' ) %]
<span>Reverting</span>
[% ELSIF ( batch_lis.import_status == 'staged' ) %]
<span>Staged</span>
[% ELSE %]
<span>[% batch_lis.import_status | html %]</span>
[% END %]
</td>
<td>[% batch_lis.upload_timestamp | $KohaDates with_hours=1 %]</td>
<td>[% batch_lis.num_records | html %]</td>
<td>[% batch_lis.num_items | html %]
[% IF ( batch_lis.num_items && batch_lis.import_status == 'imported' ) %]
(<a href="?import_batch_id=[% batch_lis.import_batch_id | uri %]&amp;op=create_labels">Create label batch</a>)
[% END %]
</td>
<td class="actions">
[% IF ( batch_lis.can_clean ) %]
<form method="post" name="clean_batch_[% batch_lis.import_batch_id | html %]" id="clean_batch_[% batch_lis.import_batch_id | html %]" class="batch_form batch_clean">
<input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id | html %]" />
<input type="hidden" name="op" value="clean-batch" />
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-eraser"></i> Clean</button>
</form>
[% ELSIF ( batch_lis.import_status == 'cleaned' ) %]
<form method="post" action="/cgi-bin/koha/tools/manage-marc-import.pl" name="delete_batch_[% batch_lis.import_batch_id | html %]" id="delete_batch_[% batch_lis.import_batch_id | html %]" class="batch_form batch_delete">
<input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id | html %]" />
<input type="hidden" name="op" value="delete-batch" />
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</button>
</form>
[% END %]
</td>
</tr>
[% END # /FOREACH batch_lis %]
</table>
</div> <!-- /.page-section -->
[% IF ( pages ) %]
[% PROCESS pagination %]