diff --git a/module/user/control.php b/module/user/control.php index ac069055eb..207915f889 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -898,7 +898,7 @@ class user extends control * @access public * @return void */ - public function dynamic($period = 'today', $account = '', $orderBy = 'date_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function dynamic($period = 'today', $account = '', $recTotal = 0, $direction = 'next') { /* set menus. */ $this->lang->set('menugroup.user', 'company'); @@ -919,19 +919,25 @@ class user extends control /* Set the pager. */ $this->app->loadClass('pager', $static = true); - $pager = pager::init($recTotal, $recPerPage, $pageID); - $this->view->orderBy = $orderBy; - $this->view->pager = $pager; + $pager = pager::init($recTotal, $recPerPage = 50, $pageID = 1); + + /* Append id for secend sort. */ + $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; + $sort = $this->loadModel('common')->appendOrder($orderBy); + + $actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager); $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->dynamic; $this->view->position[] = $this->lang->user->dynamic; /* Assign. */ - $this->view->period = $period; - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->account = $account; - $this->view->user = $this->user->getById($account); - $this->view->actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager); + $this->view->type = $period; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->account = $account; + $this->view->pager = $pager; + $this->view->user = $this->user->getById($account); + $this->view->dateGroups = $this->action->buildDateGroup($actions, $direction); + $this->view->direction = $direction; $this->display(); } diff --git a/module/user/css/dynamic.css b/module/user/css/dynamic.css new file mode 100644 index 0000000000..f46372e157 --- /dev/null +++ b/module/user/css/dynamic.css @@ -0,0 +1,20 @@ +#dynamics {padding: 10px 0;} +.dynamic {position: relative; padding-left: 170px;} +.dynamic-date {position: absolute; left: 0; top: 0; width: 150px; border: 2px solid #eee; border-radius: 4px; padding: 14px 20px; height: 58px;} +.dynamic-date:before {content: ' '; display: block; position: absolute; right: -22px; top: 26px; height: 2px; width: 20px; background-color: #eee;} +.dynamic-date > .date-label, +.dynamic-date > .date-text {font-size: 18px; display: block;} +.dynamic-date > .date-label + .date-text {font-size: 14px; line-height: 14px;} +.dynamic-date > .date-label {margin-top: -8px;} +.dynamic-date > .btn {position: absolute; right: 10px; top: 15px;} +.dynamic .timeline {border: 2px solid #eee; border-radius: 4px; margin-bottom: 20px; padding: 10px 20px 10px 100px; max-height: 800px; transition: max-height .2s; overflow: hidden;} +.dynamic .timeline-tag {left: -75px; font-size: 14px; color: #838A9D;} +.dynamic .timeline-text {color: #3C4353;} +.dynamic .text-muted {color: #838A9D;} +.dynamic .label-id {top: -1px;} +.dynamic.active .timeline, +.dynamic.active .dynamic-date {border-color: #00a9fc;} +.dynamic.active .dynamic-date:before {background-color: #00a9fc;} +.dynamic.collapsed .timeline {max-height: 58px;} +.dynamic.collapsed .timeline > li + li:after {display: none;} +.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d7';} diff --git a/module/user/view/bug.html.php b/module/user/view/bug.html.php index a5965d5b89..578daeb598 100644 --- a/module/user/view/bug.html.php +++ b/module/user/view/bug.html.php @@ -23,34 +23,38 @@ ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB;?>bug->severityAB;?>priAB;?>typeAB;?>bug->title;?>openedByAB;?>bug->resolvedBy;?>bug->resolutionAB;?>
createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?>bug->severityList, $bug->severity, $bug->severity)?>'>bug->severityList, $bug->severity, $bug->severity)?>bug->priList, $bug->pri, $bug->pri)?>'>bug->priList, $bug->pri, $bug->pri)?>bug->typeList[$bug->type]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?>
show();?>
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB;?>bug->severityAB;?>priAB;?>typeAB;?>bug->title;?>openedByAB;?>bug->resolvedBy;?>bug->resolutionAB;?>
createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?>bug->severityList, $bug->severity, $bug->severity)?>'>bug->severityList, $bug->severity, $bug->severity)?>bug->priList, $bug->pri, $bug->pri)?>'>bug->priList, $bug->pri, $bug->pri)?>bug->typeList[$bug->type]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?>
+ + + +
diff --git a/module/user/view/dynamic.html.php b/module/user/view/dynamic.html.php index ba88ed80e3..fd354eedb7 100644 --- a/module/user/view/dynamic.html.php +++ b/module/user/view/dynamic.html.php @@ -13,47 +13,93 @@ -
- + +
+ +
+
+ + $actions):?> + +
+
+ + action->dynamic->today;?> + + + +
+
    + + $action):?> + +
  • actor == $this->app->user->account) echo "class='active'";?>> +
    + time?> + + user->realname . ' ' . $action->actionLabel;?> + objectLabel;?> + objectID;?> + objectLink, $action->objectName);?> + +
    +
  • + +
+
+ +
+ + originalDate) + 24 * 3600); + $lastDate = substr($action->originalDate, 0, 10); + $hasPre = $this->action->hasPreOrNext($firstDate, 'pre'); + $hasNext = $this->action->hasPreOrNext($lastDate, 'next'); + ?> + + + +
- - - - - - - - - - - - - - objectType == 'case' ? 'testcase' : $action->objectType;?> - - - - - - - - - - - -
action->date;?> action->actor;?>action->action;?> action->objectType;?> idAB;?>action->objectName;?>
date;?>actor];?>actionLabel;?>action->objectTypes[$action->objectType];?>objectID;?>objectLink, $action->objectName);?>
show();?>
diff --git a/module/user/view/featurebar.html.php b/module/user/view/featurebar.html.php index 74ad463b2a..6f27e66325 100755 --- a/module/user/view/featurebar.html.php +++ b/module/user/view/featurebar.html.php @@ -2,47 +2,58 @@ - diff --git a/module/user/view/profile.html.php b/module/user/view/profile.html.php index efae866115..976d69dd8b 100644 --- a/module/user/view/profile.html.php +++ b/module/user/view/profile.html.php @@ -13,17 +13,17 @@ -
-
-
+
+
+

icons['user']);?> id;?> realname;?> (account;?>) user->profile;?> -

-
- createLink('user', 'edit', "userID=$user->id"), html::icon('pencil') . ' ' . $lang->user->editProfile, '', "class='btn btn-primary'"); ?> -
+ +
+ createLink('user', 'edit', "userID=$user->id"), html::icon('pencil') . ' ' . $lang->user->editProfile, '', "class='btn btn-primary'"); ?>
+ diff --git a/module/user/view/project.html.php b/module/user/view/project.html.php index 35f86b240c..3b1e89eb4b 100644 --- a/module/user/view/project.html.php +++ b/module/user/view/project.html.php @@ -13,39 +13,41 @@ -
user->dept;?>
- - - - - - - - - - - - - - - - createLink('project', 'browse', "projectID=$project->id");?> - - - - - - - delay)):?> - - - - - - - - - - -
idAB;?>project->code;?>project->name;?>project->begin;?>project->end;?>statusAB;?>team->role;?>team->join;?>team->hours;?>
id);?>code;?>name);?>begin;?>end;?>project->delayed;?>project->statusList[$project->status];?>role;?>join;?>hours;?>
+
+ + + + + + + + + + + + + + + + + createLink('project', 'browse', "projectID=$project->id");?> + + + + + + + delay)):?> + + + + + + + + + + +
idAB;?>project->code;?>project->name;?>project->begin;?>project->end;?>statusAB;?>team->role;?>team->join;?>team->hours;?>
id);?>code;?>name);?>begin;?>end;?>project->delayed;?>project->statusList[$project->status];?>role;?>join;?>hours;?>
+
diff --git a/module/user/view/task.html.php b/module/user/view/task.html.php index 5172f85e4c..66c7849d13 100644 --- a/module/user/view/task.html.php +++ b/module/user/view/task.html.php @@ -24,36 +24,40 @@ ?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB;?>priAB;?>task->project;?>task->name;?>task->estimateAB;?>task->consumedAB;?>task->leftAB;?>task->deadlineAB;?>statusAB;?>
createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?>task->priList, $task->pri, $task->pri);?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri)?>createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?>createLink('task', 'view', "taskID=$task->id"), $task->name);?>estimate;?>consumed;?>left;?>delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?>task->statusList[$task->status];?>
show();?>
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB;?>priAB;?>task->project;?>task->name;?>task->estimateAB;?>task->consumedAB;?>task->leftAB;?>task->deadlineAB;?>statusAB;?>
createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?>task->priList, $task->pri, $task->pri);?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri)?>createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?>createLink('task', 'view', "taskID=$task->id"), $task->name);?>estimate;?>consumed;?>left;?>delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?>task->statusList[$task->status];?>
+ + + +
diff --git a/module/user/view/testtask.html.php b/module/user/view/testtask.html.php index ad0c93d4a9..e3a704a358 100755 --- a/module/user/view/testtask.html.php +++ b/module/user/view/testtask.html.php @@ -21,33 +21,37 @@ ?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB);?> testtask->name);?> testtask->project);?> testtask->build);?>testtask->begin);?>testtask->end);?>statusAB);?>
createLink('testtask', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?>createLink('testtask', 'view', "taskID=$task->id"), $task->name);?>projectName?>build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?>begin?>end?>testtask->statusList[$task->status];?>
show();?>
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?> testtask->name);?> testtask->project);?> testtask->build);?>testtask->begin);?>testtask->end);?>statusAB);?>
createLink('testtask', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?>createLink('testtask', 'view', "taskID=$task->id"), $task->name);?>projectName?>build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?>begin?>end?>testtask->statusList[$task->status];?>
+ + + +