Commit 4e2bd141 authored by Florian Azizian's avatar Florian Azizian

Merge branch 'develop' into 'master'

Develop

See merge request maarch/MaarchCourrier!170
parents b843d0be 855cb245
......@@ -17,24 +17,24 @@ foreach ($customs as $custom) {
$cases = \SrcCore\models\DatabaseModel::select([
'select' => ['*'],
'select' => ['case_id', 'case_label', 'case_closing_date'],
'table' => ['cases']
]);
if (!empty($cases)) {
$file = fopen("migration/19.12/cases_{$custom}.csv", 'w+');
$csvHead = ['Identifiant affaire', 'Libellé affaire', 'Date de cloture', 'Identifiant courrier', 'Sujet courrier'];
$csvHead = ['Identifiant affaire', 'Libellé affaire', 'Date de cloture', 'Identifiant courrier', 'Numéro chrono', 'Sujet courrier'];
fputcsv($file, $csvHead, ',');
foreach ($cases as $case) {
$resources = \SrcCore\models\DatabaseModel::select([
'select' => ['res_letterbox.res_id', 'res_letterbox.subject'],
'table' => ['cases_res, res_letterbox'],
'where' => ['cases_res.res_id = res_letterbox.res_id', 'case_id = ?'],
'select' => ['r.res_id', 'r.subject', 'mlb.alt_identifier'],
'table' => ['cases_res c, res_letterbox r, mlb_coll_ext mlb'],
'where' => ['c.res_id = r.res_id', 'r.res_id = mlb.res_id', 'case_id = ?', 'r.status <> \'DEL\''],
'data' => [$case['case_id']]
]);
foreach ($resources as $resource) {
$csvContent = [$case['case_id'], $case['case_label'], $case['case_closing_date'], $resource['res_id'], $resource['subject']];
$csvContent = [$case['case_id'], $case['case_label'], $case['case_closing_date'], $resource['res_id'], $resource['alt_identifier'], $resource['subject']];
fputcsv($file, $csvContent, ',');
}
++$migrated;
......
......@@ -17,20 +17,20 @@ foreach ($customs as $custom) {
$fileplans = \SrcCore\models\DatabaseModel::select([
'select' => ['*'],
'select' => ['fileplan_id', 'fileplan_label'],
'table' => ['fp_fileplan'],
'where' => ['user_id is null']
]);
if (!empty($fileplans)) {
$file = fopen("migration/19.12/fileplans_{$custom}.csv", 'w+');
$csvHead = ['Identifiant plan', 'Libellé plan', 'Identifiant position', 'Libellé position', 'Identifiant courrier', 'Sujet courrier'];
$csvHead = ['Identifiant plan', 'Libellé plan', 'Identifiant position', 'Libellé position', 'Identifiant courrier', 'Numéro chrono', 'Sujet courrier'];
fputcsv($file, $csvHead, ',');
foreach ($fileplans as $fileplan) {
$csvContent = [];
$positions = \SrcCore\models\DatabaseModel::select([
'select' => ['*'],
'select' => ['position_id', 'position_label'],
'table' => ['fp_fileplan_positions'],
'where' => ['fileplan_id = ?'],
'data' => [$fileplan['fileplan_id']]
......@@ -38,13 +38,13 @@ foreach ($customs as $custom) {
foreach ($positions as $position) {
$resources = \SrcCore\models\DatabaseModel::select([
'select' => ['res_letterbox.res_id', 'res_letterbox.subject'],
'table' => ['fp_res_fileplan_positions, res_letterbox'],
'where' => ['fp_res_fileplan_positions.res_id = res_letterbox.res_id', 'position_id = ?'],
'select' => ['r.res_id', 'r.subject', 'mlb.alt_identifier'],
'table' => ['fp_res_fileplan_positions p, res_letterbox r, mlb_coll_ext mlb'],
'where' => ['p.res_id = r.res_id', 'r.res_id = mlb.res_id', 'position_id = ?', 'r.status <> \'DEL\''],
'data' => [$position['position_id']]
]);
foreach ($resources as $resource) {
$csvContent = [$fileplan['fileplan_id'], $fileplan['fileplan_label'], $position['position_id'], $position['position_label'], $resource['res_id'], $resource['subject']];
$csvContent = [$fileplan['fileplan_id'], $fileplan['fileplan_label'], $position['position_id'], $position['position_label'], $resource['res_id'], $resource['alt_identifier'], $resource['subject']];
fputcsv($file, $csvContent, ',');
}
}
......
<?php
require '../../vendor/autoload.php';
chdir('../..');
$customs = scandir('custom');
foreach ($customs as $custom) {
if ($custom == 'custom.xml' || $custom == '.' || $custom == '..') {
continue;
}
$migrated = 0;
\SrcCore\models\DatabasePDO::reset();
new \SrcCore\models\DatabasePDO(['customId' => $custom]);
$folders = \SrcCore\models\DatabaseModel::select([
'select' => ['f.folders_system_id', 'f.folder_name', 'f.status', 'r.res_id', 'mlb.alt_identifier', 'r.subject'],
'table' => ['folder_tmp f, res_letterbox r, mlb_coll_ext mlb'],
'where' => ['f.folders_system_id = r.folders_system_id', 'r.res_id = mlb.res_id', 'f.destination is null', 'f.status <> \'DEL\'', 'r.status <> \'DEL\'']
]);
if (!empty($folders)) {
$file = fopen("migration/19.12/folders_{$custom}.csv", 'w+');
$csvHead = ['Identifiant dossier', 'Libellé dossier', 'Statut dossier', 'Identifiant courrier', 'Numéro chrono', 'Sujet courrier'];
fputcsv($file, $csvHead, ',');
foreach ($folders as $folder) {
$csvContent = [$folder['folders_system_id'], $folder['folder_name'], $folder['status'], $folder['res_id'], $folder['alt_identifier'], $folder['subject']];
fputcsv($file, $csvContent, ',');
if (!empty($csvContent)) {
++$migrated;
}
}
fclose($file);
}
printf("Export Dossiers (CUSTOM {$custom}) : " . $migrated . " Dossier(s) public(s) exporté(s) dans le fichier folders_{$custom}.csv\n");
}
......@@ -8,3 +8,4 @@ php ./migrateServicesEntities.php
php ./migrateMenuEntities.php
php ./exportCases.php
php ./exportFileplans.php
php ./exportFolders.php
......@@ -18,7 +18,7 @@ foreach ($customs as $custom) {
$folders = \SrcCore\models\DatabaseModel::select([
'select' => ['folders_system_id', 'typist', 'destination', 'folder_name', 'parent_id'],
'table' => ['folder_tmp'],
'order_by' => ['parent_id asc']
'order_by' => ['level asc']
]);
if (!empty($folders)) {
......
......@@ -86,6 +86,7 @@ $app->get('/autocomplete/users/visa', \SrcCore\controllers\AutoCompleteControlle
$app->get('/autocomplete/entities', \SrcCore\controllers\AutoCompleteController::class . ':getEntities');
$app->get('/autocomplete/statuses', \SrcCore\controllers\AutoCompleteController::class . ':getStatuses');
$app->get('/autocomplete/banAddresses', \SrcCore\controllers\AutoCompleteController::class . ':getBanAddresses');
$app->get('/autocomplete/folders', \SrcCore\controllers\AutoCompleteController::class . ':getFolders');
//Baskets
$app->get('/baskets', \Basket\controllers\BasketController::class . ':get');
......
......@@ -85,6 +85,8 @@ class FolderController
}
}
if (!$found) {
$insert['level'] = 0;
$insert['parent_id'] = null;
$tree[] = $insert;
}
}
......@@ -190,6 +192,9 @@ class FolderController
if ($data['parent_id'] == $aArgs['id']) {
return $response->withStatus(400)->withJson(['errors' => 'Parent_id and id can not be the same']);
}
if (FolderController::isParentFolder(['parent_id' => $data['parent_id'], 'id' => $aArgs['id']])) {
return $response->withStatus(400)->withJson(['errors' => 'Id is a parent of parent_id']);
}
$folder = FolderController::getScopeFolders(['login' => $GLOBALS['userId'], 'folderId' => $aArgs['id'], 'edition' => true]);
if (empty($folder[0])) {
......@@ -593,7 +598,7 @@ class FolderController
// login (string) : Login of user connected
// folderId (integer) : Check specific folder
// edition (boolean) : whether user can edit or not
private static function getScopeFolders(array $aArgs)
public static function getScopeFolders(array $aArgs)
{
$login = $aArgs['login'];
$userEntities = EntityModel::getWithUserEntities(['select' => ['entities.id'], 'where' => ['user_id = ?'], 'data' => [$login]]);
......@@ -656,4 +661,15 @@ class FolderController
return true;
}
private static function isParentFolder(array $args)
{
$parentInfo = FolderModel::getById(['id' => $args['parent_id'], 'select' => ['folders.id', 'parent_id']]);
if (empty($parentInfo) || $parentInfo['id'] == $args['id']) {
return true;
} elseif (!empty($parentInfo['parent_id'])) {
return FolderController::isParentFolder(['parent_id' => $parentInfo['parent_id'], 'id' => $args['id']]);
}
return false;
}
}
......@@ -16,6 +16,20 @@ use SrcCore\models\DatabaseModel;
class FolderModelAbstract
{
public static function get(array $aArgs)
{
$folders = DatabaseModel::select([
'select' => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
'table' => ['folders'],
'where' => empty($aArgs['where']) ? [] : $aArgs['where'],
'data' => empty($aArgs['data']) ? [] : $aArgs['data'],
'order_by' => empty($aArgs['orderBy']) ? ['label'] : $aArgs['orderBy']
]);
return $folders;
}
public static function getById(array $aArgs)
{
ValidatorModel::notEmpty($aArgs, ['id']);
......@@ -25,7 +39,7 @@ class FolderModelAbstract
'select' => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
'table' => ['folders', 'entities_folders'],
'left_join' => ['folders.id = entities_folders.folder_id'],
'where' => ['id = ?'],
'where' => ['folders.id = ?'],
'data' => [$aArgs['id']]
]);
......
......@@ -28,6 +28,8 @@ use SrcCore\models\TextFormatModel;
use SrcCore\models\ValidatorModel;
use Status\models\StatusModel;
use User\models\UserModel;
use Folder\models\FolderModel;
use Folder\controllers\FolderController;
class AutoCompleteController
{
......@@ -673,4 +675,37 @@ class AutoCompleteController
return ['contact' => $contact];
}
public static function getFolders(Request $request, Response $response)
{
$data = $request->getQueryParams();
$check = Validator::stringType()->notEmpty()->validate($data['search']);
if (!$check) {
return $response->withStatus(400)->withJson(['errors' => 'Bad Request']);
}
$scopedFolders = FolderController::getScopeFolders(['login' => $GLOBALS['userId']]);
$getScopedFoldersIds = function ($value) {
return $value['id'];
};
$arrScopedFoldersIds = array_map($getScopedFoldersIds, $scopedFolders);
$selectedFolders = FolderModel::get([
'where' => ['label ilike ? AND id IN(?)'],
'data' => [ '%'.$data['search'].'%', $arrScopedFoldersIds],
'orderBy' => ['label']
]);
$getFomatedFolders = function ($value) {
return $return = [
'id' => $value['id'],
'idToDisplay' => $value['label'],
'otherInfo' => ''
];
};
return $response->withJson(array_map($getFomatedFolders, $selectedFolders));
}
}
......@@ -61,7 +61,7 @@
<div style="height:90%;overflow:auto;position:absolute;width:100%;">
<table #tableBasketListSort="matSort" cdkDropList id="folder-list"
[cdkDropListConnectedTo]="listTodrag()" [cdkDropListData]="data"
[cdkDropListDisabled]="dragInit" mat-table [dataSource]="data" matSort matSortActive="res_id"
[cdkDropListDisabled]="dragInit || appService.getViewMode()" mat-table [dataSource]="data" matSort matSortActive="res_id"
matSortDisableClear matSortDirection="asc" style="width:100%;">
<ng-container matColumnDef="res_id">
......
......@@ -136,7 +136,7 @@ export class FolderDocumentListComponent implements OnInit {
'label': data.folder.label
};
this.headerService.setHeader('Dossier : ' + this.folderInfo.label);
this.headerService.setHeader(this.folderInfo.label, '', 'fa fa-folder-open');
});
this.basketUrl = '../../rest/folders/' + params['folderId'] + '/resources';
this.filtersListService.filterMode = false;
......
......@@ -3,5 +3,5 @@
<span>{{lang.classifyIn}}</span>
</button>
<mat-menu #folders="matMenu" [class]="'folderListMenu'">
<button mat-menu-item *ngFor="let folder of foldersList | sortBy : 'label'" class="labelFolder" (click)="classifyDocuments(folder)" [title]="folder.label">{{folder.label}} <i class="fa fa-users private" *ngIf="folder.public" title="{{lang.sharedFolder}}"></i></button>
<button mat-menu-item *ngFor="let folder of foldersList | sortBy : 'label'" class="labelFolder" (click)="classifyDocuments(folder)" [title]="folder.label"><i class="fa fa-users private" *ngIf="folder.public" title="{{lang.sharedFolder}}"></i> {{folder.label}}</button>
</mat-menu>
\ No newline at end of file
......@@ -20,5 +20,5 @@
}
::ng-deep.folderListMenu {
width: 200px;
width: auto;
}
\ No newline at end of file
......@@ -43,7 +43,7 @@ export class FolderMenuComponent implements OnInit {
tap(() => {
this.refreshFolders.emit();
this.refreshList.emit();
this.notify.success('Courrier classé');
this.notify.success(this.lang.mailClassified);
}),
catchError((err) => {
this.notify.handleErrors(err);
......
......@@ -6,17 +6,17 @@
matTreeNodePadding matTreeNodePaddingIndent="20px">
<!-- use a disabled button to provide padding for tree leaf -->
<button class="expandButton" mat-icon-button disabled></button>
<a mat-list-item disableRipple [class.selectedFolder]="node.selected" [class.empty]="node.countResources === 0" (mouseenter)="showAction(node)"
<a mat-list-item disableRipple class="folderTreeItem" [class.selectedFolder]="node.selected" (mouseenter)="showAction(node)"
(mouseleave)="hideAction(node)" (click)="selectFolder(node)">
<span style="flex:1;overflow: hidden;text-overflow: ellipsis;">
<span style="width: 90%;overflow: hidden;text-overflow: ellipsis;">
<span class="treeLabel" [title]="node.label" [class.drag]="node.drag">
{{node.label}} <i class="fa fa-users private" *ngIf="node.public" title="{{lang.sharedFolder}}"></i>
<i class="fa fa-users private" *ngIf="node.public" title="{{lang.sharedFolder}}"></i> {{node.label}}
</span>
</span>
<button mat-icon-button [matMenuTriggerFor]="menu" (click)="$event.stopPropagation();showAction(node);checkRights(node);"
[disabled]="!node.showAction">
[disabled]="!node.showAction" style="position: absolute;right:0px;">
<mat-icon *ngIf="node.showAction" class="folderAction fa fa-ellipsis-v"></mat-icon>
<span *ngIf="!node.showAction" class="countResources">
<span *ngIf="!node.showAction" class="countResources" [class.empty]="node.countResources === 0">
{{node.countResources}}
</span>
</button>
......@@ -27,9 +27,9 @@
</mat-menu>
</a>
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node; when: hasNoContent" matTreeNodePadding matTreeNodePaddingIndent="45px">
<mat-tree-node *matTreeNodeDef="let node; when: hasNoContent" matTreeNodePadding matTreeNodePaddingIndent="0px">
<form>
<mat-form-field floatLabel="never" style="width: 100%;">
<mat-form-field floatLabel="never" style="width: 100%;padding-left: 10px;padding-right: 10px;">
<input matInput id="itemValue" #itemValue placeholder="{{lang.addFolder}}...">
<button type="submit" matSuffix mat-icon-button (click)="saveNode(node, itemValue.value)"
[disabled]="itemValue.value === ''">
......@@ -46,16 +46,16 @@
<mat-icon class="mat-icon-rtl-mirror fa {{treeControl.isExpanded(node) ? 'fa-chevron-down' : 'fa-chevron-right'}}">
</mat-icon>
</button>
<a mat-list-item disableRipple [class.selectedFolder]="node.selected" [class.empty]="node.countResources === 0" (mouseleave)="hideAction(node)"
<a mat-list-item disableRipple class="folderTreeItem" [class.selectedFolder]="node.selected" (mouseleave)="hideAction(node)"
(mouseenter)="showAction(node)" (click)="selectFolder(node)">
<span style="flex:1;overflow: hidden;text-overflow: ellipsis;">
<span style="width: 90%;overflow: hidden;text-overflow: ellipsis;">
<span class="treeLabel" [title]="node.label" [class.drag]="node.drag">
{{node.label}} <i class="fa fa-users private" *ngIf="node.public" title="{{lang.sharedFolder}}"></i>
<i class="fa fa-users private" *ngIf="node.public" title="{{lang.sharedFolder}}"></i> {{node.label}}
</span>
</span>
<button mat-icon-button [matMenuTriggerFor]="menu" (click)="$event.stopPropagation();checkRights(node);" [disabled]="!node.showAction">
<button mat-icon-button [matMenuTriggerFor]="menu" (click)="$event.stopPropagation();checkRights(node);" [disabled]="!node.showAction" style="position: absolute;right:0px;">
<mat-icon *ngIf="node.showAction" class="folderAction fa fa-ellipsis-v"></mat-icon>
<span *ngIf="!node.showAction" class="countResources">
<span *ngIf="!node.showAction" class="countResources" [class.empty]="node.countResources === 0">
{{node.countResources}}
</span>
</button>
......@@ -77,7 +77,7 @@
<mat-list-item role="listitem">
<form>
<mat-form-field floatLabel="never" style="width: 100%;">
<input matInput id="itemValue" #itemValue placeholder="{{lang.addFolder}} racine...">
<input matInput id="itemValue" #itemValue placeholder="{{lang.addRootFolder}}">
<button type="submit" matSuffix mat-icon-button (click)="createRoot(itemValue.value);createRootNode = !createRootNode"
[disabled]="itemValue.value === ''">
<mat-icon class="fa fa-check" color="accent" [title]="lang.add"></mat-icon>
......
......@@ -51,12 +51,13 @@
color: rgb(102, 102, 102);
font-size: 12px;
font-weight: bold;
height: 30px;
height: 40px;
width: 90%;
}
.mat-tree-node {
min-height: 0px;
height: 30px;
height: 40px;
::ng-deep.mat-list-item-content {
padding-left: 0px;
......@@ -79,12 +80,15 @@ form {
}
.more {
width: 100%;
::ng-deep.mat-list-item-content {
justify-content: center;
}
}
.private {
margin-left: 5px;
color: $secondary;
}
......@@ -99,18 +103,11 @@ button:disabled {
.countResources {
font-weight: bold;
}
:not(.empty) {
.countResources {
color: $primary;
}
color: $primary;
}
.empty {
opacity: 0.5;
.countResources {
font-size: 12px;
color: rgb(102, 102, 102);
}
font-size: 12px;
color: rgb(102, 102, 102);
}
\ No newline at end of file
......@@ -107,6 +107,7 @@ export class FolderTreeComponent implements OnInit {
@ViewChild('tree', { static: true }) tree: any;
@Output('refreshDocList') refreshDocList = new EventEmitter<string>();
@Output('refreshFolderList') refreshFolderList = new EventEmitter<string>();
constructor(
public http: HttpClient,
......@@ -255,6 +256,7 @@ export class FolderTreeComponent implements OnInit {
const nestedNode = this.flatNodeMap.get(node);
nestedNode.label = value;
nestedNode.id = data.folder;
nestedNode.countResources = 0;
this.dataChange.next(this.data);
this.treeControl.collapseAll();
this.openTree(nestedNode.id);
......@@ -340,7 +342,7 @@ export class FolderTreeComponent implements OnInit {
}
moveFolder(ev: any, node: any) {
this.dialogRef = this.dialog.open(ConfirmComponent, { autoFocus: false, disableClose: true, data: { title: 'Déplacer ' + ev.item.data.alt_identifier, msg: 'Voulez-vous déplacer <b>' + ev.item.data.alt_identifier + '</b> dans <b>' + node.label + '</b> ?' } });
this.dialogRef = this.dialog.open(ConfirmComponent, { autoFocus: false, disableClose: true, data: { title: this.lang.move + ' ' + ev.item.data.alt_identifier, msg: this.lang.moveQuestion + ' <b>' + ev.item.data.alt_identifier + '</b> ' + this.lang.in + ' <b>' + node.label + '</b>&nbsp;?' } });
this.dialogRef.afterClosed().pipe(
filter((data: string) => data === 'ok'),
......@@ -359,7 +361,7 @@ export class FolderTreeComponent implements OnInit {
}
classifyDocument(ev: any, node: any) {
this.dialogRef = this.dialog.open(ConfirmComponent, { autoFocus: false, disableClose: true, data: { title: 'Classer ' + ev.item.data.alt_identifier, msg: 'Voulez-vous classer <b>' + ev.item.data.alt_identifier + '</b> dans <b>' + node.label + '</b> ?' } });
this.dialogRef = this.dialog.open(ConfirmComponent, { autoFocus: false, disableClose: true, data: { title: this.lang.classify + ' ' + ev.item.data.alt_identifier, msg: this.lang.classifyQuestion + ' <b>' + ev.item.data.alt_identifier + '</b> ' + this.lang.in + ' <b>' + node.label + '</b>&nbsp;?' } });
this.dialogRef.afterClosed().pipe(
filter((data: string) => data === 'ok'),
......@@ -368,7 +370,7 @@ export class FolderTreeComponent implements OnInit {
node.countResources = data.countResources;
}),
tap(() => {
this.notify.success('Courrier classé');
this.notify.success(this.lang.mailClassified);
this.refreshDocList.emit();
}),
finalize(() => node.drag = false),
......@@ -404,7 +406,11 @@ export class FolderTreeComponent implements OnInit {
this.dialogRef = this.dialog.open(FolderUpdateComponent, { autoFocus: false, data: { folderId: node.id } });
this.dialogRef.afterClosed().pipe(
tap((data) => {
if (data !== undefined) {
this.getFolders();
}
})
).subscribe();
}
......@@ -418,8 +424,19 @@ export class FolderTreeComponent implements OnInit {
}),
exhaustMap(() => this.http.get("../../rest/folders/" + node.id)),
tap((data: any) => {
const compare = data.folder.sharing.entities.map((data: any) => data.entity_id).filter((item: any) => userEntities.indexOf(item) > -1);
node.edition = (compare.length > 0 || data.folder.user_id === currentUserId) ? true : false;
let canAdmin = false;
const compare = data.folder.sharing.entities.filter((item: any) => userEntities.indexOf(item) > -1);
const entitiesCompare = data.folder.sharing.entities.filter((item: any) => compare.indexOf(item.id));
entitiesCompare.forEach((element: any) => {
if (element.edition === true) {
canAdmin = true;
}
});
node.edition = (canAdmin || data.folder.user_id === currentUserId) ? true : false;
}),
).subscribe();
}
......
......@@ -181,9 +181,8 @@ export class FolderUpdateComponent implements OnInit {
this.http.put('../../rest/folders/' + this.folder.id, this.folder).pipe(
exhaustMap(() => this.http.put('../../rest/folders/' + this.folder.id + '/sharing', { public: this.folder.sharing.entities.length > 0, sharing: this.folder.sharing })),
tap((data: any) => {
this.notify.success('Dossier modifié');
window.location.reload();
this.dialogRef.close();
this.notify.success(this.lang.folderUpdated);
this.dialogRef.close('success');
}),
catchError((err: any) => {
this.notify.handleErrors(err);
......
......@@ -4,6 +4,6 @@
<i class="fa fa-folder"></i>&nbsp;{{lang.folders}}
</mat-panel-title>
</mat-expansion-panel-header>
<plugin-autocomplete [labelPlaceholder]="lang.search" [labelList]="lang.search" [routeDatas]="['/rest/folders']" [targetSearchKey]="'label'"></plugin-autocomplete>
<plugin-autocomplete [size]="'small'" [labelPlaceholder]="lang.searchFolder" [routeDatas]="['/rest/autocomplete/folders']" [targetSearchKey]="'idToDisplay'" (triggerEvent)="goTo($event)"></plugin-autocomplete>
<folder-tree #folderTree [selectedId]="id" (refreshDocList)="refreshDocList()"></folder-tree>
</mat-expansion-panel>
import { Component, OnInit, Input, ViewChild, Output, EventEmitter } from '@angular/core';
import { LANG } from '../../translate.component';
import { FolderTreeComponent } from '../folder-tree.component';
import { Router } from '@angular/router';
declare function $j(selector: any): any;
......@@ -18,7 +19,7 @@ export class PanelFolderComponent implements OnInit {
@Output('refreshEvent') refreshEvent = new EventEmitter<string>();
constructor() { }
constructor(private router: Router) { }
ngOnInit(): void { }
......@@ -41,4 +42,8 @@ export class PanelFolderComponent implements OnInit {
refreshFoldersTree() {
this.folderTree.getFolders();
}
goTo(folder: any) {
this.router.navigate(["/folders/" + folder.id]);
}
}
......@@ -2,5 +2,5 @@
<button *ngIf="!snavLeft.opened" mat-icon-button (click)="snavLeft.open()" style="font-size:20px;">
<mat-icon class="fa fa-stream"></mat-icon>
</button>
{{headerService.headerMessage}} <span class="admin-toolbar-title-small">{{headerService.subHeaderMessage}}</span>
<i *ngIf="headerService.headerMessageIcon !== ''" class="{{headerService.headerMessageIcon}}"></i> {{headerService.headerMessage}} <span class="admin-toolbar-title-small">{{headerService.subHeaderMessage}}</span>
</div>
\ No newline at end of file
<div class="panelHeader">
<div class="panelHeader-logo">
<a href="#" title="{{lang.home}}" *ngIf="!appService.getViewMode()" style="margin-right: 30px;">
<a href="#" title="{{lang.home}}" style="margin-right: 30px;">
<mat-icon class="maarchLogo" svgIcon="maarchLogoFull"></mat-icon>
</a>
</div>
......
......@@ -63,7 +63,7 @@
</div>
<div style="height:90%;overflow:auto;position:absolute;width:100%;">
<table cdkDropList id="document-list" [cdkDropListConnectedTo]="listTodrag()" [cdkDropListData]="data" #tableBasketListSort="matSort" mat-table [dataSource]="data" matSort
matSortActive="res_id" matSortDisableClear matSortDirection="asc" style="width:100%;" [cdkDropListDisabled]="dragInit">
matSortActive="res_id" matSortDisableClear matSortDirection="asc" style="width:100%;" [cdkDropListDisabled]="dragInit || appService.getViewMode()">
<ng-container matColumnDef="res_id">
<td mat-cell *matCellDef="let row"
......
......@@ -184,7 +184,7 @@ export class BasketListComponent implements OnInit {
this.allResInBasket = data.allResources;
this.currentBasketInfo.basket_id = data.basket_id;
this.defaultAction = data.defaultAction;
this.headerService.setHeader(data.basketLabel);
this.headerService.setHeader(data.basketLabel, '', 'fa fa-inbox');
return data.resources;
}),
catchError((err: any) => {
......
<mat-nav-list style="position:relative;">
<ng-container *ngIf="appService.getViewMode()">
<!--<ng-container *ngIf="appService.getViewMode()">
<canvas class="header-bg" style="margin-top:-8px;background-image: url('static.php?filename=login-banner.jpg');background-size:cover;border-bottom: solid 1px white;width: 100%;height: 70px;"></canvas>
<i title="{{lang.myProfileAccess}}" routerLink="/profile" style="cursor:pointer;z-index:1;color:white;position: absolute;left: 50%;top: 17px;background-image: url('static.php?filename=logo_only.svg');width: 70px;height: 70px;background-size: cover;background-position: top center;border-radius: 50%;border: solid white;background-color:white;transform: translateX(-50%);"></i>
<mat-expansion-panel>
......@@ -25,7 +25,7 @@
</mat-list-item>
</mat-list>
</mat-expansion-panel>
</ng-container>
</ng-container>-->
</mat-nav-list>
<mat-nav-list>
<h3 mat-subheader>{{lang.shortcut}}</h3>
......@@ -57,12 +57,12 @@
</ng-container>
</div>
</mat-nav-list>
<mat-nav-list *ngIf="appService.getViewMode()">
<!--<mat-nav-list *ngIf="appService.getViewMode()">
<a mat-list-item href="index.php?display=true&page=logout&logout=true">
<mat-icon color="warn" mat-list-icon class="fa fa-sign-out-alt"></mat-icon>
<p mat-line>
{{lang.logout}}
</p>
</a>
</mat-nav-list>
</mat-nav-list>-->
<mat-divider></mat-divider>
\ No newline at end of file
......@@ -1063,4 +1063,11 @@ export const LANG_EN = {
"more" : "More",
"less" : "Less",
"actionsAlt": "Actions",
"addRootFolder": "Add root folder",
"folderUpdated" : "Folder updated",
"in" : "in",
"classifyQuestion" : "Do you want classify",
"moveQuestion" : "Do you want move",
"classify" : "Classify",
"mailClassified" : "Mail(s) classified",
};
......@@ -1083,15 +1083,15 @@ export const LANG_FR = {
"eventList" : "Ouverture de la page",
"folderAdded" : "Dossier ajouté",
"folderDeleted" : "Dossier supprimé",
"removedFromFolder" : "Le courrier a été retiré du dossier",
"removedFromFolder" : "Courrier(s) retiré(s)",
"removeFromFolder" : "Retirer du dossier",
"classifyInFolder" : "Placer le courrier suivant dans un dossier",
"getFolders" : "Dossiers (emplacement fixe)",
"getFoldersSample" : "Litiges",
"classifyIn" : "Classer dans ...",
"setInParentFolder" : "Imbriquer le dossier dans ...",
"searchFolder" : "Recherche un dossier",
"shareToEntities" : "Partager aux entités ...",
"classifyIn" : "Classer dans...",
"setInParentFolder" : "Placer le dossier dans...",
"searchFolder" : "Rechercher un dossier",
"shareToEntities" : "Partager aux entités...",
"canManageFolder" : "Droit de modification / suppression du dossier",
"searchMailInFolder" : "Rechercher des courriers dans le dossier",
"addSubFolder" : "Nouveau sous-dossier",
......@@ -1100,4 +1100,11 @@ export const LANG_FR = {
"more" : "Plus",
"less" : "Moins",
"actionsAlt": "Actions",
"addRootFolder": "Nouveau dossier racine",
"folderUpdated" : "Dossier modifié",