Merge branch 'issue-38-admin-sondage' into 'dev'

#38 admin sondage

See merge request framasoft/framadate/funky-framadate-front!15
archived-develop
Le Libre Au Quotidien 2019-11-22 10:20:50 +01:00
commit c7816aa6b6
10 changed files with 206 additions and 37 deletions

48
package-lock.json generated
View File

@ -126,9 +126,9 @@
}
},
"@angular/animations": {
"version": "8.2.13",
"resolved": "https://registry.npmjs.org/@angular/animations/-/animations-8.2.13.tgz",
"integrity": "sha512-ZE4UZsQ6HDW1ZIj9tL45PVosCcG4Ke7ihV7eWCE1VgLZKDDxTOPbLf1UeEiszUYptMLGH3eGMNBKo85mOlkH8w==",
"version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/animations/-/animations-8.2.14.tgz",
"integrity": "sha512-3Vc9TnNpKdtvKIXcWDFINSsnwgEMiDmLzjceWg1iYKwpeZGQahUXPoesLwQazBMmxJzQiA4HOMj0TTXKZ+Jzkg==",
"requires": {
"tslib": "^1.9.0"
}
@ -183,17 +183,17 @@
}
},
"@angular/common": {
"version": "8.2.13",
"resolved": "https://registry.npmjs.org/@angular/common/-/common-8.2.13.tgz",
"integrity": "sha512-I9cTcjUi88L+Mb/a/ZzUrdDcn3YgFFK9LubxaPjAfr6+G7IZ//MY5HuvG8Y41yKprXVVvQCbQ1yQD+GGRSCkaA==",
"version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/common/-/common-8.2.14.tgz",
"integrity": "sha512-Qmt+aX2quUW54kaNT7QH7WGXnFxr/cC2C6sf5SW5SdkZfDQSiz8IaItvieZfXVQUbBOQKFRJ7TlSkt0jI/yjvw==",
"requires": {
"tslib": "^1.9.0"
}
},
"@angular/compiler": {
"version": "8.2.13",
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.2.13.tgz",
"integrity": "sha512-u2NWCvEn4SjbMvn2PG6sYcf+rR5u3aYMv3/mNQ9k+2UmCIu3yJrcuCzebjo5SdlDVqKD2vzbyMZnr8VB9OcceQ==",
"version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.2.14.tgz",
"integrity": "sha512-ABZO4E7eeFA1QyJ2trDezxeQM5ZFa1dXw1Mpl/+1vuXDKNjJgNyWYwKp/NwRkLmrsuV0yv4UDCDe4kJOGbPKnw==",
"requires": {
"tslib": "^1.9.0"
}
@ -974,17 +974,17 @@
}
},
"@angular/core": {
"version": "8.2.13",
"resolved": "https://registry.npmjs.org/@angular/core/-/core-8.2.13.tgz",
"integrity": "sha512-W8HN0lUQV4Sq85l17nhRIXeIfcw1ZdpgGm6to98pl0y9l/1srfzWfTnofuwCJC7gedt5AMrYJGUaNiDbByosFw==",
"version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/core/-/core-8.2.14.tgz",
"integrity": "sha512-zeePkigi+hPh3rN7yoNENG/YUBUsIvUXdxx+AZq+QPaFeKEA2FBSrKn36ojHFrdJUjKzl0lPMEiGC2b6a6bo6g==",
"requires": {
"tslib": "^1.9.0"
}
},
"@angular/forms": {
"version": "8.2.13",
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-8.2.13.tgz",
"integrity": "sha512-l7lHD4kbWK70KY0Xp4IpSa106ZzSgPMwRYMFKd9qhYaJ7v0Y7Shh7Z/ZDCOP730maj9WULnpy5X4eeozWXgvgg==",
"version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-8.2.14.tgz",
"integrity": "sha512-zhyKL3CFIqcyHJ/TQF/h1OZztK611a6rxuPHCrt/5Sn1SuBTJJQ1pPTkOYIDy6IrCrtyANc8qB6P17Mao71DNQ==",
"requires": {
"tslib": "^1.9.0"
}
@ -996,25 +996,25 @@
"dev": true
},
"@angular/platform-browser": {
"version": "8.2.13",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-8.2.13.tgz",
"integrity": "sha512-1lPbeLQIbbafjq9ul3IA8s2fMJ/EXeMJ74ouTolVXoPPur9ZPRLX9FqBAO1K4QzkAWhRlyf6qIC+mDZfJILwZw==",
"version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-8.2.14.tgz",
"integrity": "sha512-MtJptptyKzsE37JZ2VB/tI4cvMrdAH+cT9pMBYZd66YSZfKjIj5s+AZo7z8ncoskQSB1o3HMfDjSK7QXGx1mLQ==",
"requires": {
"tslib": "^1.9.0"
}
},
"@angular/platform-browser-dynamic": {
"version": "8.2.13",
"resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.2.13.tgz",
"integrity": "sha512-KP5psUKujAO8jZKHi6LRC+N7hE/epiGOhYZxdher1sCi81sYoZmqrEWkVZ4VKhov/4aC409CocDXcF7nmHV8tg==",
"version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.2.14.tgz",
"integrity": "sha512-mO2JPR5kLU/A3AQngy9+R/Q5gaF9csMStBQjwsCRI0wNtlItOIGL6+wTYpiTuh/ux+WVN1F2sLcEYU4Zf1ud9A==",
"requires": {
"tslib": "^1.9.0"
}
},
"@angular/router": {
"version": "8.2.13",
"resolved": "https://registry.npmjs.org/@angular/router/-/router-8.2.13.tgz",
"integrity": "sha512-9CqnachtdASnEmRMtrG/R3c5nDCjjlCU4n0W/xt5+LlveyuUVvAT/CFUC38km4Df3lIvqap8mSpxzGaEzCL+wQ==",
"version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/router/-/router-8.2.14.tgz",
"integrity": "sha512-DHA2BhODqV7F0g6ZKgFaZgbsqzHHWRcfWchCOrOVKu2rYiKUTwwHVLBgZAhrpNeinq2pWanVYSIhMr7wy+LfEA==",
"requires": {
"tslib": "^1.9.0"
}

View File

@ -40,6 +40,8 @@ import {
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import { PollGraphicComponent } from './poll-graphic/poll-graphic.component';
import { AdminComponent } from './pages/admin/admin.component';
export class MyMissingTranslationHandler implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams) {
return 'some value';
@ -76,6 +78,7 @@ export function HttpLoaderFactory(http: HttpClient) {
HomeComponent,
PollGraphicComponent,
VoteChoiceComponent,
AdminComponent,
],
imports: [

View File

@ -1,12 +1,13 @@
import {KindComponent} from "../pages/kind/kind.component";
import {DatesComponent} from "../pages/dates/dates.component";
import {VisibilityComponent} from "../pages/visibility/visibility.component";
import {ResumeComponent} from "../pages/resume/resume.component";
import {PicturesComponent} from "../pages/pictures/pictures.component";
import {EndConfirmationComponent} from "../pages/end-confirmation/end-confirmation.component";
import {AnswersComponent} from "../pages/answers/answers.component";
import {CreateOrRetrieveComponent} from "../pages/create-or-retrieve/create-or-retrieve.component";
import {BaseComponent} from "../pages/base-page/base.component";
import {KindComponent} from '../pages/kind/kind.component';
import {DatesComponent} from '../pages/dates/dates.component';
import {VisibilityComponent} from '../pages/visibility/visibility.component';
import {ResumeComponent} from '../pages/resume/resume.component';
import {PicturesComponent} from '../pages/pictures/pictures.component';
import {EndConfirmationComponent} from '../pages/end-confirmation/end-confirmation.component';
import {AnswersComponent} from '../pages/answers/answers.component';
import {AdminComponent} from '../pages/admin/admin.component';
import {CreateOrRetrieveComponent} from '../pages/create-or-retrieve/create-or-retrieve.component';
import {BaseComponent} from '../pages/base-page/base.component';
import {HomeComponent} from "../pages/home/home.component";
import {PollGraphicComponent} from '../poll-graphic/poll-graphic.component';
import {VoteChoiceComponent} from "../vote-choice/vote-choice.component";
@ -24,6 +25,7 @@ export const Routes =
{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},

View File

@ -0,0 +1,75 @@
<form>
<h1>Nom du sondage</h1>
<!--Infos-->
<h2>Informations du sondage</h2>
<label for="title">Le titre du sondage est</label>
<input type="text" name="title">
<label for="desc">et sa description :</label>
<textarea name="desc"> </textarea>
<label for="name">Je peux aussi préciser mon nom si je le souhaite :</label>
<input type="text" name="name">
<!--Params-->
<h2>Paramètres</h2>
<h3>Visibilité des réponses</h3>
<section class="row">
<label for="answer-visible">Je veux que</label>
<select name="answer-visible">
<option value="all" selected>tout le monde</option>
<option value="per">seulement moi</option>
</select>
<label for="answer-visible">puisse voir les réponses au sondage</label>
</section>
<h3>Votes</h3>
<section class="row">
<label for="vote-date">Les personnes sondées pourront voter jusqu'au</label>
<input type="date" name="vote-date">
</section>
<section class="row">
<label for="alter-vote">Elles</label>
<select name="alter-vote">
<option value="yes" selected>auront</option>
<option value="no">n'auront pas</option>
</select>
<label for="type-vote">la possibilité de modifier</label>
<select name="type-vote">
<option value="solo" selected>leur vote</option>
<option value="all">tout les votes</option>
</select>
</section>
<label for="del-vote">Pour repartir à zéro, je peux tous les supprimer :</label>
<input class="btn btn--alert btn--outline" type="submit" name="del-vote" value="Supprimer tous les votes">
<h3>Commentaires</h3>
<label for="del-com">Si je le souhaite,je peux supprimer l'ensemble des commentaires</label>
<input class="btn btn--alert btn--outline" type="submit" name="del-com" value="Supprimer tous les commentaires">
<h3>Archivage</h3>
<section class="row">
<label for="arch">Ce sondage ne sera plus éditable à partir du</label>
<input type="date" name="arch">
</section>
<h3>Accés au sondage</h3>
<section class="row">
<label for="password">Je</label>
<select name="password">
<option value="yes" selected>n'ai pas besoin</option>
<option value="no">voudrais</option>
</select>
<label for="alter-vote">qu'il soit protégé par un mot de passe</label>
</section>
<h3>Tout supprimer</h3>
<label for="del">Dans le cas où vous voudriez tout supprimer, ce bouton est fait pour vous :</label>
<input class="btn btn--alert" type="submit" name="del" value="Supprimer le sondage">
<h2>Liens d'accès au sondage</h2>
<h3>Coté administrateur·ice</h3>
<label for="copy-link-admin">Pour accéder au sondage et à tous ses paramètres : https://framadate.org/urladmindusondage</label>
<input class="btn btn--mini" type="submit" name="copy-link-admin" value="Copier le lien">
<a href="#" class="next">Voir le sondage coté administrateur·ice</a>
<h3>Côté sondé·es</h3>
<label for="copy-link">Pour accéder au sondage et à tous ses paramètres : https://framadate.org/urladmindusondage</label>
<input class="btn btn--mini" type="submit" name="copy-link" value="Copier le lien">
<a href="#" class="next">Voir le sondage</a>
<h3>Recevoir les liens par mail</h3>
<label for="mail">Pour être sur de retrouver ces liens, nous pouvons vous les envoyer sur votre mail :</label>
<input type="email" name="mail">
<input class="btn btn--mini" type="submit" name="send-mail" value="Envoyer les liens du sondage">
</form>

View File

@ -0,0 +1,39 @@
form{
display:flex;
flex-direction: column;
width:340px;
margin:auto;
}
.row{
flex-direction: row;
flex-wrap: wrap;
padding-bottom: 65px;
}
textarea{
height:115px;
margin-bottom: 50px;
}
label{
padding-bottom: 10px;
flex-wrap: wrap;
}
h2,h1{
margin-bottom: 40px;
}
h2{
margin-top: 40px;
padding-left:16px;
}
.btn--alert{
font-weight: 600;
}
h3{
padding-left: 28px;
padding-bottom:15px;
}
select,input[type=date]{
max-width: 130px;
}
.btn--outline{
margin-bottom: 70px;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AdminComponent } from './admin.component';
describe('AdminComponent', () => {
let component: AdminComponent;
let fixture: ComponentFixture<AdminComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AdminComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AdminComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,16 @@
import { Component, OnInit } from '@angular/core';
import {BaseComponent} from '../base-page/base.component';
import {ConfigService} from '../../config.service';
@Component({
selector: 'framadate-admin',
templateUrl: './admin.component.html',
styleUrls: ['./admin.component.scss']
})
export class AdminComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@ -43,5 +43,9 @@
display: block;
min-width: 100%;
}
&--mini{
background-color: $mini-button-color;
}
}
}

View File

@ -1,5 +1,9 @@
@charset "UTF-8";
input[type="date"]::after{
content:"au format JJ/MM/AAAA";
display: inline-block;
position: relative;
}
input,
select,
textarea {
@ -18,6 +22,7 @@ select {
textarea {
width: 100%;
border-left: 3px solid $primary_color;
}
select,

View File

@ -13,7 +13,7 @@ $red: #cd0000;
$cool-grey: #aeafb1;
$warm-grey:#807e7e;
$wisteria:#bf83c2;
$pale-purple:#d198d4;
// interpretations in app
$primary_color: $ugly-purple;
$secondary_color: $lavender-pink;
@ -23,7 +23,7 @@ $logo_color_2: $camo;
$choice_select_border_color: $cool-grey;
$hover-color:$warm-grey;
$clicked-color:$wisteria;
$mini-button-color:$pale-purple;
// FONT
$default_font : "pt_sans";
$title_font: "proza_libre";