diff --git a/app/assets/javascripts/events.js.coffee b/app/assets/javascripts/events.js.coffee index 24f83d18..9a42dfb2 100644 --- a/app/assets/javascripts/events.js.coffee +++ b/app/assets/javascripts/events.js.coffee @@ -1,3 +1,7 @@ # Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ +# +$(document).ready -> + $('form.region_selector select').change -> + window.location='?year=2013&month=12®ion=' + this.options[this.selectedIndex].value diff --git a/app/assets/stylesheets/events.css.sass b/app/assets/stylesheets/events.css.sass index 587cec12..4919543d 100644 --- a/app/assets/stylesheets/events.css.sass +++ b/app/assets/stylesheets/events.css.sass @@ -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 a font-weight: normal @@ -18,7 +23,7 @@ table.calendar text-transform: capitalize td width: 14% !important - height: 6em + height: 4.8em border: 1px solid #89B7E5 vertical-align: top background-color: #A1C3E7 @@ -30,6 +35,12 @@ table.calendar .event a:link, a:visited color: #888 + &.today + border: 1px solid #FFB578 + background-color: #ffe0c7 + .day_number + color: #544f32 + font-size: 0.8em .day_number float: left @@ -60,7 +71,7 @@ table.calendar color: black .formats - width: 99% + width: 95% font-size: smaller margin-top: 10px text-align: right diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index b912c236..d055762d 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -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, params: { region: params[:region] } } do |event| %ul.events diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 047524c3..c3b42ee7 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -15,7 +15,7 @@ %meta(name='dcterms.title' content='Agenda du Libre' lang='fr') %meta(name='dcterms.subject' content='agenda') - = favicon_link_tag + %link(rel='shortcut icon' href='/favicon.ico') = auto_discovery_link_tag :atom, { format: :atom } = stylesheet_link_tag 'application', media: "all", "data-turbolinks-track" => true diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 3e5db43c..71daeb14 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -2,6 +2,7 @@ fr: show: Voir edit: Éditer destroy: Supprimer + region_selector: Toutes les régions attributes: id: ID