Change search-inputs

This commit is contained in:
Konstantinos Triantafyllou 2022-04-19 16:32:45 +03:00
parent e808c7e26b
commit 30ddd6b425
4 changed files with 19 additions and 48 deletions

View File

@ -73,28 +73,17 @@ import {Subscriber} from "rxjs";
<!--<p class="uk-margin-auto-top uk-margin-remove-bottom uk-h5"> <!--<p class="uk-margin-auto-top uk-margin-remove-bottom uk-h5">
Start by <span class="uk-text-bold">searching</span> repositories and journals Start by <span class="uk-text-bold">searching</span> repositories and journals
</p>--> </p>-->
<div class=""> <div class="uk-flex uk-flex-right uk-margin-small-bottom">
<form class=" uk-flex uk-margin"> <a [queryParams]="properties.environment!='development'?{}:routerHelper.createQueryParam('communityId',communityId)"
<!-- <span uk-search-icon class="uk-icon"></span>--> [routerLink]="depositRoute">
<!-- <button routerLinkActive="uk-link"--> Browse all
<!-- routerLink="{{depositRoute}}" [queryParams]="{keyword: keyword}" class="uk-search-icon uk-icon" uk-search-icon>--> </a>
<!-- </button>-->
<input class="uk-search-input uk-input uk-width-expand uk-margin-small-right"
type="search" [(ngModel)]="keyword" name="keyword"
placeholder="{{searchPlaceHolder}}">
<div class="uk-padding-remove-left">
<button routerLinkActive="uk-link" routerLink="{{depositRoute}}" [queryParams]="{'f0':'q','fv0': keyword}" [class]="'uk-button uk-text-bold '+ (!!(communityId)?'':' portal-button')"> Search
</button>
<div class="uk-padding-small">
<a [queryParams]="properties.environment!='development'?{}:routerHelper.createQueryParam('communityId',communityId)" routerLinkActive="router-link-active" [routerLink]="depositRoute"
type="submit" class=" ">
<span><span>Browse all </span><!--<span uk-icon="arrow-right"></span>--></span>
</a>
</div>
</div>
</form>
</div> </div>
<div class="uk-width-1-6 uk-text-right"> <div>
<div search-input [(value)]="keyword" [placeholder]="searchPlaceHolder" (searchEmitter)="goToDeposit.click()"></div>
<a #goToDeposit class="uk-hidden" [routerLink]="depositRoute" [queryParams]="{'f0':'q','fv0': keyword}"></a>
</div>
<div class="uk-width-1-6 uk-text-right uk-margin-medium-top">
<!-- <hr class="uk-divider-vertical">--> <!-- <hr class="uk-divider-vertical">-->
<!-- <div class=" uk-margin-top uk-margin-bottom uk-padding-small uk-text-bold">OR</div>--> <!-- <div class=" uk-margin-top uk-margin-bottom uk-padding-small uk-text-bold">OR</div>-->
<!-- <img src="assets/common-assets/OR.svg">--> <!-- <img src="assets/common-assets/OR.svg">-->

View File

@ -11,6 +11,7 @@ import {Schema2jsonldModule} from '../sharedComponents/schema2jsonld/schema2json
import { SEOServiceModule } from '../sharedComponents/SEO/SEOService.module'; import { SEOServiceModule } from '../sharedComponents/SEO/SEOService.module';
import {DepositFirstPageComponent} from "./depositFirstPage.component"; import {DepositFirstPageComponent} from "./depositFirstPage.component";
import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module"; import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
import {SearchInputModule} from "../sharedComponents/search-input/search-input.module";
@NgModule({ @NgModule({
imports: [ imports: [
@ -18,7 +19,7 @@ import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
RouterModule, RouterModule,
PiwikServiceModule, PiwikServiceModule,
HelperModule, HelperModule,
Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, SearchInputModule
], ],
declarations: [ declarations: [
DepositFirstPageComponent DepositFirstPageComponent

View File

@ -33,31 +33,11 @@ import {properties} from "../../../environments/environment";
</div> </div>
<div class=""> <div class="">
<div class="uk-container uk-container-large"> <div class="uk-container uk-container-large">
<div class="uk-margin-top uk-flex uk-flex-right">
<form <div class="uk-width-large">
class="uk-margin-top uk-grid uk-margin-small-left ng-untouched ng-pristine ng-valid uk-form-width-large uk-float-right"> <div search-input [(value)]="keyword" placeholder="Search by name, description, subject..." (searchEmitter)="keywordChanged()"></div>
<div class=" uk-padding-remove-left uk-margin-small-top uk-inline uk-width-expand">
<a *ngIf="keyword.length > 0" class="uk-form-icon uk-form-icon-flip"
(click)="keyword = ''"
uk-icon="icon: close"></a>
<input type="text" class="uk-input text-input-box uk-width-expand"
placeholder="Search by name, description, subject..." aria-describedby="sizing-addon2"
[(ngModel)]="keyword" name="keyword">
</div> </div>
<!--<div class="uk-padding-remove-left uk-margin-small-top"> </div>
<button (click)="keywordChanged()" type="submit"
class=" uk-button portal-button uk-text-bold ">
Search
</button>
</div>-->
<div class="uk-padding-remove-left">
<button (click)="keywordChanged()" type="submit"
class="portal-button uk-margin-small-left uk-margin-small-top uk-button">Search
</button>
</div>
</form>
</div> </div>
<search-dataproviders [simpleView]="true" [searchForm]="{class: null, dark: false}" type="deposit" simpleSearchLink="/participate/deposit/search" [includeOnlyResultsAndFilter]="true" > <search-dataproviders [simpleView]="true" [searchForm]="{class: null, dark: false}" type="deposit" simpleSearchLink="/participate/deposit/search" [includeOnlyResultsAndFilter]="true" >
</search-dataproviders> </search-dataproviders>

View File

@ -12,14 +12,15 @@ import {SearchFormModule} from '../searchPages/searchUtils/searchForm.module';
import {IsRouteEnabled} from '../error/isRouteEnabled.guard'; import {IsRouteEnabled} from '../error/isRouteEnabled.guard';
import {SearchDataProvidersModule} from "../searchPages/searchDataProviders.module"; import {SearchDataProvidersModule} from "../searchPages/searchDataProviders.module";
import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module"; import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
import {SearchInputModule} from "../sharedComponents/search-input/search-input.module";
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule,
RouterModule, RouterModule,
DataProvidersServiceModule, DataProvidersServiceModule,
SearchFormModule, SearchResultsModule, SearchDataProvidersModule, BreadcrumbsModule SearchFormModule, SearchResultsModule, SearchDataProvidersModule, BreadcrumbsModule, SearchInputModule
], ],
declarations: [ declarations: [
SearchDataprovidersToDepositComponent SearchDataprovidersToDepositComponent