Recherche d'asso mieux placée

This commit is contained in:
echarp 2014-07-27 16:42:40 +02:00
parent 3ef38eafd2
commit fac7eaeaa3
7 changed files with 84 additions and 58 deletions

View File

@ -95,8 +95,7 @@ header.top
#banner img #banner img
height: auto height: auto
main main *
*
max-width: 80em max-width: 80em
h1 h1
margin: 10px auto 5px auto margin: 10px auto 5px auto

View File

@ -1,6 +1,32 @@
@import "compass" @import "compass"
header
form#lug_search
top: 6em
right: 2em
position: absolute
font-size: x-large
h2
margin: 0
font-size: x-large
font-style: normal
label
display: none
input
border: solid thin #258
img.favicon img.favicon
max-height: 2em max-height: 2em
vertical-align: middle vertical-align: middle
@include border-radius(3px) @include border-radius(3px)
button.search
color: #258
border: none
cursor: pointer
font-size: x-large
margin-top: 0.2em
margin-left: -1.3em
background-color: transparent
&:hover
color: #2E97FF

View File

@ -4,9 +4,6 @@ class EventsController < ApplicationController
before_filter :set_mailer_host before_filter :set_mailer_host
def index def index
# So we can use the search form from the central calendar page
@search = Lug.search params[:q]
@events = Event.moderated @events = Event.moderated
if params[:region] && params[:region].present? && params[:region] != 'all' if params[:region] && params[:region].present? && params[:region] != 'all'
@events = @events.region params[:region] @events = @events.region params[:region]

View File

@ -54,5 +54,3 @@
tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])), tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])),
ical: link_to('iCal', events_url(:rss, ical: link_to('iCal', events_url(:rss,
tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region])) tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region]))
= render '/lugs/search'

View File

@ -37,6 +37,8 @@
= image_tag 'suisse.png', alt: '' = image_tag 'suisse.png', alt: ''
=t '.suisse' =t '.suisse'
= render '/lugs/search' unless controller.controller_name == 'lugs'
%h1= link_to t('.title'), root_url %h1= link_to t('.title'), root_url
%h2=t '.subtitle' %h2=t '.subtitle'

View File

@ -1,9 +1,13 @@
- # So we can use the search form from any page
- @search = Lug.search params[:q] unless @search
= search_form_for @search do |f|
= link_to lugs_path do = link_to lugs_path do
%h2 %h2
%em.fa.fa-users %em.fa.fa-users
= title t '.title', entity: Lug.model_name.human = title t '.title', entity: Lug.model_name.human
= search_form_for @search do |f|
= f.label :name_cont = f.label :name_cont
= f.search_field :name_cont = f.search_field :name_or_city_or_department_or_region_or_url_cont, size: 14
= f.submit = f.button class: :search do
%em.fa.fa-search

View File

@ -23,7 +23,7 @@ fr:
models: models:
event: Événement event: Événement
user: Modérateur user: Modérateur
lug: Gull lug: Asso
city: Ville city: Ville
region: Région region: Région
admin_user: Admin admin_user: Admin
@ -118,7 +118,7 @@ fr:
all_regions: Toutes les régions all_regions: Toutes les régions
nb_events: "%{count} événements" nb_events: "%{count} événements"
show: show:
lug-list: Groupes d'utilisateurs de la région lug-list: Asso de la région
add_to_calendar: Ajouter à mon calendrier add_to_calendar: Ajouter à mon calendrier
at: À at: À
dateAndPlace: Date et lieu dateAndPlace: Date et lieu
@ -239,7 +239,7 @@ Exemple: `%{daylimit}`"
index: index:
title: Carte des événements title: Carte des événements
events: Événements events: Événements
lugs: Lugs lugs: Asso
users: users:
sign_in: sign_in:
title: Identification title: Identification