2015-02-15 17:10:17 +01:00
|
|
|
%h2
|
|
|
|
%em.fa.fa-users
|
|
|
|
= title t 'orgas.search.title', entity: Orga.model_name.human
|
|
|
|
|
|
|
|
= render 'search'
|
|
|
|
|
|
|
|
%table.list.autopagerize_page_element
|
|
|
|
%thead
|
2015-02-28 17:28:05 +01:00
|
|
|
%th= sort_link @search, :kind_name, Orga.human_attribute_name(:kind)
|
2015-02-15 17:10:17 +01:00
|
|
|
%th= sort_link @search, :name
|
|
|
|
%th= sort_link @search, :city
|
|
|
|
%th= sort_link @search, :department
|
|
|
|
%th= sort_link @search, :region_name, Orga.human_attribute_name(:region)
|
|
|
|
%th= sort_link @search, :url
|
|
|
|
%th/
|
|
|
|
|
|
|
|
%tbody
|
|
|
|
- @orgas.each do |orga|
|
|
|
|
%tr
|
|
|
|
%td
|
2015-02-28 17:28:05 +01:00
|
|
|
- if orga.kind
|
|
|
|
%em.fa{ class: "fa-#{orga.kind.icon}",
|
|
|
|
title: Kind.human_attribute_name("name_#{orga.kind.name}") }
|
|
|
|
%td
|
|
|
|
= orga.name
|
2015-02-15 17:10:17 +01:00
|
|
|
- if orga.url =~ /^http/
|
|
|
|
= image_tag orga.url + '/favicon.ico', alt: '', class: :favicon
|
|
|
|
%td
|
|
|
|
= orga.city
|
|
|
|
%td
|
|
|
|
= orga.department
|
|
|
|
%td
|
|
|
|
= orga.region
|
|
|
|
%td
|
|
|
|
= link_to orga.url, orga.url
|
|
|
|
%td
|
|
|
|
= link_to t('show'),
|
|
|
|
orga_path(orga, q: params[:q], page: params[:page]),
|
|
|
|
class: :view_link
|
|
|
|
|
|
|
|
= paginate @orgas
|