connect-admin/src/app/pages/zenodo-communities/manage-zenodo-communities.c...

75 lines
4.1 KiB
HTML
Raw Normal View History

<div page-content>
<div actions>
<div class="uk-section-xsmall uk-margin-top">
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
<div search-input [expandable]="true" [searchControl]="filterForm" searchInputClass="outer"
placeholder="Search Zenodo Community" [disabled]="searchUtils.status === errorCodes.LOADING"
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
<div>
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="addNew()"
uk-tooltip="title:<div class='uk-text-bold'> Search and add more Zenodo Communities</div><div>The research results of a Zenodo community specified here will be automatically linked to your community dashboard.</div>"
[disabled]="searchUtils.status === errorCodes.LOADING"
[class.uk-disabled]="searchUtils.status === errorCodes.LOADING">
<icon name="add" [flex]="true"></icon>
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">New Zenodo Community</span>
</button>
</div>
</div>
</div>
</div>
<div inner>
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
<div *ngIf="searchUtils.status == errorCodes.LOADING" class="uk-position-center">
<loading></loading>
</div>
<div *ngIf="searchUtils.status !== errorCodes.LOADING">
<div *ngIf="previewCommunities.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
[Connect Admin | new-theme]: Updated messages when no results in affiliations, data sources, projects, subjects, zenodo communities | [Bug fix] In add projects, show selected filter if exists (even when no results). 1. affiliations.component.html: Updated "no organizations found" message to "no organizations for {{community}}". 2. add-content-providers.component.html: When no data sources, show info message for missing data sources too. 3. add-content-providers.component.ts: Created get method infoMessage() to return info message for missing data sources. 4. manage-content-providers.component.ts: In <add-content-providers> renamed hash to #addContentProvidersModal. 5. remove-content-providers.component.html & remove-projects.component.html & subjects-edit-form.component.html & manage-zenodo-communities.component.html: Show proper messages if no results at all or if filters return no results. 6. add-projects.component.ts: Created get method infoMessage() to return info message for missing projects | Added field selectedFunder and in getSelectedValues() return selectedFunder if no values from search query. 7. add-projects.component.html: When no projects, show info message for missing funders too | Do not show filters column when no results | Show selectedFunder in selected filters. 8. manage-projects.component.ts: In <fs-modal> renamed hash to #fsModalProjects and in <add-projects> renamed hash to #addProjects. 9. remove-projects.component.ts: Removed old Session.isLoggedIn() checks.
2022-07-11 17:48:24 +02:00
<div>No zenodo communities
<span *ngIf="selectedCommunities.length == 0; else: notFound">for {{community.shortTitle}}</span>
<ng-template #notFound>found</ng-template>
</div>
</div>
<div *ngIf="previewCommunities.length > 0">
<no-load-paging [type]="'Zenodo communities'"
(pageChange)="updatePage($event)"
[page]="page" [pageSize]="size"
[totalResults]="previewCommunities.length">
</no-load-paging>
<!-- <ul class="uk-margin-medium-top uk-margin-bottom uk-list uk-list-xlarge">-->
<div class="uk-grid uk-grid-large uk-child-width-1-1 uk-margin-medium-top uk-margin-bottom" uk-grid>
<div *ngFor="let item of previewCommunities.slice((this.page - 1)*this.size, this.page*this.size); let i=index">
<div class="uk-card uk-card-default">
<div class="uk-card-body">
<preview-zenodo-community [item]="item" [master]="masterCommunity && item.id==masterCommunity.id"></preview-zenodo-community>
</div>
<div *ngIf="!masterCommunity || item.id!==masterCommunity.id" 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">
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
(click)="removeCommunity(item)">
<icon name="remove" [flex]="true"></icon>
<span class="uk-margin-xsmall-left">Remove</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- </ul>-->
<div class="uk-margin-small-top">
<paging-no-load [currentPage]="page"
[totalResults]="previewCommunities.length" [size]="size"
(pageChange)="updatePage($event)" customClasses="uk-flex-right@m uk-flex-center">
</paging-no-load>
</div>
</div>
</div>
</div>
</div>
</div>
<modal-alert #AlertModalDeleteCommunity (alertOutput)="confirmedDeleteCommunity($event)" [overflowBody]="false"></modal-alert>