Project

General

Profile

« Previous | Next » 

Revision 58113

[Library | Landing redesign]: Merge from trunk

View differences:

newSearchPage.component.html
32 32
<div id="tm-main" class="   tm-middle">
33 33
  <div uk-grid>
34 34
    <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first ">
35
      <div class="uk-container">
35
      <div class="uk-container uk-container-large">
36 36
        <div>
37 37

  
38 38
          <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
......
59 59
                                     class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">
60 60
                    </search-download>
61 61

  
62
                    <div *ngIf="selectedFilters>0" class="uk-margin-small-bottom">
63
                      <div class="uk-grid uk-margin-bottom uk-margin-top">
64
                        <span class="uk-text-bold uk-text-large">Filters</span>
65
                        <a  *ngIf="selectedFilters>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+'  portal-link ' + 'uk-width-1-2'">
62
                    <div *ngIf="selectedRangeFilters > 0 || selectedFilters > 0" class="uk-margin-small-bottom">
63
<!--                      <div class="uk-grid uk-margin-bottom uk-margin-top">-->
64
<!--                        <span class="uk-text-bold uk-text-large">Filters</span>-->
65
<!--                        <a  *ngIf="selectedFilters>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+'  portal-link ' + 'uk-width-1-2'">-->
66
<!--                          Clear All-->
67
<!--                        </a>-->
68
<!--                      </div>-->
69
                      <div class="uk-grid uk-flex uk-flex-bottom uk-margin-top">
70
                        <h5 class="uk-text-bold">Filters</h5>
71
                        <a  *ngIf="(selectedRangeFilters+selectedFilters)>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+'  portal-link ' + 'uk-width-1-2'">
66 72
                          Clear All
67 73
                        </a>
68 74
                      </div>
75
                    </div>
69 76

  
70
                      <span *ngIf = "searchUtils.keyword.length > 0"><span class="uk-text-bold">Keywords:</span>
71
                      <a (click) = "clearKeywords() " title="Remove keywords" [class]="((disableForms)?'  uk-disabled':'  ')+' uk-margin-small-right portal-color '"><span class=" clickable " aria-hidden="true"><span class="uk-icon ">
72
                        <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
73
                        </span></span></a>
74
                      <span [innerHtml]="searchUtils.keyword"></span>
75

  
76
                      </span>
77
                      <div *ngFor="let filter of filters " >
78
                        <span *ngIf = "filter.countSelectedValues > 0"> <span class="uk-text-bold">{{filter.title}}:</span>
79
                          <span *ngFor="let value of getSelectedValues(filter); let i = index;  let end = last; " >
80
                            <a [title]="'Remove '+value.name"(click) = "removeFilter(value, filter) " [class]="((disableForms)?'  uk-disabled':'  ')+'  portal-color '"><span class=" clickable" aria-hidden="true"><span class="uk-icon">
81
                              <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
82
                              </span></span></a>
83
                            <span [innerHtml]="(value.name.length > 25)?value.name.substring(0,25)+'...':value.name" [title]="value.name"></span><span *ngIf="!end" class="   ">, </span>
77
                    <div   *ngIf="selectedRangeFilters > 0 || selectedFilters>0"  class="uk-margin-medium-bottom uk-grid uk-grid-small uk-text-small" uk-grid>
78
                      <ng-container *ngIf="selectedRangeFilters > 0">
79
                        <ng-container *ngFor="let filter of rangeFilters " >
80
                          <ng-container *ngIf = "filter.selectedFromAndToValues">
81
                        <span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >
82
                          <span class="selectedFilterLabel ">
83
                            <a [class]="((disableForms)?'  uk-disabled':'  ')+' uk-link-text '">
84
                              <span class=" clickable" aria-hidden="true">
85
                                <span class="uk-icon">
86
                                  <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
87
                                </span>
88
                              </span>
89
                              <span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>
90
                            </a>
84 91
                          </span>
85 92
                        </span>
86
                      </div>
93
                          </ng-container>
94
                        </ng-container>
95
                      </ng-container>
96
                      <ng-container *ngFor="let filter of filters " >
97
                        <ng-container *ngIf = "filter.countSelectedValues > 0">
87 98

  
99
                          <!--                       <span class="uk-text-bold">{{filter.title}}:</span>-->
100
                          <!--                      uk-margin-small-top uk-margin-small-right--> <!-- if no grid on the div above, add it -->
101
                          <!--                        uk-label -->
102
                          <span *ngFor="let value of getSelectedValues(filter); let i = index;  let end = last; "
103
                                [title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >
104
                            <!-- if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span -->
105
                            <span class="selectedFilterLabel ">
106
                              <a [class]="((disableForms)?'  uk-disabled':'  ')+' uk-link-text '">
107
                                <span class=" clickable" aria-hidden="true">
108
                                  <span class="uk-icon">
109
                                    <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
110
                                  </span>
111
                                </span>
112
                                <span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
113
                              </a>
114
                            </span>
115
                          </span>
116
                        </ng-container>
117
                      </ng-container>
88 118

  
119

  
89 120
                    </div>
90 121

  
91 122
<!--                    <div class="uk-margin-small-bottom uk-margin-small-top uk-grid">-->
......
96 127
                  <div *ngIf="filters.length === 0 && searchUtils.keyword.length === 0 && results.length > 0" class="uk-margin-top">
97 128
                    <span class="uk-text-meta">No filters available</span>
98 129
                  </div>
99
                  <div *ngIf="!showUnknownFilters">
100
                    <div class="uk-text-large">Filter By:</div>
101
                    <search-filter  *ngFor="let filter of filters "  [addShowMore]=false [isDisabled]="disableForms" [filter]="filter"  [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)"  ></search-filter>
102
                  </div>
130
                  <ul *ngIf="!showUnknownFilters" class="uk-list uk-list-divider">
131
                    <ng-container *ngFor="let filter of rangeFilters">
132
                      <li>
133
                        <range-filter [isDisabled]="disableForms" [filter]="filter" (onFilterChange)="filterChanged($event)"></range-filter>
134
                      </li>
135
                    </ng-container>
136
                    <ng-container *ngFor="let filter of filters ">
137
                      <li *ngIf= "filter.values.length >0">
138
                        <search-filter  [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter"  [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)"  ></search-filter>
139
                      </li>
140
                    </ng-container>
141
                  </ul>
103 142
                </div>
104 143
              </div>
105 144

  
......
122 161
                               class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">
123 162
              </search-download>
124 163
              <div   class="uk-width-1-1   uk-margin-small-bottom ">
125
                <div  *ngIf="selectedFilters>0"  class="uk-grid uk-margin-bottom uk-margin-top">
126
                  <span class="uk-text-bold uk-text-large">Filters</span>
127
                  <a  *ngIf="selectedFilters>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+'  portal-link ' + 'uk-width-1-2'">
164
                <div  *ngIf="selectedRangeFilters > 0 || selectedFilters > 0"  class="uk-grid uk-flex uk-flex-bottom uk-margin-top">
165
                  <h5 class="uk-text-bold">Filters</h5>
166
                  <a  *ngIf="(selectedRangeFilters+selectedFilters)>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+'  portal-link ' + 'uk-width-1-2'">
128 167
                    Clear All
129 168
                  </a>
130 169
                </div>
170
<!--                uk-grid uk-grid-small" uk-grid-->
171
<!--                uk-margin-left-->
172
                <div   *ngIf="selectedRangeFilters > 0 || selectedFilters>0"  class="uk-margin-medium-bottom uk-grid uk-grid-small uk-text-small" uk-grid>
173
                  <ng-container *ngIf="selectedRangeFilters > 0">
174
                    <ng-container *ngFor="let filter of rangeFilters " >
175
                      <ng-container *ngIf = "filter.selectedFromAndToValues">
176
                        <span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >
177
                          <span class="selectedFilterLabel ">
178
                            <a [class]="((disableForms)?'  uk-disabled':'  ')+' uk-link-text '">
179
                              <span class=" clickable" aria-hidden="true">
180
                                <span class="uk-icon">
181
                                  <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
182
                                </span>
183
                              </span>
184
                              <span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>
185
                            </a>
186
                          </span>
187
                        </span>
188
                      </ng-container>
189
                    </ng-container>
190
                  </ng-container>
191
                  <ng-container *ngFor="let filter of filters " >
192
                    <ng-container *ngIf = "filter.countSelectedValues > 0">
131 193

  
132
                <div   *ngIf=" selectedFilters>0"  class="uk-margin-small-bottom">
133

  
134
          <!--         <span *ngIf = "searchUtils.keyword.length > 0"><span class="uk-text-bold">Keywords:</span>
135
                   <a (click) = "clearKeywords() " title="Remove keywords" [class]="((disableForms)?'  uk-disabled':'  ')+'  portal-color '"><span class=" clickable " aria-hidden="true"><span class="uk-icon ">
136
                     <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
137
                     </span></span></a>
138
                   <span [innerHtml]="searchUtils.keyword"></span>
139

  
140
                   </span>-->
141
                  <div *ngFor="let filter of filters " >
142
                     <span  *ngIf = "filter.countSelectedValues > 0" > <span class="uk-text-bold">{{filter.title}}:</span>
143
                       <label *ngFor="let value of getSelectedValues(filter); let i = index;  let end = last; "
144
                              [title]="'Remove '+value.name" (click) = "removeFilter(value, filter) ">
145
                         <a [class]="((disableForms)?'  uk-disabled':'  ')+'  portal-color '"><span class=" clickable" aria-hidden="true"><span class="uk-icon">
146
                           <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
147
                           </span></span>
148
                         </a>
149
                         <span [innerHtml]="(value.name.length > 25)?value.name.substring(0,25)+'...':value.name"></span><span *ngIf="!end" class="   ">, </span>
150
                       </label>
151
                     </span>
152
                  </div>
194
                      <!--                       <span class="uk-text-bold">{{filter.title}}:</span>-->
195
<!--                      uk-margin-small-top uk-margin-small-right--> <!-- if no grid on the div above, add it -->
196
<!--                        uk-label -->
197
                      <span *ngFor="let value of getSelectedValues(filter); let i = index;  let end = last; "
198
                            [title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >
199
                        <!-- if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span -->
200
                        <span class="selectedFilterLabel ">
201
                          <a [class]="((disableForms)?'  uk-disabled':'  ')+' uk-link-text '">
202
                            <span class=" clickable" aria-hidden="true">
203
                              <span class="uk-icon">
204
                                <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
205
                              </span>
206
                            </span>
207
                            <span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
208
                          </a>
209
                        </span>
210
                      </span>
211
                    </ng-container>
212
                  </ng-container>
153 213
                </div>
154 214

  
155 215
<!--                <div class="uk-margin-small-bottom uk-margin-small-top uk-grid">-->
......
159 219
              <div *ngIf="filters.length === 0 && results.length > 0" class="uk-margin-top">
160 220
                <span class="uk-text-meta">No filters available</span>
161 221
              </div>
162
              <div *ngIf="!showUnknownFilters">
163
                <search-filter  *ngFor="let filter of filters " [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter"  [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)"  ></search-filter>
164
              </div>
222
              <ul *ngIf="!showUnknownFilters" class="uk-list uk-list-divider">
223
                <ng-container *ngFor="let filter of rangeFilters">
224
                  <li>
225
                    <range-filter [isDisabled]="disableForms" [filter]="filter" (onFilterChange)="filterChanged($event)"></range-filter>
226
                  </li>
227
                </ng-container>
228
                <ng-container *ngFor="let filter of filters ">
229
                  <li *ngIf= "filter.values.length >0">
230
                    <search-filter  [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter"  [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)"  ></search-filter>
231
                  </li>
232
                </ng-container>
233
              </ul>
165 234
            </div>
166 235
            <div class="uk-width-expand@m uk-with-1-1@s">
167 236
              <div *ngIf="openaireLink"> <a class="uk-margin-top   uk-button uk-button-text"  [href]=openaireLink target="_blank" >Results in OpenAIRE</a></div>

Also available in: Unified diff