[Library | Trunk]: 1. Hide Annotations title if annotation list is empty. 2. Make more obvious when add annotation is disable

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60193 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-01-05 15:12:05 +00:00
parent 946ed38d5d
commit 454231e9c9
3 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@ import {properties} from "../../../environments/environment";
export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
//domain = "beta.covid-19.openaire.eu"; //for testing
domain = "beta.covid-19.openaire.eu"; //for testing
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
if (domain.indexOf('openaire.eu') === -1) {
return null;

View File

@ -20,7 +20,7 @@ import {Subscriber} from "rxjs";
@Component({
selector: 'b2note',
template: `
<div class="sideInfoTitle uk-margin-small-bottom">Annotations</div>
<div *ngIf="annotations && annotations.length > 0" class="sideInfoTitle uk-margin-small-bottom">Annotations</div>
<div class="b2note">
<form #form ngNoForm *ngIf="pid && user"
[action]="properties.b2noteAPIURL + 'widget'"

View File

@ -107,10 +107,10 @@
</span>
<span class="uk-margin-small-left">add annotation</span>
</a>
<span *ngIf="!pid || !user" class="uk-link-text uk-text-bold uk-text-uppercase disabled"
[attr.uk-tooltip]="!pid?'Annotations are only available for resources with a PID (persistent identifier) like DOI, handle, PMID':
'Annotations are only available for logged in users'">
<span class="uk-icon-button uk-button-primary uk-icon disabled">
<span *ngIf="!pid || !user" class="uk-link-text uk-text-bold uk-text-uppercase uk-text-muted"
[attr.uk-tooltip]="!pid?'Annotations are available only for resources with a PID (persistent identifier) like DOI, handle, PMID':
'Annotations are available only for logged in users'">
<span class="uk-icon-button uk-icon uk-disabled">
<img src="assets/common-assets/b2note.png">
</span>
<span class="uk-margin-small-left">add annotation</span>