Skip to content
Extraits de code Groupes Projets
Valider 61fe1dd5 rédigé par echarp's avatar echarp
Parcourir les fichiers

Add Luxembourg and Tunisia

parent 1a1dd930
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -25,7 +25,7 @@ html ...@@ -25,7 +25,7 @@ html
padding: 0 padding: 0
background-color: transparent background-color: transparent
& > header, & > footer, & > header, & > footer,
h2, nav, .region_selector, .orga_search, .formats, #banner h2, nav, .region_filter, .orga_search, .formats, #banner
display: none display: none
ul ul
margin: 0 margin: 0
......
.region_selector .region_filter
float: right float: right
font-size: smaller font-size: smaller
& > ul > li & > ul > li
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
input:checked + label input:checked + label
display: inline display: inline
padding: 0.5em padding: 0.5em
&:hover .radios .region:hover .radios
z-index: 1000 z-index: 1000
position: absolute position: absolute
box-shadow: 0 4px 4px gray box-shadow: 0 4px 4px gray
......
-# Choose a region to filter events with -# Choose a region to filter events with
%nav.region_selector %nav.region_filter
%ul= render partial: '/regions/filter_region', %ul= render partial: '/regions/filter_region',
collection: Region.where(region: nil) collection: Region.where(region: nil)
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
start_date: params[:start_date], start_date: params[:start_date],
year: params[:year], year: params[:year],
tag: params[:tag] do tag: params[:tag] do
%em.fa.fa-shield - if filter_region.region.nil?
= flag_icon filter_region.code.try :downcase
- else
%em.fa.fa-shield
= filter_region.name = filter_region.name
%ul %ul
= render partial: '/regions/filter_region', = render partial: '/regions/filter_region',
......
- if selector_region.regions.present? || selector_region.url.nil? - if selector_region.regions.present? || selector_region.url.blank?
= flag_icon selector_region.code.try :downcase %span.region
= selector_region = f.radio_button :region_id, selector_region.id
%em.fa.fa-chevron-right = f.label "region_id_#{selector_region.id}" do
.radios= f.collection_radio_buttons :region_id, = flag_icon selector_region.code.try :downcase
Region.where(region: selector_region), :id, :name = selector_region
- if selector_region.regions.present?
%em.fa.fa-chevron-right
.radios
= f.collection_radio_buttons :region_id,
Region.where(region: selector_region), :id, :name
# Add the new countries Luxembourg and Tunisia
class AddLuAndTn < ActiveRecord::Migration
def self.up
say 'Creates LU and TN regions'
return if Region.exists? name: 'Luxembourg'
[
{ name: 'Luxembourg', code: :LU, url: '//www.agendadulibre.org' },
{ name: 'Tunisie', code: :TN, url: '//www.agendadulibre.org' }
].each { |country| Region.create country }
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170508142601) do ActiveRecord::Schema.define(version: 20170701161358) do
create_table "active_admin_comments", force: :cascade do |t| create_table "active_admin_comments", force: :cascade do |t|
t.string "namespace" t.string "namespace"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter