From 6844cac3a0c1400a71fec24b20f41114535f8aab Mon Sep 17 00:00:00 2001 From: echarp Date: Sat, 11 Jan 2014 10:51:19 +0100 Subject: [PATCH] =?UTF-8?q?Plus=20d'outline=20et=20tous=20les=20liens=20po?= =?UTF-8?q?ur=20la=20mod=C3=A9ration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/moderations.css.sass | 4 ++++ app/assets/stylesheets/sessions.css.sass | 5 +++-- app/views/devise/sessions/new.html.haml | 8 ++++---- app/views/moderations/index.html.haml | 12 ++++++++---- config/locales/fr.yml | 2 ++ config/routes.rb | 1 + 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/moderations.css.sass b/app/assets/stylesheets/moderations.css.sass index 19dd1c47..c10dc9e9 100644 --- a/app/assets/stylesheets/moderations.css.sass +++ b/app/assets/stylesheets/moderations.css.sass @@ -22,6 +22,10 @@ text-align: right font-style: italic margin-top: 15px + th.actions + padding: 0 + a + font-weight: normal main > h3 font-size: inherit diff --git a/app/assets/stylesheets/sessions.css.sass b/app/assets/stylesheets/sessions.css.sass index a31209a6..5970a768 100644 --- a/app/assets/stylesheets/sessions.css.sass +++ b/app/assets/stylesheets/sessions.css.sass @@ -29,6 +29,7 @@ background-color: #FFB @include border-radius(0.8em) &:focus + outline: 0 background-color: #F0F8FF !important input[type=submit] border: none @@ -39,5 +40,5 @@ margin-left: 6.75em margin-bottom: 10px - .logout - margin: 2em auto +.logout + margin: 2em auto diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index d78e429d..48479ba1 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -1,19 +1,19 @@ %h2=t '.title' = form_for resource, as: resource_name, url: session_path(resource_name) do |f| - %div.field + .field = f.label :login = f.text_field :login, autofocus: true - %div.field + .field = f.label :password = f.password_field :password - if devise_mapping.rememberable? - %div + .field = f.check_box :remember_me = f.label :remember_me - %div= f.submit t('.sign_in') + .actions= f.submit t('.sign_in') = render "devise/shared/links" diff --git a/app/views/moderations/index.html.haml b/app/views/moderations/index.html.haml index 16c7c6da..aadbd8be 100644 --- a/app/views/moderations/index.html.haml +++ b/app/views/moderations/index.html.haml @@ -31,12 +31,16 @@ %td= event.city %td= event.region.name %td= time_ago_in_words event.submission_time.to_date - %td - = link_to t('edit'), edit_moderation_path(event) + %th.actions + = link_to t('edit'), edit_moderation_path(event), class: 'fa-pencil' \- - = link_to t('validate'), edit_moderation_path(event) + = link_to t('validate'), edit_moderation_path(event), class: 'fa-thumbs-up' \- - = link_to t('refuse'), edit_moderation_path(event) + = link_to t('refuse'), edit_moderation_path(event), class: 'fa-thumbs-down' + %br/ + = link_to t('.askInfos'), edit_moderation_path(event), class: 'fa-bullhorn' + %br/ + = link_to t('.createNote'), new_note_path('event.id' => event), class: 'fa-files-o' - event.notes.each do |note| %tr diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 41a40637..1a657bd4 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -142,6 +142,8 @@ fr: actions: Actions posted_by: Posté par %{author} le %{date} date: Date + askInfos: Demander des infos + createNote: Ajouter une note edit: moderation: Modération preview: Prévisualisation de l'évènement diff --git a/config/routes.rb b/config/routes.rb index 0efdbdd1..a754c8a0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,6 +4,7 @@ AgendaDuLibreRails::Application.routes.draw do get 'stats', on: :collection end resources :events + resources :notes resources :users resources :tags, only: [ :index, :show ] resources :moderations