<commit_before>﻿@model IEnumerable<Sogeti.Capstone.Web.ViewModel.EventViewModel>

@{
    ViewBag.Title = "Events";
}

<br/>
<div class="container">

    <h3>
        <div class="pull-left">
            Events
            @Html.ActionLink("New", "Create", null, new {@class = "btn btn-primary"})
        </div>
        <div class="pull-right">
            @using (Html.BeginForm())
            {
                @Html.TextBox("searchQuery")
                @Html.Hidden("searchQuery", "")
                <input class="btn btn-warning" type="submit" value="Search"/>
            }
        </div>
    </h3>
</div>

<br />

@Html.Partial("_EventsList")

<nav>
    <ul class="pagination">
        <li>
            @{
                int pId = Convert.ToInt32(Request["pageId"]);
                string buttonStatus = "enabled";


                pId--;
                if (pId < 1) { pId = 1; }

                if (pId == 1) {buttonStatus = "disabled";}

                @Html.ActionLink("«", "Index", new { pageId = pId }, new { @class = buttonStatus })
            }
        </li>
        @for (int i = 1; i < ViewBag.NumberOfPages + 1; i++)
        {
            <li>
                @Html.ActionLink(i.ToString(), "Index", new { pageId = i })
            </li>
        }
        <li>
            @{
                int rightPid = Convert.ToInt32(Request["pageId"]);
                string rightButtonStatus = "enabled";

                if (rightPid < 1) { rightPid = 1; }
                rightPid++;

                if (rightPid == (ViewBag.NumberOfPages + 1))
                {
                    rightPid = ViewBag.NumberOfPages;
                }

                @Html.ActionLink("»", "Index", new { pageId = rightPid }, new { @class = rightButtonStatus })
            }
        </li>
    </ul>
</nav>
<commit_msg>Fixed search and pageID to persist.<commit_after>﻿@model IEnumerable<Sogeti.Capstone.Web.ViewModel.EventViewModel>

@{
    ViewBag.Title = "Events";
}

<br/>
<div class="container">

    <h3>
        <div class="pull-left">
            Events
            @Html.ActionLink("New", "Create", null, new {@class = "btn btn-primary"})
        </div>
        <div class="pull-right">
            @using (Html.BeginForm())
            {
                @Html.TextBox("searchQuery")
                @Html.ActionLink("Search", "Index", new { searchQuery = Request["searchQuery"]}, new { @class = "btn btn-warning" })
            }
        </div>
    </h3>
</div>

<br />

@Html.Partial("_EventsList")

<nav>
<ul class="pagination">
    @{
        int pId = Convert.ToInt32(Request["pageId"]);
        string buttonStatus = "enabled";
        pId--;
        if (pId < 1) { pId = 1; }

        if (pId == 1) { buttonStatus = "disabled"; }
        
        <li class="@buttonStatus">
            @Html.ActionLink("«", "Index", new {pageId = pId, searchQuery = Request["searchQuery"]})
        </li>
    }
        @for (int i = 1; i < ViewBag.NumberOfPages + 1; i++)
        {
            <li>
                @Html.ActionLink(i.ToString(), "Index", new { pageId = i, searchQuery = Request["searchQuery"] })
            </li>
        }
        <li>
            @{
                int rightPid = Convert.ToInt32(Request["pageId"]);
                string rightButtonStatus = "enabled";

                if (rightPid < 1) { rightPid = 1; }
                rightPid++;

                if (rightPid == (ViewBag.NumberOfPages + 1))
                {
                    rightPid = ViewBag.NumberOfPages;
                }

                @Html.ActionLink("»", "Index", new { pageId = rightPid, searchQuery = Request["searchQuery"] }, new { @class = rightButtonStatus })
            }
        </li>
    </ul>
</nav>

{'fraction_non_alphanumeric': 0.15833333333333333, 'fraction_numerical': 0.007526881720430108, 'mean_word_length': 1.5468856947296372, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3315416', 'n_tokens_mistral': 1179, 'n_tokens_neox': 1102, 'n_words': 236}