2019-03-01 17:16:56 +01:00
|
|
|
.piece-justificative
|
|
|
|
- if pj.attached?
|
|
|
|
.piece-justificative-actions{ id: "piece_justificative_#{object.id}" }
|
|
|
|
.piece-justificative-action
|
2019-05-21 14:21:13 +02:00
|
|
|
= render partial: "shared/attachment/show", locals: { attachment: pj.attachment, user_can_upload: true }
|
2019-03-01 17:16:56 +01:00
|
|
|
.piece-justificative-action
|
|
|
|
= button_tag 'Remplacer', type: 'button', class: 'button small', data: { 'toggle-target': "#champs_#{object.id}" }
|
|
|
|
|
|
|
|
= form.file_field :piece_justificative_file,
|
|
|
|
id: "champs_#{object.id}",
|
|
|
|
class: "piece-justificative-input #{'hidden' if pj.attached?}",
|
|
|
|
direct_upload: true
|