Le sélecteur de région est plus simple

This commit is contained in:
echarp 2013-12-29 16:47:57 +01:00
parent 6003770813
commit 7031620e9d
6 changed files with 21 additions and 13 deletions

View File

@ -4,4 +4,4 @@
#
$(document).ready ->
$('form.region_selector select').change ->
window.location='?year=2013&month=12&region=' + this.options[this.selectedIndex].value
this.form.submit()

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -1,5 +1,6 @@
AgendaDuLibreRails::Application.routes.draw do
resources :events
resources :users
devise_for :admin_users, ActiveAdmin::Devise.config
ActiveAdmin.routes(self)