4Science / dspace-angular

Angular UI for DSpace and DSpace-CRIS. In the dspace-cris-7 branch you can find the extension to support DSpace-CRIS
BSD 3-Clause "New" or "Revised" License
13 stars 28 forks source link

show bulk export button only search results exists #80

Open floriangantner opened 4 months ago

floriangantner commented 4 months ago

Is your feature request related to a problem? Please describe. As an user I'm frustrated that for search queries with no results i see the export button, but it has no function at all.

Screenshot 2024-03-06 at 10-40-31 FIS Universität Bamberg My FIS

Describe the solution you'd like We would like the https://github.com/4Science/dspace-angular/blob/021eb436dbab283d980aa19ff690ed3c6f87964a/src/app/shared/search/search.component.html#L118

to be extended by some further condition:

      <ng-container *ngIf="(resultsRD$ | async) != undefined">
        <ds-item-export-modal-launcher [searchOptions$]="searchOptions$"
                                       *ngIf="showExport && (resultsRD$ | async)?.payload.totalElements > 0" ></ds-item-export-modal-launcher>
      </ng-container>

This shows the button only when the results are retrieved and the total amount of results is greater than zero.

Describe alternatives or workarounds you've considered

Additional context