-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(search): separate search inputs for allRecords and myRecords
hide search for drafts for now
- Loading branch information
Showing
10 changed files
with
176 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 73 additions & 63 deletions
136
apps/metadata-editor/src/app/records/all-records/all-records.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,79 @@ | ||
<main class="bg-white"> | ||
<div class="flex flex-row items-baseline gap-[8px] px-[32px] py-[20px]"> | ||
<ng-container *ngIf="searchText$ | async as searchText; else allRecords"> | ||
<h1 | ||
class="text-[16px] text-main font-title font-bold" | ||
translate | ||
[translateParams]="{ searchText: searchText }" | ||
> | ||
dashboard.records.search | ||
</h1> | ||
<div class="text-[12px]"> | ||
<md-editor-records-count></md-editor-records-count> | ||
</div> | ||
</ng-container> | ||
<ng-template #allRecords> | ||
<h1 class="text-[16px] text-main font-title font-bold" translate> | ||
dashboard.records.all | ||
</h1> | ||
<div class="text-[12px]"> | ||
<md-editor-records-count></md-editor-records-count> | ||
</div> | ||
</ng-template> | ||
<header class="shrink-0 border-b border-gray-300"> | ||
<md-editor-search-header></md-editor-search-header> | ||
</header> | ||
<div class="relative overflow-y-auto"> | ||
<div class="absolute top-0 left-0 w-2/3 z-10 pointer-events-none"> | ||
<gn-ui-notifications-container></gn-ui-notifications-container> | ||
</div> | ||
<div | ||
class="flex flex-row items-center mx-[32px] my-[16px] py-[8px] gap-[16px]" | ||
> | ||
<div> | ||
<span class="uppercase" translate>dashboard.results.listMetadata</span> | ||
<main class="bg-white"> | ||
<div class="flex flex-row items-baseline gap-[8px] px-[32px] py-[20px]"> | ||
<ng-container *ngIf="searchText$ | async as searchText; else allRecords"> | ||
<h1 | ||
class="text-[16px] text-main font-title font-bold" | ||
translate | ||
[translateParams]="{ searchText: searchText }" | ||
> | ||
dashboard.records.search | ||
</h1> | ||
<div class="text-[12px]"> | ||
<md-editor-records-count></md-editor-records-count> | ||
</div> | ||
</ng-container> | ||
<ng-template #allRecords> | ||
<h1 class="text-[16px] text-main font-title font-bold" translate> | ||
dashboard.records.all | ||
</h1> | ||
<div class="text-[12px]"> | ||
<md-editor-records-count></md-editor-records-count> | ||
</div> | ||
</ng-template> | ||
</div> | ||
<div> | ||
<span class="uppercase" translate>dashboard.results.listResources</span> | ||
</div> | ||
<div class="grow"></div> | ||
<gn-ui-button | ||
cdkOverlayOrigin | ||
#importRecordButton | ||
(buttonClick)="duplicateExternalRecord()" | ||
type="gray" | ||
data-test="import-record" | ||
<div | ||
class="flex flex-row items-center mx-[32px] my-[16px] py-[8px] gap-[16px]" | ||
> | ||
<span translate>dashboard.importRecord</span> | ||
<mat-icon | ||
*ngIf="!isImportMenuOpen" | ||
class="material-symbols-outlined text-primary" | ||
>keyboard_arrow_down</mat-icon | ||
<div> | ||
<span class="uppercase" translate>dashboard.results.listMetadata</span> | ||
</div> | ||
<div> | ||
<span class="uppercase" translate>dashboard.results.listResources</span> | ||
</div> | ||
<div class="grow"></div> | ||
<gn-ui-button | ||
cdkOverlayOrigin | ||
#importRecordButton | ||
(buttonClick)="duplicateExternalRecord()" | ||
type="gray" | ||
data-test="import-record" | ||
> | ||
<mat-icon | ||
*ngIf="isImportMenuOpen" | ||
class="material-symbols-outlined text-primary" | ||
>keyboard_arrow_up</mat-icon | ||
<span translate>dashboard.importRecord</span> | ||
<mat-icon | ||
*ngIf="!isImportMenuOpen" | ||
class="material-symbols-outlined text-primary" | ||
>keyboard_arrow_down</mat-icon | ||
> | ||
<mat-icon | ||
*ngIf="isImportMenuOpen" | ||
class="material-symbols-outlined text-primary" | ||
>keyboard_arrow_up</mat-icon | ||
> | ||
</gn-ui-button> | ||
<ng-template #template> | ||
<gn-ui-import-record | ||
(closeImportMenu)="closeImportMenu()" | ||
></gn-ui-import-record> | ||
</ng-template> | ||
<gn-ui-button | ||
(buttonClick)="createRecord()" | ||
type="primary" | ||
data-cy="create-record" | ||
> | ||
</gn-ui-button> | ||
<ng-template #template> | ||
<gn-ui-import-record | ||
(closeImportMenu)="closeImportMenu()" | ||
></gn-ui-import-record> | ||
</ng-template> | ||
<gn-ui-button | ||
(buttonClick)="createRecord()" | ||
type="primary" | ||
data-cy="create-record" | ||
> | ||
<mat-icon class="material-symbols-outlined mr-2">edit_document</mat-icon> | ||
<span translate>dashboard.createRecord</span> | ||
</gn-ui-button> | ||
</div> | ||
<mat-icon class="material-symbols-outlined mr-2" | ||
>edit_document</mat-icon | ||
> | ||
<span translate>dashboard.createRecord</span> | ||
</gn-ui-button> | ||
</div> | ||
|
||
<md-editor-records-list></md-editor-records-list> | ||
</main> | ||
<md-editor-records-list></md-editor-records-list> | ||
</main> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 23 additions & 18 deletions
41
apps/metadata-editor/src/app/records/my-draft/my-draft.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
<main class="bg-white"> | ||
<div class="flex flex-row items-baseline gap-[8px] px-[32px] py-[20px]"> | ||
<h1 class="text-[16px] text-main font-title font-bold" translate> | ||
dashboard.records.myDraft | ||
</h1> | ||
<div class="relative overflow-y-auto"> | ||
<div class="absolute top-0 left-0 w-2/3 z-10 pointer-events-none"> | ||
<gn-ui-notifications-container></gn-ui-notifications-container> | ||
</div> | ||
<main class="bg-white"> | ||
<div class="flex flex-row items-baseline gap-[8px] px-[32px] py-[20px]"> | ||
<h1 class="text-[16px] text-main font-title font-bold" translate> | ||
dashboard.records.myDraft | ||
</h1> | ||
</div> | ||
|
||
<div | ||
class="shadow-md shadow-gray-300 border-[1px] border-gray-200 overflow-hidden rounded bg-white grow mx-[32px] my-[16px]" | ||
> | ||
<gn-ui-results-table | ||
[records]="records$ | async" | ||
[canDuplicate]="canDuplicate" | ||
[isUnsavedDraft]="isUnsavedDraft" | ||
[canDelete]="isUnsavedDraft" | ||
(recordClick)="editRecord($event)" | ||
(deleteRecord)="deleteDraft($event)" | ||
></gn-ui-results-table> | ||
</div> | ||
</main> | ||
<div | ||
class="shadow-md shadow-gray-300 border-[1px] border-gray-200 overflow-hidden rounded bg-white grow mx-[32px] my-[16px]" | ||
> | ||
<gn-ui-results-table | ||
[records]="records$ | async" | ||
[canDuplicate]="canDuplicate" | ||
[isUnsavedDraft]="isUnsavedDraft" | ||
[canDelete]="isUnsavedDraft" | ||
(recordClick)="editRecord($event)" | ||
(deleteRecord)="deleteDraft($event)" | ||
></gn-ui-results-table> | ||
</div> | ||
</main> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.