From fa106a46c977600ef9f5ed43d7086f2433d7fe29 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Tue, 14 Aug 2018 12:55:45 +0200 Subject: [PATCH] More dynamic Motion-Detail metainfo * Adjust login page * Rework legal notice and pp * Add more custom animations * Add Router to navigation panel --- client/src/app/shared/animations.ts | 28 ++++++- .../legal-notice.dialog.component.html | 9 --- .../legal-notice.dialog.component.ts | 15 ---- .../privacy-policy.dialog.component.css | 0 .../privacy-policy.dialog.component.html | 40 ---------- .../privacy-policy.dialog.component.ts | 15 ---- .../src/app/shared/models/motions/motion.ts | 11 ++- client/src/app/shared/shared.module.ts | 6 +- .../legal-notice/legal-notice.component.html | 16 ++++ .../legal-notice/legal-notice.component.scss | 9 +++ .../legal-notice.component.spec.ts} | 12 +-- .../legal-notice/legal-notice.component.ts | 12 +++ .../src/app/site/login/login.component.scss | 7 +- .../motion-detail.component.html | 77 +++++++++++++++---- .../motion-detail.component.scss | 24 ++++++ .../motion-detail/motion-detail.component.ts | 2 + .../privacy-policy.component.html | 27 +++++++ .../privacy-policy.component.scss} | 0 .../privacy-policy.component.spec.ts} | 12 +-- .../privacy-policy.component.ts | 12 +++ client/src/app/site/site-routing.module.ts | 4 + client/src/app/site/site.component.html | 27 ++++--- client/src/app/site/site.component.ts | 16 ---- client/src/app/site/site.module.ts | 4 +- 24 files changed, 243 insertions(+), 142 deletions(-) delete mode 100644 client/src/app/shared/components/legal-notice/legal-notice.dialog.component.html delete mode 100644 client/src/app/shared/components/legal-notice/legal-notice.dialog.component.ts delete mode 100644 client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.css delete mode 100644 client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.html delete mode 100644 client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.ts create mode 100644 client/src/app/site/legal-notice/legal-notice.component.html create mode 100644 client/src/app/site/legal-notice/legal-notice.component.scss rename client/src/app/{shared/components/legal-notice/legal-notice.dialog.component.spec.ts => site/legal-notice/legal-notice.component.spec.ts} (51%) create mode 100644 client/src/app/site/legal-notice/legal-notice.component.ts create mode 100644 client/src/app/site/privacy-policy/privacy-policy.component.html rename client/src/app/{shared/components/legal-notice/legal-notice.dialog.component.css => site/privacy-policy/privacy-policy.component.scss} (100%) rename client/src/app/{shared/components/privacy-policy/privacy-policy.dialog.component.spec.ts => site/privacy-policy/privacy-policy.component.spec.ts} (50%) create mode 100644 client/src/app/site/privacy-policy/privacy-policy.component.ts diff --git a/client/src/app/shared/animations.ts b/client/src/app/shared/animations.ts index 240014da3..dd39ed537 100644 --- a/client/src/app/shared/animations.ts +++ b/client/src/app/shared/animations.ts @@ -1,10 +1,12 @@ -import { trigger, animate, transition, style, query, stagger, group, state } from '@angular/animations'; +import { trigger, animate, transition, style, query, stagger, group, state, sequence } from '@angular/animations'; export const pageTransition = trigger('pageTransition', [ transition('* => *', [ /** keep the dom clean - let all items "just" enter */ query(':enter mat-card', [style({ opacity: 0 })], { optional: true }), query(':enter .on-transition-fade', [style({ opacity: 0 })], { optional: true }), + query(':enter mat-row', [style({ opacity: 0 })], { optional: true }), + query(':enter mat-expansion-panel', [style({ opacity: 0 })], { optional: true }), /** parallel vanishing */ group([ @@ -15,6 +17,12 @@ export const pageTransition = trigger('pageTransition', [ /** how the material cards are leaving */ query(':leave mat-card', [style({ opacity: 1 }), animate('0.2s', style({ opacity: 0 }))], { optional: true + }), + query(':leave mat-row', [style({ opacity: 1 }), animate('0.2s', style({ opacity: 0 }))], { + optional: true + }), + query(':leave mat-expansion-panel', [style({ opacity: 1 }), animate('0.2s', style({ opacity: 0 }))], { + optional: true }) ]), @@ -33,6 +41,24 @@ export const pageTransition = trigger('pageTransition', [ animate('300ms ease-in-out', style({ transform: 'translateY(0px)', opacity: 1 })) ]), { optional: true } + ), + query( + ':enter mat-row', + /** stagger = "one after another" with a distance of 50ms" */ + stagger(30, [ + style({ transform: 'translateY(24px)' }), + animate('200ms ease-in-out', style({ transform: 'translateY(0px)', opacity: 1 })) + ]), + { optional: true } + ), + query( + ':enter mat-expansion-panel', + /** stagger = "one after another" with a distance of 50ms" */ + stagger(100, [ + style({ transform: 'translateY(50px)' }), + animate('300ms ease-in-out', style({ transform: 'translateY(0px)', opacity: 1 })) + ]), + { optional: true } ) ]) ]) diff --git a/client/src/app/shared/components/legal-notice/legal-notice.dialog.component.html b/client/src/app/shared/components/legal-notice/legal-notice.dialog.component.html deleted file mode 100644 index 600cb90eb..000000000 --- a/client/src/app/shared/components/legal-notice/legal-notice.dialog.component.html +++ /dev/null @@ -1,9 +0,0 @@ -

Impressum

- - OpenSlides ist ein freies, webbasiertes Präsentations- und Versammlungssystem zur Darstellung und Steuerung von Tagesordnung, - Anträgen und Wahlen einer Versammlung. - -
- - OpenSlides 3.0 PRE ALPHA (Lizenz: MIT) - \ No newline at end of file diff --git a/client/src/app/shared/components/legal-notice/legal-notice.dialog.component.ts b/client/src/app/shared/components/legal-notice/legal-notice.dialog.component.ts deleted file mode 100644 index a6d82d3e5..000000000 --- a/client/src/app/shared/components/legal-notice/legal-notice.dialog.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component } from '@angular/core'; -import { MatDialogRef } from '@angular/material'; - -@Component({ - selector: 'app-impressum', - templateUrl: './legal-notice.dialog.component.html', - styleUrls: ['./legal-notice.dialog.component.css'] -}) -export class LegalnoticeDialogComponent { - constructor(public dialogRef: MatDialogRef) {} - - onNoClick(): void { - this.dialogRef.close(); - } -} diff --git a/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.css b/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.html b/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.html deleted file mode 100644 index 793b33ff5..000000000 --- a/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.html +++ /dev/null @@ -1,40 +0,0 @@ -

Datenschutzerklärung

- - OpenSlides speichert nur so viele personenbezogene Daten wie unbedingt nötig sind, um Besuchern Informationen und Dienste - zuverlässig und sicher anbieten zu können. - -
- - Eine Auswertung der Dienste-Protokolle erfolgt nur von uns selbst und auch nur, um mögliche Fehler, Einbruchsversuche oder - technisches Verhalten der Server auf unseren Server zu analysieren. - -
- - Nachfolgend wird genau aufgeschlüsselt, bei welcher Gelegenheit welche Daten wie lange gespeichert sind. Zudem wird beschrieben, - welche Schritte erforderlich sind um Daten zu löschen. - -
-

Cookies

- - Beim Besuch der Website wird ein sogenanntes Cookie angelegt. Dieses Cookie wird ausschließlich dazu verwendet, um auf der - Website eingeloggt zu bleiben. Ein sogenanntes "Tracking Cookie" wird nicht verwendet. - -
-

Logfiles

- - Zu OpenSlides gehören verschiedene Unter-Services. Diese loggen folgende Informationen: Quell-IP-Adresse, Zeitstempel, genutztes - Betriebssystem, verwendeter Web-Browser, Referer-URL, E-Mail-Adresse und besuchte Seite. - -
-

Datenbank

- - Als Mitglied werden folgende Daten von Ihnen gespeichert: Titel, Vorname, Nachname, EMail, Gliederungsebene, Teilnehmernummer, - Gruppenzugehörigkeit, Initiales Passwort im Klartext, Vergebenes Passwort als kryptografischer Hashwert und ein Kommentar - für interne Notizen. Diese Informationen werden mit den Aktionen innerhalb von OpenSlides in Verbindung gebracht. Diese - Informationen werden nicht an Dritte weiter gegeben und sind auch nicht für diese zugänglich. - -
-

Löschung von Daten

- - Die Daten dieser OpenSlides-Demo-Instanz werden nächtlich automatisch gelöscht. - \ No newline at end of file diff --git a/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.ts b/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.ts deleted file mode 100644 index f407db353..000000000 --- a/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component } from '@angular/core'; -import { MatDialogRef } from '@angular/material'; - -@Component({ - selector: 'app-privacy-policy.dialog', - templateUrl: './privacy-policy.dialog.component.html', - styleUrls: ['./privacy-policy.dialog.component.css'] -}) -export class PrivacyPolicyDialogComponent { - constructor(public dialogRef: MatDialogRef) {} - - onNoClick(): void { - this.dialogRef.close(); - } -} diff --git a/client/src/app/shared/models/motions/motion.ts b/client/src/app/shared/models/motions/motion.ts index 3a398df3b..955b76776 100644 --- a/client/src/app/shared/models/motions/motion.ts +++ b/client/src/app/shared/models/motions/motion.ts @@ -154,7 +154,16 @@ export class Motion extends BaseModel { const workflowId = +motionsWorkflowConfig.value; //get the workflow for out motion const selectedWorkflow = this.DS.get(Workflow, workflowId) as Workflow; - return selectedWorkflow.getStateNameById(this.state_id); + const stateName = selectedWorkflow.getStateNameById(this.state_id); + if (stateName !== 'NULL') { + return stateName; + } else { + return ''; + } + } + + get possibleStates() { + return ''; } /** diff --git a/client/src/app/shared/shared.module.ts b/client/src/app/shared/shared.module.ts index 61e1c82dc..886a37795 100644 --- a/client/src/app/shared/shared.module.ts +++ b/client/src/app/shared/shared.module.ts @@ -32,9 +32,6 @@ import { TranslateModule } from '@ngx-translate/core'; // directives import { OsPermsDirective } from './directives/os-perms.directive'; import { DomChangeDirective } from './directives/dom-change.directive'; -import { LegalnoticeDialogComponent } from './components/legal-notice/legal-notice.dialog.component'; -import { PrivacyPolicyDialogComponent } from './components/privacy-policy/privacy-policy.dialog.component'; -// import { CdkTableModule } from '@angular/cdk/table'; library.add(fas); @@ -91,7 +88,6 @@ library.add(fas); TranslateModule, OsPermsDirective ], - declarations: [OsPermsDirective, DomChangeDirective, LegalnoticeDialogComponent, PrivacyPolicyDialogComponent], - entryComponents: [LegalnoticeDialogComponent, PrivacyPolicyDialogComponent] + declarations: [OsPermsDirective, DomChangeDirective] }) export class SharedModule {} diff --git a/client/src/app/site/legal-notice/legal-notice.component.html b/client/src/app/site/legal-notice/legal-notice.component.html new file mode 100644 index 000000000..f3ee69cc0 --- /dev/null +++ b/client/src/app/site/legal-notice/legal-notice.component.html @@ -0,0 +1,16 @@ + + Legal Notice + + + +
+ + +
+ OpenSlides 3.0 PRE ALPHA (Lizenz: MIT) +
+
+
\ No newline at end of file diff --git a/client/src/app/site/legal-notice/legal-notice.component.scss b/client/src/app/site/legal-notice/legal-notice.component.scss new file mode 100644 index 000000000..f42a956f5 --- /dev/null +++ b/client/src/app/site/legal-notice/legal-notice.component.scss @@ -0,0 +1,9 @@ +.legal-notice-text { + display: block; + padding-bottom: 20px; +} + +.version-text { + display: block; + padding-top: 20px; +} diff --git a/client/src/app/shared/components/legal-notice/legal-notice.dialog.component.spec.ts b/client/src/app/site/legal-notice/legal-notice.component.spec.ts similarity index 51% rename from client/src/app/shared/components/legal-notice/legal-notice.dialog.component.spec.ts rename to client/src/app/site/legal-notice/legal-notice.component.spec.ts index cc847b209..8af551138 100644 --- a/client/src/app/shared/components/legal-notice/legal-notice.dialog.component.spec.ts +++ b/client/src/app/site/legal-notice/legal-notice.component.spec.ts @@ -1,19 +1,19 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { LegalnoticeDialogComponent } from './legal-notice.dialog.component'; +import { LegalNoticeComponent } from './legal-notice.component'; -describe('LegalnoticeDialogComponent', () => { - let component: LegalnoticeDialogComponent; - let fixture: ComponentFixture; +describe('LegalNoticeComponent', () => { + let component: LegalNoticeComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [LegalnoticeDialogComponent] + declarations: [LegalNoticeComponent] }).compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(LegalnoticeDialogComponent); + fixture = TestBed.createComponent(LegalNoticeComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/client/src/app/site/legal-notice/legal-notice.component.ts b/client/src/app/site/legal-notice/legal-notice.component.ts new file mode 100644 index 000000000..b03752401 --- /dev/null +++ b/client/src/app/site/legal-notice/legal-notice.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-legal-notice', + templateUrl: './legal-notice.component.html', + styleUrls: ['./legal-notice.component.scss'] +}) +export class LegalNoticeComponent implements OnInit { + constructor() {} + + ngOnInit() {} +} diff --git a/client/src/app/site/login/login.component.scss b/client/src/app/site/login/login.component.scss index 67b0f46ac..7a5b318ed 100644 --- a/client/src/app/site/login/login.component.scss +++ b/client/src/app/site/login/login.component.scss @@ -9,6 +9,7 @@ mat-form-field { margin-left: auto; margin-right: auto; width: 90%; + max-width: 400px; } } @@ -26,8 +27,8 @@ mat-form-field { } .form-wrapper { - padding-left: 15px; - padding-right: 15px; + padding-left: 30px; + padding-right: 30px; mat-spinner { position: absolute; @@ -41,5 +42,5 @@ mat-form-field { .login-form { padding-top: 60px; margin: 0 auto; - max-width: 600px; + max-width: 400px; } diff --git a/client/src/app/site/motions/motion-detail/motion-detail.component.html b/client/src/app/site/motions/motion-detail/motion-detail.component.html index 8ef118542..5437fb598 100644 --- a/client/src/app/site/motions/motion-detail/motion-detail.component.html +++ b/client/src/app/site/motions/motion-detail/motion-detail.component.html @@ -26,25 +26,62 @@
-

Submitters

- {{motion.submitterName}} +
+

Submitters

+ {{motion.submitterName}} +
-

Supporters

+
+

translate>Supporters

+ +
-

Status

- {{motion.stateName}} +
+

+ + Status + + +

+ {{motion.stateName}} +
-

{{motion.recomBy}}

- - {{motion.recommendation}} +
+

+ + {{motion.recomBy}} + + +

+ {{motion.recommendation}} +
-

Category

- {{motion.category}} +
+

+ + Category + + +

+ {{motion.category}} +
-

Origin

- {{motion.origin}} +
+

+ Origin + +

+ {{motion.origin}} -

Voting

+
+ + + +
+ +
+

Voting

+
@@ -72,4 +109,16 @@
- \ No newline at end of file + + + + + + + + + + + + + \ No newline at end of file diff --git a/client/src/app/site/motions/motion-detail/motion-detail.component.scss b/client/src/app/site/motions/motion-detail/motion-detail.component.scss index df125c158..9909432a8 100644 --- a/client/src/app/site/motions/motion-detail/motion-detail.component.scss +++ b/client/src/app/site/motions/motion-detail/motion-detail.component.scss @@ -21,12 +21,36 @@ mat-panel-title { .meta-info-panel { padding-top: 25px; + + a:hover { + cursor: pointer; + } + h3 { display: block; margin-top: 12px; //distance between heading and text margin-bottom: 3px; //distance between heading and text font-size: 80%; color: gray; + + fa-icon { + margin-left: 5px; + } + } + + mat-form-field { + margin-top: 12px; //distance between heading and text + } + + .mat-form-field-label { + font-size: 12pt; + color: gray; + } + + .mat-form-field-label-wrapper { + fa-icon { + margin-left: 5px; + } } .meta-info-panel-body { diff --git a/client/src/app/site/motions/motion-detail/motion-detail.component.ts b/client/src/app/site/motions/motion-detail/motion-detail.component.ts index 32d5a715e..409cb469c 100644 --- a/client/src/app/site/motions/motion-detail/motion-detail.component.ts +++ b/client/src/app/site/motions/motion-detail/motion-detail.component.ts @@ -27,6 +27,7 @@ export class MotionDetailComponent extends BaseComponent implements OnInit { if (newModel.id === +params.id) { this.motion = newModel as Motion; console.log('this.motion = ', this.motion); + // console.log('motion state name: ', this.motion.stateName); } } }); @@ -35,6 +36,7 @@ export class MotionDetailComponent extends BaseComponent implements OnInit { ngOnInit() { console.log('(init)the motion: ', this.motion); + console.log('motion state name: ', this.motion.stateName); } downloadSingleMotionButton() { diff --git a/client/src/app/site/privacy-policy/privacy-policy.component.html b/client/src/app/site/privacy-policy/privacy-policy.component.html new file mode 100644 index 000000000..ae8029831 --- /dev/null +++ b/client/src/app/site/privacy-policy/privacy-policy.component.html @@ -0,0 +1,27 @@ + + Privacy Policy + + + +
+ OpenSlides speichert nur so viele personenbezogene Daten wie unbedingt nötig sind, um Besuchern Informationen und Dienste + zuverlässig und sicher anbieten zu können. Eine Auswertung der Dienste-Protokolle erfolgt nur von uns selbst und + auch nur, um mögliche Fehler, Einbruchsversuche oder technisches Verhalten der Server auf unseren Server zu analysieren. + Eine Weitergabe von Teilen der erhobenen Daten erfolgt ausschließlich gemäß gesetzlicher Verpflichtung z.B. an Strafverfolgungs- + oder Steuerbehörden. Nachfolgend wird genau aufgeschlüsselt, bei welcher Gelegenheit welche Daten wie lange gespeichert + sind. Zudem wird beschrieben, welche Schritte erforderlich sind um Daten zu löschen. +

Cookies

+ Beim Besuch der Website wird ein sogenanntes Cookie angelegt. Dieses Cookie wird ausschließlich dazu verwendet, um auf der + Website eingeloggt zu bleiben. Ein sogenanntes "Tracking Cookie" wird nicht verwendet. +

Logfiles

+ Zu OpenSlides gehören verschiedene Unter-Services. Diese loggen folgende Informationen: Quell-IP-Adresse, Zeitstempel, genutztes + Betriebssystem, verwendeter Web-Browser, Referer-URL, E-Mail-Adresse und besuchte Seite. +

Database

+ Als Mitglied werden folgende Daten von Ihnen gespeichert: Titel, Vorname, Nachname, EMail, Gliederungsebene, Teilnehmernummer, + Gruppenzugehörigkeit, Initiales Passwort im Klartext, Vergebenes Passwort als kryptografischer Hashwert und ein Kommentar + für interne Notizen. Diese Informationen werden mit den Aktionen innerhalb von OpenSlides in Verbindung gebracht. + Diese Informationen werden nicht an Dritte weiter gegeben und sind auch nicht für diese zugänglich. +

Deleting Files

+ Die Daten dieser OpenSlides-Demo-Instanz werden nächtlich automatisch gelöscht. +
+
\ No newline at end of file diff --git a/client/src/app/shared/components/legal-notice/legal-notice.dialog.component.css b/client/src/app/site/privacy-policy/privacy-policy.component.scss similarity index 100% rename from client/src/app/shared/components/legal-notice/legal-notice.dialog.component.css rename to client/src/app/site/privacy-policy/privacy-policy.component.scss diff --git a/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.spec.ts b/client/src/app/site/privacy-policy/privacy-policy.component.spec.ts similarity index 50% rename from client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.spec.ts rename to client/src/app/site/privacy-policy/privacy-policy.component.spec.ts index 9bf6c06fe..3c7e07284 100644 --- a/client/src/app/shared/components/privacy-policy/privacy-policy.dialog.component.spec.ts +++ b/client/src/app/site/privacy-policy/privacy-policy.component.spec.ts @@ -1,19 +1,19 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { PrivacyPolicyDialogComponent } from './privacy-policy.dialog.component'; +import { PrivacyPolicyComponent } from './privacy-policy.component'; -describe('PrivacyPolicyDialogComponent', () => { - let component: PrivacyPolicyDialogComponent; - let fixture: ComponentFixture; +describe('PrivacyPolicyComponent', () => { + let component: PrivacyPolicyComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [PrivacyPolicyDialogComponent] + declarations: [PrivacyPolicyComponent] }).compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(PrivacyPolicyDialogComponent); + fixture = TestBed.createComponent(PrivacyPolicyComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/client/src/app/site/privacy-policy/privacy-policy.component.ts b/client/src/app/site/privacy-policy/privacy-policy.component.ts new file mode 100644 index 000000000..daad31004 --- /dev/null +++ b/client/src/app/site/privacy-policy/privacy-policy.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-privacy-policy', + templateUrl: './privacy-policy.component.html', + styleUrls: ['./privacy-policy.component.scss'] +}) +export class PrivacyPolicyComponent implements OnInit { + constructor() {} + + ngOnInit() {} +} diff --git a/client/src/app/site/site-routing.module.ts b/client/src/app/site/site-routing.module.ts index 815a90f64..e16d90ae1 100644 --- a/client/src/app/site/site-routing.module.ts +++ b/client/src/app/site/site-routing.module.ts @@ -4,6 +4,8 @@ import { Routes, RouterModule } from '@angular/router'; import { SiteComponent } from './site.component'; import { StartComponent } from './start/start.component'; +import { PrivacyPolicyComponent } from './privacy-policy/privacy-policy.component'; +import { LegalNoticeComponent } from './legal-notice/legal-notice.component'; // import { LoginComponent } from './login/login.component'; /** @@ -18,6 +20,8 @@ const routes: Routes = [ component: SiteComponent, children: [ { path: '', component: StartComponent }, + { path: 'legalnotice', component: LegalNoticeComponent }, + { path: 'privacypolicy', component: PrivacyPolicyComponent }, { path: 'agenda', loadChildren: './agenda/agenda.module#AgendaModule' }, { path: 'assignments', diff --git a/client/src/app/site/site.component.html b/client/src/app/site/site.component.html index 2b440e366..18a4f37c1 100644 --- a/client/src/app/site/site.component.html +++ b/client/src/app/site/site.component.html @@ -72,16 +72,29 @@ Settings + + + + Projector +