funky-framadate-front/src/app/features/administration/form/option-link/option-link.component.html

94 lines
2.9 KiB
HTML
Raw Normal View History

2022-02-09 12:25:08 +01:00
<div class="options">
<h1 class="title is-1">
{{ 'choices.title' | translate }}
</h1>
2022-02-09 12:25:08 +01:00
<!--{{ 'choices.helper' |translate}}-->
2022-03-14 17:02:56 +01:00
<div class="rounded-block has-nopadbottom" *ngFor="let choice of StorageService.choicesText; index as ii">
2022-02-09 12:25:08 +01:00
<label [for]="'option_' + ii">{{ 'choices.element' | translate }} {{ ii + 1 }}</label>
<input type="text" [(ngModel)]="choice.name" class="input" />
2022-03-14 17:02:56 +01:00
<div class="pull-left" *ngIf="choice.url_display">
<img src="{{ choice.url_display }}" alt="image" class="image-preview is-rounded" />
2022-02-09 12:25:08 +01:00
</div>
<div class="href-preview" *ngIf="choice.url_href">
2022-03-14 17:02:56 +01:00
<a href="{{ choice.url_href }}">{{ choice.url_href }}</a>
2022-02-09 12:25:08 +01:00
</div>
<div class="link-land">
<button
(click)="openLinkModal(choice)"
class="has-no-border has-background-icon-left is-filtered-icon-primary is-fullwidth"
2022-03-14 17:02:56 +01:00
[ngClass]="{
'has-background-edit': url_href || url_display,
'has-background-link-icon': !url_href && !url_display
2022-03-14 17:02:56 +01:00
}"
>
2022-03-14 17:02:56 +01:00
{{ evalChoiceUrl(choice) | translate }}
</button>
</div>
<hr />
<div class="down-line-button-container">
<button
[attr.aria-label]="'choices.delete' | translate"
class="has-background-trash has-background-icon-left is-filtered-icon-primary"
(click)="StorageService.choicesText.splice(ii, 1)"
>
{{ 'choices.delete' | translate }}
</button>
</div>
2022-02-09 12:25:08 +01:00
</div>
</div>
<button class="is-primary button is-fullwidth is-thin" (click)="addLink()">
2022-02-09 12:25:08 +01:00
{{ 'choices.add' | translate }}
</button>
<!-- dialog search-->
<p-dialog
[modal]="true"
[(visible)]="display_option_dialog"
2022-03-10 12:00:31 +01:00
[breakpoints]="{ '600px': '75vw', '400px': '95vw' }"
[style]="{ width: '486px' }"
2022-02-09 12:25:08 +01:00
[draggable]="false"
[showHeader]="false"
[resizable]="true"
>
<ng-template pTemplate="titlebar">
<button
id="close_dialog"
class="button cancel-button-reject pull-right has-text-right has-no-border is-closing-popup"
(click)="closeModalAndFocusOnOpenModalButton()"
>
{{ 'SENTENCES.Close' | translate }} <img class="icon fa" src="assets/icons/x_blue.svg" />
2022-02-09 12:25:08 +01:00
</button>
<h1 class="title is-1">
{{ 'choices.modal.title' | translate }}
</h1>
<p class="description">
{{ 'choices.modal.description' | translate }}
</p>
<label for="modal_url">
{{ 'choices.modal.url_label' | translate }}
</label>
<input type="text" [(ngModel)]="url_href" id="modal_url" />
<label for="modal_url">
{{ 'choices.modal.img_label' | translate }}
</label>
<input type="text" [(ngModel)]="url_display" id="modal_img_url" />
</ng-template>
<ng-template pTemplate="footer">
<div class="bottom has-text-right">
<button class="button is-secondary marged-right" (click)="closeModal()">
{{ 'SENTENCES.Cancel' | translate }}
</button>
<button class="button is-primary" (click)="validateModal()">
{{ 'choices.modal.validate' | translate }}
</button>
</div>
</ng-template>
2022-02-09 12:25:08 +01:00
</p-dialog>
2022-02-16 12:37:30 +01:00
<!--<app-wip-todo></app-wip-todo>-->