Add a first draft for community-edit-form
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@51078 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
b7cb9d221d
commit
cca564c3ba
|
@ -29,7 +29,6 @@ import { PageContentFormComponent } from "./pages/helpcontent/page-help-content-
|
||||||
import { EditPageHelpContentComponent } from "./pages/helpcontent/edit-page-help-content.component";
|
import { EditPageHelpContentComponent } from "./pages/helpcontent/edit-page-help-content.component";
|
||||||
import { CommunitiesComponent } from './pages/community/communities.component';
|
import { CommunitiesComponent } from './pages/community/communities.component';
|
||||||
import { CommunityFormComponent } from './pages/community/community-form.component';
|
import { CommunityFormComponent } from './pages/community/community-form.component';
|
||||||
import { CommunityEditFormComponent } from './pages/community/community-edit-form/community-edit-form.component';
|
|
||||||
import { EntitiesComponent } from "./pages/entity/entities.component";
|
import { EntitiesComponent } from "./pages/entity/entities.component";
|
||||||
import { EntityFormComponent } from "./pages/entity/entity-form.component";
|
import { EntityFormComponent } from "./pages/entity/entity-form.component";
|
||||||
import { DivIdsComponent } from "./pages/divId/divIds.component";
|
import { DivIdsComponent } from "./pages/divId/divIds.component";
|
||||||
|
@ -46,12 +45,14 @@ import {Meta} from './openaireLibrary/sharedComponents/metaService';
|
||||||
|
|
||||||
import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module';
|
import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module';
|
||||||
import {FeedbackModule} from './openaireLibrary/sharedComponents/feedback/feedback.module';
|
import {FeedbackModule} from './openaireLibrary/sharedComponents/feedback/feedback.module';
|
||||||
|
import {CommunityEditFormModule} from './pages/community/community-edit-form/community-edit-form.module';
|
||||||
|
|
||||||
import {FreeGuard} from './openaireLibrary/login/freeGuard.guard';
|
import {FreeGuard} from './openaireLibrary/login/freeGuard.guard';
|
||||||
import { AdminLoginGuard} from './openaireLibrary/login/adminLoginGuard.guard';
|
import { AdminLoginGuard} from './openaireLibrary/login/adminLoginGuard.guard';
|
||||||
import { ConnectAdminLoginGuard} from './openaireLibrary/login/connectAdminLoginGuard.guard';
|
import { ConnectAdminLoginGuard} from './openaireLibrary/login/connectAdminLoginGuard.guard';
|
||||||
import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
||||||
import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
||||||
import{ClaimsAdminModule} from './openaireLibrary/claims/claimsAdmin/claimsAdmin.module';
|
import {ClaimsAdminModule} from './openaireLibrary/claims/claimsAdmin/claimsAdmin.module';
|
||||||
import {StatsComponent} from "./pages/stats/stats.component";
|
import {StatsComponent} from "./pages/stats/stats.component";
|
||||||
//, , ErrorModule CookieLawModule
|
//, , ErrorModule CookieLawModule
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -67,7 +68,8 @@ import {StatsComponent} from "./pages/stats/stats.component";
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
// JWBootstrapSwitchModule,
|
// JWBootstrapSwitchModule,
|
||||||
CKEditorModule,
|
CKEditorModule,
|
||||||
BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule, ClaimsAdminModule
|
BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule, ClaimsAdminModule,
|
||||||
|
CommunityEditFormModule,
|
||||||
// , CookieLawModule, ErrorModule
|
// , CookieLawModule, ErrorModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -87,7 +89,6 @@ import {StatsComponent} from "./pages/stats/stats.component";
|
||||||
EditPageHelpContentComponent,
|
EditPageHelpContentComponent,
|
||||||
CommunitiesComponent,
|
CommunitiesComponent,
|
||||||
CommunityFormComponent,
|
CommunityFormComponent,
|
||||||
CommunityEditFormComponent,
|
|
||||||
EntitiesComponent,
|
EntitiesComponent,
|
||||||
EntityFormComponent,
|
EntityFormComponent,
|
||||||
DivIdsComponent,
|
DivIdsComponent,
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
<div id="community-edit-form " class="uk-container">
|
<div id="community-edit-form " class="uk-container">
|
||||||
<div class="entity-title uk-article-title">Edit your community</div>
|
<div class="entity-title uk-article-title">Edit your community</div>
|
||||||
|
<div *ngIf="communityId != null" >
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<p> Name: <input placeholder="OpenAIRE" type="text" class="uk-input uk-width-medium"/> </p>
|
<p> Name: <input placeholder="OpenAIRE" type="text" class="uk-input uk-width-medium"/> </p>
|
||||||
<p> Short Name: <input placeholder="shortName" type="text" class="uk-input uk-width-medium"/> </p>
|
<p> Short Name: <input placeholder="shortName" type="text" class="uk-input uk-width-medium"/> </p>
|
||||||
<p> Description: <input placeholder="description" type="text" class="uk-input uk-width-medium"/> </p>
|
<p> Description: <input placeholder="description" type="text" class="uk-input uk-width-medium"/> </p>
|
||||||
<p> Logo Url: <input placeholder="logoUrl" type="text" class="uk-input uk-width-medium"/></p>
|
<p> Logo Url: <input placeholder="logoUrl" type="text" class="uk-input uk-width-medium"/></p>
|
||||||
|
</div>
|
||||||
</div>
|
<progress id="js-progressbar" class="uk-progress" value="0" max="100" hidden></progress>
|
||||||
<progress id="js-progressbar" class="uk-progress" value="0" max="100" hidden></progress>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import {Component, OnInit, Input} from '@angular/core';
|
import {Component, OnInit, Input} from '@angular/core';
|
||||||
import {FormGroup, FormArray, FormBuilder, Validators} from "@angular/forms";
|
import {FormGroup, FormArray, FormBuilder, Validators} from "@angular/forms";
|
||||||
import { HelpContentService } from "../../../services/help-content.service";
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
|
import {HelpContentService} from "../../../services/help-content.service";
|
||||||
|
import {CommunityService} from "../../../openaireLibrary/connect/community/community.service";
|
||||||
|
import {EnvProperties} from '../../../openaireLibrary/utils/properties/env-properties';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'community-edit-form',
|
selector: 'community-edit-form',
|
||||||
|
@ -16,11 +20,35 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
|
|
||||||
public res=[];
|
public res=[];
|
||||||
|
|
||||||
constructor(public _fb: FormBuilder, private _helpContentService: HelpContentService){}
|
params: any;
|
||||||
|
|
||||||
|
public communityId = null;
|
||||||
|
public community = null;
|
||||||
|
public properties:EnvProperties = null;
|
||||||
|
|
||||||
|
constructor (private route: ActivatedRoute,
|
||||||
|
private _router: Router,
|
||||||
|
public _fb: FormBuilder,
|
||||||
|
private _helpContentService: HelpContentService,
|
||||||
|
private _communityService: CommunityService){ }
|
||||||
|
|
||||||
|
|
||||||
ngOnInit(){
|
ngOnInit() {
|
||||||
|
this.route.data .subscribe((data: { envSpecific: EnvProperties }) => {
|
||||||
|
this.properties = data.envSpecific;
|
||||||
|
this.route.queryParams.subscribe(
|
||||||
|
communityId => {
|
||||||
|
this.communityId = communityId['communityId'];
|
||||||
|
if (this.communityId != null) {
|
||||||
|
this._communityService.getCommunity(this.properties.communityAPI+this.communityId).subscribe (
|
||||||
|
community => {
|
||||||
|
this.community = community;
|
||||||
|
this.params = {community: encodeURIComponent('"'+community.queryId+'"')};
|
||||||
|
console.log(community);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public get form() {
|
public get form() {
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools/",
|
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools/",
|
||||||
|
|
||||||
"adminToolsCommunity" :"openaire",
|
"adminToolsCommunity" :"openaire",
|
||||||
|
"communityAPI": "https://dev-openaire.d4science.org/openaire/community/",
|
||||||
"csvLimit": 2000,
|
"csvLimit": 2000,
|
||||||
"pagingLimit": 20,
|
"pagingLimit": 20,
|
||||||
"resultsPerPage": 10,
|
"resultsPerPage": 10,
|
||||||
|
|
Loading…
Reference in New Issue