forked from tykayn/funky-framadate-front
link function
This commit is contained in:
parent
bfdb18b316
commit
b2ee8ec668
@ -64,10 +64,11 @@ export class Poll {
|
||||
constructor(public owner: Owner = new Owner(), public title = 'mon titre', public custom_url: string = '') {}
|
||||
|
||||
public getAdministrationUrl(): string {
|
||||
return `${environment.api.baseHref}/administration/polls/${this.custom_url}`;
|
||||
return `${environment.frontDomain}/poll/admin/${this.admin_key}`;
|
||||
}
|
||||
|
||||
public getParticipationUrl(): string {
|
||||
return `${environment.api.baseHref}/participation/polls/${this.custom_url}`;
|
||||
// TODO handle pass access
|
||||
return `${environment.frontDomain}/poll/${this.custom_url}/consultation`;
|
||||
}
|
||||
}
|
||||
|
@ -26,8 +26,7 @@
|
||||
>
|
||||
<i class="fa fa-close"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="column">
|
||||
|
||||
<p>
|
||||
<label for="creatorPseudo">
|
||||
<span>
|
||||
|
@ -28,10 +28,10 @@
|
||||
|
||||
<p>
|
||||
Pour accéder au sondage et à tous ses paramètres :
|
||||
<a href="{{ poll.custom_url }}">{{ poll.custom_url }} </a>
|
||||
<a href="{{ poll.getAdministrationUrl() }}">{{ poll.getAdministrationUrl() }} </a>
|
||||
</p>
|
||||
<app-copy-text [textToCopy]="window.location.href + 'poll/admin/' + poll.admin_key + ''"></app-copy-text>
|
||||
<a [href]="window.location.href + 'poll/admin/' + poll.admin_key + ''">
|
||||
<app-copy-text [textToCopy]="poll.getAdministrationUrl()"></app-copy-text>
|
||||
<a [href]="poll.getAdministrationUrl()">
|
||||
Voir le sondage coté administrateur·ice
|
||||
</a>
|
||||
<p class="note">
|
||||
@ -42,17 +42,11 @@
|
||||
<section class="public">
|
||||
<h2 i18n>{{ 'resume.users' | translate }}</h2>
|
||||
<p>
|
||||
Pour accéder au sondage :
|
||||
<a href="{{ window.location.href + 'poll/' + poll.custom_url + 'consultation' }}"
|
||||
>{{ window.location.href + 'poll/' + poll.custom_url + 'consultation' }}
|
||||
</a>
|
||||
Pour modifier le sondage :
|
||||
<a href="{{ poll.getAdministrationUrl() }}">{{ poll.getAdministrationUrl() }} </a>
|
||||
</p>
|
||||
<app-copy-text
|
||||
[textToCopy]="window.location.href + 'poll/' + poll.custom_url + '/consultation'"
|
||||
></app-copy-text>
|
||||
<a href="{{ window.location.href + 'poll/' + poll.custom_url + 'consultation' }}">
|
||||
Voir le sondage
|
||||
</a>
|
||||
<app-copy-text [textToCopy]="poll.getAdministrationUrl()"></app-copy-text>
|
||||
<a href="{{ poll.getAdministrationUrl() }}"> <i class="fa fa-pencil"></i> Modifier le sondage </a>
|
||||
</section>
|
||||
<section class="mail">
|
||||
<h2 i18n>{{ 'resume.links_mail' | translate }}</h2>
|
||||
@ -66,7 +60,7 @@
|
||||
Envoyer les liens du sondage
|
||||
</button>
|
||||
<a href="{{ poll.custom_url }}">
|
||||
Voir le sondage
|
||||
Voir le sondage côté public
|
||||
</a>
|
||||
</section>
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { PollService } from '../../../core/services/poll.service';
|
||||
import { Poll } from '../../../core/models/poll.model';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-success',
|
||||
@ -11,6 +12,7 @@ export class SuccessComponent implements OnInit {
|
||||
@Input() poll: Poll;
|
||||
mailToRecieve: string;
|
||||
window: any = window;
|
||||
environment = environment;
|
||||
|
||||
constructor(private pollService: PollService) {}
|
||||
|
||||
|
@ -11,6 +11,7 @@ const apiV1 = {
|
||||
};
|
||||
|
||||
export const environment = {
|
||||
frontDomain: 'https://framadate-api.cipherbliss.com',
|
||||
production: true,
|
||||
display_routes: true,
|
||||
autofill: true,
|
||||
|
@ -18,6 +18,7 @@ const apiV1 = {
|
||||
};
|
||||
|
||||
export const environment = {
|
||||
frontDomain: 'https://framadate-api.cipherbliss.com',
|
||||
production: false,
|
||||
display_routes: true,
|
||||
autofill: true,
|
||||
|
Loading…
Reference in New Issue
Block a user