Slight partial reorganisation for events' aside

remotes/origin/master
echarp 4 years ago
parent 6ef85409ea
commit e913c28f66
  1. 47
      app/views/events/_aside.html.haml
  2. 2
      app/views/events/index.html.haml
  3. 49
      app/views/events/show.html.haml
  4. 5
      app/views/layouts/application.html.haml
  5. 4
      config/locales/views/en.yml
  6. 4
      config/locales/views/fr.yml
  7. 4
      config/locales/views/pt-BR.yml

@ -0,0 +1,47 @@
%aside#orga-list
- if @event.region.present? && @event.region.orgas.present?
%h1{ title: @event.region }
= link_to orgas_path region: @event.region do
%em.fa.fa-users
= t '.orga-list'
%ul.fa-ul
- @event.region.orgas.select(&:active).each do |orga|
%li
= link_to orga do
- if orga.kind
%em.fa.fa-li{ class: "fa-#{orga.kind.icon}",
title: Kind.human_attribute_name("name_#{orga.kind.name}") }
= orga.name
= image_tag orga.url + '/favicon.ico', alt: '', class: :favicon
%h1
%em.fa.fa-wrench
= t '.actions'
%h2
= link_to event_path @event, protocol: :webcal, format: :ics do
%em.fa.fa-lg.fa-calendar
= t '.add_to_calendar'
%h2
= link_to preview_events_path(event: { title: @event.title,
start_time: @event.start_time + 1.month,
end_time: @event.end_time + 1.month,
description: @event.description,
place_name: @event.place_name,
address: @event.address,
city: @event.city,
region_id: @event.region.id,
locality: @event.locality,
url: @event.url,
tag_list: @event.tag_list.to_s }),
method: :post do
%em.fa.fa-copy
= t '.copy'
- if user_signed_in?
%h2
= link_to edit_moderation_path @event do
%em.fa.fa-lg.fa-edit
= t '.edit'
%h2
= link_to cancel_event_path @event, secret: @event.secret do
%em.fa.fa-lg.fa-thumbs-down
= t '.cancel'

@ -31,7 +31,7 @@
= month_calendar events: @events do |date, events|
- capture_haml do
.day_number= date.day
%ul.events.fa-ul= render events
%ul.events.fa-ul= render events, cached: true
.links
= raw t '.calendar_in',

@ -14,54 +14,7 @@
%em.city{ title: @event.full_address }= @event.city
= title @event.title
- if controller.controller_name == 'events' && controller.action_name == 'show'
%aside#orga-list
- if @event.region.present? && @event.region.orgas.present?
%h1{ title: @event.region }
= link_to orgas_path region: @event.region do
%em.fa.fa-users
= t '.orga-list'
%ul.fa-ul
- @event.region.orgas.select(&:active).each do |orga|
%li
= link_to orga do
- if orga.kind
%em.fa.fa-li{ class: "fa-#{orga.kind.icon}",
title: Kind.human_attribute_name("name_#{orga.kind.name}") }
= orga.name
= image_tag orga.url + '/favicon.ico', alt: '', class: :favicon
%h1
%em.fa.fa-wrench
= t '.actions'
%h2
= link_to event_path @event, protocol: :webcal, format: :ics do
%em.fa.fa-lg.fa-calendar
= t '.add_to_calendar'
%h2
= link_to preview_events_path(event: { title: @event.title,
start_time: @event.start_time + 1.month,
end_time: @event.end_time + 1.month,
description: @event.description,
place_name: @event.place_name,
address: @event.address,
city: @event.city,
region_id: @event.region.id,
locality: @event.locality,
url: @event.url,
tag_list: @event.tag_list.to_s }),
method: :post do
%em.fa.fa-copy
= t '.copy'
- if user_signed_in?
%h2
= link_to edit_moderation_path @event do
%em.fa.fa-lg.fa-edit
= t '.edit'
%h2
= link_to cancel_event_path @event, secret: @event.secret do
%em.fa.fa-lg.fa-thumbs-down
= t '.cancel'
= render 'aside' if [controller_name, action_name] == %w[events show]
%h3= t '.dateAndPlace'

@ -17,9 +17,8 @@
type: 'text/javascript', defer: true, async: Rails.env.production?
= csrf_meta_tags
- classes = [request.domain ? request.domain.split('.')[0] : '',
controller.controller_name, controller.action_name]
%body{ class: classes }
- sub = request.domain ? request.domain.split('.')[0] : ''
%body{ class: [sub, controller_name, action_name] }
%header.top
- cache "regions_filter_#{session[:region]}" do
= render '/regions/filter'

@ -43,6 +43,7 @@ en:
test other syntaxes here
description: Description
infos: Informations
aside:
actions: Actions
edit: Edit event
cancel: Cancel event
@ -245,11 +246,12 @@ description."
index:
title: Organisations
new: Add an organisation
show:
aside:
links: See also
actions: Actions
edit: Edit
cancel: Delete
show:
future: Coming
past: In the past
count:

@ -43,6 +43,7 @@ fr:
tester d'autres syntaxes ici
description: Description
infos: Informations
aside:
actions: Actions
edit: Éditer événement
cancel: Annuler événement
@ -262,11 +263,12 @@ description plus complète."
index:
title: Organisations
new: Ajouter une organisation
show:
aside:
links: Voir aussi
actions: Actions
edit: Éditer
cancel: Supprimer
show:
future: Prochainement
past: Dans le passé
count:

@ -43,6 +43,7 @@ pt-BR:
Você pode testar outras sintaxes aqui
description: Descrição
infos: Informações
aside:
actions: Ações
edit: Editar evento
cancel: Cancelar evento
@ -246,11 +247,12 @@ descrição mais completa."
index:
title: Organizações
new: Adicione uma organização
show:
aside:
links: Veja também
actions: Ações
edit: Editar
cancel: Excluir
show:
future: A realizar
past: Realizado
count:

Loading…
Cancel
Save