Skip to content

Commit e86d792

Browse files
authored
Reorder instance detail elements (#175)
1 parent ba0ab43 commit e86d792

File tree

1 file changed

+98
-97
lines changed

1 file changed

+98
-97
lines changed

src/app/instances/pages/instance-detail/instance-detail.component.html

Lines changed: 98 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,103 @@ <h3 class="card-title" id="instance-details">Instance details</h3>
166166
</div>
167167
</div>
168168

169+
<!-- endorsements-->
170+
<div class="card" *ngIf="endorsementsReceived">
171+
<div class="card-header">
172+
<h3 class="card-title" id="endorsements-received">Endorsements received ({{endorsementsReceived.length}})</h3>
173+
</div>
174+
<div class="card-body">
175+
<ng-container *ngIf="endorsementsReceived.length">
176+
<p>Endorsements were received from the following instances:</p>
177+
<table class="table table-bordered">
178+
<thead>
179+
<tr>
180+
<th>Instance</th>
181+
<th>Reasons</th>
182+
</tr>
183+
</thead>
184+
<tbody>
185+
<tr *ngFor="let instance of endorsementsReceived">
186+
<td><a routerLink="/instances/detail/{{instance.domain}}">{{instance.domain}}</a></td>
187+
<td>
188+
<ul *ngIf="instance.endorsementReasons.length">
189+
<li *ngFor="let reason of instance.endorsementReasons">{{reason}}</li>
190+
</ul>
191+
<code *ngIf="!instance.endorsementReasons.length">N/A</code>
192+
</td>
193+
</tr>
194+
</tbody>
195+
</table>
196+
</ng-container>
197+
<p *ngIf="!endorsementsReceived.length">
198+
This instance hasn't been endorsed by any other instance.
199+
</p>
200+
</div>
201+
</div>
202+
<div class="card" *ngIf="endorsementsGiven">
203+
<div class="card-header">
204+
<h3 class="card-title" id="endorsements-given">Endorsements given ({{endorsementsGiven.length}})</h3>
205+
</div>
206+
<div class="card-body">
207+
<ng-container *ngIf="endorsementsGiven.length">
208+
<p>Endorsements were given to the following instances:</p>
209+
<table class="table table-bordered">
210+
<thead>
211+
<tr>
212+
<th>Instance</th>
213+
<th>Reasons</th>
214+
</tr>
215+
</thead>
216+
<tbody>
217+
<tr *ngFor="let instance of endorsementsGiven">
218+
<td><a routerLink="/instances/detail/{{instance.domain}}">{{instance.domain}}</a></td>
219+
<td>
220+
<ul *ngIf="instance.endorsementReasons.length">
221+
<li *ngFor="let reason of instance.endorsementReasons">{{reason}}</li>
222+
</ul>
223+
<code *ngIf="!instance.endorsementReasons.length">N/A</code>
224+
</td>
225+
</tr>
226+
</tbody>
227+
</table>
228+
</ng-container>
229+
<p *ngIf="!endorsementsGiven.length">
230+
This instance hasn't endorsed any other instance.
231+
</p>
232+
</div>
233+
</div>
234+
235+
<!-- guarantees -->
236+
<div class="card" *ngIf="guaranteesGiven">
237+
<div class="card-header">
238+
<h3 class="card-title" id="guarantees">Guarantees ({{guaranteesGiven.length}})</h3>
239+
</div>
240+
<div class="card-body">
241+
<ng-container *ngIf="guaranteesGiven.length">
242+
<p>This instance guarantees for the following instances:</p>
243+
<table class="table table-bordered">
244+
<thead>
245+
<tr>
246+
<th>Instance</th>
247+
</tr>
248+
</thead>
249+
<tbody>
250+
<tr *ngFor="let instance of guaranteesGiven">
251+
<td>
252+
<a routerLink="/instances/detail/{{instance.domain}}">{{instance.domain}}</a>
253+
<app-flags [instance]="instance" />
254+
</td>
255+
</tr>
256+
</tbody>
257+
</table>
258+
</ng-container>
259+
<p *ngIf="!guaranteesGiven.length">
260+
This instance doesn't guarantee for any instance.
261+
</p>
262+
</div>
263+
</div>
264+
265+
<!-- censures -->
169266
<div class="card" *ngIf="censuresReceived">
170267
<div class="card-header">
171268
<h3 class="card-title" id="censures-received">Censures received ({{censuresReceived.length}})</h3>
@@ -227,7 +324,6 @@ <h3 class="card-title" id="censures-received">Censures received ({{censuresRecei
227324
</p>
228325
</div>
229326
</div>
230-
231327
<div class="card" *ngIf="censuresGiven">
232328
<div class="card-header">
233329
<h3 class="card-title" id="censures-given">Censures given ({{censuresGiven.length}})</h3>
@@ -266,72 +362,7 @@ <h3 class="card-title" id="censures-given">Censures given ({{censuresGiven.lengt
266362
</div>
267363
</div>
268364

269-
<div class="card" *ngIf="endorsementsReceived">
270-
<div class="card-header">
271-
<h3 class="card-title" id="endorsements-received">Endorsements received ({{endorsementsReceived.length}})</h3>
272-
</div>
273-
<div class="card-body">
274-
<ng-container *ngIf="endorsementsReceived.length">
275-
<p>Endorsements were received from the following instances:</p>
276-
<table class="table table-bordered">
277-
<thead>
278-
<tr>
279-
<th>Instance</th>
280-
<th>Reasons</th>
281-
</tr>
282-
</thead>
283-
<tbody>
284-
<tr *ngFor="let instance of endorsementsReceived">
285-
<td><a routerLink="/instances/detail/{{instance.domain}}">{{instance.domain}}</a></td>
286-
<td>
287-
<ul *ngIf="instance.endorsementReasons.length">
288-
<li *ngFor="let reason of instance.endorsementReasons">{{reason}}</li>
289-
</ul>
290-
<code *ngIf="!instance.endorsementReasons.length">N/A</code>
291-
</td>
292-
</tr>
293-
</tbody>
294-
</table>
295-
</ng-container>
296-
<p *ngIf="!endorsementsReceived.length">
297-
This instance hasn't been endorsed by any other instance.
298-
</p>
299-
</div>
300-
</div>
301-
302-
<div class="card" *ngIf="endorsementsGiven">
303-
<div class="card-header">
304-
<h3 class="card-title" id="endorsements-given">Endorsements given ({{endorsementsGiven.length}})</h3>
305-
</div>
306-
<div class="card-body">
307-
<ng-container *ngIf="endorsementsGiven.length">
308-
<p>Endorsements were given to the following instances:</p>
309-
<table class="table table-bordered">
310-
<thead>
311-
<tr>
312-
<th>Instance</th>
313-
<th>Reasons</th>
314-
</tr>
315-
</thead>
316-
<tbody>
317-
<tr *ngFor="let instance of endorsementsGiven">
318-
<td><a routerLink="/instances/detail/{{instance.domain}}">{{instance.domain}}</a></td>
319-
<td>
320-
<ul *ngIf="instance.endorsementReasons.length">
321-
<li *ngFor="let reason of instance.endorsementReasons">{{reason}}</li>
322-
</ul>
323-
<code *ngIf="!instance.endorsementReasons.length">N/A</code>
324-
</td>
325-
</tr>
326-
</tbody>
327-
</table>
328-
</ng-container>
329-
<p *ngIf="!endorsementsGiven.length">
330-
This instance hasn't endorsed any other instance.
331-
</p>
332-
</div>
333-
</div>
334-
365+
<!-- hesitations -->
335366
<div class="card" *ngIf="hesitationsReceived">
336367
<div class="card-header">
337368
<h3 class="card-title" id="hesitations-received">Hesitations received ({{hesitationsReceived.length}})</h3>
@@ -393,7 +424,6 @@ <h3 class="card-title" id="hesitations-received">Hesitations received ({{hesitat
393424
</p>
394425
</div>
395426
</div>
396-
397427
<div class="card" *ngIf="hesitationsGiven">
398428
<div class="card-header">
399429
<h3 class="card-title" id="hesitations-given">Hesitations given ({{hesitationsGiven.length}})</h3>
@@ -431,34 +461,5 @@ <h3 class="card-title" id="hesitations-given">Hesitations given ({{hesitationsGi
431461
</p>
432462
</div>
433463
</div>
434-
435-
<div class="card" *ngIf="guaranteesGiven">
436-
<div class="card-header">
437-
<h3 class="card-title" id="guarantees">Guarantees ({{guaranteesGiven.length}})</h3>
438-
</div>
439-
<div class="card-body">
440-
<ng-container *ngIf="guaranteesGiven.length">
441-
<p>This instance guarantees for the following instances:</p>
442-
<table class="table table-bordered">
443-
<thead>
444-
<tr>
445-
<th>Instance</th>
446-
</tr>
447-
</thead>
448-
<tbody>
449-
<tr *ngFor="let instance of guaranteesGiven">
450-
<td>
451-
<a routerLink="/instances/detail/{{instance.domain}}">{{instance.domain}}</a>
452-
<app-flags [instance]="instance" />
453-
</td>
454-
</tr>
455-
</tbody>
456-
</table>
457-
</ng-container>
458-
<p *ngIf="!guaranteesGiven.length">
459-
This instance doesn't guarantee for any instance.
460-
</p>
461-
</div>
462-
</div>
463464
</div>
464465
</ng-template>

0 commit comments

Comments
 (0)