* finish task#797and781
This commit is contained in:
@@ -17,9 +17,14 @@
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
echo '<span id="yesterday">'. html::a(inlink('todo', "date=yesterday"), $lang->todo->yesterdayTodos). '</span>';
|
||||
echo '<span id="today">' . html::a(inlink('todo', "date=today"), $lang->todo->todayTodos) . '</span>';
|
||||
echo '<span id="thisweek">' . html::a(inlink('todo', "date=thisweek"), $lang->todo->thisWeekTodos) . '</span>';
|
||||
echo '<span id="lastweek">' . html::a(inlink('todo', "date=lastweek"), $lang->todo->lastWeekTodos) . '</span>';
|
||||
echo '<span id="thismonth">'. html::a(inlink('todo', "date=thismonth"), $lang->todo->thismonthTodos). '</span>';
|
||||
echo '<span id="lastmonth">' . html::a(inlink('todo', "date=lastmonth"), $lang->todo->lastmonthTodos). '</span>';
|
||||
echo '<span id="thisseason">'. html::a(inlink('todo', "date=thisseason"),$lang->todo->thisseasonTodos).'</span>';
|
||||
echo '<span id="thisyear">' . html::a(inlink('todo', "date=thisyear"), $lang->todo->thisyearTodos) . '</span>';
|
||||
echo '<span id="future">' . html::a(inlink('todo', "date=future"), $lang->todo->futureTodos) . '</span>';
|
||||
echo '<span id="all">' . html::a(inlink('todo', "date=all"), $lang->todo->allDaysTodos) . '</span>';
|
||||
echo '<span id="before">' . html::a(inlink('todo', "date=before&account={$app->user->account}&status=undone"), $lang->todo->allUndone) . '</span>';
|
||||
|
||||
+12
-8
@@ -71,11 +71,15 @@ $lang->todo->successMarked = "Successfully changed status";;
|
||||
$lang->todo->thisIsPrivate = 'This is a private todo。:)';
|
||||
$lang->todo->lblDisableDate = 'Set time lately';
|
||||
|
||||
$lang->todo->thisWeekTodos = 'This week';
|
||||
$lang->todo->lastWeekTodos = 'Last week';
|
||||
$lang->todo->futureTodos = 'Future';
|
||||
$lang->todo->allDaysTodos = 'All todo';
|
||||
$lang->todo->allUndone = 'Undone';
|
||||
$lang->todo->todayTodos = 'Today';
|
||||
|
||||
$lang->todo->action->marked = array('main' => '$date, Change status to <stong>$extra</strong> by <strong>$actor</strong>。', 'extra' => $lang->todo->statusList);
|
||||
$lang->todo->thisWeekTodos = 'This week';
|
||||
$lang->todo->lastWeekTodos = 'Last week';
|
||||
$lang->todo->futureTodos = 'Future';
|
||||
$lang->todo->allDaysTodos = 'All todo';
|
||||
$lang->todo->allUndone = 'Undone';
|
||||
$lang->todo->todayTodos = 'Today';
|
||||
$lang->todo->yesterdayTodos = 'Yesterday';
|
||||
$lang->todo->lastmonthTodos = 'Last Month';
|
||||
$lang->todo->thisseasonTodos = 'This Season';
|
||||
$lang->todo->thisyearTodos = 'This Year';
|
||||
$lang->todo->thismonthTodos = 'This Month';
|
||||
$lang->todo->action->marked = array('main' => '$date, Change status to <stong>$extra</strong> by <strong>$actor</strong>。', 'extra' => $lang->todo->statusList);
|
||||
|
||||
@@ -71,11 +71,15 @@ $lang->todo->successMarked = "成功切换状态!";
|
||||
$lang->todo->thisIsPrivate = '这是一条私人事务。:)';
|
||||
$lang->todo->lblDisableDate = '暂时不设定时间';
|
||||
|
||||
$lang->todo->thisWeekTodos = '本周计划';
|
||||
$lang->todo->lastWeekTodos = '上周工作';
|
||||
$lang->todo->futureTodos = '暂不指定';
|
||||
$lang->todo->allDaysTodos = '所有TODO';
|
||||
$lang->todo->allUndone = '之前未完';
|
||||
$lang->todo->todayTodos = '今日安排';
|
||||
|
||||
$lang->todo->action->marked = array('main' => '$date, 由 <strong>$actor</strong> 标记为<strong>$extra</strong>。', 'extra' => $lang->todo->statusList);
|
||||
$lang->todo->thisWeekTodos = '本周计划';
|
||||
$lang->todo->lastWeekTodos = '上周工作';
|
||||
$lang->todo->futureTodos = '暂不指定';
|
||||
$lang->todo->allDaysTodos = '所有TODO';
|
||||
$lang->todo->allUndone = '之前未完';
|
||||
$lang->todo->todayTodos = '今日安排';
|
||||
$lang->todo->yesterdayTodos = '昨日安排';
|
||||
$lang->todo->lastmonthTodos = '上月TODO';
|
||||
$lang->todo->thisseasonTodos = '本季TODO';
|
||||
$lang->todo->thisyearTodos = '本年TODO';
|
||||
$lang->todo->thismonthTodos = '本月TODO';
|
||||
$lang->todo->action->marked = array('main' => '$date, 由 <strong>$actor</strong> 标记为<strong>$extra</strong>。', 'extra' => $lang->todo->statusList);
|
||||
|
||||
@@ -179,6 +179,11 @@ class todoModel extends model
|
||||
$begin = $this->today();
|
||||
$end = $begin;
|
||||
}
|
||||
if($date == 'yesterday')
|
||||
{
|
||||
$begin = $this->yesterday();
|
||||
$end = $begin;
|
||||
}
|
||||
elseif($date == 'thisweek')
|
||||
{
|
||||
extract($this->getThisWeek());
|
||||
@@ -187,6 +192,22 @@ class todoModel extends model
|
||||
{
|
||||
extract($this->getLastWeek());
|
||||
}
|
||||
elseif($date == 'thismonth')
|
||||
{
|
||||
extract($this->getThisMonth());
|
||||
}
|
||||
elseif($date == 'lastmonth')
|
||||
{
|
||||
extract($this->getLastMonth());
|
||||
}
|
||||
elseif($date == 'thisseason')
|
||||
{
|
||||
extract($this->getThisSeason());
|
||||
}
|
||||
elseif($date == 'thisyear')
|
||||
{
|
||||
extract($this->getThisYear());
|
||||
}
|
||||
elseif($date == 'future')
|
||||
{
|
||||
$begin = '2030-01-01';
|
||||
@@ -480,4 +501,19 @@ class todoModel extends model
|
||||
$end = date('Y-m', strtotime('this month'));
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
|
||||
public function getThisSeason()
|
||||
{
|
||||
$getMonthDays = date("t", mktime(0,0,0,date('n')-(date('n')-1)%3,1,date("Y")));
|
||||
$begin = date('Y-m-d H:i:s', mktime(0,0,0,date('n')-(date('n')-1)%3,1,date("Y")));
|
||||
$end = date('Y-m-d H:i:s', mktime(23,59,59,date('n')+(date('n')-1)%3,$getMonthDays,date('Y')));
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
|
||||
public function getThisYear()
|
||||
{
|
||||
$begin = date(DT_DATE1, strtotime('1/1 this year'));
|
||||
$end = date(DT_DATE1, strtotime('1/1 next year -1 day'));
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user