2020-05-13 14:41:43 +02:00
|
|
|
<app-meta-layout>
|
|
|
|
|
<div class="max-width-container">
|
2020-06-23 18:56:29 +02:00
|
|
|
<div class="head" *ngIf="project?.projectId">
|
2020-05-13 14:41:43 +02:00
|
|
|
<a [routerLink]="[ '/projects' ]" mat-icon-button>
|
|
|
|
|
<mat-icon class="icon">arrow_back</mat-icon>
|
|
|
|
|
</a>
|
|
|
|
|
<h1>{{ 'PROJECT.PAGES.TITLE' | translate }} {{project?.name}}</h1>
|
|
|
|
|
<ng-template appHasRole [appHasRole]="['project.write:'+projectId, 'project.write']">
|
2020-06-16 14:52:07 +02:00
|
|
|
<button mat-icon-button (click)="editstate = !editstate" aria-label="Edit project name"
|
2020-06-17 14:30:21 +02:00
|
|
|
*ngIf="isZitadel === false">
|
2020-05-13 14:41:43 +02:00
|
|
|
<mat-icon *ngIf="!editstate">edit</mat-icon>
|
|
|
|
|
<mat-icon *ngIf="editstate">close</mat-icon>
|
2020-06-16 14:52:07 +02:00
|
|
|
</button>
|
2020-05-13 14:41:43 +02:00
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
|
|
<div class="full-width">
|
|
|
|
|
<ng-container *ngIf="editstate">
|
|
|
|
|
<mat-form-field *ngIf="editstate && project?.name" class="formfield"
|
|
|
|
|
hintLabel="The name is required!">
|
|
|
|
|
<mat-label>Project Name</mat-label>
|
|
|
|
|
<input matInput [(ngModel)]="project.name" />
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
<button class="icon-button" *ngIf="editstate" mat-icon-button (click)="updateName()">
|
|
|
|
|
<mat-icon>check</mat-icon>
|
|
|
|
|
</button>
|
2020-06-17 14:30:21 +02:00
|
|
|
<button mat-stroked-button color="accent" [disabled]="isZitadel"
|
2020-05-13 14:41:43 +02:00
|
|
|
*ngIf="project?.state === ProjectState.PROJECTSTATE_ACTIVE" class="second"
|
|
|
|
|
(click)="changeState(ProjectState.PROJECTSTATE_INACTIVE)">{{'PROJECT.TABLE.DEACTIVATE' | translate}}</button>
|
2020-06-17 14:30:21 +02:00
|
|
|
<button mat-stroked-button color="accent" [disabled]="isZitadel"
|
2020-05-13 14:41:43 +02:00
|
|
|
*ngIf="project?.state === ProjectState.PROJECTSTATE_INACTIVE" class="second"
|
|
|
|
|
(click)="changeState(ProjectState.PROJECTSTATE_ACTIVE)">{{'PROJECT.TABLE.ACTIVATE' | translate}}</button>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<p class="desc">{{ 'PROJECT.PAGES.DESCRIPTION' | translate }}</p>
|
2020-06-17 14:30:21 +02:00
|
|
|
<p *ngIf="isZitadel" class="zitadel-warning">This belongs to Zitadel project. If you change something,
|
|
|
|
|
Zitadel
|
|
|
|
|
may not behave as intended!</p>
|
2020-05-13 14:41:43 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- show only on owned projects-->
|
2020-06-10 15:52:56 +02:00
|
|
|
<ng-container *ngIf="project">
|
2020-06-23 18:56:29 +02:00
|
|
|
<ng-template appHasRole [appHasRole]="['project.app.read:' + project.projectId, 'project.app.read']">
|
2020-05-13 14:41:43 +02:00
|
|
|
<app-project-application-grid *ngIf="grid"
|
2020-06-17 14:30:21 +02:00
|
|
|
[disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE || isZitadel"
|
2020-06-16 14:52:07 +02:00
|
|
|
(changeView)="grid = false" [projectId]="projectId"></app-project-application-grid>
|
2020-05-13 14:41:43 +02:00
|
|
|
<app-card *ngIf="!grid" title="{{ 'PROJECT.APP.TITLE' | translate }}">
|
|
|
|
|
<card-actions class="card-actions">
|
|
|
|
|
<button mat-icon-button (click)="grid = true">
|
2020-06-10 12:59:12 +02:00
|
|
|
<i matTooltip="show grid view" class="las la-th-large"></i>
|
2020-05-13 14:41:43 +02:00
|
|
|
</button>
|
|
|
|
|
</card-actions>
|
2020-06-16 14:52:07 +02:00
|
|
|
<app-project-applications
|
2020-06-17 14:30:21 +02:00
|
|
|
[disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE || isZitadel"
|
2020-05-13 14:41:43 +02:00
|
|
|
[projectId]="projectId"></app-project-applications>
|
|
|
|
|
</app-card>
|
|
|
|
|
</ng-template>
|
|
|
|
|
|
2020-06-17 14:30:21 +02:00
|
|
|
<ng-container *ngIf="isZitadel == false">
|
2020-06-23 18:56:29 +02:00
|
|
|
<ng-template appHasRole
|
|
|
|
|
[appHasRole]="['project.grant.read:' + project.projectId, 'project.grant.read']">
|
2020-05-13 14:41:43 +02:00
|
|
|
<app-card title="{{ 'PROJECT.GRANT.TITLE' | translate }}"
|
|
|
|
|
description="{{ 'PROJECT.GRANT.DESCRIPTION' | translate }}">
|
|
|
|
|
<app-project-grants [disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE"
|
|
|
|
|
[projectId]="projectId">
|
|
|
|
|
</app-project-grants>
|
|
|
|
|
</app-card>
|
|
|
|
|
</ng-template>
|
|
|
|
|
|
2020-06-23 18:56:29 +02:00
|
|
|
<ng-template appHasRole [appHasRole]="['project.role.read:' + project.projectId, 'project.role.read']">
|
2020-05-13 14:41:43 +02:00
|
|
|
<app-card title="{{ 'PROJECT.ROLE.TITLE' | translate }}"
|
|
|
|
|
description="{{ 'PROJECT.ROLE.DESCRIPTION' | translate }}">
|
|
|
|
|
<app-project-roles [disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE"
|
2020-06-09 17:12:35 +02:00
|
|
|
[actionsVisible]="true" [projectId]="projectId">
|
2020-05-13 14:41:43 +02:00
|
|
|
</app-project-roles>
|
|
|
|
|
</app-card>
|
|
|
|
|
</ng-template>
|
2020-07-01 17:48:34 +02:00
|
|
|
|
|
|
|
|
<ng-template appHasRole [appHasRole]="['user.grant.read']">
|
|
|
|
|
<app-card *ngIf="project?.projectId" title="{{ 'GRANTS.PROJECT.TITLE' | translate }}"
|
|
|
|
|
description="{{'GRANTS.PROJECT.DESCRIPTION' | translate }}">
|
2020-07-06 16:17:06 +02:00
|
|
|
<app-user-grants [context]="userGrantContext" [projectId]="projectId"
|
2020-07-01 17:48:34 +02:00
|
|
|
[allowCreate]="['user.grant.write'] | hasRole"
|
|
|
|
|
[allowDelete]="['user.grant.delete'] | hasRole">
|
|
|
|
|
</app-user-grants>
|
|
|
|
|
</app-card>
|
|
|
|
|
</ng-template>
|
2020-05-13 14:41:43 +02:00
|
|
|
</ng-container>
|
|
|
|
|
</ng-container>
|
|
|
|
|
</div>
|
|
|
|
|
<metainfo class="side">
|
|
|
|
|
<div class="details">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<span class="first">{{'PROJECT.TYPE.TITLE' | translate}}:</span>
|
2020-06-10 15:52:56 +02:00
|
|
|
<span class="second">{{'PROJECT.TYPE.'+ ProjectType.PROJECTTYPE_OWNED | translate}}</span>
|
2020-05-13 14:41:43 +02:00
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<span class="first">{{'PROJECT.STATE.TITLE' | translate}}:</span>
|
|
|
|
|
<span *ngIf="project && project.state !== undefined"
|
|
|
|
|
class="second">{{'PROJECT.STATE.'+project.state | translate}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2020-06-10 15:52:56 +02:00
|
|
|
<mat-tab-group mat-stretch-tabs class="tab-group" disablePagination="true">
|
|
|
|
|
<mat-tab label="Details">
|
2020-06-17 07:41:16 +02:00
|
|
|
<app-project-contributors *ngIf="project"
|
2020-06-10 15:52:56 +02:00
|
|
|
[disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE"
|
|
|
|
|
[projectType]="ProjectType.PROJECTTYPE_OWNED" [project]="project">
|
2020-06-17 07:41:16 +02:00
|
|
|
</app-project-contributors>
|
2020-06-10 15:52:56 +02:00
|
|
|
</mat-tab>
|
|
|
|
|
<mat-tab label="{{ 'CHANGES.PROJECT.TITLE' | translate }}" class="flex-col">
|
2020-06-23 18:56:29 +02:00
|
|
|
<app-changes *ngIf="project" [changeType]="ChangeType.PROJECT" [id]="project.projectId"></app-changes>
|
2020-06-10 15:52:56 +02:00
|
|
|
</mat-tab>
|
|
|
|
|
</mat-tab-group>
|
2020-05-13 14:41:43 +02:00
|
|
|
</metainfo>
|
|
|
|
|
</app-meta-layout>
|