2019-11-07 16:08:14 +00:00
|
|
|
%tr{ id: attribute }
|
|
|
|
%th= post_label_t(attribute, :path, post: post)
|
|
|
|
%td
|
|
|
|
- if metadata.value['path'].present?
|
2020-09-01 21:49:01 +00:00
|
|
|
- case metadata.static_file.blob.content_type
|
|
|
|
- when %r{\Avideo/}
|
|
|
|
= video_tag url_for(metadata.static_file),
|
|
|
|
controls: true, class: 'img-fluid'
|
|
|
|
- when %r{\Aaudio/}
|
|
|
|
= audio_tag url_for(metadata.static_file),
|
|
|
|
controls: true, class: 'img-fluid'
|
|
|
|
- when 'application/pdf'
|
|
|
|
%iframe{ src: url_for(metadata.static_file) }
|
|
|
|
- else
|
|
|
|
= link_to t('.download'),
|
|
|
|
url_for(metadata.static_file)
|
2020-05-23 18:42:12 +00:00
|
|
|
%p{ dir: dir, lang: locale }= metadata.value['description']
|