<commit_before>- if @text_component.errors.any?
  - @text_component.errors.full_messages.each do |message|
    .alert.alert-danger= message

- @text_components.each do |text_component|
  = render 'edit_modal', text_component: text_component

#modalTriggerText.modal.fade{"aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"}
  .modal-dialog{:role => "document"}
    .modal-content
      .modal-header
        %button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
          %span{"aria-hidden" => "true"} ×
        %div
          / Nav tabs
          %ul.nav.nav-tabs{:role => "tablist"}
            %li{:role => "presentation"}
              %a{"aria-controls" => "use", "data-toggle" => "tab", :href => "#use", :role => "tab"} Use Trigger
            %li.active{:role => "presentation"}
              %a{"aria-controls" => "create", "data-toggle" => "tab", :href => "#create", :role => "tab"} Create with new Trigger
      .modal-body
        / Tab panes
        .tab-content
          #use.tab-pane{:role => "tabpanel"}
            / Modal 1
            .modal-inner
              .row
                .col-sm-12
                  %h2 New text component
                  %div.help Use an existing trigger
              .row
                .col-sm-12
                  = render 'form', text_component: @new_text_component
          #create.tab-pane.active{:role => "tabpanel"}
            / Modal 2
            .modal-inner
              .row
                .col-sm-12
                  = render 'form', text_component: @new_text_component, create_trigger: true

.row
  .col-sm-12
    %h1 Text components

- if user_signed_in?
  .row
    .col-sm-12
      %button.btn.btn-primary.btn-lg.pull-right{"data-target" => "#modalTriggerText", "data-toggle" => "modal", :type => "button"}
        Create new text component
.row
  .col-sm-12
    = form_tag(report_text_components_path(@report), {method: :get}) do
      .form-group
        = label :filter, :assignee_id, 'By assignee', class: 'col-2 col-form-label'<commit_msg>Refactored markup for create tc modal<commit_after>- if @text_component.errors.any?
  - @text_component.errors.full_messages.each do |message|
    .alert.alert-danger= message

- @text_components.each do |text_component|
  = render 'edit_modal', text_component: text_component

#modalTriggerText.modal
  .modal-dialog
    .modal-content
      .modal-header
        %h4.modal-title New Text Component
        %button.close{"data-dismiss" => "modal", :type => "button"}
          %span ×

      .modal-body
        %ul.nav.nav-justified.mb-4
          %li.nav-item
            %a.btn.btn-secondary.active{"data-toggle" => "pill", :href => "#textComponent-create-newTrigger"} Create with new trigger

          %li.btn or

          %li.nav-item
            %a.btn.btn-secondary{"data-toggle" => "pill", :href => "#textComponent-create-useTrigger"} use an existing trigger

        .tab-content
          .tab-pane.active#textComponent-create-newTrigger
            = render 'form', text_component: @new_text_component, create_trigger: true
          .tab-pane#textComponent-create-useTrigger
            = render 'form', text_component: @new_text_component

.row
  .col-sm-12
    %h1 Text components

- if user_signed_in?
  .row
    .col-sm-12
      %button.btn.btn-primary.btn-lg.pull-right{"data-target" => "#modalTriggerText", "data-toggle" => "modal", :type => "button"}
        Create new text component
.row
  .col-sm-12
    = form_tag(report_text_components_path(@report), {method: :get}) do
      .form-group
        = label :filter, :assignee_id, 'By assignee', class: 'col-2 col-form-label'
{'fraction_non_alphanumeric': 0.15009534186870063, 'fraction_numerical': 0.007627349496050122, 'mean_word_length': 2.308108108108108, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 36, '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': '2876894', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1152, 'n_words': 240}