<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FolderView.ascx.cs" Inherits="Zap.BI.Portal.Controls.UserControls.ResourceControls.Folders.FolderView" %>
<%@ Import Namespace="Zap.BI.Portal" %>
<%@ Import Namespace="Zap.Web.Core" %>

<zapWeb:Upload ID="ImportUpload" runat="server" OnUploadComplete="OnImportUploadComplete" />
<zapWeb:Upload ID="FileUpload" runat="server" OnUploadComplete="OnFileUploadComplete" />
<asp:Button CssClass="TriggerRename" OnClick="RenameResourceEventHandler" Style="display: none;" runat="server" />

<asp:Panel runat="server" ID="EmptyTemplatePanel" Visible="false">
    <fieldset class="ui-fieldset GettingStarted">
        <legend>
            <asp:Label runat="server" Text="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Empty_Legend_GettingStarted %>" /></legend>
        <table cellspacing="5">
            <tr>
                <td colspan="3">
                    <asp:Label runat="server" Text="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Empty_Text %>" CssClass="ui-text" /></td>
            </tr>
            <tr>
                <td style="width: 20%">
                    <asp:Label runat="server" Text="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Empty_Label_Browse %>" CssClass="HeadingLabel" /></td>
                <td style="width: 60%">
                    <asp:Label runat="server" Text="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Empty_Text_Browse %>" CssClass="ui-text" /></td>
                <td style="width: 20%; text-align: center;">
                    <asp:Image runat="server" ImageUrl="<%# ContentUrlResolver.Create(WebCoreContent.Images_Sprited_folder_svg) %>" Width="32px" Height="32px" /></td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" Text="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Empty_Label_Help %>" CssClass="HeadingLabel" /></td>
                <td>
                    <asp:Label runat="server" Text="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Empty_Text_Help %>" CssClass="ui-text" /></td>
                <td style="text-align: center;">
                    <asp:Image ID="Image1" runat="server" ImageUrl="<%# ContentUrlResolver.Create(PortalContent.Pages_Images_Help_svg) %>" Width="32px" Height="32px" /></td>
            </tr>
            <tr runat="server" id="GettingStartNewResourcesRow" visible="false">
                <td>
                    <asp:Label runat="server" Text="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Empty_Label_NewReports %>" CssClass="HeadingLabel" /></td>
                <td>
                    <asp:Label runat="server" Text="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Empty_Text_NewReports %>" CssClass="ui-text" /></td>
                <td style="text-align: center;">
                    <asp:Image runat="server" ImageUrl="<%# ContentUrlResolver.Create(WebCoreContent.Images_DefaultResourceIcon_svg) %>" Width="32px" Height="32px" /></td>
            </tr>
        </table>
    </fieldset>
</asp:Panel>

<dxwgv:ASPxGridView runat="server" ID="FolderItemGridViewDX" AutoGenerateColumns="false" EnableViewState="true" EnableCallBacks="false"
    CssClass="folder-grid-view has-resizable-columns"
    Styles-Header-CssClass="grid-header-cell"
    Styles-Row-CssClass="grid-row"
    Styles-Disabled-CssClass="is-disabled"
    Styles-SelectedRow-CssClass="is-selected"
    Styles-FocusedRow-CssClass="has-focus"
    Styles-PagerBottomPanel-CssClass="grid-pager">
    <Settings ShowVerticalScrollBar="false" />
    <SettingsBehavior ColumnResizeMode="Control" AllowMultiSelection="true" AllowSort="true" />
    <SettingsPager PageSize="100" />
    <Columns>
        <dxwgv:GridViewDataColumn Settings-SortMode="Custom" Visible="false" FieldName="OrderHelper" Width="0" SortOrder="Ascending" />
        <dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Caption="&nbsp;" Width="33px"
            HeaderStyle-CssClass="checkbox-column"
            CellStyle-CssClass="checkbox-column">
            <HeaderTemplate>
                <input type="checkbox" class="selectAll" runat="server" onclick="window[$(this).closest('[id$=FolderItemGridViewDX]').get(0).id].SelectAllRowsOnPage(this.checked);"
                    title="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Label_SelectUnselectAll %>" />
            </HeaderTemplate>
        </dxwgv:GridViewCommandColumn>
        <dxwgv:GridViewDataImageColumn FieldName="ImageUrl" Caption="&nbsp;" Width="35px"
            HeaderStyle-CssClass="icon-column"
            CellStyle-CssClass="icon-column" />
        <dxwgv:GridViewDataColumn Settings-SortMode="Custom" FieldName="Name" Width="250px" Caption="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Header_Name %>">
            <DataItemTemplate>
                <asp:PlaceHolder ID="NamePlaceholder" runat="server" OnDataBinding="NameColumn_DataBinding">
                    <a id="BlobResourceLink" runat="server" class="ui-link" enableviewstate="false" visible="false" />
                    <asp:LinkButton ID="InteractiveResourceLink" runat="server" OnCommand="InteractiveResource_Click" CssClass="ui-link" EnableViewState="false" Visible="false" />
                </asp:PlaceHolder>
            </DataItemTemplate>
        </dxwgv:GridViewDataColumn>
        <dxwgv:GridViewDataColumn Settings-SortMode="Custom" FieldName="Description" Width="300px" Caption="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Header_Description %>">
            <DataItemTemplate>
                <asp:Label ID="lblDescription" OnDataBinding="DescriptionColumn_DataBinding" runat="server" />
            </DataItemTemplate>
        </dxwgv:GridViewDataColumn>
        <dxwgv:GridViewDataColumn Settings-SortMode="Custom" FieldName="ModifiedBy" Width="150px" Caption="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Header_ModifiedBy %>"/>
        <dxwgv:GridViewDataDateColumn Settings-SortMode="Custom" FieldName="LastModified" Width="100px" Caption="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Header_LastModified %>" />
        <dxwgv:GridViewDataColumn Settings-SortMode="Custom" FieldName="CreatedBy" Width="150px" Caption="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Header_CreatedBy %>" />
        <dxwgv:GridViewDataDateColumn Settings-SortMode="Custom" FieldName="Created" Width="100px" Caption="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Header_Created %>" />
        <dxwgv:GridViewDataColumn Settings-SortMode="Custom" FieldName="LocalizedTypeName" Width="120px" Caption="<%$ Resources: Controls.UserControls.ResourceControls.Folders.FolderMarkupText, Header_ResourceType %>" />
    </Columns>
    <Styles CssPostfix="DE">
        <AlternatingRow Enabled="True" />
    </Styles>
</dxwgv:ASPxGridView>
