Fixed the numbering of assignment candidates for projector and PDF
This commit is contained in:
parent
b48ca8c434
commit
7598fc5367
@ -131,6 +131,7 @@ export class AssignmentPdfService {
|
||||
margin: [0, 0, 0, 10]
|
||||
};
|
||||
});
|
||||
const listType = assignment.number_poll_candidates ? 'ol' : 'ul';
|
||||
|
||||
return {
|
||||
columns: [
|
||||
@ -141,7 +142,7 @@ export class AssignmentPdfService {
|
||||
style: 'textItem'
|
||||
},
|
||||
{
|
||||
ul: userList,
|
||||
[listType]: userList,
|
||||
style: 'textItem'
|
||||
}
|
||||
]
|
||||
|
@ -7,4 +7,5 @@ export interface AssignmentSlideData {
|
||||
user: string;
|
||||
elected: boolean;
|
||||
}[];
|
||||
number_poll_candidates: boolean;
|
||||
}
|
||||
|
@ -7,10 +7,18 @@
|
||||
<div *ngIf="data.data && data.data.description" [innerHTML]="data.data.description | trust: 'html'"></div>
|
||||
|
||||
<h3 translate>Candidates</h3>
|
||||
<ul *ngIf="data.data.assignment_related_users && data.data.assignment_related_users.length">
|
||||
<li *ngFor="let candidate of data.data.assignment_related_users">
|
||||
{{ candidate.user }}
|
||||
<mat-icon *ngIf="candidate.elected">star</mat-icon>
|
||||
</li>
|
||||
</ul>
|
||||
<ng-container *ngIf="data.data.assignment_related_users && data.data.assignment_related_users.length">
|
||||
<ol *ngIf="data.data.number_poll_candidates">
|
||||
<li *ngFor="let candidate of data.data.assignment_related_users">
|
||||
{{ candidate.user }}
|
||||
<mat-icon *ngIf="candidate.elected">star</mat-icon>
|
||||
</li>
|
||||
</ol>
|
||||
<ul *ngIf="!data.data.number_poll_candidates">
|
||||
<li *ngFor="let candidate of data.data.assignment_related_users">
|
||||
{{ candidate.user }}
|
||||
<mat-icon *ngIf="candidate.elected">star</mat-icon>
|
||||
</li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
@ -34,6 +34,7 @@ async def assignment_slide(
|
||||
"open_posts": assignment["open_posts"],
|
||||
"description": assignment["description"],
|
||||
"assignment_related_users": assignment_related_users,
|
||||
"number_poll_candidates": assignment["number_poll_candidates"],
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user