Project

General

Profile

1
<div page-content>
2
  <div header>
3
    <community-info tab="content-providers"></community-info>
4
    <div [class.uk-invisible]="showLoading"
5
         class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
6
      <div class="uk-flex-last@m">
7
        <a class="uk-text-uppercase uk-flex uk-flex-middle" (click)="addNew()"
8
           [attr.uk-tooltip]="(toggle? 'cls: uk-invisible; ' : 'cls: uk-active; ') +
9
                'title: <div class=\'uk-padding-small\'><div class=\'uk-margin-bottom uk-text-bold\'> Search and add more Content Providers</div><div>The research results collected from the content providers specified here will be automatically linked to your community dashboard.</div></div>'">
10
          <button class="uk-icon-button large uk-button-secondary">
11
            <icon name="add"></icon>
12
          </button>
13
          <button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add new content provider
14
          </button>
15
        </a>
16
      </div>
17
      <div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false"
18
           placeholder="Search Content Providers"
19
           [selected]="communitySearchUtils.keyword" (closeEmitter)="onSearchClose()" (resetEmitter)="resetInput()"
20
           [bordered]="true" colorClass="uk-text-secondary"
21
           class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
22
    </div>
23
  </div>
24
  <div inner>
25
    <div *ngIf="showLoading" class="uk-margin-large-top">
26
      <loading></loading>
27
    </div>
28
    <div *ngIf="!showLoading">
29
      <div>
30
        <!--        <div class="uk-grid uk-flex uk-flex-middle uk-margin-medium-bottom" uk-grid>-->
31
        <!--          <div *ngIf="previewCommunityContentProviders.length > 0"-->
32
        <!--               class="uk-width-expand@m uk-width-1-1">-->
33
        <!--            <div class="uk-flex-middle uk-flex-right@m uk-flex-center uk-grid">-->
34
        <!--              <span class="">Sort by: </span>-->
35
        <!--              <div class="uk-width-medium uk-padding-remove uk-margin-small-left" dashboard-input-->
36
        <!--                   [formInput]="filterForm.get('sort')"-->
37
        <!--                   type="select"-->
38
        <!--                   [options]="sortOptions">-->
39
        <!--              </div>-->
40
        <!--            </div>-->
41
        <!--          </div>-->
42
        <!--        </div>-->
43
        <no-load-paging *ngIf="previewCommunityContentProviders.length > 0" [type]="'content providers'"
44
                        (pageChange)="updatePage($event)"
45
                        [page]="page" [pageSize]="resultsPerPage"
46
                        [totalResults]="previewCommunityContentProviders.length">
47
        </no-load-paging>
48
        <div class="uk-margin-medium-top uk-margin-medium-bottom">
49
          <div *ngIf="previewCommunityContentProviders.length == 0"
50
               class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
51
            <div>No content providers for {{name}}</div>
52
          </div>
53

    
54
          <div class="uk-card uk-card-default uk-text-small uk-margin-bottom"
55
               *ngFor="let item of previewCommunityContentProviders.slice((page - 1)*resultsPerPage, page*resultsPerPage)">
56
            <div class="uk-grid uk-grid-divider uk-padding" uk-grid>
57
              <div class="uk-width-expand@m uk-width-1-1">
58
                <div class="uk-padding-small uk-padding-remove-horizontal">
59
                  <!--                  <h6 *ngIf="item.name || item.officialname || item.openaireId || item.selectioncriteria"-->
60
                  <!--                      class="uk-margin-small-bottom">-->
61
                  <!--                    <a *ngIf="item.openaireId"-->
62
                  <!--                       target="_blank"-->
63
                  <!--                       [href]="contentProviderUrl+item.openaireId">-->
64
                  <!--                      <span *ngIf="item.name">{{item.name}}</span>-->
65
                  <!--                      <span *ngIf="!item.name && item.officialname">{{item.officialname}}</span>-->
66
                  <!--                      <span *ngIf="!item.name && !item.officialname">[no title available]</span>-->
67
                  <!--                      <span class="custom-external custom-icon space"></span>-->
68
                  <!--                    </a>-->
69
                  <!--                    <span *ngIf="!item.openaireId">-->
70
                  <!--                      <span *ngIf="item.name">{{item.name}}</span>-->
71
                  <!--                      <span *ngIf="!item.name && item.officialname">{{item.officialname}}</span>-->
72
                  <!--                      <span *ngIf="!item.name && !item.officialname">[no title available]</span>-->
73
                  <!--                    </span>-->
74
                  <!--                  </h6>-->
75
                  <!--                  <h6 *ngIf="item.name || item.officialname || item.openaireId || item.selectioncriteria"-->
76
                  <!--                      class="uk-margin-small-bottom">-->
77
                  <!--                    <a *ngIf="item.openaireId"-->
78
                  <!--                       target="_blank"-->
79
                  <!--                       [href]="contentProviderUrl+item.openaireId">-->
80
                  <!--                      <span *ngIf="item.name">{{item.name}}</span>-->
81
                  <!--                      <span *ngIf="!item.name">[no title available]</span>-->
82
                  <!--                      <span class="custom-external custom-icon space"></span>-->
83
                  <!--                    </a>-->
84
                  <!--                    <span *ngIf="!item.openaireId">-->
85
                  <!--                      <span *ngIf="item.name">{{item.name}}</span>-->
86
                  <!--                      <span *ngIf="!item.name">[no title available]</span>-->
87
                  <!--                    </span>-->
88
                  <!--                  </h6>-->
89
                  <h6 class="uk-margin-small-bottom">
90
                    <a *ngIf="item.openaireId"
91
                       target="_blank"
92
                       [href]="contentProviderUrl+item.openaireId">
93
                      <span *ngIf="item.officialname">{{item.officialname}}</span>
94
                      <span *ngIf="!item.officialname && item.name">{{item.name}}</span>
95
                      <span *ngIf="!item.officialname && !item.name">[no title available]</span>
96
                      <span class="custom-external custom-icon space"></span>
97
                    </a>
98
                    <span *ngIf="!item.openaireId">
99
                      <span *ngIf="item.officialname">{{item.officialname}}</span>
100
                      <span *ngIf="!item.officialname && item.name">{{item.name}}</span>
101
                      <span *ngIf="!item.officialname && !item.name">[no title available]</span>
102
                    </span>
103
                  </h6>
104
                  <!--                  <div *ngIf="item.name && item.officialname" class="uk-margin-small-bottom">-->
105
                  <!--                  <div *ngIf="item.officialname" class="uk-margin-small-bottom">-->
106
                  <!--                    <span class="title">Official Name: </span>-->
107
                  <!--                    <span>{{item.officialname}}</span>-->
108
                  <!--                  </div>-->
109
                  <div *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-bottom">
110
                    <div class="title uk-margin-small-bottom">Filters</div>
111
                    <div [innerHTML]="getFiltersAsText(item.selectioncriteria.criteria)"></div>
112
                    <a *ngIf="item.selectioncriteria.criteria.length > 3" class="uk-link uk-margin-top" [routerLink]="'./' + item.openaireId">View all {{item.selectioncriteria.criteria.length}} filters</a>
113
                  </div>
114
                </div>
115
              </div>
116
              <div class="uk-width-auto@m uk-width-1-1">
117
                <div class="uk-flex uk-flex-middle uk-flex-center uk-flex-column uk-height-1-1">
118
                  <div class="uk-padding-small uk-padding-remove-horizontal">
119
                    <a (click)="goToCriteria(item.openaireId)" class="uk-button action uk-flex uk-flex-middle">
120
                      <icon name="edit"></icon>
121
                      <span *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-left"
122
                            uk-tooltip="<div class='uk-padding-small'>Edit filters to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">
123
                        Edit filters
124
                      </span>
125
                      <span *ngIf="!(item.selectioncriteria?.criteria?.length > 0)" class="uk-margin-small-left"
126
                            uk-tooltip="<div class='uk-padding-small'>Add filter to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">
127
                        Add filters
128
                      </span>
129
                    </a>
130
                    <a (click)="removeContentProvider(item)"
131
                       class="uk-button action uk-flex uk-flex-middle uk-margin-small-top">
132
                      <icon name="remove_circle_outline"></icon>
133
                      <span class="uk-margin-small-left">Remove content provider</span>
134
                    </a>
135
                  </div>
136
                </div>
137
              </div>
138
            </div>
139
          </div>
140
        </div>
141
        <no-load-paging *ngIf="previewCommunityContentProviders.length > 0" [type]="'content providers'"
142
                        (pageChange)="updatePage($event)"
143
                        [page]="page" [pageSize]="resultsPerPage"
144
                        [totalResults]="previewCommunityContentProviders.length">
145
        </no-load-paging>
146
      </div>
147
    </div>
148
    <modal-alert #AlertModalDeleteCommunity (alertOutput)="confirmedDeleteContentProvider($event)"></modal-alert>
149
  </div>
150
</div>
(6-6/7)