2012-03-15 13:53:36 +00:00
|
|
|
{
|
|
|
|
"sEcho": <%=h params[:sEcho].to_i || -1 %>,
|
|
|
|
"iTotalRecords": <%= @total_projects %>,
|
|
|
|
"iTotalDisplayRecords": <%= @total_project %>,
|
|
|
|
"aaData": [
|
|
|
|
<% @projects.each do |project| %>
|
|
|
|
[
|
|
|
|
"<%=(
|
|
|
|
"<div class='table-sort-left'>" +
|
|
|
|
j(image_tag(visibility_icon(project.visibility))) +
|
|
|
|
"</div>" +
|
|
|
|
"<div class='table-sort-right'>" +
|
|
|
|
j(link_to("#{project.owner.respond_to?(:uname) ? project.owner.uname : project.owner.name} / #{project.name}", project)) +
|
|
|
|
"</div>").html_safe
|
|
|
|
%>",
|
2012-03-23 22:48:15 +00:00
|
|
|
"<%= truncate(project.description || '', :length => 60).gsub("\n", ' ').gsub("\r", ' ') %>",
|
2012-03-15 13:53:36 +00:00
|
|
|
"<%=
|
2012-03-15 22:56:12 +00:00
|
|
|
if can? :remove_project, @repository
|
|
|
|
j(link_to('<span class="delete"> </span>'.html_safe,
|
2012-03-31 00:37:54 +01:00
|
|
|
remove_project_platform_repository_path(@platform, @repository, :project_id => project.id),
|
2012-03-15 22:56:12 +00:00
|
|
|
:method => :delete, :confirm => t("layout.confirm")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
else
|
|
|
|
''
|
|
|
|
end
|
2012-03-15 13:53:36 +00:00
|
|
|
%>"
|
|
|
|
]<%= project == @projects.last ? '' : ',' %>
|
|
|
|
<% end %>
|
|
|
|
]
|
|
|
|
}
|