diff --git a/src/app/config/Routes.ts b/src/app/config/Routes.ts index 78455a40..c3e1ce25 100644 --- a/src/app/config/Routes.ts +++ b/src/app/config/Routes.ts @@ -19,24 +19,24 @@ import { PollGraphicComponent } from '../poll-graphic/poll-graphic.component'; * each step in the form is a component */ export const Routes = [ - { path: '', redirectTo: 'step/creation', pathMatch: 'full' }, - { path: 'home', component: HomeComponent }, - { path: 'base', component: BaseComponent }, - { path: 'step/base', component: BaseComponent }, - { path: 'step/creation', component: CreateOrRetrieveComponent }, - { path: 'step/date', component: DatesComponent }, - { path: 'step/kind', component: KindComponent }, - { path: 'step/answers', component: AnswersComponent }, - { path: 'step/admin', component: AdminComponent }, - { path: 'step/pictures', component: PicturesComponent }, - { path: 'step/visibility', component: VisibilityComponent }, - { path: 'step/resume', component: ResumeComponent }, - { path: 'step/end', component: EndConfirmationComponent }, - { path: 'graphic/:poll', component: PollGraphicComponent }, - { path: 'vote/poll/id/:poll', component: PollDisplayComponent }, - { path: 'vote/poll/slug/:pollSlug', component: PollDisplayComponent }, - { path: 'votingchoice', component: VotingChoiceComponent }, - { path: 'voting', component: VotingComponent }, - { path: 'step/password', component: PasswordComponent }, - { path: '**', redirectTo: '/home', pathMatch: 'full' }, + { path: '', redirectTo: 'step/creation', pathMatch: 'full' }, + { path: 'home', component: HomeComponent }, + { path: 'base', component: BaseComponent }, + { path: 'step/base', component: BaseComponent }, + { path: 'step/creation', component: CreateOrRetrieveComponent }, + { path: 'step/date', component: DatesComponent }, + { path: 'step/kind', component: KindComponent }, + { path: 'step/answers', component: AnswersComponent }, + { path: 'step/pictures', component: PicturesComponent }, + { path: 'step/visibility', component: VisibilityComponent }, + { path: 'step/resume', component: ResumeComponent }, + { path: 'step/end', component: EndConfirmationComponent }, + { path: 'graphic/:poll', component: PollGraphicComponent }, + { path: 'admin/:token', component: AdminComponent }, + { path: 'vote/poll/id/:poll', component: PollDisplayComponent }, + { path: 'vote/poll/slug/:pollSlug', component: PollDisplayComponent }, + { path: 'votingchoice', component: VotingChoiceComponent }, + { path: 'voting', component: VotingComponent }, + { path: 'step/password', component: PasswordComponent }, + { path: '**', redirectTo: '/home', pathMatch: 'full' }, ]; diff --git a/src/app/pages/admin/admin.component.html b/src/app/pages/admin/admin.component.html index 6175bd5c..9837b186 100644 --- a/src/app/pages/admin/admin.component.html +++ b/src/app/pages/admin/admin.component.html @@ -1,148 +1,3 @@ -
-

Nom du sondage

- - -

{{ 'admin.info_section_title' | translate }}

- - - - - - - - - - - -

{{ 'admin.settings_section_title' | translate }}

-

{{ 'visibility.title' | translate }}

- -
- - - -
- -

{{ 'visibility.votes' | translate }}

-
- - -
-
- - - - -
- - - - -

{{ 'admin.comments_deletion_title' | translate }}

- - - - -

{{ 'admin.archiving_title' | translate }}

-
- - -
- -

{{ 'visibility.access' | translate }}

-
- - - -
- -

{{ 'admin.deletion' | translate }}

- - - - -

{{ 'admin.link' | translate }}

-

{{ 'admin.link_admin' | translate }}

- - - - - -

{{ 'admin.polled_people' | translate }}

- - - - -

{{ 'admin.email_links' | translate }}

- - - -
- +

+ admin page to modify a poll +

diff --git a/src/app/pages/admin/admin.component.ts b/src/app/pages/admin/admin.component.ts index dfe5a381..46b068cc 100644 --- a/src/app/pages/admin/admin.component.ts +++ b/src/app/pages/admin/admin.component.ts @@ -2,12 +2,16 @@ import { Component, OnInit } from '@angular/core'; import { ConfigService } from '../../services/config.service'; @Component({ - selector: 'framadate-admin', - templateUrl: './admin.component.html', - styleUrls: ['./admin.component.scss'], + selector: 'framadate-admin', + templateUrl: './admin.component.html', + styleUrls: ['./admin.component.scss'], }) export class AdminComponent implements OnInit { - constructor(public config: ConfigService) {} + constructor(public config: ConfigService) {} - ngOnInit() {} + ngOnInit() { + // get token paarameter from route + // fetch admin version of the poll + // then, populate UI. + } }