Commit a41a4de8 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

info about project owner added

parent 9a36eeec
Pipeline #13206 failed with stage
in 15 minutes and 20 seconds
......@@ -10,6 +10,8 @@ minerva (14.0.0~beta.0) unstable; urgency=low
"View project" checkbox when editing privileges (#920)
* Small improvement: notification email uses minerva name and id of affected
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
error on when opening new tab with minerva (#892)
* Bug fix: fetching list of miRnas resulted sometimes in "Internal Server
......
......@@ -127,6 +127,8 @@ MapsAdminPanel.prototype._createProjectTableRow = function () {
title: 'ProjectId'
}, {
title: 'Created'
}, {
title: 'Created by'
}, {
title: 'Name'
}, {
......@@ -141,7 +143,7 @@ MapsAdminPanel.prototype._createProjectTableRow = function () {
title: 'Remove'
}],
columnDefs: [
{"orderable": false, "targets": [6, 7]}
{"orderable": false, "targets": [7, 8]}
]
});
self.bindUserGuiPreference({
......@@ -261,9 +263,13 @@ MapsAdminPanel.prototype.projectToTableRow = function (project, row, user) {
}
row[1] = date;
row[2] = project.getName();
row[3] = disease;
row[4] = organism;
row[5] = status;
row[3] = project.getOwner();
if (row[3] === undefined) {
row[3] = 'N/A';
}
row[4] = disease;
row[5] = organism;
row[6] = status;
var disabledEdit = " disabled ";
var disabledRemove = " disabled ";
......@@ -281,12 +287,12 @@ MapsAdminPanel.prototype.projectToTableRow = function (project, row, user) {
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) {
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;
};
......
......@@ -70,6 +70,7 @@ Project.prototype.loadFromData = function (data) {
self.setTopOverviewImage(data.topOverviewImage);
self.setDisease(data.disease);
self.setOrganism(data.organism);
self.setOwner(data.owner);
self.setStatus(data.status);
self.setNotifyEmail(data.notifyEmail);
self.setProgress(data.progress);
......@@ -105,6 +106,7 @@ Project.prototype._update = function (data) {
self.setTopOverviewImage(data.getTopOverviewImage());
self.setDisease(data.getDisease());
self.setOrganism(data.getOrganism());
self.setOwner(data.getOwner());
self.setStatus(data.getStatus());
self.setProgress(data.getProgress());
self.setNotifyEmail(data.getNotifyEmail());
......@@ -378,6 +380,22 @@ Project.prototype.setStatus = function (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}
......@@ -603,5 +621,4 @@ Project.prototype.setCreationDate = function (creationDate) {
};
module.exports = Project;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment