-
![](assets/common-assets/common/ORCIDiD_icon16x16.png)
{{" "}}
-
![](assets/common-assets/common/ORCIDiD_iconbw16x16.png)
{{" "}}
+
+
+
+
+
{{author.fullName}}
+
+
ORCID
-
Harvested from ORCID Public Data File
-
Derived by OpenAIRE algorithms or harvested from 3d party repositories
+
+
![](assets/common-assets/common/ORCIDiD_icon16x16.png)
{{" "}}
+
![](assets/common-assets/common/ORCIDiD_iconbw16x16.png)
{{" "}}
+
+
Harvested from ORCID Public Data File
+
Derived by OpenAIRE algorithms or harvested from 3d party repositories
+
+
+
-
-
-
- Search {{author.fullName}} in OpenAIRE
-
-
+
+
+
+
+ {{author.fullName}} in OpenAIRE
+
+
-
-
authorsLimit"> ...
+
+
+
+
+
+
+
+
authorsLimit && !viewAll" class="uk-text-small uk-link-text">
+
+ +{{authors.length-authorsLimit | number}} Authors
+
+
-
-
authorsLimit" class="uk-width-1-1 uk-text-right">
+
+
+
+
+
+
+
+
+
`
})
export class ShowAuthorsComponent {
@Input() authors: Author[];
- @Input() authorsLimit: number = 30;
+ @Input() authorsLimit: number = 3;
@Input() showAll: boolean = true;
- @Input() small: boolean = true;
@Input() modal: AlertModal;
-
+ @Input() viewAll: boolean = false;
+ public lessBtn: boolean = false;
+ @ViewChild('authorsModal') authorsModal;
+
public numberOfAuthors: number;
public properties: EnvProperties = properties;
public routerHelper: RouterHelper = new RouterHelper();
@@ -119,4 +136,20 @@ export class ShowAuthorsComponent {
this.modal.cancel();
}
}
+
+ public viewAllClick() {
+ if(this.authors.length <= this.authorsLimit*2) {
+ this.viewAll = true;
+ this.lessBtn = true;
+ } else {
+ this.openAuthorsModal();
+ }
+ }
+
+ public openAuthorsModal() {
+ this.authorsModal.cancelButton = false;
+ this.authorsModal.okButton = false;
+ this.authorsModal.alertTitle = "Authors";
+ this.authorsModal.open();
+ }
}
diff --git a/utils/authors/showAuthors.module.ts b/utils/authors/showAuthors.module.ts
index 0c7f72d3..a9cd2e12 100644
--- a/utils/authors/showAuthors.module.ts
+++ b/utils/authors/showAuthors.module.ts
@@ -4,10 +4,11 @@ import {FormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
import {ShowAuthorsComponent} from './showAuthors.component';
+import {AlertModalModule} from "../modal/alertModal.module";
@NgModule({
imports: [
- CommonModule, FormsModule, RouterModule
+ CommonModule, FormsModule, RouterModule, AlertModalModule
],
declarations: [
ShowAuthorsComponent