<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WFAdmin/AdmMaster.Master" CodeBehind="Processos.aspx.vb" Inherits="WebFoundations.WFWorkflow.UI.Processos" %>
<%@ Register Src="~/WFControls/WFPagePicker.ascx" TagName="WFPagePicker" TagPrefix="uc1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="wff" Namespace="WebFoundations.ServerControls" Assembly="WebFoundations.ServerControls" %>

<asp:Content ContentPlaceHolderID="TagHead" runat="server">
    <script type="text/javascript">
        var MySelectedItem = '';
        function postBackDelete(hiddenFieldID) {
            var hiddenField = $get(hiddenFieldID);
            if (hiddenField) {
                hiddenField.value = 'DELETE' + MySelectedItem;
                MySelectedItem = '';
                __doPostBack(hiddenFieldID, '');
            }
        }
        function postBackHiddenField(hiddenFieldID) {
            var hiddenField = $get(hiddenFieldID);
            if (hiddenField) {
                hiddenField.value = (new Date()).getTime();
                __doPostBack(hiddenFieldID, '');
            }
        }
    </script>
</asp:Content>

<asp:Content ContentPlaceHolderID="ActionContent" runat="server">
    <ul>
        <li><asp:HyperLink ID="lnkadd" runat="server" CssClass="add" /></li>
        <li><asp:HyperLink ID="lnkpreview" runat="server" CssClass="edit" /></li>
        <li><asp:HyperLink ID="lnkdelete" runat="server" CssClass="delete" /></li>
        <li><asp:HyperLink ID="lnkrefresh" runat="server" CssClass="refresh" /></li>
        <li style="display:none"><asp:LinkButton ID="lnkExport" runat="server" CssClass="export" Visible="false" /></li>
        <li><asp:HyperLink ID="lnkdownload" runat="server" CssClass="download" /></li>
        <li><asp:HyperLink ID="lnkupload" runat="server" CssClass="upload" /></li>
        <li><asp:HyperLink ID="lnkdocument" runat="server" CssClass="copy documentacao" /></li>
    </ul>
</asp:Content>

<asp:Content ContentPlaceHolderID="FilterContent" runat="server">
    <div class="fields">
        <label>
            <asp:Label ID="lblarea" runat="server" />
            <uc1:WFPagePicker ID="portalpicker" runat="server" AddSelect="false" ForceCheckEvenForSiteAdmin="true"
                AdminMode="true" AutoSelectLast="true" ShowArea="true" ShowPage="false" NoLabels="true" />
        </label>
        <label>
            <asp:Label ID="lblName" runat="server" />
            <asp:TextBox ID="txtName" runat="server" />
        </label>
    </div>
    <asp:Button ID="btnbuscar" runat="server" ValidationGroup="SEARCH" CssClass="search" />
</asp:Content>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="updateform" runat="server">
        <ContentTemplate>
            <telerik:RadGrid id="grdProcesso" runat="server" AutoGenerateColumns="false" AllowSorting="True"
                GridLines="None" AllowPaging="True" PageSize="15">
                <mastertableview>
                <Columns>
                    <telerik:GridTemplateColumn HeaderText="" UniqueName="PUBLISHED" HeaderStyle-Width="40px" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="middle" >
                        <ItemTemplate>
                            <div style="float:left;"><asp:Image id="imgPublished" runat="server" /></div>
                            <div style="float:left;padding-left:4px;"><asp:Image id="imgEdicao" ImageUrl="~/WFResources/process/images/maintenance.png" runat="server" /></div>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="Id" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="middle" />
                    <telerik:GridBoundColumn DataField="Nome" HeaderText="Nome" UniqueName="Nome" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="middle" />
                    <telerik:GridBoundColumn DataField="Ativo" HeaderText="Ativo" UniqueName="Ativo"  Visible="false" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="middle" />
                    <telerik:GridBoundColumn DataField="Alteracao" HeaderText="Alteracao" UniqueName="Alteracao" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="middle" />
                    <telerik:GridTemplateColumn HeaderText="UsuAlterador" UniqueName="UsuAlterador" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="middle" >
                        <ItemTemplate>
                            <asp:Label ID="lbluser" runat="server" Text="Label"></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Gestores" UniqueName="Gestores" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="middle" >
                        <ItemTemplate>
                            <asp:Label ID="lblmanagers" runat="server" Text="Label"></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </mastertableview>
            <clientsettings allowcolumnsreorder="false" allowdragtogroup="false"
                    allowcolumnhide="false"
                    selecting-allowrowselect="true" scrolling-allowscroll="false"
                    scrolling-usestaticheaders="true">
            </clientsettings>
                <exportsettings exportonlydata="True" filename="Pages" ignorepaging="True" openinnewwindow="True" />
            </telerik:RadGrid>
            <asp:HiddenField ID="PostBackHidden" runat="server" />
            <asp:HiddenField ID="SelectedAreaId" runat="server" />
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="ctl00$FilterContent$btnbuscar" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="PostBackHidden" EventName="ValueChanged" />
        </Triggers>
    </asp:UpdatePanel>
    <wff:WindowManager ID="EditWindow" runat="server" DestroyOnClose="true" ReloadOnShow="false" Modal="true">
        <windows>
                <telerik:RadWindow ID="ImportDialog" runat="server" Height="480px" Width="800px" />
                <telerik:RadWindow ID="ExportDialog" runat="server" Height="450px" Width="800px" />
                <telerik:RadWindow ID="DocumentDialog" runat="server" Height="600px" Width="900px" />
        </windows>
    </wff:WindowManager>
</asp:Content>
