<commit_before>## index.html
<%inherit file="layout.html" />
<h1>${c.collection_name.title()}</h1>
% if c.collection:
    <% cols = c.Entity.c %>

    ${self.paginate_controls()}

    <table class="collection">
        <tr>
            % for col in cols:
                <th>${h.nice_name_for_col(col)}</th>
            % endfor
            <th>Actions</th>
        </tr>
        
        % for m in c.collection:
            <tr>
                % for col in cols:
                    <%
                        v = str(getattr(m, col.name))
                        if len(v) > 20:
                            v = v[:20] + '...'
                    %>
                    <td>${v}</td>
                % endfor
                <td class="actions">
                    ${h.nav_list_for_member(c.member_name, c.controller, m.id, (c.parent_member_name or None), (c.parent_id or None), terse_link_text=True, join_with='&middot;')}
                </td>
            </tr>
        % endfor
    </table>

    ${self.paginate_controls()}

% else:
    <p>
        No ${c.collection_name}. ${h.link_to('Create one &raquo;', h.url_for(action='new'))}
    </p>
% endif


<%def name="paginate_controls()">
    <div class="paginate-controls" style="margin: 5px 0;">
        <% prev_page, next_page, per_page = h.get_prev_next_per_page(c.paginator) %>
        <div class="prev" style="float:left;">
            ${h.link_to('&laquo; Previous', h.url_for(c.collection_name, page=prev_page, per_page=per_page), title='Go to previous page of %s' % c.collection_name)}
        </div>
        <div class="next" style="float:right;">
            ${h.link_to('Next &raquo;', h.url_for(c.collection_name, page=next_page, per_page=per_page), title='Go to next page of %s' % c.collection_name)}
        </div>
        <div style="clear: both;"></div>
    </div>
</%def><commit_msg>index.html: in paginate_controls def, use controller and action to generate URLs instead of route names.<commit_after>## index.html
<%inherit file="layout.html" />
<h1>${c.collection_name.title()}</h1>
% if c.collection:
    <% cols = c.Entity.c %>

    ${self.paginate_controls()}

    <table class="collection">
        <tr>
            % for col in cols:
                <th>${h.nice_name_for_col(col)}</th>
            % endfor
            <th>Actions</th>
        </tr>
        
        % for m in c.collection:
            <tr>
                % for col in cols:
                    <%
                        v = str(getattr(m, col.name))
                        if len(v) > 20:
                            v = v[:20] + '...'
                    %>
                    <td>${v}</td>
                % endfor
                <td class="actions">
                    ${h.nav_list_for_member(c.member_name, c.controller, m.id, (c.parent_member_name or None), (c.parent_id or None), terse_link_text=True, join_with='&middot;')}
                </td>
            </tr>
        % endfor
    </table>

    ${self.paginate_controls()}

% else:
    <p>
        No ${c.collection_name}. ${h.link_to('Create one &raquo;', h.url_for(action='new'))}
    </p>
% endif


<%def name="paginate_controls()">
    <div class="paginate-controls" style="margin: 5px 0;">
        <%
            prev_page, next_page, per_page = h.get_prev_next_per_page(c.paginator) 
            url_args = dict(controller=c.controller, action='index',
                            page=prev_page, per_page=per_page)
        %>
        <div class="prev" style="float:left;">
            ${h.link_to('&laquo; Previous', h.url_for(**url_args), title='Go to previous page of %s' % c.collection_name)}
        </div>
        <div class="next" style="float:right;">
            <% url_args['page'] = next_page %>
            ${h.link_to('Next &raquo;', h.url_for(**url_args), title='Go to next page of %s' % c.collection_name)}
        </div>
        <div style="clear: both;"></div>
    </div>
</%def>
{'fraction_non_alphanumeric': 0.16585863740750192, 'fraction_numerical': 0.004082674151569278, 'mean_word_length': 1.808022922636103, 'pattern_counts': {'":': 0, '<': 68, '<?xml version=': 0, '>': 70, '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': '5510012', 'n_tokens_mistral': 1348, 'n_tokens_neox': 1274, 'n_words': 248}