diff options
| author | Zog | 2018-05-03 16:42:28 +0200 |
|---|---|---|
| committer | Zog | 2018-05-03 16:42:28 +0200 |
| commit | 581dbb024db288dc70713af3c5b5052b453412a9 (patch) | |
| tree | e157880fe365b853659fa0fae95aef91d74ae756 /app/views | |
| parent | db65c0ffc7ccc76a144689ec3db43fbc2e61ee82 (diff) | |
| download | chouette-core-6092-update-custom-fields.tar.bz2 | |
Refs #6092; Add specs on CustomlFields6092-update-custom-fields
- Show validation errors on fields
- Smarter attachments
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/shared/custom_fields/_attachment.html.slim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/shared/custom_fields/_attachment.html.slim b/app/views/shared/custom_fields/_attachment.html.slim index 32d0fda4d..13714d239 100644 --- a/app/views/shared/custom_fields/_attachment.html.slim +++ b/app/views/shared/custom_fields/_attachment.html.slim @@ -1,4 +1,10 @@ - if field.value.present? - = link_to I18n.t("custom_fields.#{field.owner.class.name.demodulize.underscore}.#{field.code}.link"), field.value.url + - if field.options["display_inline"] + - version = field.options["display_inline"].is_a?(String) && field.options["display_inline"] + = link_to field.value.url do + = image_tag version ? field.value.send(version).url : field.value.url, class: "custom_field_attachment" + - else + - label = field.options["label"] || I18n.t("custom_fields.#{field.owner.class.name.demodulize.underscore}.#{field.code}.link") + = link_to label, field.value.url - else = "-" |
