Skip to content

Commit 1c58194

Browse files
Rephrase descriptions
1 parent f281433 commit 1c58194

2 files changed

Lines changed: 28 additions & 10 deletions

File tree

frontend/src/app/annotate/search/status-info-modal/status-info-modal.component.html

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ <h5 class="modal-title" i18n>Problem statuses</h5>
1010
</div>
1111
<div class="modal-body">
1212
<p i18n>
13-
The problem status indicates the current state of a problem in the
14-
annotation process. It can be set to one of the following values:
13+
Every problem has a status that determines its visibility and the
14+
presence of annotations. The status of a problem is indicated by a
15+
badge.
1516
</p>
1617
<dl>
1718
<div class="d-flex gap-2 mb-2">
@@ -21,7 +22,10 @@ <h5 class="modal-title" i18n>Problem statuses</h5>
2122
[status]="ProblemStatus.GOLD"
2223
/>
2324
</dt>
24-
<dd>This problem has been marked as gold by a master annotator.</dd>
25+
<dd>
26+
This problem has been marked as gold by a master annotator.
27+
Anyone can see it.
28+
</dd>
2529
</div>
2630
<div class="d-flex gap-2 mb-2">
2731
<dt>
@@ -31,8 +35,9 @@ <h5 class="modal-title" i18n>Problem statuses</h5>
3135
/>
3236
</dt>
3337
<dd>
34-
This problem is not gold but has label or knowledge base annotations
35-
attached to it.
38+
This problem has not been marked as gold but has label or
39+
knowledge base annotations attached to it. Only registered users
40+
and (master) annotators can see it.
3641
</dd>
3742
</div>
3843
<div class="d-flex gap-2 mb-2">
@@ -43,15 +48,22 @@ <h5 class="modal-title" i18n>Problem statuses</h5>
4348
/>
4449
</dt>
4550
<dd>
46-
This problem is not gold and lacks label or knowledge base
47-
annotations.
51+
This problem has neither gold status nor label or knowledge base
52+
annotations. Only registered users and (master) annotators can
53+
see it.
4854
</dd>
4955
</div>
5056
</dl>
5157
<p i18n>
52-
You can filter problems based on their status using the filter options
53-
in the search bar.
58+
You can filter problems based on their status using the select menu on
59+
the left.
60+
</p>
61+
@if (canChangeStatus$ | async) {
62+
<p i18n>
63+
You can toggle 'gold' status on a problem by clicking the
64+
'Gold'/'Ungold' button below the problem status badge.
5465
</p>
66+
}
5567
</div>
5668
<div class="modal-footer">
5769
<button
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
import { StatusBadgeComponent } from '@/annotate/annotation-input/problem-details/status-badge/status-badge.component';
2+
import { AuthService } from '@/services/auth.service';
23
import { ProblemStatus } from '@/types';
4+
import { CommonModule } from '@angular/common';
35
import { Component, inject } from '@angular/core';
46
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
7+
import { map } from 'rxjs';
58

69
@Component({
710
selector: 'la-status-info-modal',
8-
imports: [StatusBadgeComponent],
11+
imports: [StatusBadgeComponent, CommonModule],
912
templateUrl: './status-info-modal.component.html',
1013
styleUrl: './status-info-modal.component.scss'
1114
})
1215
export class StatusInfoModalComponent {
1316
public activeModal = inject(NgbActiveModal);
17+
public authService = inject(AuthService);
18+
19+
public canChangeStatus$ = this.authService.currentUser$.pipe(map(user => user?.canChangeProblemStatus ?? false));
1420

1521
public ProblemStatus = ProblemStatus;
1622
}

0 commit comments

Comments
 (0)