<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserProfiles.ascx.cs" Inherits="Zap.BI.Portal.Controls.Settings.UserProfiles" %>

<div style="width:800px;">
    <fieldset class="ui-fieldset" ID="Statistics" runat="server" >
        <legend>
            <asp:Label runat="server" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ProfileStatistics %>" />
        </legend>
        <table class="grid-view large-rows ui-text">
            <tbody>
                <tr class="grid-header">
                    <th style="width:30%">
                        <asp:Label runat="server" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ProfileStatisticsType %>" />
                    </th>
                    <th>
                        <asp:Label runat="server" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ProfileStatisticsCount %>" />
                    </th>
                </tr>
                <tr class="grid-row" ID="UserCountRow" runat="server">
                    <td>
                        <asp:Label runat="server" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ProfileStatisticsUsers %>"  />
                    </td>
                    <td>
                        <asp:Label ID="ProfileStatistics_UserCount" runat="server" />
                    </td>
                </tr>
                <tr class="grid-row" ID="ViewerCountRow" runat="server">
                    <td>
                        <asp:Label runat="server" Text="<%$ Resources: Controls.Settings.SettingsText, Label_ProfileStatisticsViewers %>" />
                    </td>
                    <td>
                        <asp:Label ID="ProfileStatistics_ViewerCount" runat="server" />
                    </td>
                </tr>
            </tbody>
        </table>
    </fieldset>
    <fieldset class="ui-fieldset">
        <legend>
            <asp:Label runat="server" Text="<%$ Resources: Controls.Settings.SettingsText, Label_CurrentUserProfiles %>" />
        </legend>
        <dxwgv:ASPxGridView style="height:100%;" runat="server" ID="UserGridView" EnableCallBacks="false" Width="100%" KeyFieldName="FullName" OnCustomButtonCallback="UserGridView_DeleteUser"
                            CssClass="large-rows has-filter has-details has-resizable-columns ui-text"
                            Styles-Header-CssClass="grid-header-cell"
                            Styles-FilterCell-CssClass="grid-filter"
                            Styles-Row-CssClass="grid-row"
                            Styles-EmptyDataRow-CssClass="grid-empty"
                            Styles-Disabled-CssClass="is-disabled" 
                            Styles-DetailButton-CssClass="detail-expander-column" 
                            Images-DetailCollapsedButton-SpriteProperties-CssClass="is-collapsed" 
                            Images-DetailExpandedButton-SpriteProperties-CssClass="is-expanded" 
                            Styles-PagerBottomPanel-CssClass="grid-pager" >
            <Settings ShowFilterRow="True" ShowFilterRowMenu="True" ShowVerticalScrollBar="true" VerticalScrollableHeight="300" />
            <SettingsBehavior AllowFocusedRow="true" ColumnResizeMode="Control" />
            <SettingsCustomizationWindow Enabled="true" PopupHorizontalAlign="LeftSides" PopupVerticalAlign="TopSides" PopupHorizontalOffset="30" PopupVerticalOffset="30" />
            <SettingsPager PageSize="2000" />
            <Columns>
                <dxwgv:GridViewDataColumn FieldName="FullName" Caption="<%$ Resources: Controls.Settings.SettingsText, Label_UserName %>" VisibleIndex="0" Width="60%" SortOrder="Ascending"  >
                    <Settings AutoFilterCondition="Contains" />
                </dxwgv:GridViewDataColumn>
                <dxwgv:GridViewDataColumn FieldName="LicenseUserType" Caption="<%$ Resources: Controls.Settings.SettingsText, Label_LicenseUserType %>" VisibleIndex="0" Width="20%" SortOrder="Ascending"  >
                </dxwgv:GridViewDataColumn>
                <dxwgv:GridViewDataColumn FieldName="OrganizationName" Caption="<%$ Resources: Controls.Settings.SettingsText, Label_OrganizationName %>" VisibleIndex="0" Width="10%" SortOrder="Ascending"  >
                    <Settings AutoFilterCondition="Contains" />
                </dxwgv:GridViewDataColumn>
                <dxwgv:GridViewDataColumn FieldName="Roles" Caption="<%$ Resources: Controls.Settings.SettingsText, Label_Roles %>" VisibleIndex="0" Width="20%" SortOrder="Ascending"  >
                    <Settings AutoFilterCondition="Contains" />
                </dxwgv:GridViewDataColumn>
                <dxwgv:GridViewCommandColumn VisibleIndex="2" Width="60" Caption="&nbsp;">
                    <CustomButtons>
                        <dxwgv:GridViewCommandColumnCustomButton Text="<%$ Resources: Controls.Settings.SettingsText, Label_Delete %>" />
                    </CustomButtons>
                </dxwgv:GridViewCommandColumn>
            </Columns>
            <Styles CssPostfix="DE">
                <AlternatingRow Enabled="True" />
            </Styles>
            <Templates>
                <DetailRow>
                    <dxwgv:ASPxGridView ID="UserDetailGridView" runat="server" KeyFieldName="ResourcePath" EnableCallBacks="false" Width="100%" 
                        OnBeforePerformDataSelect="UserDetailGridView_DataSelect"
                        CssClass="large-rows has-resizable-columns"
                        Styles-Header-CssClass="grid-header-cell"
                        Styles-Row-CssClass="grid-row"
                        Styles-EmptyDataRow-CssClass="grid-empty"
                        Styles-Disabled-CssClass="is-disabled" >
                        <Columns>
                            <dxwgv:GridViewDataColumn FieldName="ResourcePath" Caption="<%$ Resources: Controls.Settings.SettingsText, Label_ResourcePath %>" VisibleIndex="1" Width="60%" />
                            <dxwgv:GridViewDataColumn FieldName="ResourceType" Caption="<%$ Resources: Controls.Settings.SettingsText, Label_ResourceType %>" VisibleIndex="2" Width="20%" />
                            <dxwgv:GridViewDataColumn FieldName="FolderPermissions" Caption="<%$ Resources: Controls.Settings.SettingsText, Label_FolderPermissions %>" VisibleIndex="3" Width="20%" />
                        </Columns>
                        <SettingsDetail IsDetailGrid="true"/>
                        <Styles CssPostfix="DE">
                            <AlternatingRow Enabled="True" />
                        </Styles>
                        <Settings ShowFooter="true" />
                    </dxwgv:ASPxGridView>
                </DetailRow>
            </Templates>
            <SettingsDetail ShowDetailRow="true"/>
        </dxwgv:ASPxGridView>
        <br />
    </fieldset>
</div>
