<%! from django.utils.translation import ugettext as _ %>

<%
split_test = context.get('split_test')
user_partition = split_test.descriptor.get_selected_partition()
show_link = group_configuration_url is not None
%>

% if is_configured:
<div class="wrapper-xblock-message">
    <div class="xblock-message information">
        <p>
            <span class="message-text">
                ${_("This content experiment uses group configuration '{group_configuration_name}'.").format(
                    group_configuration_name="<a href='{}'>{}</a>".format(group_configuration_url, user_partition.name) if show_link else user_partition.name
                )}
            </span>
        </p>
    </div>
</div>
% endif

% if is_root:
    <div class="wrapper-groups is-active">
        <h3 class="sr">${_("Active Groups")}</h3>
        ${active_groups_preview}
    </div>

    % if inactive_groups_preview:
        <div class="wrapper-groups is-inactive">
            <h3 class="title">${_("Inactive Groups")}</h3>
            ${inactive_groups_preview}
        </div>
    % endif
% endif
