views: reduce nested flex containers in admin procedures list

We can achieve the same layout with fewer nested flex containers.
This commit is contained in:
Pierre de La Morinerie 2020-09-01 17:57:10 +02:00
parent e4a1b4a400
commit ae1f14a3f9
2 changed files with 12 additions and 9 deletions

View file

@ -0,0 +1,4 @@
// Push the timestamps column to the right of the row
.admin-procedures-list-timestamps {
margin-left: auto;
}

View file

@ -1,15 +1,14 @@
- procedures.each do |procedure|
.card
.flex.justify-between
.flex
- if procedure.logo.present?
= image_tag procedure.logo, alt: procedure.libelle, width: '100'
.flex.column.ml-1
.card-title
= link_to procedure.libelle, admin_procedure_path(procedure), style: 'color: black;'
= link_to(procedure_lien(procedure), procedure_lien(procedure), class: 'procedure-lien mb-1')
.flex
- if procedure.logo.present?
= image_tag procedure.logo, alt: procedure.libelle, width: '100'
.flex.column.ml-1
.card-title
= link_to procedure.libelle, admin_procedure_path(procedure), style: 'color: black;'
= link_to(procedure_lien(procedure), procedure_lien(procedure), class: 'procedure-lien mb-1')
%div
.admin-procedures-list-timestamps
%p.notice N° #{procedure.id}
%p.notice créée le #{procedure.created_at.strftime('%d/%m/%Y')}
- if procedure.published_at.present?