Skip to content
Snippets Groups Projects
Commit a41a4de8 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

info about project owner added

parent 9a36eeec
No related branches found
No related tags found
1 merge request!913Resolve "Add 'Created by' column in the Admin panel"
Pipeline #13206 failed
...@@ -10,6 +10,8 @@ minerva (14.0.0~beta.0) unstable; urgency=low ...@@ -10,6 +10,8 @@ minerva (14.0.0~beta.0) unstable; urgency=low
"View project" checkbox when editing privileges (#920) "View project" checkbox when editing privileges (#920)
* Small improvement: notification email uses minerva name and id of affected * Small improvement: notification email uses minerva name and id of affected
project (#926) project (#926)
* Small improvement: information about person who uploaded project is visible
in list of projects (#927)
* Bug fix: work on FF Private Window mode could cause logout or raise an * Bug fix: work on FF Private Window mode could cause logout or raise an
error on when opening new tab with minerva (#892) error on when opening new tab with minerva (#892)
* Bug fix: fetching list of miRnas resulted sometimes in "Internal Server * Bug fix: fetching list of miRnas resulted sometimes in "Internal Server
......
...@@ -127,6 +127,8 @@ MapsAdminPanel.prototype._createProjectTableRow = function () { ...@@ -127,6 +127,8 @@ MapsAdminPanel.prototype._createProjectTableRow = function () {
title: 'ProjectId' title: 'ProjectId'
}, { }, {
title: 'Created' title: 'Created'
}, {
title: 'Created by'
}, { }, {
title: 'Name' title: 'Name'
}, { }, {
...@@ -141,7 +143,7 @@ MapsAdminPanel.prototype._createProjectTableRow = function () { ...@@ -141,7 +143,7 @@ MapsAdminPanel.prototype._createProjectTableRow = function () {
title: 'Remove' title: 'Remove'
}], }],
columnDefs: [ columnDefs: [
{"orderable": false, "targets": [6, 7]} {"orderable": false, "targets": [7, 8]}
] ]
}); });
self.bindUserGuiPreference({ self.bindUserGuiPreference({
...@@ -261,9 +263,13 @@ MapsAdminPanel.prototype.projectToTableRow = function (project, row, user) { ...@@ -261,9 +263,13 @@ MapsAdminPanel.prototype.projectToTableRow = function (project, row, user) {
} }
row[1] = date; row[1] = date;
row[2] = project.getName(); row[2] = project.getName();
row[3] = disease; row[3] = project.getOwner();
row[4] = organism; if (row[3] === undefined) {
row[5] = status; row[3] = 'N/A';
}
row[4] = disease;
row[5] = organism;
row[6] = status;
var disabledEdit = " disabled "; var disabledEdit = " disabled ";
var disabledRemove = " disabled "; var disabledRemove = " disabled ";
...@@ -281,12 +287,12 @@ MapsAdminPanel.prototype.projectToTableRow = function (project, row, user) { ...@@ -281,12 +287,12 @@ MapsAdminPanel.prototype.projectToTableRow = function (project, row, user) {
disabledRemove = ""; disabledRemove = "";
} }
row[6] = "<button name='showEditDialog' data='" + project.getProjectId() + "'" + disabledEdit + "><i class='fa fa-edit' style='font-size:17px'></i></button>"; row[7] = "<button name='showEditDialog' data='" + project.getProjectId() + "'" + disabledEdit + "><i class='fa fa-edit' style='font-size:17px'></i></button>";
if (self.getConfiguration().getOption(ConfigurationType.DEFAULT_MAP).getValue() === projectId) { if (self.getConfiguration().getOption(ConfigurationType.DEFAULT_MAP).getValue() === projectId) {
disabledRemove = " disabled "; disabledRemove = " disabled ";
} }
row[7] = "<button name='removeProject' data='" + project.getProjectId() + "'" + disabledRemove + "><i class='fa fa-trash-o' style='font-size:17px'></button>"; row[8] = "<button name='removeProject' data='" + project.getProjectId() + "'" + disabledRemove + "><i class='fa fa-trash-o' style='font-size:17px'></button>";
return row; return row;
}; };
......
...@@ -70,6 +70,7 @@ Project.prototype.loadFromData = function (data) { ...@@ -70,6 +70,7 @@ Project.prototype.loadFromData = function (data) {
self.setTopOverviewImage(data.topOverviewImage); self.setTopOverviewImage(data.topOverviewImage);
self.setDisease(data.disease); self.setDisease(data.disease);
self.setOrganism(data.organism); self.setOrganism(data.organism);
self.setOwner(data.owner);
self.setStatus(data.status); self.setStatus(data.status);
self.setNotifyEmail(data.notifyEmail); self.setNotifyEmail(data.notifyEmail);
self.setProgress(data.progress); self.setProgress(data.progress);
...@@ -105,6 +106,7 @@ Project.prototype._update = function (data) { ...@@ -105,6 +106,7 @@ Project.prototype._update = function (data) {
self.setTopOverviewImage(data.getTopOverviewImage()); self.setTopOverviewImage(data.getTopOverviewImage());
self.setDisease(data.getDisease()); self.setDisease(data.getDisease());
self.setOrganism(data.getOrganism()); self.setOrganism(data.getOrganism());
self.setOwner(data.getOwner());
self.setStatus(data.getStatus()); self.setStatus(data.getStatus());
self.setProgress(data.getProgress()); self.setProgress(data.getProgress());
self.setNotifyEmail(data.getNotifyEmail()); self.setNotifyEmail(data.getNotifyEmail());
...@@ -378,6 +380,22 @@ Project.prototype.setStatus = function (status) { ...@@ -378,6 +380,22 @@ Project.prototype.setStatus = function (status) {
this._status = status; this._status = status;
}; };
/**
*
* @returns {string}
*/
Project.prototype.getOwner = function () {
return this._owner;
};
/**
*
* @param {string} owner
*/
Project.prototype.setOwner = function (owner) {
this._owner = owner;
};
/** /**
* *
* @returns {number} * @returns {number}
...@@ -603,5 +621,4 @@ Project.prototype.setCreationDate = function (creationDate) { ...@@ -603,5 +621,4 @@ Project.prototype.setCreationDate = function (creationDate) {
}; };
module.exports = Project; module.exports = Project;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment