pages admin
parent
7bd441f592
commit
7f17056c4b
|
|
@ -1,8 +1,14 @@
|
|||
<div class="site-admin-control">
|
||||
<button (click)="addLocale()" class="outline">Добавить языковую версию</button>
|
||||
<span class="site-admin-control-toggle" (click)="toggle()">
|
||||
Показать удаленные
|
||||
<div class="site-admin-control-toggle" (click)="toggle()">
|
||||
Показать скрытые
|
||||
<switch [val]="showDeleted"></switch>
|
||||
</span>
|
||||
</div>
|
||||
<div class="site-admin-page-block">
|
||||
<div class="site-admin-company">
|
||||
<ico ico="cloud_24" class="page-lable" color="#FFF"></ico>
|
||||
<span>Сайт компании</span>
|
||||
</div>
|
||||
<ico ico="home_plus_24" class="page-control" (click)="addLocale()"></ico>
|
||||
</div>
|
||||
</div>
|
||||
<pages-tree></pages-tree>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export class JumbotronComponent {
|
|||
){}
|
||||
|
||||
get currentPage(){
|
||||
|
||||
return this.pagesService.currentPage
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,32 +1,41 @@
|
|||
<div class="item" [class.deleted]="isDeleted" [class.hidden]="isHidden" [class.home]="!parent" (click)="touched = true">
|
||||
<div class="item" [class.hidden]="isHidden" [class.home]="!parent" (click)="touched = true">
|
||||
<div class="bar">
|
||||
<div class="left">
|
||||
<drop-down ico="chevron_right_24" [angle]="[0,90]" *ngIf="hasChildren" (toggle)="active=$event"></drop-down>
|
||||
</div>
|
||||
<div class="mid">
|
||||
<div class="mid" [class.deleted]="isDeleted">
|
||||
<div class="info">
|
||||
<div class="logo">
|
||||
<div class="logo" *ngIf="parent">
|
||||
<ico ico="web_page_24" color="#FFF"></ico>
|
||||
</div>
|
||||
<div class="name"><p><a [routerLink]="page.link" target="_blank">{{page.name}}</a></p></div>
|
||||
<div class="logo" *ngIf="!parent">
|
||||
<ico ico="home_24" color="#FFF"></ico>
|
||||
</div>
|
||||
<div class="name">
|
||||
<a [routerLink]="page.link" target="_blank">{{page.name}}</a>
|
||||
<a [routerLink]="page.link" target="_blank" *ngIf="page.h1">{{page.h1}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a *ngIf="parent && !isDeleted" class="clear clone" title="Копировать" (click)="clone()">
|
||||
<ico ico="add_circle_24"></ico>
|
||||
</a>
|
||||
<a *ngIf="!isDeleted" class="clear add-child" title="Добавить страницу" (click)="add()">
|
||||
<ico ico="add_web_page_24"></ico>
|
||||
</a>
|
||||
<a *ngIf="!isDeleted" class="clear edit" title="Редактировать" (click)="edit()">
|
||||
<ico ico="edit_24"></ico>
|
||||
</a>
|
||||
<a *ngIf="isDeleted" class="clear restore" title="Восстановить" (click)="restore()">
|
||||
<ico ico="visibility_on_24"></ico>
|
||||
</a>
|
||||
<a *ngIf="page.slug" class="clear close-blue" title="{{isDeleted ? 'Удалить безвозвратно' : 'Удалить'}}" (click)="delete()">
|
||||
<ico ico="delete_24"></ico>
|
||||
</a>
|
||||
<div *ngIf="parent && !isDeleted" title="Копировать" (click)="clone()">
|
||||
<ico ico="copy_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="!isDeleted" title="Добавить страницу" (click)="add()">
|
||||
<ico ico="webpage_plus_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="!isDeleted" title="Редактировать" (click)="edit()">
|
||||
<ico ico="edit_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="isDeleted" title="Восстановить" (click)="restore()">
|
||||
<ico ico="visibility_on_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="isDeleted" title="Удалить безвозвратно" (click)="delete()">
|
||||
<ico ico="delete_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="!isDeleted" title="Удалить" (click)="delete()">
|
||||
<ico ico="visibility_off_24" class="page-control"></ico>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items" *ngIf="active">
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export class PagesTreeItemComponent {
|
|||
|
||||
|
||||
fetch() {
|
||||
let include = ['children'];
|
||||
let include = ['children','locale'];
|
||||
this.pagesService.show(this.page.id, {include: include.join(','), withTrashed: true}).subscribe(res => {
|
||||
this.page = res.data;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
<p>modal works!</p>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ModalComponent } from './modal.component';
|
||||
|
||||
describe('ModalComponent', () => {
|
||||
let component: ModalComponent;
|
||||
let fixture: ComponentFixture<ModalComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ ModalComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ModalComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-modal',
|
||||
templateUrl: './modal.component.html',
|
||||
styleUrls: ['./modal.component.scss']
|
||||
})
|
||||
export class ModalComponent {
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
$bull: 18px;
|
||||
$offset: 2px;
|
||||
$track: 20px;
|
||||
|
||||
div{
|
||||
border: 1px solid var(--second);
|
||||
display: inline-flex;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export class JumbotronComponent {
|
|||
}
|
||||
|
||||
get bgStyle(){
|
||||
let height = 150;
|
||||
let height = 70;
|
||||
let pictURL:string;
|
||||
if (this.contentPage){
|
||||
height = 150;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
.administration-page{
|
||||
font-size: 20px;
|
||||
font-family: PT Sans;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
h2{
|
||||
color: var(--second-act);
|
||||
margin-bottom: 48px;
|
||||
|
|
@ -9,14 +13,40 @@
|
|||
|
||||
|
||||
.site-admin-control{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
|
||||
.site-admin-control-toggle{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.site-admin-page-block{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 64px;
|
||||
border-top: 1px solid var(--second-dis);
|
||||
border-bottom: 1px solid var(--second-dis);
|
||||
div{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.site-admin-company{
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
ico.page-lable{
|
||||
background-color: var(--prime);
|
||||
border-radius: 20px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
administrate-site-pages>pages-tree{
|
||||
|
|
@ -24,7 +54,15 @@ administrate-site-pages>pages-tree{
|
|||
margin-bottom: 128px;
|
||||
}
|
||||
|
||||
|
||||
ico.page-control{
|
||||
cursor: pointer;
|
||||
svg{
|
||||
color:var(--second);
|
||||
&:hover{
|
||||
color: var(--second-act);
|
||||
}
|
||||
}
|
||||
}
|
||||
pages-tree{
|
||||
|
||||
.item:not(.home){
|
||||
|
|
@ -56,18 +94,20 @@ pages-tree{
|
|||
.item {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
font-family: PT Sans;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
.bar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 16px 0;
|
||||
border-bottom: #E0E0E0 solid 1px;
|
||||
border-bottom: solid var(--second-dis) 1px;
|
||||
height: 64px;
|
||||
.left {
|
||||
flex-shrink: 0;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
cursor: pointer;
|
||||
|
||||
width: 24px;
|
||||
}
|
||||
.mid {
|
||||
flex-grow: 1;
|
||||
|
|
@ -97,16 +137,15 @@ pages-tree{
|
|||
}
|
||||
}
|
||||
.name {
|
||||
p {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
a {
|
||||
color: var(--grey-7);
|
||||
color: var(--dadk);
|
||||
&:nth-child(2){
|
||||
color: var(--second);
|
||||
}
|
||||
}
|
||||
&.sub {
|
||||
font-size: 0.875rem;
|
||||
color: #7f7f7f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.9999 11.0275L19 11C19 7.13401 15.866 4 12 4C8.77697 4 6.0627 6.17824 5.24901 9.1429C2.81415 9.70924 1 11.8928 1 14.5C1 17.5376 3.46243 20 6.5 20H18.5C20.9853 20 23 17.9853 23 15.5C23 13.1837 21.2499 11.2762 18.9999 11.0275ZM17 11V13H18.5C19.8807 13 21 14.1193 21 15.5C21 16.8807 19.8807 18 18.5 18H6.5C4.567 18 3 16.433 3 14.5C3 12.567 4.567 11 6.5 11H7C7 8.23858 9.23858 6 12 6C14.7614 6 17 8.23858 17 11Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 596 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.99609 4H17.9961V16H8.99609V4ZM6.99609 4C6.99609 2.89543 7.89152 2 8.99609 2H17.9961C19.1007 2 19.9961 2.89543 19.9961 4V16C19.9961 17.1046 19.1007 18 17.9961 18H8.99609C7.89152 18 6.99609 17.1046 6.99609 16V4ZM4.99609 20H13.9961H15.9961C15.9961 21.1046 15.1007 22 13.9961 22H4.99609C3.89152 22 2.99609 21.1046 2.99609 20V8C2.99609 6.89543 3.89152 6 4.99609 6V8L4.99609 20Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 561 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 4.65754L18 9.90754V19H6V9.90754L12 4.65754ZM20 9L12 2L4 9V21H20V9ZM11 15V13H13V15H11ZM9 17V11H15V17H9Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 290 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 4.65754L18 9.90754V19H6V9.90754L12 4.65754ZM20 9L12 2L4 9V21H20V9ZM11 13V11H13V13H15V15H13V17H11V15H9V13H11Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 296 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.99609 18V8H19.9961V18H3.99609ZM3.99609 4C2.89152 4 1.99609 4.89543 1.99609 6V18C1.99609 19.1046 2.89152 20 3.99609 20H19.9961C21.1007 20 21.9961 19.1046 21.9961 18V6C21.9961 4.89543 21.1007 4 19.9961 4H3.99609ZM10.9961 10H12.9961V12H14.9961V14H12.9961V16H10.9961V14H8.99609V12H10.9961V10Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 475 B |
Loading…
Reference in New Issue