change route 'stats' to 'monitor'| change path for ConnectHelper- moved in library | add proper advanced search link in search pages of pub/data/soft

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51566 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-03-29 08:28:04 +00:00
parent 14d174330c
commit 347dc58b15
17 changed files with 48 additions and 72 deletions

View File

@ -8,7 +8,7 @@
],
"scripts": {
"ng": "ng",
"start": " ng serve --disable-host-check --host 0.0.0.0 --port 5000",
"start": " ng serve --disable-host-check --host 0.0.0.0",
"start:dynamic": "PORT=5000 npm run build:dynamic && npm run serve:dynamic",
"start:static": "npm run build:static && npm run serve:static",
"build": "ng build",

View File

@ -11,7 +11,7 @@ const routes: Routes = [
{ path: '', loadChildren: './communitywrapper/communityWrapper.module#CommunityWrapperModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
// { path: 'communities', loadChildren: './communities/communities.module#CommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'my-communities', loadChildren: './my-communities/communities.module#CommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'statistics', 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

@ -7,7 +7,7 @@ import{MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu';
import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
import {CommunitiesService} from "./openaireLibrary/connect/communities/communities.service";
import {Session} from './openaireLibrary/login/utils/helper.class';
import {ConnectHelper} from './utils/connectHelper';
import {ConnectHelper} from './openaireLibrary/connect/connectHelper';
@Component({
//changeDetection: ChangeDetectionStrategy.Default,
@ -74,10 +74,14 @@ export class AppComponent {
new MenuItem("","My claims","","/myclaims",false,[],["/myclaims"],{}),
];
for(var com of communities){
for(var manager of com.managers){
if(manager== Session.getUserEmail()){
this.userMenuItems.push(new MenuItem("","Manage "+((com.shortTitle)?com.shortTitle:com.title),"https://admin.demo.openaire.eu?communityId="+com.communityId,"",false,[],[],{}));
}
if(Session.isCommunityCurator()||Session.isPortalAdministrator()){
this.userMenuItems.push(new MenuItem("","Manage "+((com.shortTitle)?com.shortTitle:com.title),"https://admin.demo.openaire.eu?communityId="+com.communityId,"",false,[],[],{}));
}else{
for(var manager of com.managers){
if(manager== Session.getUserEmail()){
this.userMenuItems.push(new MenuItem("","Manage "+((com.shortTitle)?com.shortTitle:com.title),"https://admin.demo.openaire.eu?communityId="+com.communityId,"",false,[],[],{}));
}
}
}
if((data['communityId'] && data['communityId']!="" && com.communityId == data['communityId'])
@ -99,7 +103,7 @@ export class AppComponent {
// new MenuItem("","Organizations","","/search/find/organizations/",false,["organization"],["/search/find/organizations"],{community: community.communityId}),
]},
{
rootItem: new MenuItem("monitor","Monitor","","/statistics",false,[],["/statistics"],{communityId:community.communityId}),
rootItem: new MenuItem("monitor","Monitor","","/monitor",false,[],["/statistics"],{communityId:community.communityId}),
items: []
},
{

View File

@ -14,7 +14,7 @@ import {PiwikService} from '../openaireLibrary/utils/
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {CommunitiesService} from '../openaireLibrary/connect/communities/communities.service';
import {ConnectHelper} from '../utils/connectHelper';
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
@Component({
selector: 'communities',

View File

@ -157,5 +157,4 @@ export class CommunityComponent {
this.piwiksub.unsubscribe();
}
}
}

View File

@ -2,7 +2,7 @@ import {Component, Input, Output, EventEmitter, ViewChild, ChangeDetectionStrate
import {Observable} from 'rxjs/Observable';
import {ActivatedRoute, Router} from '@angular/router';
import {ConnectHelper} from '../utils/connectHelper';
import {ConnectHelper} from '..//openaireLibrary/connect/connectHelper';
@Component({
selector: 'community-wrapper',
@ -25,7 +25,7 @@ export class CommunityWrapperComponent {
communityId => {
this.communityId = communityId['communityId'];
if(!this.communityId){
this.communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
this.communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
}
if(this.communityId){
this.dashboard = true;

View File

@ -25,15 +25,17 @@ import { CommunityInfo } from '../../openaireLibrary/connect/community/community
</div>
</h6>
<div class="el-content"><span class=" uk-label label-{{item.accessRights}}">{{item.accessRights}}</span><br></div>
<div *ngIf="item.authors != null" >
<div >
<span *ngIf="item.authors != null">
<span class="el-meta uk-margin uk-text-meta" *ngFor='let author of item.authors; let i = index'>
<span *ngIf="i < 10">
<span>{{author}}<span *ngIf="i < (item.authors.length-1)">;</span></span>
</span>
<span *ngIf="i == 10">...</span>
</span>
</span>
<span class="el-meta uk-text-meta"> ({{item.year}}) </span>
</div>
<div class="el-meta uk-text-meta"> {{item.year}} </div>
<div class="text-justify descriptionText"> {{item.description}} </div>
</div>
</div>

View File

@ -10,7 +10,7 @@ import {SearchPageTableViewComponent } from '../../openaireLibrary/searchPages/s
import {SearchUtilsClass } from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {SearchCommunityDataprovidersService} from '../../services/searchDataproviders.service';
import {ConnectHelper} from '../../utils/connectHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
selector: 'openaire-search-dataproviders',

View File

@ -14,7 +14,7 @@ import {ActivatedRoute} from '@angular/router';
})
export class OpenaireSearchDatasetsComponent {
advancedSearchParameters:any={community: "%22egi%7C%7CEGI%20Federation%22", co: "and"};
advancedSearchParameters:any;
connectCommunityId:string;
constructor( private route: ActivatedRoute) {
}
@ -22,6 +22,7 @@ export class OpenaireSearchDatasetsComponent {
this.route.queryParams.subscribe(data => {
if(data['community'] && data['community']!=""){
this.advancedSearchParameters = {community: data['community'], co: "and"};
var id= decodeURIComponent(data['community']);
this.connectCommunityId = id.slice(1,id.length - 1);
}

View File

@ -10,7 +10,7 @@ import {SearchPageTableViewComponent } from '../../openaireLibrary/searchPages/s
import {SearchUtilsClass } from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {SearchCommunityProjectsService} from '../../services/searchProjects.service';
import {ConnectHelper} from '../../utils/connectHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
selector: 'openaire-search-projects',

View File

@ -15,17 +15,18 @@ import {ActivatedRoute} from '@angular/router';
})
export class OpenaireSearchPublicationsComponent {
advancedSearchParameters:any={community: "%22egi%7C%7CEGI%20Federation%22", co: "and"};
connectCommunityId:string;
constructor( private route: ActivatedRoute) {
}
ngOnInit() {
this.route.queryParams.subscribe(data => {
advancedSearchParameters:any;
connectCommunityId:string;
constructor( private route: ActivatedRoute) {
}
ngOnInit() {
this.route.queryParams.subscribe(data => {
if(data['community'] && data['community']!=""){
var id= decodeURIComponent(data['community']);
this.connectCommunityId = id.slice(1,id.length - 1);
}
});
}
if(data['community'] && data['community']!=""){
this.advancedSearchParameters = {community: data['community'], co: "and"};
var id= decodeURIComponent(data['community']);
this.connectCommunityId = id.slice(1,id.length - 1);
}
});
}
}

View File

@ -14,7 +14,7 @@ import {ActivatedRoute} from '@angular/router';
})
export class OpenaireSearchSoftwareComponent {
advancedSearchParameters:any={community: "%22egi%7C%7CEGI%20Federation%22", co: "and"};
advancedSearchParameters:any;
connectCommunityId:string;
constructor( private route: ActivatedRoute) {
}
@ -22,6 +22,7 @@ export class OpenaireSearchSoftwareComponent {
this.route.queryParams.subscribe(data => {
if(data['community'] && data['community']!=""){
this.advancedSearchParameters = {community: data['community'], co: "and"};
var id= decodeURIComponent(data['community']);
this.connectCommunityId = id.slice(1,id.length - 1);
}

View File

@ -18,7 +18,7 @@ import {ConfigurationService} from '../openaireLibrary/utils/configuratio
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
import {ConnectHelper} from '../utils/connectHelper';
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
@Component({
selector: 'statistics',

View File

@ -1,34 +0,0 @@
export class ConnectHelper{
public static getCommunityFromDomain(domain:string):string{
// domain = "beta.egi.openaire.eu"; for testing
if(domain.indexOf("di.uoa.gr")!=-1){
return null;
}
if(domain.indexOf("beta")!=-1){
domain = domain.substr(domain.indexOf(".")+1,domain.length);
domain = domain.substr(0,domain.indexOf("."));
}else{
domain = domain.substr(0,domain.indexOf("."));
}
if(domain == "connect"){
return null;
}
return domain;
}
public static isProduction(domain:string):boolean{
console.log("Domain:"+domain);
if(domain.indexOf(".di.uoa.gr")!=-1){
return false;
}else if(domain.indexOf(".openaire.eu")!=-1){
return true;
}
}
public static getProductionPrefix(domain:string):string{
if(domain.indexOf("beta.")!=-1){
return "beta.";
}else{
return "";
}
}
}

View File

@ -337,7 +337,7 @@ color: #414141}
.publicationsSearchForm{
background-image: url('./search_pubs_1.jpg'); box-sizing: border-box; height: 250px;
}
.projectsSearchForm{
.projectsSearchForm, .projectsTableSearchForm{
background-image: url('./projects_search.jpg'); box-sizing: border-box; height: 250px;
}
.organizationsSearchForm{
@ -349,7 +349,7 @@ color: #414141}
.softwareSearchForm{
background-image: url('./search_data.jpg'); box-sizing: border-box; height: 250px;
}
.datasourcesSearchForm, .compatibleDatasourcesSearchForm,
.datasourcesSearchForm,.datasourcesTableSearchForm, .compatibleDatasourcesSearchForm,
.compatibleDatasourcesTableSearchForm {
background-image: url('./providers_search.jpg'); box-sizing: border-box; height: 250px;
}

View File

@ -1,6 +1,6 @@
{
"enablePiwikTrack" : false,
"enableHelper" : false,
"enableHelper" : true,
"useCache" : false,
"metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",
"framesAPIURL" : "https://beta.openaire.eu/stats3/",

View File

@ -7,12 +7,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="test"/>
<meta name="description" content="OpenAIRE, Connect,Community Dashboard, communities, open access, research, projects "/>
<meta property="og:description" content="OpenAIRE, Connect,Community Dashboard, communities, open access, research, projects"/>
<meta property="og:title" content="OpenAIRE Connect | Community Dashboard"/>
<meta property="og:description" content="test "/>
<meta property="og:title" content="OpenAIRE Connect"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://demo.openaire.eu"/>
<meta property="og:url" content="https://beta.connect.openaire.eu"/>
<meta property="og:site_name" content="OpenAIRE"/>
<meta property="og:image" content="assets/common/Symbol.png"/>