From 34697b1a558b90fb30e13d9a4197c3e61f2d3f52 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Wed, 11 Nov 2020 21:01:58 +0100 Subject: [PATCH] Adding user edit component --- .../archiva-web/src/app/app-routing.module.ts | 2 + .../main/archiva-web/src/app/app.module.ts | 2 + .../manage-users-edit.component.html | 83 +++++++++++++++++++ .../manage-users-edit.component.scss | 18 ++++ .../manage-users-edit.component.spec.ts | 43 ++++++++++ .../manage-users-edit.component.ts | 38 +++++++++ 6 files changed, 186 insertions(+) create mode 100644 archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.html create mode 100644 archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.scss create mode 100644 archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.spec.ts create mode 100644 archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.ts diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts index 9f1249e7b..eed0365a7 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts @@ -32,6 +32,7 @@ import {ManageRolesComponent} from "./modules/user/manage-roles/manage-roles.com import {SecurityConfigurationComponent} from "./modules/user/security-configuration/security-configuration.component"; import {ManageUsersListComponent} from "./modules/user/users/manage-users-list/manage-users-list.component"; import {ManageUsersAddComponent} from "./modules/user/users/manage-users-add/manage-users-add.component"; +import {ManageUsersEditComponent} from "./modules/user/users/manage-users-edit/manage-users-edit.component"; const routes: Routes = [ { path: '', component: HomeComponent, @@ -47,6 +48,7 @@ const routes: Routes = [ children: [ {path: 'list', component: ManageUsersListComponent}, {path: 'add', component: ManageUsersAddComponent}, + {path: 'edit/:userid', component: ManageUsersEditComponent}, {path: '', redirectTo:'list', pathMatch:'full'} ] }, diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app.module.ts b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app.module.ts index f3ddcc7f9..6b7d2c4bb 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app.module.ts +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app.module.ts @@ -45,6 +45,7 @@ import { NgbPaginationModule, NgbTooltipModule} from "@ng-bootstrap/ng-bootstrap import { PaginatedEntitiesComponent } from './modules/general/paginated-entities/paginated-entities.component'; import { SortedTableHeaderComponent } from './modules/general/sorted-table-header/sorted-table-header.component'; import { SortedTableHeaderRowComponent } from './modules/general/sorted-table-header-row/sorted-table-header-row.component'; +import { ManageUsersEditComponent } from './modules/user/users/manage-users-edit/manage-users-edit.component'; @NgModule({ @@ -69,6 +70,7 @@ import { SortedTableHeaderRowComponent } from './modules/general/sorted-table-he PaginatedEntitiesComponent, SortedTableHeaderComponent, SortedTableHeaderRowComponent, + ManageUsersEditComponent, ], imports: [ BrowserModule, diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.html b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.html new file mode 100644 index 000000000..c70355ad2 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.html @@ -0,0 +1,83 @@ + + +
+
+ + + {{'users.input.small.user_id'|translate:{'minSize':this.minUserIdSize} }} +
+
+ + + {{'users.input.small.full_name'|translate}} +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+
+ +
+ + + + +
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.scss b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.scss new file mode 100644 index 000000000..343c3b1c0 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.scss @@ -0,0 +1,18 @@ +/*! + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.spec.ts b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.spec.ts new file mode 100644 index 000000000..f21a49f32 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.spec.ts @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ManageUsersEditComponent } from './manage-users-edit.component'; + +describe('ManageUsersEditComponent', () => { + let component: ManageUsersEditComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ManageUsersEditComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ManageUsersEditComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.ts b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.ts new file mode 100644 index 000000000..5d55089f9 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.ts @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +@Component({ + selector: 'app-manage-users-edit', + templateUrl: './manage-users-edit.component.html', + styleUrls: ['./manage-users-edit.component.scss'] +}) +export class ManageUsersEditComponent implements OnInit { + + userid; + + constructor(private route: ActivatedRoute) { + this.route.params.subscribe(params => this.userid=params.userid); + } + + ngOnInit(): void { + } + +} -- 2.39.5