diff options
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/ColorModel.php | 2 | ||||
-rw-r--r-- | app/Model/ProjectModel.php | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/app/Model/ColorModel.php b/app/Model/ColorModel.php index 2295bd1f..7e166124 100644 --- a/app/Model/ColorModel.php +++ b/app/Model/ColorModel.php @@ -223,7 +223,7 @@ class ColorModel extends Base $buffer .= 'border-color: '.$values['border']; $buffer .= '}'; $buffer .= 'td.color-'.$color.' { background-color: '.$values['background'].'}'; - $buffer .= '.task-list-row.color-'.$color.' {border-left: 5px solid '.$values['border'].'}'; + $buffer .= '.table-list-row.color-'.$color.' {border-left: 5px solid '.$values['border'].'}'; } return $buffer; diff --git a/app/Model/ProjectModel.php b/app/Model/ProjectModel.php index b88a8c8b..aa7c002d 100644 --- a/app/Model/ProjectModel.php +++ b/app/Model/ProjectModel.php @@ -318,6 +318,26 @@ class ProjectModel extends Base } /** + * Get query for list of project without column statistics + * + * @access public + * @param array $projectIds + * @return \PicoDb\Table + */ + public function getQueryByProjectIds(array $projectIds) + { + if (empty($projectIds)) { + return $this->db->table(ProjectModel::TABLE)->eq(ProjectModel::TABLE.'.id', 0); + } + + return $this->db + ->table(ProjectModel::TABLE) + ->columns(self::TABLE.'.*', UserModel::TABLE.'.username AS owner_username', UserModel::TABLE.'.name AS owner_name') + ->join(UserModel::TABLE, 'id', 'owner_id') + ->in(self::TABLE.'.id', $projectIds); + } + + /** * Create a project * * @access public |