Files
growstuff/app/views/scientific_names/index.html.haml
Daniel O'Connor b77df88df9 Issues/1475: Ensure we have pagination (#3193)
* Paginate, 100 at a time

* Limited i18n

* Paginate roles

* Pagination

* Pagination

* i18n and pagination

* Paginate alternate names

* Silence code climate

* Rewrite coverage as a feature

* Remove coverage in favour of crops/scientific_name_spec

* Add missing admin link

* Rewrite coverage as feature

* Rewrite coverage

---------

Co-authored-by: Brenda Wallace <brenda@wallace.net.nz>
2024-01-21 14:19:36 +10:30

27 lines
843 B
Plaintext

- content_for :title, "Listing scientific names"
- if can? :create, ScientificName
%p= link_to 'New Scientific name', new_scientific_name_path, class: 'btn btn-primary'
%table
%tr
%th Scientific name
%th Crop
%th
%th
- @scientific_names.each do |scientific_name|
%tr
%td= link_to scientific_name.name, scientific_name
%td= scientific_name.crop_id
%td= link_to 'Show', scientific_name
%td
- if can? :edit, scientific_name
= link_to t('buttons.edit'), edit_scientific_name_path(scientific_name), class: 'btn btn-default btn-xs'
%td
- if can? :destroy, scientific_name
= link_to t('buttons.delete'), scientific_name, method: :delete, data: { confirm: t(:are_you_sure?) },
class: 'btn btn-default btn-xs'
= will_paginate @scientific_names