beagle_app/app/views/admin/taxons/_index_table.html.haml
Nicolas Bally 7b6cba2128 initial
2015-01-27 23:13:36 +01:00

62 lines
1.9 KiB
Plaintext

%h3 Classes
%ul#taxons_orders
= search_form_for [:admin, @q], :remote => true, :html =>{:onsubmit => "$('#taxons_table').replaceWith('<div class=\"loader\" ><img src=\"/loader.png\" /></div>');"} do |f|
= f.label :nom_vern_or_nom_valide_or_lb_nom_cont, "Recherche par nom"
= f.search_field :nom_vern_or_nom_valide_or_lb_nom_cont
=f.collection_select :classe_eq, Taxon.where("taxons.cd_ref = taxons.cd_nom").group("classe").all(), :classe, :classe, :include_blank => true
=f.collection_select :ordre_eq, Taxon.where("taxons.cd_ref = taxons.cd_nom").group("ordre").all(), :ordre, :ordre, :include_blank => true
=f.collection_select :t_cats_id_eq, TCat.all(), :id, :name, :include_blank => true
%p
=f.label :enabled_true, "N'afficher que les taxons actifs"
=f.check_box :enabled_true
%p
=f.label :fav_true, "N'afficher que les favoris"
=f.check_box :fav_true
%p
=label :all, "Afficher également les anciens taxons"
=check_box_tag :all, params[:all]
= f.submit "Recherche", :class => "btn btn-primary"
-if @taxons.size > 0
%table.table.table-hover#taxons_table
%tr
%th
%th
%th
%th
= sort_link(@q, :rang, "Rang",{},{ :remote => true})
%th
= sort_link(@q, :nom_vern, "Nom commmun",{},{ :remote => true})
%th
= sort_link(@q, :lb_nom, "Nom latin",{},{ :remote => true})
%th
= sort_link(@q, :nom_valide, "Nom valide",{},{ :remote => true})
%th
= sort_link(@q, :classe, "Classe",{},{ :remote => true})
%th
= sort_link(@q, :ordre, "Ordre",{},{ :remote => true})
%th
= sort_link(@q, :famille, "Famille",{},{ :remote => true})
%th
Cd nom
%th
Cd réf
=render @taxons
-else
%p#taxons_table
Aucun résultats avec ces critères