diff --git a/front/src/app/app-routing.module.ts b/front/src/app/app-routing.module.ts index cb7fbe4..410c237 100644 --- a/front/src/app/app-routing.module.ts +++ b/front/src/app/app-routing.module.ts @@ -18,6 +18,8 @@ import { LoginComponent } from './scene/login/login.component'; import { SignUpComponent } from './scene/sign-up/sign-up.component'; import { SettingsComponent } from './scene/settings/settings.component'; import { VideoEditComponent } from './scene/video-edit/video-edit'; +import { GroupEditComponent } from './scene/group-edit/group-edit'; +import { SaisonEditComponent } from './scene/saison-edit/saison-edit'; //import { HelpComponent } from './help/help.component'; @@ -25,13 +27,17 @@ const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full'}, { path: 'home', component: HomeComponent }, { path: 'type/:type_id', component: TypeComponent }, + { path: 'univers/:univers_id', component: UniversComponent }, + //{ path: 'type/:type_id/univers/:univers_id', component: UniversComponent }, { path: 'group/:group_id', component: GroupComponent }, + { path: 'group-edit/:group_id', component: GroupEditComponent }, //{ path: 'type/:type_id/group/:group_id', component: GroupComponent }, //{ path: 'type/:type_id/univers/:univers_id/group/:group_id', component: GroupComponent }, //{ path: 'univers/:univers_id/group/:group_id', component: GroupComponent }, { path: 'saison/:saison_id', component: SaisonComponent }, + { path: 'saison-edit/:saison_id', component: SaisonEditComponent }, //{ path: 'type/:type_id/univers/:univers_id/group/:group_id/saison/:saison_id', component: SaisonComponent }, { path: 'video/:video_id', component: VideoComponent }, //{ path: 'type/:type_id/univers/:univers_id/group/:group_id/saison/:saison_id/video/:video_id', component: VideoComponent }, diff --git a/front/src/app/app.module.ts b/front/src/app/app.module.ts index 23c084f..a0b7166 100644 --- a/front/src/app/app.module.ts +++ b/front/src/app/app.module.ts @@ -35,6 +35,8 @@ import { SettingsComponent } from './scene/settings/settings.component'; import { ErrorViewerComponent } from './scene/error-viewer/error-viewer.component'; import { ErrorComponent } from './error/error.component'; import { VideoEditComponent } from './scene/video-edit/video-edit'; +import { SaisonEditComponent } from './scene/saison-edit/saison-edit'; +import { GroupEditComponent } from './scene/group-edit/group-edit'; import { AuthService } from './service/auth.service'; import { ArianeService } from './service/ariane.service'; @@ -75,7 +77,9 @@ import { AppComponent } from './app.component'; SettingsComponent, ErrorViewerComponent, ErrorComponent, - VideoEditComponent + VideoEditComponent, + SaisonEditComponent, + GroupEditComponent ], imports: [ BrowserModule, diff --git a/front/src/app/component/top-menu/top-menu.component.html b/front/src/app/component/top-menu/top-menu.component.html index cb726fa..2b74274 100644 --- a/front/src/app/component/top-menu/top-menu.component.html +++ b/front/src/app/component/top-menu/top-menu.component.html @@ -15,7 +15,7 @@ {{ariane_type_name}}
- U + T
/
@@ -75,11 +75,11 @@ + +
+
+ Covers: +
+
+ {{upload_file_value}} +
+
+ + \ No newline at end of file diff --git a/front/src/app/scene/group-edit/group-edit.less b/front/src/app/scene/group-edit/group-edit.less new file mode 100644 index 0000000..d6c2f02 --- /dev/null +++ b/front/src/app/scene/group-edit/group-edit.less @@ -0,0 +1,103 @@ +.fill-all{ + //width:100%; + max-width:80%; + height:100%; + margin: 20px auto; + padding: 20px; + border:0; + background-color: rgba(200, 200, 200, 0.5); + box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.6); +} + +.request_raw { + width: 90%; + margin: 0 auto; + height: 45px; + .label { + width: 20%; + margin-right: 10px; + text-align: right; + float: left; + display: block; + } + .input { + width: 75%; + float: left; + display: block; + input { + width: 100%; + font-size: 20px; + } + select { + width: 100%; + font-size: 20px; + } + } + .cover_div { + //float: left; + display: block; + } + .cover { + max-width: 30%; + } +} +.send_value { + width: 300px; + margin: 0 auto; + padding: 10px; + display: block; +} + +.item { + font-size: 20px; + height: 21%; + width: 23%; + margin: 1%; + padding: 0; + overflow: hidden; + //box-shadow: 0 1px 1.5px 0 rgba(0,0,0,.12),0 1px 1px 0 rgba(0,0,0,.24); + box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.6); + line-height: normal; + border: none; + font-family: "Roboto","Helvetica","Arial",sans-serif; + font-weight: 500; + text-transform: uppercase; + letter-spacing: 0; + will-change: box-shadow; + outline: none; + cursor: pointer; + text-decoration: none; + text-align: center; + vertical-align: middle; + transition-duration: 0.4s; + float:left; + display:block; + + h1 { + font-size: 24px; + } + + &:hover { + background-color: #F00; + } + + .material-icons { + vertical-align: middle; + } + + .material-icons { + position: absolute; + top: 50%; + left: 50%; + transform: ~"translate(-12px,-12px)"; + line-height: 24px; + width: 24px; + } +} + +.item-video { + &:hover { + background-color: #0F0; + } +} + diff --git a/front/src/app/scene/group-edit/group-edit.ts b/front/src/app/scene/group-edit/group-edit.ts new file mode 100644 index 0000000..bcd258f --- /dev/null +++ b/front/src/app/scene/group-edit/group-edit.ts @@ -0,0 +1,142 @@ +/** @file + * @author Edouard DUPIN + * @copyright 2018, Edouard DUPIN, all right reserved + * @license PROPRIETARY (see license file) + */ + +import { Component, OnInit } from '@angular/core'; +import { Router, ActivatedRoute, ParamMap } from '@angular/router'; +import { Location } from '@angular/common'; +import { NgForm } from '@angular/forms'; +import { FormGroup, FormControl } from "@angular/forms"; +import { fadeInAnimation } from '../../_animations/index'; + +import { GroupService } from '../../service/group.service'; +import { DataService } from '../../service/data.service'; + +export class ElementList { + value: number; + label: string; + constructor(_value: number, _label: string) { + this.value = _value; + this.label = _label; + } +} + +@Component({ + selector: 'app-group-edit', + templateUrl: './group-edit.html', + styleUrls: ['./group-edit.less'], + animations: [fadeInAnimation], + host: { '[@fadeInAnimation]': '' } +}) +// https://www.sitepoint.com/angular-forms/ +export class GroupEditComponent implements OnInit { + id_group:number = -1; + + error:string = "" + + name:string = "" + description:string = "" + coverFile:File; + upload_file_value:string = "" + selectedFiles:FileList; + + covers_display:Array = []; + + constructor(private route: ActivatedRoute, + private router: Router, + private locate: Location, + private dataService: DataService, + private groupService: GroupService) { + + } + + ngOnInit() { + this.id_group = parseInt(this.route.snapshot.paramMap.get('group_id')); + let self = this; + this.groupService.get(this.id_group) + .then(function(response) { + console.log("get response of video : " + JSON.stringify(response, null, 2)); + self.name = response.name; + self.description = response.description; + if (response.covers !== undefined && response.covers !== null) { + for (let iii=0; iii +
+
+
+ Number: +
+
+ +
+
+
+
+ Description: +
+
+ +
+
+
+
+ Covers: +
+
+
+
+
+
+ +
+
+
+ Covers: +
+
+ {{upload_file_value}} +
+
+
+ \ No newline at end of file diff --git a/front/src/app/scene/saison-edit/saison-edit.less b/front/src/app/scene/saison-edit/saison-edit.less new file mode 100644 index 0000000..d6c2f02 --- /dev/null +++ b/front/src/app/scene/saison-edit/saison-edit.less @@ -0,0 +1,103 @@ +.fill-all{ + //width:100%; + max-width:80%; + height:100%; + margin: 20px auto; + padding: 20px; + border:0; + background-color: rgba(200, 200, 200, 0.5); + box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.6); +} + +.request_raw { + width: 90%; + margin: 0 auto; + height: 45px; + .label { + width: 20%; + margin-right: 10px; + text-align: right; + float: left; + display: block; + } + .input { + width: 75%; + float: left; + display: block; + input { + width: 100%; + font-size: 20px; + } + select { + width: 100%; + font-size: 20px; + } + } + .cover_div { + //float: left; + display: block; + } + .cover { + max-width: 30%; + } +} +.send_value { + width: 300px; + margin: 0 auto; + padding: 10px; + display: block; +} + +.item { + font-size: 20px; + height: 21%; + width: 23%; + margin: 1%; + padding: 0; + overflow: hidden; + //box-shadow: 0 1px 1.5px 0 rgba(0,0,0,.12),0 1px 1px 0 rgba(0,0,0,.24); + box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.6); + line-height: normal; + border: none; + font-family: "Roboto","Helvetica","Arial",sans-serif; + font-weight: 500; + text-transform: uppercase; + letter-spacing: 0; + will-change: box-shadow; + outline: none; + cursor: pointer; + text-decoration: none; + text-align: center; + vertical-align: middle; + transition-duration: 0.4s; + float:left; + display:block; + + h1 { + font-size: 24px; + } + + &:hover { + background-color: #F00; + } + + .material-icons { + vertical-align: middle; + } + + .material-icons { + position: absolute; + top: 50%; + left: 50%; + transform: ~"translate(-12px,-12px)"; + line-height: 24px; + width: 24px; + } +} + +.item-video { + &:hover { + background-color: #0F0; + } +} + diff --git a/front/src/app/scene/saison-edit/saison-edit.ts b/front/src/app/scene/saison-edit/saison-edit.ts new file mode 100644 index 0000000..7e0b69b --- /dev/null +++ b/front/src/app/scene/saison-edit/saison-edit.ts @@ -0,0 +1,142 @@ +/** @file + * @author Edouard DUPIN + * @copyright 2018, Edouard DUPIN, all right reserved + * @license PROPRIETARY (see license file) + */ + +import { Component, OnInit } from '@angular/core'; +import { Router, ActivatedRoute, ParamMap } from '@angular/router'; +import { Location } from '@angular/common'; +import { NgForm } from '@angular/forms'; +import { FormGroup, FormControl } from "@angular/forms"; +import { fadeInAnimation } from '../../_animations/index'; + +import { SaisonService } from '../../service/saison.service'; +import { DataService } from '../../service/data.service'; + +export class ElementList { + value: number; + label: string; + constructor(_value: number, _label: string) { + this.value = _value; + this.label = _label; + } +} + +@Component({ + selector: 'app-saison-edit', + templateUrl: './saison-edit.html', + styleUrls: ['./saison-edit.less'], + animations: [fadeInAnimation], + host: { '[@fadeInAnimation]': '' } +}) +// https://www.sitepoint.com/angular-forms/ +export class SaisonEditComponent implements OnInit { + id_saison:number = -1; + + error:string = ""; + + numberVal:number = null; + description:string = ""; + coverFile:File; + upload_file_value:string = "" + selectedFiles:FileList; + + covers_display:Array = []; + + constructor(private route: ActivatedRoute, + private router: Router, + private locate: Location, + private dataService: DataService, + private saisonService: SaisonService) { + + } + + ngOnInit() { + this.id_saison = parseInt(this.route.snapshot.paramMap.get('saison_id')); + let self = this; + this.saisonService.get(this.id_saison) + .then(function(response) { + console.log("get response of saison : " + JSON.stringify(response, null, 2)); + self.numberVal = response.number; + self.description = response.description; + if (response.covers !== undefined && response.covers !== null) { + for (let iii=0; iii