EnVisageOnline/Main/Source/EnVisage/Content/templates/ActivityCalendar/projectGbrRow.html

84 lines
7.7 KiB
HTML

<tr ng-if="row.Initialized" ng-show="row.Show" class="row-with-buttons ac-level-{{row.Level}}">
<td class="headcol1 headcol-week expCat ac-row-name {{row.Children.length ? '' : 'editable-row' }}" ng-click="toggleRow(row, $event);">
<div class="ac-restbl">
<div>
<div class="ac-name buttons-2" title="{{ row.Name }}">
<span ng-if="!row.Children.length">{{ row.Name }}</span>
<a ng-if="row.Children.length">
<i class="fa" ng-attr-title="{{row.Collapsed ? 'Expand' : 'Collapse'}}" ng-class="{'fa-plus-square':row.Collapsed, 'fa-minus-square':!row.Collapsed}"></i>
{{ row.Name }}
</a>
</div>
<div style="text-align:right;">
<div ng-if="!row.Children.length">
<!-- We should disable buttons when resource is not editable and relates only to single EC. Otherwise we need to allow user to zero or delete resource. -->
<button title="Zero this resource" class="btn btn-success btn-xs" ng-if="!row.DisableResourceEdit" ng-disabled="!row.IsEditable" ng-click="zeroResource(row, null, resourceRow)"><i class="fa fa-minus"></i></button>
<button title="Remove this resource" class="btn btn-danger btn-xs" ng-if="row.CanBeRemoved" ng-disabled="!row.IsEditable" ng-click="removeResource(row, null, null, resourceRow, $index)"><i class="fa fa-times"></i></button>
</div>
</div>
<div ng-if="(row.InactiveScenarios != null && row.InactiveScenarios.length > 0 || row.ActiveScenario.Id != null)"
class="btn-group menuGroup" ng-popup-menu hide-popovers-container="ng-popup-menu-container">
<a class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-chevron-circle-down menu-arrow"></i>
</a>
<ul class="dropdown-menu dropdown-menu-form dropdown-menu-right dropdown-menu-scroll-auto" style="width: 472px; clear: both; z-index: 499;">
<li ng-if="row.ActiveScenario.Id != null && !row.ReadOnly">
<div style="float: left;">
Edit Project
</div>
<div style="float: right;">
<a ng-if="row.EditUrl" class="btn btn-xs btn-primary pull-right popover-warning popover-dark" style="width: 27px;"
title="Edit Project" data-checklock-url="{{ row.EditUrl }}" data-in-newtab data-toggle="popover" data-container="body" data-placement="left"
data-checklock-table="Project" data-checklock-id="{{row.Id}}" data-checklock-backname="{{ViewModel.DisplayMode.BackUrlTitle}}">
<i class="fa fa-edit"></i>
</a>
</div>
</li>
<li ng-if="row.ActiveScenario.Id != null">
<div style="-ms-text-overflow: ellipsis; -o-text-overflow: ellipsis; text-overflow: ellipsis; overflow: hidden; max-width: 340px; float: left;">
<a class="popover-warning popover-dark" data-toggle="popover" data-container="body" title="{{row.ActiveScenario.Name || 'empty'}}" data-checklock-backname="{{ViewModel.DisplayMode.BackUrlTitle}}"
data-checklock-table="Scenario" data-checklock-id="{{row.ActiveScenario.Id}}" data-checklock-url="/Scenarios/Details" data-in-newtab>{{ row.ActiveScenario.Name || 'empty' }}</a>
</div>
<div style="float: right;" ng-if="!row.ReadOnly">
<a class="btn btn-xs btn-warning popover-warning popover-dark" ng-click="ToggleStatus($event, row.Id, row.ActiveScenario)"
title="Deactivate" data-toggle="popover" data-container="body" data-placement="left" style="width: 27px;"><i class="fa fa-times-circle-o"></i></a>
<a class="btn btn-xs popover-warning popover-dark" data-toggle="popover" data-container="body" data-placement="left" title="Copy"
data-checklock-table="Scenario" data-checklock-id="{{row.ActiveScenario.Id}}" data-checklock-url="{{'/Scenarios/Details'}}"
data-checklock-query="ptab=copy" data-checklock-backname="{{ViewModel.DisplayMode.BackUrlTitle}}" style="width: 27px;"><i class="fa fa-copy"></i></a>
<a ng-click="AddScenario($event, row.Id)" data-toggle="popover" data-container="body" data-placement="left" class="btn btn-xs btn-success popover-warning popover-dark" title="Add Scenario" style="width: 27px;"><i class="fa fa-plus"></i></a>
</div>
</li>
<li class="divider" ng-if="(row.InactiveScenarios.length > 0)"></li>
<li ng-repeat="scenario in row.InactiveScenarios track by $index">
<div style="-ms-text-overflow: ellipsis; -o-text-overflow: ellipsis; text-overflow: ellipsis; overflow: hidden; max-width: 365px; float: left;">
<a class="popover-warning popover-dark" data-toggle="popover" data-container="body" title="{{scenario.Name || 'empty'}}" data-checklock-table="Scenario"
data-checklock-id="{{scenario.Id}}" data-checklock-url="/Scenarios/Details" data-in-newtab data-checklock-backname="{{ViewModel.DisplayMode.BackUrlTitle}}">{{ scenario.Name || 'empty' }}</a>
</div>
<div style="float: right;" ng-if="!row.ReadOnly">
<a ng-click="ToggleStatus($event, row.Id, scenario)" class="btn btn-xs btn-primary popover-warning popover-dark"
title="Activate" data-toggle="popover" data-container="body" data-placement="left"><i class="fa fa-check-circle-o"></i></a>
<a class="btn btn-xs popover-warning popover-dark" data-toggle="popover" data-container="body" data-placement="left" title="Copy"
data-checklock-table="Scenario" data-checklock-id="{{scenario.Id}}" data-checklock-url="{{'/Scenarios/Details'}}"
data-checklock-query="ptab=copy" data-checklock-backname="{{ViewModel.DisplayMode.BackUrlTitle}}"><i class="fa fa-copy"></i></a>
</div>
</li>
</ul>
</div>
</div>
</div>
</td>
<td class="ac-row-total">
<div class="ac-total">
<a ng-if="row.IsEditable && !row.IsMultipleECs" href="javascript:void(0)" editable-text="row.TotalValue" e-name="ColValue" e-ng-blur="onTxtBlur(this);" onshow="watchKeyInput(this)" buttons="no"
blur="submit" onbeforesave="checkResourceGrandTotalValueTopPart(row, resourceRow, $data)" e-required>
{{ (row.TotalValue || 0 | number:2) }}
</a>
<span ng-if="!row.IsEditable || row.IsMultipleECs" ng-attr-title='{{ row.IsMultipleECs ? "This resource is in more than one ECs/Project Roles. Please switch to \"Group by Project\" or \"Group by Team\" mode to edit" : "" }}'>
{{ (row.TotalValue || 0 | number:2) }}
</span>
</div>
</td>
</tr>
<!-- Project Parts -->
<tr ng-if="row.IsMaster && part.Initialized" ng-repeat="part in row.Children" grid-row templateUrl="{{part.Templates.Main}}" ng-init="row = part"></tr>