From 7031620e9dfceb7719da5952f950a92f62faf359 Mon Sep 17 00:00:00 2001 From: echarp Date: Sun, 29 Dec 2013 16:47:57 +0100 Subject: [PATCH] =?UTF-8?q?Le=20s=C3=A9lecteur=20de=20r=C3=A9gion=20est=20?= =?UTF-8?q?plus=20simple?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/events.js.coffee | 2 +- app/assets/stylesheets/all.css.sass | 2 ++ app/assets/stylesheets/events.css.sass | 6 ++++-- app/views/events/index.html.haml | 5 +++++ app/views/layouts/application.html.haml | 18 ++++++++---------- config/routes.rb | 1 + 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/events.js.coffee b/app/assets/javascripts/events.js.coffee index 9a42dfb2..7b3312a7 100644 --- a/app/assets/javascripts/events.js.coffee +++ b/app/assets/javascripts/events.js.coffee @@ -4,4 +4,4 @@ # $(document).ready -> $('form.region_selector select').change -> - window.location='?year=2013&month=12®ion=' + this.options[this.selectedIndex].value + this.form.submit() diff --git a/app/assets/stylesheets/all.css.sass b/app/assets/stylesheets/all.css.sass index 04e70b35..11baa7fc 100644 --- a/app/assets/stylesheets/all.css.sass +++ b/app/assets/stylesheets/all.css.sass @@ -65,7 +65,9 @@ main h1 margin-top: 1em footer.bottom nav + margin: 29px auto -3px font-size: smaller a + a:before color: black content: '- ' + font-weight: normal diff --git a/app/assets/stylesheets/events.css.sass b/app/assets/stylesheets/events.css.sass index b314a495..41819fbd 100644 --- a/app/assets/stylesheets/events.css.sass +++ b/app/assets/stylesheets/events.css.sass @@ -2,6 +2,8 @@ form.region_selector width: 98.3% position: absolute margin-top: 2.6em + label + display: none main form.region_selector + h2 margin-top: 1.1em @@ -73,7 +75,7 @@ table.calendar color: black .formats - width: 95% + width: 90% + margin: 10px auto 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 d055762d..9c653245 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -1,4 +1,9 @@ %form.region_selector + - if (params[:month]) + = hidden_field_tag :month, params[:month] + - if (params[:year]) + = hidden_field_tag :year, params[:year] + = label_tag :region, Region.model_name.human = select_tag :region, options_from_collection_for_select(Region.all, 'id', 'name', params[:region]), prompt: t('region_selector') diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index bf771f88..969c4d4a 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -59,13 +59,11 @@ %footer.bottom %nav = link_to t('.propose'), new_event_path - -#= link_to t('.rss'), users_url - -#= link_to t('.ical'), users_url - -#= link_to t('.map'), users_url - -#= link_to t('.tags'), users_url - -#= link_to t('.infos'), users_url - -#= link_to t('.stats'), users_url - -#= link_to t('.contact'), users_url - -#= link_to t('.moderation'), users_url - -#= link_to t('.forge'), 'http://rubyforge.org/projects/parlement' - -#= link_to t('.agpl'), 'http://www.gnu.org/licenses/agpl.html' + = link_to t('.rss'), users_url + = link_to t('.ical'), users_url + = link_to t('.map'), users_url + = link_to t('.tags'), users_url + = link_to t('.infos'), users_url + = link_to t('.stats'), users_url + = link_to t('.contact'), users_url + = link_to t('.moderation'), users_url diff --git a/config/routes.rb b/config/routes.rb index 47b74cf8..763b6b3d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,6 @@ AgendaDuLibreRails::Application.routes.draw do resources :events + resources :users devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self)