2022-07-13 19:26:10 +02:00
< div page-content >
2022-07-04 14:13:33 +02:00
< div header >
2022-07-13 19:26:10 +02:00
< div class = "uk-flex uk-flex-middle uk-margin-top info" >
2018-10-30 16:31:16 +01:00
< div >
2022-07-04 14:13:33 +02:00
< div class = "uk-margin-remove uk-text-background uk-text-bold uk-h6" > Admin Dashboard - Manage Subjects
< / div >
< h1 class = "uk-h4 uk-margin-remove" > {{community.shortTitle}}< / h1 >
2018-10-30 16:31:16 +01:00
< / div >
< / div >
2022-07-04 14:13:33 +02:00
< community-info tab = "subjects" > < / community-info >
2021-05-19 13:40:29 +02:00
< / div >
2022-07-13 19:26:10 +02:00
< div actions >
< div class = "uk-section-xsmall" >
< div class = "uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid uk-margin-top" uk-grid >
< div [ disabled ] = " showLoading " search-input class = "uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
[searchControl]="filterForm" [expandable]="true" placeholder="Search Subjects" searchInputClass="outer">
< / div >
<!-- <a *ngIf="!subjectsEnabled" (click)="enablePage()" class="uk - link - heading uk - text - small uk - text - uppercase"
uk-tooltip="title:< div class = 'uk-padding-small' > This information will be visible in < b > Subjects page< / b > of Research Community Dashboard, which is < b > disabled< / b > . < br > Click to enable id.< / div > ">
< span class = "uk-text-secondary" > < icon name = "check_circle_outlined" > < / icon > < / span >
Enable page
< / a > -->
< div >
< button class = "uk-button uk-button-default uk-flex uk-flex-middle"
[disabled]="showLoading" [class.uk-disabled]="showLoading"
(click)="newSubject()"
uk-tooltip="title:< div > < div class = 'uk-margin-small-bottom uk-text-bold' > Add new subjects< / div > All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.< / div > ">
< icon name = "add" [ flex ] = " true " > < / icon >
< span class = "uk-margin-small-left" > New Subject< / span >
< / button >
< / div >
2022-07-04 14:13:33 +02:00
< / div >
< / div >
2022-07-13 19:26:10 +02:00
< / div >
< div inner >
2022-07-04 14:13:33 +02:00
< div class = "uk-section uk-section-small uk-position-relative" style = "min-height: 60vh" >
< div * ngIf = "showLoading" class = "uk-position-center" >
< loading > < / loading >
2021-05-19 13:40:29 +02:00
< / div >
2022-07-04 14:13:33 +02:00
< div * ngIf = "!showLoading" >
< div * ngIf = "community.subjects.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
2022-07-11 17:48:24 +02:00
< div > No subjects
< span * ngIf = "originalSubjects.length == 0; else: notFound" > for {{community.shortTitle}}< / span >
< ng-template # notFound > found< / ng-template >
< / div >
2022-07-04 14:13:33 +02:00
< / div >
< div * ngIf = "community.subjects.length > 0" >
< no-load-paging * ngIf = "community.subjects.length > 0" [ type ] = " ' Subjects ' "
[page]="page" [pageSize]="size" (pageChange)="updatePage($event)"
[totalResults]="community.subjects.length">
< / no-load-paging >
< div class = "uk-grid uk-grid-large uk-grid-match uk-child-width-1-1 uk-child-width-1-2@m uk-margin-top uk-margin-bottom" uk-grid >
< div * ngFor = 'let subject of currentPage; let i = index;' >
< div class = "uk-card uk-card-default" >
< div class = "uk-card-body" >
< h6 uk-tooltip = "title:All the research results associated to this subjects will be automatically linked to the community dashboard."
class="uk-display-inline-block">
{{subject}}
< / h6 >
< / div >
< div class = "uk-card-footer uk-padding-remove-vertical" >
< div class = "uk-grid uk-grid-small uk-flex-nowrap uk-grid-divider uk-flex-right" uk-grid >
< div >
< div class = "uk-padding-small uk-padding-remove-horizontal" >
< a ( click ) = " editSubject ( subject ) "
class="uk-button uk-button-link uk-flex uk-flex-middle">
< icon name = "edit" [ flex ] = " true " > < / icon >
< span class = "uk-margin-xsmall-left" > Edit< / span >
< / a >
< / div >
< / div >
< div >
< div class = "uk-padding-small uk-padding-remove-horizontal" >
< button class = "uk-button uk-button-link uk-flex uk-flex-middle"
(click)="removeModalOpen(subject, i)">
< icon name = "delete" [ flex ] = " true " > < / icon >
< span class = "uk-margin-xsmall-left" > Delete< / span >
< / button >
< / div >
< / div >
2018-10-30 16:31:16 +01:00
< / div >
2022-07-04 14:13:33 +02:00
< / div >
< / div >
< / div >
< / div >
2022-07-04 20:45:20 +02:00
< div class = "uk-margin-small-top" >
< paging-no-load [ currentPage ] = " page " [ totalResults ] = " community . subjects . length " [ size ] = " size "
(pageChange)="updatePage($event)" customClasses="uk-flex-right@m uk-flex-center">
< / paging-no-load >
< / div >
2022-07-04 14:13:33 +02:00
< / div >
< / div >
< / div >
2018-10-30 16:31:16 +01:00
< / div >
< / div >
2022-07-04 14:13:33 +02:00
< modal-alert # deleteModal ( alertOutput ) = " saveSubjects ( ) " [ overflowBody ] = " false " classTitle = "uk-background-primary uk-light" > < / modal-alert >
< fs-modal # fsModal classBody = "uk-container-small" ( okEmitter ) = " saveSubjects ( ) " [ okButtonDisabled ] = " myForm & & ( myForm . invalid | | ! myForm . dirty ) " >
< form * ngIf = "myForm" >
< div class = "uk-margin-top uk-flex-center uk-flex uk-margin-medium-bottom" >
< a * ngIf = "!isEditModal" ( click ) = " addSubjectInForm ( ) " >
2022-07-13 09:49:59 +02:00
< button class = "uk-button uk-button-primary uk-flex uk-flex-middle" >
< icon name = "add" [ flex ] = " true " > < / icon >
2022-07-04 14:13:33 +02:00
< span class = "uk-margin-xsmall-left" > Add Subject< / span >
< / button >
< / a >
< / div >
< div class = "uk-grid uk-child-width-1-1" uk-grid >
< div * ngFor = " let control of myForm.controls; index as i" class = "uk-flex uk-flex-middle" >
< div input [ formInput ] = " myForm . controls [ i ] " type = "text"
placeholder="Type subjects as free text keywords" class="uk-width-expand">< / div >
< div * ngIf = "!isEditModal" class = "uk-width-auto uk-flex uk-flex-center uk-margin-left" >
2022-07-13 09:49:59 +02:00
< button class = "uk-close uk-icon" [ class . uk-invisible ] = " myForm . length = == 1 "
2022-07-04 14:13:33 +02:00
(click)="removeSubjectInForm(i)">
< icon name = "close" [ flex ] = " true " [ ratio ] = " 1 . 5 " > < / icon >
2022-07-13 09:49:59 +02:00
< / button >
2022-07-04 14:13:33 +02:00
< / div >
< / div >
< / div >
< / form >
< / fs-modal >
2021-05-19 13:40:29 +02:00
<!-- <modal - alert #enablePageModal (alertOutput)="enablePage()">
< div class = "uk-padding uk-padding-remove-horizontal" >
This information will be visible in < span class = "uk-text-bold" > Subjects page< / span > of Research Community
Dashboard, which is < span class = "uk-text-bold" > disabled< / span > .
Do you want to < span class = "uk-text-bold" > enable< / span > it now?
< / div >
< / modal-alert > -->