2015-12-27 16:12:27 +01:00
|
|
|
= render 'search'
|
|
|
|
= render '/regions/selector'
|
|
|
|
|
2015-02-15 17:10:17 +01:00
|
|
|
%h2
|
|
|
|
%em.fa.fa-users
|
|
|
|
= title t 'orgas.search.title', entity: Orga.model_name.human
|
|
|
|
|
|
|
|
%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)
|
2015-12-27 15:34:02 +01:00
|
|
|
%th= sort_link @search, :updated_at, Orga.human_attribute_name(:updated_at)
|
|
|
|
%th/
|
2015-02-15 17:10:17 +01:00
|
|
|
%th/
|
2015-12-27 16:29:11 +01:00
|
|
|
%th/
|
2015-02-15 17:10:17 +01:00
|
|
|
|
|
|
|
%tbody
|
|
|
|
- @orgas.each do |orga|
|
2015-12-27 17:09:07 +01:00
|
|
|
%tr{ class: orga.active ? 'active' : 'inactive' }
|
2015-02-15 17:10:17 +01:00
|
|
|
%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
|
2015-05-25 11:42:53 +02:00
|
|
|
%td= orga.city
|
|
|
|
%td= orga.department
|
|
|
|
%td= orga.region
|
2015-02-15 17:10:17 +01:00
|
|
|
%td
|
2015-12-27 15:34:02 +01:00
|
|
|
- if orga.updated_at.present?
|
|
|
|
= l orga.updated_at.to_date
|
|
|
|
%td
|
|
|
|
= link_to orga.url do
|
|
|
|
%em.fa.fa-external-link
|
|
|
|
%td
|
2015-12-27 16:29:11 +01:00
|
|
|
= link_to orga_path(orga, q: params[:q], page: params[:page]) do
|
2015-12-27 15:34:02 +01:00
|
|
|
%em.fa.fa-eye
|
2015-12-27 16:29:11 +01:00
|
|
|
%td
|
|
|
|
= link_to edit_orga_path orga do
|
|
|
|
%em.fa.fa-pencil
|
2015-02-15 17:10:17 +01:00
|
|
|
|
|
|
|
= paginate @orgas
|