diff --git a/app/assets/stylesheets/all.css.sass b/app/assets/stylesheets/all.css.sass index 203565f4..f38f3ca3 100644 --- a/app/assets/stylesheets/all.css.sass +++ b/app/assets/stylesheets/all.css.sass @@ -95,9 +95,8 @@ header.top #banner img height: auto -main - * - max-width: 80em +main * + max-width: 80em h1 margin: 10px auto 5px auto letter-spacing: 2px @@ -123,48 +122,48 @@ main hr margin: 10px 20px - label - text-align: right - padding-right: 0.4em - .mce-tinymce - border: 1px solid darkgray - @include box-shadow(1px 1px 2px lightgray) - @include border-radius(0.4em) +label + text-align: right + padding-right: 0.4em +.mce-tinymce + border: 1px solid darkgray + @include box-shadow(1px 1px 2px lightgray) + @include border-radius(0.4em) +input, textarea, select, a.button + color: black + margin: 3px 0 + border: 1px solid darkgray + padding: 2px 4px + font-size: inherit + font-family: inherit + background-color: white + @include box-shadow(1px 1px 2px lightgray) + @include border-radius(0.4em) + &:focus + background-color: #F0F8FF + &[type=submit], &.button + color: black + border: none + cursor: pointer + padding: 0.2em 0.6em + font-size: larger + line-height: 1.1em + font-weight: bolder + background-color: #9CC5EE + @include box-shadow(2px 2px 2px gray) +select, option + color: black + padding: 2px 4px + background-color: white + +button.ws-popover-opener + color: darkgray + background-color: transparent + +.field_with_errors + display: inline input, textarea, select, a.button - color: black - margin: 3px 0 - border: 1px solid darkgray - padding: 2px 4px - font-size: inherit - font-family: inherit - background-color: white - @include box-shadow(1px 1px 2px lightgray) - @include border-radius(0.4em) - &:focus - background-color: #F0F8FF - &[type=submit], &.button - color: black - border: none - cursor: pointer - padding: 0.2em 0.6em - font-size: larger - line-height: 1.1em - font-weight: bolder - background-color: #9CC5EE - @include box-shadow(2px 2px 2px gray) - select, option - color: black - padding: 2px 4px - background-color: white - - button.ws-popover-opener - color: darkgray - background-color: transparent - - .field_with_errors - display: inline - input, textarea, select, a.button - background-color: pink + background-color: pink /* input, textarea, select diff --git a/app/assets/stylesheets/lugs.sass b/app/assets/stylesheets/lugs.sass index 537cb9e8..88b0e017 100644 --- a/app/assets/stylesheets/lugs.sass +++ b/app/assets/stylesheets/lugs.sass @@ -1,6 +1,32 @@ @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 max-height: 2em vertical-align: middle @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 diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index 35322653..85a50a5a 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -4,9 +4,6 @@ class EventsController < ApplicationController before_filter :set_mailer_host def index - # So we can use the search form from the central calendar page - @search = Lug.search params[:q] - @events = Event.moderated if params[:region] && params[:region].present? && params[:region] != 'all' @events = @events.region params[:region] diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index 1a417217..720f74a4 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -54,5 +54,3 @@ tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])), ical: link_to('iCal', events_url(:rss, tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region])) - -= render '/lugs/search' diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 6d5f1cf5..a698101f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -37,6 +37,8 @@ = image_tag 'suisse.png', alt: '' =t '.suisse' + = render '/lugs/search' unless controller.controller_name == 'lugs' + %h1= link_to t('.title'), root_url %h2=t '.subtitle' diff --git a/app/views/lugs/_search.html.haml b/app/views/lugs/_search.html.haml index 93951505..acba4968 100644 --- a/app/views/lugs/_search.html.haml +++ b/app/views/lugs/_search.html.haml @@ -1,9 +1,13 @@ -= link_to lugs_path do - %h2 - %em.fa.fa-users - = title t '.title', entity: Lug.model_name.human +- # 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 + %h2 + %em.fa.fa-users + = title t '.title', entity: Lug.model_name.human + = f.label :name_cont - = f.search_field :name_cont - = f.submit + = f.search_field :name_or_city_or_department_or_region_or_url_cont, size: 14 + = f.button class: :search do + %em.fa.fa-search diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 0d8be790..d843eec2 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -23,7 +23,7 @@ fr: models: event: Événement user: Modérateur - lug: Gull + lug: Asso city: Ville region: Région admin_user: Admin @@ -118,7 +118,7 @@ fr: all_regions: Toutes les régions nb_events: "%{count} événements" show: - lug-list: Groupes d'utilisateurs de la région + lug-list: Asso de la région add_to_calendar: Ajouter à mon calendrier at: À dateAndPlace: Date et lieu @@ -239,7 +239,7 @@ Exemple: `%{daylimit}`" index: title: Carte des événements events: Événements - lugs: Lugs + lugs: Asso users: sign_in: title: Identification