117803: Hide table headers for subsequent bundle tables

This commit is contained in:
Andreas Awouters
2024-09-03 14:24:31 +02:00
parent cf54af2c22
commit a11bfc80ad
3 changed files with 16 additions and 6 deletions

View File

@@ -24,10 +24,11 @@
</div>
<div *ngIf="item && bundles?.length > 0" class="mt-4 table-border">
<ds-item-edit-bitstream-bundle *ngFor="let bundle of bundles"
<ds-item-edit-bitstream-bundle *ngFor="let bundle of bundles; first as isFirst"
[bundle]="bundle"
[item]="item"
[columnSizes]="columnSizes"
[hideHeader]="!isFirst"
(dropObject)="dropBitstream(bundle, $event)">
</ds-item-edit-bitstream-bundle>
</div>

View File

@@ -10,7 +10,7 @@
<table class="table"
[attr.aria-label]="'item.edit.bitstreams.bundle.table.aria-label' | translate: { bundle: bundleName } ">
<thead>
<thead *ngIf="!hideHeader">
<tr class="header-row font-weight-bold">
<th id="name" scope="col" class="{{ columnSizes.columns[0].buildClasses() }}">
{{'item.edit.bitstreams.headers.name' | translate}}
@@ -45,16 +45,20 @@
<ng-container *ngFor="let entry of (tableEntries$ | async)">
<tr *ngIf="updates[entry.id] as update" [ngClass]="getRowClass(update)" class="bitstream-row">
<th class="bitstream-name row-element" scope="row" id="{{ entry.nameStripped }}" headers="{{ bundleName }} name">
<th class="bitstream-name row-element {{ columnSizes.columns[0].buildClasses() }}"
scope="row" id="{{ entry.nameStripped }}" headers="{{ bundleName }} name">
{{ entry.name }}
</th>
<td class="row-element" headers="{{ entry.nameStripped }} {{ bundleName }} description">
<td class="row-element {{ columnSizes.columns[1].buildClasses() }}"
headers="{{ entry.nameStripped }} {{ bundleName }} description">
{{ entry.description }}
</td>
<td class="row-element" headers="{{ entry.nameStripped }} {{ bundleName }} format">
<td class="row-element {{ columnSizes.columns[2].buildClasses() }}"
headers="{{ entry.nameStripped }} {{ bundleName }} format">
{{ (entry.format | async)?.shortDescription }}
</td>
<td class="row-element" headers="{{ entry.nameStripped }} {{ bundleName }} actions">
<td class="row-element {{ columnSizes.columns[3].buildClasses() }}"
headers="{{ entry.nameStripped }} {{ bundleName }} actions">
<div class="text-center w-100">
<div class="btn-group relationship-action-buttons">
<a [href]="entry.downloadUrl"

View File

@@ -94,6 +94,11 @@ export class ItemEditBitstreamBundleComponent implements OnInit {
*/
@Input() columnSizes: ResponsiveTableSizes;
/**
* Whether to hide the table headers
*/
@Input() hideHeader = false;
/**
* Send an event when the user drops an object on the pagination
* The event contains details about the index the object came from and is dropped to (across the entirety of the list,