Show the reason on deleted dossiers
This commit is contained in:
parent
7a8936eacb
commit
ec1cd989ab
3 changed files with 30 additions and 2 deletions
|
@ -89,6 +89,18 @@ module DossierHelper
|
|||
content_tag(:span, status_text, class: "label #{status_class} ")
|
||||
end
|
||||
|
||||
def deletion_reason_badge(reason)
|
||||
if reason.present?
|
||||
status_text = I18n.t(reason, scope: [:activerecord, :attributes, :deleted_dossier, :reason])
|
||||
status_class = reason.tr('_', '-')
|
||||
else
|
||||
status_text = I18n.t(:unknown, scope: [:activerecord, :attributes, :deleted_dossier, :reason])
|
||||
status_class = 'unknown'
|
||||
end
|
||||
|
||||
content_tag(:span, status_text, class: "label #{status_class} ")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def dinum_instance?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue