Un peu plus de couleurs sur les boutons de formulaires

This commit is contained in:
echarp 2014-09-03 18:49:17 +02:00
parent 8f1d374eb5
commit d70978d726
7 changed files with 29 additions and 11 deletions

View File

@ -33,3 +33,9 @@ h2.warning
padding: 0.2em
font-weight: normal
+inline-block()
.fa.fa-check, .fa.fa-thumbs-up
color: green
.fa.fa-thumbs-down
color: red

View File

@ -15,7 +15,7 @@ class TagsController < InheritedResources::Base
end
def show
@events_future = Event.future.tag params[:id]
@events_past = Event.past.tag params[:id]
@events_future = Event.moderated.future.tag params[:id]
@events_past = Event.moderated.past.tag params[:id]
end
end

View File

@ -81,6 +81,6 @@ class Event < ActiveRecord::Base
end
def full_address
[address, city, related_region.name].compact.join(', ')
[address, city, related_region.name].compact.join ', '
end
end

View File

@ -35,7 +35,8 @@
%p= display_date
%p.full_address
%span= @event.address
- if @event.address.present?
%span= @event.address
%span= link_to @event.city, "http://fr.wikipedia.org/wiki/#{url_encode @event.city}"
%span= link_to @event.related_region.try(:name),
"http://fr.wikipedia.org/wiki/#{url_encode @event.related_region.name}"

View File

@ -26,8 +26,13 @@
= label_tag :reason_text, t('.reason')
= text_area_tag :reason_text, nil, cols: 40, rows: 5
= submit_tag t '.ok'
= link_to t('.ko'), moderations_url, class: :button
= link_to moderations_url do
%em.fa.fa-arrow-left
=t '.ko'
= button_tag do
%em.fa.fa-thumbs-down
=t '.ok'
%fieldset
%legend=Event.model_name.human

View File

@ -5,11 +5,17 @@
%fieldset
- if @event.locality?
%h2.warning=t '.warning'
%h2=t '.question'
= form_for @moderation, url: { action: :accept }, html: { method: :put } do |f|
= f.submit t('.ok'), name: :yes
= link_to t('.ko'), moderations_url, class: :button
%h2=t '.question'
= link_to moderations_url do
%em.fa.fa-arrow-left
=t '.ko'
= f.button name: :yes do
%em.fa.fa-thumbs-up
=t '.ok'
%fieldset
%legend=Event.model_name.human

View File

@ -145,7 +145,7 @@ Exemple: `%{daylimit}`"
warning: Attention, cet événement est à portée nationale!
question: Confirmez-vous la validation de cet événement?
ok: Oui
ko: Non
ko: Modération
accept:
ok: Événement accepté
refuse:
@ -153,7 +153,7 @@ Exemple: `%{daylimit}`"
motif: Motif
question: Quel motif souhaitez-vous associer au rejet de cet événement?
ok: Rejeter
ko: Annuler
ko: Modération
reason_r_1: Hors sujet
reason_r_2: Pas assez d'informations
reason_r_3: Événement déjà enregistré