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)
footer.bottom nav
clear: both
margin: 26px auto -3px
font-size: smaller
a + a:before

View File

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

View File

@ -48,8 +48,10 @@ class EventsController < InheritedResources::Base
if @event.save
# Send an event creation mail to its author
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 }
else
format.html { render action: 'new' }
@ -73,7 +75,7 @@ class EventsController < InheritedResources::Base
respond_to do |format|
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 }
else
format.html { render action: 'edit' }

View File

@ -23,6 +23,9 @@ class ModerationsController < InheritedResources::Base
respond_to do |format|
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.json { head :no_content }
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
%h1=t '.lug-list'
- if @event.region
@ -28,14 +28,15 @@
#{l @event.end_time, format: :at}.
%p
À
=t '.at'
%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
%h3 Description
= sanitize @event.description,
tags: %w(p br table tr td ul ol li a strong b em i img),
attributes: %w(href src width height)
.description
= sanitize @event.description,
tags: %w(p br table tr td ul ol li a strong b em i img),
attributes: %w(href src width height)
%h3 Informations
%p

View File

@ -3,5 +3,16 @@
=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'

View File

@ -112,8 +112,11 @@ fr:
show:
lug-list: Groupes d'utilisateurs de la région
add_to_calendar: Ajouter à mon calendrier
at: À
new:
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:
title: Éditer un évènement
preview: Prévisualisation de l'évènement
@ -216,4 +219,4 @@ fr:
subject: "[Agenda du Libre] Évènement '%{subject}' modéré"
title: Bonjour,
body: L'évènement a été modéré par %{author}
signature: "Merci!\n\n-- \nAgenda du Libre"
signature: "-- \nL'équipe de modération"