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="openaireLink"> <a class="uk-margin-top   uk-button uk-button-text"  [href]=openaireLink target="_blank" >Results in OpenAIRE</a></div>
60
            <div *ngIf="searchUtils.totalResults > 0" class="uk-align-center uk-margin-remove-bottom">
61
              <div class="searchPaging uk-panel uk-margin-top uk-grid uk-margin-bottom">
62
                <span class="uk-h6 uk-width-1-1@s uk-width-1-2@m">
63
                  {{searchUtils.totalResults | number}} {{type}}, page {{searchUtils.page | number}} of {{(totalPages()) | number}}
64
                </span>
65
                <span class="float-children-right-at-medium margin-small-top-at-small uk-width-1-1@s uk-width-1-2@m">
66
                  <paging-no-load [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="rowsOnPage" (pageChange)="goTo($event.value, false)"></paging-no-load>
67
                </span>
68
              </div>
69
            </div>
70

    
71
            <div *ngIf="searchViewLink" class="uk-width-1-1@s uk-hidden@m">
72
              <p>
73
                <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>
74

    
75
                <a routerLinkActive="router-link-active" [class]="(disableForms && !enableSearchView)?'uk-disabled uk-link-muted':''" [routerLink]=searchViewLink >
76
                  <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>
77
                </a>
78
              </p>
79
            </div>
80

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

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

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

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

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

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

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

    
186
          <div *ngIf="searchViewLink" class="helper-left-right uk-visible@m">
187
            <helper position="right" before="true"></helper>
188
            <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>
189

    
190
            <a routerLinkActive="router-link-active" [class]="(disableForms && !enableSearchView)?'uk-disabled uk-link-muted':''" [routerLink]=searchViewLink >
191
              <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>
192
            </a>
193
            <helper position="right" before="false"></helper>
194
          </div>
195
          <helper *ngIf="!searchViewLink" class="helper-left-right uk-visible@m" position="right"></helper>
196
        </div>
197

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