From c6ce54cdeaa8650f7c5bda44c9d4f9ed62a15d14 Mon Sep 17 00:00:00 2001 From: Florian Glombik <63976129+florian-glombik@users.noreply.github.com> Date: Sat, 30 Nov 2024 22:41:26 +0100 Subject: [PATCH] Lectures: Improve lecture attachment validation (#9893) --- .../lecture-attachments.component.html | 50 ++++--- .../lecture-attachments.component.scss | 4 + .../lecture/lecture-attachments.component.ts | 124 +++++++++++++----- .../lecture-attachments.component.spec.ts | 82 +++++++----- 4 files changed, 169 insertions(+), 91 deletions(-) diff --git a/src/main/webapp/app/lecture/lecture-attachments.component.html b/src/main/webapp/app/lecture/lecture-attachments.component.html index 6192f270d64e..82050a7c3efe 100644 --- a/src/main/webapp/app/lecture/lecture-attachments.component.html +++ b/src/main/webapp/app/lecture/lecture-attachments.component.html @@ -44,7 +44,6 @@

- @@ -53,25 +52,25 @@

@for (attachment of attachments; track trackId($index, attachment)) { - + {{ attachment.id }} - {{ attachment.name }} - {{ attachment.attachmentType }} @if (!isDownloadingAttachmentLink) { {{ attachment.name }} - } - @if (isDownloadingAttachmentLink === attachment.link) { + } @else if (isDownloadingAttachmentLink === attachment.link) { {{ 'artemisApp.courseOverview.lectureDetails.isDownloading' | artemisTranslate }} + } @else { + {{ attachment.name }} } + {{ attachment.attachmentType }} {{ attachment.releaseDate | artemisDate }} {{ attachment.uploadDate | artemisDate }} @@ -91,7 +90,7 @@

} @@ -207,9 +204,8 @@

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