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

Slightly better looking region selector

parent 73d3aa24
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 93329 ajouts et 16 suppressions
...@@ -66,7 +66,7 @@ GEM ...@@ -66,7 +66,7 @@ GEM
bundler (~> 1.2) bundler (~> 1.2)
thor (~> 0.18) thor (~> 0.18)
byebug (9.1.0) byebug (9.1.0)
coderay (1.1.1) coderay (1.1.2)
coffee-rails (4.2.2) coffee-rails (4.2.2)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0) railties (>= 4.0.0)
...@@ -145,7 +145,7 @@ GEM ...@@ -145,7 +145,7 @@ GEM
guard-rubocop (1.3.0) guard-rubocop (1.3.0)
guard (~> 2.0) guard (~> 2.0)
rubocop (~> 0.20) rubocop (~> 0.20)
haml (5.0.2) haml (5.0.3)
temple (>= 0.8.0) temple (>= 0.8.0)
tilt tilt
haml-rails (1.0.0) haml-rails (1.0.0)
...@@ -232,7 +232,7 @@ GEM ...@@ -232,7 +232,7 @@ GEM
mini_portile2 (2.2.0) mini_portile2 (2.2.0)
minitest (5.10.3) minitest (5.10.3)
modernizr-rails (2.7.1) modernizr-rails (2.7.1)
multi_json (1.12.1) multi_json (1.12.2)
multipart-post (2.0.0) multipart-post (2.0.0)
mysql2 (0.4.9) mysql2 (0.4.9)
naught (1.1.0) naught (1.1.0)
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
.radios .radios
display: inline-block display: inline-block
text-align: left text-align: left
margin-left: -0.5em
background-color: white background-color: white
label label
display: none display: none
......
:ruby %li{ class: params[:region].to_i == filter_region.id ? 'selected' : '' }
selected = params[:region].to_i == filter_region.id
regions = Region.where(region: filter_region)
%li{ class: selected ? 'selected' : '' }
- if filter_region.url.present? - if filter_region.url.present?
= link_to filter_region.url do = link_to filter_region.url do
= flag_icon filter_region.code.try :downcase - if filter_region.code.present?
= flag_icon filter_region.code.try :downcase
= filter_region.name = filter_region.name
%small %small
%em.fa.fa-external-link %em.fa.fa-external-link
...@@ -14,14 +11,14 @@ ...@@ -14,14 +11,14 @@
start_date: params[:start_date], start_date: params[:start_date],
year: params[:year], year: params[:year],
tag: params[:tag] do tag: params[:tag] do
- if filter_region.region.nil? - if filter_region.code.present?
= flag_icon filter_region.code.try :downcase = flag_icon filter_region.code.try :downcase
- else - else
%em.fa.fa-shield %em.fa.fa-shield
= filter_region.name = filter_region.name
- if regions.present? - if filter_region.regions.present?
%small %small
%em.fa.fa-chevron-down %em.fa.fa-chevron-down
%ul %ul
= render partial: '/regions/filter_region', = render partial: '/regions/filter_region',
collection: regions collection: filter_region.regions
.radios= render partial: '/regions/selector_region', .radios= render partial: '/regions/selector_region',
collection: Region.where.not(code: nil), collection: Region.where(region: nil, url: ''),
locals: { f: f } locals: { f: f }
- if selector_region.regions.present? || selector_region.url.blank? - if selector_region.regions.present? || selector_region.url.blank?
%span.region %span.region{ title: selector_region }
= f.radio_button :region_id, selector_region.id = f.radio_button :region_id, selector_region.id
= f.label "region_id_#{selector_region.id}" do = f.label "region_id_#{selector_region.id}" do
= flag_icon selector_region.code.try :downcase = flag_icon selector_region.code.try :downcase
......
Impossible d'afficher diff de source : il est trop volumineux. Options pour résoudre ce problème : voir le blob.
Fichier ajouté
(function() {
$(document).on('turbolinks:load', function() {
return tinyMCE.init({
schema: 'html5',
height: '40em',
menubar: false,
branding: false,
language: 'fr_FR',
selector: 'input.description',
content_css: '/assets/application-26ecba5fa6547e958c0e5723a2881e60515a876806ec20146885f0220767e808.css',
entity_encoding: 'raw',
add_unload_trigger: true,
browser_spellcheck: true,
toolbar: [' cut copy paste | undo redo | searchreplace | link image media charmap table | code visualblocks preview fullscreen', ' removeformat | bold italic strikethrough | superscript subscript | bullist numlist | alignleft aligncenter alignright alignjustify alignnone | outdent indent'],
plugins: 'lists, advlist, autolink, link, image, charmap, paste, print, preview, table, fullscreen, searchreplace, media, insertdatetime, visualblocks, wordcount, contextmenu, code'
});
});
$(document).on('turbolinks:before-cache', function() {
return tinymce.remove();
});
}).call(this);
Fichier ajouté
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