Slightly cleaner organisation's page layout

remotes/origin/master
echarp 5 years ago
parent 0363ccb684
commit 6d3cb23965

@ -0,0 +1,50 @@
%aside
%h1
%em.fa.fa-link
= t '.links'
%ul.fa-ul
%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
%li
= link_to tag_path @orga.name_as_tag do
%em.fa.fa-li.fa-tag
= Event.model_name.human.pluralize
%li
= link_to events_path tag: @orga.name_as_tag do
%em.fa.fa-li.fa-calendar
Agenda
%li
= link_to events_path format: :rss, tag: @orga.name_as_tag do
%em.fa.fa-li.fa-rss
RSS
%li
= link_to events_path format: :ics, tag: @orga.name_as_tag do
%em.fa.fa-li.fa-th-list
iCal
%li
= link_to maps_path tag: @orga.name_as_tag do
%em.fa.fa-li.fa-map-marker
OpenStreetMap
%li
= link_to maps_path format: :json, tag: @orga.name_as_tag do
%em.fa.fa-li.fa-dot-circle-o
GeoJSON
- if @orga.secret.nil? || user_signed_in?
%h1
%em.fa.fa-wrench
= t '.actions'
%h2
= 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'

@ -1,7 +1,7 @@
= search_form_for @search || Orga.search(params[:q]) do |f|
= f.label :search, t('.label')
%em.fa.fa-users
= f.search_field :name_or_city_or_department_or_region_name_or_url_or_diaspora_or_tags_or_description_cont_any,
= f.search_field :name_or_city_or_tags_or_description_cont_any,
id: :q_search, size: 16,
placeholder: t('.title', entity: Orga.model_name.human)
= f.button class: :search do

@ -7,56 +7,7 @@
= title @orga.name
= image_tag @orga.url + '/favicon.ico', alt: '', class: :favicon
- if controller.controller_name == 'orgas' && controller.action_name == 'show'
%aside
%h1
%em.fa.fa-link
= t '.links'
%ul.fa-ul
%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
%li
= link_to tag_path @orga.name_as_tag do
%em.fa.fa-li.fa-tag
= Event.model_name.human.pluralize
%li
= link_to events_path tag: @orga.name_as_tag do
%em.fa.fa-li.fa-calendar
Agenda
%li
= link_to events_path format: :rss, tag: @orga.name_as_tag do
%em.fa.fa-li.fa-rss
RSS
%li
= link_to events_path format: :ics, tag: @orga.name_as_tag do
%em.fa.fa-li.fa-th-list
iCal
%li
= link_to maps_path tag: @orga.name_as_tag do
%em.fa.fa-li.fa-map-marker
OpenStreetMap
%li
= link_to maps_path format: :json, tag: @orga.name_as_tag do
%em.fa.fa-li.fa-dot-circle-o
GeoJSON
- if @orga.secret.nil? || user_signed_in?
%h1
%em.fa.fa-wrench
= t '.actions'
%h2
= 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'
= render 'aside' if controller.controller_name == 'orgas'
%p.full_address
- if @orga.place_name.present?
@ -69,8 +20,8 @@
"https://fr.wikipedia.org/wiki/#{url_encode @orga.region.try :name}"
- if @orga.latitude && @orga.longitude
.orga#map{ data: { url: "#{maps_path format: :json}",
latitude: "#{@orga.latitude}", longitude: "#{@orga.longitude}" } }
.orga#map{ data: { url: maps_path(format: :json).to_s,
latitude: @orga.latitude.to_s, longitude: @orga.longitude.to_s } }
%h3= t '.description'
.description

Loading…
Cancel
Save