Project

General

Profile

1 56436 andreas.ma
<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 56486 andreas.ma
    <h1 class="uk-h2">Registrations</h1>
5 56436 andreas.ma
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 56469 andreas.ma
    <div class="uk-container uk-container-expand  uk-margin-medium-top uk-margin-medium-bottom">
12 56436 andreas.ma
      <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 56486 andreas.ma
          <!-- RIGHT FILTERS -->
33 56436 andreas.ma
          <div class="uk-grid">
34 56473 andreas.ma
            <div class="uk-width-1-1@m" style="padding-left: 55px">
35 56436 andreas.ma
              <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 56502 andreas.ma
                    <select class="uk-select" id="pageSize" (change)="this.dataForm.get('page').setValue(0); handleChange()" formControlName="pageSize">
40 56436 andreas.ma
                      <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 56443 andreas.ma
                    <select class="uk-select" id="sortBy" (change)="handleChange()" formControlName="requestSortBy">
52 56496 andreas.ma
                      <option value="registrationdate" selected>Date</option>
53
                      <option value="officialname">Name</option>
54 56436 andreas.ma
                    </select>
55
                  </div>
56
                </div>
57
58 56486 andreas.ma
                <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 56436 andreas.ma
              </form>
69 56469 andreas.ma
70 56486 andreas.ma
              <!-- SEARCH BAR -->
71 56443 andreas.ma
              <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 56436 andreas.ma
              </form>
75
            </div>
76
77
          </div>
78
79 56486 andreas.ma
          <!-- LEFT FILTERS -->
80 56436 andreas.ma
          <div class="uk-grid">
81
82
            <div class="uk-width-1-4@m">
83
              <form [formGroup]="dataForm" class="uk-form-stacked">
84
85 56469 andreas.ma
                <div class="uk-form-label uk-text-large">Filtered By</div>
86
87 56436 andreas.ma
                <div class="uk-margin">
88
                  <div class="uk-form-label uk-text-large">Datasource Type</div>
89
                  <div class="uk-form-controls">
90 56486 andreas.ma
                    <label><input class="uk-radio" type="radio" value="" (change)="handleChange()" formControlName="typology"> Any</label><br>
91 56487 andreas.ma
<!--                    <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 56436 andreas.ma
                  </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 56486 andreas.ma
                    <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 56436 andreas.ma
                  </div>
118
                </div>
119
120
              </form>
121
122
            </div>
123
124 56486 andreas.ma
            <!-- TABLE -->
125 56436 andreas.ma
            <div class="uk-width-3-4@m">
126 56450 andreas.ma
<!--              <pre><code>{{dataForm.value | json}}</code></pre>-->
127 56443 andreas.ma
              <table class="uk-table uk-table-striped">
128
                <thead>
129
                <tr>
130 56450 andreas.ma
                  <th>Repository</th>
131
                  <th>Date</th>
132
                  <th>Organization</th>
133 56469 andreas.ma
                  <th>Type</th>
134 56443 andreas.ma
                </tr>
135
                </thead>
136
                <tbody>
137 56450 andreas.ma
                <tr *ngFor="let res of repositorySnippet">
138 56473 andreas.ma
                  <td class="uk-width-1-6@m">{{res.officialname}} <br> ({{res.id}}) <br> {{res.registeredby}}</td>
139 56469 andreas.ma
                  <td >{{res.registrationdate}}</td>
140 56473 andreas.ma
                  <td> <div *ngFor="let organization of res.organizations">{{organization.legalname + ' (' + getCountryName(organization.country)}})<br></div></td>
141 56450 andreas.ma
                  <td>{{res.typology.split('::')[1]}}</td>
142 56443 andreas.ma
                </tr>
143
                </tbody>
144
              </table>
145
146 56469 andreas.ma
              <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 56436 andreas.ma
            </div>
153
154
          </div>
155
156
        </div>
157
      </div>
158
    </div>
159
  </div>
160
</div>