_form.html.erb 2.9 KB
<%= render :partial => 'shared/form_errors', :locals => {:object => @repository} %>


<div class="row margin-left-none">
  <div class="form-table span9">

    <div class="form-row">
      <div class="field-container">
        <%= f.label :name, class: 'control-label' %>
        <%= f.text_field :name, class: 'text-field' %>
      </div>
      <div class="help-container">
        <p>
          Your repository name!
        </p>
      </div>
    </div>

    <div class="form-row">
      <div class="field-container">
        <%= f.label :description, class: 'control-label' %>
        <%= f.text_area :description, class: 'text-area' %>
      </div>
      <div class="help-container">
        <p>
          Tell us what this repository contains!
        </p>
      </div>
    </div>

    <div class="form-row">
      <div class="field-container">
        <%= f.label :license, 'License', class: 'control-label' %>
        <%= f.select( :license, license_options, class: 'text-area' ) %>     
      </div>
      <div class="help-container">
        <p>
          How is this software licensed?
        </p>
      </div>
    </div>

    <div class="form-row">
      <div class="field-container">
        <%= f.label :type, class: 'control-label' %>
        <%= f.select( :type, @repository_types, class: 'tooltip-control' ) %>
      </div>
      <div class="help-container">
        <p>
          Which version control system does the software use?
        </p>
      </div>
    </div>

    <div class="form-row">
      <div class="field-container">
        <%= f.label :address, class: 'control-label' %>
        <%= f.text_field :address, class: 'text-field' %>
      </div>
      <div class="help-container">
        <p>
          Tell us the URL where the repository can be found.
        </p>
      </div>
    </div>

    <div class="form-row">
      <div class="field-container">
        <%= f.label :process_period, 'Process Period', class: 'control-label' %>
        <%= f.select( :process_period, periodicity_options, class: 'tooltip-control' ) %>
      </div>
      <div class="help-container">
        <p>
          Select how often the project will be reanalyzed.
        </p>
      </div>
    </div>

    <div class="form-row">
      <div class="field-container">
        <%= f.label :configuration, class: 'control-label' %>
        <% configuration_list = KalibroGatekeeperClient::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %>
        <%= f.select( :configuration_id, configuration_list, class: 'tooltip-control' ) %>
      </div>
      <div class="help-container">
        <p>
          A configuration defines all the metrics to be analyzed in the source code. Choose your weapon.
        </p>
      </div>
    </div>

  </div>
</div>
<div class="row margin-left-none" style="margin-top: 20px">
  <%= f.submit 'Save', class: 'btn btn-primary' %>
  <%= link_to 'Back',  project_path(@project_id), class: 'btn btn-default' %>
</div>