Add Luxembourg and Tunisia
This commit is contained in:
parent
1a1dd9306e
commit
61fe1dd547
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
.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
|
||||
|
@ -1,4 +1,4 @@
|
||||
-# 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',
|
||||
|
@ -1,6 +1,11 @@
|
||||
- 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
|
||||
|
11
db/migrate/20170701161358_add_lu_and_tn.rb
Normal file
11
db/migrate/20170701161358_add_lu_and_tn.rb
Normal file
@ -0,0 +1,11 @@
|
||||
# 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"
|
||||
|
Loading…
Reference in New Issue
Block a user