<commit_before><div class="my-3 py-3 border-vertical">
  <%= t(:profile_status, scope: 'admin.dashboard.profiles') + t(:public, scope: 'admin.dashboard.profiles') + ' ' if @profile.published? %>
  <% if @profile.published %>
    <%= link_to t(:make_invisible, scope: 'admin.dashboard.profiles'), unpublish_admin_profile_path(@profile.id),
    method: :post, class:'btn btn-sm btn-danger', title: 'Hier kannst Du das Profile wieder unsichtbar machen.' %>
  <% else %>
    <%= link_to t(:make_public, scope: 'admin.dashboard.profiles'), publish_admin_profile_path(@profile.id),
    method: :post, class:'btn btn-sm btn-danger', title: 'Eine Bestätigungsmail wird verschickt.' %>
  <% end %>
  <%= link_to t(:edit, scope: 'medialinks'), admin_profile_medialinks_path(@profile), class:'btn btn-blue btn-sm', title: t(:edit, scope: 'medialinks') %>
  <br>
  <br>
  <%= form_for @profile,{ url: admin_update_admin_profile_path(@profile.id), method: 'post' } do |f| %>
    <%= hidden_field_tag 'page', page %>
    <%= f.text_field 'admin_comment' %>
    <%= f.submit t(:add_comment, scope: 'admin.dashboard.profiles'), class: 'btn btn-blue btn-sm' %>
  <% end %>
  <br>
  <%= simple_form_for @profile, { url: admin_update_admin_profile_path(@profile.id), method: 'post', 
      html: { class: 'mt-3' }}  do |f| %>
    <div class="form-group">
      <%= f.association :features, label: t(:feature_list, scope: 'admin.dashboard.profiles').html_safe, 
          input_html: { value: @profile.features.map { |f| f.title }, class: "form-control" }, wrapper_html: { class: "my-3" } %>
      <%= f.submit t(:assign_feature, scope: 'admin.dashboard.profiles'), class: 'btn btn-blue btn-sm' %>
    </div>
  <% end  %>
</div><commit_msg>add select2 to admin profile view<commit_after><div class="my-3 py-3 border-vertical">
  <%= t(:profile_status, scope: 'admin.dashboard.profiles') + t(:public, scope: 'admin.dashboard.profiles') + ' ' if @profile.published? %>
  <% if @profile.published %>
    <%= link_to t(:make_invisible, scope: 'admin.dashboard.profiles'), unpublish_admin_profile_path(@profile.id),
    method: :post, class:'btn btn-sm btn-danger', title: 'Hier kannst Du das Profile wieder unsichtbar machen.' %>
  <% else %>
    <%= link_to t(:make_public, scope: 'admin.dashboard.profiles'), publish_admin_profile_path(@profile.id),
    method: :post, class:'btn btn-sm btn-danger', title: 'Eine Bestätigungsmail wird verschickt.' %>
  <% end %>
  <%= link_to t(:edit, scope: 'medialinks'), admin_profile_medialinks_path(@profile), class:'btn btn-blue btn-sm', title: t(:edit, scope: 'medialinks') %>
  <br>
  <br>
  <%= form_for @profile,{ url: admin_update_admin_profile_path(@profile.id), method: 'post' } do |f| %>
    <%= hidden_field_tag 'page', page %>
    <%= f.text_field 'admin_comment' %>
    <%= f.submit t(:add_comment, scope: 'admin.dashboard.profiles'), class: 'btn btn-blue btn-sm' %>
  <% end %>
  <br>
  <%= simple_form_for @profile, { url: admin_update_admin_profile_path(@profile.id), method: 'post', 
      html: { class: 'mt-3' }}  do |f| %>
    <div class="form-group">
      <%= f.label t(:feature_list, scope: 'admin.dashboard.profiles').html_safe %>
      <%= f.select(:feature_ids, Feature.all.map{|feature|[feature.title, feature.id]}, { include_blank: true }, :multiple => true, id: :select_feature, class: 'form-control select_feature') %>

      <%= f.submit t(:assign_feature, scope: 'admin.dashboard.profiles'), class: 'btn btn-blue btn-sm' %>
    </div>
  <% end  %>
</div>

<script>
    $(document).ready(function() {
      $('#select_feature').select2();
    });
</script>
{'fraction_non_alphanumeric': 0.19206217041354426, 'fraction_numerical': 0.002497918401332223, 'mean_word_length': 4.52760736196319, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 53, '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': '6633050', 'n_tokens_mistral': 1306, 'n_tokens_neox': 1247, 'n_words': 262}