细化创建更新信息显示
大石头 authored at 2018-01-13 16:15:31
600.00 B
X
@using NewLife;
@using XCode;
@using XCode.Configuration;
@{
    var pair = Model as Pair;
    var entity = pair.First as IEntity;
    var item = pair.Second as FieldItem;

    var set = NewLife.Cube.Setting.Current;
    var cls = set.FormGroupClass;
    if (cls.IsNullOrEmpty()) { cls = "form-group col-xs-12 col-sm-6 col-lg-4"; }
}
@if (item.Name == "Permission")
{
    if (!entity.IsNullKey)
    {
        @Html.Partial("SetPermission", new { Role = entity })
    }
}
else
{
    <div class="@cls">
        @Html.Partial("_Form_Item", new Pair(entity, item))
    </div>
}