Quelques changements d'apparence et traductions supplémentaires

This commit is contained in:
echarp 2014-06-21 18:53:05 +02:00
parent ee8280d1fa
commit cc2ed4ee89
7 changed files with 32 additions and 8 deletions

View File

@ -134,6 +134,7 @@ main
@include box-shadow(5px 5px 5px lightblue) @include box-shadow(5px 5px 5px lightblue)
footer.bottom nav footer.bottom nav
clear: both
margin: 26px auto -3px margin: 26px auto -3px
font-size: smaller font-size: smaller
a + a:before a + a:before

View File

@ -164,3 +164,6 @@ table.calendar
.actions .actions
margin-left: 6.75em margin-left: 6.75em
margin-bottom: 10px margin-bottom: 10px
.description
text-align: left

View File

@ -48,8 +48,10 @@ class EventsController < InheritedResources::Base
if @event.save if @event.save
# Send an event creation mail to its author # Send an event creation mail to its author
EventMailer.create(@event).deliver EventMailer.create(@event).deliver
# Send a mail to moderators
ModerationMailer.create(@event).deliver
format.html { redirect_to @event, notice: 'Event was successfully created.' } format.html { redirect_to @event, notice: t('.ok') }
format.json { render action: 'show', status: :created, location: @event } format.json { render action: 'show', status: :created, location: @event }
else else
format.html { render action: 'new' } format.html { render action: 'new' }
@ -73,7 +75,7 @@ class EventsController < InheritedResources::Base
respond_to do |format| respond_to do |format|
if @event.update(event_params) if @event.update(event_params)
format.html { redirect_to @event, notice: 'Event was successfully updated.' } format.html { redirect_to @event, notice: t('.ok') }
format.json { head :no_content } format.json { head :no_content }
else else
format.html { render action: 'edit' } format.html { render action: 'edit' }

View File

@ -23,6 +23,9 @@ class ModerationsController < InheritedResources::Base
respond_to do |format| respond_to do |format|
if @event.update(event_params) if @event.update(event_params)
# Send an update mail to its author
ModerationMailer.update(@event, current_user).deliver
format.html { redirect_to moderations_path, notice: 'Event was successfully updated.' } format.html { redirect_to moderations_path, notice: 'Event was successfully updated.' }
format.json { head :no_content } format.json { head :no_content }
else else

View File

@ -1,4 +1,4 @@
- if request.format == 'text/html' && controller.controller_name != 'moderations' && controller.controller_name != 'notes' - if request.format == 'text/html' && controller.controller_name != 'moderations' && controller.controller_name != 'notes' && controller.action_name != 'edit'
#lug-list #lug-list
%h1=t '.lug-list' %h1=t '.lug-list'
- if @event.region - if @event.region
@ -28,11 +28,12 @@
#{l @event.end_time, format: :at}. #{l @event.end_time, format: :at}.
%p %p
À =t '.at'
%em= link_to(@event.city, "http://fr.wikipedia.org/wiki/#{@event.city}") + ',' %em= link_to(@event.city, "http://fr.wikipedia.org/wiki/#{@event.city}") + ','
= link_to @event.region.name, "http://fr.wikipedia.org/wiki/#{@event.region.name}" rescue nil = link_to @event.region.name, "http://fr.wikipedia.org/wiki/#{@event.region.name}" rescue nil
%h3 Description %h3 Description
.description
= sanitize @event.description, = sanitize @event.description,
tags: %w(p br table tr td ul ol li a strong b em i img), tags: %w(p br table tr td ul ol li a strong b em i img),
attributes: %w(href src width height) attributes: %w(href src width height)

View File

@ -3,5 +3,16 @@
=t '.body', author: @current_user =t '.body', author: @current_user
\ \
===================================================== =====================================================
#{Event.human_attribute_name(:title)}: #{@event.title}
#{Event.human_attribute_name(:start_time)}: #{l @event.start_time, format: :at}
#{Event.human_attribute_name(:end_time)}: #{l @event.end_time, format: :at}
#{Event.human_attribute_name(:region)}: #{@event.region}
#{Event.human_attribute_name(:city)}: #{@event.city}
#{Event.human_attribute_name(:url)}: #{@event.url}
#{Event.human_attribute_name(:contact)}: #{@event.contact}
#{Event.human_attribute_name(:submitter)}: #{@event.submitter}
#{Event.human_attribute_name(:tags)}: #{@event.tags}
#{Event.human_attribute_name(:description)}: #{raw @event.description}
=====================================================
\ \
=t '.signature' =t '.signature'

View File

@ -112,8 +112,11 @@ fr:
show: show:
lug-list: Groupes d'utilisateurs de la région lug-list: Groupes d'utilisateurs de la région
add_to_calendar: Ajouter à mon calendrier add_to_calendar: Ajouter à mon calendrier
at: À
new: new:
title: Soumettre un évènement title: Soumettre un évènement
create:
ok: Votre évènement a bien été ajouté à la liste des évènements en attente de modération. Il apparaîtra en ligne dès qu'un modérateur l'aura validé.
edit: edit:
title: Éditer un évènement title: Éditer un évènement
preview: Prévisualisation de l'évènement preview: Prévisualisation de l'évènement
@ -216,4 +219,4 @@ fr:
subject: "[Agenda du Libre] Évènement '%{subject}' modéré" subject: "[Agenda du Libre] Évènement '%{subject}' modéré"
title: Bonjour, title: Bonjour,
body: L'évènement a été modéré par %{author} body: L'évènement a été modéré par %{author}
signature: "Merci!\n\n-- \nAgenda du Libre" signature: "-- \nL'équipe de modération"