demarches-normaliennes/app/views/instructeurs/procedures/_header_field.html.haml
mfo b3cb3e974e
refactor(Facet): extract Facet from ProcedurePresentation
Co-Authored-By: LeSim <mail@simon.lehericey.net>

clean(code): no comment 🎶
2024-08-19 15:27:39 +02:00

9 lines
520 B
Text

%th{ @procedure_presentation.aria_sort(@procedure_presentation.sort['order'], field), scope: "col", class: field.classname }
= link_to update_sort_instructeur_procedure_path(@procedure, table: field.table, column: field.column, order: @procedure_presentation.opposite_order_for(field.table, field.column)) do
- if @procedure_presentation.sortable?(field)
- if @procedure_presentation.sort['order'] == 'asc'
#{field.label} ↑
- else
#{field.label} ↓
- else
#{field.label}