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
padding: 0
background-color: transparent
& > header, & > footer,
h2, nav, .region_selector, .orga_search, .formats, #banner
h2, nav, .region_filter, .orga_search, .formats, #banner
display: none
ul
margin: 0
......
.region_selector
.region_filter
float: right
font-size: smaller
& > ul > li
......@@ -40,7 +40,7 @@
input:checked + label
display: inline
padding: 0.5em
&:hover .radios
.region:hover .radios
z-index: 1000
position: absolute
box-shadow: 0 4px 4px gray
......
-# Choose a region to filter events with
%nav.region_selector
%nav.region_filter
%ul= render partial: '/regions/filter_region',
collection: Region.where(region: nil)
......@@ -14,7 +14,10 @@
start_date: params[:start_date],
year: params[:year],
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
%ul
= render partial: '/regions/filter_region',
......
- if selector_region.regions.present? || selector_region.url.nil?
= flag_icon selector_region.code.try :downcase
= selector_region
%em.fa.fa-chevron-right
.radios= f.collection_radio_buttons :region_id,
Region.where(region: selector_region), :id, :name
- if selector_region.regions.present? || selector_region.url.blank?
%span.region
= f.radio_button :region_id, selector_region.id
= f.label "region_id_#{selector_region.id}" do
= flag_icon selector_region.code.try :downcase
= 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 @@
#
# 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|
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