|
|
@ -1,73 +1,88 @@ |
|
|
|
<div ng-class="['relation', relationType]"> |
|
|
|
<div ng-class="['relation', $ctrl.relationType]"> |
|
|
|
<h3> |
|
|
|
<h3> |
|
|
|
<accessible-by-keyboard execute="toggleExpand()" |
|
|
|
<accessible-by-keyboard execute="$ctrl.toggleExpand()" |
|
|
|
link-class="{{ relationType }}-toggle-link"> |
|
|
|
link-class="{{ $ctrl.relationType }}-toggle-link"> |
|
|
|
<i class="icon-pull-content" ng-class="stateClass"></i> {{ title }} |
|
|
|
<i class="icon-pull-content" ng-class="$ctrl.stateClass"></i> {{ $ctrl.text.title }} |
|
|
|
<span ng-if="!handler.isSingletonRelation">({{ handler.getCount() }})</span> |
|
|
|
<span ng-if="$ctrl.relationType !== 'parent'"> |
|
|
|
|
|
|
|
({{ $ctrl.handler.getCount() }}) |
|
|
|
|
|
|
|
</span> |
|
|
|
</accessible-by-keyboard> |
|
|
|
</accessible-by-keyboard> |
|
|
|
</h3> |
|
|
|
</h3> |
|
|
|
<div class="content" ng-show="expand"> |
|
|
|
<div class="content" ng-show="$ctrl.expand"> |
|
|
|
<div class="workpackages"> |
|
|
|
<div class="workpackages"> |
|
|
|
<div ng-if="handler.relations"> |
|
|
|
<div ng-if="handler.relations"> |
|
|
|
<table class="attributes-table"> |
|
|
|
<table class="attributes-table"> |
|
|
|
<colgroup> |
|
|
|
<colgroup> |
|
|
|
<col style="width: 50%" /> |
|
|
|
<col style="width: 50%"/> |
|
|
|
<col style="width: 15%" /> |
|
|
|
<col style="width: 15%"/> |
|
|
|
<col /> |
|
|
|
<col/> |
|
|
|
<col style="width: 1rem" /> |
|
|
|
<col style="width: 1rem"/> |
|
|
|
</colgroup> |
|
|
|
</colgroup> |
|
|
|
<thead> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<td title="{{ I18n.t('js.work_packages.properties.subject')}}">{{ I18n.t('js.work_packages.properties.subject') }}</td> |
|
|
|
<td title="{{ $ctrl.text.table.subject }}">{{ $ctrl.text.table.subject }}</td> |
|
|
|
<td title="{{ I18n.t('js.work_packages.properties.status')}}">{{ I18n.t('js.work_packages.properties.status') }}</td> |
|
|
|
<td title="{{ $ctrl.text.table.status }}">{{ $ctrl.text.table.status }}</td> |
|
|
|
<td title="{{ I18n.t('js.work_packages.properties.assignee')}}">{{ I18n.t('js.work_packages.properties.assignee') }}</td> |
|
|
|
<td title="{{ $ctrl.text.table.assignee }}">{{ $ctrl.text.table.assignee }}</td> |
|
|
|
<td></td> |
|
|
|
<td></td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<tbody> |
|
|
|
<tr wp-relation-row |
|
|
|
<tr wp-relation-row |
|
|
|
ng-repeat="relation in handler.relations"> |
|
|
|
ng-repeat="relation in $ctrl.handler.relations"> |
|
|
|
<td focus="isFocused($index)"> |
|
|
|
<td focus="$ctrl.isFocused($index)"> |
|
|
|
<a title="{{ fullIdentifier }}" class="work_package" ng-class="state" href="{{ workPackagePath(relatedWorkPackage.props.id) }}"> |
|
|
|
<a title="{{ fullIdentifier }}" class="work_package" ng-class="state" |
|
|
|
{{ fullIdentifier }} |
|
|
|
href="{{ workPackagePath(relatedWorkPackage.id) }}"> |
|
|
|
</a> |
|
|
|
{{ fullIdentifier }} |
|
|
|
</td> |
|
|
|
</a> |
|
|
|
<td title="{{ relatedWorkPackage.embedded.status.props.name }}">{{ relatedWorkPackage.embedded.status.props.name }}</td> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<td title="{{ relatedWorkPackage.status.name }}"> |
|
|
|
<a ng-if="relatedWorkPackage.embedded.assignee && relatedWorkPackage.embedded.assignee.props.subtype != 'Group'" title="{{ relatedWorkPackage.embedded.assignee.props.name }}" href="{{ userPath(relatedWorkPackage.embedded.assignee.props.id) }}"> |
|
|
|
{{ relatedWorkPackage.status.name }} |
|
|
|
{{ relatedWorkPackage.embedded.assignee.props.name }} |
|
|
|
</td> |
|
|
|
</a> |
|
|
|
<td> |
|
|
|
<span ng-if="relatedWorkPackage.embedded.assignee && relatedWorkPackage.embedded.assignee.props.subtype == 'Group'"> |
|
|
|
<a |
|
|
|
{{ relatedWorkPackage.embedded.assignee.props.name }} |
|
|
|
ng-if="relatedWorkPackage.assignee |
|
|
|
|
|
|
|
&& relatedWorkPackage.assignee.subtype != 'Group'" |
|
|
|
|
|
|
|
title="{{ relatedWorkPackage.assignee.name }}" |
|
|
|
|
|
|
|
href="{{ userPath(relatedWorkPackage.assignee.id) }}"> |
|
|
|
|
|
|
|
{{ relatedWorkPackage.assignee.name }} |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
<span ng-if="relatedWorkPackage.assignee |
|
|
|
|
|
|
|
&& relatedWorkPackage.assignee.subtype == 'Group'"> |
|
|
|
|
|
|
|
{{ relatedWorkPackage.assignee.name }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<empty-element ng-if="!relatedWorkPackage.embedded.assignee"></empty-element> |
|
|
|
<empty-element ng-if="!relatedWorkPackage.assignee"></empty-element> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td class="icon"> |
|
|
|
<td class="icon"> |
|
|
|
<accessible-by-keyboard ng-if="handler.canDeleteRelation(relation)" |
|
|
|
<accessible-by-keyboard ng-if="$ctrl.handler.canDeleteRelation(relation)" |
|
|
|
execute="handler.removeRelation(this)"> |
|
|
|
execute="$ctrl.handler.removeRelation(this)"> |
|
|
|
<icon-wrapper icon-name="remove" |
|
|
|
<icon-wrapper icon-name="remove" |
|
|
|
icon-title="{{ I18n.t('js.relations.remove') }}"> |
|
|
|
icon-title="{{ $ctrl.text.relations.remove }}"> |
|
|
|
</icon-wrapper> |
|
|
|
</icon-wrapper> |
|
|
|
</accessible-by-keyboard> |
|
|
|
</accessible-by-keyboard> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
|
|
</tbody> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div ng-if="handler.isEmpty()"> |
|
|
|
<div ng-if="$ctrl.handler.isEmpty()"> |
|
|
|
{{ I18n.t('js.relations.empty') }} |
|
|
|
{{ $ctrl.text.relations.empty }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="add-relation" ng-if="handler.canAddRelation()" ng-switch="handler.type" focus="isFocused(-1)"> |
|
|
|
<div |
|
|
|
|
|
|
|
class="add-relation" |
|
|
|
|
|
|
|
ng-if="$ctrl.handler.canAddRelation()" |
|
|
|
|
|
|
|
ng-switch="$ctrl.handler.type" |
|
|
|
|
|
|
|
focus="$ctrl.isFocused(-1)" |
|
|
|
|
|
|
|
> |
|
|
|
<!-- Add WP child --> |
|
|
|
<!-- Add WP child --> |
|
|
|
<button |
|
|
|
<button |
|
|
|
ng-switch-when="child" |
|
|
|
ng-switch-when="child" |
|
|
|
class="button add-work-package-child-button" |
|
|
|
class="button add-work-package-child-button" |
|
|
|
title="{{ btnTitle }}" |
|
|
|
title="{{ $ctrl.btnTitle }}" |
|
|
|
ng-bind-html="btnIcon + ' ' + btnTitle" |
|
|
|
ng-bind-html="$ctrl.btnIcon + ' ' + $ctrl.btnTitle" |
|
|
|
ng-click="handler.addRelation()" |
|
|
|
ng-click="$ctrl.handler.addRelation()" |
|
|
|
focus="focusElementIndex === -1" |
|
|
|
focus="$ctrl.focusElementIndex === -1" |
|
|
|
></button> |
|
|
|
></button> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|