-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...n/webapp/app/lecture/pdf-preview/pdf-preview-date-box/pdf-preview-date-box.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div class="date-box"> | ||
<div class="checkbox-container"> | ||
<input type="checkbox" id="date-box-checkbox" /> | ||
<label for="date-box-checkbox">Hide forever</label> | ||
</div> | ||
<div class="button-container"> | ||
<button class="btn btn-primary" (click)="selectCalendar()">Select Date</button> | ||
<button class="btn btn-primary" (click)="selectExercise()">Select Exercise</button> | ||
</div> | ||
@if (calendarSelected()) { | ||
<div class="calendar-container"> | ||
<input type="date" class="form-control" /> | ||
</div> | ||
} | ||
@if (exerciseSelected()) { | ||
<div class="exercise-container">Exercises</div> | ||
} | ||
</div> |
30 changes: 30 additions & 0 deletions
30
...n/webapp/app/lecture/pdf-preview/pdf-preview-date-box/pdf-preview-date-box.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.date-box { | ||
display: flex; | ||
flex-direction: column; | ||
padding: 10px; | ||
|
||
.checkbox-container { | ||
margin-bottom: 10px; | ||
} | ||
|
||
.button-container { | ||
display: flex; | ||
gap: 10px; | ||
|
||
button { | ||
min-width: 100px; | ||
} | ||
} | ||
|
||
.calendar-container { | ||
margin-top: 15px; | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.exercise-container { | ||
margin-top: 15px; | ||
color: #333; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...ain/webapp/app/lecture/pdf-preview/pdf-preview-date-box/pdf-preview-date-box.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Component, input, signal } from '@angular/core'; | ||
import { ArtemisSharedModule } from 'app/shared/shared.module'; | ||
import { Lecture } from 'app/entities/lecture.model'; | ||
|
||
@Component({ | ||
selector: 'jhi-pdf-preview-date-box-component', | ||
templateUrl: './pdf-preview-date-box.component.html', | ||
styleUrls: ['./pdf-preview-date-box.component.scss'], | ||
standalone: true, | ||
imports: [ArtemisSharedModule], | ||
}) | ||
export class PdfPreviewDateBoxComponent { | ||
// Inputs | ||
lecture = input<Lecture>(); | ||
|
||
// Signals | ||
calendarSelected = signal<boolean>(false); | ||
exerciseSelected = signal<boolean>(false); | ||
|
||
/** | ||
* Toggles the visibility of the calendar. | ||
*/ | ||
selectCalendar(): void { | ||
this.calendarSelected.set(true); | ||
this.exerciseSelected.set(false); | ||
} | ||
|
||
/** | ||
* Handles the "Select Exercise" button click. | ||
*/ | ||
selectExercise(): void { | ||
this.calendarSelected.set(false); | ||
this.exerciseSelected.set(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters