fix(admin): go to the right tab when click on breadcrumb link
This commit is contained in:
parent
93de4cf821
commit
8c173e45bf
13 changed files with 28 additions and 12 deletions
|
@ -66,4 +66,20 @@ module ProcedureHelper
|
|||
minutes = (seconds / 60.0).round
|
||||
[1, minutes].max
|
||||
end
|
||||
|
||||
def admin_procedures_back_path(procedure)
|
||||
statut = if procedure.discarded?
|
||||
'supprimees'
|
||||
else
|
||||
case procedure.aasm_state
|
||||
when 'brouillon'
|
||||
'brouillons'
|
||||
when 'close', 'depubliee'
|
||||
'archivees'
|
||||
else
|
||||
'publiees'
|
||||
end
|
||||
end
|
||||
admin_procedures_path(statut:)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue