Skip to content

Commit

Permalink
resolve confilt
Browse files Browse the repository at this point in the history
  • Loading branch information
GauravD2t committed Feb 14, 2024
1 parent 19b689c commit 3461aaa
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 70 deletions.
111 changes: 57 additions & 54 deletions src/app/collection-page/collection-page.component.html
Original file line number Diff line number Diff line change
@@ -1,58 +1,61 @@
<div class="container">
<div class="collection-page" *ngVar="(collectionRD$ | async) as collectionRD">
<div *ngIf="collectionRD?.hasSucceeded" @fadeInOut>
<div *ngIf="collectionRD?.payload as collection">
<ds-view-tracker [object]="collection"></ds-view-tracker>
<div class="d-flex flex-row border-bottom mb-4 pb-4">
<header class="comcol-header mr-auto">
<!-- Collection Name -->
<ds-comcol-page-header [name]="dsoNameService.getName(collection)">
</ds-comcol-page-header>
<!-- Collection logo -->
<ds-comcol-page-logo *ngIf="logoRD$" [logo]="(logoRD$ | async)?.payload" [alternateText]="'Collection Logo'">
</ds-comcol-page-logo>
<div class="collection-page"
*ngVar="(collectionRD$ | async) as collectionRD">
<div *ngIf="collectionRD?.hasSucceeded" @fadeInOut>
<div *ngIf="collectionRD?.payload as collection">
<ds-view-tracker [object]="collection"></ds-view-tracker>
<div class="d-flex flex-row border-bottom mb-4 pb-4">
<header class="comcol-header mr-auto">
<!-- Collection Name -->
<ds-comcol-page-header
[name]="dsoNameService.getName(collection)">
</ds-comcol-page-header>
<!-- Collection logo -->
<ds-comcol-page-logo *ngIf="logoRD$"
[logo]="(logoRD$ | async)?.payload"
[alternateText]="'collection.logo' | translate">
</ds-comcol-page-logo>

<!-- Handle -->
<ds-themed-comcol-page-handle [content]="collection.handle" [title]="'collection.page.handle'">
</ds-themed-comcol-page-handle>
<!-- Introductory text -->
<ds-comcol-page-content [content]="collection.introductoryText" [hasInnerHtml]="true">
</ds-comcol-page-content>
<!-- News -->
<ds-comcol-page-content [content]="collection.sidebarText" [hasInnerHtml]="true" [title]="'collection.page.news'">
</ds-comcol-page-content>
</header>
<ds-dso-edit-menu></ds-dso-edit-menu>
</div>
<section class="comcol-page-browse-section">
<!-- Browse-By Links -->
<ds-themed-comcol-page-browse-by [id]="collection.id" [contentType]="collection.type">
</ds-themed-comcol-page-browse-by>
<ng-container *ngVar="(itemRD$ | async) as itemRD">
<div class="mt-4" *ngIf="itemRD?.hasSucceeded" @fadeIn>
<h3 class="sr-only">{{'collection.page.browse.recent.head' |
translate}}</h3>
<ds-viewable-collection [config]="paginationConfig" [sortConfig]="sortConfig" [objects]="itemRD"
[hideGear]="true">
</ds-viewable-collection>
<!-- Handle -->
<ds-themed-comcol-page-handle
[content]="collection.handle"
[title]="'collection.page.handle'">
</ds-themed-comcol-page-handle>
<!-- Introductory text -->
<ds-comcol-page-content
[content]="collection.introductoryText"
[hasInnerHtml]="true">
</ds-comcol-page-content>
<!-- News -->
<ds-comcol-page-content
[content]="collection.sidebarText"
[hasInnerHtml]="true"
[title]="'collection.page.news'">
</ds-comcol-page-content>
</header>
<ds-dso-edit-menu></ds-dso-edit-menu>
</div>
<ds-error *ngIf="itemRD?.hasFailed" message="{{'error.recent-submissions' | translate}}"></ds-error>
<ds-themed-loading *ngIf="!itemRD || itemRD.isLoading"
message="{{'loading.recent-submissions' | translate}}"></ds-themed-loading>
<div *ngIf="!itemRD?.isLoading && itemRD?.payload?.page.length === 0" class="alert alert-info w-100"
role="alert">
{{'collection.page.browse.recent.empty' | translate}}
</div>
</ng-container>
</section>
<footer *ngIf="collection.copyrightText" class="border-top my-5 pt-4">
<!-- Copyright -->
<ds-comcol-page-content [content]="collection.copyrightText" [hasInnerHtml]="true">
</ds-comcol-page-content>
</footer>
</div>
</div>
<ds-error *ngIf="collectionRD?.hasFailed" message="{{'error.collection' | translate}}"></ds-error>
<ds-themed-loading *ngIf="collectionRD?.isLoading" message="{{'loading.collection' | translate}}"></ds-themed-loading>
</div>
<section class="comcol-page-browse-section">
<!-- Browse-By Links -->
<ds-themed-comcol-page-browse-by
[id]="collection.id"
[contentType]="collection.type">
</ds-themed-comcol-page-browse-by>

<router-outlet></router-outlet>
</section>
<footer *ngIf="collection.copyrightText" class="border-top my-5 pt-4">
<!-- Copyright -->
<ds-comcol-page-content
[content]="collection.copyrightText"
[hasInnerHtml]="true">
</ds-comcol-page-content>
</footer>
</div>
</div>
<ds-error *ngIf="collectionRD?.hasFailed"
message="{{'error.collection' | translate}}"></ds-error>
<ds-themed-loading *ngIf="collectionRD?.isLoading"
message="{{'loading.collection' | translate}}"></ds-themed-loading>
</div>
</div>
44 changes: 44 additions & 0 deletions src/app/collection-page/collection-page.component.html.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<div class="container">
<div class="collection-page" *ngVar="(collectionRD$ | async) as collectionRD">
<div *ngIf="collectionRD?.hasSucceeded" @fadeInOut>
<div *ngIf="collectionRD?.payload as collection">
<ds-view-tracker [object]="collection"></ds-view-tracker>
<div class="d-flex flex-row border-bottom mb-4 pb-4">
<header class="comcol-header mr-auto">
<!-- Collection Name -->
<ds-comcol-page-header [name]="dsoNameService.getName(collection)">
</ds-comcol-page-header>
<!-- Collection logo -->
<ds-comcol-page-logo *ngIf="logoRD$" [logo]="(logoRD$ | async)?.payload"
[alternateText]="'collection.logo' | translate">
</ds-comcol-page-logo>

<!-- Handle -->
<ds-themed-comcol-page-handle [content]="collection.handle" [title]="'collection.page.handle'">
</ds-themed-comcol-page-handle>
<!-- Introductory text -->
<ds-comcol-page-content [content]="collection.introductoryText" [hasInnerHtml]="true">
</ds-comcol-page-content>
<!-- News -->
<ds-comcol-page-content [content]="collection.sidebarText" [hasInnerHtml]="true" [title]="'collection.page.news'">
</ds-comcol-page-content>
</header>
<ds-dso-edit-menu></ds-dso-edit-menu>
</div>
<section class="comcol-page-browse-section">
<!-- Browse-By Links -->
<ds-themed-comcol-page-browse-by [id]="collection.id" [contentType]="collection.type">
</ds-themed-comcol-page-browse-by>
<router-outlet></router-outlet>
</section>
<footer *ngIf="collection.copyrightText" class="border-top my-5 pt-4">
<!-- Copyright -->
<ds-comcol-page-content [content]="collection.copyrightText" [hasInnerHtml]="true">
</ds-comcol-page-content>
</footer>
</div>
</div>
<ds-error *ngIf="collectionRD?.hasFailed" message="{{'error.collection' | translate}}"></ds-error>
<ds-themed-loading *ngIf="collectionRD?.isLoading" message="{{'loading.collection' | translate}}"></ds-themed-loading>
</div>
</div>
8 changes: 2 additions & 6 deletions src/app/community-page/community-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@
<ds-themed-comcol-page-browse-by [id]="communityPayload.id" [contentType]="communityPayload.type">
</ds-themed-comcol-page-browse-by>

<ds-themed-community-page-sub-community-list
[community]="communityPayload"></ds-themed-community-page-sub-community-list>
<ds-themed-community-page-sub-collection-list
[community]="communityPayload"></ds-themed-community-page-sub-collection-list>
<router-outlet></router-outlet>
</section>
<footer *ngIf="communityPayload.copyrightText" class="border-top my-5 pt-4">
<footer *ngIf="communityPayload.copyrightText" class="border-top my-5 pt-4">
<!-- Copyright -->
<ds-comcol-page-content [content]="communityPayload.copyrightText" [hasInnerHtml]="true">
Expand All @@ -44,4 +40,4 @@

<ds-error *ngIf="communityRD?.hasFailed" message="{{'error.community' | translate}}"></ds-error>
<ds-themed-loading *ngIf="communityRD?.isLoading" message="{{'loading.community' | translate}}"></ds-themed-loading>
</div>
</div>
43 changes: 43 additions & 0 deletions src/app/community-page/community-page.component.html.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<div class="container" *ngVar="(communityRD$ | async) as communityRD">
<div class="community-page" *ngIf="communityRD?.hasSucceeded" @fadeInOut>
<div *ngIf="communityRD?.payload; let communityPayload">
<ds-view-tracker [object]="communityPayload"></ds-view-tracker>
<div class="d-flex flex-row border-bottom mb-4 pb-4">
<header class="comcol-header mr-auto">
<!-- Community name -->
<ds-comcol-page-header [name]="dsoNameService.getName(communityPayload)"></ds-comcol-page-header>
<!-- Community logo -->
<ds-comcol-page-logo *ngIf="logoRD$" [logo]="(logoRD$ | async)?.payload" [alternateText]="'community.logo' | translate">
</ds-comcol-page-logo>
<!-- Handle -->
<ds-themed-comcol-page-handle [content]="communityPayload.handle" [title]="'community.page.handle'">
</ds-themed-comcol-page-handle>
<!-- Introductory text -->
<ds-comcol-page-content [content]="communityPayload.introductoryText" [hasInnerHtml]="true">
</ds-comcol-page-content>
<!-- News -->
<ds-comcol-page-content [content]="communityPayload.sidebarText" [hasInnerHtml]="true"
[title]="'community.page.news'">
</ds-comcol-page-content>
</header>
<ds-dso-edit-menu></ds-dso-edit-menu>
</div>
<section class="comcol-page-browse-section">

<!-- Browse-By Links -->
<ds-themed-comcol-page-browse-by [id]="communityPayload.id" [contentType]="communityPayload.type">
</ds-themed-comcol-page-browse-by>

<router-outlet></router-outlet>
</section>
<footer *ngIf="communityPayload.copyrightText" class="border-top my-5 pt-4">
<!-- Copyright -->
<ds-comcol-page-content [content]="communityPayload.copyrightText" [hasInnerHtml]="true">
</ds-comcol-page-content>
</footer>
</div>
</div>

<ds-error *ngIf="communityRD?.hasFailed" message="{{'error.community' | translate}}"></ds-error>
<ds-themed-loading *ngIf="communityRD?.isLoading" message="{{'loading.community' | translate}}"></ds-themed-loading>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,28 @@ <h2 class="comcol-browse-label">{{'browse.comcol.head' | translate}}</h2>
<nav *ngIf="(allOptions$ | async) as allOptions" class="comcol-browse mb-4" aria-label="Browse Community or Collection">
<div class="d-none d-sm-block">

<div class="list-group list-group-horizontal">
<a *ngFor="let option of allOptions" class="list-group-item" [routerLink]="option.routerLink"
[queryParams]="option.params" routerLinkActive="active">{{ option.label | translate }}</a>
<div class="list-group list-group-horizontal" role="tablist">
<a *ngFor="let option of allOptions"
[attr.aria-current]="(currentOption$ | async)?.id === option.id"
class="list-group-item"
role="tab"
[routerLink]="option.routerLink"
[queryParams]="option.params"
[class.active]="(currentOption$ | async)?.id === option.id">
{{ option.label | translate }}
</a>
</div>
</div>

<div class="d-block d-sm-none">
<select name="browse-type" class="form-control" aria-label="Browse Community or Collection"
(ngModelChange)="onSelectChange($event)" [ngModel]="currentOptionId$ | async">
<option *ngFor="let option of allOptions" [ngValue]="option.id"
[attr.selected]="(currentOptionId$ | async) === option.id ? 'selected' : null">{{ option.label | translate }}
<select name="browse-type"
class="form-control"
aria-label="Browse Community or Collection"
(change)="onSelectChange($event)">
<option *ngFor="let option of allOptions"
[value]="option.id"
[attr.selected]="(currentOption$ | async)?.id === option.id ? 'selected' : null">
{{ option.label | translate }}
</option>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<h2 class="comcol-browse-label">{{'browse.comcol.head' | translate}}</h2>
<nav *ngIf="(allOptions$ | async) as allOptions" class="comcol-browse mb-4" aria-label="Browse Community or Collection">
<div class="d-none d-sm-block">

<div class="list-group list-group-horizontal">
<a *ngFor="let option of allOptions" class="list-group-item" [routerLink]="option.routerLink"
[queryParams]="option.params" routerLinkActive="active">{{ option.label | translate }}</a>
</div>
</div>

<div class="d-block d-sm-none">
<select name="browse-type" class="form-control" aria-label="Browse Community or Collection"
(ngModelChange)="onSelectChange($event)" [ngModel]="currentOptionId$ | async">
<option *ngFor="let option of allOptions" [ngValue]="option.id"
[attr.selected]="(currentOptionId$ | async) === option.id ? 'selected' : null">{{ option.label | translate }}
</option>
</select>
</div>
</nav>
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<h3>{{filterLabel+'.filters.head' | translate}}</h3>
<h3>{{"search.filters.head" | translate}}</h3>
<div *ngIf="(filters | async)?.hasSucceeded">
<div *ngFor="let filter of (filters | async)?.payload; trackBy: trackUpdate">
<ds-search-filter [filter]="filter" [inPlaceSearch]="inPlaceSearch" [refreshFilters]="refreshFilters"></ds-search-filter>
</div>
</div>
<a class="btn btn-primary" *ngIf="inPlaceSearch" [routerLink]="[searchLink]" [queryParams]="clearParams | async"
queryParamsHandling="merge" role="button"><i class="fas fa-undo"></i> {{"search.filters.reset" | translate}}</a>
<a class="btn btn-primary" [routerLink]="[searchLink]" [queryParams]="clearParams | async" queryParamsHandling="merge" role="button"><i class="fas fa-undo"></i> {{"search.filters.reset" | translate}}</a>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<h3>{{filterLabel+'.filters.head' | translate}}</h3>
<div *ngIf="(filters | async)?.hasSucceeded">
<div *ngFor="let filter of (filters | async)?.payload; trackBy: trackUpdate">
<ds-search-filter [filter]="filter" [inPlaceSearch]="inPlaceSearch" [refreshFilters]="refreshFilters"></ds-search-filter>
</div>
</div>
<a class="btn btn-primary" *ngIf="inPlaceSearch" [routerLink]="[searchLink]" [queryParams]="clearParams | async"
queryParamsHandling="merge" role="button"><i class="fas fa-undo"></i> {{"search.filters.reset" | translate}}</a>

0 comments on commit 3461aaa

Please sign in to comment.