diff --git a/src/main/webapp/app/admin/audits/audits.component.html b/src/main/webapp/app/admin/audits/audits.component.html index 212c9696439e..1f0a1b7a29b2 100644 --- a/src/main/webapp/app/admin/audits/audits.component.html +++ b/src/main/webapp/app/admin/audits/audits.component.html @@ -15,32 +15,24 @@

Filter by date

- @if (audits?.length === 0) { -
- No audit found -
- } - @if (audits && audits.length > 0) { + @if (audits?.length) {
- @switch (canLoad()) { - @case (true) { - - - - - - - } - @case (false) { - - - - - - - } + @if (canLoad) { + + + + + + + } @else { + + + + + + } @@ -64,8 +56,6 @@

Filter by date

Date User State Extra data
DateUserStateExtra data
Date User State Extra data
DateUserStateExtra data
- } - @if (audits && audits.length > 0) {
@@ -79,9 +69,13 @@

Filter by date

[rotate]="true" [boundaryLinks]="true" (pageChange)="transition()" - [disabled]="!canLoad()" + [disabled]="!canLoad" />
+ } @else { +
+ No audit found +
} diff --git a/src/main/webapp/app/admin/audits/audits.component.ts b/src/main/webapp/app/admin/audits/audits.component.ts index 9b14209276c3..7f98a7fbe09f 100644 --- a/src/main/webapp/app/admin/audits/audits.component.ts +++ b/src/main/webapp/app/admin/audits/audits.component.ts @@ -19,6 +19,7 @@ export class AuditsComponent implements OnInit { predicate!: string; ascending!: boolean; toDate = ''; + canLoad: boolean; // page information page = 1; @@ -40,15 +41,16 @@ export class AuditsComponent implements OnInit { ngOnInit(): void { this.toDate = this.today(); this.fromDate = this.previousMonth(); + this.canLoad = this.calculateCanLoad(); this.handleNavigation(); } - canLoad(): boolean { + calculateCanLoad(): boolean { return this.fromDate !== '' && this.toDate !== ''; } transition(): void { - if (this.canLoad()) { + if (this.canLoad) { this.router.navigate(['/admin/audits'], { queryParams: { page: this.page, @@ -90,6 +92,7 @@ export class AuditsComponent implements OnInit { if (params.get('to')) { this.toDate = this.datePipe.transform(params.get('to'), this.dateFormat)!; } + this.canLoad = this.calculateCanLoad(); this.loadData(); }); } diff --git a/src/main/webapp/app/admin/metrics/blocks/metrics-garbagecollector/metrics-garbagecollector.component.html b/src/main/webapp/app/admin/metrics/blocks/metrics-garbagecollector/metrics-garbagecollector.component.html index 3ad3b97a514a..04e72eb48c36 100644 --- a/src/main/webapp/app/admin/metrics/blocks/metrics-garbagecollector/metrics-garbagecollector.component.html +++ b/src/main/webapp/app/admin/metrics/blocks/metrics-garbagecollector/metrics-garbagecollector.component.html @@ -44,8 +44,6 @@

Garbage col
Classes loaded
{{ garbageCollectorMetrics.classesLoaded }}
- } - @if (garbageCollectorMetrics) {
Classes unloaded
{{ garbageCollectorMetrics.classesUnloaded }}
diff --git a/src/main/webapp/app/admin/system-notification-management/system-notification-management.component.html b/src/main/webapp/app/admin/system-notification-management/system-notification-management.component.html index 1ea6c69749b1..e303ba08c62c 100644 --- a/src/main/webapp/app/admin/system-notification-management/system-notification-management.component.html +++ b/src/main/webapp/app/admin/system-notification-management/system-notification-management.component.html @@ -22,64 +22,60 @@

- @if (notifications) { - - @for (notification of notifications; track trackIdentity($index, notification)) { - - {{ notification.id }} - {{ notification.title }} - {{ notification.text }} - {{ notification.type }} - - @switch (getNotificationState(notification)) { - @case (ACTIVE) { - - {{ 'artemisApp.systemNotification.active' | artemisTranslate }} - - } - @case (EXPIRED) { - - {{ 'artemisApp.systemNotification.expired' | artemisTranslate }} - - } - @case (SCHEDULED) { - - {{ 'artemisApp.systemNotification.scheduled' | artemisTranslate }} - - } + + @for (notification of notifications; track trackIdentity($index, notification)) { + + {{ notification.id }} + {{ notification.title }} + {{ notification.text }} + {{ notification.type }} + + @switch (getNotificationState(notification)) { + @case (ACTIVE) { + + {{ 'artemisApp.systemNotification.active' | artemisTranslate }} + } - - {{ notification.notificationDate | artemisDate }} - {{ notification.expireDate | artemisDate }} - - - - - } - - } + @case (EXPIRED) { + + {{ 'artemisApp.systemNotification.expired' | artemisTranslate }} + + } + @case (SCHEDULED) { + + {{ 'artemisApp.systemNotification.scheduled' | artemisTranslate }} + + } + } + + {{ notification.notificationDate | artemisDate }} + {{ notification.expireDate | artemisDate }} + + + + + } +

- } - @if (notifications) {
diff --git a/src/main/webapp/app/admin/user-management/user-management.component.html b/src/main/webapp/app/admin/user-management/user-management.component.html index 9feea30f568a..0042c879405d 100644 --- a/src/main/webapp/app/admin/user-management/user-management.component.html +++ b/src/main/webapp/app/admin/user-management/user-management.component.html @@ -148,11 +148,6 @@

- @if (!user.activated) { - - } @if (user.activated) { + } @else { + } {{ user.langKey }} diff --git a/src/main/webapp/app/assessment/assessment-header/assessment-header.component.html b/src/main/webapp/app/assessment/assessment-header/assessment-header.component.html index ae12e8e0b294..66c06b909e40 100644 --- a/src/main/webapp/app/assessment/assessment-header/assessment-header.component.html +++ b/src/main/webapp/app/assessment/assessment-header/assessment-header.component.html @@ -1,11 +1,10 @@

- @if (!isTestRun) { - Assessment - } @if (isTestRun) { Test Run Assessment + } @else { + Assessment } @if (isIllegalSubmission) { diff --git a/src/main/webapp/app/complaints/list-of-complaints/list-of-complaints.component.html b/src/main/webapp/app/complaints/list-of-complaints/list-of-complaints.component.html index 1107afc29dee..7422a04e3a75 100644 --- a/src/main/webapp/app/complaints/list-of-complaints/list-of-complaints.component.html +++ b/src/main/webapp/app/complaints/list-of-complaints/list-of-complaints.component.html @@ -96,14 +96,10 @@

{{ 'artemisApp.complaint.listOfComplaints.studentLogin' | artemisTranslate }} - } - @if (course?.isAtLeastInstructor) { {{ 'artemisApp.complaint.listOfComplaints.studentName' | artemisTranslate }} - } - @if (course?.isAtLeastInstructor) { {{ 'artemisApp.complaint.listOfComplaints.reviewerName' | artemisTranslate }} @@ -147,13 +143,9 @@

{{ complaint.student?.login }} - } - @if (course?.isAtLeastInstructor) { {{ complaint.student?.name }} - } - @if (course?.isAtLeastInstructor) { {{ complaint.complaintResponse?.reviewer?.name }} diff --git a/src/main/webapp/app/course/competencies/create-competency/create-competency.component.html b/src/main/webapp/app/course/competencies/create-competency/create-competency.component.html index abd82d1afbc2..05d394a72f70 100644 --- a/src/main/webapp/app/course/competencies/create-competency/create-competency.component.html +++ b/src/main/webapp/app/course/competencies/create-competency/create-competency.component.html @@ -4,8 +4,7 @@ {{ 'loading' | artemisTranslate }}

-} -@if (!isLoading) { +} @else {

{{ 'artemisApp.competency.createCompetency.title' | artemisTranslate }}

diff --git a/src/main/webapp/app/course/competencies/edit-competency/edit-competency.component.html b/src/main/webapp/app/course/competencies/edit-competency/edit-competency.component.html index b14ba7c28893..2f63ced1e572 100644 --- a/src/main/webapp/app/course/competencies/edit-competency/edit-competency.component.html +++ b/src/main/webapp/app/course/competencies/edit-competency/edit-competency.component.html @@ -4,8 +4,7 @@ {{ 'loading' | artemisTranslate }}
-} -@if (!isLoading) { +} @else {

{{ 'artemisApp.competency.editCompetency.title' | artemisTranslate }}

- @if (!isExamMode) { - - } @if (isExamMode) { + } @else { + } @if (numberOfSubmissions.total !== 0) { diff --git a/src/main/webapp/app/course/learning-paths/learning-path-graph/learning-path.component.html b/src/main/webapp/app/course/learning-paths/learning-path-graph/learning-path.component.html index 0155d10ec73f..396b2735560b 100644 --- a/src/main/webapp/app/course/learning-paths/learning-path-graph/learning-path.component.html +++ b/src/main/webapp/app/course/learning-paths/learning-path-graph/learning-path.component.html @@ -4,8 +4,7 @@ {{ 'loading' | artemisTranslate }}
-} -@if (!isLoading) { +} @else {
@for (node of path; track node; let last = $last) {
diff --git a/src/main/webapp/app/exam/manage/student-exams/student-exam-detail.component.html b/src/main/webapp/app/exam/manage/student-exams/student-exam-detail.component.html index 209f57a7707a..0800421b2302 100644 --- a/src/main/webapp/app/exam/manage/student-exams/student-exam-detail.component.html +++ b/src/main/webapp/app/exam/manage/student-exams/student-exam-detail.component.html @@ -170,8 +170,6 @@
Student Summary< Summary - } - @if (course?.isAtLeastInstructor) {
- } - @if (course?.isAtLeastInstructor) { - } - @if (course?.isAtLeastInstructor) { - } - @if (!localVCEnabled && course?.isAtLeastInstructor) {
- } - @if (!isLoading) { + } @else {
@if (!hasExamStarted) {
diff --git a/src/main/webapp/app/exercises/programming/hestia/generation-overview/steps/code-hint-generation-step/code-hint-generation-step.component.html b/src/main/webapp/app/exercises/programming/hestia/generation-overview/steps/code-hint-generation-step/code-hint-generation-step.component.html index 185ccfe9f572..daa764b342a3 100644 --- a/src/main/webapp/app/exercises/programming/hestia/generation-overview/steps/code-hint-generation-step/code-hint-generation-step.component.html +++ b/src/main/webapp/app/exercises/programming/hestia/generation-overview/steps/code-hint-generation-step/code-hint-generation-step.component.html @@ -2,8 +2,7 @@
-} -@if (!isLoading) { +} @else {
@if (codeHints?.length) { - } - @if (codeHints?.length === 0) { - } - @if (codeHints?.length) { + } @else { }
-} -@if (!isLoading && codeHints?.length) { - - - - {{ 'artemisApp.codeHint.management.step4.title' | artemisTranslate }} - {{ 'artemisApp.codeHint.management.step4.task' | artemisTranslate }} - - - @for (codeHint of codeHints; track codeHint) { - + @if (codeHints?.length) { + + - {{ codeHint.title }} - - {{ codeHint?.programmingExerciseTask?.taskName }} - + {{ 'artemisApp.codeHint.management.step4.title' | artemisTranslate }} + {{ 'artemisApp.codeHint.management.step4.task' | artemisTranslate }} -
- @if (codeHint?.solutionEntries) { -
- + + @for (codeHint of codeHints; track codeHint) { + + + + {{ codeHint.title }} + + + {{ codeHint?.programmingExerciseTask?.taskName }} + + +
+ @if (codeHint?.solutionEntries) { +
+ +
+ } + - } - -
-
- } - -} -@if (!codeHints?.length) { -
- No code hints have been generated yet. -
+ + } + + } @else { +
+ No code hints have been generated yet. +
+ } } diff --git a/src/main/webapp/app/exercises/programming/shared/code-editor/treeview/components/treeview/treeview.component.html b/src/main/webapp/app/exercises/programming/shared/code-editor/treeview/components/treeview/treeview.component.html index 6cd30a579e99..fde88ded4d76 100644 --- a/src/main/webapp/app/exercises/programming/shared/code-editor/treeview/components/treeview/treeview.component.html +++ b/src/main/webapp/app/exercises/programming/shared/code-editor/treeview/components/treeview/treeview.component.html @@ -2,17 +2,14 @@
@if (item.children) { } diff --git a/src/main/webapp/app/exercises/shared/exercise-hint/participate/exercise-hint-expandable.component.html b/src/main/webapp/app/exercises/shared/exercise-hint/participate/exercise-hint-expandable.component.html index c757e3e69f6c..8f5f0b1cce9f 100644 --- a/src/main/webapp/app/exercises/shared/exercise-hint/participate/exercise-hint-expandable.component.html +++ b/src/main/webapp/app/exercises/shared/exercise-hint/participate/exercise-hint-expandable.component.html @@ -29,8 +29,7 @@ {{ 'loading' | artemisTranslate }}
- } - @if (!isLoading) { + } @else {
@if (exerciseHint?.content) {
diff --git a/src/main/webapp/app/exercises/shared/exercise-scores/exercise-scores.component.html b/src/main/webapp/app/exercises/shared/exercise-scores/exercise-scores.component.html index f1f33077ac81..1c5283f887ee 100644 --- a/src/main/webapp/app/exercises/shared/exercise-scores/exercise-scores.component.html +++ b/src/main/webapp/app/exercises/shared/exercise-scores/exercise-scores.component.html @@ -191,8 +191,7 @@
{{ 'artemisApp.exercise.teamShortName' | artemisTranslate }} - } - @if (!exercise.teamMode) { + } @else { {{ 'artemisApp.exercise.studentId' | artemisTranslate }} diff --git a/src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.html b/src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.html index 73b88b578e4e..8b89959e72b8 100644 --- a/src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.html +++ b/src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.html @@ -4,8 +4,7 @@ {{ 'loading' | artemisTranslate }}
-} -@if (!isLoading) { +} @else {
diff --git a/src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/lecture-unit-layout/lecture-unit-layout.component.html b/src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/lecture-unit-layout/lecture-unit-layout.component.html index 8b235c61b077..ee71cdb80fc3 100644 --- a/src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/lecture-unit-layout/lecture-unit-layout.component.html +++ b/src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/lecture-unit-layout/lecture-unit-layout.component.html @@ -4,8 +4,7 @@ {{ 'loading' | artemisTranslate }}
-} -@if (!isLoading) { +} @else {
diff --git a/src/main/webapp/app/overview/course-discussion/course-discussion.component.html b/src/main/webapp/app/overview/course-discussion/course-discussion.component.html index 3f5be086d810..61d5f257e9d6 100644 --- a/src/main/webapp/app/overview/course-discussion/course-discussion.component.html +++ b/src/main/webapp/app/overview/course-discussion/course-discussion.component.html @@ -141,9 +141,7 @@
{{ 'artemisApp.metis.loadingPosts' | artemisTranslate }}
- } - - @if (!isLoading) { + } @else {
{{ totalItems === 0 ? ('artemisApp.metis.noPosts' | artemisTranslate) : ('artemisApp.metis.postNumberInformation' | artemisTranslate: { number: totalItems }) }}
diff --git a/src/main/webapp/app/overview/course-registration/course-registration-prerequisites-modal/course-prerequisites-modal.component.html b/src/main/webapp/app/overview/course-registration/course-registration-prerequisites-modal/course-prerequisites-modal.component.html index bec20f950335..13f99e5814c8 100644 --- a/src/main/webapp/app/overview/course-registration/course-registration-prerequisites-modal/course-prerequisites-modal.component.html +++ b/src/main/webapp/app/overview/course-registration/course-registration-prerequisites-modal/course-prerequisites-modal.component.html @@ -10,8 +10,7 @@
- } - @if (!isLoading) { + } @else {
@for (prerequisite of prerequisites; track identify(i, prerequisite); let i = $index) { diff --git a/src/main/webapp/app/shared/consistency-check/consistency-check.component.html b/src/main/webapp/app/shared/consistency-check/consistency-check.component.html index 8af70980c4c7..77fb3bb334ea 100644 --- a/src/main/webapp/app/shared/consistency-check/consistency-check.component.html +++ b/src/main/webapp/app/shared/consistency-check/consistency-check.component.html @@ -14,26 +14,24 @@
- } - @if (!isLoading) { + } @else {
- @if (inconsistencies.length === 0) { + @if (inconsistencies?.length) {
- +
- No inconsistencies found + Following inconsistencies have been found
- } - @if (inconsistencies.length > 0) { + } @else {
- +
- Following inconsistencies have been found + No inconsistencies found
}
} - @if (!isLoading && inconsistencies.length > 0) { + @if (!isLoading && inconsistencies?.length) {
diff --git a/src/main/webapp/app/shared/loading-indicator-container/loading-indicator-container.component.html b/src/main/webapp/app/shared/loading-indicator-container/loading-indicator-container.component.html index 743ad871a696..689664eec13d 100644 --- a/src/main/webapp/app/shared/loading-indicator-container/loading-indicator-container.component.html +++ b/src/main/webapp/app/shared/loading-indicator-container/loading-indicator-container.component.html @@ -4,8 +4,7 @@ {{ 'loading' | artemisTranslate }} -} -@if (!isLoading) { +} @else {