[% site_config.title = c.loc('Number Patterns for [_1]', level_result.level) -%]

[%
    helper.name = c.loc('Number Pattern');
    helper.identifier = 'number_pattern';
    helper.messages = messages;
    helper.dt_columns = pattern_dt_columns;
    helper.length_change = 1;

    helper.close_target = close_target;
    helper.create_flag = create_flag;
    helper.edit_flag = edit_flag;
    helper.form_object = form;
    helper.ajax_uri = c.uri_for_action( "/ncos/pattern_ajax", [c.req.captures.0] );

    helper.tmpuri = c.uri_for_action( "/ncos/pattern_root", [c.req.captures.0] );

    UNLESS c.user.read_only;
        helper.dt_buttons = [
            { name = c.loc('Edit'), uri = helper.tmpuri _ "/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' },
            { name = c.loc('Delete'), uri = helper.tmpuri _ "/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
        ];
        helper.top_buttons = [
            { name = c.loc('Create Pattern Entry'), uri = c.uri_for_action( "/ncos/pattern_create", [c.req.captures.0] ), icon = 'icon-star' },
        ];
    END;

    PROCESS 'helpers/datatables.tt';
-%]

<div id="number_patterns_local_ac">
    <input id="local_ac" type="checkbox" name="local_ac" disabled="disabled"
        [% IF local_ac_checked %]checked="checked"[% END %]>
    <label for="local_ac">[% c.loc('Include local area code') %]</label>

    <div>
        <a class="btn btn-primary btn-small"
            href="[% c.uri_for_action("/ncos/pattern_edit_local_ac", [c.req.captures.0]) %]">
            <i class="icon-edit"></i> [% c.loc('Edit') %]
        </a>
    </div>
</div>

[% # vim: set tabstop=4 syntax=html expandtab: -%]
