[Connect|Trunk]

Remove search bar in menu

Add search form back for search results, projects, datasources

Rearrange the menu items and add back search menu

Community page: add search form


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58626 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-05-07 10:29:52 +00:00
parent 40ff5a2a81
commit 0f3c261962
12 changed files with 142 additions and 34 deletions

View File

@ -25,7 +25,7 @@ import {UserManagementService} from "./openaireLibrary/services/user-management.
<navbar *ngIf="properties && showMenu && community" [portal]="properties.dashboard" [onlyTop]=false
[communityId]="community.id"
[userMenuItems]=userMenuItems [menuItems]=menuItems [user]="user"
[community]=community [showMenu]=showMenu [properties]="properties" [enableSearch]="true"
[community]=community [showMenu]=showMenu [properties]="properties" [enableSearch]="false"
searchRoute="/search/find/research-outcomes"
[showHomeMenuItem]="false"></navbar>
<customization *ngIf="properties && community" [properties]="properties"
@ -168,16 +168,6 @@ export class AppComponent {
};
this.menuItems = [];
/* this.menuItems.push(
{
rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find", "/search/find/publications", "/search/find/datasets", "/search/find/software", "/search/find/other", "/search/find/projects", "/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
items: [
new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
]
});*/
this.menuItems.push({
rootItem: new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
items: []
@ -186,8 +176,17 @@ export class AppComponent {
{
rootItem: new MenuItem("link", "Link", "", "/participate/claim", false, [], ["/participate/claim"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
items: [
/*new MenuItem("", "Start linking", "", "/participate/claim", false, [], ["/participate/claim"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})*/
new MenuItem("", "Start linking", "", "/participate/claim", false, [], ["/participate/claim"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})
]
});
this.menuItems.push(
{
rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find", "/search/find/publications", "/search/find/datasets", "/search/find/software", "/search/find/other", "/search/find/projects", "/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
items: [
new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
]
});
this.menuItems.push(

View File

@ -185,21 +185,72 @@
</ng-template>
<div class="publicationsSearchForm ">
<div class="uk-container uk-container-large">
<div class="uk-margin-large-top">
<div *ngIf="community.title" class="uk-h2 uk-margin-remove">
{{community.title}}
</div>
<div *ngIf="community.shortTitle && community.title != community.shortTitle"
class="subtitle uk-margin-remove">
{{community.shortTitle}}
</div>
</div>
</div>
<div class="uk-flex uk-flex-middle uk-flex-center">
<form class=" uk-margin-large uk-margin-large-top ">
<div class="uk-grid uk-margin-small-left">
<div class="uk-margin-small-top uk-padding-remove-left">
<entities-selection [simpleView]="true" currentEntity="result" selectedEntity="result" [customFilter]="customFilter"
[properties]="properties" [onChangeNavigate]="false"
(selectionChange)="entityChanged($event)"
></entities-selection>
</div>
<!-- [class]="((selectedEntity == 'result')?'quickSelectionsBox':'')+' uk-padding-remove-left uk-margin-small-top'" -->
<div class=" uk-padding-remove-left uk-margin-small-top" >
<div class="uk-inline">
<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 uk-width-xlarge@l uk-width-large@m uk-width-medium"
placeholder="Search in OpenAIRE for scholarly works"
[(ngModel)]="keyword"
name="keyword">
</div>
<!-- <div>
<quick-selections *ngIf="selectedEntity == 'result'" [resultTypes]="resultTypes"
[quickFilter]="resultsQuickFilter" [QFselected]="(resultsQuickFilter)?resultsQuickFilter.selected:null" [properties]="properties">
</quick-selections>
</div>-->
</div>
<div class="uk-padding-remove-left uk-margin-small-top">
<button (click)="goTo(true)" type="submit"
class="uk-button portal-button uk-text-bold uk-padding uk-padding-remove-vertical uk-margin-small-left">
Search
</button>
<div class="uk-margin-small-top uk-margin-left"> <a *ngIf="selectedEntity!= 'all'" (click)="goTo(false)"
class="portal-link">Advanced Search</a></div>
</div>
</div>
</form>
</div>
</div>
<div *ngIf="communityInfo && community" class="uk-section uk-padding-remove-top uk-padding-remove-bottom">
<div class="uk-padding-small">
<div class="uk-container uk-container-large uk-margin-top"
*ngIf="communityId">
<div>
<div class="uk-margin-large-bottom">
<div *ngIf="community.title" class="uk-h2 uk-margin-remove">
{{community.title}}
</div>
<div *ngIf="community.shortTitle && community.title != community.shortTitle"
class="subtitle uk-margin-remove">
{{community.shortTitle}}
</div>
</div>
<!-- <div class="uk-margin-large-bottom">-->
<!-- <div *ngIf="community.title" class="uk-h2 uk-margin-remove">-->
<!-- {{community.title}}-->
<!-- </div>-->
<!-- <div *ngIf="community.shortTitle && community.title != community.shortTitle"-->
<!-- class="subtitle uk-margin-remove">-->
<!-- {{community.shortTitle}}-->
<!-- </div>-->
<!-- </div>-->
<div>
<div class="main-tabs-div">
<ul uk-tab class="uk-text-truncate main-tabs uk-margin-remove uk-child-width-expand uk-width-3-4" uk-switcher="connect: .main-tabs-content">
@ -782,4 +833,4 @@
</div>
</div>
</div>
</div>

View File

@ -22,6 +22,7 @@ import {RouterHelper} from "../openaireLibrary/utils/routerHelper.class";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
import {SubscribeComponent} from "../utils/subscribe/subscribe.component";
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
@Component({
selector: 'community',
@ -87,6 +88,12 @@ export class CommunityComponent {
private user: User;
@ViewChild(SubscribeComponent) subscribeComponent: SubscribeComponent = null;
//Search Form
selectedEntity;
selectedEntitySimpleUrl;
selectedEntityAdvancedUrl;
keyword:string ="";
customFilter;
constructor(
private element: ElementRef,
@ -131,6 +138,7 @@ export class CommunityComponent {
this.user = user;
});
if (this.communityId != null && this.communityId != '') {
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
this._communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(
community => {
if (typeof document !== 'undefined') {
@ -403,6 +411,49 @@ export class CommunityComponent {
return tooltipContent;
}
entityChanged($event){
this.selectedEntity = $event.entity;
this.selectedEntitySimpleUrl = $event.simpleUrl;
this.selectedEntityAdvancedUrl = $event.advancedUrl;
}
goTo(simple:boolean){
let url = (simple)?this.selectedEntitySimpleUrl:this.selectedEntityAdvancedUrl;
let parameterNames = [];
let parameterValues = [];
if (this.selectedEntity == "result") {
/* if (this.resultTypes) {
let values = [];
if (this.resultTypes.publication) {
values.push("publications");
}
if (this.resultTypes.dataset) {
values.push("datasets");
}
if (this.resultTypes.software) {
values.push("software");
}
if (this.resultTypes.other) {
values.push("other");
}
if (values.length > 0) {
parameterNames.push("type");
parameterValues.push(values.join(","));
}
if (this.resultsQuickFilter) {
parameterNames.push("qf");
parameterValues.push("" + this.resultsQuickFilter.selected);
}
}*/
}
if(this.keyword.length > 0) {
parameterNames.push("q");
parameterValues.push(this.keyword);
parameterNames.push("op");
parameterValues.push("and");
}
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
}
public countSubscribersEvent($event){
this.subscribers = $event.value;
}

View File

@ -27,6 +27,7 @@ import {AffiliationsModule} from "../affiliations/affiliations.module";
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
import {MatSelectModule} from "@angular/material";
import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtils/entitiesSelection.module";
@NgModule({
imports: [
@ -34,7 +35,7 @@ import {MatSelectModule} from "@angular/material";
SubscribeModule, StatisticsModule, ManageModule, InviteModule,
SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, SearchFormModule, SearchDataprovidersServiceModule, SearchProjectsServiceModule,
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
Schema2jsonldModule, SEOServiceModule, MatSelectModule
Schema2jsonldModule, SEOServiceModule, MatSelectModule, EntitiesSelectionModule
],
declarations: [
CommunityComponent, ResultsComponent

View File

@ -24,9 +24,9 @@ import {PiwikHelper} from '../../utils/piwikHelper';
[disableForms]="disableForms"
[enableSearchView]="enableSearchView"
searchFormClass="datasourcesTableSearchForm"
formPlaceholderText="Search for Content Providers"
formPlaceholderText="Search by name..."
[piwikSiteId]="piwikSiteId" [hasPrefix]="false" [customFilter]="customFilter" [enableEntitySelection]="true"
[includeOnlyResultsAndFilter]="true" [showBreadcrumb]="true">
[includeOnlyResultsAndFilter]="false" [showBreadcrumb]="true">
</search-page-table>
`

View File

@ -26,9 +26,9 @@ import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
[disableForms]="disableForms"
[enableSearchView]="enableSearchView"
searchFormClass="projectsTableSearchForm"
formPlaceholderText="Search for Projects"
formPlaceholderText="Search by project title, grant id, funder... "
[piwikSiteId]="piwikSiteId" [hasPrefix]="false" [customFilter]="customFilter" [enableEntitySelection]="true"
[includeOnlyResultsAndFilter]="true" [showBreadcrumb]="true">
[includeOnlyResultsAndFilter]="false" [showBreadcrumb]="true">
</search-page-table>
`

View File

@ -10,7 +10,7 @@ import {PiwikHelper} from "../../utils/piwikHelper";
template: `
<search-research-results resultType="result" openaireLink="https://beta.explore.openaire.eu/search/find/publications"
[customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false"
[includeOnlyResultsAndFilter]="true" [showBreadcrumb]="true" [showAdvancedSearchLink]="false"></search-research-results>
[includeOnlyResultsAndFilter]="false" [showBreadcrumb]="true" [showAdvancedSearchLink]="true"></search-research-results>
`
})

View File

@ -119,8 +119,9 @@
.datasourcesSearchForm, .compatibleDatasourcesSearchForm, .compatibleDatasourcesTableSearchForm, .datasourcesTableSearchForm,
.journalsSearchForm, .journalsTableSearchForm,
.entityRegistriesSearchForm, .entityRegistriesTableSearchForm {
background: url('') !important;
background: url('search-background.svg') #F7FCFF no-repeat center bottom ;
background-size: cover !important;
height: inherit;
}
@ -273,3 +274,7 @@ a:hover .user-circle-background {
.connectApp .uk-grid-divider>:not(.uk-first-column)::before {
border-left: 1px solid #DEDEDE;
}
#stickyNavbar{
box-shadow: 0px 1px 1px #0000004D;
}

View File

@ -174,6 +174,7 @@ a:not(.uk-button):hover,
background-color: #F7FCFF;
color: #000000 !important;
font-size: 14px !important;
min-height: 60vh;
/*font-weight: 400!important;*/
}

View File

@ -2,7 +2,7 @@
"environment" : "development",
"dashboard" : "connect",
"enablePiwikTrack" : false,
"useCache" : false,
"useCache" : true,
"showContent" : true,
"showAddThis" : false,
"metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 532"><defs><style>.cls-1{isolation:isolate;}.cls-2{fill:#eef7fd;mix-blend-mode:multiply;}</style></defs><title>Asset 3</title><g class="cls-1"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-2" d="M0,431s362,109,841,62,632,68,1159-9V0H0Z"/><path class="cls-2" d="M0,514s1401,71,2000-69V0H0Z"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 413 B

View File

@ -119,7 +119,6 @@ $(document).ready(function(){
</script>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<!-- to update addThis: https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080-->
<!-- <script type="text/javascript" src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5a12dbd124e4e521"></script> -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080"></script>
<!--<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080"></script>-->
</body>
</html>