<commit_before><h1><%= _('Manage sub-groups') %></h1>

<% if !@pending_children.blank? %>
  <%= _('Sub-groups awaiting approval:') %>
  <ul>
    <% @pending_children.each do |child| %>
      <li><%= link_to(child.name, child.url) %></li>
    <% end %>
  </ul>
<% end %>

<% form_tag do %>
  <% button_bar do %>
    <%= button(:add, __('Create a new sub-community'), :controller => 'memberships', :action => 'new_community', :profile => user.identifier, :sub_organizations_plugin_parent_to_be => profile.id) %>
    <%= button :add, __('Register a new sub-enterprise'), :controller => 'enterprise_registration', :sub_organizations_plugin_parent_to_be => profile.id if environment.enabled?('enterprise_registration') %>
  <% end %>

  <%= token_input_field_tag(:q, 'search-organization', {:action => 'search_organization'},
    { :focus => true,
      :hint_text => _('Type in a search term for a group'),
      :pre_populate => @tokenized_children}) %>

  <% button_bar do %>
    <%= submit_button('save', _('Save'))%>
    <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%>
  <% end %>
<% end %>

<br style='clear: both'/>

<%= render :partial => 'shared/list_groups', :locals => {:profile => user, :groups => @children} %><commit_msg>Changing text from suborganization plugin<commit_after><h1><%= _('Manage sub-groups') %></h1>

<% if !@pending_children.blank? %>
  <%= _('Sub-groups awaiting approval:') %>
  <ul>
    <% @pending_children.each do |child| %>
      <li><%= link_to(child.name, child.url) %></li>
    <% end %>
  </ul>
<% end %>

<% form_tag do %>
  <% button_bar do %>
    <%= button(:add, __('Create a new sub-community'), :controller => 'memberships', :action => 'new_community', :profile => user.identifier, :sub_organizations_plugin_parent_to_be => profile.id) %>
    <%= button :add, __('Register a new sub-enterprise'), :controller => 'enterprise_registration', :sub_organizations_plugin_parent_to_be => profile.id if environment.enabled?('enterprise_registration') %>
  <% end %>

  <p><%= _('Fill in the search field to find the groups that should be added as sub-group of this organization:') %></p>
  <%= token_input_field_tag(:q, 'search-organization', {:action => 'search_organization'},
    { :focus => true,
      :hint_text => _('Type in a search term for a group'),
      :pre_populate => @tokenized_children}) %>

  <% button_bar do %>
    <%= submit_button('save', _('Save'))%>
    <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%>
  <% end %>
<% end %>

<br style='clear: both'/>

<%= render :partial => 'shared/list_groups', :locals => {:profile => user, :groups => @children} %>
{'fraction_non_alphanumeric': 0.20866290018832392, 'fraction_numerical': 0.0015065913370998117, 'mean_word_length': 4.639065817409766, 'pattern_counts': {'":': 0, '<': 58, '<?xml version=': 0, '>': 88, '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': '3876255', 'n_tokens_mistral': 952, 'n_tokens_neox': 856, 'n_words': 200}