<table class="table main-list">
  <thead>
    <tr>
      <th class="span1"><%= t('location.picture') %></th>
      <th class="span1"><%= t('location.name') %></th>
      <th class="span1"><%= t('location.longitude') %></th>
      <th class="span1"><%= t('location.latitude') %></th>
      <th class="span3"><%= t('location.description') %></th>
      <%if is_manager? %>
        <th class="span1"><%= t('location.edit') %></th>
        <th class="span1"><%= t('location.delete') %></th>
      <% end %>
    </tr>
  </thead>
  <tbody id="tbody_locations" class="sort-holder">
    <% @locations.each do |location| %> 
      <tr class="with_action">
        <td><%= image_tag(location.file, alt: location.file, size: "50x50" ) if !location.file.blank? %></td>
        <td><%= location.name%></td>
        <td><%= location.longitude%></td>
        <td><%= location.latitude%></td>
        <td><%= location.description%></td>
        <%if is_manager? %>
          <td><%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %></td>
          <td><%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %></td>  
        <%end%>
        
      </tr>
    <% end %>
  </tbody>
</table>
<%if is_manager? %>
<td><%= link_to 'New', new_panel_gprs_back_end_location_path %></td>
<% end %>