@using OurUmbraco.Forum.Extensions
@inherits OurUmbraco.Our.Models.OurUmbracoTemplatePage
@{
    Layout = "~/Views/Master.cshtml";
    var numberOfDays = 365;
    var numberOfResults = 25;
    if (Request.QueryString["days"] != null)
    {
        int.TryParse(Request.QueryString["days"], out numberOfDays);
    }

    var karma = OurUmbraco.Powers.Library.Xslt.MemberKarma(numberOfDays, numberOfResults);
}

<div id="body" class="page markdown-syntax">
    <div>
        @Html.Action("Render", "Breadcrumb", new { linkToCurrent = false })
    </div>
    @if (MemberData != null && MemberData.Member != null && MemberData.Member.IsHq())
    {
        <h1>Karma leaderboard</h1>
        
        <textarea style="width: 400px;height: 600px;">
            @while (karma.MoveNext())
            {
                @karma.Current.InnerXml
            }
        </textarea>
    }
</div>

