[% site_config.title = c.loc('Domains') -%]
[%
    helper.name = c.loc('Domain');
    helper.identifier = 'Domain';
    helper.data = domains;
    helper.messages = messages;
    helper.dt_columns = domain_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( c.controller.action_for('ajax') );

    UNLESS c.user.read_only;
        helper.dt_buttons = [
            { name = c.loc('Delete'), uri = "/domain/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
            { name = c.loc('Preferences'), uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
        ];
        helper.top_buttons = [
            { name = c.loc('Create Domain'), uri = c.uri_for('/domain/create'), icon = 'icon-star' },
        ];
    ELSE;
        helper.dt_buttons = [
            { name = c.loc('Preferences'), uri = "/domain/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
        ];
    END;

    PROCESS 'helpers/datatables.tt';
-%]
[% # vim: set tabstop=4 syntax=html expandtab: -%]
