* finish task #1419.

This commit is contained in:
wangyidong
2013-06-20 08:47:51 +00:00
parent f2d86d3b41
commit efa8eeb3b9
3 changed files with 11 additions and 3 deletions
+5 -1
View File
@@ -26,7 +26,11 @@
<?php echo html::a($this->createLink('todo', 'view', "todoID=$todo->id&from=my"), '#' . $todo->id . ' ' . $todo->name)?>
<span class='ui-li-count'>
<?php
if(empty($todo->begin))
if($todo->status == 'done')
{
echo $lang->todo->finish;
}
elseif(empty($todo->begin))
{
echo $lang->todo->lblDisableDate;
}
+2 -2
View File
@@ -329,9 +329,9 @@ class todo extends control
* @access public
* @return void
*/
public function import2Today()
public function import2Today($todoID = 0)
{
$todoIDList = $this->post->todoIDList;
$todoIDList = $_POST ? $this->post->todoIDList : array($todoID);
$today = date::today();
$this->dao->update(TABLE_TODO)->set('date')->eq($today)->where('id')->in($todoIDList)->exec();
die(js::locate($this->session->todoList));
+4
View File
@@ -32,6 +32,10 @@
$browseLink = $this->createLink('my', 'todo');
}
if(common::hasPriv('todo', 'finish') and $todo->status != 'done') echo '<li>' . html::a($this->createLink('todo', 'finish', "id=$todo->id"), $lang->todo->finish, 'hiddenwin') . '</li>';
if($todo->account == $app->user->account and common::hasPriv('todo', 'import2Today') and $todo->date != date('Ymd'))
{
echo '<li>' . html::a($this->createLink('todo', 'import2Today', "todoID=$todo->id"), $lang->todo->import2Today, 'hiddenwin') . '</li>';
}
if($todo->account == $app->user->account and common::hasPriv('todo', 'delete'))
{
echo '<li>' . html::a($this->createLink('todo', 'delete', "todoID=$todo->id"), $lang->delete, 'hiddenwin') . '</li>';