afimb/chouette2

View on GitHub
app/views/companies/index.html.erb

Summary

Maintainability
Test Coverage
<%= title_tag t('companies.index.title') %> 

<%= search_form_for @q, :url => referential_companies_path(@referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| %>
<div class="panel panel-default">
  <div class="panel-heading">   
    <div class="input-group col-md-12">   
      <%= f.text_field :name_cont, :placeholder => "#{t('.name')}", :class => "form-control" %>
      <div class="input-group-btn">
        <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
      </div>
    </div><!-- /input-group -->
    <!-- <a data-toggle="collapse" data-parent="#search" href="#advanced_search"> -->
    <!--   <i class="fa fa-plus"></i> <%= "#{t('.advanced_search')}" %> -->
    <!-- </a> -->
  </div>
</div>  
<% end %>

<div id="companies"><%= render partial: "companies", object: @companies %></div>

<% content_for :sidebar do %>
<ul class="actions">
  <li><%= link_to t('companies.actions.new'), new_referential_company_path(@referential), :class => "add" %></li>
  <br>
</ul>
<% end %>