<commit_before><div class="panel panel-default" id="commerce-orders-list">
    <div class="panel-heading">
        <h4><span class="fa fa-cog"></span> <%= t('plugin.ecommerce.orders') %></h4>
    </div>

    <div class="panel-body">
        <div class="box-adv-search pull-right" id="orders-box-adv-search">
            <div class="input-group" id="adv-search">
                <input type="text" class="form-control" placeholder="<%= t('plugin.ecommerce.search_order_number') %>" name="q" value="<%= params[:q] %>"/>

                <div class="input-group-btn">
                    <div class="btn-group" role="group">
                        <div class="dropdown dropdown-lg">
                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                <span class="caret"></span></button>
                            <div class="dropdown-menu dropdown-menu-right" role="menu">
                                <form action="<%= url_for(action: :index) %>" method="get" class="form-horizontal" role="form">
                                    <div class="form-group">
                                        <label for="contain"><%= t('plugin.ecommerce.table.customer') %> </label>
                                        <input class="form-control" type="text" name="c" value="<%= params[:c] %>"/>
                                    </div>
                                    <div class="form-group">
                                        <label for="contain"><%= t('plugin.ecommerce.e_mail_address') %></label>
                                        <input class="form-control" type="email" name="e" value="<%= params[:e] %>"/>
                                    </div>
                                    <div class="form-group">
                                        <label for="contain"><%= t('plugin.ecommerce.phone_number') %></label>
                                        <input class="form-control" type="text" name="p" value="<%= params[:p] %>"/>
                                    </div>
                                    <div class="form-group">
                                        <label for="contain"><%= t('plugin.ecommerce.table.status') %></label>
                                        <%= select_tag "s", options_for_select([[""], [t('plugin.ecommerce.select.received'), "received"], [t('plugin.ecommerce.select.unpaid'), "unpaid"], [t('plugin.ecommerce.select.accepted'), "accepted"], [t('plugin.ecommerce.select.shipped'), "shipped"], [t('plugin.ecommerce.select.closed'), "closed"], [t('plugin.ecommerce.select.canceled'), "canceled"]], params[:s]), class: 'form-control' %>
                                    </div>

                                    <button type="submit" class="btn btn-primary">
                                        <span class="fa fa-search" aria-hidden="true"></span></button>
                                </form>
                            </div>
                        </div>
                        <button type="button" class="btn btn-primary">
                            <span class="fa fa-search" aria-hidden="true"></span></button>
                    </div>
                </div>
            </div>
        </div>
        <div class="hidden" id="commerce_cancel_modal">
            <%= form_tag '#' do %>
                <div class="form-group">
                    <%= label_tag nil, t('plugin.ecommerce.table.description', default: 'Description') %>
                    <%= text_area_tag 'description', '', class: 'form-control required' %>
                </div>
                <div class="">
                    <span class="input-group-btn"><button class="btn btn-default" type="submit"><%= t('plugin.ecommerce.table.make_canceled', default: 'Mark as Canceled') %></button></span>
                </div>
            <% end %>
        </div>

        <div class="hidden" id="commerce_shipped_modal">
            <%= form_tag '#' do %>
                <div>
                    <%= label_tag nil, t('plugin.ecommerce.show_order.consignment_number', default: 'Consignment Number') %>
                </div>
                <div class="input-group">
                    <%= text_field_tag 'consignment_number', '', class: 'form-control' %>
                    <span class="input-group-btn"><button class="btn btn-default" type="submit"><%= t('plugin.ecommerce.table.make_shipped', default: 'Mark as Shipped') %></button></span>
                </div>
            <% end %>
        </div>

        <table class="table">
            <thead>
            <tr>
                <th id=""><%= t('plugin.ecommerce.table.id') %></th>
                <th id=""><%= t('plugin.ecommerce.table.customer') %></th>
                <th id=""><%= t('plugin.ecommerce.table.status') %></th>
                <th id=""><%= t('plugin.ecommerce.table.paid') %></th>
                <th id=""><%= t('plugin.ecommerce.table.products') %></th>
                <th id=""><%= t('plugin.ecommerce.table.amount') %></th>
                <th id=""><%= t('plugin.ecommerce.table.received_time') %></th>
                <th id=""><%= t('plugin.ecommerce.table.payment_method') %></th>
                <th><%= t('camaleon_cms.admin.table.actions') %></th>
            </tr>
            </thead>
            <tbody>
            <%
                @orders.each do |order|
                  order = order.decorate
            %>
                <tr>
                    <td><%= order.slug %></td>
                    <td><%= order.user.fullname %></td>
                    <td><%= raw order.the_status %></td>
                    <td><%= order.paid? ? 'Yes' : 'No' %></td><commit_msg>Account for order.user being nil, since there is no foreign key enforcement<commit_after><div class="panel panel-default" id="commerce-orders-list">
    <div class="panel-heading">
        <h4><span class="fa fa-cog"></span> <%= t('plugin.ecommerce.orders') %></h4>
    </div>

    <div class="panel-body">
        <div class="box-adv-search pull-right" id="orders-box-adv-search">
            <div class="input-group" id="adv-search">
                <input type="text" class="form-control" placeholder="<%= t('plugin.ecommerce.search_order_number') %>" name="q" value="<%= params[:q] %>"/>

                <div class="input-group-btn">
                    <div class="btn-group" role="group">
                        <div class="dropdown dropdown-lg">
                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                <span class="caret"></span></button>
                            <div class="dropdown-menu dropdown-menu-right" role="menu">
                                <form action="<%= url_for(action: :index) %>" method="get" class="form-horizontal" role="form">
                                    <div class="form-group">
                                        <label for="contain"><%= t('plugin.ecommerce.table.customer') %> </label>
                                        <input class="form-control" type="text" name="c" value="<%= params[:c] %>"/>
                                    </div>
                                    <div class="form-group">
                                        <label for="contain"><%= t('plugin.ecommerce.e_mail_address') %></label>
                                        <input class="form-control" type="email" name="e" value="<%= params[:e] %>"/>
                                    </div>
                                    <div class="form-group">
                                        <label for="contain"><%= t('plugin.ecommerce.phone_number') %></label>
                                        <input class="form-control" type="text" name="p" value="<%= params[:p] %>"/>
                                    </div>
                                    <div class="form-group">
                                        <label for="contain"><%= t('plugin.ecommerce.table.status') %></label>
                                        <%= select_tag "s", options_for_select([[""], [t('plugin.ecommerce.select.received'), "received"], [t('plugin.ecommerce.select.unpaid'), "unpaid"], [t('plugin.ecommerce.select.accepted'), "accepted"], [t('plugin.ecommerce.select.shipped'), "shipped"], [t('plugin.ecommerce.select.closed'), "closed"], [t('plugin.ecommerce.select.canceled'), "canceled"]], params[:s]), class: 'form-control' %>
                                    </div>

                                    <button type="submit" class="btn btn-primary">
                                        <span class="fa fa-search" aria-hidden="true"></span></button>
                                </form>
                            </div>
                        </div>
                        <button type="button" class="btn btn-primary">
                            <span class="fa fa-search" aria-hidden="true"></span></button>
                    </div>
                </div>
            </div>
        </div>
        <div class="hidden" id="commerce_cancel_modal">
            <%= form_tag '#' do %>
                <div class="form-group">
                    <%= label_tag nil, t('plugin.ecommerce.table.description', default: 'Description') %>
                    <%= text_area_tag 'description', '', class: 'form-control required' %>
                </div>
                <div class="">
                    <span class="input-group-btn"><button class="btn btn-default" type="submit"><%= t('plugin.ecommerce.table.make_canceled', default: 'Mark as Canceled') %></button></span>
                </div>
            <% end %>
        </div>

        <div class="hidden" id="commerce_shipped_modal">
            <%= form_tag '#' do %>
                <div>
                    <%= label_tag nil, t('plugin.ecommerce.show_order.consignment_number', default: 'Consignment Number') %>
                </div>
                <div class="input-group">
                    <%= text_field_tag 'consignment_number', '', class: 'form-control' %>
                    <span class="input-group-btn"><button class="btn btn-default" type="submit"><%= t('plugin.ecommerce.table.make_shipped', default: 'Mark as Shipped') %></button></span>
                </div>
            <% end %>
        </div>

        <table class="table">
            <thead>
            <tr>
                <th id=""><%= t('plugin.ecommerce.table.id') %></th>
                <th id=""><%= t('plugin.ecommerce.table.customer') %></th>
                <th id=""><%= t('plugin.ecommerce.table.status') %></th>
                <th id=""><%= t('plugin.ecommerce.table.paid') %></th>
                <th id=""><%= t('plugin.ecommerce.table.products') %></th>
                <th id=""><%= t('plugin.ecommerce.table.amount') %></th>
                <th id=""><%= t('plugin.ecommerce.table.received_time') %></th>
                <th id=""><%= t('plugin.ecommerce.table.payment_method') %></th>
                <th><%= t('camaleon_cms.admin.table.actions') %></th>
            </tr>
            </thead>
            <tbody>
            <%
                @orders.each do |order|
                  order = order.decorate
            %>
                <tr>
                    <td><%= order.slug %></td>
                    <td>
                      <% if order.user %>
                        <%= order.user.fullname %>
                      <% else %>
                        <small>(No user)</small>
                      <% end %>
                    </td>
                    <td><%= raw order.the_status %></td>
                    <td><%= order.paid? ? 'Yes' : 'No' %></td>
{'fraction_non_alphanumeric': 0.1788701143539853, 'fraction_numerical': 0.0003413551800648575, 'mean_word_length': 1.4593913955928646, 'pattern_counts': {'":': 0, '<': 294, '<?xml version=': 0, '>': 294, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 46, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1885457', 'n_tokens_mistral': 3234, 'n_tokens_neox': 2996, 'n_words': 564}