<% if User.current.allowed_to?(:view_vehicles, nil, global: true) %>

<%=t(:field_vehicles)%>:

<%# Own page parameter so this list doesn't page together with the other lists on the customer page %> <%= render partial: 'vehicles/list', locals: { vehicles: customer.vehicles.paginate(page: params[:vehicles_page]), show_customer: false, show_checkbox: true, page_param: :vehicles_page } %>
<% if User.current.allowed_to?(:add_vehicles, nil, global: true) %> <%= button_to t(:button_new_vehicle), new_customer_vehicle_path(customer), method: :get %> <% end %>
<% end %>