agenda-libre-ruby/app/views/orgas/index.html.haml

65 lines
2.0 KiB
Plaintext
Raw Normal View History

2015-02-15 17:10:17 +01:00
%h2
%em.fa.fa-users
= title t '.title'
2015-02-15 17:10:17 +01:00
= render 'types'
2015-02-15 17:10:17 +01:00
%table.list.autopagerize_page_element
%thead
%th
%th.name= sort_link @search, :name
%th.city= sort_link @search, :city
%th.department= sort_link @search, :department
2016-01-07 23:10:20 +01:00
%th.region= sort_link @search,
:region_name, Orga.human_attribute_name(:region)
%th.tags= sort_link @search, :tags, Orga.human_attribute_name(:tags)
2016-01-07 23:10:20 +01:00
%th.updated_at= sort_link @search,
:updated_at, Orga.human_attribute_name(:updated_at)
%th
%th
%th
%th.view/
%th.edit/
2015-02-15 17:10:17 +01:00
%tbody
- @orgas.each do |orga|
%tr{ class: orga.active ? 'active' : 'inactive' }
%td.kind
- if orga.kind
%em.fa{ class: "fa-#{orga.kind.icon}",
title: Kind.human_attribute_name("name_#{orga.kind.name}") }
%td.name
= orga.name
2015-02-15 17:10:17 +01:00
- if orga.url =~ /^http/
= image_tag orga.url + '/favicon.ico', alt: '', class: :favicon
%td.city= orga.city
%td.department= orga.department
%td.region= orga.region
%td.tags= orga.tag_list
%td.updated_at
- if orga.updated_at.present?
= l orga.updated_at.to_date
%td.url
- if orga.url.present?
= link_to orga.url do
2018-03-01 22:33:38 +01:00
%em.fa.fa-external-link-alt{ title: Orga.human_attribute_name(:url) }
%td.diaspora
- if orga.diaspora.present?
= link_to orga.diaspora do
%em.fa{ title: Orga.human_attribute_name(:diaspora) }
%td.feed
- if orga.feed.present?
= link_to orga.feed do
2016-01-07 23:10:20 +01:00
%em.fa.fa-rss{ title: Orga.human_attribute_name(:feed) }
%td.view
2017-11-11 12:44:09 +01:00
= link_to orga_path orga, q: params[:q].permit, page: params[:page] do
%em.fa.fa-eye
%td.edit
- if orga.secret.nil? || user_signed_in?
= link_to edit_orga_path orga do
2018-02-11 18:06:32 +01:00
%em.fa.fa-edit
2015-02-15 17:10:17 +01:00
2016-01-10 14:41:20 +01:00
%tfoot
%tr
%th(colspan='12')= paginate @orgas