<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContentManage.aspx.cs"
    Inherits="PowerEasy.Module.General.WebSite.User.Content.ContentManageUI" ValidateRequest="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>我发表的信息</title>
</head>
<body>
    <pe:ExtendedSiteMapPath ID="YourPosition" SiteMapProvider="UserMapProvider" runat="server" />
    <form id="MainForm" runat="server">
    <div class="model_info_list">
        <div class="model_info_sate mtop10">
            <ul>
                <!-- CSS Tabs -->
                <li id="EliteContentList" runat="server"><span>
                    <asp:LinkButton ID="LinkContentList" runat="server" CommandArgument="100" OnClick="ShowBookmarks">所有信息</asp:LinkButton></span>
                </li>
                <li id="EliteDraft" runat="server"><span>
                    <asp:LinkButton ID="LinkDraft" runat="server" CommandArgument="-1" OnClick="ShowBookmarks">草稿</asp:LinkButton></span>
                </li>
                <li id="ElitePending" runat="server"><span>
                    <asp:LinkButton ID="LinkPending" runat="server" CommandArgument="101" OnClick="ShowBookmarks">待审核的信息</asp:LinkButton></span>
                </li>
                <li id="EliteAudited" runat="server"><span>
                    <asp:LinkButton ID="LinkAudited" CommandArgument="99" runat="server" OnClick="ShowBookmarks">已审核的信息</asp:LinkButton></span>
                </li>
                <li id="EliteTuigao" runat="server"><span>
                    <asp:LinkButton ID="LinkTuigao" CommandArgument="-2" runat="server" OnClick="ShowBookmarks">未被采用的信息</asp:LinkButton></span>
                </li>
            </ul>
        </div>
        <!--模型内容列表开始-->
        <div class="model_info_content">
            <!--列表开始-->
            <pe:MemberExtendedGridView ID="EgvContent" runat="server" DataSourceID="OdsContents"
                SerialText="" AutoGenerateCheckBoxColumn="True" AutoGenerateColumns="False" AllowPaging="True"
                OnRowDataBound="EgvContent_RowDataBound" OnRowCommand="EgvContent_RowCommand"
                DataKeyNames="GeneralId">
                <Columns>
                    <pe:BoundField DataField="GeneralId" HeaderText="ID" SortExpression="GeneralId">
                        <HeaderStyle Width="6%" />
                    </pe:BoundField>
                    <pe:TemplateField HeaderText="<%$ Res: User_Contents_ContentManage_TemplateField1,标题 %>"
                        SortExpression="Title">
                        <ItemStyle CssClass="content_left" />
                        <ItemTemplate>
                            <pe:LinkImage ID="LinkImageModel" runat="server">
                                <pe:ExtendedHyperLink ID="LnkNodeLink" runat="server" />
                                <asp:HyperLink ID="LnkItem" runat="server" />
                            </pe:LinkImage>
                        </ItemTemplate>
                    </pe:TemplateField>
                    <pe:BoundField DataField="Hits" HeaderText="<%$ Res: User_Contents_ContentManage_BoundField2,点击数 %>"
                        SortExpression="Hits">
                        <HeaderStyle Width="8%" />
                    </pe:BoundField>
                    <pe:BoundField DataField="EliteLevel" HeaderText="<%$ Res: User_Contents_ContentManage_BoundField3,推荐级别 %>"
                        SortExpression="EliteLevel">
                        <HeaderStyle Width="10%" />
                    </pe:BoundField>
                    <pe:BoundField DataField="Priority" HeaderText="<%$ Res: User_Contents_ContentManage_BoundField4,优先级 %>"
                        SortExpression="Priority">
                        <HeaderStyle Width="8%" />
                    </pe:BoundField>
                    <pe:TemplateField HeaderText="<%$ Res: User_Contents_ContentManage_TemplateField2,状态 %>"
                        SortExpression="Status">
                        <HeaderStyle Width="12%" />
                        <ItemTemplate>
                            <asp:Label ID="LabStatusName" runat="server"></asp:Label>
                        </ItemTemplate>
                    </pe:TemplateField>
                    <pe:TemplateField HeaderText="<%$ Res: User_Contents_ContentManage_TemplateField3,操作 %>"
                        SortExpression="Disabled">
                        <HeaderStyle Width="13%" />
                        <ItemTemplate>
                            <asp:HyperLink ID="ContentModify" Text="<%$ Res: User_Contents_ContentManage_ContentModify,修改 %>"
                                runat="server" />
                            <asp:LinkButton ID="LtnDelete" Text="<%$ Res: User_Contents_ContentManage_LtnDelete,删除 %>"
                                OnClientClick="<%$ Res: User_Contents_ContentManage_LtnDelete_OnClientClick,if(!this.disabled) return confirm('确实要删除此信息吗？') %>"
                                runat="server" CommandArgument='<%# Eval("GeneralId")%>' CommandName="DeleteContent" />
                        </ItemTemplate>
                    </pe:TemplateField>
                </Columns>
            </pe:MemberExtendedGridView>
            <!--列表结束-->
        </div>
        <!--模型内容列表结束-->
    </div>
    <div class="clear">
    </div>
    <div class="model_list_manage">
        <label class="checkbox">
            <input id="ChkAll" type="checkbox" /> <asp:Localize ID="Localize4" Text="<%$ Res: User_Contents_ContentManage_Localize4,全选 %>" runat="server" /></label>
        <asp:Button ID="EBtnBatchDelete" CssClass="input_button" Text="<%$ Res: User_Contents_ContentManage_EBtnBatchDelete,批量删除 %>"
            OnClientClick="return batchconfirm();" OnClick="EBtnBatchDelete_Click" CausesValidation="False"
            Visible="false" runat="server" />
        &nbsp;&nbsp;<asp:Localize ID="Localize5" Text="<%$ Res: User_Contents_ContentManage_Localize5,搜索标题： %>"
            runat="server" /><asp:TextBox ID="TxtSearchTitle" CssClass="inputxt" runat="server"></asp:TextBox><asp:Button
                ID="BtnSearch" CssClass="input_button" runat="server" Text="<%$ Res: User_Contents_ContentManage_BtnSearch,搜索 %>" />
    </div>
    <asp:HiddenField ID="HdnListType" runat="server" Value="-1" />
    <asp:HiddenField ID="HdnStatus" runat="server" Value="100" />
    <asp:ObjectDataSource ID="OdsContents" runat="server" SelectMethod="GetCommonModelInfoListByUserName"
        TypeName="PowerEasy.Module.General.BusinessLogic.Contents.ContentManage" EnablePaging="True"
        MaximumRowsParameterName="maxNumberRows" StartRowIndexParameterName="startRowIndexId"
        SelectCountMethod="GetTotalOfCommonModelInfoByUserName">
        <SelectParameters>
            <asp:QueryStringParameter Name="nodeId" QueryStringField="NodeID" Type="Int32" />
            <asp:Parameter Name="userName" Type="string" />
            <asp:ControlParameter ControlID="HdnListType" Type="Int32" Name="sortType" PropertyName="Value" />
            <asp:ControlParameter ControlID="HdnStatus" Type="Int32" Name="status" PropertyName="Value" />
            <asp:ControlParameter ControlID="TxtSearchTitle" Type="string" Name="title" PropertyName="Text" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <script type="text/javascript">
        $('#<%= TxtSearchTitle.ClientID %>').keypress(function(e) {
            if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
                $('#<%= BtnSearch.ClientID %>').click();
                return false;
            }
            return true;
        });
    </script>
    </form>
</body>
</html>
