Le sélectionneur de région est en place

This commit is contained in:
echarp 2013-12-29 00:23:08 +01:00
parent 8cc52a697d
commit de7c7ec246
5 changed files with 25 additions and 4 deletions

View File

@ -1,3 +1,7 @@
# Place all the behaviors and hooks related to the matching controller here. # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js. # All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/ # You can use CoffeeScript in this file: http://coffeescript.org/
#
$(document).ready ->
$('form.region_selector select').change ->
window.location='?year=2013&month=12&region=' + this.options[this.selectedIndex].value

View File

@ -1,4 +1,9 @@
main h2:first-child form.region_selector
width: 98.3%
position: absolute
margin-top: 2.6em
main form.region_selector + h2
margin-top: 1.1em margin-top: 1.1em
a a
font-weight: normal font-weight: normal
@ -18,7 +23,7 @@ table.calendar
text-transform: capitalize text-transform: capitalize
td td
width: 14% !important width: 14% !important
height: 6em height: 4.8em
border: 1px solid #89B7E5 border: 1px solid #89B7E5
vertical-align: top vertical-align: top
background-color: #A1C3E7 background-color: #A1C3E7
@ -30,6 +35,12 @@ table.calendar
.event .event
a:link, a:visited a:link, a:visited
color: #888 color: #888
&.today
border: 1px solid #FFB578
background-color: #ffe0c7
.day_number
color: #544f32
font-size: 0.8em
.day_number .day_number
float: left float: left
@ -60,7 +71,7 @@ table.calendar
color: black color: black
.formats .formats
width: 99% width: 95%
font-size: smaller font-size: smaller
margin-top: 10px margin-top: 10px
text-align: right text-align: right

View File

@ -1,3 +1,8 @@
%form.region_selector
= select_tag :region,
options_from_collection_for_select(Region.all, 'id', 'name', params[:region]),
prompt: t('region_selector')
= calendar @events, { prev_text: '<<', next_text: '>>', start_day: :monday, = calendar @events, { prev_text: '<<', next_text: '>>', start_day: :monday,
params: { region: params[:region] } } do |event| params: { region: params[:region] } } do |event|
%ul.events %ul.events

View File

@ -15,7 +15,7 @@
%meta(name='dcterms.title' content='Agenda du Libre' lang='fr') %meta(name='dcterms.title' content='Agenda du Libre' lang='fr')
%meta(name='dcterms.subject' content='agenda') %meta(name='dcterms.subject' content='agenda')
= favicon_link_tag %link(rel='shortcut icon' href='/favicon.ico')
= auto_discovery_link_tag :atom, { format: :atom } = auto_discovery_link_tag :atom, { format: :atom }
= stylesheet_link_tag 'application', media: "all", "data-turbolinks-track" => true = stylesheet_link_tag 'application', media: "all", "data-turbolinks-track" => true

View File

@ -2,6 +2,7 @@ fr:
show: Voir show: Voir
edit: Éditer edit: Éditer
destroy: Supprimer destroy: Supprimer
region_selector: Toutes les régions
attributes: attributes:
id: ID id: ID