Slightly cleaner organisation's page layout

This commit is contained in:
echarp 2018-01-05 22:39:29 +01:00
parent 0363ccb684
commit 6d3cb23965
3 changed files with 54 additions and 53 deletions

View File

@ -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'

View File

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

View File

@ -7,56 +7,7 @@
= title @orga.name = title @orga.name
= image_tag @orga.url + '/favicon.ico', alt: '', class: :favicon = image_tag @orga.url + '/favicon.ico', alt: '', class: :favicon
- if controller.controller_name == 'orgas' && controller.action_name == 'show' = render 'aside' if controller.controller_name == 'orgas'
%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'
%p.full_address %p.full_address
- if @orga.place_name.present? - if @orga.place_name.present?
@ -69,8 +20,8 @@
"https://fr.wikipedia.org/wiki/#{url_encode @orga.region.try :name}" "https://fr.wikipedia.org/wiki/#{url_encode @orga.region.try :name}"
- if @orga.latitude && @orga.longitude - if @orga.latitude && @orga.longitude
.orga#map{ data: { url: "#{maps_path format: :json}", .orga#map{ data: { url: maps_path(format: :json).to_s,
latitude: "#{@orga.latitude}", longitude: "#{@orga.longitude}" } } latitude: @orga.latitude.to_s, longitude: @orga.longitude.to_s } }
%h3= t '.description' %h3= t '.description'
.description .description