diff --git a/apps/maarch_entreprise/Views/entities-administration.component.html b/apps/maarch_entreprise/Views/entities-administration.component.html index 38235a3177a86ace7334d9c1450d2e2537c3dff6..b37e946b290e6213856529b9dce93083159b4bba 100644 --- a/apps/maarch_entreprise/Views/entities-administration.component.html +++ b/apps/maarch_entreprise/Views/entities-administration.component.html @@ -48,6 +48,8 @@ <mat-form-field> <input matInput id="jstree_search" name="jstree_search" type="text" placeholder="{{lang.searchEntities}}"> + <mat-hint *ngIf="!creationMode">{{lang.entityTreeInfo}}</mat-hint> + <mat-hint *ngIf="creationMode">{{lang.entityTreeInfoCreation}}</mat-hint> </mat-form-field> <div id="jstree"></div> @@ -215,8 +217,8 @@ <input #autocompleteFilter type="text" placeholder="{{lang.addUserOrEntity}}" matInput [matAutocomplete]="auto" [formControl]="elementCtrl"> <mat-autocomplete #auto="matAutocomplete"> <mat-option *ngFor="let elem of filteredElements | async" [value]="elem.id" (click)="addElemListModel(elem)"> - <p mat-line> - <span class="col-xm-1"> + <p mat-line style="margin:0;"> + <span class="col-xm-1" style="padding-right:5px;"> <mat-icon color="primary" [class]="elem.type == 'entity' ? 'fa fa-sitemap fa-2x' : 'fa fa-user fa-2x'" style="margin-right:0px;"></mat-icon> </span> <span class="col-xm-11"> @@ -232,10 +234,10 @@ <h3 *ngIf="role.available" mat-subheader style="font-weight:bold;" color="primary">{{role.label}}</h3> <span *ngIf="role.available" dnd-sortable-container [dropZones]="['boxers-zone']" [sortableData]="currentEntity.listTemplate[role.id]"> <div style="min-height:30px;"> - <mat-list-item disableRipple="true" *ngFor="let template of currentEntity.listTemplate[role.id]; let i = index" title="{{lang.move}}" + <mat-list-item class="roleDiffList" disableRipple="true" *ngFor="let template of currentEntity.listTemplate[role.id]; let i = index" dnd-sortable (onDropSuccess)="updateDiffList(template,role.id)" [sortableIndex]="i" [dragEnabled]="role.id != 'dest' && template.item_type != 'entity_id'"> - <mat-icon color="primary" mat-list-icon [class]="template.item_type == 'entity_id' ? 'fa fa-sitemap' : 'fa fa-user'"></mat-icon> + <mat-icon color="primary" mat-list-icon [class]="template.item_type == 'entity_id' ? 'fa fa-sitemap' : 'fa fa-user'" [title]="role.id != 'dest' && template.item_type != 'entity_id' ? lang.move : lang.noMove"></mat-icon> <p mat-line>{{template.labelToDisplay}} <small style="opacity:0.5;">{{template.descriptionToDisplay}}</small> </p> @@ -263,8 +265,8 @@ <input #autocompleteFilter type="text" placeholder="{{lang.addVisaSignUser}}" matInput [matAutocomplete]="auto" [formControl]="userCtrl"> <mat-autocomplete #auto="matAutocomplete"> <mat-option *ngFor="let elem of filteredUsers | async" [value]="elem.id" (click)="addElemListModelVisa(elem);autocompleteFilter.isOpen=true"> - <p mat-line *ngIf="elem.type == 'user'"> - <span class="col-xm-1"> + <p mat-line *ngIf="elem.type == 'user'" style="margin:0;"> + <span class="col-xm-1" style="padding-right:5px;"> <mat-icon color="primary" class="fa fa-user fa-2x" style="margin-right:0px;"></mat-icon> </span> <span class="col-xm-11"> diff --git a/apps/maarch_entreprise/css/entities-administration.component.css b/apps/maarch_entreprise/css/entities-administration.component.css new file mode 100755 index 0000000000000000000000000000000000000000..bd3247a5c484adc1fcd7a7c540a8b40e90cc13c6 --- /dev/null +++ b/apps/maarch_entreprise/css/entities-administration.component.css @@ -0,0 +1,15 @@ +.mat-list-item[draggable="false"]:hover{ + background: inherit; +} + +.mat-list-item[draggable="false"]{ + cursor: not-allowed !important; +} + +.mat-list-item[draggable="true"]{ + cursor: pointer; +} + +.mat-list-item[draggable="true"] mat-icon{ + cursor: move; +} \ No newline at end of file diff --git a/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.ts index d3230ab4f5906add316c03bbdc8f1c841f7a7dc2..bc28a631402355425c67a9c7e23c309af404a246 100644 --- a/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.ts +++ b/apps/maarch_entreprise/js/angular/app/administration/entities-administration.component.ts @@ -15,6 +15,7 @@ declare var angularGlobals: any; @Component({ templateUrl: "../../../../Views/entities-administration.component.html", + styleUrls: ['../../../../css/entities-administration.component.css'], providers: [NotificationService] }) export class EntitiesAdministrationComponent extends AutoCompletePlugin implements OnInit { diff --git a/apps/maarch_entreprise/js/angular/lang/lang-en.ts b/apps/maarch_entreprise/js/angular/lang/lang-en.ts index 1f30fa77c39d4e48684b8f50f38e76133ac27de9..e214d18bd2d389016411e7cfb94dd18034f5f71f 100755 --- a/apps/maarch_entreprise/js/angular/lang/lang-en.ts +++ b/apps/maarch_entreprise/js/angular/lang/lang-en.ts @@ -108,6 +108,8 @@ export const LANG_EN = { "entityDeleted" : "Entité deleted", "entityFullName" : "Full name", "entityTooglePrimary" : "Pass to primary entity", + "entityTreeInfo" : "Click on entity tree to access entity informations", + "entityTreeInfoCreation" : "Click on entity tree to link the new entity to this", "entityType" : "Entity type", "entityUpdated" : "Entité updated", "entityReplacement" : "Entity replacement", @@ -202,6 +204,7 @@ export const LANG_EN = { "no" : "No", "noAttachment" : "No attachment", "noEntity" : "No entity", + "noMove" : "This entity / user cannot be moved", "noReplacement" : "No replacement", "notes" : "Notes", "notificationAdded" : "Notification added", diff --git a/apps/maarch_entreprise/js/angular/lang/lang-fr.ts b/apps/maarch_entreprise/js/angular/lang/lang-fr.ts index ea82a7144d6bf7ef5642798e863ab59fc6e78bac..bd48a4b1768bb626e308e243917c641e2fcc9a10 100755 --- a/apps/maarch_entreprise/js/angular/lang/lang-fr.ts +++ b/apps/maarch_entreprise/js/angular/lang/lang-fr.ts @@ -115,6 +115,8 @@ export const LANG_FR = { "entityDeleted" : "Entité supprimée", "entityFullName" : "Bloc arborescence", "entityTooglePrimary" : "Passage en entité primaire", + "entityTreeInfo" : "Cliquez sur une entité de l'arborescence pour accéder à ses informations", + "entityTreeInfoCreation" : "Cliquez sur une entité de l'arborescence pour associer la nouvelle entité à celle-ci", "entityType" : "Type d'entité", "entityUpdated" : "Entité modifiée", "entityReplacement" : "Remplacement de l'entité", @@ -217,6 +219,7 @@ export const LANG_FR = { "no" : "Non", "noAttachment" : "Sans pièce jointe", "noEntity" : "Aucune entité", + "noMove" : "Cette entité / utilisateur ne peut pas être déplacé", "noRecord" : "Aucun élément", "noReplacement" : "Aucun remplacement", "noResult" : "Aucun résultat",