Project

General

Profile

1
<div id="tm-main" class=" uk-section  uk-margin-small-top tm-middle"   >
2
  <div uk-grid uk-grid>
3
    <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first ">
4
      <div   [class]="'uk-background-norepeat uk-background-cover uk-section uk-flex uk-flex-middle '+searchFormClass" >
5
        <div   class="uk-width-1-1">
6
          <div   class="uk-width-1-1">
7
            <search-form [isDisabled]="disableForms" [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)"  [placeholderText]="formPlaceholderText"></search-form>
8
          </div>
9
          <div   class="uk-width-1-1  uk-light">
10
            <div *ngIf="isFiltered()" class = "uk-container uk-text-center ">
11
              <span *ngIf = "searchUtils.keyword.length > 0">Keywords: <span>{{searchUtils.keyword}}<a (click) = "clearKeywords() " [class]="(disableForms)?'uk-icon-button uk-disabled':'uk-icon-button'"><span class=" clickable " aria-hidden="true"><span class="uk-icon">
12
                <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="1"><path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg>
13
                </span></span></a></span>
14
              </span>
15
              <span *ngFor="let filter of filters " >
16
                <span *ngIf = "filter.countSelectedValues > 0"> {{filter.title}}:
17
                  <span *ngFor="let value of getSelectedValues(filter); let i = index;  let end = last; " >{{value.name}}<a (click) = "removeFilter(value, filter) " [class]="(disableForms)?'uk-icon-button uk-disabled':'uk-icon-button'"><span class=" clickable" aria-hidden="true"><span class="uk-icon">
18
                    <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="1"><path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg>
19
                    </span></span></a>
20
                    <span *ngIf="!end">, </span>
21
                  </span>
22
                </span>
23
              </span>
24

    
25
              <a (click)="clearFilters()" [class]="(disableForms)?'uk-disabled uk-link-muted':''">
26
                Clear All
27
              </a>
28
            </div>
29
          </div>
30
        </div>
31
      </div>
32
      <div  class="uk-container">
33
        <helper position="top"></helper>
34
        <div  class="uk-width-2-3@m  uk-width-2-3@l  uk-width-1-1@s">
35

    
36
          <div *ngIf="filters.length > 0" class="uk-offcanvas-content uk-hidden@m">
37
            <a href="#offcanvas-usage" uk-toggle><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="6" y="4" width="12" height="1"></rect><rect x="6" y="9" width="12" height="1"></rect><rect x="6" y="14" width="12" height="1"></rect><rect x="2" y="4" width="2" height="1"></rect><rect x="2" y="9" width="2" height="1"></rect><rect x="2" y="14" width="2" height="1"></rect></svg></a>
38

    
39
            <div id="offcanvas-usage" uk-offcanvas>
40
              <div class="uk-offcanvas-bar">
41
                <button class="uk-offcanvas-close" type="button" uk-close></button>
42
                <div class="uk-text-large">Filter By:</div>
43
                <search-filter  *ngFor="let filter of filters " [addShowMore]=false [isDisabled]="disableForms" [filter]="filter"  [showResultCount]=showResultCount (change)="filterChanged($event)" (toggleModal)="toggleModal($event)"></search-filter>
44
              </div>
45
            </div>
46

    
47
          </div>
48
        </div>
49

    
50
        <div  class="uk-grid uk-width-1-1">
51
          <div *ngIf="filters.length > 0" class="helper-left-right search-filters uk-visible@m">
52
            <helper position="left" before="true"></helper>
53
            <search-filter  *ngFor="let filter of filters " [isDisabled]="disableForms" [filter]="filter"  [showResultCount]=showResultCount (change)="filterChanged($event)" (toggleModal)="toggleModal($event)"></search-filter>
54
            <helper position="left" before="false"></helper>
55
          </div>
56
          <helper *ngIf="filters.length == 0" class="helper-left-right uk-visible@m" position="left"></helper>
57

    
58
          <div class="uk-width-expand@m uk-width-1-1@s uk-first-column custom-dataTable-content" >
59
            <div *ngIf="searchUtils.totalResults > 0" class="uk-align-center uk-margin-remove-bottom">
60
              <div class="searchPaging uk-panel uk-margin-top uk-grid uk-margin-bottom">
61
                <span class="uk-h6 uk-width-1-1@s uk-width-1-2@m">
62
                  {{searchUtils.totalResults}} {{type}}, page {{searchUtils.page}} of {{(totalPages())}}
63
                </span>
64
                <span class="float-children-right-at-medium margin-small-top-at-small uk-width-1-1@s uk-width-1-2@m">
65
                  <paging-no-load [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="rowsOnPage" (pageChange)="goTo($event.value, false)"></paging-no-load>
66
                </span>
67
              </div>
68
            </div>
69

    
70
            <div *ngIf="searchViewLink" class="uk-width-1-1@s uk-hidden@m">
71
              <p>
72
                <span class="uk-margin-small-right uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>
73

    
74
                <a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=searchViewLink >
75
                  <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>
76
                </a>
77
              </p>
78
            </div>
79

    
80
            <div *ngIf="searchUtils.totalResults <= 0" class="errors-in-searchTableView">
81
              <errorMessages [status]="[searchUtils.status]" [type]="'results'"></errorMessages>
82
            </div>
83

    
84
            <div *ngIf="searchUtils.totalResults > 0" class="uk-overflow-auto">
85
              <!--  #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
86
                      [mfData]="results | contentProvidersDatatable : [searchUtils, filters, triggerPipe, cd]"
87

    
88
                    -->
89
              <table datatable class="uk-table uk-table-striped divider-table" [dtOptions]="dtOptions" id="dpTable" [dtTrigger]="dtTrigger" dtInstance="dtInstanceCallback">
90
                <thead >
91
                  <tr>
92
                    <th *ngFor="let column of columnNames" class="uk-text-center">{{column}}</th>
93
                  </tr>
94
                </thead>
95
                <tbody>
96
                  <tr class="uk-table-middle" *ngFor="let result of results">
97
                    <td *ngIf="result.hasOwnProperty('title')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
98
                      <a [queryParams]="{datasourceId: result.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
99
                        <span *ngIf="result.title.name"
100
                              [innerHTML]="result.title.name">
101
                        </span>
102
                        <span *ngIf="!result.title.name">
103
                          [no title available]
104
                        </span>
105
                      </a>
106
                    </td>
107
                    <td *ngIf="result.hasOwnProperty('type')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
108
                      <span *ngIf="result.type">{{result.type}}</span>
109
                      <span *ngIf="!result.type">-</span>
110
                    </td>
111
                    <td *ngIf="result.hasOwnProperty('countries')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
112
                      <span *ngFor="let country of result['countries'].slice(0,5) let i = index">{{country}}{{(i < ( result['countries'].slice(0,5).length-1))?", ":""}}{{(i ==  result['countries'].slice(0,5).length-1 &&  result['countries'].length > 5)?"...":""}}</span>
113
                      <span *ngIf="result.countries.length == 0">-</span>
114
                    </td>
115
                    <td *ngIf="result.hasOwnProperty('organizations')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
116
                      <span *ngFor="let org of result['organizations'].slice(0,5) let i = index">
117
                        <a *ngIf="org.id" [queryParams]="{organizationId: org.id}" routerLinkActive="router-link-active" routerLink="/search/organization">{{org.name}}</a><span *ngIf="!org.id">{{org.name}}</span>{{(i < ( result['organizations'].slice(0,5).length-1))?", ":""}}{{(i ==  result['organizations'].slice(0,5).length-1 &&  result['organizations'].length > 5)?"...":""}}
118
                      </span>
119
                      <span *ngIf="result.organizations.length == 0">-</span>
120
                    </td>
121
                    <td *ngIf="result.hasOwnProperty('compatibility')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
122
                      <span *ngIf="result.compatibility">{{result.compatibility}}</span>
123
                      <span *ngIf="!result.compatibility">-</span>
124
                    </td>
125

    
126
                    <!--Community Projects-->
127
                    <td *ngIf="result.hasOwnProperty('acronym') && result.hasOwnProperty('name')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
128
                      <a [queryParams]="(result.openaireId) ? {projectId: result.openaireId} : {grantId: encode(result.grantId), funder: encode(result.funder)}"
129
                          routerLinkActive="router-link-active" routerLink="/search/project">
130
                        <span *ngIf="result.name">{{result.name}}</span>
131
                        <span *ngIf="result.name && result.acronym">(</span>
132
                        <span *ngIf="result.acronym">{{result.acronym}}</span>
133
                        <span *ngIf="result.name && result.acronym">)</span>
134
                        <span *ngIf="!result.name && !result.acronym">[no title available]</span>
135
                      </a>
136
                    </td>
137
                    <td *ngIf="result.hasOwnProperty('grantId')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
138
                      <span *ngIf="result.grantId">{{result.grantId}}</span>
139
                      <span *ngIf="!result.grantId">-</span>
140
                    </td>
141
                    <td *ngIf="result.hasOwnProperty('funder')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
142
                      <span *ngIf="result.funder">{{result.funder}}</span>
143
                      <span *ngIf="!result.funder">-</span>
144
                    </td>
145

    
146
                    <!--Community Content Providers-->
147
                    <td *ngIf="!result.hasOwnProperty('acronym') && result.hasOwnProperty('name')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
148
                      <a [queryParams]="{datasourceId: result.openaireId}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
149
                        <span *ngIf="result.name">{{result.name}}</span>
150
                        <span *ngIf="!result.name">[no name available]</span>
151
                      </a>
152
                    </td>
153
                    <td *ngIf="result.hasOwnProperty('officialname')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
154
                      <span *ngIf="result.officialname">{{result.officialname}}</span>
155
                      <span *ngIf="!result.officialname">-</span>
156
                    </td>
157
                  </tr>
158
                </tbody>
159
                <!-- <thead *ngIf="searchUtils.totalResults > 0">
160
                  <tr><td colspan="5" class="uk-padding-remove-horizontal">
161
                    <span class="uk-h6">
162
                      {{searchUtils.totalResults}} content providers, page {{searchUtils.page}} of {{(totalPages())}}
163
                    </span>
164
                    <paging-no-load class="uk-float-right" [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="rowsOnPage" (pageChange)="goTo($event.value, false)"></paging-no-load>
165
                  </td></tr>
166
                </thead> -->
167
              </table>
168
            </div>
169

    
170
            <div *ngIf="searchUtils.totalResults > 0" class="uk-align-center uk-margin-remove-bottom">
171
              <div class="searchPaging uk-panel uk-margin-top uk-grid uk-margin-bottom">
172
                <span class="uk-h6 uk-width-1-1@s uk-width-1-2@m">
173
                  {{searchUtils.totalResults}} {{type}}, page {{searchUtils.page}} of {{(totalPages())}}
174
                </span>
175
                <span class="float-children-right-at-medium margin-small-top-at-small uk-width-1-1@s uk-width-1-2@m">
176
                  <paging-no-load [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="rowsOnPage" (pageChange)="goTo($event.value, false)"></paging-no-load>
177
                </span>
178
              </div>
179
            </div>
180

    
181
            <helper class="uk-hidden@m" position="left" styleName="uk-width-1-1@s"></helper>
182
            <helper class="uk-hidden@m" position="right" styleName="uk-width-1-1@s"></helper>
183
          </div>
184

    
185
          <div *ngIf="searchViewLink" class="helper-left-right uk-visible@m">
186
            <helper position="right" before="true"></helper>
187
            <span class="uk-margin-small-right uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>
188

    
189
            <a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=searchViewLink >
190
              <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>
191
            </a>
192
            <helper position="right" before="false"></helper>
193
          </div>
194
          <helper *ngIf="!searchViewLink" class="helper-left-right uk-visible@m" position="right"></helper>
195
        </div>
196

    
197
        <helper position="bottom"></helper>
198
      </div>
199
      <modal-search-filter [filter]="currentFilter" [showResultCount]=showResultCount (modalChange)="filterChanged($event)"></modal-search-filter>
200
    </div>
201
  </div>
202
</div>
(25-25/36)