2014-10-30 18:07:43 +00:00
|
|
|
json.total_items @total_items
|
|
|
|
|
2014-10-28 23:04:45 +00:00
|
|
|
json.projects @projects do |project|
|
2015-03-19 17:24:54 +00:00
|
|
|
json.id project.id
|
2014-10-28 23:04:45 +00:00
|
|
|
json.visibility_class fa_visibility_icon(project)
|
|
|
|
json.path project_path(project.name_with_owner)
|
|
|
|
json.name project.name_with_owner
|
|
|
|
json.description truncate(project.description || '', length: 60).gsub(/\n|\r|\t/, ' ')
|
2015-03-14 22:10:04 +00:00
|
|
|
if policy(@repository).remove_project?
|
2014-10-28 23:04:45 +00:00
|
|
|
json.remove_path remove_project_platform_repository_path(@platform, @repository, project_id: project.id)
|
|
|
|
end
|
|
|
|
end
|