<%@ Page Language="c#" Inherits="Web.User.AuditingBoard" CodeBehind="AuditingBoard.aspx.cs" %>

<%@ Register Src="~/Module/pageNavi.ascx" TagPrefix="uc1" TagName="pageNavi" %>
<%@ Register Src="~/User/AuditingNav.ascx" TagPrefix="uc1" TagName="AuditingNav" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>Auditing Board</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/head.htm" -->
</head>
<body>
    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <form id="Form1" method="post" runat="server">
                        <%--<ul class="inbox-tabs nav nav-tabs tab-size-bigger tab-space-1" id="inbox-tabs">
                            <!-- #section:pages/inbox.compose-btn -->

                            <li class="dropdown active">
                                <a class="dropdown-toggle" href="#" data-toggle="dropdown">
                                    <i class="pink ace-icon fa fa-tags bigger-130"></i>

                                    <span class="bigger-110">待审信息
														
                                    <i class="ace-icon fa fa-caret-down"></i>
                                        <span class="badge badge-danger" id="addred" runat="server"><%= add %></span>
                                    </span>

                                </a>

                                <ul class="dropdown-menu dropdown-light-blue dropdown-125">
                                    <li id="none" runat="server" visible="False">
                                        <a href="AuditingNews.aspx" data-toggle="tab">
                                            <span>没有需要审核的内容</span>
                                        </a>
                                    </li>

                                    <li id="newsHyper" runat="server" visible="False">
                                        <a href="AuditingNews.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>新闻待审</span>
                                            <span class="badge badge-danger"><%= newsCount %></span>
                                        </a>
                                    </li>

                                    <li id="reviewHyper" runat="server" visible="False">
                                        <a href="AuditingReviews.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>评论待审</span>
                                            <span class="badge badge-danger"><%= reviewsCount %></span>
                                        </a>
                                    </li>

                                    <li id="messageHyper" runat="server" visible="False">
                                        <a href="AuditingMessageBoard.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>留言待审</span>
                                            <span class="badge badge-danger"><%= messageCount %></span>
                                        </a>
                                    </li>

                                    <li id="hyLink" runat="server" visible="False">
                                        <a href="AuditingLink.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>链接待审</span>
                                            <span class="badge badge-danger"><%= linkCount %></span>
                                        </a>
                                    </li>

                                    <li id="hyLinkGang" runat="server" visible="False">
                                        <a href="AuditingLinkGang.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>链接组待审</span>
                                            <span class="badge badge-danger"><%= linkGangCount %></span>
                                        </a>
                                    </li>

                                    <li id="hyPeople" runat="server" visible="False">
                                        <a href="AuditingPeople.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>人事物信息待审</span>
                                            <span class="badge badge-danger"><%= peopleCount %></span>
                                        </a>
                                    </li>

                                    <li id="hyBoard" runat="server" visible="False" class="active">
                                        <a href="AuditingBoard.aspx" data-toggle="tab">
                                            <span class="mail-tag badge badge-info"></span>
                                            <span>公告待审</span>
                                            <span class="badge badge-danger"><%= boardCount %></span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <!-- /.dropdown -->
                            <li>
                                <a href="infoSearch.aspx" data-toggle="tab" data-target="write">
                                    <i class="pink ace-icon fa fa-envelope bigger-130"></i>
                                    <span class="bigger-110">我的发布</span>
                                </a>
                            </li>
                            <!-- /.li-new-mail -->

                            <!-- /section:pages/inbox.compose-btn -->
                            <li>
                                <a href="myDraft.aspx" data-toggle="tab" data-target="inbox">
                                    <i class="blue ace-icon fa fa-inbox bigger-130"></i>
                                    <span class="bigger-110">我的草稿</span>
                                </a>
                            </li>

                            <li>
                                <a href="search.aspx" data-toggle="tab" data-target="sent">
                                    <i class="orange ace-icon fa fa-location-arrow bigger-130"></i>
                                    <span class="bigger-110">站内搜索</span>
                                </a>
                            </li>
                        </ul>--%>
                    <uc1:AuditingNav runat="server" id="AuditingNav" />
                    <!-- /section:elements.tab.option -->
                    <div class="bd tab-content">
                         <div class="page-header clearfix">
                            <div class="pull-left col-xs-6">
                                <asp:Button ID="btnSave" runat="server" class="btn btn-sm btn-primary" Text="保 存" OnClick="btn_Click"></asp:Button>&nbsp;&nbsp;
                    <asp:Button ID="btnPass" runat="server" class="btn btn-sm btn-primary" Text="通 过" OnClick="btn_Click" />&nbsp;&nbsp;
                    <asp:Button ID="btnNopass" runat="server" class="btn btn-sm btn-primary" Text="不通过" OnClick="btn_Click" />&nbsp; 
                                <asp:Label ID="lbTip" runat="server" ForeColor="Red" Text=""></asp:Label>                          
                            </div>
                        </div>
                        <div class="function-bd">
                            <!--[if lte IE 7]><div style="zoom:1"><![endif]-->
                            <asp:HiddenField ID="hfidstr" runat="server" />
                            <asp:HiddenField ID="hftitlestr" runat="server" />
                            <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" class="table table-striped table-bordered  table-hover table-sorting"  
                                EmptyDataText="暂无数据…"  OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" OnSorting="GridView1_Sorting">
                                <Columns>
                                    <asp:TemplateField HeaderStyle-CssClass="title text-center" ItemStyle-CssClass="text-center" ItemStyle-Width="36px">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="cbAll" Text=" " runat="server" onclick="GridSelectAll('GridView1',this.checked)" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="cbthis" runat="server" Text=" "></asp:CheckBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden"></asp:BoundField>
                                    <asp:TemplateField HeaderText="标题" SortExpression="name" >
                                        <ItemTemplate>
                                            <asp:Label ID="CC" Visible="false" runat="server" Text="[抄送]" ForeColor="Red"></asp:Label>
                                            <asp:HyperLink ID="title" runat="server" Text='<%# Eval("name") %>' Target="_blank">
                                            </asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="所属栏目" SortExpression="menuName">
                                        <ItemTemplate>
                                            <asp:Label ID="menuLabel" runat="server" Text='<%# Eval("menuName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="发布人" SortExpression="fullName">
                                        <ItemTemplate>
                                            <span data-placement="right" data-rel="popover" data-content="<%# "发布IP："+Eval( "updateIp") %>" data-trigger="hover">
                                                <asp:Label ID="info" runat="server" Text='<%# Eval("fullName") %>'></asp:Label></span>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="发布时间" SortExpression="updateTime">
                                        <ItemTemplate>
                                            <span data-placement="right" data-rel="popover" data-content="<%# Eval("updateTime") %>" data-trigger="hover">
                                                <asp:Label ID="lbtime" runat="server" Text='<%# Eval("updateTime", "{0:yyyy-M-d}") %>' ></asp:Label>
                                            </span>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="showDay" HeaderText="显示天数" SortExpression="showDay"></asp:BoundField>
                                    <asp:TemplateField HeaderText="固顶" SortExpression="IsTop">
                                        <ItemTemplate>
                                            <asp:DropDownList ID="isTop" runat="server" SelectedIndex='<%#Eval("IsTop") %>'>
                                                <asp:ListItem Value="0" Selected="True">取消</asp:ListItem>
                                                <asp:ListItem Value="1">固顶</asp:ListItem>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="显示等级">
                                        <ItemTemplate>
                                            <asp:DropDownList ID="gradeDrop" runat="server" DataValueField="pkId" DataTextField="name"
                                                DataSource="<%# dt_grade  %>" SelectedValue='<%# Eval("gradeId") %>'>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="浏览权限">
                                        <ItemTemplate>
                                            <asp:DropDownList ID="gate" runat="server" SelectedValue='<%# Eval("gate") %>'>
                                                <asp:ListItem Value="0" Selected="True">无限制</asp:ListItem>
                                                <asp:ListItem Value="1">仅内网可见</asp:ListItem>
                                                <asp:ListItem Value="2">仅登录可见</asp:ListItem>
                                                <asp:ListItem Value="3">内网或登录可见</asp:ListItem>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="管理" ItemStyle-Width="80px">
                                        <ItemTemplate>
                                            <div class="action-buttons">
                                                <asp:LinkButton ID="edit"  runat="server" CommandName="editt" data-toggle="tooltip" data-placement="bottom" title="编辑" CommandArgument='<%#Eval("pkId")+"&"+Eval("sourceMenuId")+"&"+Eval("bigClassId") %>'><i class="ace-icon fa fa-pencil bigger-120 blue"></i></asp:LinkButton>
                                                <asp:LinkButton ID="del" runat="server"  CommandName="del" data-toggle="tooltip" data-placement="bottom" title="删除" Visible="false" CommandArgument='<%#Eval("pkId")+"&"+Eval("boardContent") %>'><i class="ace-icon fa fa-trash-o bigger-120 red" ></i></asp:LinkButton>
                                                  <asp:LinkButton ID="del1" runat="server"  data-toggle="tooltip" data-placement="bottom" title="对不起，您没有权限删除" Visible="false" Enabled="false"><i class="ace-icon fa fa-trash-o bigger-120 grey" ></i></asp:LinkButton>
                                            </div>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField Visible="False" DataField="Code" HeaderText="TemplateCode"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="bigClassId" HeaderText="bigClassId"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="sourceMenuId" HeaderText="menuId"></asp:BoundField>
                                    <asp:BoundField Visible="False" DataField="isDuplicated" HeaderText="isDuplicated"></asp:BoundField>
                                </Columns>
                            </asp:GridView>
                             <div class="grid-pager">
                                <uc1:pageNavi runat="server" id="pageNavi" dataCtlName="GridView1" />
                            </div>
                            <!--[if lte IE 7]></div><![endif]-->
                        </div>
                        <!--/function-bd-->
                    </div>
                </form>
                <!--/bd-->
               <%-- <div class="ft">
                    <div class="pagination">
                        <asp:Label ID="showPage" runat="server"></asp:Label>
                    </div>
                </div>--%>
            </div>
        </div>
    </div>
    <!--#include file = "../Css/foot.htm" -->
      <script language="javascript" type="text/javascript">
          //防止用户恶意保存
          jQuery(function ($) {

              $('#AuditingNav_hyBoard').addClass('active');

              $("#btnSave").click(function () {
                  //return confirm("您确定要保存列表吗？");
                  return GridSelectCheck('GridView1', true);
              });

              $("#btnPass").click(function () {
                  return GridSelectCheck('GridView1', true);
              });

              $("#btnNopass").click(function () {
                  return GridSelectCheck('GridView1', true);
              });
          });

          //选中背景特效
          //$(function () {
          //    $('.text-center input').click(function () {
          //        $(this).parents('tr').toggleClass('active');
          //    })
          //    $('.title.text-center input').click(function () {

          //        if ($('.list-table tr:first').hasClass('active')) {
          //            $('.list-table tr').addClass('active');
          //        } else {
          //            $('.list-table tr').removeClass('active');
          //        }
          //    })
          //    $('.table select').change(function () {
          //        //背景选中
          //        if ($(this).parents('tr').hasClass('active')) {

          //        } else {
          //            $(this).parents('tr').toggleClass('active');
          //        }

          //        //复选框选中
          //        var checkbox = $(this).parents("tr").find("input");
          //        for (var i = 0; i < checkbox.length; i++) {
          //            if (checkbox[i].type == 'checkbox') {
          //                checkbox[i].checked = true;
          //            }
          //        }
          //    })
          //})
    </script>

</body>
</html>
