<%@ Page Language="C#" MasterPageFile="~/Admin/WebUI/AdminPageTemplate.Master"  AutoEventWireup="true" CodeBehind="ImageAlbum.aspx.cs" Inherits="EnjooSite.Web.Admin.SilverAlbumManager.ImageAlbum" %>


<asp:Content ID="HeadContent" ContentPlaceHolderID="ContentPlaceHolder_Head" runat="server">
    <script type="text/javascript">
        $(function(e) {
            var galleriesContainer = $('#<%= dgrSelectionList.ClientID %>');
            $("td.delete>a", galleriesContainer).click(function(e) {
                if (confirm("确定删除？")) {
                    eval($(this).attr("href").split(":")[1]);
                };
                return false;
            });
        });
    </script>
</asp:Content>


<asp:Content ID="UserProfileContent" ContentPlaceHolderID="UserProfileContentPlace" runat="server">
    <asp:ScriptManagerProxy id="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Common/Scripts/swfupload/swfupload_2.2b.js" />
            <asp:ScriptReference Path="~/Common/Scripts/jQueryUI/jquery-ui-Dialog-1.5.3.min.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
</asp:Content>

<asp:Content ID="LocationContent" ContentPlaceHolderID="ContentLocationContentPlace" runat="server">
    <ul class="vList content_location clearfix">
        <li>
            <b><%= UIText.GetSafeText("Label_Location_Text")%></b>
        </li>
        <li>
            <a href='<%= UrlHelper.GetAdminCenterUrl() %>' title='<%= UIText.GetSafeText("Label_AdminCenter_Text") %>'><span><%= UIText.GetSafeText("Label_AdminCenter_Text") %></span></a>
        </li>
        <li class="vSeparate">
            <span>»</span>
        </li>
        <li>
            <a href='<%= UrlHelper.SilverAlbumManagerUrl %>' title='<%= UIText.GetSafeText("Label_AlbumManager_Text") %>'><span><%= UIText.GetSafeText("Label_AlbumManager_Text")%></span></a>
        </li>
        <li class="vSeparate">
            <span>»</span>
        </li>
        <li>
            <label><%= UIText.GetSafeText("Label_ImageAlbumManager_Text")%></label>
        </li>
    </ul>
</asp:Content>

<asp:Content ID="ContentActionsContent" ContentPlaceHolderID="ContentActionsContentPlace" runat="server">
    <ul class="vList clearfix menuButtons" id="netDiskActions">
        <li>
            <a href="#" title='<%= UIText.GetSafeText("Button_CheckAll_Text") %>' class="refresh">
                <span><%= UIText.GetSafeText("Button_Refresh_Text") %></span>
            </a>
        </li>
        <li class="separate">
            <span></span>
        </li>
    </ul>
</asp:Content>

<asp:Content ID="content" ContentPlaceHolderID="pageContent" runat="server">

    <asp:DataGrid ID="dgrSelectionList" runat="server" CssClass="listing highlightTable"  GridLines="None" AutoGenerateColumns="False">
        <AlternatingItemStyle CssClass="alt"></AlternatingItemStyle>
        <HeaderStyle CssClass="Header"></HeaderStyle>
        <Columns>
            <asp:TemplateColumn HeaderText="专辑名称" ItemStyle-Width="450">
                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>' ID="label1"  />
                    <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Description") %>' ID="label3" Visible="false" />
                </ItemTemplate>
                <EditItemTemplate>
                    <ul class="v_list">
                        <li>
                            <asp:Label ID="Label1" runat="server" AssociatedControlID="txbTitle" Text="名称" CssClass="title" />
                            <asp:TextBox CssClass="simply_text" ID="txbTitle" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>' />
                        </li>
                        <li>
                            <asp:Label ID="Label2" runat="server" AssociatedControlID="txbDescription" Text="说明" CssClass="title" />
                            <asp:TextBox CssClass="simply_text" Width="400" Rows="3" TextMode="MultiLine" ID="txbDescription"  runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Description") %>'></asp:TextBox>
                        </li>
                    </ul>
                </EditItemTemplate>
            </asp:TemplateColumn>
            <asp:TemplateColumn HeaderText="启用">
                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.IsActive") %>' ID="label2"></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:CheckBox ID="ckbIsActive" runat="server" Checked='<%# DataBinder.Eval(Container, "DataItem.IsActive") %>'  CssClass="checkbox" />
                </EditItemTemplate>
            </asp:TemplateColumn>
            <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="更新" CancelText="取消" EditText="修改"  />
            <asp:ButtonColumn Text="删除" CommandName="Delete" ItemStyle-CssClass="delete" />
            <asp:TemplateColumn>
                <ItemTemplate>
                    <a href='<%# string.Format("Default.aspx?CatId={0}",Eval("Id")) %>'>管理相册</a>
                </ItemTemplate>
            </asp:TemplateColumn>
        </Columns>
    </asp:DataGrid>

    <div class="enjoosite_portal_fullwidth" id="configure-form">
        <h5>添加相册专辑</h5>
        <ul class="v_list" style="padding-left: 25px;margin:20px 0 0 0;">
            <li>
                <asp:Label ID="Label1" runat="server" Text="名称" CssClass="title" />
                <asp:TextBox ID="GalleryTitle_TextBox" CssClass="simply_text" runat="server" />
            </li>
            <li>
                <asp:Label ID="Label2" runat="server"  Text="说明" CssClass="title" />
                <asp:TextBox CssClass="simply_text" Width="400" Height="100" Rows="3" TextMode="MultiLine" ID="GalleryDescription_TextBox"  runat="server"></asp:TextBox>
            </li>
            <li>
                <div class="hSpace_10"></div>
            </li>
            <li>
                <asp:Button ID="AddGalleryButton" runat="server" Text="确定" CssClass="submit_button" />
            </li>
            <li>
                <div class="hSpace_10"></div>
            </li>
        </ul>
    </div>
</asp:Content>