Project

General

Profile

« Previous | Next » 

Revision 51293

fixing urls in properties json| add manage links in user menu

View differences:

modules/uoa-connect-portal/trunk/connect-production-properties.json
1
{
2
  "enablePiwikTrack" : false,
3
  "enableHelper" : true,
4
  "useCache" : true,
5
  "metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",
6
  "framesAPIURL" : "https://beta.openaire.eu/stats3/",
7
  "statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
8
  "statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
9
  "claimsAPIURL" : "https://beta.services.openaire.eu/claims/rest/claimsService/",
10
  "searchAPIURLLAst"     : "https://beta.services.openaire.eu/search/v2/api/",
11
  "searchResourcesAPIURL"     : "https://beta.services.openaire.eu/search/v2/api/resources",
12
  "csvAPIURL" : "https://beta.services.openaire.eu/search/v2/api/reports",
13
  "searchCrossrefAPIURL" : "https://api.crossref.org/works",
14
  "searchDataciteAPIURL" : "https://api.datacite.org/works",
15
  "searchOrcidURL"    : "https://pub.orcid.org/",
16
  "pmidURL"    : "http://www.ncbi.nlm.nih.gov/pubmed/",
17
  "doiURL"     : "https://dx.doi.org/",
18
  "cordisURL"  : "http://cordis.europa.eu/projects/",
19
  "pmcURL"     : "http://europepmc.org/articles/",
20
  "handleURL"  : "http://hdl.handle.net/",
21
  "zenodo"   : "https://zenodo.org/",
22
  "openAccess" : "https://www.openaire.eu/support/faq#article-id-234",
23
  "openAccessRepo" : "https://www.openaire.eu/support/faq#article-id-310",
24
  "fp7Guidlines" : "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",
25
  "h2020Guidlines" : "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020",
26
  "ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
27
  "helpdesk" : "https://www.openaire.eu/support/helpdesk",
28
  "uploadService" : "https://demo.openaire.eu/upload",
29

  
30
  "vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",
31

  
32
  "piwikBaseUrl" :" https://analytics.openaire.eu/piwik.php?idsite=6",
33
  "loginUrl" :"https://beta.services.openaire.eu/uoa-user-management/openid_connect_login",
34

  
35
  "logoutUrl" :"https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
36

  
37
  "logoutOpenaireUrl" :"http://dl067.madgik.di.uoa.gr/idp/profile/Logout",
38

  
39
  "cookieDomain" :".openaire.eu",
40

  
41
  "feedbackmail" :"openaire.test@gmail.com",
42

  
43
  "helperPageUrl" :"http://scoobydoo.di.uoa.gr:16000/api/page/route",
44

  
45
  "cacheUrl" :"https://demo.openaire.eu/cache/get?url=",
46

  
47
  "adminToolsAPIURL" :"https://beta.services.openaire.eu/uoa-admin-tools/",
48

  
49
  "adminToolsCommunity" :"openaire",
50

  
51
  "communityAPI": "https://dev-openaire.d4science.org/openaire/community/",
52

  
53
  "csvLimit":  2000,
54
  "pagingLimit":  20,
55
  "resultsPerPage":  10,
56

  
57
  "baseLink" : "https://beta.connect.openaire.eu",
58

  
59
  "searchLinkToPublication" : "/search/publication?articleId:",
60
  "searchLinkToProject" : "/search/project?projectId:",
61
  "searchLinkToDataProvider" : "/search/dataprovider?datasourceId:",
62
  "searchLinkToDataset" : "/search/dataset?datasetId:",
63
  "searchLinkToOrganization" : "/search/organization?organizationId:",
64

  
65
  "searchLinkToPublications" : "/search/find/publications",
66
  "searchLinkToDataProviders" : "/search/find/dataproviders",
67
  "searchLinkToProjects" : "/search/find/projects",
68
  "searchLinkToDatasets" : "/search/find/datasets",
69
  "searchLinkToSoftware" : "/search/find/software",
70
  "searchLinkToOrganizations" : "/search/find/organizations",
71
  "searchLinkToCompatibleDataProviders" : "/search/content-providers",
72
  "searchLinkToCompatibleDataProvidersTable" : "/search/content-providers-table",
73
  "searchLinkToEntityRegistriesDataProviders" : "/search/entity-registries",
74
  "searchLinkToEntityRegistriesDataProvidersTable" : "/search/entity-registries-table",
75
  "searchLinkToJournals" : "/search/journals",
76
  "searchLinkToJournalsTable" : "/search/journals-table",
77

  
78
  "searchLinkToAdvancedPublications" : "/search/advanced/publications",
79
  "searchLinkToAdvancedProjects" : "/search/advanced/projects",
80
  "searchLinkToAdvancedDatasets" : "/search/advanced/datasets",
81
  "searchLinkToAdvancedSoftware" : "/search/advanced/software",
82
  "searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
83
  "searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
84
  "searchLinkToAdvancedPeople" : "/search/advanced/people"
85
}
modules/uoa-connect-portal/trunk/src/app/app.component.ts
5 5
import { EnvProperties} from './openaireLibrary/utils/properties/env-properties';
6 6
import{MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu';
7 7
import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
8
import {CommunityService} from "./openaireLibrary/connect/community/community.service";
8
import {CommunitiesService} from "./openaireLibrary/connect/communities/communities.service";
9
import {Session} from './openaireLibrary/login/utils/helper.class';
9 10

  
10 11

  
11 12
@Component({
......
17 18
  template: `
18 19

  
19 20
        <navbar *ngIf= "properties" portal="connect" onlyTop=false [(communityId)]="properties.adminToolsCommunity"  [userMenuItems]=userMenuItems [menuItems]=menuItems
20
        [(APIUrl)]="properties.adminToolsAPIURL" [(logInUrl)]="properties.loginUrl" [(logOutUrl)]="properties.logoutUrl"  [(cookieDomain)]="properties.cookieDomain" [(community)]=community></navbar>
21
        [(APIUrl)]="properties.adminToolsAPIURL" [(logInUrl)]="properties.loginUrl" [(logOutUrl)]="properties.logoutUrl"  [(cookieDomain)]="properties.cookieDomain" [(community)]=community [showMenu]=showMenu>2</navbar>
22

  
21 23
                   <div class="custom-main-content"   >
22 24
                      <main>
23 25
                       <router-outlet></router-outlet>
24 26
                     </main>
25 27
                    </div>
26
          <feedback *ngIf= "isClient" portalName="Connect" [feedbackmail]=feedbackmail></feedback>
28
          <feedback *ngIf= "isClient && properties" portalName="Connect" [feedbackmail]=properties.feedbackmail></feedback>
27 29
          <cookie-law *ngIf= "isClient" position="bottom">
28 30
              OpenAIRE uses cookies in order to function properly.<br>
29 31
              Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible.
......
45 47

  
46 48
  menuItems:RootMenuItem []=[];
47 49
  public community = null;
48
  feedbackmail:string
49
   properties:EnvProperties;
50
  properties:EnvProperties;
51
  showMenu:boolean = false;
50 52
  //  community: {id:string, name:string, logoUrl:string};
51
   constructor(  private  route: ActivatedRoute, private propertiesService:EnvironmentSpecificService, private _communityService:CommunityService ) {
53
   constructor(  private  route: ActivatedRoute, private propertiesService:EnvironmentSpecificService, private _communitiesService:CommunitiesService ) {
52 54
   }
53 55

  
54 56
   ngOnInit() {
......
56 58
             .then(es => {
57 59
                 this.propertiesService.setEnvProperties(es);
58 60
                 this.properties = this.propertiesService.envSpecific;
59
                 this.feedbackmail = this.properties.feedbackmail;
60 61

  
61 62
     this.route.queryParams.subscribe(data => {
63
       var community = null;
64
       this.showMenu = false;
65
       this._communitiesService.getCommunities(this.properties.communityAPI+"communities").subscribe (
66
         communities => {
67
              //  this.community = community;
62 68

  
63
       if((data['communityId'] && data['communityId']!="") || (data['community'] && data['community']!="") ){
64
         this.menuItems=[];
65
         this._communityService.getCommunity(this.properties.communityAPI+((data['communityId'])?data['communityId']:data['community'])).subscribe (
66
           community => {
67
                //  this.community = community;
68
                   this.community = {id: community.communityId, name: (community.shortTitle)?community.shortTitle:community.title, logoUrl:community.logoUrl};
69
               this.userMenuItems =[ new MenuItem("","My profile","","",false,[],[],{}),
70
                  new MenuItem("","My claims","","/myclaims",false,[],["/myclaims"],{}),
71
                ];
72
                for(var com of communities){
73
                  for(var manager of com.managers){
74
                      if(manager== Session.getUserEmail()){
75
                         this.userMenuItems.push(new MenuItem("","Manage "+((com.shortTitle)?com.shortTitle:com.title),"https://admin.demo.openaire.eu?communityId="+com.communityId,"",false,[],[],{}));
76
                      }
77
                  }
78
                  if((data['communityId'] && data['communityId']!="" &&  com.communityId  ==data['communityId'])  || (data['community'] && data['community']!="" &&  com.communityId  ==data['communityId'])){
79
                    community = com;
80
                    this.community = {id: community.communityId, name: (community.shortTitle)?community.shortTitle:community.title, logoUrl:community.logoUrl};
81
                    this.menuItems= [
82
                      {rootItem: new MenuItem("home","Home","","/",false,[],[],{}),
83
                      items: []},
84
                      {rootItem: new MenuItem("dashboard","Dashboard","","/community",false,[],[],{communityId:community.communityId}),
85
                      items: []
86
                      },
87
                      {rootItem: new MenuItem("search","Search","","",false,[],[],{}),
88
                        items: [new MenuItem("","Publications","","/search/find/publications",false,["publication"],["/search/find/publications"],{community:  encodeURIComponent('"'+community.queryId+'"'), communityId: community.communityId}),
89
                        new MenuItem("","Research Data","","/search/find/datasets",false,["dataset"],["/search/find/datasets"],{community:  encodeURIComponent('"'+community.queryId+'"'), communityId: community.communityId}),
90
                        new MenuItem("","Software","","/search/find/software",false,["software"],["/search/find/software"],{community:  encodeURIComponent('"'+community.queryId+'"'), communityId: community.communityId}),
91
                       new MenuItem("","Projects","","/search/find/projects/",false,["project"],["/search/find/projects"],{communityId: community.communityId}),
92
                       new MenuItem("","Content Providers","","/search/find/dataproviders",false,["datasource"],["/search/find/dataproviders"],{communityId: community.communityId}),
93
                       //  new MenuItem("","Organizations","","/search/find/organizations/",false,["organization"],["/search/find/organizations"],{community: community.communityId}),
94
                      ]},
95
                      {
96
                        rootItem: new MenuItem("monitor","Monitor","","/statistics",false,[],["/statistics"],{communityId:community.communityId}),
97
                        items: []
98
                      },
99
                      {
100
                      rootItem: new MenuItem("share","Share","","",false,[],["/participate/deposit-publications","/participate/deposit-datasets"],{communityId:community.communityId}),
101
                      items: [new MenuItem("","Publications","","/participate/deposit-publications",false,["publication"],["/participate/deposit-publications"],{communityId:community.communityId}),
102
                      new MenuItem("","Research Data","","/participate/deposit-datasets",false,["dataset"],["/participate/deposit-datasets"],{communityId:community.communityId})]
103
                      },
104
                      {
105
                      rootItem: new MenuItem("link","Link","","/participate/claim",false,[],["/participate/claim"],{communityId:community.communityId}),
106
                      items: []
107
                      }
108
                  ];
109
                  this.showMenu = true;
110
                  }
69 111

  
70
                    this.userMenuItems = [ new MenuItem("","My profile","","",false,[],[],{}),
71
                   new MenuItem("","My claims","","/myclaims",false,[],["/myclaims"],{}),
72
                   new MenuItem("","Manage all claims","","/claims",true,[],["/claims"],{}),]
112
                }
113
                if(!((data['communityId'] && data['communityId']!="") || (data['community'] && data['community']!="") )){
73 114

  
74
                   this.menuItems= [{
75
                   rootItem: new MenuItem("dashboard","Dashboard","","/community",false,[],[],{communityId:community.communityId}),
76
                   items: []
77
                   },
78
                     {rootItem: new MenuItem("search","Search","","",false,[],[],{}),
79
                       items: [new MenuItem("","Publications","","/search/find/publications",false,["publication"],["/search/find/publications"],{community:  encodeURIComponent('"'+community.queryId+'"'), communityId: community.communityId}),
80
                       new MenuItem("","Research Data","","/search/find/datasets",false,["dataset"],["/search/find/datasets"],{community:  encodeURIComponent('"'+community.queryId+'"'), communityId: community.communityId}),
81
                       new MenuItem("","Software","","/search/find/software",false,["software"],["/search/find/software"],{community:  encodeURIComponent('"'+community.queryId+'"'), communityId: community.communityId}),
82
                      new MenuItem("","Projects","","/search/find/projects/",false,["project"],["/search/find/projects"],{communityId: community.communityId}),
83
                      //  new MenuItem("","Content Providers","","/search/find/dataproviders",false,["datasource"],["/search/find/dataproviders"],{community: "%22egi%7C%7CEGI%20Federation%22"}),
84
                      //  new MenuItem("","Organizations","","/search/find/organizations/",false,["organization"],["/search/find/organizations"],{community: "%22egi%7C%7CEGI%20Federation%22"}),
85
                     ]},
86
                     {
87
                       rootItem: new MenuItem("monitor","Monitor","","/statistics",false,[],["/statistics"],{communityId:community.communityId}),
88
                       items: []
89
                     },
90
                     {
91
                     rootItem: new MenuItem("share","Share","","",false,[],["/participate/deposit-publications","/participate/deposit-datasets"],{communityId:community.communityId}),
92
                     items: [new MenuItem("","Publications","","/participate/deposit-publications",false,["publication"],["/participate/deposit-publications"],{communityId:community.communityId}),
93
                     new MenuItem("","Research Data","","/participate/deposit-datasets",false,["dataset"],["/participate/deposit-datasets"],{communityId:community.communityId})]
94
                     },
95
                     {
96
                     rootItem: new MenuItem("link","Link","","/participate/claim",false,[],["/participate/claim"],{communityId:community.communityId}),
97
                     items: []
98
                     }
99
                 ];
100
           });
115
                  this.community = null;
101 116

  
102
       }else{
103
         this.community = null;
104
         this.userMenuItems = [ new MenuItem("","My profile","","",false,[],[],{}),
105
        new MenuItem("","My claims","","/myclaims",false,[],["/myclaims"],{}),
106
        new MenuItem("","Manage all claims","","/claims",true,[],["/claims"],{}),];
107
         this.menuItems= [
108
           {
109
           rootItem: new MenuItem("communities","Communities","","/",false,[],[],{}),
110
           items: []
111
           }
112
       ];
113
       }
117
                  this.menuItems= [
118
                    {rootItem: new MenuItem("communities","Communities","","/",false,[],[],{}),
119
                    items: []
120
                }
121
                ];
122
                this.showMenu = true;
123
                }
114 124

  
125
         });
126

  
127

  
115 128
   });
116 129
     if (typeof document !== 'undefined') {
117 130
       try{
modules/uoa-connect-portal/trunk/src/assets/env-properties.json
39 39

  
40 40
  "vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",
41 41

  
42
  "piwikBaseUrl" :" https://analytics.openaire.eu/piwik.php?idsite:6",
42
  "piwikBaseUrl" :" https://analytics.openaire.eu/piwik.php?idsite=6",
43 43

  
44 44

  
45 45
  "loginUrl" :"http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
46 46

  
47
  "logoutUrl" :"https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo:",
47
  "logoutUrl" :"https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
48 48

  
49 49
  "logoutOpenaireUrl" :"http://dl067.madgik.di.uoa.gr/idp/profile/Logout",
50 50

  

Also available in: Unified diff