[master] all pages: use the same search bar (except browse research outcomes page), grid/list view buttons disabled when no stakeholders to show

This commit is contained in:
Alex Martzios 2023-12-07 11:01:56 +02:00
parent 2626477dcb
commit c60b661308
4 changed files with 13 additions and 11 deletions

View File

@ -5,8 +5,8 @@
</ng-container>
<div *ngIf="!showLoading" class="uk-container uk-container-large">
<div class="uk-flex uk-flex-middle uk-flex-center">
<div search-input *ngIf="keywordControl" [searchControl]="keywordControl" searchInputClass="border-bottom" iconPosition="left"
placeholder="Search for {{typeAsLabel}}s" [disabled]="stakeholders.length === 0" class="uk-width-1-2@m uk-width-1-1">
<div search-input *ngIf="keywordControl" [searchControl]="keywordControl" [searchInputClass]="'border-bottom'" [iconPosition]="'left'"
placeholder="Search for {{typeAsLabel}}s" [disabled]="stakeholders.length === 0" class="uk-width-xlarge@l uk-width-large@m uk-width-1-1@s">
</div>
</div>
<div class="uk-flex uk-flex-middle uk-flex-between uk-margin-large-top">

View File

@ -1,6 +1,6 @@
<div class=" uk-flex uk-flex-center ">
<div search-input [(value)]="keyword" [placeholder]="'Search for author or ORCID...'" [disabled]="orcidStatus ==errorCodes.LOADING"
[searchInputClass]="'inner background'" (searchEmitter)="searchByKeyword()" (valueChange)="checkForReset()" class="uk-width-xlarge@l uk-width-large@m"></div>
<div class="uk-flex uk-flex-center">
<div search-input [(value)]="keyword" [placeholder]="'Search for author or ORCID...'" [disabled]="orcidStatus ==errorCodes.LOADING"
[searchInputClass]="'border-bottom'" [iconPosition]="'left'" (searchEmitter)="searchByKeyword()" (valueChange)="checkForReset()" class="uk-width-xlarge@l uk-width-large@m uk-width-1-1@s"></div>
</div>
<div class="uk-margin-large-top">

View File

@ -7,15 +7,15 @@
<div class="uk-flex uk-flex-middle uk-flex-between">
<div class="uk-visible@m uk-width-small">
</div>
<div search-input *ngIf="keywordControl" [searchControl]="keywordControl" searchInputClass="border-bottom" iconPosition="left"
placeholder="Search for {{typeAsLabel}} {{entities.stakeholders}}" [disabled]="stakeholders.length === 0" class="uk-width-1-2@m uk-width-1-1">
<div search-input *ngIf="keywordControl" [searchControl]="keywordControl" [searchInputClass]="'border-bottom'" [iconPosition]="'left'"
placeholder="Search for {{typeAsLabel}} {{entities.stakeholders}}" [disabled]="stakeholders.length === 0" class="uk-width-xlarge@l uk-width-large@m uk-width-1-1@s">
</div>
<div *ngIf="stakeholders.length > 0" class="uk-flex uk-flex-middle uk-flex-right uk-width-small">
<button (click)="gridView = true" [class.uk-button-primary]="gridView"
<div [class.uk-disabled]="stakeholders.length === 0" class="uk-flex uk-flex-middle uk-flex-right uk-width-small">
<button (click)="gridView = true" [class.uk-button-primary]="gridView" [disabled]="stakeholders.length === 0"
class="uk-icon-button uk-button-default uk-border-rounded uk-icon-button-small">
<icon name="apps" [flex]="true" type="round" [ratio]="1.2"></icon>
</button>
<button (click)="gridView = false" [class.uk-button-primary]="!gridView"
<button (click)="gridView = false" [class.uk-button-primary]="!gridView" [disabled]="stakeholders.length === 0"
class="uk-icon-button uk-button-default uk-border-rounded uk-icon-button-small uk-margin-small-left">
<icon name="view_list" [flex]="true" type="round" [ratio]="1.2"></icon>
</button>

View File

@ -129,7 +129,9 @@
</div>
<!-- Search and paging -->
<div class="uk-flex uk-flex-middle uk-flex-right">
<div search-input [expandable]="true" [value]="keyword" (valueChange)="updateKeyword($event)">
<div search-input [searchInputClass]="'border-bottom'" [iconPosition]="'left'"
class="uk-width-medium@m uk-width-1-1@s"
placeholder="Search for DOIs"[value]="keyword" (valueChange)="updateKeyword($event)">
</div>
<!-- will this need an if? -->
<div class="uk-margin-small-left">