[Monitor | Trunk]: Add badge for visibility on stakeholders(home)

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@59738 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Konstantinos Triantafyllou 2020-11-02 15:51:11 +00:00
parent 8b67c628be
commit c179f79f51
5 changed files with 29 additions and 10 deletions

View File

@ -75,10 +75,10 @@
} }
.stakeholder-section .uk-card { .stakeholder-section .uk-card {
border-radius: 36px; border-radius: 20px;
color: currentColor; color: currentColor;
font-family: "Roboto", sans-serif; font-family: "Roboto", sans-serif;
padding: 60px 20px; padding: 70px 20px;
} }
.stakeholder-section .uk-card img { .stakeholder-section .uk-card img {

View File

@ -188,12 +188,16 @@
<!--<li uk-filter-control="[data-type='project']"><a (click)="type = 'project'">Projects</a></li>--> <!--<li uk-filter-control="[data-type='project']"><a (click)="type = 'project'">Projects</a></li>-->
<li uk-filter-control="[data-type='organization']"><a (click)="type = 'organization'">Organizations</a></li> <li uk-filter-control="[data-type='organization']"><a (click)="type = 'organization'">Organizations</a></li>
</ul> </ul>
<div <div class="stakeholders uk-margin-large-top uk-child-width-1-1 uk-child-width-1-2@s uk-child-width-1-3@m uk-grid uk-flex-top uk-flex-wrap-top"
class="stakeholders uk-margin-large-top uk-child-width-1-1 uk-child-width-1-2@s uk-child-width-1-3@m uk-grid uk-flex-top uk-flex-wrap-top"
uk-grid="masonry: true" uk-height-match="target: .uk-card; row: false;"> uk-grid="masonry: true" uk-height-match="target: .uk-card; row: false;">
<div *ngFor="let stakeholder of stakeholders" [attr.data-type]="stakeholder.type"> <div *ngFor="let stakeholder of stakeholders" [attr.data-type]="stakeholder.type">
<a *ngIf="directLink" [href]="getStakeholderPageUrl(stakeholder)" target="_blank"> <a *ngIf="directLink" [href]="getStakeholderPageUrl(stakeholder)" target="_blank">
<div class="uk-card uk-card-default uk-text-center"> <div class="uk-card uk-card-default uk-text-center uk-position-relative">
<div *ngIf="stakeholder.visibility && stakeholder.visibility !== 'PUBLIC'"
class="uk-position-top-right uk-margin-top uk-margin-right uk-flex uk-flex-middle">
<icon [name]="visibilityIcon.get(stakeholder.visibility)" [flex]="true"></icon>
<span class="space uk-text-small uk-text-capitalize">{{stakeholder.visibility.toLowerCase()}}</span>
</div>
<img *ngIf="stakeholder.logoUrl" class="uk-margin-auto" [src]="stakeholder.logoUrl"> <img *ngIf="stakeholder.logoUrl" class="uk-margin-auto" [src]="stakeholder.logoUrl">
<div class="uk-text-light uk-margin-medium-top">{{stakeholder.name}}</div> <div class="uk-text-light uk-margin-medium-top">{{stakeholder.name}}</div>
</div> </div>

View File

@ -15,7 +15,7 @@ import {SearchResearchResultsService} from "../openaireLibrary/services/searchRe
import {animate, state, style, transition, trigger} from "@angular/animations"; import {animate, state, style, transition, trigger} from "@angular/animations";
import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service";
import {LocalStorageService} from "../openaireLibrary/services/localStorage.service"; import {LocalStorageService} from "../openaireLibrary/services/localStorage.service";
import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder"; import {Stakeholder, Visibility} from "../openaireLibrary/monitor/entities/stakeholder";
import {Session, User} from "../openaireLibrary/login/utils/helper.class"; import {Session, User} from "../openaireLibrary/login/utils/helper.class";
import {UserManagementService} from "../openaireLibrary/services/user-management.service"; import {UserManagementService} from "../openaireLibrary/services/user-management.service";
@ -80,6 +80,11 @@ export class HomeComponent {
@ViewChild('AlertModal') modal; @ViewChild('AlertModal') modal;
public directLink: boolean = true; public directLink: boolean = true;
private user: User; private user: User;
visibilityIcon: Map<Visibility, string> = new Map<Visibility, string> ([
["PUBLIC", 'earth'],
["PRIVATE", 'lock'],
["RESTRICTED", 'group']
]);
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -18,12 +18,15 @@ import {HomeRoutingModule} from "./home-routing.module";
import {RefineFieldResultsServiceModule} from "../openaireLibrary/services/refineFieldResultsService.module"; import {RefineFieldResultsServiceModule} from "../openaireLibrary/services/refineFieldResultsService.module";
import {SearchResearchResultsServiceModule} from "../openaireLibrary/services/searchResearchResultsService.module"; import {SearchResearchResultsServiceModule} from "../openaireLibrary/services/searchResearchResultsService.module";
import {AlertModalModule} from "../openaireLibrary/utils/modal/alertModal.module"; import {AlertModalModule} from "../openaireLibrary/utils/modal/alertModal.module";
import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
import {IconsService} from "../openaireLibrary/utils/icons/icons.service";
import {group, lock} from "../openaireLibrary/utils/icons/icons";
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, RouterModule, ErrorMessagesModule, OtherPortalsModule, CommonModule, FormsModule, RouterModule, ErrorMessagesModule, OtherPortalsModule,
HelperModule, Schema2jsonldModule, SEOServiceModule, HomeRoutingModule, SearchResearchResultsServiceModule, HelperModule, Schema2jsonldModule, SEOServiceModule, HomeRoutingModule, SearchResearchResultsServiceModule,
RefineFieldResultsServiceModule, AlertModalModule RefineFieldResultsServiceModule, AlertModalModule, IconsModule
], ],
declarations: [ declarations: [
HomeComponent HomeComponent
@ -37,4 +40,7 @@ import {AlertModalModule} from "../openaireLibrary/utils/modal/alertModal.module
] ]
}) })
export class HomeModule { export class HomeModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([group, lock])
}
} }

View File

@ -44,13 +44,17 @@ export let properties: EnvProperties = {
vocabulariesAPI: "https://beta.services.openaire.eu/provision/mvc/vocabularies/", vocabulariesAPI: "https://beta.services.openaire.eu/provision/mvc/vocabularies/",
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=", piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
piwikSiteId: "80", piwikSiteId: "80",
loginUrl: "http://dl170.madgik.di.uoa.gr:8180/dnet-login/openid_connect_login", registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/',
loginUrl: "http://mpagasas.di.uoa.gr:8180/dnet-login/openid_connect_login",
userInfoUrl: "http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
logoutUrl: 'http://mpagasas.di.uoa.gr:8180/dnet-login/openid_logout',
/*loginUrl: "http://dl170.madgik.di.uoa.gr:8180/dnet-login/openid_connect_login",
userInfoUrl: "http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=", userInfoUrl: "http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
logoutUrl: "https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=", logoutUrl: "https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",*/
cookieDomain: ".di.uoa.gr", cookieDomain: ".di.uoa.gr",
feedbackmail: "openaire.test@gmail.com", feedbackmail: "openaire.test@gmail.com",
cacheUrl: "http://scoobydoo.di.uoa.gr:3000/get?url=", cacheUrl: "http://scoobydoo.di.uoa.gr:3000/get?url=",
monitorServiceAPIURL: "https://beta.services.openaire.eu/uoa-monitor-service", monitorServiceAPIURL: "http://duffy.di.uoa.gr:8080/uoa-monitor-service",
adminToolsAPIURL: "http://duffy.di.uoa.gr:8080/uoa-admin-tools/", adminToolsAPIURL: "http://duffy.di.uoa.gr:8080/uoa-admin-tools/",
adminToolsCommunity: "monitor", adminToolsCommunity: "monitor",
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/", datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/",