<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PendingInvitations.aspx.cs" Inherits="eDocument.Server.Administrator.Consumer.PendingInvitations" MasterPageFile="~/Site.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <h1 class="skjema-admin__page-title">
        Invitasjoner og forespørsler som venter på godkjenning
    </h1>
    
    <div class="mb-2">
        <asp:HyperLink NavigateUrl="~/User/Invite.aspx" runat="server">
            Inviter ny bruker
        </asp:HyperLink>
    </div>
    <br/>

    <h3>Invitasjoner</h3>
    <asp:GridView
        ID="gvPendingInvitationsAdminInitiated"
        runat="server"
        AutoGenerateColumns="False"
        Width="100%"
        DataKeyNames="InvitationId"
        OnRowCommand="gvPendingInvitationsAdminInitiated_OnRowCommand"
        Border="0"
        CssClass="skjema-admin__table skjema-admin__table--min-width-3-n skjema-admin__table--min-width-6 skjema-admin__table--min-width-7 skjema-admin__table--min-width-8 jsTableCheckAll" >
        <HeaderStyle CssClass="skjema-admin__table__header"></HeaderStyle>
        <Columns>
            <asp:BoundField DataField="invitation.Email" HeaderText="Til" ></asp:BoundField>
            <asp:BoundField DataField="Roles" HeaderText="Med roller" ></asp:BoundField>
            <asp:BoundField DataField="adminUser.DisplayName" HeaderText="Fra" ></asp:BoundField>
            <asp:BoundField DataField="invitation.CreatedOn" HeaderText="Opprettet" ></asp:BoundField>
            <asp:ButtonField Text="Slett" runat="server"/>
        </Columns>
    </asp:GridView>
    <asp:Label runat="server" Visible="False" id="lblIngenSendtInternt">Ingen invitasjoner sendt ut.</asp:Label>
    
    <br/>
    <br/>

    <h3>Forespørsler om tilgang</h3>
    <asp:GridView
        ID="gvPendingInvitationsUserInitiated"
        runat="server"
        DataKeyNames="InvitationId"
        AutoGenerateColumns="False"
        Width="100%"
        Border="0"
        OnRowCommand="gvPendingInvitationsUserInitiated_OnRowCommand"
        CssClass="skjema-admin__table skjema-admin__table--min-width-3-n skjema-admin__table--min-width-6 skjema-admin__table--min-width-7 skjema-admin__table--min-width-8 jsTableCheckAll" >
        <HeaderStyle CssClass="skjema-admin__table__header"></HeaderStyle>
        <Columns>
            <asp:BoundField DataField="adminUser.Email" HeaderText="Forespurt av e-post" ></asp:BoundField>
            <asp:BoundField DataField="invitation.CreatedOn" HeaderText="Opprettet" ></asp:BoundField>
            <asp:ButtonField Text="Behandle" runat="server"/>
        </Columns>
    </asp:GridView>
    <asp:Label runat="server" Visible="False" id="lblIngenForespurtEksternt">Ingen forespørsler om tilgang.</asp:Label>
</asp:Content>