* code for task#1066.
This commit is contained in:
+12
-11
@@ -20,6 +20,7 @@ class todo extends control
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('date');
|
||||
$this->loadModel('task');
|
||||
$this->loadModel('bug');
|
||||
$this->loadModel('my')->setMenu();
|
||||
@@ -35,7 +36,7 @@ class todo extends control
|
||||
*/
|
||||
public function create($date = 'today', $account = '')
|
||||
{
|
||||
if($date == 'today') $date = $this->todo->today();
|
||||
if($date == 'today') $date = $this->date->today();
|
||||
if($account == '') $account = $this->app->user->account;
|
||||
if(!empty($_POST))
|
||||
{
|
||||
@@ -51,8 +52,8 @@ class todo extends control
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->date = strftime("%Y-%m-%d", strtotime($date));
|
||||
$this->view->times = $this->todo->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->time = $this->todo->now();
|
||||
$this->view->times = $this->date->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->time = $this->date->now();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -83,8 +84,8 @@ class todo extends control
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->date = (int)$date == 0 ? $date : date('Y-m-d', strtotime($date));
|
||||
$this->view->times = $this->todo->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->time = $this->todo->now();
|
||||
$this->view->times = $this->date->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->time = $this->date->now();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -120,7 +121,7 @@ class todo extends control
|
||||
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->times = $this->todo->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->times = $this->date->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->todo = $todo;
|
||||
$this->display();
|
||||
}
|
||||
@@ -184,8 +185,8 @@ class todo extends control
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->editedTodos = $editedTodos;
|
||||
$this->view->times = $this->todo->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->time = $this->todo->now();
|
||||
$this->view->times = $this->date->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->time = $this->date->now();
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
|
||||
@@ -234,7 +235,7 @@ class todo extends control
|
||||
$this->view->header->title = "TODO #$todo->id $todo->name";
|
||||
$this->view->position[] = $this->lang->todo->view;
|
||||
$this->view->todo = $todo;
|
||||
$this->view->times = $this->todo->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->times = $this->date->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('todo', $todoID);
|
||||
$this->view->from = $from;
|
||||
@@ -299,7 +300,7 @@ class todo extends control
|
||||
public function import2Today()
|
||||
{
|
||||
$todoIDList = $this->post->todoIDList;
|
||||
$today = $this->todo->today();
|
||||
$today = $this->date->today();
|
||||
$this->dao->update(TABLE_TODO)->set('date')->eq($today)->where('id')->in($todoIDList)->exec();
|
||||
die(js::locate($this->session->todoList));
|
||||
}
|
||||
@@ -339,7 +340,7 @@ class todo extends control
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
$bugs = $this->loadModel('bug')->getUserBugPairs($account);
|
||||
$tasks = $this->loadModel('task')->getUserTaskPairs($account);
|
||||
$times = $this->todo->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$times = $this->date->buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
|
||||
foreach($todos as $todo)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user