[Connect|Trunk]

App:
        hide monitor route
        rename menu item share to deposit
        add menu item manage if user can manage
        add search bar in community menu

Community page:
        layout changes for slider
        use scroll for description and specific height
        use select for toggle between overview and graph analysis



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56138 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-06-20 13:34:07 +00:00
parent 8eb90b98ef
commit d3d5bba9f5
6 changed files with 92 additions and 48 deletions

View File

@ -15,7 +15,7 @@ const routes: Routes = [
{ path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'organizations', loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'monitor', loadChildren: './statistics/statistics.module#StatisticsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
// { path: 'monitor', loadChildren: './statistics/statistics.module#StatisticsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},

View File

@ -23,7 +23,7 @@ import {HelperFunctions} from "./openaireLibrary/utils/HelperFunctions.class";
<navbar *ngIf= "properties && showMenu && !community" portal="connect" [onlyTop]=false [userMenuItems]=userMenuItems [menuItems]=menuItems
[showMenu]=showMenu [properties]="properties"></navbar>
<navbar *ngIf= "properties && showMenu && community" portal="connect" [onlyTop]=false [communityId]="community.id" [userMenuItems]=userMenuItems [menuItems]=menuItems
[community]=community [showMenu]=showMenu [properties]="properties"></navbar>
[community]=community [showMenu]=showMenu [properties]="properties" [enableSearch]="true"></navbar>
<div class="custom-main-content" >
<main>
@ -286,6 +286,7 @@ export class AppComponent {
if(communityId && communityId!="" && com.communityId == communityId){
community = com;
document.documentElement.style.setProperty('--portal-main-color', "#4C9CD5");
// this._layoutService.getLayout(com.communityId,
// this.properties.adminToolsAPIURL + '/').subscribe (
// layout => {
@ -293,8 +294,22 @@ export class AppComponent {
// document.documentElement.style.setProperty('--portal-main-color', this.layout.color);
// }
// );
let iSommunitymanager: boolean = false;
if(Session.isCommunityCurator() || Session.isPortalAdministrator()){
iSommunitymanager = true;
}else if(com.managers.indexOf(Session.getUserEmail())!=-1){
iSommunitymanager = true;
}
this.community = {id: community.communityId, name: (community.shortTitle)?community.shortTitle:community.title, logoUrl:community.logoUrl};
this.menuItems= [
this.menuItems= [];
if(iSommunitymanager){
this.menuItems.push(
{
rootItem: new MenuItem("manage","Manage",'https://beta.admin.connect.openaire.eu/dashboard?communityId='+community.communityId,"",false,[],[],{}),
items: []
});
}
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("","Publications","","/search/find/publications",false,["publication"],["/search/find/publications"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
new MenuItem("","Research Data","","/search/find/datasets",false,["dataset"],["/search/find/datasets"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
@ -302,23 +317,22 @@ export class AppComponent {
new MenuItem("","Other Research Products","","/search/find/other",false,["orp"],["/search/find/other"],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}),
]},
/*{
rootItem: new MenuItem("monitor","Monitor","","/monitor",false,[],["/monitor"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
items: []
},*/
{
rootItem: new MenuItem("share","Share","","",false,[],["/participate/deposit-publications","/participate/deposit-datasets","/participate/share-zenodo"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
]});
this.menuItems.push( {
rootItem: new MenuItem("deposit","Deposit","","",false,[],["/participate/deposit-publications","/participate/deposit-datasets","/participate/share-zenodo"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
items: [
new MenuItem("","Zenodo Communities","","/participate/share-zenodo",false,[],["/participate/share-zenodo"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
new MenuItem("","Publications","","/participate/deposit-publications",false,["publication"],["/participate/deposit-publications"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
new MenuItem("","Research Data","","/participate/deposit-datasets",false,["dataset"],["/participate/deposit-datasets"],this.properties.environment!="development"?{}:{communityId:community.communityId})]
},
});
this.menuItems.push(
{
rootItem: new MenuItem("link","Link","","/participate/claim",false,[],["/participate/claim"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
items: []
}
];
});
}
}

View File

@ -14,7 +14,7 @@
class=" uk-h5 uk-margin-remove">
{{community.shortTitle}}
</div>
<div *ngIf="community.description != null" class="">
<div *ngIf="community.description != null" class="uk-margin uk-height-max-medium uk-overflow-auto">
<p class=""> {{community.description}}</p>
</div>
</div>
@ -237,29 +237,44 @@
allowedCharts[entity] && statisticsSum[entity].total>0 &&
allowedCharts[entity].length>0">
<div *ngIf="showIn == 'showInDashboard'">
<div class="uk-position-relative uk-visible-toggle" uk-slider="">
<ul class="uk-slider-items " uk-grid>
<li *ngFor="let chart of allowedCharts[entity]">
<div uk-slider>
<div class="uk-position-relative">
<div class="uk-slider-container">
<ul class="uk-slider-items uk-child-width-1-2 uk-child-width-1-1@s uk-child-width-1-2@m">
<li *ngFor="let chart of allowedCharts[entity]">
<div class=" iframeContainer uk-height-medium uk-margin-top">
<div *ngIf="showChartTitle[chart]" class=" uk-h5 uk-text-muted">
{{chartsInfoMap[chart].title}}</div>
<iframe [src]=chartsInfoMap[chart].url scrolling="no"></iframe>
</div>
</li>
</ul>
</div>
<div class="uk-hidden@s uk-light">
<a class="uk-position-center-left " href="#" uk-slidenav-previous uk-slider-item="previous"></a>
<a class="uk-position-center-right " href="#" uk-slidenav-next uk-slider-item="next"></a>
</div>
<div class="uk-visible@s">
<a class="uk-position-center-left-out " href="#" uk-slidenav-previous
uk-slider-item="previous"></a>
<a class="uk-position-center-right-out " href="#" uk-slidenav-next uk-slider-item="next"></a>
</div>
</div>
<div class=" iframeContainer uk-height-medium uk-margin-top">
<div *ngIf="showChartTitle[chart]" class=" uk-h5 uk-text-muted">
{{chartsInfoMap[chart].title}}</div>
<iframe [src]=chartsInfoMap[chart].url scrolling="no"></iframe>
</div>
</li>
</ul>
<a *ngIf="(allowedCharts[entity].length > 2)"
class="uk-position-center-left uk-position-small uk-hidden-hover" href="#" uk-slidenav-previous
uk-slider-item="previous"></a>
<a *ngIf="(allowedCharts[entity].length > 2)"
class="uk-position-center-right uk-position-small uk-hidden-hover" href="#" uk-slidenav-next
uk-slider-item="next"></a>
</div>
<div *ngIf=" allowedEntities &&
statisticsSum && allowedCharts && statisticsSum[entity] &&
allowedCharts[entity] && statisticsSum[entity].total>0 &&
allowedCharts[entity].length>0">
<hr class="uk-margin-top">
<div class="uk-margin-top portal-hr"></div>
</div>
</div>
<div *ngIf="showIn == 'showInMonitor'" class="uk-grid uk-child-width-1-2 ">
@ -278,16 +293,25 @@
</ng-template>
<div class="uk-float-right">
<button [class]="'uk-button '+((overview)?'uk-disabled ':' uk-button-default ')"
(click)="overview=!overview;">Overview
<!-- <button [class]="'uk-button '+((show == 'overview')?'uk-disabled ':' uk-button-default ')"
(click)="show='overview'">Overview
</button>
{{" "}}
<button [class]="'uk-button '+((!overview)?'uk-disabled ':' uk-button-default ')"
(click)="overview=!overview;">Chart Analysis
</button>
<button [class]="'uk-button '+((show != 'overview')?'uk-disabled ':' uk-button-default ')"
(click)="show='analysis';">Graph Analysis
</button>-->
<select [(ngModel)]="show" class="uk-select uk-text-bold">
<option value="overview" >Overview</option>
<option value="analysis" >Graph Analysis</option>
</select>
<!-- <select [(ngModel)]="sortBy" class="uk-select uk-margin-small-bottom uk-width-1-2 uk-padding-remove" name="select_order" >-->
<!-- <option value="num" >Sort by results number</option>-->
<!-- <option value="name" >Sort by name</option>-->
<!-- </select>-->
</div>
<div class="uk-margin-top customTabs">
@ -302,7 +326,7 @@
<ul id="resultTabs" class=" customTabsContent uk-switcher " style="min-height:450px;">
<li *ngIf="isEntityEnabled('publication')" class="uk-padding">
<div *ngIf="overview">
<div *ngIf="show=='overview'">
<div *ngIf="statistics !=null && activeTab == 'publication'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'publication', entityName:
'publications' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
@ -316,7 +340,7 @@
[properties]="properties"
class=""></results-comp>
</div>
<div *ngIf="!overview">
<div *ngIf="show!='overview'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'publication', entityName:
'publications' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
allowedEntities: statistics.allowedEntitiesMode['showInMonitor'],
@ -328,7 +352,7 @@
</li>
<li *ngIf="isEntityEnabled('dataset')" class="uk-padding">
<div *ngIf="overview">
<div *ngIf="show=='overview'">
<div *ngIf="statistics !=null && activeTab == 'dataset'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'dataset', entityName:
'research data' , statisticsSum:statistics.statisticsSum,
@ -343,7 +367,7 @@
[properties]="properties"
class=""></results-comp>
</div>
<div *ngIf="!overview">
<div *ngIf="show!='overview'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'dataset', entityName:
'research data' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
allowedEntities: statistics.allowedEntitiesMode['showInMonitor'],
@ -355,7 +379,7 @@
</li>
<li *ngIf="isEntityEnabled('software')" class="uk-padding">
<div *ngIf="overview">
<div *ngIf="show=='overview'">
<div *ngIf="statistics !=null && activeTab == 'software'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'publication', entityName:
'software' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
@ -369,7 +393,7 @@
[properties]="properties"
class=""></results-comp>
</div>
<div *ngIf="!overview">
<div *ngIf="show!='overview'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'software', entityName:
'software' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
allowedEntities: statistics.allowedEntitiesMode['showInMonitor'],
@ -381,7 +405,7 @@
</li>
<li *ngIf="isEntityEnabled('orp')" class="uk-padding">
<div *ngIf="overview">
<div *ngIf="show=='overview'">
<div *ngIf="statistics !=null && activeTab == 'orp'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'orp', entityName:
'other products' , statisticsSum:statistics.statisticsSum,
@ -396,7 +420,7 @@
[properties]="properties"
class=""></results-comp>
</div>
<div *ngIf="!overview">
<div *ngIf="show!='overview'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'orp', entityName:
'publications' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
allowedEntities: statistics.allowedEntitiesMode['showInMonitor'],

View File

@ -61,7 +61,7 @@ export class CommunityComponent {
public subOrps;
@ViewChild(StatisticsForDashboardComponent) statistics: StatisticsForDashboardComponent = null;
public activeTab = "publication";
public overview: boolean = true;
public show: string = 'overview';
constructor(
private element: ElementRef,

View File

@ -6,12 +6,12 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
@Component({
selector: 'results-comp',
template: `
<div class="uk-h5 uk-text-bold uk-text-muted uk-margin-top">Recent research results</div>
<div class="uk-h5 uk-text-bold uk-text-muted uk-margin-top uk-margin-remove-bottom">Recent research results</div>
<div *ngIf="!results && total != 0">
<div *ngIf="!showLoading" class="uk-animation-fade uk-width-1-1" role="alert"><span class="loading-gif uk-align-center"></span></div>
</div>
<div *ngIf="results != null && results.length > 0">
<div class="uk-margin uk-text-right">
<div class="uk-text-right">
<div>
<a class="el-content uk-button uk-button-text" [queryParams]=params routerLinkActive="router-link-active" [routerLink]="'/search/find/'+getresultTypeLink(resultType, true)">
View all
@ -49,7 +49,7 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
</li>
</div>-->
<search-result [results]="results"
[type]="resultType" [properties] = properties>
[type]="resultType" [properties] = properties class="communityRecentResults">
</search-result>
</div>

View File

@ -174,3 +174,9 @@ div:not(.connect_App) bottom .uk-totop{
.customTabs ul.customTabsContent {
border:var(--community_main_dark_color) 1px solid;
}
.communityRecentResults .search-results > li:nth-child(2){
border-top: none !important;
} .communityRecentResults .search-results > li:last-child {
border-bottom: none !important;
}