diff --git a/projects/app-vniigaz/src/assets/html/left-content.component.html b/projects/app-vniigaz/src/assets/html/left-content.component.html
index 03e8643..39da0a8 100644
--- a/projects/app-vniigaz/src/assets/html/left-content.component.html
+++ b/projects/app-vniigaz/src/assets/html/left-content.component.html
@@ -1,15 +1,2 @@
-
-
-
-
- {{pageName}}
-
-
-
-
+
diff --git a/projects/app/_modules/layout/left-content/left-content.component.ts b/projects/app/_modules/layout/left-content/left-content.component.ts
index 59d31be..3388367 100644
--- a/projects/app/_modules/layout/left-content/left-content.component.ts
+++ b/projects/app/_modules/layout/left-content/left-content.component.ts
@@ -1,8 +1,4 @@
import { Component } from '@angular/core';
-import { Router, NavigationEnd } from '@angular/router';
-import { Subscription } from "rxjs";
-import { PagesService } from '@app/_services/pages.service';
-import { FormsService } from '@app/_services';
import { html } from '@environments/htmlenv';
@@ -13,56 +9,6 @@ import { html } from '@environments/htmlenv';
})
export class LeftContentComponent {
- public url: string = "";
- public background:string;
- public pageName:string;
- public editable:string;
- public editMode: boolean = false;
- private pageID: string;
- private routeSubscription: Subscription;
-
-
-
- constructor(
- private router: Router,
- private pagesService:PagesService,
- private formsService: FormsService) {
-
- }
-
- ngOnInit(){
- this.pagesService.editMode.subscribe(
- mode => {
- this.editMode = mode;
- }
- )
- this.pagesService.currentPage.subscribe(
- page => {
- if (page){
- this.background = page.image?.data?.links?.full;
- if (this.background) this.background = `url(${this.background})`;
- this.pageName = (page.parents?.data[2]||page).name;
- this.editable = page.permissions?.edit || page.permissions?.anything;
- this.pageID = page.id
- }else{
- this.pageName = null;
- this.editable = null;
- this.pagesService.editMode.next(false)
- }
- }
- )
- }
-
- editBackground() {
- this.formsService.createModel('page-background', {extraProps: {attach: {pageId: this.pageID}}});
- }
-
- removeBackground() {
- if (confirm('Вы деествительно хотите удалить этот фон?')) {
- this.pagesService.deleteBackground(this.pageID).subscribe(res => {
- });
- }
- }
}
diff --git a/projects/app/_modules/viget/jumbotron/jumbotron.component.html b/projects/app/_modules/viget/jumbotron/jumbotron.component.html
new file mode 100644
index 0000000..08d332e
--- /dev/null
+++ b/projects/app/_modules/viget/jumbotron/jumbotron.component.html
@@ -0,0 +1,14 @@
+
+
+
+
+ {{pageName}}
+
+
+
+
\ No newline at end of file
diff --git a/projects/app/_modules/viget/jumbotron/jumbotron.component.scss b/projects/app/_modules/viget/jumbotron/jumbotron.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/projects/app/_modules/viget/jumbotron/jumbotron.component.ts b/projects/app/_modules/viget/jumbotron/jumbotron.component.ts
new file mode 100644
index 0000000..a9e353f
--- /dev/null
+++ b/projects/app/_modules/viget/jumbotron/jumbotron.component.ts
@@ -0,0 +1,66 @@
+import { Component } from '@angular/core';
+import { Router } from '@angular/router';
+import { Subscription } from "rxjs";
+import { PagesService } from '@app/_services/pages.service';
+import { FormsService } from '@app/_services';
+
+@Component({
+ selector: 'jumbotron',
+ templateUrl: './jumbotron.component.html',
+ styleUrls: ['./jumbotron.component.scss']
+})
+export class Jumbotron {
+ public url: string = "";
+ public background:string;
+ public pageName:string;
+ public editable:string;
+ public editMode: boolean = false;
+ private pageID: string;
+ private routeSubscription: Subscription;
+
+
+
+ constructor(
+ private router: Router,
+ private pagesService:PagesService,
+ private formsService: FormsService) {
+
+ }
+
+ ngOnInit(){
+ this.pagesService.editMode.subscribe(
+ mode => {
+ this.editMode = mode;
+ }
+ )
+ this.pagesService.currentPage.subscribe(
+ page => {
+ if (page){
+ this.background = page.image?.data?.links?.full;
+ if (this.background) this.background = `url(${this.background})`;
+ this.pageName = (page.parents?.data[2]||page).name;
+ this.editable = page.permissions?.edit || page.permissions?.anything;
+ this.pageID = page.id
+ }else{
+ this.pageName = null;
+ this.editable = null;
+ this.pagesService.editMode.next(false)
+ }
+ }
+ )
+ }
+
+ editBackground() {
+ this.formsService.createModel('page-background', {extraProps: {attach: {pageId: this.pageID}}});
+ }
+
+ removeBackground() {
+ if (confirm('Вы деествительно хотите удалить этот фон?')) {
+ this.pagesService.deleteBackground(this.pageID).subscribe(res => {
+ });
+ }
+ }
+}
+
+
+
diff --git a/projects/app/_modules/viget/viget.module.ts b/projects/app/_modules/viget/viget.module.ts
index ad1f84a..b75025f 100644
--- a/projects/app/_modules/viget/viget.module.ts
+++ b/projects/app/_modules/viget/viget.module.ts
@@ -7,6 +7,7 @@ import {DropDownComponent } from "./drop-down/drop-down.component";
import { SliderComponent } from './slider/slider.component';
import { SwitchComponent } from './switch/switch.component';
import { EditSwitch } from "./edit-switch/edit-switch.component";
+import { Jumbotron } from "./jumbotron/jumbotron.component";
@NgModule({
@@ -20,7 +21,8 @@ import { EditSwitch } from "./edit-switch/edit-switch.component";
DropDownComponent,
SliderComponent,
SwitchComponent,
- EditSwitch
+ EditSwitch,
+ Jumbotron
],
exports: [
IcoComponent,
@@ -28,7 +30,8 @@ import { EditSwitch } from "./edit-switch/edit-switch.component";
DropDownComponent,
SliderComponent,
SwitchComponent,
- EditSwitch
+ EditSwitch,
+ Jumbotron
]
})
export class VigetModule {