OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/frontend/app/components/wp-relations/wp-relations-hierarchy-row/wp-relations-hierarchy-row....

56 lines
2.9 KiB

<div class="relation-row"
ng-mouseover="$ctrl.showRelationControls = true"
ng-mouseleave="$ctrl.showRelationControls = false">
<div class="grid-block v-align hierarchy-item"
ng-if="!$ctrl.showEditForm && $ctrl.relatedWorkPackage">
<div class="grid-content medium-7 collapse" wp-single-relation>
<span ng-style="{'padding-left': $ctrl.indentBy + 'px'}"
class="wp-relations-hierarchy-subject">
<a href="{{ singleRelationCtrl.workPackagePath($ctrl.relatedWorkPackage.id) }}"
title="{{ singleRelationCtrl.getFullIdentifier($ctrl.relatedWorkPackage) }}"
ng-if="!$ctrl.isCurrentElement()"
ng-attr-id="{{ $ctrl.relationType === 'parent' ? 'hierarchy--parent' : ''}}">
{{ singleRelationCtrl.getFullIdentifier($ctrl.relatedWorkPackage) }}
</a>
<span ng-if="$ctrl.isCurrentElement()"
title="{{$singleRelation.getFullIdentifier($ctrl.relatedWorkPackage)}}">
{{ singleRelationCtrl.getFullIdentifier($ctrl.relatedWorkPackage) }}
</span>
</span>
</div>
<div class="grid-content medium-3 collapse wp-relations-status-field">
<div wp-edit-form="$ctrl.relatedWorkPackage" ng-if="$ctrl.relatedWorkPackage">
<div wp-edit-field="'status'">
</div>
</div>
</div>
<div class="grid-content medium-2 collapse wp-relations-controls-section">
<accessible-by-keyboard ng-show="$ctrl.showRelationControls"
ng-if="$ctrl.relationType === 'parent'"
aria-hidden="false"
execute="$ctrl.showEditForm = true"
class="-shown-in-accessibility-mode">
<icon-wrapper icon-name="edit"
icon-title="{{ ::$ctrl.text.change_parent }}">
</icon-wrapper>
</accessible-by-keyboard>
<accessible-by-keyboard ng-show="$ctrl.showRelationControls"
ng-if="$ctrl.relationType"
aria-hidden="false"
execute="$ctrl.removeRelation()"
class="-shown-in-accessibility-mode">
<icon-wrapper icon-name="remove"
icon-title="{{ ::$ctrl.text.remove }}">
</icon-wrapper>
</accessible-by-keyboard>
</div>
</div>
<div ng-if="$ctrl.relationType === 'parent' && !$ctrl.relatedWorkPackage || $ctrl.showEditForm">
<wp-relations-create template="empty-parents"
fixed-relation-type="parent"
external-form-toggle="$ctrl.showEditForm"
work-package="$ctrl.workPackage"></wp-relations-create>
</div>
</div>