Skip to content

Commit 998823a

Browse files
authored
Merge pull request #2635 from intersective/2.4.8/CORE-8167/standalone-pagination-completed-review
[CORE-8167] 2.4.8/standalone-pagination-completed-review
2 parents dd989e6 + 466eac4 commit 998823a

2 files changed

Lines changed: 73 additions & 3 deletions

File tree

projects/v3/src/app/components/assessment/assessment.component.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,65 @@
478478
</ion-button>
479479
</div>
480480
</app-bottom-action-bar>
481+
482+
<!-- standalone pagination for completed reviews (bottom action bar hidden) -->
483+
<ion-footer class="standalone-pagination-footer"
484+
*ngIf="action === 'review'
485+
&& submission?.status === 'feedback available'
486+
&& review?.status === 'done'
487+
&& isPaginationEnabled
488+
&& pageCount > 1">
489+
<div class="pagination-container"
490+
[class.few-pages]="pageCount < manyPages">
491+
<ion-button fill="clear"
492+
class="nav-button prev-button"
493+
(click)="prevPage()"
494+
[disabled]="pageIndex === 0">
495+
<ion-icon name="chevron-back-outline"></ion-icon>
496+
<span>Prev</span>
497+
</ion-button>
498+
499+
<div class="page-indicators"
500+
[class.many-pages]="pageCount > manyPages"
501+
*ngIf="pageCount > 1"
502+
#pageIndicatorsContainer>
503+
<ng-container *ngFor="let page of pages; trackBy: trackById; let i = index">
504+
<div class="page-indicator"
505+
[class.active]="pageIndex === page"
506+
[class.incompleted]="!pageRequiredCompletion[page]"
507+
[id]="'page-indicator-' + page"
508+
(click)="goToPage(page)"
509+
tabindex="0"
510+
role="button"
511+
[attr.aria-label]="'Page ' + (i + 1)"
512+
(keydown.enter)="goToPage(page)"
513+
(keydown.space)="goToPage(page); $event.preventDefault()">
514+
515+
<div class="progress-ring">
516+
<span class="page-number">{{ i + 1 }}</span>
517+
</div>
518+
519+
<ion-icon *ngIf="pageRequiredCompletion[page]"
520+
name="checkmark-circle"
521+
class="completion-icon completed">
522+
</ion-icon>
523+
<ion-icon *ngIf="!pageRequiredCompletion[page]"
524+
name="close-circle-outline"
525+
class="completion-icon">
526+
</ion-icon>
527+
</div>
528+
</ng-container>
529+
</div>
530+
531+
<ion-button fill="clear"
532+
class="nav-button next-button"
533+
(click)="nextPage()"
534+
[disabled]="pageIndex >= pageCount - 1">
535+
<span>Next</span>
536+
<ion-icon name="chevron-forward-outline"></ion-icon>
537+
</ion-button>
538+
</div>
539+
</ion-footer>
481540
</ng-container>
482541

483542
<ng-template #blocked>

projects/v3/src/app/components/assessment/assessment.component.scss

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,15 +433,26 @@ ion-footer {
433433
}
434434
}
435435

436-
// space for submit button (mid to large screens)
436+
// space for submit button (mid to large screens) — only inside bottom-action-bar
437437
@media (min-width: 769px) and (max-width: 1344px) {
438-
.pagination-container {
438+
app-bottom-action-bar .pagination-container {
439439
max-width: calc(100% - 150px);
440440
}
441441
}
442442

443443
@media (min-width: 1345px) {
444-
.pagination-container {
444+
app-bottom-action-bar .pagination-container {
445445
max-width: calc(100% - 40px);
446446
}
447447
}
448+
449+
// standalone pagination footer for completed reviews
450+
.standalone-pagination-footer {
451+
position: sticky;
452+
bottom: 0;
453+
width: 100%;
454+
display: block;
455+
border-top: 1px solid var(--ion-color-light-shade);
456+
background: var(--ion-color-light);
457+
padding: 4px 0;
458+
}

0 commit comments

Comments
 (0)