<commit_before><%# I started to move this into a helper, but I think it's okay here for now. %>
<%- if @model.name.blank? -%>
  <%- path = project_yogo_models_path(@project) -%>
  <%- method = :post -%>
<%- else -%>
  <%- path = project_yogo_model_path(@project, @model.name.demodulize) -%>
  <%- method = :put -%>
<%- end -%>

<%- options = options_for_select(@options) -%> 
<%- current_pos = 0 -%>
       
<div id="model-edit">
  <%- form_for(@model, :url => path, :html => { :method => method }) do |f| -%>
  
    <%# Output errors if there are any. %>
    <%- if flash[:model_errors] -%>
      <%- flash[:model_errors].each_pair do |key,value| -%>
        <%= h key + value %>
      <%- end -%>
    <%- end -%>
  
    <%# If this is a new model, ask for its name. %>
    <%- if @model.name.blank? -%>
      <div class="model-edit-label">
        <%= label_tag(:class_name, "Model name") %>:
      </div>
      <div class="model-edit-input">
        <%= text_field_tag(:class_name) %>
      </div>
      <ul id='sortable'>
    <%- else -%>


    <ul id='sortable'>
       <%- @model.properties.each do |prop| %>
          <%- unless prop.name == :id -%>
          <li >
            <div class="model-edit-label">
              <%= h prop.name.to_s.titleize %> :
            </div>
            <div class="model-edit-input">  
              <%= select_tag("property_#{prop.name}_type", options_for_select(@options, Yogo::Types.dm_to_human(prop.type)), :name => "property[#{prop.name}][type]") %>
              <%= hidden_field_tag("property_#{prop.name}_position", current_pos += 1, :name => "property[#{prop.name}][position]" ) %>
            </div>
            <div class='grippie'>:::</div>
          </li>
          <%- end -%>
        <%- end %>
      
      <%- end -%>
    
       <li class='new-property' >
          <div class="model-edit-label">
            <%= label_tag(:name, 'Property Name') %>:
          </div> 
          <div class="model-edit-input">
            <%= text_field_tag(:name, nil, :name => 'new_property[][name]') %>
            <%- options = options_for_select(@options) -%> 
            <%= label_tag(:type) %>:
            <%= select_tag(:type, options, :name => 'new_property[][type]' ) %>
            <%= hidden_field_tag("position", current_pos += 1, :name => "new_property[][position]" ) %>
            <%= link_to(image_tag('remove.png')+'Remove', '', :class => 'remove-new-property') %>
          </div>
          <div class='grippie'>:::</div>
      </li>
    </ul>
    <br>
    <%= link_to(image_tag('add.gif')+' Add a property', '', :id => 'add-property') %>
  <br><br>
  
  <%= f.submit('Save') %>
    
  <%- end -%>
</div>

<div style="display:none" id='form-template'>  
  <div class="model-edit-label">
    <%= label_tag(:name, 'Property Name') %>:
  </div> 
  <div class="model-edit-input">
    <%= text_field_tag(:name, nil, :name => 'new_property[][name]') %>
    <%- options = options_for_select(@options) -%> 
    <%= label_tag(:type) %>:
    <%= select_tag(:type, options, :name => 'new_property[][type]' ) %>
    <%= hidden_field_tag("position", current_pos +=1, :name => "new_property[][position]" ) %>
    <%= link_to(image_tag('remove.png')+'Remove', '', :class => 'remove-new-property') %>
    <div class='grippie'>:::</div>
  </div>
</div><commit_msg>Fixed the location of the 'grippie' in the property template.<commit_after><%# I started to move this into a helper, but I think it's okay here for now. %>
<%- if @model.name.blank? -%>
  <%- path = project_yogo_models_path(@project) -%>
  <%- method = :post -%>
<%- else -%>
  <%- path = project_yogo_model_path(@project, @model.name.demodulize) -%>
  <%- method = :put -%>
<%- end -%>

<%- options = options_for_select(@options) -%> 
<%- current_pos = 0 -%>
       
<div id="model-edit">
  <%- form_for(@model, :url => path, :html => { :method => method }) do |f| -%>
  
    <%# Output errors if there are any. %>
    <%- if flash[:model_errors] -%>
      <%- flash[:model_errors].each_pair do |key,value| -%>
        <%= h key + value %>
      <%- end -%>
    <%- end -%>
  
    <%# If this is a new model, ask for its name. %>
    <%- if @model.name.blank? -%>
      <div class="model-edit-label">
        <%= label_tag(:class_name, "Model name") %>:
      </div>
      <div class="model-edit-input">
        <%= text_field_tag(:class_name) %>
      </div>
      <ul id='sortable'>
    <%- else -%>


    <ul id='sortable'>
       <%- @model.properties.each do |prop| %>
          <%- unless prop.name == :id -%>
          <li >
            <div class="model-edit-label">
              <%= h prop.name.to_s.titleize %> :
            </div>
            <div class="model-edit-input">  
              <%= select_tag("property_#{prop.name}_type", options_for_select(@options, Yogo::Types.dm_to_human(prop.type)), :name => "property[#{prop.name}][type]") %>
              <%= hidden_field_tag("property_#{prop.name}_position", current_pos += 1, :name => "property[#{prop.name}][position]" ) %>
            </div>
            <div class='grippie'>:::</div>
          </li>
          <%- end -%>
        <%- end %>
      
      <%- end -%>
    
       <li class='new-property' >
          <div class="model-edit-label">
            <%= label_tag(:name, 'Property Name') %>:
          </div> 
          <div class="model-edit-input">
            <%= text_field_tag(:name, nil, :name => 'new_property[][name]') %>
            <%- options = options_for_select(@options) -%> 
            <%= label_tag(:type) %>:
            <%= select_tag(:type, options, :name => 'new_property[][type]' ) %>
            <%= hidden_field_tag("position", current_pos += 1, :name => "new_property[][position]" ) %>
            <%= link_to(image_tag('remove.png')+'Remove', '', :class => 'remove-new-property') %>
          </div>
          <div class='grippie'>:::</div>
      </li>
    </ul>
    <br>
    <%= link_to(image_tag('add.gif')+' Add a property', '', :id => 'add-property') %>
  <br><br>
  
  <%= f.submit('Save') %>
    
  <%- end -%>
</div>

<div style="display:none" id='form-template'>  
  <div class="model-edit-label">
    <%= label_tag(:name, 'Property Name') %>:
  </div> 
  <div class="model-edit-input">
    <%= text_field_tag(:name, nil, :name => 'new_property[][name]') %>
    <%- options = options_for_select(@options) -%> 
    <%= label_tag(:type) %>:
    <%= select_tag(:type, options, :name => 'new_property[][type]' ) %>
    <%= hidden_field_tag("position", current_pos +=1, :name => "new_property[][position]" ) %>
    <%= link_to(image_tag('remove.png')+'Remove', '', :class => 'remove-new-property') %>
  </div>
  <div class='grippie'>:::</div>
</div>
{'fraction_non_alphanumeric': 0.22833583208395802, 'fraction_numerical': 0.0011994002998500749, 'mean_word_length': 2.461857810067462, 'pattern_counts': {'":': 0, '<': 169, '<?xml version=': 0, '>': 197, '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': '912823', 'n_tokens_mistral': 2496, 'n_tokens_neox': 2340, 'n_words': 402}