Travail sur l'accessibilité

This commit is contained in:
echarp 2014-06-29 10:29:43 +02:00
parent 320f576641
commit 0e6535ac93
10 changed files with 46 additions and 40 deletions

View File

@ -19,8 +19,6 @@ gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Messages and notifications displayed nicely using javascript
gem 'gritter'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
@ -49,6 +47,8 @@ gem 'spring', group: :development
gem 'haml-rails'
gem 'compass-rails'
gem 'modernizr-rails'
# Using presentation framework http://foundation.zurb.com
gem 'foundation-rails'
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'devise'

View File

@ -113,8 +113,10 @@ GEM
formatador (0.2.5)
formtastic (2.3.0.rc3)
actionpack (>= 3.0)
foundation-rails (5.3.0.1)
railties (>= 3.1.0)
sass (>= 3.2.0)
fssm (0.2.10)
gritter (1.1.0)
guard (2.6.1)
formatador (>= 0.2.4)
listen (~> 2.7)
@ -298,7 +300,7 @@ DEPENDENCIES
differ
email_validator
font-awesome-rails
gritter
foundation-rails
guard-brakeman
guard-bundler
guard-livereload

View File

@ -1,7 +1 @@
$(document).ready ->
$('#flash_messages .flash, #error_explanation.flash').removeClass('flash').each ->
$(this).hide()
jQuery.gritter.add
image: "/assets/#{$(this).attr('class')}.png",
title: $(this).children('h2').text(),
text: $(this).children('p').text()

View File

@ -7,12 +7,6 @@
line-height: 1em
@include transition-duration(0.5s)
[class^="fa-"], [class*=" fa-"]
font-family: FontAwesome, georgia, serif !important
&:before
font-style: normal
font-weight: normal !important
html
color: black
line-height: 1.3em
@ -29,14 +23,20 @@ body
border-bottom: 0px
a:link, a:visited
color: #369
color: #258
font-weight: bold
text-decoration: none
a:hover, a:active, a:focus
color: #2E97FF
.js #flash_messages
display: none
#flash_messages
font-size: x-large
.flash.notice
color: green
.fa:before
font-style: normal
font-weight: normal !important
header.top
position: relative
@ -110,7 +110,9 @@ main
line-height: 1.1em
font-weight: normal
vertical-align: baseline
background-color: buttonface
select, option
color: black
background-color: white
.field_with_errors
display: inline

View File

@ -10,7 +10,6 @@
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require gritter
*= require_tree .
*= require_self
*/

View File

@ -7,7 +7,6 @@ form.region_selector
label
display: none
header.calendar-header
font-size: 1.5em
margin-top: 1em
@ -44,14 +43,14 @@ body.events.index table
background-color: #A1C3E7
&.today
border: 1px solid #FFB578
background-color: #ffe0c7
background-color: #FFE0C7
.day_number
color: #544f32
color: #531
font-size: 0.8em
margin-top: -1px
.event
a:link, a:visited
color: #8F4900
color: #730
&.future
border-color: rgb(150, 207, 255)
background-color: #C6E5FF
@ -62,16 +61,17 @@ body.events.index table
border: none
background-color: #ededed
.day_number
color: #444
font-size: 0.6em
li
color: #555
.event
a:link, a:visited
color: #888
color: #444
.day_number
float: left
color: #727070
color: #111
margin: 0 1px 3px 1px
font-size: 0.6em
font-weight: bolder
@ -101,7 +101,7 @@ body.events.index table
content: ':'
margin-right: -1px
a:link, a:visited
color: #666
color: #111
font-weight: normal
&:hover
color: black

View File

@ -4,6 +4,7 @@ class EventsController < ApplicationController
before_filter :set_mailer_host
def index
flash[:notice] = 'hello world'
@events = Event.moderated
if (params[:region] && params[:region].present? && params[:region] != 'all')
@events = @events.region(params[:region])

View File

@ -1,5 +1,3 @@
#flash_messages
- flash.each do |key, value|
.flash(class="#{key}")
%h2=t key, scope: [:gflash, :titles]
%p= value
.flash(class="#{key}")= value

View File

@ -16,7 +16,7 @@
%meta(name='dcterms.subject' content='agenda')
= favicon_link_tag '/favicon.ico'
= auto_discovery_link_tag :rss, { controller: 'events', format: :rss }
= auto_discovery_link_tag :rss, { controller: '/events', format: :rss }
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
@ -29,8 +29,6 @@
// /https://github.com/aFarkas/iepp/wiki
%body(class = "#{controller.controller_name} #{controller.action_name}")
= render 'layouts/flash', flash: flash if flash.present?
%header.top
= image_tag 'baby_gnu_adl.png', alt: 'Baby GNU', class: :logo
%h1= link_to t('.title'), root_url
@ -58,6 +56,8 @@
= image_tag 'suisse.png', alt: t('.flag')
=t '.suisse'
= render 'layouts/flash', flash: flash if flash.present?
%main
= yield

View File

@ -27,20 +27,30 @@
Du
=l event.start_time, format: :at
au
#{l event.end_time, format: :at}
=l event.end_time, format: :at
%td= event.city
%td= event.region.name
%td= time_ago_in_words event.submission_time.to_date
%th.actions
= link_to t('edit'), edit_moderation_path(event), class: 'fa-pencil'
= link_to edit_moderation_path event do
%em.fa.fa-pencil
=t 'edit'
\-
= link_to t('validate'), edit_moderation_path(event), class: 'fa-thumbs-up'
= link_to edit_moderation_path event do
%em.fa.fa-thumbs-up
=t 'validate'
\-
= link_to t('refuse'), edit_moderation_path(event), class: 'fa-thumbs-down'
= link_to edit_moderation_path event do
%em.fa.fa-thumbs-down
=t 'refuse'
%br/
= link_to t('.askInfos'), new_moderation_note_path(event, envoiParMail: :oui), class: 'fa-bullhorn'
= link_to new_moderation_note_path event, envoiParMail: :oui do
%em.fa.fa-bullhorn
=t '.askInfos'
%br/
= link_to t('.createNote'), new_moderation_note_path(event), class: 'fa-files-o'
= link_to new_moderation_note_path event do
%em.fa.fa-files-o
=t '.createNote'
- event.notes.each do |note|
%tr