<commit_before>-@title = "GRC Reg Mapper for: #{@program.title}"

-content_for :header do
  %ol#breadcrumb
    %li=link_to 'Programs', programs_dash_path
    %li Mapping
  .location#pageTitle=@<EMAIL>

-content_for :page_help, 'mapping'

-content_for :subheader_extras do
  %h1.fltrt.highlighted Regulation to Control Mapping

.row-static
  .singleColumn
    .singleWide.halfHeight#section_list
      =render :partial => 'section_list',
              :layout => 'layouts/widget_box',
              :locals => { :sections => @program.sections.includes(:parent, :controls => :implementing_controls) }
    .singleWide.maxhalfHeight
      =render :partial => 'selected_section',
              :layout => 'layouts/widget_box',
              :locals => {:section => nil}
 
  .singleColumn
    .singleWide.halfHeight#rcontrol_list
      =render :partial => 'control_list',
              :layout => 'layouts/widget_box',
              :locals => { :controls => @rcontrols, :title_prefix => 'Reg', :control_type => 'regulation' }

    .singleWide.maxhalfHeight
      =render :partial => 'selected_control',
              :layout => 'layouts/widget_box',
              :locals => {:control => nil, :control_type => 'rcontrol', :map_button_id => :cmap, :map_button_path => mapping_map_ccontrol_path }

  .singleColumn
    .singleWide.halfHeight#ccontrol_list
      =render :partial => 'control_list',
              :layout => 'layouts/widget_box',
              :locals => { :controls => @ccontrols, :title_prefix => 'Company', :control_type => 'company' }

    .singleWide.maxhalfHeight
      =render :partial => 'selected_control',
              :layout => 'layouts/widget_box',
              :locals => {:control => nil, :control_type => 'ccontrol', :map_button_id => nil }

:javascript
  $(document).ready(function(){
    init_mapping();
  });
  function update_map_buttons() {
    update_map_buttons_with_path('#{mapping_buttons_path(:format => "json")}');
  }

#create-rcontrol-modal.modal.hide.fade
  -control = Control.new(:program => @program)
  =form_for control, :url => mapping_create_rcontrol_path, :method => :post, :remote => true, :html => {:class => :form} do |f|
    .modal-header
      %a.close{"data-dismiss" => "modal"} x
      %h1 Create a new regulation control
    .modal-body
      =render :partial => 'controls/form', :locals  => { :f => f, :create_reg_control => true }
    .modal-footer
      .row-fluid
        %nav.fltlft.txtlft.span3
          =f.submit pat(:cancel), :type => 'reset', :class => 'btn-large btn-info'
        %nav.fltrt.txtrt.span3  
          =f.submit pat(:save), :class => 'btn-large btn-success'



#create-ccontrol-modal.modal.hide.fade
  -control = Control.new
  =form_for control, :url => mapping_create_ccontrol_path, :method => :post, :remote => true, :html => {:class => :form} do |f|
    .modal-header
      %a.close{"data-dismiss" => "modal"} x
      %h1 Create a new company control
    .modal-body
      =render :partial => 'controls/form', :locals  => { :f => f, :create_company_control => true }
    .modal-footer
      .row-fluid
        %nav.fltlft.txtlft.span3
          =f.submit pat(:cancel), :type => 'reset', :class => 'btn-large btn-info'
        %nav.fltrt.txtrt.span3  
          =f.submit pat(:save), :class => 'btn-large btn-success'
<commit_msg>attempt to fix buttons (succeeded)<commit_after>-@title = "GRC Reg Mapper for: #{@program.title}"

-content_for :header do
  %ol#breadcrumb
    %li=link_to 'Programs', programs_dash_path
    %li Mapping
  .location#pageTitle=@<EMAIL>

-content_for :page_help, 'mapping'

-content_for :subheader_extras do
  %h1.fltrt.highlighted Regulation to Control Mapping

.row-static
  .singleColumn
    .singleWide.halfHeight#section_list
      =render :partial => 'section_list',
              :layout => 'layouts/widget_box',
              :locals => { :sections => @program.sections.includes(:parent, :controls => :implementing_controls) }
    .singleWide.maxhalfHeight
      =render :partial => 'selected_section',
              :layout => 'layouts/widget_box',
              :locals => {:section => nil}
 
  .singleColumn
    .singleWide.halfHeight#rcontrol_list
      =render :partial => 'control_list',
              :layout => 'layouts/widget_box',
              :locals => { :controls => @rcontrols, :title_prefix => 'Reg', :control_type => 'regulation' }

    .singleWide.maxhalfHeight
      =render :partial => 'selected_control',
              :layout => 'layouts/widget_box',
              :locals => {:control => nil, :control_type => 'rcontrol', :map_button_id => :cmap, :map_button_path => mapping_map_ccontrol_path }

  .singleColumn
    .singleWide.halfHeight#ccontrol_list
      =render :partial => 'control_list',
              :layout => 'layouts/widget_box',
              :locals => { :controls => @ccontrols, :title_prefix => 'Company', :control_type => 'company' }

    .singleWide.maxhalfHeight
      =render :partial => 'selected_control',
              :layout => 'layouts/widget_box',
              :locals => {:control => nil, :control_type => 'ccontrol', :map_button_id => nil }

:javascript
  $(document).ready(function(){
    init_mapping();
  });
  function update_map_buttons() {
    update_map_buttons_with_path('#{mapping_buttons_path(:format => "json")}');
  }

#create-rcontrol-modal.modal.hide.fade
  -control = Control.new(:program => @program)
  =form_for control, :url => mapping_create_rcontrol_path, :method => :post, :remote => true, :html => {:class => :form} do |f|
    .modal-header
      %a.close{"data-dismiss" => "modal"} x
      %h1 Create a new regulation control
    .modal-body
      =render :partial => 'controls/form', :locals  => { :f => f, :create_reg_control => true }
    .modal-footer
      .row-fluid
        %nav.fltlft.txtlft.span3
          =f.submit pat(:cancel), :type => 'reset', :class => 'btn btn-large btn-info'
        %nav.fltrt.txtrt.span3  
          =f.submit pat(:save), :class => 'btn btn-large btn-success'



#create-ccontrol-modal.modal.hide.fade
  -control = Control.new
  =form_for control, :url => mapping_create_ccontrol_path, :method => :post, :remote => true, :html => {:class => :form} do |f|
    .modal-header
      %a.close{"data-dismiss" => "modal"} x
      %h1 Create a new company control
    .modal-body
      =render :partial => 'controls/form', :locals  => { :f => f, :create_company_control => true }
    .modal-footer
      .row-fluid
        %nav.fltlft.txtlft.span3
          =f.submit pat(:cancel), :type => 'reset', :class => 'btn-large btn-info'
        %nav.fltrt.txtrt.span3  
          =f.submit pat(:save), :class => 'btn-large btn-success'

{'fraction_non_alphanumeric': 0.15791848398255376, 'fraction_numerical': 0.00210557978643405, 'mean_word_length': 3.0132770066385035, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 129, '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': '5802012', 'n_tokens_mistral': 2189, 'n_tokens_neox': 2140, 'n_words': 436}