<commit_before><h4><%= current_project.title %> - <%= current_component %></h4>
<div class="tabs">
  <ul>
    <li>
      <a href="#tabs-1">Cocomo Advanced</a>
    </li>
  </ul>

  <div id="tabs-1" style="overflow-x: auto;">
    <%= form_tag "/cocomo_advanced/cocomo_save" do %>
      <table class="table table-bordered table-condensed">
        <tr>
          <th>Nom</th>
          <th>Description</th>
          <th>Valeur</th>
          <th></th>
        </tr>

        <tr>
          <td colspan="3" style="text-align: center">
            <b>
              Attribut produit
            </b>
          </td>
        </tr>

        <% @aprod.compact.each do |factor| %>
          <% selected = InputCocomo.where(factor_id: factor.id, pbs_project_element_id: current_component.id, project_id: current_project.id).first %>
          <% default = OrganizationUowComplexity.where(factor_id: factor.id, is_default: true).first %>
          <tr>
            <td><%= factor.name %></td>
            <td><%= factor.description %></td>
            <td><%= select_tag "factors[#{factor.id}]", options_for_select(factor.organization_uow_complexities.where(organization_id: current_project.organization.id).map{|i| [i.name, i.id]}, selected: selected.nil? ? (default.nil? ? '' : default.id) : (selected.organization_uow_complexity_id)) %></td>
            <td>
              <%= link_to "Help", help_path(factor.id), remote: true %>
              <%= link_to "Notes", add_note_to_factor_path(factor.id), remote: true %>
            </td>
          </tr>
        <% end %>

        <tr>
          <td colspan="4" style="text-align: center">
            <b>
              Attribut plateforme
            </b>
          </td>
        </tr>

        <% @aplat.compact.each do |factor| %>
          <% selected = InputCocomo.where(factor_id: factor.id, pbs_project_element_id: current_component.id, project_id: current_project.id).first %>
          <% default = OrganizationUowComplexity.where(factor_id: factor.id, is_default: true).first %>
          <tr>
            <td><%= factor.name %></td>
            <td><%= factor.description %></td>
            <td><%= select_tag "factors[#{factor.id}]", options_for_select(factor.organization_uow_complexities.where(organization_id: current_project.organization.id).map{|i| [i.name, i.id]}, selected: selected.nil? ? (default.nil? ? '' : default.id) : (selected.organization_uow_complexity_id)) %></td>
            <td>
              <%= link_to "Help", help_path(factor.id), remote: true %>
              <%= link_to "Notes", add_note_to_factor_path(factor.id), remote: true %>
            </td>
          </tr>
        <% end %>

        <tr>
          <td colspan="4" style="text-align: center">
            <b>
              Attribut personnel
            </b>
          </td>
        </tr>

        <% @apers.compact.each do |factor| %>
          <% selected = InputCocomo.where(factor_id: factor.id, pbs_project_element_id: current_component.id, project_id: current_project.id).first %>
          <% default = OrganizationUowComplexity.where(factor_id: factor.id, is_default: true).first %>
          <tr>
            <td><%= factor.name %></td>
            <td><%= factor.description %></td>
            <td><%= select_tag "factors[#{factor.id}]", options_for_select(factor.organization_uow_complexities.where(organization_id: current_project.organization.id).map{|i| [i.name, i.id]}, selected: selected.nil? ? (default.nil? ? '' : default.id) : (selected.organization_uow_complexity_id)) %></td>
            <td>
              <%= link_to "Help", help_path(factor.id), class: "", remote: true %>
              <%= link_to "Notes", add_note_to_factor_path(factor.id), remote: true %>
            </td>
          </tr>
        <% end %>

        <tr>
          <td colspan="4" style="text-align: center">
            <b>
              Attribut projet
            </b>
          </td>
        </tr>

        <% @aproj.compact.each do |factor| %>
          <% selected = InputCocomo.where(factor_id: factor.id, pbs_project_element_id: current_component.id, project_id: current_project.id).first %>
          <% default = OrganizationUowComplexity.where(factor_id: factor.id, is_default: true).first %>
          <tr>
            <td><%= factor.name %></td>
            <td><%= factor.description %></td>
            <td><%= select_tag "factors[#{factor.id}]", options_for_select(factor.organization_uow_complexities.where(organization_id: current_project.organization.id).map{|i| [i.name, i.id]}, selected: selected.nil? ? (default.nil? ? '' : default.id) : (selected.organization_uow_complexity_id)) %></td>
            <td>
              <%= link_to "Help", help_path(factor.id), remote: true %>
              <%= link_to "Notes", add_note_to_factor_path(factor.id), remote: true %>
            </td>
          </tr>
        <% end %>
      </table>

      <%= submit_tag "Save", class: 'btn' %>
    <% end %>

  </div>
</div>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">
          <%= I18n.t :help %>
        </h4>
      </div><commit_msg>Notes in factors<commit_after><h4><%= current_project.title %> - <%= current_component %></h4>
<div class="tabs">
  <ul>
    <li>
      <a href="#tabs-1">Cocomo Advanced</a>
    </li>
  </ul>

  <div id="tabs-1" style="overflow-x: auto;">
    <%= form_tag "/cocomo_advanced/cocomo_save" do %>
      <table class="table table-bordered table-condensed">
        <tr>
          <th>Nom</th>
          <th>Description</th>
          <th>Valeur</th>
          <th></th>
        </tr>

        <tr>
          <td colspan="3" style="text-align: center">
            <b>
              Attribut produit
            </b>
          </td>
        </tr>

        <% @aprod.compact.each do |factor| %>
          <% selected = InputCocomo.where(factor_id: factor.id, pbs_project_element_id: current_component.id, project_id: current_project.id).first %>
          <% default = OrganizationUowComplexity.where(factor_id: factor.id, is_default: true).first %>
          <tr>
            <td><%= factor.name %></td>
            <td><%= factor.description %></td>
            <td><%= select_tag "factors[#{factor.id}]", options_for_select(factor.organization_uow_complexities.where(organization_id: current_project.organization.id).map{|i| [i.name, i.id]}, selected: selected.nil? ? (default.nil? ? '' : default.id) : (selected.organization_uow_complexity_id)) %></td>
            <td>
              <%= link_to "Aides", help_path(factor.id), remote: true %> |
              <%= link_to "Notes", add_note_to_factor_path(factor.id), remote: true %>
            </td>
          </tr>
        <% end %>

        <tr>
          <td colspan="4" style="text-align: center">
            <b>
              Attribut plateforme
            </b>
          </td>
        </tr>

        <% @aplat.compact.each do |factor| %>
          <% selected = InputCocomo.where(factor_id: factor.id, pbs_project_element_id: current_component.id, project_id: current_project.id).first %>
          <% default = OrganizationUowComplexity.where(factor_id: factor.id, is_default: true).first %>
          <tr>
            <td><%= factor.name %></td>
            <td><%= factor.description %></td>
            <td><%= select_tag "factors[#{factor.id}]", options_for_select(factor.organization_uow_complexities.where(organization_id: current_project.organization.id).map{|i| [i.name, i.id]}, selected: selected.nil? ? (default.nil? ? '' : default.id) : (selected.organization_uow_complexity_id)) %></td>
            <td>
              <%= link_to "Aides", help_path(factor.id), remote: true %> |
              <%= link_to "Notes", add_note_to_factor_path(factor.id), remote: true %>
            </td>
          </tr>
        <% end %>

        <tr>
          <td colspan="4" style="text-align: center">
            <b>
              Attribut personnel
            </b>
          </td>
        </tr>

        <% @apers.compact.each do |factor| %>
          <% selected = InputCocomo.where(factor_id: factor.id, pbs_project_element_id: current_component.id, project_id: current_project.id).first %>
          <% default = OrganizationUowComplexity.where(factor_id: factor.id, is_default: true).first %>
          <tr>
            <td><%= factor.name %></td>
            <td><%= factor.description %></td>
            <td><%= select_tag "factors[#{factor.id}]", options_for_select(factor.organization_uow_complexities.where(organization_id: current_project.organization.id).map{|i| [i.name, i.id]}, selected: selected.nil? ? (default.nil? ? '' : default.id) : (selected.organization_uow_complexity_id)) %></td>
            <td>
              <%= link_to "Aides", help_path(factor.id), class: "", remote: true %> |
              <%= link_to "Notes", add_note_to_factor_path(factor.id), remote: true %>
            </td>
          </tr>
        <% end %>

        <tr>
          <td colspan="4" style="text-align: center">
            <b>
              Attribut projet
            </b>
          </td>
        </tr>

        <% @aproj.compact.each do |factor| %>
          <% selected = InputCocomo.where(factor_id: factor.id, pbs_project_element_id: current_component.id, project_id: current_project.id).first %>
          <% default = OrganizationUowComplexity.where(factor_id: factor.id, is_default: true).first %>
          <tr>
            <td><%= factor.name %></td>
            <td><%= factor.description %></td>
            <td><%= select_tag "factors[#{factor.id}]", options_for_select(factor.organization_uow_complexities.where(organization_id: current_project.organization.id).map{|i| [i.name, i.id]}, selected: selected.nil? ? (default.nil? ? '' : default.id) : (selected.organization_uow_complexity_id)) %></td>
            <td>
              <%= link_to "Aides", help_path(factor.id), remote: true %> |
              <%= link_to "Notes", add_note_to_factor_path(factor.id), remote: true %>
            </td>
          </tr>
        <% end %>
      </table>

      <%= submit_tag "Save", class: 'btn' %>
    <% end %>

  </div>
</div>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">
          <%= I18n.t :help %>
        </h4>
      </div>
{'fraction_non_alphanumeric': 0.17323125172954523, 'fraction_numerical': 0.002398302739599668, 'mean_word_length': 2.353541602227034, 'pattern_counts': {'":': 0, '<': 283, '<?xml version=': 0, '>': 283, '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': '1222989', 'n_tokens_mistral': 3669, 'n_tokens_neox': 3429, 'n_words': 613}