app/views/companies/_company.erb
<div id="index_item" class="company panel panel-default">
<div class="panel-heading">
<div class="panel-title clearfix">
<% if policy(:application).write? %>
<span class="pull-right">
<%= link_to edit_referential_company_path(@referential, company), :class => "btn btn-default btn-sm" do %>
<span class="fa fa-pencil"></span>
<% end %>
<%= link_to referential_company_path(@referential, company), :method => :delete, :data => {:confirm => t('companies.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
<span class="fa fa-trash-o"></span>
<% end %>
</span>
<% end %>
<h5>
<%= link_to([@referential, company], :class => "preview", :title => "#{Chouette::Company.model_name.human.capitalize} #{company.name}") do %>
<span class="name">
<%= truncate(company.name, :length => 20) %>
</span>
<% end %>
</h5>
</div>
</div>
<div class="panel-body">
<p>
<%= company.human_attribute_name('code') %> <%= company.code %>
</p>
</div>
</div>