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-relation-row/wp-relation-row.template.html

75 lines
3.6 KiB

<div class="relation-row"
ng-mouseover="$ctrl.showRelationControls = true"
ng-mouseleave="$ctrl.showRelationControls = false">
<div class="grid-block hierarchy-item">
<div class="grid-content medium-3 collapse" aria-hidden="true">
{{ $ctrl.relation.type }}
</div>
<div class="grid-content medium-5 collapse" wp-single-relation
ng-if="$ctrl.relatedWorkPackage">
<a href="{{ singleRelationCtrl.workPackagePath($ctrl.relatedWorkPackage.id) }}"
class="wp-relations--subject-field"
aria-label="{{ $ctrl.relation.type + ' ' + singleRelationCtrl.getFullIdentifier($ctrl.relatedWorkPackage, true) }}">
{{ singleRelationCtrl.getFullIdentifier($ctrl.relatedWorkPackage, true) }}
</a>
</div>
<div class="grid-content medium-2 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"
execute="$ctrl.showRelationInfo = !$ctrl.showRelationInfo">
<icon-wrapper icon-name="info1"
icon-title="'Info for related workpackage'">
</icon-wrapper>
</accessible-by-keyboard>
<accessible-by-keyboard ng-show="$ctrl.showRelationControls"
ng-if="$ctrl.relation.delete"
execute="$ctrl.removeRelation($ctrl.relation)"
aria-hidden="false"
class="-shown-in-accessibility-mode">
<icon-wrapper icon-name="remove"
icon-title="{{ ::$ctrl.text.removeButton }}">
</icon-wrapper>
</accessible-by-keyboard>
</div>
</div>
<div class="grid-block hierarchy-item" style="border: 1px dotted lightblue; padding:4px;" ng-show="$ctrl.showRelationInfo" ng-init="editDescription = false">
<div class="grid-content medium-10 collapse">
<div ng-hide="$ctrl.showEditForm">
{{$ctrl.relation.description || 'no description set'}}
</div>
<div ng-show="$ctrl.showEditForm">
<input type="text" ng-model="$ctrl.relation.description" />
</div>
</div>
<div class="grid-content medium-2 collapse" style="text-align: right" ng-hide="$ctrl.showEditForm">
<accessible-by-keyboard execute="$ctrl.showEditForm = true">
<icon-wrapper icon-name="edit"
icon-title="'edit description'">
</icon-wrapper>
</accessible-by-keyboard>
</div>
<div class="grid-content medium-2 collapse" style="text-align: right" ng-show="$ctrl.showEditForm">
<accessible-by-keyboard execute="$ctrl.saveDescription()">
<icon-wrapper icon-name="checkmark"
icon-title="save description'">
</icon-wrapper>
</accessible-by-keyboard>
<accessible-by-keyboard execute="$ctrl.showEditForm = false">
<icon-wrapper icon-name="remove"
icon-title="cancel editing'">
</icon-wrapper>
</accessible-by-keyboard>
</div>
</div>
</div>