diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0c51ce5a7..9153b1911 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -9,12 +9,12 @@ module ApplicationHelper "background-image: url(#{image_path(unstable_env.to_s + '.png')});" end - def ident_indicator(contact) + def ident_for(contact) case contact.ident_type when 'birthday' - "[#{contact.ident_type}]" + "#{contact.ident} [#{contact.ident_type}]" else - "[#{contact.ident_country_code} #{contact.ident_type}]" + "#{contact.ident} [#{contact.ident_country_code} #{contact.ident_type}]" end end end diff --git a/app/views/admin/contacts/index.haml b/app/views/admin/contacts/index.haml index afc2bba35..e25620663 100644 --- a/app/views/admin/contacts/index.haml +++ b/app/views/admin/contacts/index.haml @@ -1,6 +1,6 @@ .row .col-sm-12 - %h2.text-center-xs= t('contacts') + %h2.text-center-xs= t(:contacts) %hr .row .col-md-12 @@ -35,7 +35,7 @@ - @contacts.each do |contact| %tr %td= link_to(contact, admin_contact_path(contact)) - %td= "#{contact.ident} #{ident_indicator(contact)}" + %td= ident_for(contact) %td= contact.email %td= contact.code %td diff --git a/app/views/admin/contacts/partials/_general.haml b/app/views/admin/contacts/partials/_general.haml index 6fe250c2d..2504bbc97 100644 --- a/app/views/admin/contacts/partials/_general.haml +++ b/app/views/admin/contacts/partials/_general.haml @@ -4,7 +4,7 @@ .panel-body %dl.dl-horizontal %dt= t(:ident) - %dd= "#{@contact.ident} #{ident_indicator(@contact)}" + %dd= ident_for(@contact) %br