%h1 Listing alternate_names

- if can? :create, AlternateName
  %p= link_to 'New Alternate name', new_alternate_name_path, :class => 'btn btn-primary'

%table
  %tr
    %th Alternate name
    %th Crop
    %th
    %th

  - @alternate_names.each do |alternate_name|
    %tr
      %td= link_to alternate_name.name, alternate_name
      %td= alternate_name.crop
      %td= link_to 'Show', alternate_name
      %td
        - if can? :edit, alternate_name
          = link_to 'Edit', edit_alternate_name_path(alternate_name), :class => 'btn btn-default btn-xs'
      %td
        - if can? :destroy, alternate_name
          = link_to 'Delete', alternate_name, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs'

- content_for :title, "Listing alternate names"

- if can? :create, AlternateName
  %p= link_to 'New alternate name', new_alternate_name_path, :class => 'btn btn-primary'

%table
  %tr
    %th Alternate name
    %th Crop
    %th
    %th

  - @alternate_names.each do |alternate_name|
    %tr
      %td= link_to alternate_name.name, alternate_name
      %td= alternate_name.crop
      %td= link_to 'Show', alternate_name
      %td
        - if can? :edit, alternate_name
          = link_to 'Edit', edit_alternate_name_path(alternate_name), :class => 'btn btn-default btn-xs'
      %td
        - if can? :destroy, alternate_name
          = link_to 'Delete', alternate_name, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs'

Use content_for :title on altname index page.
Use content_for :title on altname index page.
