mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-04 12:14:37 +08:00
Add comments to the code [SCI-152]
This commit is contained in:
parent
344b9c290a
commit
7a61f5813c
4 changed files with 6 additions and 4 deletions
|
@ -77,8 +77,8 @@ class MyModuleCommentsController < ApplicationController
|
|||
}
|
||||
),
|
||||
date: @comment.created_at.strftime('%d.%m.%Y'),
|
||||
linked_id: @my_module.id,
|
||||
counter: @my_module.task_comments.count
|
||||
linked_id: @my_module.id, # Used for counter badge
|
||||
counter: @my_module.task_comments.count # Used for counter badge
|
||||
},
|
||||
status: :created
|
||||
end
|
||||
|
@ -155,6 +155,7 @@ class MyModuleCommentsController < ApplicationController
|
|||
module: @my_module.name
|
||||
)
|
||||
)
|
||||
# 'counter' and 'linked_id' are used for counter badge
|
||||
render json: { linked_id: @my_module.id,
|
||||
counter: @my_module.task_comments.count },
|
||||
status: :ok
|
||||
|
|
|
@ -146,6 +146,7 @@ class ProjectCommentsController < ApplicationController
|
|||
project: @project.name
|
||||
)
|
||||
)
|
||||
# 'counter' and 'linked_id' are used for counter badge
|
||||
render json: { linked_id: @project.id,
|
||||
counter: @project.project_comments.count },
|
||||
status: :ok
|
||||
|
|
|
@ -15,7 +15,7 @@ class UserMyModulesController < ApplicationController
|
|||
partial: 'index.html.erb'
|
||||
),
|
||||
my_module_id: @my_module.id,
|
||||
counter: @my_module.users.count
|
||||
counter: @my_module.users.count # Used for counter badge
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ class UserProjectsController < ApplicationController
|
|||
partial: 'index.html.erb'
|
||||
),
|
||||
project_id: @project.id,
|
||||
counter: @project.users.count
|
||||
counter: @project.users.count # Used for counter badge
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue