魔方所有页面权限采用新的架构
大石头 authored at 2018-03-20 17:26:05
829.00 B
X
@using XCode.Membership;
@{
    var entity = Model as IEntity;
    var isNew = entity.IsNullKey;
}
@if (this.Has(PermissionFlags.Insert, PermissionFlags.Update))
{
    <div class="clearfix form-actions col-sm-12 col-md-12">
        <a href="~/Admin/User/ClearPassword/@entity["ID"]" class="col-xs-1 btn btn-success btn-sm" title="数据库为空密码时,任何密码均可登录">清空密码</a>
        <label class="control-label col-xs-3 col-sm-4 col-md-4"></label>
        <button type="submit" class="btn btn-success btn-sm"><i class="glyphicon glyphicon-@(isNew ? "plus" : "save")"></i><strong>@(isNew ? "新增" : "保存")</strong></button>
        <button type="button" class="btn btn-danger btn-sm" onclick="history.go(-1);"><i class="glyphicon glyphicon-remove"></i><strong>取消</strong></button>
    </div>
}