<commit_before>@(currentPage: com.avaje.ebean.Page[Event], currentSortBy: String, currentOrder: String, currentFilter: String)

    @*Navigation link*@
    @link(newPage:Int, newSortBy:String) = @{

        var sortBy = currentSortBy
        var order = currentOrder

        if(newSortBy != null) {
            sortBy = newSortBy
            if(currentSortBy == newSortBy) {
                if(currentOrder == "asc") {
                    order = "desc"
                } else {
                    order = "asc"
                }
            } else {
                order = "asc"
            }
        }
    }

    @*Helper Generating table headers*@
    @header(key:String, title:String) = {<commit_msg>Fixed link generator in event listing<commit_after>@(currentPage: com.avaje.ebean.Page[Event], currentSortBy: String, currentOrder: String, currentFilter: String)

    @*Navigation link*@
    @link(newPage:Int, newSortBy:String) = @{

        var sortBy = currentSortBy
        var order = currentOrder

        if(newSortBy != null) {
            sortBy = newSortBy
            if(currentSortBy == newSortBy) {
                if(currentOrder == "asc") {
                    order = "desc"
                } else {
                    order = "asc"
                }
            } else {
                order = "asc"
            }
        }

        //Generates the link
        routes.Events.list(newPage, sortBy, order, currentFilter)
    }

    @*Helper Generating table headers*@
    @header(key:String, title:String) = {
{'fraction_non_alphanumeric': 0.11016949152542373, 'fraction_numerical': 0.0, 'mean_word_length': 1.6374570446735395, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1186186', 'n_tokens_mistral': 443, 'n_tokens_neox': 424, 'n_words': 92}