2015-02-15 17:10:17 +01:00
|
|
|
- set_orga_meta
|
2014-08-06 14:47:47 +02:00
|
|
|
|
2015-07-25 18:32:27 +02:00
|
|
|
%h2
|
|
|
|
- if @orga.kind
|
|
|
|
%em.fa{ class: "fa-#{@orga.kind.icon}",
|
|
|
|
title: Kind.human_attribute_name("name_#{@orga.kind.name}") }
|
|
|
|
= title @orga.name
|
|
|
|
= image_tag @orga.url + '/favicon.ico', alt: '', class: :favicon
|
2014-10-13 22:50:59 +02:00
|
|
|
|
2015-07-25 18:32:27 +02:00
|
|
|
- if controller.controller_name == 'orgas' && controller.action_name == 'show'
|
2015-02-28 17:28:05 +01:00
|
|
|
%aside
|
|
|
|
%h1
|
|
|
|
%em.fa.fa-link
|
|
|
|
= t '.links'
|
2014-07-27 01:50:22 +02:00
|
|
|
|
2015-02-28 17:28:05 +01:00
|
|
|
%ul.fa-ul
|
2015-07-25 18:32:27 +02:00
|
|
|
%li
|
|
|
|
= link_to orgas_path(q: params[:q], page: params[:page]),
|
|
|
|
class: :back do
|
|
|
|
%em.fa.fa-li.fa-arrow-left
|
|
|
|
= Orga.model_name.human.pluralize
|
2016-10-19 14:31:00 +02:00
|
|
|
%li
|
|
|
|
= link_to tag_path @orga.name_as_tag do
|
|
|
|
%em.fa.fa-li.fa-tag
|
|
|
|
= Event.model_name.human.pluralize
|
2015-02-28 17:28:05 +01:00
|
|
|
%li
|
2016-04-24 20:35:21 +02:00
|
|
|
= link_to events_path tag: @orga.name_as_tag do
|
2015-02-28 17:28:05 +01:00
|
|
|
%em.fa.fa-li.fa-calendar
|
|
|
|
Agenda
|
|
|
|
%li
|
2016-10-18 15:37:03 +02:00
|
|
|
= link_to events_path format: :rss, tag: @orga.name_as_tag do
|
2015-02-28 17:28:05 +01:00
|
|
|
%em.fa.fa-li.fa-rss
|
|
|
|
RSS
|
|
|
|
%li
|
2016-10-18 15:37:03 +02:00
|
|
|
= link_to events_path format: :ics, tag: @orga.name_as_tag do
|
2015-02-28 17:28:05 +01:00
|
|
|
%em.fa.fa-li.fa-th-list
|
|
|
|
iCal
|
|
|
|
%li
|
2016-10-18 15:37:03 +02:00
|
|
|
= link_to maps_path tag: @orga.name_as_tag do
|
2015-02-28 17:28:05 +01:00
|
|
|
%em.fa.fa-li.fa-map-marker
|
|
|
|
OpenStreetMap
|
|
|
|
%li
|
2016-10-18 15:37:03 +02:00
|
|
|
= link_to maps_path format: :json, tag: @orga.name_as_tag do
|
2015-02-28 17:28:05 +01:00
|
|
|
%em.fa.fa-li.fa-dot-circle-o
|
|
|
|
GeoJSON
|
2014-10-29 11:42:07 +01:00
|
|
|
|
2016-01-26 15:09:33 +01:00
|
|
|
- if @orga.secret.nil? || user_signed_in?
|
|
|
|
%h1
|
|
|
|
%em.fa.fa-wrench
|
|
|
|
= t '.actions'
|
2015-12-27 12:56:33 +01:00
|
|
|
%h2
|
2016-01-26 15:09:33 +01:00
|
|
|
= link_to edit_orga_path @orga do
|
|
|
|
%em.fa.fa-lg.fa-pencil
|
|
|
|
= t '.edit'
|
|
|
|
- if user_signed_in?
|
|
|
|
%h2
|
|
|
|
= link_to cancel_orga_path @orga do
|
|
|
|
%em.fa.fa-lg.fa-thumbs-down
|
|
|
|
= t '.cancel'
|
2015-12-26 23:32:04 +01:00
|
|
|
|
2016-04-09 16:06:22 +02:00
|
|
|
%p.full_address
|
|
|
|
- if @orga.place_name.present?
|
|
|
|
%span= @orga.place_name
|
|
|
|
- if @orga.address.present?
|
|
|
|
%span= @orga.address
|
|
|
|
%span= link_to @orga.city,
|
2017-10-14 21:39:56 +02:00
|
|
|
"https://fr.wikipedia.org/wiki/#{url_encode @orga.city}"
|
2016-04-09 16:06:22 +02:00
|
|
|
%span= link_to @orga.region.try(:name),
|
2017-10-14 21:39:56 +02:00
|
|
|
"https://fr.wikipedia.org/wiki/#{url_encode @orga.region.try :name}"
|
2016-04-09 16:06:22 +02:00
|
|
|
|
|
|
|
- if @orga.latitude && @orga.longitude
|
|
|
|
.orga#map{ data: { url: "#{maps_path format: :json}",
|
|
|
|
latitude: "#{@orga.latitude}", longitude: "#{@orga.longitude}" } }
|
|
|
|
|
2015-12-26 23:32:04 +01:00
|
|
|
%h3= t '.description'
|
|
|
|
.description
|
|
|
|
= description sanitize @orga.description,
|
2017-05-06 16:30:45 +02:00
|
|
|
tags: %w(p h1 h2 h3 h4 br table tr th td ul ol li a strong b em i img sub sup span),
|
2017-05-06 16:15:38 +02:00
|
|
|
attributes: %w(href src width height style title)
|
2015-02-28 17:28:05 +01:00
|
|
|
|
2015-07-25 18:32:27 +02:00
|
|
|
%dl
|
|
|
|
- if @orga.department.present?
|
2015-12-26 23:32:04 +01:00
|
|
|
%dt
|
|
|
|
%em.fa.fa-puzzle-piece
|
|
|
|
= Orga.human_attribute_name :department
|
2015-07-25 18:32:27 +02:00
|
|
|
%dd= @orga.department
|
|
|
|
- if @orga.url.present?
|
|
|
|
%dt
|
|
|
|
%em.fa.fa-external-link
|
|
|
|
= Orga.human_attribute_name :url
|
|
|
|
%dd= link_to @orga.url, @orga.url
|
2016-01-07 22:20:09 +01:00
|
|
|
- if @orga.diaspora.present?
|
|
|
|
%dt
|
|
|
|
%em.fa.fa-bullhorn
|
|
|
|
= Orga.human_attribute_name :diaspora
|
2016-01-08 11:15:41 +01:00
|
|
|
%dd= link_to @orga.diaspora, @orga.diaspora
|
2015-07-25 18:32:27 +02:00
|
|
|
- if @orga.feed.present?
|
|
|
|
%dt
|
|
|
|
%em.fa.fa-rss
|
|
|
|
= Orga.human_attribute_name :feed
|
|
|
|
%dd= link_to @orga.feed, @orga.feed
|
|
|
|
- if @orga.contact.present?
|
|
|
|
%dt
|
|
|
|
%em.fa.fa-envelope
|
|
|
|
= Event.human_attribute_name :contact
|
|
|
|
%dd= mail_to @orga.contact, nil,
|
|
|
|
encode: (request.format == 'text/html' ? :javascript : nil),
|
|
|
|
replace_at: ' CHEZ ', replace_dot: ' POINT '
|
2016-01-04 00:49:52 +01:00
|
|
|
- if @orga.tags?
|
|
|
|
%dt
|
|
|
|
%em.fa.fa-tags
|
|
|
|
= Event.human_attribute_name :tags
|
2016-12-17 18:47:05 +01:00
|
|
|
%dd
|
|
|
|
- @orga.tags.each do |tag|
|
|
|
|
= link_to tag, tag_path(tag.name), rel: :tag
|
2015-12-26 23:32:04 +01:00
|
|
|
%dt
|
|
|
|
%em.fa.fa-heartbeat
|
|
|
|
= Orga.human_attribute_name :active
|
|
|
|
%dd= t @orga.active.to_s
|
2015-12-27 00:07:30 +01:00
|
|
|
- if @orga.updated_at
|
|
|
|
%dt
|
|
|
|
%em.fa.fa-calendar
|
|
|
|
= Orga.human_attribute_name :updated_at
|
|
|
|
%dd= l @orga.updated_at.to_date, format: :long
|
2015-02-28 17:28:05 +01:00
|
|
|
|
2015-07-25 18:32:27 +02:00
|
|
|
- if @events_future && @events_future.any?
|
2016-10-19 14:31:00 +02:00
|
|
|
%dt
|
|
|
|
%em.fa.fa-forward
|
|
|
|
= t '.future'
|
|
|
|
%dd
|
|
|
|
= link_to tag_path @orga.name_as_tag do
|
|
|
|
= t '.count', count: @events_future.count
|
2015-07-25 18:32:27 +02:00
|
|
|
- if @events_future && @events_past.any?
|
2016-10-19 14:31:00 +02:00
|
|
|
%dt
|
|
|
|
%em.fa.fa-backward
|
|
|
|
= t '.past'
|
|
|
|
%dd
|
|
|
|
= link_to tag_path @orga.name_as_tag do
|
|
|
|
= t '.count', count: @events_past.count
|