115 lines
6.9 KiB
Plaintext
115 lines
6.9 KiB
Plaintext
@using EnVisage.Models.ProjectDependencies
|
|
@model DependencyResolveModel.ProjectItem
|
|
@{
|
|
var label = string.Empty;
|
|
var dates = string.Empty;
|
|
if (Model.Type == (short)ProjectDependencyModel.ProjectDependencyType.Link)
|
|
{
|
|
label = "links to ";
|
|
if (Model.ProjectId == Model.SourceProjectId)
|
|
{
|
|
label += Model.TargetProjectName;
|
|
}
|
|
else
|
|
{
|
|
label += Model.SourceProjectName;
|
|
}
|
|
}
|
|
else if (Model.ProjectId == Model.SourceProjectId)
|
|
{
|
|
label = "starts before " + Model.TargetProjectName;
|
|
}
|
|
else
|
|
{
|
|
label += "starts after " + Model.SourceProjectName;
|
|
}
|
|
if (Model.ProjectId == Model.SourceProjectId)
|
|
{
|
|
if (Model.SourceStartDate.HasValue && Model.SourceEndDate.HasValue)
|
|
{
|
|
dates = " (" + Model.SourceStartDate.Value.ToShortDateString() + " - " +
|
|
Model.SourceEndDate.Value.ToShortDateString() + ")";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (Model.TargetStartDate.HasValue && Model.TargetEndDate.HasValue)
|
|
{
|
|
dates = " (" + Model.TargetStartDate.Value.ToShortDateString() + " - " +
|
|
Model.TargetEndDate.Value.ToShortDateString() + ")";
|
|
}
|
|
}
|
|
}
|
|
<div class="form-group item" style="width: 100%; padding-bottom: 8px;">
|
|
<div class="radio-group-sigle-line">
|
|
@Html.HiddenFor(model => model.ProjectId, new { @class = "item-project-id" })
|
|
@Html.HiddenFor(model => model.SourceProjectId, new { @class = "item-sourceproject-id" })
|
|
@Html.HiddenFor(model => model.TargetProjectId, new { @class = "item-targetproject-id" })
|
|
@Html.HiddenFor(model => model.Id, new { @class = "item-id" })
|
|
@Html.HiddenFor(model => model.Level, new { @class = "item-level" })
|
|
@Html.HiddenFor(model => model.ProjectName, new { @class = "item-project-name" })
|
|
@Html.HiddenFor(model => model.SourceEndDate, new { @class = "item-source-end-date" })
|
|
@Html.HiddenFor(model => model.SourceProjectName, new { @class = "item-sourceproject-name" })
|
|
@Html.HiddenFor(model => model.SourceStartDate, new { @class = "item-source-start-date" })
|
|
@Html.HiddenFor(model => model.TargetEndDate, new { @class = "item-target-end-date" })
|
|
@Html.HiddenFor(model => model.TargetProjectName, new { @class = "item-targetproject-name" })
|
|
@Html.HiddenFor(model => model.TargetStartDate, new { @class = "item-target-start-date" })
|
|
@Html.HiddenFor(model => model.Type, new { @class = "item-type" })
|
|
@Html.HiddenFor(model => model.IsDateRequired, new { @class = "item-date-required" })
|
|
@Html.HiddenFor(model => model.OldStartDate, new { @class = "item-old-start-date" })
|
|
@Html.HiddenFor(model => model.OldEndDate, new { @class = "item-old-end-date" })
|
|
@Html.HiddenFor(model => model.IsNew, new { @class = "item-isnew" })
|
|
@Html.HiddenFor(model => model.IsDeleted, new { @class = "item-isdeleted" })
|
|
@Html.HiddenFor(model => model.IsActionRequired, new { @class = "item-action-required" })
|
|
@Html.HiddenFor(model => model.MinAvailableScenarioStartDate, new { @class = "item-min-available-scenario-start-date" })
|
|
@Html.HiddenFor(model => model.MaxAvailableScenarioStartDate, new { @class = "item-max-available-scenario-start-date" })
|
|
<label class="col-sm-6 control-label">
|
|
@(Model.ProjectName + dates)
|
|
<br /><small>@(label)</small>
|
|
</label>
|
|
<div class="col-sm-6">
|
|
<div class="row">
|
|
<div class="buttons-with-margins" data-toggle="buttons">
|
|
@if (Model.AvailableMoveTypes.Contains(DependencyResolveModel.ActionType.MoveWith))
|
|
{
|
|
<div class="btn btn-sm btn-primary btn-outline@(Model.Action == DependencyResolveModel.ActionType.MoveWith ? " active" : "")" title="Move with">
|
|
@Html.RadioButtonFor(model => model.Action, DependencyResolveModel.ActionType.MoveWith, new { id = Html.IdFor(t => t.Action) + "_2", @class = "form-control item-action" }) Move With
|
|
</div>
|
|
}
|
|
@if (Model.AvailableMoveTypes.Contains(DependencyResolveModel.ActionType.DontMove))
|
|
{
|
|
<div class="btn btn-sm btn-primary btn-outline@(Model.Action == DependencyResolveModel.ActionType.DontMove ? " active" : "")" title="Don't Move">
|
|
@Html.RadioButtonFor(model => model.Action, DependencyResolveModel.ActionType.DontMove, new { id = Html.IdFor(t => t.Action) + "_3", @class = "form-control item-action" }) Don't Move
|
|
</div>
|
|
}
|
|
@if (Model.AvailableMoveTypes.Contains(DependencyResolveModel.ActionType.CustomMove))
|
|
{
|
|
<div class="btn btn-sm btn-primary btn-outline btn-custom@(Model.Action == DependencyResolveModel.ActionType.CustomMove ? " active" : "")" title="Custom Move">
|
|
@Html.RadioButtonFor(model => model.Action, DependencyResolveModel.ActionType.CustomMove, new { id = Html.IdFor(t => t.Action) + "_4", @class = "form-control item-action" }) Custom
|
|
</div>
|
|
}
|
|
@if (Model.AvailableMoveTypes.Contains(DependencyResolveModel.ActionType.ConvertToLink))
|
|
{
|
|
<div class="btn btn-primary btn-outline btn-sm icon fa fa-link@(Model.Action == DependencyResolveModel.ActionType.ConvertToLink ? " active" : "")" title="Convert to link">
|
|
@Html.RadioButtonFor(model => model.Action, DependencyResolveModel.ActionType.ConvertToLink, new { id = Html.IdFor(t => t.Action) + "_0", @class = "form-control item-action" })
|
|
</div>
|
|
}
|
|
@if (Model.AvailableMoveTypes.Contains(DependencyResolveModel.ActionType.RemoveDependency))
|
|
{
|
|
<div class="btn btn-primary btn-outline btn-sm fa fa-times-circle icon red@(Model.Action == DependencyResolveModel.ActionType.RemoveDependency ? " active" : "")" title="Remove dependency">
|
|
@Html.RadioButtonFor(model => model.Action, DependencyResolveModel.ActionType.RemoveDependency, new { id = Html.IdFor(t => t.Action) + "_1", @class = "form-control item-action" })
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="row item-custom" style="@(Model.Action != DependencyResolveModel.ActionType.CustomMove ? "display:none;" : "")">
|
|
<div style="width:176px">
|
|
@Html.EditorFor(x => x.MoveStartDate, new { htmlAttributes = new { @class = "form-control item-custom-start-date" } })
|
|
</div>
|
|
@Html.ValidationMessageFor(model => model.MoveStartDate)
|
|
</div>
|
|
@Html.ValidationMessageFor(model => model.Action)
|
|
</div>
|
|
</div>
|
|
</div>
|