[Monitor|Dashboard | Trunk]

Sidebar menu: add link to search research outcomes - build parameters for each stakeholder
 

Search pages:
	add isHidden = false for the custom filter
	remove openaireSearchLink

CSS: 
	-add css for mini_title of sidebar
	-add selectedFilters css
		


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59079 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Argiro Kokogiannaki 2020-07-13 09:23:04 +00:00
parent ffc2fb3d71
commit 49a41627b1
11 changed files with 67 additions and 20 deletions

View File

@ -46,7 +46,8 @@
<dashboard-sidebar *ngIf="stakeholder && isFrontPage" [items]="sideBarItems" <dashboard-sidebar *ngIf="stakeholder && isFrontPage" [items]="sideBarItems"
[activeItem]="activeTopic?activeTopic.alias:null" [showHeader]=true [activeItem]="activeTopic?activeTopic.alias:null" [showHeader]=true
headerName="Monitor" headerName="Monitor"
[searchLink]="(properties.showContent)?stakeholder.alias+'/search/':null" [searchLink]="(properties.showContent)?properties.searchLinkToResults:null"
[searchParams]="createSearchParameters()"
[headerUrl]="properties.baseLink" [headerUrl]="properties.baseLink"
></dashboard-sidebar> ></dashboard-sidebar>
<dashboard-sidebar *ngIf="hasAdminMenu" [items]="adminMenuItems" headerName="Monitor" <dashboard-sidebar *ngIf="hasAdminMenu" [items]="adminMenuItems" headerName="Monitor"

View File

@ -220,4 +220,18 @@ export class AppComponent implements OnInit, OnDestroy {
return false; return false;
} }
} }
createSearchParameters(){
if(!this.stakeholder){
return {};
}
if(this.stakeholder.type == "funder"){
return { "relfunder":encodeURIComponent("\"" + this.stakeholder.index_id + "||"+this.stakeholder.index_name + "||"+this.stakeholder.index_shortName + "\"" )};
}else if(this.stakeholder.type == "ri"){
// https://beta.explore.openaire.eu/search/find/research-outcomes?f0=q&fv0=&resultbestaccessright=%22Open%20Access%22&community=%22mes%7C%7CEuropean%20Marine%20Science%22&qf=true
return { "community":encodeURIComponent("\"" + this.stakeholder.index_id + "||"+this.stakeholder.index_name + "\"" )};
}else if(this.stakeholder.type == "organization"){
return { "relorganizationid":encodeURIComponent("\"" + this.stakeholder.index_id + "\"" )};
}
}
} }

View File

@ -30,7 +30,7 @@
</ul> </ul>
<div *ngIf="filterApplied"> <div *ngIf="filterApplied">
<span>Filters: </span> <span>Filters: </span>
<span *ngIf="periodFilter.selectedFromAndToValues.length > 0" class="filter"> <span *ngIf="periodFilter.selectedFromAndToValues.length > 0" class="selectedFilterLabel">
<a (click)="clearPeriodFilter()"> <i <a (click)="clearPeriodFilter()"> <i
class=" material-icons"></i> class=" material-icons"></i>
</a> {{periodFilter.selectedFromAndToValues}}</span> </a> {{periodFilter.selectedFromAndToValues}}</span>
@ -173,7 +173,7 @@
<div class="uk-padding"> <div class="uk-padding">
<div class="uk-h4 ">Filters</div> <div class="uk-h4 ">Filters</div>
<div *ngIf="periodFilter.selectedFromAndToValues.length > 0"> <div *ngIf="periodFilter.selectedFromAndToValues.length > 0">
<span class="filter" title="Remove {{periodFilter.selectedFromAndToValues}}"> <span class="selectedFilterLabel" title="Remove {{periodFilter.selectedFromAndToValues}}">
<a (click)="clearPeriodFilter()"> <i <a (click)="clearPeriodFilter()"> <i
class=" material-icons"></i> class=" material-icons"></i>
</a> {{periodFilter.selectedFromAndToValues}}</span> </a> {{periodFilter.selectedFromAndToValues}}</span>

View File

@ -8,7 +8,6 @@ import {StakeholderService} from "../../../openaireLibrary/monitor/services/stak
template: ` template: `
<div id="page_content"> <div id="page_content">
<search-dataproviders *ngIf="initialized" [simpleView]="false" <search-dataproviders *ngIf="initialized" [simpleView]="false"
openaireLink="https://beta.explore.openaire.eu/search/find/dataproviders"
[customFilter]=customFilter [hasPrefix]="false" [customFilter]=customFilter [hasPrefix]="false"
[includeOnlyResultsAndFilter]="false"> [includeOnlyResultsAndFilter]="false">
</search-dataproviders> </search-dataproviders>
@ -34,6 +33,7 @@ export class MonitorAdvancedSearchDataprovidersComponent {
} else if (stakeholder.type === "organization") { } else if (stakeholder.type === "organization") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, ""); this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
this.customFilter.isHiddenFilter = false;
} else if (stakeholder.type === "ri") { } else if (stakeholder.type === "ri") {
this.navigateToError(); this.navigateToError();
} }

View File

@ -8,7 +8,6 @@ import {StakeholderService} from "../../../openaireLibrary/monitor/services/stak
template: ` template: `
<div id="page_content"> <div id="page_content">
<search-projects *ngIf="initialized" [simpleView]="false" <search-projects *ngIf="initialized" [simpleView]="false"
openaireLink="https://beta.explore.openaire.eu/search/find/projects"
[customFilter]=customFilter [hasPrefix]="false" [customFilter]=customFilter [hasPrefix]="false"
[includeOnlyResultsAndFilter]="false"> [includeOnlyResultsAndFilter]="false">
</search-projects> </search-projects>
@ -33,9 +32,11 @@ export class MonitorAdvancedSearchProjectsComponent {
if (stakeholder.type === "funder") { if (stakeholder.type === "funder") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Funder", "funderid", value, ""); this.customFilter = new SearchCustomFilter("Funder", "funderid", value, "");
this.customFilter.isHiddenFilter = false;
} else if (stakeholder.type === "organization") { } else if (stakeholder.type === "organization") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, ""); this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
this.customFilter.isHiddenFilter = false;
} else if (stakeholder.type === "ri") { } else if (stakeholder.type === "ri") {
this.navigateToError(); this.navigateToError();
} }

View File

@ -8,7 +8,6 @@ import {StakeholderService} from "../../../openaireLibrary/monitor/services/stak
template: ` template: `
<div id="page_content"> <div id="page_content">
<search-research-results *ngIf="initialized" resultType="result" [simpleView]="false" <search-research-results *ngIf="initialized" resultType="result" [simpleView]="false"
openaireLink="https://beta.explore.openaire.eu/search/find/publications"
[customFilter]=customFilter [hasPrefix]="false" [customFilter]=customFilter [hasPrefix]="false"
[includeOnlyResultsAndFilter]="false" [includeOnlyResultsAndFilter]="false"
[showAdvancedSearchLink]="true"></search-research-results> [showAdvancedSearchLink]="true"></search-research-results>
@ -32,11 +31,14 @@ export class MonitorAdvancedSearchResearchResultsComponent {
if (stakeholder.type === "funder") { if (stakeholder.type === "funder") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Funder", "relfunderid", value, ""); this.customFilter = new SearchCustomFilter("Funder", "relfunderid", value, "");
this.customFilter.isHiddenFilter = false;
} else if (stakeholder.type === "organization") { } else if (stakeholder.type === "organization") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, ""); this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
this.customFilter.isHiddenFilter = false;
} else if (stakeholder.type === "ri") { } else if (stakeholder.type === "ri") {
this.customFilter = new SearchCustomFilter("Community", "communityId", stakeholder.index_id, ""); this.customFilter = new SearchCustomFilter("Community", "communityId", stakeholder.index_id, "");
this.customFilter.isHiddenFilter = false;
} }
this.initialized = true; this.initialized = true;
} }

View File

@ -8,7 +8,6 @@ import {StakeholderService} from "../../../openaireLibrary/monitor/services/stak
template: ` template: `
<div id="page_content"> <div id="page_content">
<search-dataproviders *ngIf="initialized" <search-dataproviders *ngIf="initialized"
openaireLink="https://beta.explore.openaire.eu/search/find/dataproviders"
[customFilter]=customFilter [hasPrefix]="false" [customFilter]=customFilter [hasPrefix]="false"
[includeOnlyResultsAndFilter]="false"> [includeOnlyResultsAndFilter]="false">
</search-dataproviders> </search-dataproviders>
@ -34,6 +33,7 @@ export class MonitorSearchDataprovidersComponent {
} else if (stakeholder.type === "organization") { } else if (stakeholder.type === "organization") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, ""); this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
this.customFilter.isHiddenFilter = false;
} else if (stakeholder.type === "ri") { } else if (stakeholder.type === "ri") {
this.navigateToError(); this.navigateToError();
} }

View File

@ -8,7 +8,6 @@ import {StakeholderService} from "../../../openaireLibrary/monitor/services/stak
template: ` template: `
<div id="page_content"> <div id="page_content">
<search-projects *ngIf="initialized" <search-projects *ngIf="initialized"
openaireLink="https://beta.explore.openaire.eu/search/find/projects"
[customFilter]=customFilter [hasPrefix]="false" [customFilter]=customFilter [hasPrefix]="false"
[includeOnlyResultsAndFilter]="false"> [includeOnlyResultsAndFilter]="false">
</search-projects> </search-projects>
@ -33,13 +32,16 @@ export class MonitorSearchProjectsComponent {
if (stakeholder.type === "funder") { if (stakeholder.type === "funder") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Funder", "funderid", value, ""); this.customFilter = new SearchCustomFilter("Funder", "funderid", value, "");
this.customFilter.isHiddenFilter = false;
} else if (stakeholder.type === "organization") { } else if (stakeholder.type === "organization") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, ""); this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
this.customFilter.isHiddenFilter = false;
} else if (stakeholder.type === "ri") { } else if (stakeholder.type === "ri") {
this.navigateToError(); this.navigateToError();
} }
this.initialized = true; this.initialized = true;
} }
}); });
} else { } else {

View File

@ -8,7 +8,6 @@ import {StakeholderService} from "../../../openaireLibrary/monitor/services/stak
template: ` template: `
<div id="page_content"> <div id="page_content">
<search-research-results *ngIf="initialized" resultType="result" <search-research-results *ngIf="initialized" resultType="result"
openaireLink="https://beta.explore.openaire.eu/search/find/publications"
[customFilter]=customFilter [hasPrefix]="false" [customFilter]=customFilter [hasPrefix]="false"
[includeOnlyResultsAndFilter]="false" [includeOnlyResultsAndFilter]="false"
[showAdvancedSearchLink]="true"></search-research-results> [showAdvancedSearchLink]="true"></search-research-results>
@ -32,11 +31,14 @@ export class MonitorSearchResearchResultsComponent {
if (stakeholder.type === "funder") { if (stakeholder.type === "funder") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Funder", "relfunderid", value, ""); this.customFilter = new SearchCustomFilter("Funder", "relfunderid", value, "");
this.customFilter.isHiddenFilter = false;
} else if (stakeholder.type === "organization") { } else if (stakeholder.type === "organization") {
let value = stakeholder.index_id; let value = stakeholder.index_id;
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, ""); this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
this.customFilter.isHiddenFilter = true;
} else if (stakeholder.type === "ri") { } else if (stakeholder.type === "ri") {
this.customFilter = new SearchCustomFilter("Community", "communityId", stakeholder.index_id, ""); this.customFilter = new SearchCustomFilter("Community", "communityId", stakeholder.index_id, "");
this.customFilter.isHiddenFilter = false;
} }
this.initialized = true; this.initialized = true;
} }

View File

@ -84,7 +84,7 @@
{ {
background-color: var(--portal-main-color) !important; background-color: var(--portal-main-color) !important;
} }
.stakeholderPage #sidebar_main .menu_section > ul > li.current_section .menu_title, .stakeholderPage #sidebar_main .menu_section > ul > li.current_section:hover .menu_title, .stakeholderPage #sidebar_main .menu_section > ul > li.current_section > a > .menu_icon .material-icons, .stakeholderPage #sidebar_main .menu_section > ul > li.current_section .menu_title,.stakeholderPage #sidebar_main .menu_section > ul > li.current_section .menu_mini_title, .stakeholderPage #sidebar_main .menu_section > ul > li.current_section:hover .menu_title, .stakeholderPage #sidebar_main .menu_section > ul > li.current_section:hover .menu_mini_title, .stakeholderPage #sidebar_main .menu_section > ul > li.current_section > a > .menu_icon .material-icons,
.stakeholderPage #sidebar_main .menu_section > ul > li.current_section > a > .menu_icon svg * .stakeholderPage #sidebar_main .menu_section > ul > li.current_section > a > .menu_icon svg *
/*, .stakeholderPage #sidebar_main .menu_section > ul > li.current_section:hover > a > .menu_icon svg **/ /*, .stakeholderPage #sidebar_main .menu_section > ul > li.current_section:hover > a > .menu_icon svg **/
/*.stakeholderPage #sidebar_main .menu_section > ul > li:hover > a > .menu_icon .material-icons*/ /*.stakeholderPage #sidebar_main .menu_section > ul > li:hover > a > .menu_icon .material-icons*/
@ -143,16 +143,6 @@ bottom a:not(.license), bottom a > :not(svg) {
margin-right: -30% !important; margin-right: -30% !important;
} }
.filter{
background: var(--portal-main-color);
color: white;
padding: 8px;
border-radius: 25px;
}
.filter, .filter .material-icons{
color: white;
}
.ng5-slider .ng5-slider-pointer, .ng5-slider .ng5-slider-selection { .ng5-slider .ng5-slider-pointer, .ng5-slider .ng5-slider-selection {
background-color: var(--portal-main-color) !important; background-color: var(--portal-main-color) !important;
} }
@ -180,3 +170,28 @@ bottom a:not(.license), bottom a > :not(svg) {
.uk-subnav.uk-subnav-divider.recentyears { .uk-subnav.uk-subnav-divider.recentyears {
padding-left: 0 !important; padding-left: 0 !important;
} }
/*add miniTitle*/
.sidebar_mini #sidebar_main .menu_section > ul > li > a .menu_icon{
height:35px !important;
}
/* #sidebar_main .menu_section > ul > li > a .menu_icon{*/
/* height:35px !important;*/
/*}*/
#sidebar_main .menu_section > ul > li > a {
height:inherit !important;
}
.stakeholderPage #sidebar_main .menu_section > ul > li .menu_mini_title {
font-size: 9px !important;
line-height: 12px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
text-overflow: ellipsis;
overflow: hidden;
}
.stakeholderPage:not(.sidebar_mini) #sidebar_main .menu_section > ul > li .menu_mini_title{
display: none;
}

View File

@ -557,3 +557,13 @@ body.dashboard {
.dashboard [class*="uk-icon-"][class*="uk-button-"]:not(.uk-button-default) { .dashboard [class*="uk-icon-"][class*="uk-button-"]:not(.uk-button-default) {
color: #fff; color: #fff;
} }
.selectedFilterLabel{
background: var(--portal-main-color) !important;
color: white !important;
padding: 6px 10px !important;
border-radius: 25px !important;
}
.selectedFilterLabel, .selectedFilterLabel .material-icons{
color: white;
}