Project

General

Profile

1
<div id="tm-main" class=" uk-section  uk-margin-small-top tm-middle"   >
2
  <div 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="">
5

    
6
        <div   [class]="'uk-background-norepeat uk-background-cover uk-section uk-flex uk-flex-middle uk- light '+searchFormClass" >
7
          <div   class="uk-width-1-1">
8
            <div   class="uk-width-1-1">
9
              <search-form [isDisabled]="disableForms" [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)" [placeholderText]="formPlaceholderText"></search-form>
10
            </div>
11
            <div   class="uk-width-1-1  ">
12
              <!--link to advanced search -->
13
              <a *ngIf = "advancedSearchLink && advancedSearchLink.length > 0" routerLinkActive="router-link-active" [class]="(disableForms)?'uk-float-right   uk-disabled uk-link-muted uk-light ':'uk-float-right  uk-light'" [routerLink]=advancedSearchLink [queryParams]=advancedSearchParameters >More search options <span class="uk-icon">
14
                  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg>
15
                  </span>
16
              </a>
17
              <div *ngIf="isFiltered()" class = "uk-container uk-width-1-2@m uk-width-1-2@s uk-align-center uk-text-center uk-text-small">
18
                <span *ngIf = "searchUtils.keyword.length > 0">Keywords: <span [innerHtml]="searchUtils.keyword"></span><a (click) = "clearKeywords() " [class]="(disableForms)?'uk-icon-button uk-disabled':'uk-icon-button'"><span class=" clickable " aria-hidden="true"><span class="uk-icon">
19
                  <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>
20
                  </span></span></a>
21
                </span>
22
                <span *ngFor="let filter of filters " >
23
                  <span *ngIf = "filter.countSelectedValues > 0"> {{filter.title}}:
24
                    <span *ngFor="let value of getSelectedValues(filter); let i = index;  let end = last; " ><span [innerHtml]="(value.name.length > 25)?value.name.substring(0,25)+'...':value.name" title="value.name"></span><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">
25
                      <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>
26
                      </span></span></a>
27
                      <span *ngIf="!end">, </span>
28
                    </span>
29
                  </span>
30
                </span>
31

    
32
                <a (click)="clearFilters()" [class]="(disableForms)?'uk-disabled uk-link-muted':''">
33
                 Clear All
34
                </a>
35
              </div>
36
              <div *ngIf= "showUnknownFilters"  class = " uk-text-center ">
37
                <a (click) = "clearFilters() " >Try new Query</a>
38
              </div>
39
            </div>
40

    
41
          </div>
42
        </div>
43
        <div  class="uk-container">
44
          <helper position="top"></helper>
45
          <div  [class]="(showRefine)? 'uk-width-3-5@m  uk-width-3-5@l  uk-width-1-1@s' :'uk-width-1-1'">
46
            <div  *ngIf="showRefine" class="uk-offcanvas-content uk-hidden@m">
47

    
48
              <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>
49

    
50
              <div id="offcanvas-usage" uk-offcanvas>
51
                <div class="uk-offcanvas-bar">
52
                  <button class="uk-offcanvas-close" type="button" uk-close></button>
53
                  <div class="uk-text-large">Filter By:</div>
54
                  <search-filter  *ngFor="let filter of filters "  [addShowMore]=false [isDisabled]="disableForms" [filter]="filter"  [showResultCount]=showResultCount (change)="filterChanged($event)" (toggleModal)="toggleModal($event)" [(connectCommunityId)]=connectCommunityId></search-filter>
55
                </div>
56
              </div>
57

    
58
            </div>
59
          </div>
60

    
61

    
62
          <div  class="uk-grid uk-width-1-1">
63
            <div  *ngIf="showRefine" class="helper-left-right search-filters uk-visible@m">
64
               <helper position="left" before="true"></helper>
65
               <search-filter  *ngFor="let filter of filters " [isDisabled]="disableForms" [filter]="filter"  [showResultCount]=showResultCount (change)="filterChanged($event)" (toggleModal)="toggleModal($event)" [(connectCommunityId)]=connectCommunityId></search-filter>
66
               <helper position="left" before="false"></helper>
67
            </div>
68
            <helper *ngIf="!showRefine" class="helper-left-right uk-visible@m" position="left"></helper>
69

    
70
            <div class="uk-width-expand@m uk-width-1-1@s uk-first-column">
71
            <!-- <div [class]="(showRefine)?'uk-width-expand@m uk-first-column':''" > -->
72
              <div *ngIf="openaireLink"> <a class="uk-margin-top   uk-button uk-button-text"  [href]=openaireLink target="_blank" >Results in OpenAIRE</a></div>
73
              <div  class="uk-align-center uk-margin-remove-bottom">
74
                <search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils"  [(results)] = "results"  [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
75
              </div>
76

    
77
              <div  *ngIf="tableViewLink || searchUtils.totalResults <= csvLimit"  class="uk-width-1-1@s uk-hidden@m">
78
                <span *ngIf="tableViewLink" class="uk-margin-medium-right">
79
                  <a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >
80
                    <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>
81
                  </a>
82

    
83
                  <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>
84
                </span>
85
                <search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
86
              </div>
87

    
88
              <div *ngIf="(searchUtils.page <= pagingLimit)" class="uk-margin-top">
89
                <search-result    *ngIf="!tableView"
90
                                  [results]="results"
91
                                  [status]="searchUtils.status"
92
                                  [type]="entityType"
93
                                  [showLoading]="true" [(properties)]=properties>
94
                </search-result>
95
              </div>
96

    
97
              <div [class]="searchUtils.page > pagingLimit ? 'search-results' : ''" *ngIf="(searchUtils.page >= pagingLimit) && (searchUtils.totalResults > resultsPerPage*pagingLimit)">
98
                  <p class="uk-alert-warning" uk-alert>For more results please try a new, more specific query</p>
99
              </div>
100

    
101
              <div  class="uk-align-center uk-margin-remove-bottom">
102
                <search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils"  [(results)] = "results"  [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
103
              </div>
104

    
105
              <helper class="uk-hidden@m" position="left" styleName="uk-width-1-1@s"></helper>
106
              <helper class="uk-hidden@m" position="right" styleName="uk-width-1-1@s"></helper>
107
            </div>
108

    
109
            <div *ngIf="tableViewLink || searchUtils.totalResults <= csvLimit" class="helper-left-right uk-visible@m">
110
              <helper position="right" before="true"></helper>
111
              <div>
112
                <span *ngIf="tableViewLink" class="uk-margin-medium-right">
113
                  <a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >
114
                    <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>
115
                  </a>
116

    
117
                  <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>
118
                </span>
119
                <search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
120
              </div>
121
              <helper position="right" before="false"></helper>
122
            </div>
123
            <helper *ngIf="!tableViewLink && searchUtils.totalResults > csvLimit" class="helper-left-right uk-visible@m" position="right"></helper>
124
          </div>
125
          <!-- <div [class]="(showRefine)? 'uk-width-3-5@m  uk-width-3-5@l  uk-width-1-1@s uk-align-center uk-margin-remove-bottom' : 'uk-width-1-1'">
126
            <search-paging [loadPaging]="loadPaging" [type]="type" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils"  [(results)] = "results"  [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
127
          </div> -->
128
          <div class="uk-width-1-1">
129
            <helper position="bottom"></helper>
130
          </div>
131
        </div>
132
      </div>
133
    </div>
134
  </div>
135
</div>
(22-22/36)