@model WebApplication1.Models.user

@{
    ViewBag.Title = "Account managment";
}
<h2>Account managment</h2>
<h4>View and Edit account details</h4>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

<div>
    <h4>user</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            Username
        </dt>

        <dd>
            @Html.DisplayFor(model => model.usename)
        </dd>

        <dt>
            Display Name
        </dt>

        <dd>
            @Html.DisplayFor(model => model.displayname)
        </dd>
        <dt>
            @Html.DisplayNameFor(model => model.role)
        </dt>

        <dd>
            @ViewBag.role
        </dd>

    </dl>
    <div class="col-md-offset-2 col-md-10">
        @Html.ActionLink("edit account details", "Edit", null, new { @class = "btn btn-outline-dark" })

        @Html.ActionLink("Logout", "LogOut", null, new { @class = "btn btn-outline-dark" })

        @if (@ViewBag.role == "admin")
        {
            @Html.ActionLink("Manage users", "allusers", null, new { @class = "btn btn-outline-dark" })
        }
    </div>
    <br />
    <div class="col-md-offset-2 col-md-10">
        @Html.ActionLink("Delete Account", "Delete", null, new { @class = "btn btn-outline-dark" })
    </div>

</div>
        }

