<commit_before>-requests = pbc_list.requests.all

.pbc-request-zone
  .row-fluid
    .span6.pbc-main-title
      %h3 Requests
    -if requests.any?(&:control_assessment_id)
      .span2
        %span.word.pull-right
          %strong CA Status:
      .span1
        %span.word internal
        %span.letter D
        %span.letter E
      .span1
        %span.word external
        %span.letter D
        %span.letter E
    -else
      .span4 &nbsp;
    .span2.pbc-add
      .btn-group
        %a{:'data-toggle'=>"dropdown", :href => "#", :class => "btn btn-mini btn-success dropdown-toggle"}
          + Add New Request
          %span.caret
        %ul.dropdown-menu.pull-right
          -Request.types.each do |type_id, type_name|
            %li.add-new-item
              %a{ :href => new_flow_request_path(:'request[pbc_list_id]' => pbc_list.id, :'request[type_id]' => type_id), :'data-toggle' => 'modal-ajax-form', :'data-modal-reset' => 'reset', :'data-form-target' => 'refresh', :'data-modal-class' => 'modal-wide'}
                %i{ :class => request_type_icon(type_name) }
                =type_name

%ul.pbc-control-assessments#requests
  -sorted_requests_with_control_assessments(requests).each do |control_assessment_id, control_assessment, requests|
    -control_assessment_collapse_id = "control_assessment-#{control_assessment && control_assessment.control && control_assessment.control_id || 'null'}"
    %li.pbc-ca-item{ :'data-type' => 'ControlAssessment', :'data-id' => control_assessment_id, :'data-control-id' => control_assessment && control_assessment.control && control_assessment.control_id, 'data-sort-control-code' => control_assessment && control_assessment.control && control_assessment.control.slug }
      .pbc-ca-title
        .row-fluid
          .span2{"data-target" => "##{control_assessment_collapse_id}", "data-toggle" => "collapse"}
            .expander.in
            %strong=(control_assessment && control_assessment.control && control_assessment.control.slug) || "(Missing Control)".html_safe
          .span2{"data-target" => "##{control_assessment_collapse_id}", "data-toggle" => "collapse"}
            =control_assessment && control_assessment.control && control_assessment.control.title || "&nbsp;".html_safe
          .span4{"data-target" => "##{control_assessment_collapse_id}", "data-toggle" => "collapse"}
            &nbsp;
            -# Story 41602953 called for the request counts being removed from the CA header due to confusing re-use of icons.
            -# Saving here for historical record & in case we decide to restore them later --BM
            -#.control-icons
            -#  %h6
            -#    %i{"rel" => "tooltip", "data-placement" => "top", "title" => "Documentation Request", "class" => "grcicon-document"}
            -#    = request_type_count(requests, "Documentation")
            -#    %i{"rel" => "tooltip", "data-placement" => "top", "title" => "Population Request", "class" => "grcicon-populationsample"}
            -#    = request_type_count(requests, "Population Sample")
            -#    %i{"rel" => "tooltip", "data-placement" => "top", "title" => "Meeting Request", "class" => "grcicon-calendar"}
            -#    = request_type_count(requests, "Interview")
          -if control_assessment.present?
            .span1
              %a.btn.btn-mini.rotate_control_assessment{ :rel => "tooltip", :'data-placement' => "top", :title => "Internal: Test of Design", :class => control_assessment_button_class(control_assessment.internal_tod), :'data-remote' => true, :'data-method' => 'post', :href => rotate_flow_control_assessment_path(control_assessment, :'control_assessment[internal_tod]' => 'toggle') }
                %i{ :class => control_assessment_button_icon(control_assessment.internal_tod) }
              %a.btn.btn-mini.rotate_control_assessment{ :rel => "tooltip", :'data-placement' => "top", :title => "Internal: Test of Effectiveness", :class => control_assessment_button_class(control_assessment.internal_toe), :'data-remote' => true, :'data-method' => 'post', :href => rotate_flow_control_assessment_path(control_assessment, :'control_assessment[internal_toe]' => 'toggle') }
                %i{ :class => control_assessment_button_icon(control_assessment.internal_toe) }
            .span1
              %a.btn.btn-mini.rotate_control_assessment{ :rel => "tooltip", :'data-placement' => "top", :title => "External: Test of Design", :class => control_assessment_button_class(control_assessment.external_tod), :'data-remote' => true, :'data-method' => 'post', :href => rotate_flow_control_assessment_path(control_assessment, :'control_assessment[external_tod]' => 'toggle') }
                %i{ :class => control_assessment_button_icon(control_assessment.external_tod) }
              %a.btn.btn-mini.rotate_control_assessment{ :rel => "tooltip", :'data-placement' => "top", :title => "External: Test of Effectiveness", :class => control_assessment_button_class(control_assessment.external_toe), :'data-remote' => true, :'data-method' => 'post', :href => rotate_flow_control_assessment_path(control_assessment, :'control_assessment[external_toe]' => 'toggle') }
                %i{ :class => control_assessment_button_icon(control_assessment.external_toe) }

      .pbc-ca-content.collapse{ :id => control_assessment_collapse_id }
        %ul.pbc-requests
          -requests.each do |request|
            -request_collapse_class = "control_assessment-#{control_assessment_id || 'null' }-request-#{request.id}"
            %li.main-item{ html_data_attributes(request, "data-filter-", [ ["type-id", "type_id"], ["type-name", "type_name"], "status", ["date-requested", "date_requested.to_date"], ["control-code", "control.slug"], ["person", "persons_responsible"], "id" ]) }
              .row-fluid.pbc-item-head
                .span3.pbc-item.pbc-control
                  .request-icon
                    %i{"rel" => "tooltip", "data-placement" => "top", "title" => "#{request.type_name} Request", "class" => request_type_icon(request.type_name) }
                  %a.btn.btn-mini.pull-right{:href => flow_controls_path(:list_select => 1), :'data-toggle' => 'modal-ajax-single-selector', :'data-modal-reset' => 'reset', :'data-list-target' => '#referenceList', :'data-modal-class' => 'modal-slim' }
                    %i.grcicon-link
                  .item.i-control.oneline
                    -if request.control.present?
                      =request.control && request.control.slug
                    -elsif request.pbc_control_code.present?
                      ="#{request.pbc_control_code} [Code not recognized]"
                    -else
                      No control selected
                .span2.pbc-request{ "data-target" => ".#{request_collapse_class}", "data-toggle" => "collapse"}
                  %h6.pbc-request-count
                    =pluralize(request.responses.count, "response")
                .span2{ "data-target" => ".#{request_collapse_class}", "data-toggle" => "collapse", :title => 'Date Requested'}
                  %label
                    %span{"rel" => "tooltip", "data-placement" => "top", "title" => "Date Requested"}=request.date_requested && request.date_requested.strftime('%m/%d/%Y')
                .span4.pbc-status
                  %label.pull-left Status of Request:&nbsp; 
                  %select
                    -Request.statuses.each do |status|
                      %option{ :selected => request.status == status }=status
                .span1.pbc-response-actions
                  %a#tooltip16.btn.btn-blue.btn-mini{"rel" => "tooltip", "data-placement" => "left", "title" => "More", "data-target" => ".#{request_collapse_class}", "data-toggle" => "collapse"}
                    %i.grcicon-more
              .row-fluid.collapse{ :class => request_collapse_class }
                .span3.pbc-item.pbc-control
                  %h5 PBC Control Description
                  -if request.pbc_control_desc.present?
                    %p=raw request.pbc_control_desc
                  -else
                    %p.disabled-text PBC control description not available
                .span2.pbc-item.pbc-request
                  %h5 Request
                  -if request.request.present?
                    %p=raw request.request
                  -else
                    %p.disabled-text Request description not available
                .span2.pbc-item.pbc-test
                  %h5 Test
                  -if request.test.present?
                    %p=raw request.test
                  -else
                    %p.disabled-text Test description not available
                .span2.pbc-item.pbc-notes
                  %h5 Notes
                  -if request.notes.present?
                    %p=raw request.notes
                  -else
                    %p.disabled-text Notes not available


<commit_msg>switched places of control/description on PBC requests<commit_after>-requests = pbc_list.requests.all

.pbc-request-zone
  .row-fluid
    .span6.pbc-main-title
      %h3 Requests
    -if requests.any?(&:control_assessment_id)
      .span2
        %span.word.pull-right
          %strong CA Status:
      .span1
        %span.word internal
        %span.letter D
        %span.letter E
      .span1
        %span.word external
        %span.letter D
        %span.letter E
    -else
      .span4 &nbsp;
    .span2.pbc-add
      .btn-group
        %a{:'data-toggle'=>"dropdown", :href => "#", :class => "btn btn-mini btn-success dropdown-toggle"}
          + Add New Request
          %span.caret
        %ul.dropdown-menu.pull-right
          -Request.types.each do |type_id, type_name|
            %li.add-new-item
              %a{ :href => new_flow_request_path(:'request[pbc_list_id]' => pbc_list.id, :'request[type_id]' => type_id), :'data-toggle' => 'modal-ajax-form', :'data-modal-reset' => 'reset', :'data-form-target' => 'refresh', :'data-modal-class' => 'modal-wide'}
                %i{ :class => request_type_icon(type_name) }
                =type_name

%ul.pbc-control-assessments#requests
  -sorted_requests_with_control_assessments(requests).each do |control_assessment_id, control_assessment, requests|
    -control_assessment_collapse_id = "control_assessment-#{control_assessment && control_assessment.control && control_assessment.control_id || 'null'}"
    %li.pbc-ca-item{ :'data-type' => 'ControlAssessment', :'data-id' => control_assessment_id, :'data-control-id' => control_assessment && control_assessment.control && control_assessment.control_id, 'data-sort-control-code' => control_assessment && control_assessment.control && control_assessment.control.slug }
      .pbc-ca-title
        .row-fluid
          .span2{"data-target" => "##{control_assessment_collapse_id}", "data-toggle" => "collapse"}
            .expander.in
            %strong=(control_assessment && control_assessment.control && control_assessment.control.slug) || "(Missing Control)".html_safe
          .span2{"data-target" => "##{control_assessment_collapse_id}", "data-toggle" => "collapse"}
            =control_assessment && control_assessment.control && control_assessment.control.title || "&nbsp;".html_safe
          .span4{"data-target" => "##{control_assessment_collapse_id}", "data-toggle" => "collapse"}
            &nbsp;
            -# Story 41602953 called for the request counts being removed from the CA header due to confusing re-use of icons.
            -# Saving here for historical record & in case we decide to restore them later --BM
            -#.control-icons
            -#  %h6
            -#    %i{"rel" => "tooltip", "data-placement" => "top", "title" => "Documentation Request", "class" => "grcicon-document"}
            -#    = request_type_count(requests, "Documentation")
            -#    %i{"rel" => "tooltip", "data-placement" => "top", "title" => "Population Request", "class" => "grcicon-populationsample"}
            -#    = request_type_count(requests, "Population Sample")
            -#    %i{"rel" => "tooltip", "data-placement" => "top", "title" => "Meeting Request", "class" => "grcicon-calendar"}
            -#    = request_type_count(requests, "Interview")
          -if control_assessment.present?
            .span1
              %a.btn.btn-mini.rotate_control_assessment{ :rel => "tooltip", :'data-placement' => "top", :title => "Internal: Test of Design", :class => control_assessment_button_class(control_assessment.internal_tod), :'data-remote' => true, :'data-method' => 'post', :href => rotate_flow_control_assessment_path(control_assessment, :'control_assessment[internal_tod]' => 'toggle') }
                %i{ :class => control_assessment_button_icon(control_assessment.internal_tod) }
              %a.btn.btn-mini.rotate_control_assessment{ :rel => "tooltip", :'data-placement' => "top", :title => "Internal: Test of Effectiveness", :class => control_assessment_button_class(control_assessment.internal_toe), :'data-remote' => true, :'data-method' => 'post', :href => rotate_flow_control_assessment_path(control_assessment, :'control_assessment[internal_toe]' => 'toggle') }
                %i{ :class => control_assessment_button_icon(control_assessment.internal_toe) }
            .span1
              %a.btn.btn-mini.rotate_control_assessment{ :rel => "tooltip", :'data-placement' => "top", :title => "External: Test of Design", :class => control_assessment_button_class(control_assessment.external_tod), :'data-remote' => true, :'data-method' => 'post', :href => rotate_flow_control_assessment_path(control_assessment, :'control_assessment[external_tod]' => 'toggle') }
                %i{ :class => control_assessment_button_icon(control_assessment.external_tod) }
              %a.btn.btn-mini.rotate_control_assessment{ :rel => "tooltip", :'data-placement' => "top", :title => "External: Test of Effectiveness", :class => control_assessment_button_class(control_assessment.external_toe), :'data-remote' => true, :'data-method' => 'post', :href => rotate_flow_control_assessment_path(control_assessment, :'control_assessment[external_toe]' => 'toggle') }
                %i{ :class => control_assessment_button_icon(control_assessment.external_toe) }

      .pbc-ca-content.collapse{ :id => control_assessment_collapse_id }
        %ul.pbc-requests
          -requests.each do |request|
            -request_collapse_class = "control_assessment-#{control_assessment_id || 'null' }-request-#{request.id}"
            %li.main-item{ html_data_attributes(request, "data-filter-", [ ["type-id", "type_id"], ["type-name", "type_name"], "status", ["date-requested", "date_requested.to_date"], ["control-code", "control.slug"], ["person", "persons_responsible"], "id" ]) }
              .row-fluid.pbc-item-head
                .span3.pbc-item.pbc-control
                  .request-icon
                    %i{"rel" => "tooltip", "data-placement" => "top", "title" => "#{request.type_name} Request", "class" => request_type_icon(request.type_name) }
                  %a.btn.btn-mini.pull-right{:href => flow_controls_path(:list_select => 1), :'data-toggle' => 'modal-ajax-single-selector', :'data-modal-reset' => 'reset', :'data-list-target' => '#referenceList', :'data-modal-class' => 'modal-slim' }
                    %i.grcicon-link
                  .item.i-control.oneline
                    -if request.control.present?
                      =request.control && request.control.slug
                    -elsif request.pbc_control_code.present?
                      ="#{request.pbc_control_code} [Code not recognized]"
                    -else
                      No control selected
                .span2.pbc-request{ "data-target" => ".#{request_collapse_class}", "data-toggle" => "collapse"}
                  %h6.pbc-request-count
                    =pluralize(request.responses.count, "response")
                .span2{ "data-target" => ".#{request_collapse_class}", "data-toggle" => "collapse", :title => 'Date Requested'}
                  %label
                    %span{"rel" => "tooltip", "data-placement" => "top", "title" => "Date Requested"}=request.date_requested && request.date_requested.strftime('%m/%d/%Y')
                .span4.pbc-status
                  %label.pull-left Status of Request:&nbsp; 
                  %select
                    -Request.statuses.each do |status|
                      %option{ :selected => request.status == status }=status
                .span1.pbc-response-actions
                  %a#tooltip16.btn.btn-blue.btn-mini{"rel" => "tooltip", "data-placement" => "left", "title" => "More", "data-target" => ".#{request_collapse_class}", "data-toggle" => "collapse"}
                    %i.grcicon-more
              .row-fluid.collapse{ :class => request_collapse_class }
                .span3.pbc-item.pbc-request
                  %h5 Request
                  -if request.request.present?
                    %p=raw request.request
                  -else
                    %p.disabled-text Request description not available
                .span2.pbc-item.pbc-control
                  %h5 PBC Control Description
                  -if request.pbc_control_desc.present?
                    %p=raw request.pbc_control_desc
                  -else
                    %p.disabled-text PBC control description not available
                .span2.pbc-item.pbc-test
                  %h5 Test
                  -if request.test.present?
                    %p=raw request.test
                  -else
                    %p.disabled-text Test description not available
                .span2.pbc-item.pbc-notes
                  %h5 Notes
                  -if request.notes.present?
                    %p=raw request.notes
                  -else
                    %p.disabled-text Notes not available



{'fraction_non_alphanumeric': 0.1474362566545251, 'fraction_numerical': 0.004258896049313533, 'mean_word_length': 2.4665889665889664, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 193, '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': '4208640', 'n_tokens_mistral': 5435, 'n_tokens_neox': 5255, 'n_words': 916}