Commit cfccdca9 authored by lanpodder's avatar lanpodder

neuer versuch alles zu pushen

parent 71ed431c
......@@ -13,7 +13,7 @@ import { TempDevComponent } from './portal/temp-dev/temp-dev.component';
import { ContactComponent } from './home/contact';
import { PrivacypolicyComponent } from './home/privacypolicy';
import { BliComponent } from './portal/bli/bli.component';
import { CategoryComponent } from './portal/category/category.component';
import { CategoryComponent } from './widgets/entry/category/category.component';
import { CreateEntryComponent } from './portal/create-entry/create-entry.component';
import { HelpComponent } from './portal/help/help.component';
import { ErrorComponent } from './error';
......
......@@ -40,7 +40,7 @@ import { ContactComponent } from './home/contact/contact.component';
import { ContributeComponent } from './home/contribute/contribute.component';
import { BliComponent } from './portal/bli/bli.component';
import { BliCheckComponent } from './portal/bli-check/bli-check.component';
import { CategoryComponent } from './portal/category/category.component';
import { CategoryComponent } from './widgets/entry/category/category.component';
import { ComposeMessageComponent } from './messaging/compose-message/compose-message.component';
import { CreateEntryComponent } from './portal/create-entry/create-entry.component';
import { ErrorComponent } from './error/error.component';
......@@ -67,9 +67,11 @@ import { NetworkpartnerComponent } from './widgets/entry/networkpartner/networkp
import { OsminformationComponent } from './widgets/entry/osminformation/osminformation.component';
import { GoodplaceComponent } from './widgets/entry/goodplace/goodplace.component';
import { EditsourceComponent } from './widgets/modals/editsource/editsource.component';
import { DatenexportSeiteComponent } from './datenexport-seite/datenexport-seite.component';
import { QuellenAngabeComponent } from './widgets/entry/quellen-angabe/quellen-angabe.component';
import { DatenexportSeiteComponent } from './datenexport-seite/datenexport-seite.component';
import { QuellenAngabeComponent } from './widgets/entry/quellen-angabe/quellen-angabe.component';
import { FormcontrolBlockComponent } from './home/contact/formcontrol-block/formcontrol-block.component';
import { MenubarItemComponent } from './menubar/menubar-item/menubar-item.component';
import { BliIconComponent } from './portal/bli/bli-icon/bli-icon.component';
enableProdMode();
......@@ -129,6 +131,8 @@ enableProdMode();
DatenexportSeiteComponent,
QuellenAngabeComponent,
FormcontrolBlockComponent,
MenubarItemComponent,
BliIconComponent,
//MatAutocompleteModule,
],
imports: [
......
......@@ -16,9 +16,8 @@
{{exportFieldItems[i].name}}
</label>
</div>
<h2 style="margin-top: 20px; margin-bottom: 20px">2. Wähle ein Dateiformat.</h2>
<div class="btn-group btn-group-toggle" style="width: 100%">
<label [ngClass]="csv.checked ? 'btn btn-outline-success active' : 'btn btn-outline-success'">
<input type="radio" #csv value="CSV" formControlName="formatFields">
......
......@@ -15,7 +15,7 @@ export class ContactComponent implements OnInit {
email: ['', Validators.required],
betreff: ['', Validators.required],
nachricht: ['', Validators.required],
datenschutz: ['', Validators.required],
datenschutz: ['', Validators.requiredTrue],
newsletter: ['']
});
constructor(private fb: FormBuilder) { }
......
<li class="nav-item">
<a class="nav-link" routerLink="{{routeGoal}}" routerLinkActive="active" href="#">
<ng-content></ng-content>
<span class="caret"></span>
</a>
</li>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MenubarItemComponent } from './menubar-item.component';
describe('MenubarItemComponent', () => {
let component: MenubarItemComponent;
let fixture: ComponentFixture<MenubarItemComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MenubarItemComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MenubarItemComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-menubar-item',
templateUrl: './menubar-item.component.html',
styleUrls: ['./menubar-item.component.css']
})
export class MenubarItemComponent implements OnInit {
@Input() routeGoal: string;
constructor() { }
ngOnInit() {
}
}
......@@ -8,30 +8,18 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" routerLink="search" routerLinkActive="active" href="#">
Karte
<span class="caret"></span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" routerLink="home" routerLinkActive="active" href="#">
&Uuml;ber das Projekt
<span class="caret"></span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" routerLink="contribute" routerLinkActive="active" href="#">
Mitwirken
<span class="caret"></span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" routerLink="/export"> <!--href="{{apiService.apiURL}}/GeoElements/EdgeList"-->
Datenexport
<span class="caret"></span>
</a>
</li>
<app-menubar-item [routeGoal]="'search'">
Karte
</app-menubar-item>
<app-menubar-item [routeGoal]="'home'">
&Uuml;ber das Projekt
</app-menubar-item>
<app-menubar-item [routeGoal]="'contribute'">
Mitwirken
</app-menubar-item>
<app-menubar-item [routeGoal]="'export'">
Datenexport
</app-menubar-item>
</ul>
<ul class="navbar-nav navbar-right">
......
li {
list-style: none;
display:block;
}
i {
width: 32px;
font-size: 14px;
display: inline-block;
text-align: right;
margin-right: 10px;
}
.bliicon label {
margin-left: 15px;
}
.bliicon {
background-position:15px 3px;
display: flex;
flex-wrap: wrap;
}
.bliicon2{
background-position: left;
}
.bliicon2 div {
margin-left:25px;
}
.bli-check {
margin-top: 10px;
}
<div class="list-group-item">
<div class="bliicon2 bliicon-housing">
<div *ngIf="displayType=='icons_and_labels'">
<ng-content></ng-content>
</div>
</div>
</div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BliIconComponent } from './bli-icon.component';
describe('BliIconComponent', () => {
let component: BliIconComponent;
let fixture: ComponentFixture<BliIconComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BliIconComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BliIconComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-bli-icon',
templateUrl: './bli-icon.component.html',
styleUrls: ['./bli-icon.component.css']
})
export class BliIconComponent implements OnInit {
@Input() displayType: string;
constructor() { }
ngOnInit() {
}
}
......@@ -2,127 +2,93 @@
<!-- liste / default -->
<ul class="bli-list" *ngIf="displayType=='default' || !displayType">
<li *ngFor="let dimension of bliService.dimensions"><i
[ngClass]="bliService.getIcon(dimension.name)"></i> <span
title="{{dimension.description}}">{{dimension.name}}</span> <a
*ngIf="authService.profileRetrieved && authService.currentUser.isAdmin"></a>
<li *ngFor="let dimension of bliService.dimensions"><i [ngClass]="bliService.getIcon(dimension.name)"></i> <span
title="{{dimension.description}}">{{dimension.name}}</span> <a
*ngIf="authService.profileRetrieved && authService.currentUser.isAdmin"></a>
</li>
</ul>
<!-- Icons (alle dimensionen von node)-->
<div *ngIf="displayType=='icons' || displayType=='icons_and_labels'"
class="bli-icons">
<div *ngIf="displayType=='icons' || displayType=='icons_and_labels'" class="bli-icons">
<div class="list-group">
<div *ngIf="hasDimension(node,'Wohnbedingungen')"
class="list-group-item">
<div class="bliicon2 bliicon-housing">
<div *ngIf="displayType=='icons_and_labels'">Wohnbedingungen</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Gemeinschaft')"
class="list-group-item">
<div class="bliicon2 bliicon-community">
<div *ngIf="displayType=='icons_and_labels'">Gemeinschaft</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Bildung')" class="list-group-item">
<div class="bliicon2 bliicon-education">
<div *ngIf="displayType=='icons_and_labels'">Bildung</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Gesundheit')" class="list-group-item">
<div class="bliicon2 bliicon-health">
<div *ngIf="displayType=='icons_and_labels'">Gesundheit</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Einkommen')" class="list-group-item">
<div class="bliicon2 bliicon-income">
<div *ngIf="displayType=='icons_and_labels'">Einkommen</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Infrastruktur')"
class="list-group-item">
<div class="bliicon2 bliicon-infrastructure">
<div *ngIf="displayType=='icons_and_labels'">Infrastruktur</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Freizeit und Kultur')"
class="list-group-item">
<div class="bliicon2 bliicon-leisure">
<div *ngIf="displayType=='icons_and_labels'">Freizeit und Kultur</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Umwelt')" class="list-group-item">
<div class="bliicon2 bliicon-nature">
<div *ngIf="displayType=='icons_and_labels'">Umwelt</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Zufriedenheit')"
class="list-group-item">
<div class="bliicon2 bliicon-satisfaction">
<div *ngIf="displayType=='icons_and_labels'">Zufriedenheit</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Sicherheit')" class="list-group-item">
<div class="bliicon2 bliicon-security">
<div *ngIf="displayType=='icons_and_labels'">Sicherheit</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Arbeit')" class="list-group-item">
<div class="bliicon2 bliicon-work">
<div *ngIf="displayType=='icons_and_labels'">Arbeit</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Engagement/Beteiligung')"
class="list-group-item">
<div class="bliicon2 bliicon-engagement">
<div *ngIf="displayType=='icons_and_labels'">Engagement / Beteiligung</div>
</div>
</div>
<div *ngIf="hasDimension(node,'Work-Life-Balance')"
class="list-group-item">
<div class="bliicon2 bliicon-wlbalance">
<div *ngIf="displayType=='icons_and_labels'">Work-Life-Balance</div>
</div>
</div>
<app-bli-icon *ngIf="hasDimension(node,'Wohnbedingungen')" [displayType]="displayType">
Wohnbedingungen
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Gemeinschaft')" [displayType]="displayType">
Gemeinschaft
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Bildung')" [displayType]="displayType">
Bildung
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Gesundheit')" [displayType]="displayType">
Gesundheit
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Einkommen')" [displayType]="displayType">
Einkommen
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Infrastruktur')" [displayType]="displayType">
Infrastruktur
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Freizeit und Kultur')" [displayType]="displayType">
Freizeit und Kultur
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Umwelt')" [displayType]="displayType">
Umwelt
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Zufriedenheit')" [displayType]="displayType">
Zufriedenheit
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Sicherheit')" [displayType]="displayType">
Sicherheit
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Arbeit')" [displayType]="displayType">
Arbeit
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Engagement/Beteiligung')" [displayType]="displayType">
Engagement/Beteiligung
</app-bli-icon>
<app-bli-icon *ngIf="hasDimension(node,'Work-Life-Balance')" [displayType]="displayType">
Work-Life-Balance
</app-bli-icon>
</div>
</div>
<!-- Checkboxen / Alle Dimensionen / Auf node-->
<div *ngIf="displayType=='checkboxes'" class="bli-checkboxes">
<div *ngFor="let dimension of bliService.dimensions">
<input (change)="node.toggleDimension(dimension)" [checked]="hasDimension(node,dimension.name)" type="checkbox">
<input (change)="node.toggleDimension(dimension)" [checked]="hasDimension(node,dimension.name)"
type="checkbox">
<label class="checklabel">{{dimension.name}}</label>
</div>
</div>
<!-- Checkboxen / Alle Dimensionen ohne icons / Auf node-->
<div *ngIf="displayType=='checkboxes_non_icons'" class="bli-checkboxes">
<div class="form-check" *ngFor="let dimension of bliService.dimensions">
<input (change)="node.toggleDimension(dimension)" [checked]="hasDimension(node,dimension.name)" class="form-check-input" type="checkbox" value="" id="defaultCheck2" checked disabled>
<label class="form-check-label checklabel" for="defaultCheck2">
{{dimension.name}}
</label>
</div>
<div class="form-check" *ngFor="let dimension of bliService.dimensions">
<input (change)="node.toggleDimension(dimension)" [checked]="hasDimension(node,dimension.name)"
class="form-check-input" type="checkbox" value="" id="defaultCheck2" checked disabled>
<label class="form-check-label checklabel" for="defaultCheck2">
{{dimension.name}}
</label>
</div>
</div>
<!-- Checkboxen / Alle Dimensionen / Auf node-->
<div *ngIf="displayType=='checkboxes_icons'" class="bli-checkboxes">
<div *ngFor="let dimension of bliService.dimensions" [ngClass]="bliService.getIconClass(dimension.name)" class="">
<input class="bli-check"(change)="node.toggleDimension(dimension)" [checked]="hasDimension(node,dimension.name)" type="checkbox">
<div *ngFor="let dimension of bliService.dimensions" [ngClass]="bliService.getIconClass(dimension.name)"
class="">
<input class="bli-check" (change)="node.toggleDimension(dimension)"
[checked]="hasDimension(node,dimension.name)" type="checkbox">
<label class="checklabel col col-form-label">{{dimension.name}}</label>
</div>
</div>
<!-- Checkboxen-Liste f�r die Filter / Auf array / alle dimensionen-->
<div *ngIf="displayType=='checkboxesArray' && dimensions"
class="bli-checkboxes">
<div *ngIf="displayType=='checkboxesArray' && dimensions" class="bli-checkboxes">
<div *ngFor="let dimension of bliService.dimensions">
<label class="dimension-name">{{dimension.name}}</label> <input
(change)="toggleDimensionOnOutputArray(dimension)"
[checked]="dimensions.indexOf(dimension)>=0" type="checkbox">
(change)="toggleDimensionOnOutputArray(dimension)" [checked]="dimensions.indexOf(dimension)>=0"
type="checkbox">
</div>
</div>
......@@ -139,11 +105,12 @@
</div>
-->
<div *ngIf="displayType=='checkboxesArray_icons' && dimensions" class="list-group bli-checkboxes">
<div *ngFor="let dimension of bliService.dimensions"
[ngClass]="bliService.getIconClass(dimension.name)" class="list-group-item">
<div *ngFor="let dimension of bliService.dimensions" [ngClass]="bliService.getIconClass(dimension.name)"
class="list-group-item">
{{dimension.name}}
<label class="switch"><input type="checkbox" (change)="toggleDimensionOnOutputArray(dimension)" [checked]="dimensions.indexOf(dimension)>=0">
<span class="slider round"></span></label>
<label class="switch"><input type="checkbox" (change)="toggleDimensionOnOutputArray(dimension)"
[checked]="dimensions.indexOf(dimension)>=0">
<span class="slider round"></span></label>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -18,7 +18,8 @@
<strong>Angebote des Teilen und Schenkens</strong>
</label>
<div class="col-sm-8">
<textarea class="form-control" formControlName="sharing_offers" id="sharing_offers" rows="10" placeholder="Was wird an diesem Ort geteilt und/oder verschenkt? z. B. Bücher, Erfahrung/Kompetenz/Wissen, Geräte/Werkzeuge, Kleidung, Lebensmittel, Nutzflächen/Räume, Telekommunikation, Verkehrsmittel, Zeit, ..."></textarea>
<textarea class="form-control" (input)="sharingOffersFocus = true" formControlName="sharing_offers" id="sharing_offers" rows="10" placeholder="Was wird an diesem Ort geteilt und/oder verschenkt? z. B. Bücher, Erfahrung/Kompetenz/Wissen, Geräte/Werkzeuge, Kleidung, Lebensmittel, Nutzflächen/Räume, Telekommunikation, Verkehrsmittel, Zeit, ..."></textarea>
<app-quellen-angabe *ngIf="sharingOffersFocus" [control]="'sharing_offers_source'" [form]="form"></app-quellen-angabe>
</div>
</div>
<div class="form-group row">
......@@ -26,7 +27,8 @@
<strong>Organisator*in</strong>
</label>
<div class="col-sm-8">
<textarea class="form-control" id="sharing_organisator" formControlName="sharing_organisator" rows="10" placeholder="Wer organisiert das Angebot/die Angebote jeweils?"></textarea>
<textarea class="form-control" (input)="sharingOrganisatorFocus = true" id="sharing_organisator" formControlName="sharing_organisator" rows="10" placeholder="Wer organisiert das Angebot/die Angebote jeweils?"></textarea>
<app-quellen-angabe *ngIf="sharingOrganisatorFocus" [control]="'sharing_organisator_source'" [form]="form"></app-quellen-angabe>
</div>
</div>
<div class="form-group row">
......@@ -34,7 +36,8 @@
<strong>Kostenfreie Angebote</strong>
</label>
<div class="col-sm-8">
<textarea formControlName="sharing_free_offers" class="form-control" id="sharing_free_offers" rows="10" placeholder="Welches Angebot ist bzw. welche Angebote sind kostenfrei?"></textarea>
<textarea formControlName="sharing_free_offers" (input)="sharingFreeOffersFocus = true" class="form-control" id="sharing_free_offers" rows="10" placeholder="Welches Angebot ist bzw. welche Angebote sind kostenfrei?"></textarea>
<app-quellen-angabe *ngIf="sharingFreeOffersFocus" [control]="'sharing_free_offers_source'" [form]="form"></app-quellen-angabe>
</div>
</div>
<div class="form-group row">
......@@ -42,7 +45,8 @@
<strong>Kostenpflichtige Angebote</strong>
</label>
<div class="col-sm-8">
<textarea class="form-control" id="sharing_nonfree_offers" rows="10" placeholder="Welches Angebot kostet bzw. welche Angebote kosten wie viel?" formControlName="sharing_nonfree_offers"></textarea>
<textarea class="form-control" (input)="sharingNonFreeOffersFocus = true" id="sharing_nonfree_offers" rows="10" placeholder="Welches Angebot kostet bzw. welche Angebote kosten wie viel?" formControlName="sharing_nonfree_offers"></textarea>
<app-quellen-angabe *ngIf="sharingNonFreeOffersFocus" [control]="'sharing_nonfree_offers_source'" [form]="form"></app-quellen-angabe>
</div>
</div>
<!-- Kategorie -->
......@@ -72,7 +76,8 @@
<strong>Angebote zum Thema nachhaltige Ernährung</strong>
</label>
<div class="col-sm-8">
<textarea formControlName="sustainable_nutrition" class="form-control" id="sustainable_nutrition" rows="10" placeholder="Welches Angebot kostet bzw. welche Angebote kosten wie viel?"></textarea>
<textarea formControlName="sustainable_nutrition" (input)="sustainableNutritionFocus = true" class="form-control" id="sustainable_nutrition" rows="10" placeholder="Welches Angebot kostet bzw. welche Angebote kosten wie viel?"></textarea>
<app-quellen-angabe *ngIf="sustainableNutritionFocus" [control]="'sustainable_nutrition_source'" [form]="form"></app-quellen-angabe>
</div>
</div>
<div class="form-group row">
......@@ -80,7 +85,8 @@
<strong>Sortiment</strong>
</label>
<div class="col-sm-8">
<textarea class="form-control" formControlName="sustainable_nutrition_assortment" id="sustainable_nutrition_assortment" rows="10" placeholder="Was für Produkte werden angeboten? z. B. Eier, Fleisch, Gemüse, Getreide, Heu, Honig, Käse, Milch, Mist, Obst, Saatgut, Saft, Spirituosen, Stroh, Wild, ..."></textarea>
<textarea class="form-control" (input)="sustainableNutritionAssortmentFocus = true" formControlName="sustainable_nutrition_assortment" id="sustainable_nutrition_assortment" rows="10" placeholder="Was für Produkte werden angeboten? z. B. Eier, Fleisch, Gemüse, Getreide, Heu, Honig, Käse, Milch, Mist, Obst, Saatgut, Saft, Spirituosen, Stroh, Wild, ..."></textarea>
<app-quellen-angabe *ngIf="sustainableNutritionAssortmentFocus" [control]="'sustainable_nutrition_assortment_source'" [form]="form"></app-quellen-angabe>
</div>
</div>
......
import { Component, OnInit, Input } from '@angular/core';
import { FormsModule ,FormBuilder, ReactiveFormsModule, FormGroup, Validators } from '@angular/forms';
import { GeoportalApiService } from '../../services/geoportal-api.service';
import { LogService } from '../../services/log.service';
import { AuthService } from '../../services/auth.service';
import { CacheService } from '../../services/cache.service';
import { Category } from '../../models/Category';
import { GeoportalApiService } from '../../../services/geoportal-api.service';
import { LogService } from '../../../services/log.service';
import { AuthService } from '../../../services/auth.service';
import { CacheService } from '../../../services/cache.service';
import { Category } from '../../../models/Category';
import { isArray } from 'util';
import { OsmNode } from '../../models/OsmNode';
//import { FormsModule ,FormBuilder, ReactiveFormsModule, FormGroup, Validators } from '@angular/forms';
import { OsmNode } from '../../../models/OsmNode';
@Component({
selector: 'app-category',
......@@ -17,7 +16,7 @@ import { OsmNode } from '../../models/OsmNode';
export class CategoryComponent implements OnInit {
@Input('node') node : OsmNode;
@Input('form') form : FormGroup;
//@Input('form') form : FormGroup;
categories : Array<Category>;
sharingCollapsed = true;
sustCollapsed = true;
......
......@@ -11,4 +11,4 @@
<input type="radio" name="{{control}}" value="erhebung" formControlName="{{control}}">
Das ist ein Ergebnis einer (wissenschaftlichen) Erhebung.
</label>
</div>
</div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment