funky-framadate-front/src/app/features/administration/form/date/list/day/day-list.component.html

48 lines
1.7 KiB
HTML

<div class="day-list-container">
<div class="days-list" [ngClass]="{ 'colored-weekend-days': environment.enable_colored_weekend_days }">
<fieldset class="date-choice-container has-no-border" *ngFor="let choice of dateChoices; index as id">
<legend class="sr-only">{{ 'dates.element' | translate }} {{ id + 1 }}</legend>
<div class="date-choice" [ngClass]="{ 'day-weekend': isWeekendDay(choice.date_input) }">
<div class="top">
<label class="pull-left" for="dateChoices_{{ id }}" [attr.aria-describedby]="'format-date-' + id">
{{ 'dates.element' | translate }} {{ id + 1 }}
</label>
<p class="format-helper pull-right" id="format-date-{{ id }}">
{{ 'dates.format_helper' | translate }}
</p>
<input
[ngModel]="choice.date_object | date: 'yyyy-MM-dd'"
(ngModelChange)="convertDateInput($event, id)"
class="date-choice-item"
name="dateChoices_{{ id }}"
id="dateChoices_{{ id }}"
type="date"
/>
</div>
<div class="bottom">
<div *ngIf="hasSeveralHours" class="several-times">
<app-time-list [timeSlices]="choice.timeSlices" [prefix_choice_id]="id"></app-time-list>
</div>
</div>
<hr />
<div class="delete-date">
<button
class="has-no-outline has-no-background has-text-primary has-text-left"
(click)="deleteChoiceField(id)"
>
<img class="icon" aria-hidden="true" src="assets/icons/trash-2.svg" />
{{ 'dates.remove' | translate }} {{ id + 1 }}
</button>
</div>
</div>
</fieldset>
<div class="add_date">
<!-- ajouter une date-->
<button class="button is-primary is-fullwidth is-thin" (click)="addChoice()">
{{ 'dates.add' | translate }}
</button>
</div>
</div>
</div>