Revize 2171
Přidáno uživatelem David Raška před asi 11 roky(ů)
freenetis/branches/1.1/application/controllers/work_reports.php | ||
---|---|---|
|
||
$work_reports = $work_report_model->get_all_work_reports(
|
||
$sql_offset, (int)$limit_results, $order_by, $order_by_direction,
|
||
$filter_form->as_sql()
|
||
$filter_form->as_sql(), $this->user_id
|
||
);
|
||
}
|
||
catch (Exception $e)
|
freenetis/branches/1.1/application/models/job_report.php | ||
---|---|---|
* @param string $order_by_direction
|
||
* @param string $filter_sql
|
||
* @param boolean $lower Should be operant to state < (= otherwise)
|
||
* @param integer $user_id
|
||
* @return Mysql_Result
|
||
*/
|
||
public function get_all_work_reports(
|
||
$limit_from = 0, $limit_results = 50, $order_by = 'id',
|
||
$order_by_direction = 'ASC', $filter_sql = '')
|
||
$order_by_direction = 'ASC', $filter_sql = '', $user_id = NULL)
|
||
{
|
||
// order by direction check
|
||
if (strtolower($order_by_direction) != 'desc')
|
||
... | ... | |
IFNULL(v.agree_count, 0) AS agree_count,
|
||
IFNULL(v.abstain_count, 0) AS abstain_count,
|
||
IFNULL(v.disagree_count, 0) AS disagree_count,
|
||
v.comment AS vote_comments
|
||
v.comment AS vote_comments, uv.vote AS your_votes
|
||
FROM job_reports r
|
||
LEFT JOIN transfers t ON t.id = r.transfer_id
|
||
JOIN users u ON u.id = r.user_id
|
||
... | ... | |
JOIN users u ON v.user_id = u.id
|
||
GROUP BY job_id
|
||
) v ON v.job_id = j.id
|
||
LEFT JOIN votes uv ON uv.fk_id = j.id AND uv.user_id = ?
|
||
WHERE r.concept = 0
|
||
GROUP BY r.id
|
||
) wr $filter_sql
|
||
... | ... | |
Vote_Model::get_vote_option_name(Vote_Model::ABSTAIN),
|
||
Vote_Model::AGREE,
|
||
Vote_Model::ABSTAIN,
|
||
Vote_Model::DISAGREE
|
||
Vote_Model::DISAGREE,
|
||
$user_id
|
||
));
|
||
}
|
||
|
Také k dispozici: Unified diff
Opravy:
- fixes #755: Oprava razeni pracovnich vykazu podle hlasu