286 lines
19 KiB
HTML
286 lines
19 KiB
HTML
<div class="profile-relation__tab-content" aria-label="{{'common.labels.task' | i18n}}" role="region" tabindex="0">
|
|
|
|
<div loading-spinner if="state.loadingTaskResources || state.processing" centered="true" overlay="true"></div>
|
|
|
|
<div ng-if="!state.loadingTaskResources">
|
|
<div class="clearfix">
|
|
|
|
<div class="profile-relation__add-relation-button dropdown" ng-if="ticket.accessMappings.relationsEditAllowed && ticket.accessMappings.tasksEditAllowed !== false">
|
|
<button type="button" class="btn_no-fill dropdown-toggle profile-relation__add-relation-button"
|
|
aria-label="{{'resourceSlice.task.add.label' | i18n}}" aria-haspopup="true" aria-expanded="false">
|
|
<i class="icon-plus"></i>
|
|
<span>{{'resourceSlice.task.add.label' | i18n}}</span>
|
|
<i class="navigation-bar__item-drop-pin_small"></i>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li>
|
|
<div class="dropdown-item" role="menuitem" ng-click="createBlankTask()" tabindex="0">{{'create.change.fromScratch.title' | i18n}}</div>
|
|
</li>
|
|
<li>
|
|
<div class="dropdown-item" role="menuitem" ng-click="createTaskFromTemplate()" tabindex="0">{{'resourceSlice.task.add.from.template' | i18n}}</div>
|
|
</li>
|
|
</ul>
|
|
<div class="border-mask"></div>
|
|
</div>
|
|
|
|
<button type="button" ng-if="relatedTasks.length > 0" class="btn_no-fill profile-relation__task-flow-button" ng-click="getURLforTaskFlow()"
|
|
aria-label="{{'resourceSlice.task.add.label' | i18n}}">
|
|
<i class="icon-uml"></i>
|
|
<span>{{'resourceSlice.task.flow.label' | i18n}}</span>
|
|
</button>
|
|
|
|
<div class="profile-relation__items-filter" ng-if="showPhaseFilter">
|
|
<label class="label_control-wrap">
|
|
<div class="dropdown-input dropdown">
|
|
<button type="button" class="btn_link dropdown-toggle" aria-label="{{'ticket.relatedTasks.phase.label' | i18n}}">
|
|
<i class="icon-filter"></i>
|
|
{{'ticket.relatedTasks.phase.label' | i18n}} {{currentTaskPhase.name}}
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li class="profile-relation__items-filter_option" ng-repeat="phase in allTaskPhases">
|
|
<a class="{{(phase.guid == currentTaskPhase.guid) ? 'dropdown-item_selected' : 'dropdown-item'}}" ng-click="filterTasksByPhase(phase)">
|
|
{{phase.name}}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="profile-relation__ordering-label">{{'ticket.relatedTasks.ordering.label' | i18n}}</div>
|
|
</div>
|
|
|
|
<div class="profile-relation__task-seq-controls" ng-if="ticket.accessMappings.relationsEditAllowed && ticket.accessMappings.tasksEditAllowed !== false
|
|
&& (relatedTasks.length > 1 || (relatedTasks.length === 1 && relatedTasks[0] && relatedTasks[0].length > 1))">
|
|
<div class="profile-relation__task-seq-actions clearfix" role="region" aria-label="{{'common.placeholder.editActions' | i18n}}">
|
|
<button type="submit" class="small-btn_primary" ng-click="onSaveClick()" ng-disabled="editableContentIsInvalid() || dataSaving || !dirty">{{'common.button.save' | i18n}}</button>
|
|
<button type="button" class="small-btn_secondary" ng-click="onRevertClick()" ng-disabled="dataSaving || !dirty">{{'common.button.revert' | i18n}}</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="profile-relation__no-relation" ng-if="!relatedTasks.length" tabindex="0">{{"resourceSlice.emptyList.savedTasks.label" | i18n}}</div>
|
|
|
|
<div ng-if="showPhaseFilter && currentTaskPhase.guid !== 'All' && relatedTasks.length" class="profile-relation__group-title "
|
|
ng-class="{'profile-relation__task-content' : ticket.accessMappings.relationsEditAllowed && ticket.accessMappings.tasksEditAllowed !== false
|
|
&& (relatedTasks.length > 1 || (relatedTasks.length === 1 && relatedTasks[0] && relatedTasks[0].length > 1))}"
|
|
role="heading" tabindex="0" aria-label="{{'ticket.relatedTasks.phase.label' | i18n}} {{currentTaskPhase.name}}">
|
|
{{'ticket.relatedTasks.phase.label' | i18n}} {{currentTaskPhase.name}}
|
|
</div>
|
|
|
|
<div class="profile-relation__task-container" ui-sortable="parentSortableOptions" ng-model="relatedTasks"
|
|
ng-if="!showPhaseFilter || (showPhaseFilter && currentTaskPhase.guid !== 'All')"
|
|
ng-class="{'profile-relation__task-content' : ticket.accessMappings.relationsEditAllowed && ticket.accessMappings.tasksEditAllowed !== false && !showPhaseFilter
|
|
&& (relatedTasks.length > 1 || (relatedTasks.length === 1 && relatedTasks[0] && relatedTasks[0].length > 1))}">
|
|
<div ng-repeat='task in relatedTasks | limitTo: state.itemsLimit' class="task-parent-item-container"
|
|
ng-class="{'locked': (task.length && !task[0].editable && !task[0].realObject.nestedTaskGroup) || (!task.length && !task.editable)}">
|
|
<div class="profile-relation__item-task-container">
|
|
<div ng-if="task.length" class="profile-relation__item-task-group">
|
|
<div class="profile-relation__item-task-group-sec1 row">
|
|
<div ng-if="!userModel.isAccessibleUser" class="profile-relation__item-task-group-btn" col-md-1>
|
|
<i class="icon-dots"></i>
|
|
</div>
|
|
<div ng-if="task[0]" class="profile-relation__group-title" ng-class="{'col-md-5' : task[0].realObject.nestedTaskGroup}"
|
|
role="heading" tabindex="0" aria-label="{{task[0].realObject.taskGroupName}}">
|
|
<input type="text" ng-model="task[0].realObject.mainSequence" class="profile-relation__item-task-group-seq-input col-md-4"
|
|
aria-label="{{'ticket.relatedTasks.task.group.label' | i18n}} {{'common.labels.sequence' | i18n}} {{task[0].realObject.mainSequence}}"
|
|
ng-if="!tasksDisabled && (task[0].editable || task[0].realObject.nestedTaskGroup)"
|
|
ng-focus="setFocus($event)" ng-change="updateParentSequence(task)">
|
|
<div class="profile-relation__item-task-group-header">
|
|
<span class="profile-relation__item-task-group-seq-text" ng-if="tasksDisabled || (!task[0].editable && !task[0].realObject.nestedTaskGroup)">
|
|
{{task[0].realObject.mainSequence}}
|
|
</span>
|
|
<span class="profile-relation__item-task-group-title">{{'ticket.relatedTasks.task.group.label' | i18n}}{{task[0].realObject.taskGroupName}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="profile-relation__item-task-nesting-container col-md-6" ng-if="task[0] && task[0].realObject.nestedTaskGroup">
|
|
<div class="profile-relation__item-task-nesting-icon col-md-1">
|
|
<i class="icon-exclamation_triangle"></i>
|
|
</div>
|
|
<div class="profile-relation__item-task-nesting-text col-md-11">
|
|
<div>{{'common.label.viewOnly' | i18n}}</div>
|
|
<div>{{'ticket.relatedTasks.nesting.label' | i18n}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="profile-relation__task-group-container" ui-sortable="childSortableOptions" ng-model="task">
|
|
<div ng-repeat="childTask in task" class="profile-relation__item-task-group-sec2"
|
|
ng-class="{'locked': !childTask.editable || childTask.realObject.taskGroupType === 'Standard'}">
|
|
<div class="profile-relation__item profile-relation__item-task-child clearfix">
|
|
<div ng-if="!userModel.isAccessibleUser" class="profile-relation__item-task-col profile-relation__item-task-col1">
|
|
<i class="icon-dots"></i>
|
|
</div>
|
|
<div class="profile-relation__item-task-col profile-relation__item-task-col2">
|
|
<input id="taskGroupChildTask-{{childTask.displayId}}" type="text" step="0.1" ng-model="childTask.realObject.childSequence" class="profile-relation__item-task-seq-input"
|
|
aria-label="{{childTask.displayId}} {{'common.labels.sequence' | i18n}} {{childTask.realObject.mainSequence}}.{{childTask.realObject.sequence ? childTask.realObject.sequence : 1 }}"
|
|
ng-if="!tasksDisabled && childTask.editable && childTask.realObject.taskGroupType === 'Sequencing'"
|
|
ng-focus="setFocus($event)" ng-change="updateChildSequence(task, childTask, 'taskGroupChildTask-{{childTask.displayId}}')">
|
|
<div tabindex="0" ng-if="(tasksDisabled || !childTask.editable) && childTask.realObject.taskGroupType !== 'Standard'">
|
|
{{childTask.realObject.mainSequence}}.{{childTask.realObject.sequence ? childTask.realObject.sequence : 1 }}
|
|
</div>
|
|
</div>
|
|
<div class="profile-relation__item-task-col3 profile-relation__item-task-details" ui-sref="task({id: childTask.id})" tabindex="0">
|
|
<div class="profile-relation__item-task-icon" ng-class="'icon-'+childTask.type"></div>
|
|
<div class="profile-relation__item-task-details clearfix">
|
|
<div class="col-xs-8 nowrap-line">
|
|
<a entity-profile-link="childTask">{{childTask.displayId}}: {{childTask.realObject.summary}}</a>
|
|
<div>{{childTask.realObject.desc}}</div>
|
|
</div>
|
|
|
|
<div class="col-xs-3">
|
|
<div>{{childTask.realObject.status.value | localizeLabel: 'status':'task'}}</div>
|
|
<div class="ticket-tasks__related-task-assignee" ng-if="childTask.realObject.assignee.fullName">{{'common.labels.assignee' | i18n}}</div>
|
|
<a ng-if="childTask.realObject.assignee.fullName" href="#/person/{{childTask.realObject.assignee.loginId | escape}}">{{childTask.realObject.assignee.fullName}}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div ng-if="!task.length" class="profile-relation__item profile-relation__item-task clearfix" role="heading"
|
|
aria-labelledby="taskContentInfo_{{task.displayId}}">
|
|
<div ng-if="!userModel.isAccessibleUser" class="profile-relation__item-task-col profile-relation__item-task-col1">
|
|
<i class="icon-dots"></i>
|
|
</div>
|
|
<div class="profile-relation__item-task-col profile-relation__item-task-col2">
|
|
<input type="text" ng-model="task.realObject.mainSequence" class="profile-relation__item-task-seq-input"
|
|
aria-label="{{task.displayId}} {{'common.labels.sequence' | i18n}} {{task.realObject.mainSequence}}"
|
|
ng-if="!tasksDisabled && task.editable" ng-focus="setFocus($event)" ng-change="updateTaskSequence(task)">
|
|
<div tabindex="0" ng-if="tasksDisabled || !task.editable">{{task.realObject.mainSequence}}</div>
|
|
</div>
|
|
<div class="profile-relation__item-task-col3 profile-relation__item-task-details" ui-sref="task({id: task.id})" tabindex="0">
|
|
<div class="profile-relation__item-task-icon" ng-class="'icon-'+ task.type + task.subType"></div>
|
|
<div class="profile-relation__item-task-details clearfix">
|
|
<div class="col-xs-8 nowrap-line">
|
|
<a entity-profile-link="task">{{task.displayId}}: {{task.realObject.summary}}</a>
|
|
<div>{{task.realObject.desc}}</div>
|
|
</div>
|
|
|
|
<div class="col-xs-3">
|
|
<div>{{task.realObject.status.value | localizeLabel: 'status':'task'}}</div>
|
|
<div class="ticket-tasks__related-task-assignee" ng-if="task.realObject.assignee.fullName">{{'common.labels.assignee' | i18n}}</div>
|
|
<a ng-if="task.realObject.assignee.fullName" href="#/person/{{task.realObject.assignee.loginId | escape}}">{{task.realObject.assignee.fullName}}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- phase tasks start -->
|
|
<div ng-if="showPhaseFilter && currentTaskPhase.guid === 'All'"
|
|
ng-class="{'profile-relation__task-content' : ticket.accessMappings.relationsEditAllowed && ticket.accessMappings.tasksEditAllowed !== false
|
|
&& (relatedTasks.length > 1 || (relatedTasks.length === 1 && relatedTasks[0] && relatedTasks[0].length > 1))}">
|
|
<div ng-repeat="phaseTasks in phaseTaskGroups" ng-init="phaseIndex = $index">
|
|
<div class="profile-relation__group-title" ng-if="phaseTasks[0]" role="heading" tabindex="0"
|
|
aria-label="{{'ticket.relatedTasks.phase.label' | i18n}} {{phaseTasks[0].length ? phaseTasks[0][0].realObject.phaseGuid : phaseTasks[0].realObject.phaseGuid}}">
|
|
{{'ticket.relatedTasks.phase.label' | i18n}} {{phaseTasks[0].length ? phaseTasks[0][0].realObject.phaseName : phaseTasks[0].realObject.phaseName}}
|
|
</div>
|
|
<div class="profile-relation__task-container" ui-sortable="parentSortableOptions" ng-model="phaseTasks">
|
|
<div ng-repeat='task in phaseTasks | limitTo: state.phaseItemsLimit[phaseIndex]' class="task-parent-item-container"
|
|
ng-class="{'locked': (task.length && !task[0].editable && !task[0].realObject.nestedTaskGroup) || (!task.length && !task.editable)}">
|
|
<div class="profile-relation__item-task-container">
|
|
<div ng-if="task.length" class="profile-relation__item-task-group">
|
|
<div class="profile-relation__item-task-group-sec1 row">
|
|
<div class="profile-relation__item-task-group-btn" col-md-1>
|
|
<i class="icon-dots"></i>
|
|
</div>
|
|
<div ng-if="task[0]" class="profile-relation__group-title" ng-class="{'col-md-5' : task[0].realObject.nestedTaskGroup}"
|
|
role="heading" tabindex="0" aria-label="{{task[0].realObject.taskGroupName}}">
|
|
<input type="text" ng-model="task[0].realObject.mainSequence" class="profile-relation__item-task-group-seq-input col-md-4"
|
|
aria-label="{{'ticket.relatedTasks.task.group.label' | i18n}} {{'common.labels.sequence' | i18n}} {{task[0].realObject.mainSequence}}"
|
|
ng-if="!tasksDisabled && (task[0].editable || task[0].realObject.nestedTaskGroup)"
|
|
ng-focus="setFocus($event)" ng-change="updateParentSequence(task)">
|
|
<div class="profile-relation__item-task-group-header">
|
|
<span class="profile-relation__item-task-group-seq-text" ng-if="tasksDisabled || (!task[0].editable && !task[0].realObject.nestedTaskGroup)">
|
|
{{task[0].realObject.mainSequence}}
|
|
</span>
|
|
<span class="profile-relation__item-task-group-title">{{'ticket.relatedTasks.task.group.label' | i18n}}{{task[0].realObject.taskGroupName}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="profile-relation__item-task-nesting-container col-md-6" ng-if="task[0] && task[0].realObject.nestedTaskGroup">
|
|
<div class="profile-relation__item-task-nesting-icon col-md-1">
|
|
<i class="icon-exclamation_triangle"></i>
|
|
</div>
|
|
<div class="profile-relation__item-task-nesting-text col-md-11">
|
|
<div>{{'common.label.viewOnly' | i18n}}</div>
|
|
<div>{{'ticket.relatedTasks.nesting.label' | i18n}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="profile-relation__task-group-container" ui-sortable="childSortableOptions" ng-model="task">
|
|
<div ng-repeat="childTask in task" class="profile-relation__item-task-group-sec2"
|
|
ng-class="{'locked': !childTask.editable || childTask.realObject.taskGroupType === 'Standard'}">
|
|
<div class="profile-relation__item profile-relation__item-task-child clearfix">
|
|
<div class="profile-relation__item-task-col profile-relation__item-task-col1">
|
|
<i class="icon-dots"></i>
|
|
</div>
|
|
<div class="profile-relation__item-task-col profile-relation__item-task-col2">
|
|
<input id="allPhaseTaskGroupChildTask-{{childTask.displayId}}" type="text" ng-model="childTask.realObject.childSequence" class="profile-relation__item-task-seq-input"
|
|
aria-label="{{childTask.displayId}} {{'common.labels.sequence' | i18n}} {{childTask.realObject.mainSequence}}.{{childTask.realObject.sequence ? childTask.realObject.sequence : 1 }}"
|
|
ng-if="!tasksDisabled && childTask.editable && childTask.realObject.taskGroupType === 'Sequencing'"
|
|
ng-focus="setFocus($event)" ng-change="updateChildSequence(task, childTask, 'allPhaseTaskGroupChildTask-{{childTask.displayId}}')">
|
|
<div tabindex="0" ng-if="tasksDisabled || !childTask.editable || childTask.realObject.taskGroupType === 'Standard'">
|
|
{{childTask.realObject.mainSequence}}.{{childTask.realObject.sequence ? childTask.realObject.sequence : 1 }}
|
|
</div>
|
|
</div>
|
|
<div class="profile-relation__item-task-col3 profile-relation__item-task-details" ui-sref="task({id: childTask.id})" tabindex="0">
|
|
<div class="profile-relation__item-task-icon" ng-class="'icon-'+childTask.type"></div>
|
|
<div id="taskContentInfo_{{childTask.displayId}}" class="profile-relation__item-task-details clearfix">
|
|
<div class="col-xs-8 nowrap-line">
|
|
<a entity-profile-link="childTask">{{childTask.displayId}}: {{childTask.realObject.summary}}</a>
|
|
<div>{{childTask.realObject.desc}}</div>
|
|
</div>
|
|
|
|
<div class="col-xs-3">
|
|
<div>{{childTask.realObject.status.value | localizeLabel: 'status':'task'}}</div>
|
|
<div class="ticket-tasks__related-task-assignee" ng-if="childTask.realObject.assignee.fullName">{{'common.labels.assignee' | i18n}}</div>
|
|
<a ng-if="childTask.realObject.assignee.fullName" href="#/person/{{childTask.realObject.assignee.loginId | escape}}">{{childTask.realObject.assignee.fullName}}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div ng-if="!task.length" class="profile-relation__item profile-relation__item-task clearfix" role="heading"
|
|
aria-labelledby="taskContentInfo_{{task.displayId}}">
|
|
<div class="profile-relation__item-task-col profile-relation__item-task-col1">
|
|
<i class="icon-dots"></i>
|
|
</div>
|
|
<div class="profile-relation__item-task-col profile-relation__item-task-col2">
|
|
<input type="text" ng-model="task.realObject.mainSequence" class="profile-relation__item-task-seq-input"
|
|
aria-label="{{task.displayId}} {{'common.labels.sequence' | i18n}} {{task.realObject.mainSequence}}"
|
|
ng-if="!tasksDisabled && task.editable" ng-focus="setFocus($event)" ng-change="updateTaskSequence(task)">
|
|
<span ng-if="tasksDisabled || !task.editable">{{task.realObject.mainSequence}}</span>
|
|
</div>
|
|
<div class="profile-relation__item-task-col3 profile-relation__item-task-details" ui-sref="task({id: task.id})" tabindex="0">
|
|
<div class="profile-relation__item-task-icon" ng-class="'icon-'+task.type"></div>
|
|
<div id="taskContentInfo_{{task.displayId}}" class="profile-relation__item-task-details clearfix">
|
|
<div class="col-xs-8 nowrap-line">
|
|
<a entity-profile-link="task">{{task.displayId}}: {{task.realObject.summary}}</a>
|
|
<div>{{task.realObject.desc}}</div>
|
|
</div>
|
|
|
|
<div class="col-xs-3">
|
|
<div>{{task.realObject.status.value | localizeLabel: 'status':'task'}}</div>
|
|
<div class="ticket-tasks__related-task-assignee" ng-if="task.realObject.assignee.fullName">{{'common.labels.assignee' | i18n}}</div>
|
|
<a ng-if="task.realObject.assignee.fullName" href="#/person/{{task.realObject.assignee.loginId | escape}}">{{task.realObject.assignee.fullName}}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<show-more-less limit="state.phaseItemsLimit[phaseIndex]" size="{{phaseTasks.length}}"></show-more-less>
|
|
</div>
|
|
</div>
|
|
<!-- phase tasks end -->
|
|
|
|
</div>
|
|
|
|
<show-more-less ng-if="!showPhaseFilter || (showPhaseFilter && currentTaskPhase.guid !== 'All')" limit="state.itemsLimit" size="{{relatedTasks.length}}"></show-more-less>
|
|
|
|
</div> |