<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WFContent/Modules/ModuleConfig.master" CodeBehind="Files.aspx.vb" Inherits="WebFoundations.WFPortal.BaseModules.UI.Files2" %>

<%@ Register Assembly="WebFoundations.ServerControls" Namespace="WebFoundations.ServerControls" TagPrefix="wf" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="WebFoundations.WFPortal.Controls" Namespace="WebFoundations.WFPortal.Controls.Content" TagPrefix="WFC" %>
<%@ Register Src="~/WFContent/Modules/Files/FileEdit.ascx" TagPrefix="wf" TagName="FileEdit" %>

<asp:Content runat="server" ContentPlaceHolderID="TagHead">
    <style type="text/css">
        table.files{
            margin-top:.5em;
        }
    </style>
</asp:Content>

<asp:Content runat="server" ContentPlaceHolderID="MainContent">
    <WFC:EditorManager id="EditorManager1" runat="server" />
    <telerik:RadTabStrip CssClass="config-tabs" ID="configTabs" runat="server" Orientation="HorizontalTop" MultiPageID="configPages" AutoPostBack="True" SelectedIndex="0">
        <tabs>
                    <telerik:RadTab runat="server" Text="Configurações" Value="settings" ID="tabSettings" />
                    <telerik:RadTab runat="server" Text="Arquivos" Value="files" ID="tabFiles" />
                </tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage CssClass="config-page" runat="server" ID="configPages" SelectedIndex="0">
        <telerik:RadPageView runat="server" ID="pgSettings">
            <div class="fields">
                <asp:checkbox id="chkShowCreator" runat="server" cssclass="checkbox" text="Mostrar criador" />
                <asp:checkbox id="chkShowDate" runat="server" cssclass="checkbox" text="Mostrar data de inclusão" />
                <asp:checkbox id="chkShowDescription" runat="server" cssclass="checkbox" text="Mostrar descrição" />
                <asp:checkbox id="chkShowCategory" runat="server" cssclass="checkbox" text="Mostrar categoria" />
                <asp:checkbox id="chkDirectLink" runat="server" cssclass="checkbox" text="Link direto" />

                <asp:checkbox id="chkUseGallery" runat="server" cssclass="checkbox" text="Usar galeria" visible="false" />
                <asp:placeholder id="phGallery" runat="server">
                            <label>
                                <asp:label id="lblGallery" runat="server" text="Galeria" />
                                <asp:dropdownlist id="ddlGallery" runat="server" />
                            </label>
                        </asp:placeholder>
                <asp:placeholder id="phCustom" runat="server">
                            <asp:checkbox id="chkSyncRemove" runat="server" cssclass="checkbox" text="Sincronizar exclusão" />
                            <label>
                                <asp:label runat="server" id="lblFolder" text="Diretório" />
                                <asp:textbox id="txtFolder" runat="server" />
                            </label>
                        </asp:placeholder>
            </div>
            <section class="actions">
                <asp:button id="btnok" runat="server" cssclass="button" />
                <input id="btncancel" type="button" class="button" onclick="CancelEdit();" runat="server" />
            </section>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="pgFiles">
            <wf:FileEdit runat="server" id="feEditor" />
            <asp:gridview runat="server" cssclass="files" id="grdFiles" autogeneratecolumns="false">
                        <Columns>
                            <asp:TemplateField HeaderText="Title">
                                <ItemTemplate><asp:LinkButton runat="server" CommandArgument='<%#Eval("Id") %>' Text='<%#Eval("Name")%>' /></ItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="Date">
                                <ItemTemplate><asp:LinkButton runat="server" CommandArgument='<%#Eval("Id") %>' Text='<%#Eval("Creation")%>' /></ItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="Creator">
                                <ItemTemplate><asp:LinkButton runat="server" CommandArgument='<%#Eval("Id") %>' Text='<%#Eval("Creator")%>' /></ItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="Category">
                                <ItemTemplate><asp:LinkButton runat="server" CommandArgument='<%#Eval("Id") %>' Text='<%#Eval("Category")%>' /></ItemTemplate>
                            </asp:TemplateField> 
                            <asp:BoundField HeaderText="Description" DataField="Description" />
                        </Columns>
                    </asp:gridview>
        </telerik:RadPageView>
    </telerik:RadMultiPage>
</asp:Content>
