conditionnal display of admin links if admin_key is present

This commit is contained in:
Tykayn 2021-11-16 11:16:01 +01:00 committed by tykayn
parent 8f6fe6044a
commit 475c420d96
2 changed files with 37 additions and 28 deletions

View File

@ -47,7 +47,7 @@ export class PollService implements Resolve<Poll> {
public showDateInterval = false; public showDateInterval = false;
public allowSeveralHours = false; public allowSeveralHours = false;
public richTextMode = false; public richTextMode = false;
public calendar: any = [new Date()]; public calendar: Date[] = [new Date()];
constructor( constructor(
private http: HttpClient, private http: HttpClient,

View File

@ -28,6 +28,11 @@
Voici les liens daccès au sondage, conservez-les soigneusement ! (Si vous les perdez vous Voici les liens daccès au sondage, conservez-les soigneusement ! (Si vous les perdez vous
pourrez toujours les recevoir par email) pourrez toujours les recevoir par email)
</p> </p>
<div class="no-admin-key" *ngIf="!pollService.admin_key">
Pas de clé d'administration, l'enregistrement du sondage a échoué. vérifiez vos paramètres
réseau.
</div>
<div class="admin-ok" *ngIf="pollService.admin_key">
<div> <div>
Pour accéder au sondage et à tous ses paramètres : Pour accéder au sondage et à tous ses paramètres :
<br /> <br />
@ -35,17 +40,20 @@
>{{ pollService.getAdministrationUrlFromForm() }} >{{ pollService.getAdministrationUrlFromForm() }}
</pre </pre
> >
<app-copy-text [textToCopy]="pollService.getAdministrationUrlFromForm()"></app-copy-text> <app-copy-text
[textToCopy]="pollService.getAdministrationUrlFromForm()"
></app-copy-text>
</div> </div>
<br /> <br />
<a class="button is-info" [href]="pollService.getAdministrationUrlFromForm()"> <a class="button is-info" [href]="pollService.getAdministrationUrlFromForm()">
Voir le sondage coté administrateur·ice Voir le sondage coté administrateur·ice
</a> </a>
<br /> <br />
<p class="note has-background-info padded"> <p class="note has-background-info padded">
<i class="fa fa-info-circle"></i> Note : Le sondage sera supprimé <i class="fa fa-info-circle"></i> Note : Le sondage sera supprimé
<strong> {{ pollService.form.value.expiresDaysDelay }} </strong> jours après la date de sa <strong> {{ pollService.form.value.expiresDaysDelay }} </strong> jours après la date de
dernière modification. sa dernière modification.
<span class="expiracy-detail" *ngIf="pollService.form.value.expiresDaysDelay"> <span class="expiracy-detail" *ngIf="pollService.form.value.expiresDaysDelay">
Le Le
{{ {{
@ -58,6 +66,7 @@
</p> </p>
</div> </div>
</div> </div>
</div>
<div class="column"> <div class="column">
<div class="public"> <div class="public">
<h2 class="title is-2"> <h2 class="title is-2">