mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-08 22:14:04 +08:00
init project
This commit is contained in:
18
app/views/attachments/_attachment.json.jbuilder
Normal file
18
app/views/attachments/_attachment.json.jbuilder
Normal file
@@ -0,0 +1,18 @@
|
||||
json.id attachment.id
|
||||
json.title attachment.title
|
||||
json.is_public attachment.publiced?
|
||||
# json.is_lock attachment.locked?(@is_member)
|
||||
json.is_lock !attachment.publiced?
|
||||
json.is_publish attachment.published?
|
||||
json.delay_publish attachment.delay_publish
|
||||
json.publish_time attachment.publish_time
|
||||
json.unified_setting attachment.unified_setting
|
||||
json.filesize number_to_human_size(attachment.filesize)
|
||||
# json.quotes attachment.quotes_count
|
||||
json.description attachment.description
|
||||
json.downloads_count attachment.downloads_count
|
||||
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))
|
||||
8
app/views/attachments/_attachment_simple.json.jbuilder
Normal file
8
app/views/attachments/_attachment_simple.json.jbuilder
Normal file
@@ -0,0 +1,8 @@
|
||||
json.id attachment.id
|
||||
json.title attachment.title
|
||||
json.filesize number_to_human_size attachment.filesize
|
||||
json.description attachment.description
|
||||
json.is_pdf attachment.is_pdf?
|
||||
json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment)
|
||||
# json.url download_url(attachment)
|
||||
json.set! :delete, delete.nil? ? true : delete if defined? delete
|
||||
7
app/views/attachments/_attachment_small.json.jbuilder
Normal file
7
app/views/attachments/_attachment_small.json.jbuilder
Normal file
@@ -0,0 +1,7 @@
|
||||
json.id attachment.id
|
||||
json.title attachment.title
|
||||
json.filesize number_to_human_size(attachment.filesize)
|
||||
json.is_pdf attachment.is_pdf?
|
||||
json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment)
|
||||
json.created_on attachment.created_on
|
||||
json.content_type attachment.content_type
|
||||
2
app/views/attachments/create.json.jbuilder
Normal file
2
app/views/attachments/create.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
||||
json.id @attachment.id
|
||||
json.filesize @attachment.filesize
|
||||
Reference in New Issue
Block a user