form: don't display index if the libelle already starts with a number

This commit is contained in:
Pierre de La Morinerie 2020-02-13 11:18:00 +01:00
parent f8ed7ec051
commit 838133477e

View file

@ -1,2 +1,5 @@
%h2.header-section
= "#{champ.section_index}. #{champ.libelle}"
- libelle_starts_with_number = (champ.libelle =~ /^\d/)
- if !libelle_starts_with_number
= "#{champ.section_index}."
= champ.libelle