diff --git a/www/application/controllers/Jobs.php b/www/application/controllers/Jobs.php index fc9481e1..c6fce540 100644 --- a/www/application/controllers/Jobs.php +++ b/www/application/controllers/Jobs.php @@ -37,6 +37,10 @@ class Jobs extends Users_Controller { $data = $this->getSessionArray(); $this->load->model('dash_model'); $out = $this->dash_model->getDashData($data); + + $this->load->model('job_model'); + $data['jobs_list'] = $this->job_model->getComboJobListOrdered($_SESSION['member_id'],50); + $data['active_task'] = $out['active_task']; $data['active_pass_due'] = $out['active_pass_due']; $data['current_balance'] = $out['current_balance']; diff --git a/www/application/models/Job_model.php b/www/application/models/Job_model.php index 02742f11..97223c69 100644 --- a/www/application/models/Job_model.php +++ b/www/application/models/Job_model.php @@ -152,6 +152,21 @@ class Job_model extends CI_Model { return $out; } + public function getComboJobListOrdered($member_id, $list_limit){ + + /* + *SELECT uid,title FROM members_jobs WHERE status = 1 AND member_id = 1 ORDER BY title ASC LIMIT 100; + uid | title + --------------------------------------+---------------------------------------------------------------------------------- + f13c2850-d1a4-4c87-be03-5fcd18a0643a | Another 2 days job + 01d9da51-8290-46aa-902c-279203b9b85f | ChiefSoftWorks + 00ce0c85-17c2-49f8-86e0-4c8ce70540a0 | Control Selected GPIO Pin on a Raspberry Pi Raspberry Pi 3 + 0c17f4f0-a2c2-449e-8b5c-61b1ac3eeeea | Different Screen,15 and 5 different Email Subject Capture + */ + $mysql = "SELECT uid,title FROM members_jobs WHERE status = 1 AND member_id = " . $member_id . " ORDER BY title ASC LIMIT ".$list_limit; + $query = $this->db->query($mysql); + return $query->result_array(); + } public function readMyloadJobOffer($member_id, $offer_code) { $out = array(); $out['result'] = 0; diff --git a/www/application/views/jobs/view_startcreate.php b/www/application/views/jobs/view_startcreate.php index 75bed1a7..3073f156 100644 --- a/www/application/views/jobs/view_startcreate.php +++ b/www/application/views/jobs/view_startcreate.php @@ -57,61 +57,98 @@
-

- Job Templates + Clone Previous Job .

- -
- -
- - - - - - - - - - + +
+
+
- -
-
-
- - - -
-
- - -
-
-
- Start -
- + foreach ($jobs_list as $row){ + ?> + + + +
+
+ View +
+
+ Clone +
+
+
+ +
+

+ Job Templates + . +

+
+
+
+ + +
+ +
+ + + + + + + + + + + + + +
+
+
+ + + +
+
+ + +
+
+
+ Start +
+ +
+
+ + + +