La saisie de date et heure est simplifiée techniquement, en html5 l'affichage est sympa mais nécessitera un shim pour les navigateurs ne le supportant pas

This commit is contained in:
echarp 2014-07-13 14:03:59 +02:00
parent 30a9367b2d
commit 6003c8dd71
5 changed files with 16 additions and 14 deletions

View File

@ -20,7 +20,8 @@ gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# Turbolinks makes following links in your web application faster. Read more:
# https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks'
@ -29,7 +30,8 @@ gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
# Spring speeds up development by keeping your application running in the
# background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Use ActiveModel has_secure_password
@ -52,7 +54,7 @@ gem 'activeadmin', github: 'gregbell/active_admin'
gem 'devise'
gem 'devise-i18n'
gem 'rails-i18n'
# Store some specific content, like application name and some important documentation
# Store some specific content, like application name and static pages contents
gem 'i18n-active_record',
git: 'git://github.com/svenfuchs/i18n-active_record.git',
require: 'i18n/active_record'
@ -61,6 +63,7 @@ gem 'email_validator'
# To display a patched diff for event descriptions
gem 'differ'
# The central piece of this application: the month calendar view
gem 'simple_calendar'
# Markdown display

View File

@ -1,6 +1,6 @@
GIT
remote: git://github.com/gregbell/active_admin.git
revision: 063e00b533d4d6c83052b04e7f9cfd86fb68f8fe
revision: 168d72e7f5d705cd25373775db2c9efd910b7a95
specs:
activeadmin (1.0.0.pre)
arbre (~> 1.0)
@ -243,7 +243,7 @@ GEM
json (~> 1.8)
rdoc (~> 4.0, < 5.0)
sexp_processor (4.4.3)
simple_calendar (1.1.4)
simple_calendar (1.1.5)
rails (>= 3.0)
slim (2.0.3)
temple (~> 0.6.6)

View File

@ -21,13 +21,17 @@
:markdown
#{t '.title_helper'}
= f.label :title
= f.text_field :title, required: true ,size: 70
= f.text_field :title, required: true, size: 70
.field
= f.label :start_time
%span#event_start_time= f.datetime_select :start_time, required: true
= f.datetime_local_field :start_time, required: true, size: 14,
value: l(@event.start_time || Time.now + 1.day + 1.hour - Time.now.min.minutes, format: :manual),
placeholder: t('time.formats.manual')
.field
= f.label :end_time
%span#event_end_time= f.datetime_select :end_time, required: true
= f.datetime_local_field :end_time, required: true, size: 14,
value: l(@event.end_time || Time.now + 1.day + 2.hour - Time.now.min.minutes, format: :manual),
placeholder: t('time.formats.manual')
.field
.helper
:markdown

View File

@ -21,14 +21,8 @@
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
/[if lt IE 9]
%script(src='http://html5shiv.googlecode.com/svn/trunk/html5.js')
= csrf_meta_tags
// = javascript_include_tag 'html5'
// = javascript_include_tag 'PIE'
// /https://github.com/aFarkas/iepp/wiki
%body(class = "#{controller.controller_name} #{controller.action_name}")
%header.top
= image_tag 'baby_gnu_adl.png', alt: 'Baby GNU', class: :logo

View File

@ -91,6 +91,7 @@ fr:
formats:
at: "%A %d %B %Y à %Hh%M"
hours: "%Hh%M"
manual: "%d/%m/%Y %H:%M"
# Traductions des écrans
layouts: