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