From 2e1764cf90ddefed8e054e18a96c4fc61a8050f9 Mon Sep 17 00:00:00 2001 From: Matti Lupari Date: Thu, 14 Dec 2023 12:24:06 +0200 Subject: [PATCH] CSCEXAM-1211 More information to library search dropdowns --- app/controllers/ExamController.java | 4 ++- .../app/question/library/library.component.ts | 12 +++++++ .../search/library-search.component.html | 21 ++++++------ .../search/library-search.component.ts | 34 +++++++++++++++---- .../miscellaneous/course-code.component.ts | 8 ++--- ui/src/assets/i18n/en.json | 5 ++- ui/src/assets/i18n/fi.json | 5 ++- ui/src/assets/i18n/sv.json | 5 ++- 8 files changed, 66 insertions(+), 28 deletions(-) diff --git a/app/controllers/ExamController.java b/app/controllers/ExamController.java index 394639f839..1f37405dfb 100644 --- a/app/controllers/ExamController.java +++ b/app/controllers/ExamController.java @@ -160,7 +160,9 @@ public Result listExams( List courses = courseIds.orElse(Collections.emptyList()); List sections = sectionIds.orElse(Collections.emptyList()); List tags = tagIds.orElse(Collections.emptyList()); - PathProperties pp = PathProperties.parse("(id, name, course(id, code), examSections(id, name))"); + PathProperties pp = PathProperties.parse( + "(id, name, examActiveStartDate, examActiveEndDate, course(id, code), examSections(id, name))" + ); Query query = DB.find(Exam.class); pp.apply(query); ExpressionList el = query.where().isNotNull("name").isNotNull("course").isNull("parent"); diff --git a/ui/src/app/question/library/library.component.ts b/ui/src/app/question/library/library.component.ts index 231d8f4e6a..f43a96a6b2 100644 --- a/ui/src/app/question/library/library.component.ts +++ b/ui/src/app/question/library/library.component.ts @@ -59,6 +59,18 @@ import { LibraryTagsDialogComponent } from './tags/library-tags-dialog.component
{{ 'sitnet_search' | translate }}: + + +
diff --git a/ui/src/app/question/library/search/library-search.component.html b/ui/src/app/question/library/search/library-search.component.html index 94abeede5b..100ff409c6 100644 --- a/ui/src/app/question/library/search/library-search.component.html +++ b/ui/src/app/question/library/search/library-search.component.html @@ -1,10 +1,5 @@ -
-
- {{ 'sitnet_choose_atleast_one' | translate }} -
-
-
+