<commit_before><!DOCTYPE html>
<html>
<head>
    {{>header}}
    <title>Coffee store</title>
</head>
<body>
<div class="container">
    <div class="row py-2">
        <div class="col">
            {{#userInfo}}Hi {{name}}. {{/userInfo}}
            Welcome to coffee store.
            {{#userInfo}}<a href="/logout">Sign out</a>{{/userInfo}}
            {{^userInfo}}<a href="/login">Sign in</a>{{/userInfo}}
        </div>
    </div>

    <form action="/" method="get">
        <div class="form-row align-items-center py-2">
            <div class="col-auto">
                <label class="sr-only" for="searchKey">Name</label>
                <input type="text" name="searchKey" value="{{searchKey}}" class="form-control mb-2 mb-sm-0"
                       id="searchKey" placeholder="name">
            </div>
            <div class="col-auto">
                <label for="productType" class="sr-only">State</label>
                <select id="productType" name="type" class="form-control">
                    <option value="0">All</option>
                    <option value="1">Coffee</option>
                    <option value="2">Dessert</option>
                </select>
            </div>
            <div class="col-auto">
                <button type="submit" class="btn btn-primary">Search</button>
            </div>
        </div>
    </form>

    <div class="row">
        <div class="col">
            <table class="table table-hover table-responsive table-bordered">
                <thead>
                <tr class="table-primary">
                    <th>#</th>
                    <th>Name</th>
                    <th>Price</th>
                    <th>Type</th>
                    <th>Amount</th>
                    <th>Description</th>
                </tr>
                </thead>
                <tbody>
                {{#products}}
                    {{#record}}
                        <tr>
                            <td>{{id}}</td>
                            <td>{{name}}</td>
                            <td>{{price}}</td>
                            <td>{{typeDesc}}</td>
                            <td>{{amount}}</td>
                            <td>{{description}}</td>
                        </tr>
                    {{/record}}
                    {{^record}}
                        <tr>
                            <td colspan="6">No data</td>
                        </tr>
                    {{/record}}
                {{/products}}
                </tbody>
            </table>
            
            {{#products}}
                <div class="d-flex justify-content-end">
                    <div class="p-1">
                        <a href="/?pageNumber={{lastNumber}}&type={{type}}&searchKey={{searchKey}}"
                           {{^last}}aria-disabled="true"{{/last}} role="button"
                           class="btn btn-outline-primary btn-sm {{^last}}disabled{{/last}}">Previous</a>
                    </div>
                    <div class="py-1">
                        <a href="/?pageNumber={{nextNumber}}&type={{type}}&searchKey={{searchKey}}"
                           {{^next}}aria-disabled="true"{{/next}} role="button"
                           class="btn btn-outline-primary btn-sm {{^next}}disabled{{/next}}">Next</a>
                    </div>
                </div>
            {{/products}}
        </div>
    </div>

</div>

{{>scripts}}
<script>
    $(document).ready(function () {
        $("#productType").val({{type}});
    });
</script>
</body>
</html><commit_msg>[feat]: add select all checkbox for example<commit_after><!DOCTYPE html>
<html>
<head>
    {{>header}}
    <title>Coffee store</title>
</head>
<body>
<div class="container">
    <div class="row py-2">
        <div class="col">
            {{#userInfo}}Hi {{name}}. {{/userInfo}}
            Welcome to coffee store.
            {{#userInfo}}<a href="/logout">Sign out</a>{{/userInfo}}
            {{^userInfo}}<a href="/login">Sign in</a>{{/userInfo}}
        </div>
    </div>

    <form action="/" method="get">
        <div class="form-row align-items-center py-2">
            <div class="col-auto">
                <label class="sr-only" for="searchKey">Name</label>
                <input type="text" name="searchKey" value="{{searchKey}}" class="form-control mb-2 mb-sm-0"
                       id="searchKey" placeholder="name">
            </div>
            <div class="col-auto">
                <label for="productType" class="sr-only">State</label>
                <select id="productType" name="type" class="form-control">
                    <option value="0">All</option>
                    <option value="1">Coffee</option>
                    <option value="2">Dessert</option>
                </select>
            </div>
            <div class="col-auto">
                <button type="submit" class="btn btn-secondary">Search</button>
            </div>
            {{#userInfo}}
                <div class="col-auto">
                    <button type="button" class="btn btn-primary">Buy</button>
                </div>
            {{/userInfo}}
        </div>
    </form>

    <div class="row">
        <div class="col">
            <table id="productTable" class="table table-hover table-responsive table-bordered">
                <thead>
                <tr class="table-primary">
                    {{#userInfo}}
                        <th>
                            <div class="form-check">
                                <label class="form-check-label">
                                    <input class="form-check-input" type="checkbox" id="allProductBox"
                                           value="allProductBox"
                                           aria-label="...">
                                </label>
                            </div>
                        </th>
                    {{/userInfo}}
                    <th>#</th>
                    <th>Name</th>
                    <th>Price</th>
                    <th>Type</th>
                    <th>Amount</th>
                    <th>Description</th>
                </tr>
                </thead>
                <tbody>
                {{#products}}
                    {{#record}}
                        <tr>
                            {{#userInfo}}
                                <th>
                                    <div class="form-check">
                                        <label class="form-check-label">
                                            <input class="form-check-input" name="productSubBox" type="checkbox"
                                                   value="{{id}}"
                                                   aria-label="...">
                                        </label>
                                    </div>
                                </th>
                            {{/userInfo}}
                            <td>{{id}}</td>
                            <td>{{name}}</td>
                            <td>{{price}}</td>
                            <td>{{typeDesc}}</td>
                            <td>{{amount}}</td>
                            <td>{{description}}</td>
                        </tr>
                    {{/record}}
                    {{^record}}
                        <tr>
                            <td colspan="6">No data</td>
                        </tr>
                    {{/record}}
                {{/products}}
                </tbody>
            </table>

            {{#products}}
                <div class="d-flex justify-content-end">
                    <div class="p-1">
                        <a href="/?pageNumber={{lastNumber}}&type={{type}}&searchKey={{searchKey}}"
                           {{^last}}aria-disabled="true"{{/last}} role="button"
                           class="btn btn-outline-primary btn-sm {{^last}}disabled{{/last}}">Previous</a>
                    </div>
                    <div class="py-1">
                        <a href="/?pageNumber={{nextNumber}}&type={{type}}&searchKey={{searchKey}}"
                           {{^next}}aria-disabled="true"{{/next}} role="button"
                           class="btn btn-outline-primary btn-sm {{^next}}disabled{{/next}}">Next</a>
                    </div>
                </div>
            {{/products}}
        </div>
    </div>

</div>

{{>scripts}}
<script>
    $(document).ready(function () {
        $("#productType").val({{type}});

        $("#allProductBox").click(function () {
            $('input[name="productSubBox"]').prop("checked", this.checked);
        });
    });
</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.1686482742698834, 'fraction_numerical': 0.002308669052291354, 'mean_word_length': 1.0877108433734939, 'pattern_counts': {'":': 0, '<': 217, '<?xml version=': 0, '>': 221, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5564534', 'n_tokens_mistral': 2302, 'n_tokens_neox': 2167, 'n_words': 368}