, projects.ptype AS project_type
, projects.id AS project_id
, users.email AS maintainer
+ , project_gits.git_repos AS git_repos
+ , project_gits.git_branch AS git_branch
FROM projects
- LEFT JOIN users
+ LEFT JOIN users
ON users.id = projects.user_id
+ LEFT JOIN project_gits
+ ON projects.id = project_gits.project_id
WHERE projects.distribution_id = #{dist_id}
ORDER BY projects.name")
doc.Type(project.project_type)
doc.Maintainer(project.maintainer)
+ if project.project_type.eql? "GIT" then
+ doc.GitAddress(project.git_repos)
+ doc.GitBranch(project.git_branch)
+ end
+
if checkUserAccessProject(user_id, project.project_id)
doc.GroupAccess("TRUE")
else
var type = project.find("Type").text();
var groupAccess = project.find("GroupAccess").text();
var maintainer = project.find("Maintainer").text();
+ var git_address = project.find("GitAddress").text();
+ var git_branch = project.find("GitBranch").text();
var div = document.createElement('div');
div.setAttribute('data-role', 'collapsible');
var infoLine = document.createElement('p');
infoLine.setAttribute('style', 'font-size: 12px');
- infoLine.innerHTML = "Maintainer : "+maintainer+"<br><br>";
+ infoLine.innerHTML = "Maintainer: <b>"+maintainer+"</b><br><br>";
+ if(type === "GIT") {
+ infoLine.innerHTML += "Git address: <b>"+git_address+"</b><br><br>";
+ infoLine.innerHTML += "Git branch: <b>"+git_branch+"</b><br><br>";
+ }
div.appendChild(infoLine);
var ul = document.createElement('ul');