<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<ICollection<FotbalPortal.Models.ExternalLogin>>" %>

<% if (Model.Count > 0) { %>
    <h3>Registrovaná externí přihlášení</h3>
    <table>
        <tbody>
        <% foreach (FotbalPortal.Models.ExternalLogin externalLogin in Model) { %>
            <tr>
                <td><%: externalLogin.ProviderDisplayName %></td>
                <td>
                    <% if (ViewBag.ShowRemoveButton) {
                        using (Html.BeginForm("Disassociate", "Account")) { %>
                            <%: Html.AntiForgeryToken() %>
                            <div>
                                <%: Html.Hidden("provider", externalLogin.Provider) %>
                                <%: Html.Hidden("providerUserId", externalLogin.ProviderUserId) %>
                                <input type="submit" value="Odebrat" title="Odebrat toto pověření <%: externalLogin.ProviderDisplayName %> z účtu" />
                            </div>
                        <% }
                    } else { %>
                        &nbsp;
                    <% } %>
                </td>
            </tr>
        <% } %>
        </tbody>
    </table>
<% } %>
