mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
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.
72 lines
3.7 KiB
72 lines
3.7 KiB
@page
|
|
@using Microsoft.AspNetCore.Mvc.Localization
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
|
|
@using Volo.Abp.FeatureManagement.Localization
|
|
@using Volo.Abp.Validation.StringValues
|
|
@using Volo.Abp.FeatureManagement.Web.Pages.FeatureManagement
|
|
@using Volo.Abp.Features
|
|
@model FeatureManagementModal
|
|
@inject IHtmlLocalizer<AbpFeatureManagementResource> L
|
|
@{
|
|
Layout = null;
|
|
}
|
|
<form method="post" asp-page="/FeatureManagement/FeatureManagementModal" data-script-class="abp.modals.FeatureManagement">
|
|
<abp-modal size="Large">
|
|
<abp-modal-header title="@(L["Features"].Value)"></abp-modal-header>
|
|
@if (Model.FeatureListDto?.Features != null && Model.FeatureListDto.Features.Any())
|
|
{
|
|
<abp-modal-body class="ml-4">
|
|
<input asp-for="@Model.ProviderKey" />
|
|
<input asp-for="@Model.ProviderName" />
|
|
@for (var i = 0; i < Model.FeatureListDto.Features.Count; i++)
|
|
{
|
|
var feature = Model.FeatureListDto.Features[i];
|
|
var disabled = Model.IsDisabled(feature.Provider.Name);
|
|
<div class="mt-2" style="padding-left: @(feature.Depth * 20)px">
|
|
|
|
<spam class="mr-2">@feature.DisplayName @(disabled ? $"({feature.Provider.Name})" : "")</spam>
|
|
|
|
<input type="text" name="Features[@i].ProviderName" value="@feature.Provider.Name" hidden />
|
|
<input type="text" name="Features[@i].Type" value="@feature.ValueType?.Name" hidden />
|
|
@if (feature.ValueType is FreeTextStringValueType)
|
|
{
|
|
<input type="text" name="Features[@i].Name" value="@feature.Name" hidden />
|
|
<input disabled="@disabled" type="text" name="Features[@i].Value" value="@feature.Value" />
|
|
}
|
|
@if (feature.ValueType is SelectionStringValueType)
|
|
{
|
|
<input type="text" name="Features[@i].Name" value="@feature.Name" hidden />
|
|
<select disabled="@disabled" name="Features[@i].Value">
|
|
@foreach (var item in (feature.ValueType as SelectionStringValueType).ItemSource.Items)
|
|
{
|
|
if (item.Value == feature.Value)
|
|
{
|
|
<option value="@item.Value" selected="selected"> @L.GetString(item.DisplayText.Name) </option>
|
|
}
|
|
else
|
|
{
|
|
<option value="@item.Value"> @L.GetString(item.DisplayText.Name) </option>
|
|
}
|
|
}
|
|
</select>
|
|
}
|
|
@if (feature.ValueType is ToggleStringValueType)
|
|
{
|
|
<input type="text" name="Features[@i].Name" value="@feature.Name" hidden />
|
|
<input disabled="@disabled" type="checkbox" class="FeatureValueCheckbox" name="Features[@i].BoolValue" value="@feature.Value"
|
|
@Html.Raw(feature.Value == "True" ? "checked" : "") />
|
|
}
|
|
</div>
|
|
}
|
|
</abp-modal-body>
|
|
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
|
|
}
|
|
else
|
|
{
|
|
<abp-modal-body class="ml-4">
|
|
@L["NoFeatureFoundMessage"]
|
|
</abp-modal-body>
|
|
}
|
|
</abp-modal>
|
|
</form>
|
|
|
|
|