[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:
parent
946ed38d5d
commit
454231e9c9
|
@ -4,7 +4,7 @@ import {properties} from "../../../environments/environment";
|
||||||
export class ConnectHelper {
|
export class ConnectHelper {
|
||||||
|
|
||||||
public static getCommunityFromDomain(domain: string): string{
|
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
|
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
|
||||||
if (domain.indexOf('openaire.eu') === -1) {
|
if (domain.indexOf('openaire.eu') === -1) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -20,7 +20,7 @@ import {Subscriber} from "rxjs";
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'b2note',
|
selector: 'b2note',
|
||||||
template: `
|
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">
|
<div class="b2note">
|
||||||
<form #form ngNoForm *ngIf="pid && user"
|
<form #form ngNoForm *ngIf="pid && user"
|
||||||
[action]="properties.b2noteAPIURL + 'widget'"
|
[action]="properties.b2noteAPIURL + 'widget'"
|
||||||
|
|
|
@ -107,10 +107,10 @@
|
||||||
</span>
|
</span>
|
||||||
<span class="uk-margin-small-left">add annotation</span>
|
<span class="uk-margin-small-left">add annotation</span>
|
||||||
</a>
|
</a>
|
||||||
<span *ngIf="!pid || !user" class="uk-link-text uk-text-bold uk-text-uppercase disabled"
|
<span *ngIf="!pid || !user" class="uk-link-text uk-text-bold uk-text-uppercase uk-text-muted"
|
||||||
[attr.uk-tooltip]="!pid?'Annotations are only available for resources with a PID (persistent identifier) like DOI, handle, PMID':
|
[attr.uk-tooltip]="!pid?'Annotations are available only for resources with a PID (persistent identifier) like DOI, handle, PMID':
|
||||||
'Annotations are only available for logged in users'">
|
'Annotations are available only for logged in users'">
|
||||||
<span class="uk-icon-button uk-button-primary uk-icon disabled">
|
<span class="uk-icon-button uk-icon uk-disabled">
|
||||||
<img src="assets/common-assets/b2note.png">
|
<img src="assets/common-assets/b2note.png">
|
||||||
</span>
|
</span>
|
||||||
<span class="uk-margin-small-left">add annotation</span>
|
<span class="uk-margin-small-left">add annotation</span>
|
||||||
|
|
Loading…
Reference in New Issue