@using FreeSql.Site.Entity;
@model FreeSql.Site.Entity.DocumentContent

<form class="layui-form" action="" id="frm_DocContentEdit">
    <div class="form-module-content">
        <div class="layui-form-item">
            <label class="layui-form-label">文章分类 </label>
            <div class="layui-input-block">
                @Html.HiddenFor(m => m.ID)
                @Html.HiddenFor(m => m.OriginType)
                @Html.HiddenFor(m => m.WatchCount)
                @Html.HiddenFor(m => m.StarCount)
                @Html.HiddenFor(m => m.CreateBy)
                @Html.HiddenFor(m => m.CreateDt)
                @Html.DropDownList("TypeID", ViewBag.DocumentTypeList as List<SelectListItem>, "", new Dictionary<string, object> { { "class", "plate_text" } })
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">文章标题</label>
            <div class="layui-input-block">
                @Html.TextBoxFor(m => m.DocTitle, "", new Dictionary<string, object> { { "autocomplete", "off" }, { "class", "layui-input  " }, { "lay-verify", "title" }, { "placeholder", "请输入标题" } })
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">摘要</label>
            <div class="layui-input-block">
                @Html.TextBoxFor(m => m.DocAbstract, "", new Dictionary<string, object> { { "autocomplete", "off" }, { "class", "layui-input  " }, { "lay-verify", "title" }, { "placeholder", "请输入摘要" } })
            </div>
        </div>

        @*<div class="layui-form-item">
                <label class="layui-form-label">文章分类</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="like[write]" title="写作">
                    <input type="checkbox" name="like[read]" title="阅读">
                    <input type="checkbox" name="like[daze]" title="发呆">
                </div>
            </div>*@

        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="radio" name="status" value="1" title="启用" checked="">
                <input type="radio" name="status" value="0" title="关闭">
            </div>
        </div>
        @*<div class="layui-form-item">
                <label class="layui-form-label">来源类型</label>
                <div class="layui-input-block">
                    <input type="checkbox" id="OriginType" @(Model.OriginType == 1 ? "checked=''" : "") name="OriginType" lay-skin="switch" lay-filter="switchTest" lay-text="当前内容|URL地址">
                </div>
            </div>*@

        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li class=' @(Model.OriginType == 1 ? "" : "layui-this")' origintype="0">自有内容</li>
                <li class=' @(Model.OriginType == 1 ? "layui-this" : "")' origintype="1">外部来源</li>
            </ul>
            <div class="layui-tab-content">
                <div class='layui-tab-item  @(Model.OriginType == 1 ? "" : "layui-show")'>
                    <div class="layui-form-item layui-form-text" id="DocContentArea">
                        <div id="DocContent">@Model.DocContent</div>
                        @*@Html.TextAreaFor(m => m.DocContent, new Dictionary<string, object> { { "autocomplete", "off" }, { "placeholder", "请输入内容" } })*@
                        @*<textarea style="display:none;" placeholder="请输入内容" name="DocContent"></textarea>*@
                    </div>
                </div>
                <div class='layui-tab-item  @(Model.OriginType == 1 ? "layui-show" : "")'>
                    <div class="layui-form-item" id="OriginUrlArea">
                        <label class="layui-form-label">外部来源</label>
                        <div class="layui-input-block">
                            @Html.TextBoxFor(m => m.OriginUrl, "", new Dictionary<string, object> { { "autocomplete", "off" }, { "class", "layui-input  " }, { "lay-verify", "title" }, { "placeholder", "请输入标题" } })
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @*<div class="form-module-footer">
        <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
    </div>*@
</form>