This commit is contained in:
wangyidong
2018-11-16 11:18:33 +08:00
parent 1a39d023f3
commit 22a149dd44
3 changed files with 15 additions and 8 deletions
+6 -4
View File
@@ -177,10 +177,11 @@ class todo extends control
$columns = 7;
if($account == '') $account = $this->app->user->account;
$bugs = $this->bug->getUserBugPairs($account);
$tasks = $this->task->getUserTaskPairs($account, $status);
$allTodos = $this->todo->getList($type, $account, $status);
if($this->post->todoIDList) $todoIDList = $this->post->todoIDList;
$bugs = $this->bug->getUserBugPairs($account);
$tasks = $this->task->getUserTaskPairs($account, $status);
$storys = $this->loadModel('story')->getUserStoryPairs($account);
$allTodos = $this->todo->getList($type, $account, $status);
if($this->post->todoIDList) $todoIDList = $this->post->todoIDList;
/* Initialize todos whose need to edited. */
foreach($allTodos as $todo)
@@ -217,6 +218,7 @@ class todo extends control
if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars);
$this->view->bugs = $bugs;
$this->view->tasks = $tasks;
$this->view->storys = $storys;
$this->view->editedTodos = $editedTodos;
$this->view->times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
$this->view->time = date::now();
+2 -1
View File
@@ -34,7 +34,7 @@ class todoModel extends model
->setIF($this->post->begin == false, 'begin', '2400')
->setIF($this->post->end == false, 'end', '2400')
->stripTags($this->config->todo->editor->create['id'], $this->config->allowedTags)
->remove('bug, task, uid')
->remove('bug, task, story, uid')
->get();
if(empty($todo->cycle)) unset($todo->config);
if(!empty($todo->cycle))
@@ -224,6 +224,7 @@ class todoModel extends model
$todo->end = isset($data->ends[$todoID]) ? $data->ends[$todoID] : 2400;
if($todo->type == 'task') $todo->idvalue = isset($data->tasks[$todoID]) ? $data->tasks[$todoID] : 0;
if($todo->type == 'bug') $todo->idvalue = isset($data->bugs[$todoID]) ? $data->bugs[$todoID] : 0;
if($todo->type == 'story')$todo->idvalue = isset($data->storys[$todoID]) ? $data->storys[$todoID] : 0;
$todos[$todoID] = $todo;
}
+7 -3
View File
@@ -60,15 +60,19 @@
<?php
if($todo->type == 'custom' or $todo->type == 'cycle')
{
echo html::input("names[$todo->id]", $todo->name, "class='form-control' autocomplete='off'"); ;
echo html::input("names[$todo->id]", $todo->name, "class='form-control' autocomplete='off'"); ;
}
elseif($todo->type == 'task')
{
echo html::select("tasks[$todo->id]", $tasks, $todo->idvalue, 'class="form-control chosen"');
echo html::select("tasks[$todo->id]", $tasks, $todo->idvalue, 'class="form-control chosen"');
}
elseif($todo->type == 'bug')
{
echo html::select("bugs[$todo->id]", $bugs, $todo->idvalue, 'class="form-control chosen"');
echo html::select("bugs[$todo->id]", $bugs, $todo->idvalue, 'class="form-control chosen"');
}
elseif($todo->type == 'story')
{
echo html::select("storys[$todo->id]", $storys, $todo->idvalue, 'class="form-control chosen"');
}
?>
</div>