feat(piece_justificative): supports multiple files

Closes #7924
This commit is contained in:
Colin Darie 2022-10-25 14:14:24 +02:00
parent ab1928dc33
commit b8296c6d4d
17 changed files with 242 additions and 78 deletions

View file

@ -7,9 +7,9 @@ module ChampHelper
simple_format(auto_linked_text, {}, sanitize: false)
end
def auto_attach_url(object)
def auto_attach_url(object, url_options = {})
if object.is_a?(Champ)
champs_piece_justificative_url(object.id)
champs_piece_justificative_url(object.id, url_options)
elsif object.is_a?(TypeDeChamp)
piece_justificative_template_admin_procedure_type_de_champ_url(stable_id: object.stable_id, procedure_id: object.procedure.id)
end