kirushik/critical_chain

View on GitHub
app/views/estimation_items/_estimation_item.html.erb

Summary

Maintainability
Test Coverage
<tr id="<%= dom_id estimation_item %>">
  <td class="text-right copies">
    <%= icon(:copy) %>
    <%= estimation_item.decorate.editable :quantity, type: :number %>
    <span class="multiplier">×</span>
  </td>
  <td>
    <span class="lead">
      <%= estimation_item.decorate.editable :value, type: :number %>
    </span>
    <span class="multiplier-total lead">
      =
      <span class="total_value">
        <%= estimation_item.total %>
      </span>
    </span>
  </td>
  <td>
    <%= form_for [estimation_item.estimation, estimation_item], method: :patch, remote: true do |f| %>
      <%= f.hidden_field :fixed, :value => !estimation_item.fixed? %>
      <span class="fa fa-dot-circle-o"></span>
      <%= f.button type: :submit, class: 'btn btn-link toggle-fixed' do %>
        <span class="fa <%= estimation_item.fixed? ? 'fa-toggle-on' : 'fa-toggle-off' %>"></span>
      <% end %>
    <% end %>
  </td>
  <td><%= estimation_item.decorate.editable :title %></td>
  <td>
    <%= button_to [estimation_item.estimation, estimation_item], method: :delete, remote: true, class: 'close pull-right' do %>
      <span>&times;</span>
    <% end %>
  </td>
</tr>