<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" MasterPageFile="../Global.Master" CodeBehind="Article.aspx.cs" Inherits="Web.AdminManager.Setting.Article" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script src="/Common/js/Common_Class.js" type="text/javascript"></script>
    <script src="/Common/UEditor/editor_config.js" type="text/javascript"></script>
    <script src="/Common/UEditor/editor_all_min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Common/UEditor/themes/default/ueditor.css" />
    <link href="../ColorPicker/colorpicker.css" rel="stylesheet" />
    <script src="../ColorPicker/colorpicker.js"></script>
    <script src="../js/Setting.Article.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="ui_Edit" runat="server" visible="false">
        <form action="" method="post" enctype="multipart/form-data" class="ui-form ui-form-vertical">
            <fieldset>
                <legend>文章设置</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">文章标题</label><div class="ui-form-ctrls">
                        <input type="text" name="Title" id="Title"
                            class="ui-input-small" value="<%=ma.Title %>" /><span
                                class="Title ui-help-inline">输入文章标题</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">标题颜色</label><div class="ui-form-ctrls">
                        <input type="text" name="TitleColor" id="TitleColor"
                            class="ui-input-small" value="<%=ma.TitleColor %>" /><span
                                class="Title ui-help-inline">选择标题颜色</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">URL别名</label><div class="ui-form-ctrls">
                        <input type="text" name="SName" id="SName"
                            class="ui-input-small" value="<%=ma.SName %>" /><span
                                class="SName ui-help-inline">文章地址别名，允许用article_别名.html方式访问</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">所属分类</label><div class="ui-form-ctrls">
                        <%=Web.Lib.ClassHelper.GetStepSelect(CommonLib.Enums.ClassType.文章.GetHashCode(),AgentUserId,ma.ClassId,"ClassId") %></span><span class="ClassId ui-help-inline">所属分类</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">时间显示</label><div class="ui-form-ctrls">
                        <select name="ShowAddTime" id="ShowAddTime">
                            <option <%=ma.ShowAddTime?"selected":"" %>>显示</option>
                            <option <%=ma.ShowAddTime?"":"selected" %>>不显示</option>
                        </select><span
                            class="ShowAddTime ui-help-inline">在浏览文章时，是否显示时间、浏览次数等附加信息</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">文章内容：</label><div class="ui-form-ctrls">
                        <script id="ArtContent" type="text/plain"><%=ma.ArtContent %></script>
                        <script type="text/javascript">
                            var editor = new baidu.editor.ui.Editor({
                                textarea: 'ArtContent'
                            });
                            editor.render("ArtContent");
                        </script>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">&nbsp;</label><div class="ui-form-ctrls">
                        <button class="ui-btn ui-btn-primary" type="submit">保存设置</button>
                        <button class="ui-btn" type="button" onclick="history.back();">返回</button>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
    <div id="UI_List" runat="server" visible="false">
        <table class="ui-table ui-table-bordered">
            <thead>
                <tr>
                    <td colspan="6">
                        <form action="article.aspx" method="post">
                            标题：<input name="skey" class="ui-input-small" type="text" value="" />
                            分类：<%=Web.Lib.ClassHelper.GetStepSelect(CommonLib.Enums.ClassType.文章.GetHashCode(),AgentUserId, ClassId, "ArtClass")%>
                &nbsp;
                        <button class="btnunsubmit ui-btn ui-btn-primary icon-search" type="submit"></button>
                        </form>
                    </td>
                </tr>
                <tr>
                    <td colspan="6">
                        <a href="?Action=Add" class="ui-btn ui-btn-primary">添加文章</a>
                    </td>
                </tr>
                <tr>
                    <th>文章标题
                    </th>
                    <th>URL别名</th>
                    <th>添加时间
                    </th>
                    <th>所属分类
                    </th>
                    <th>浏览数</th>
                    <th>操作
                    </th>
                </tr>
            </thead>
            <%=ShowList%>
            <tr>
                <td colspan="6" id="Pager" class="Pager" runat="server"></td>
            </tr>
        </table>
    </div>
</asp:Content>
