|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
json.id attachment.id
|
|
|
|
|
json.title attachment.title
|
|
|
|
|
json.link attachment.link
|
|
|
|
|
json.is_public attachment.publiced?
|
|
|
|
|
# json.is_lock attachment.locked?(@is_member)
|
|
|
|
|
json.is_lock !attachment.publiced?
|
|
|
|
@ -15,4 +16,4 @@ json.created_on attachment.created_on
|
|
|
|
|
json.content_type attachment.content_type
|
|
|
|
|
json.is_pdf attachment.is_pdf?
|
|
|
|
|
json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment)
|
|
|
|
|
json.play_url attachment_show_users_path(file_name: local_path(attachment))
|
|
|
|
|
json.play_url attachment.link.present? ? nil : attachment_show_users_path(file_name: local_path(attachment))
|
|
|
|
|