mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-16 09:45:57 +08:00
[ADD]组织项目相关
This commit is contained in:
7
app/views/organizations/projects/index.json.jbuilder
Normal file
7
app/views/organizations/projects/index.json.jbuilder
Normal file
@@ -0,0 +1,7 @@
|
||||
json.total_count @projects.total_count
|
||||
json.projects @projects.each do |project|
|
||||
json.(project, :name, :identifier, :description, :forked_count, :praises_count)
|
||||
json.praised project.praised_by?(current_user)
|
||||
json.last_update_time render_unix_time(project.updated_on)
|
||||
json.time_ago time_from_now(project.updated_on)
|
||||
end
|
||||
7
app/views/owners/index.json.jbuilder
Normal file
7
app/views/owners/index.json.jbuilder
Normal file
@@ -0,0 +1,7 @@
|
||||
json.total_count @owners.size
|
||||
json.owners @owners.each do |owner|
|
||||
json.id owner.id
|
||||
json.type owner.type
|
||||
json.name owner.login
|
||||
json.avatar_url url_to_avatar(owner)
|
||||
end
|
||||
4
app/views/projects/teams/index.json.jbuilder
Normal file
4
app/views/projects/teams/index.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.total_count @teams.total_count
|
||||
json.teams @teams.each do |team|
|
||||
json.(team, :id, :name, :authorize)
|
||||
end
|
||||
Reference in New Issue
Block a user