Project

General

Profile

1
<div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
2
  <div class="uk-width-1-1@m uk-first-column">
3

    
4
    <h1 class="uk-h2">Registrations</h1>
5

    
6
    <!-- TOP HELP CONTENT -->
7
    <help-content #topHelperContent [position]="'top'"
8
                  [ngClass]="topHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'">
9
    </help-content>
10

    
11
    <div class="uk-container uk-container-expand  uk-margin-medium-top uk-margin-medium-bottom">
12
      <div class="uk-grid">
13

    
14
        <!-- LEFT HELP CONTENT -->
15
        <aside-help-content #leftHelperContent [position]="'left'"
16
                            [ngClass]="leftHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'">
17
        </aside-help-content>
18

    
19
        <!-- MIDDLE -->
20
        <div class="uk-width-expand@m">
21

    
22
          <div *ngIf="errorMessage" class="uk-alert uk-alert-danger">{{ errorMessage }}</div>
23
          <div *ngIf="successMessage" class="uk-alert uk-alert-success">{{ successMessage }}</div>
24
          <div *ngIf="loadingMessage" class="loading-big">
25
            <div class="loader-big"
26
                 style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
27
              {{ loadingMessage }}
28
            </div>
29
            <div class="whiteFilm"></div>
30
          </div>
31

    
32
          <!-- RIGHT FILTERS -->
33
          <div class="uk-grid">
34
            <div class="uk-width-1-1@m" style="padding-left: 55px">
35
              <form [formGroup]="dataForm" class="uk-form-horizontal uk-width-1-4@m  uk-float-right">
36
                <div class="uk-margin">
37
                  <label class="uk-form-label uk-text-right" for="pageSize">Items per page: </label>
38
                  <div class="uk-form-controls">
39
                    <select class="uk-select" id="pageSize" (change)="handleChangeAndResetPage()" formControlName="pageSize">
40
                      <option value="10">10</option>
41
                      <option value="25" selected>25</option>
42
                      <option value="50">50</option>
43
                      <option value="100">100</option>
44
                    </select>
45
                  </div>
46
                </div>
47

    
48
                <div class="uk-margin">
49
                  <label class="uk-form-label uk-text-right" for="sortBy">Sort by: </label>
50
                  <div class="uk-form-controls">
51
                    <select class="uk-select" id="sortBy" (change)="handleChange()" formControlName="requestSortBy">
52
                      <option value="registrationdate" selected>Date</option>
53
                      <option value="officialname">Name</option>
54
                    </select>
55
                  </div>
56
                </div>
57

    
58
                <div class="uk-margin">
59
                  <label class="uk-form-label uk-text-right" for="orderBy">Order by: </label>
60
                  <div class="uk-form-controls">
61
                    <select class="uk-select" id="orderBy" (change)="handleChange()" formControlName="order">
62
                      <option value="DESCENDING" selected>Descending</option>
63
                      <option value="ASCENDING">Ascending</option>
64
                    </select>
65
                  </div>
66
                </div>
67

    
68
              </form>
69

    
70
              <!-- SEARCH BAR -->
71
              <form [formGroup]="dataForm" class="uk-search uk-search-default uk-width-1-2@m uk-float-right">
72
                <input class="uk-width-1-2 uk-search-input" type="search" formControlName="officialname" placeholder="Search...">
73
                <button class="uk-button" (click)="handleChange()">Search</button>
74
              </form>
75
            </div>
76

    
77
          </div>
78

    
79
          <!-- LEFT FILTERS -->
80
          <div class="uk-grid">
81

    
82
            <div class="uk-width-1-4@m">
83
              <form [formGroup]="dataForm" class="uk-form-stacked">
84

    
85
                <div class="uk-form-label uk-text-large">Filtered By</div>
86

    
87
                <div class="uk-margin">
88
                  <div class="uk-form-label uk-text-large">Datasource Type</div>
89
                  <div class="uk-form-controls">
90
                    <label><input class="uk-radio" type="radio" value="" (change)="handleChange()" formControlName="typology"> Any</label><br>
91
<!--                    <label><input class="uk-radio" type="radio" value="Literature" (change)="handleChange()" formControlName="typology"> Literature</label><br>-->
92
<!--                    <label><input class="uk-radio" type="radio" value="Data" (change)="handleChange()" formControlName="typology"> Data</label><br>-->
93
                    <label><input class="uk-radio" type="radio" value="Aggregator" (change)="handleChange()" formControlName="typology"> Aggregator</label><br>
94
                    <label><input class="uk-radio" type="radio" value="Journal" (change)="handleChange()" formControlName="typology"> Journal</label><br>
95
<!--                    <label><input class="uk-radio" type="radio" value="public" (change)="handleChange()" formControlName="typology"> Public Repository</label><br>-->
96
                    <label><input class="uk-radio" type="radio" value="Institutional" (change)="handleChange()" formControlName="typology"> Institutional</label><br>
97
                    <label><input class="uk-radio" type="radio" value="Thematic" (change)="handleChange()" formControlName="typology"> Thematic</label><br>
98
                    <label><input class="uk-radio" type="radio" value="Products" (change)="handleChange()" formControlName="typology"> Products</label><br>
99
                    <label><input class="uk-radio" type="radio" value="Unknown" (change)="handleChange()" formControlName="typology"> Unknown</label>
100
                  </div>
101
                </div>
102

    
103
                <div class="uk-margin">
104
                  <div class="uk-form-label uk-text-large">Countries</div>
105
                  <div class="uk-form-controls">
106
                    <ng-container *ngIf="countries && countries.length>0">
107
                      <read-more [maxHeight]="238">
108
                        <div><input class="uk-radio" type="radio" value="" (change)="handleChange()" formControlName="country"> Any</div>
109
                        <ng-container *ngFor="let country of countries">
110
                          <div class="">
111
                            <input class="uk-radio" type="radio" value="{{country.code}}"
112
                                   (change)="handleChange()" formControlName="country"> {{country.name}}
113
                          </div>
114
                        </ng-container>
115
                      </read-more>
116
                    </ng-container>
117
                  </div>
118
                </div>
119

    
120
              </form>
121

    
122
            </div>
123

    
124
            <!-- TABLE -->
125
            <div class="uk-width-3-4@m">
126
<!--              <pre><code>{{dataForm.value | json}}</code></pre>-->
127
              <table class="uk-table uk-table-striped">
128
                <thead>
129
                <tr>
130
                  <th>Repository</th>
131
                  <th>Date</th>
132
                  <th>Organization</th>
133
                  <th>Type</th>
134
                </tr>
135
                </thead>
136
                <tbody>
137
                <tr *ngFor="let res of repositorySnippet">
138
                  <td class="uk-width-1-6@m">{{res.officialname}} <br> ({{res.id}}) <br> {{res.registeredby}}</td>
139
                  <td >{{res.registrationdate}}</td>
140
                  <td> <div *ngFor="let organization of res.organizations">{{organization.legalname + ' (' + getCountryName(organization.country)}})<br></div></td>
141
                  <td>{{res.typology.split('::')[1]}}</td>
142
                </tr>
143
                </tbody>
144
              </table>
145

    
146
              <ul class="uk-pagination uk-flex-center" uk-margin>
147
                <li><a (click)="previousPage()"><span uk-pagination-previous></span></a></li>
148
                <li class="uk-active"><span>{{+dataForm.get('page').value + 1}}</span></li>
149
                <li><a (click)="nextPage()"><span uk-pagination-next></span></a></li>
150
              </ul>
151

    
152
            </div>
153

    
154
          </div>
155

    
156
        </div>
157
      </div>
158
    </div>
159
  </div>
160
</div>
(6-6/7)