* Finish task #45156.
This commit is contained in:
@@ -498,7 +498,7 @@ $lang->action->label->testtask = 'Request|testtask|view|caseID=%s';
|
||||
$lang->action->label->testsuite = 'Test Suite|testsuite|view|suiteID=%s';
|
||||
$lang->action->label->caselib = 'Case Library|caselib|view|libID=%s';
|
||||
$lang->action->label->todo = 'Todo|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = 'Doc Library|doc|objectLibs|type=%s&objectID=%s&libID=%s&docID=&version=&appendLib=%s';
|
||||
$lang->action->label->doclib = 'Doc Library|doc|objectLibs|type=%s&objectID=%s&libID=%s';
|
||||
$lang->action->label->doc = 'Doc|doc|view|docID=%s';
|
||||
$lang->action->label->user = 'User|user|view|account=%s';
|
||||
$lang->action->label->testreport = 'Report|testreport|view|report=%s';
|
||||
|
||||
+15
-3
@@ -1170,7 +1170,6 @@ class actionModel extends model
|
||||
$libObjectID = trim($libObjectID, ',');
|
||||
if(empty($libObjectID) and $type != 'custom') return false;
|
||||
|
||||
$vars = substr($vars,0,strpos($vars,'&docID'));
|
||||
$params = sprintf($vars, $type, $libObjectID, $libID);
|
||||
}
|
||||
elseif($action->objectType == 'api')
|
||||
@@ -1428,7 +1427,7 @@ class actionModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function buildDateGroup($actions, $direction = 'next', $type = 'today')
|
||||
public function buildDateGroup($actions, $direction = 'next', $type = 'today', $orderBy = 'date_desc')
|
||||
{
|
||||
$dateGroup = array();
|
||||
foreach($actions as $action)
|
||||
@@ -1456,7 +1455,20 @@ class actionModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if($direction != 'next') $dateGroup = array_reverse($dateGroup);
|
||||
if($this->app->rawModule != 'company' and $direction != 'next')
|
||||
{
|
||||
$dateGroup = array_reverse($dateGroup);
|
||||
}
|
||||
else if($this->app->rawModule == 'company' and (($direction == 'next' and $orderBy == 'date_asc') or ($direction == 'pre' and $orderBy == 'date_desc')))
|
||||
{
|
||||
$dateGroup = array_reverse($dateGroup);
|
||||
foreach($dateGroup as $key => $dateItem)
|
||||
{
|
||||
$dateGroup[$key] = array_reverse($dateItem);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $dateGroup;
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ class company extends control
|
||||
$this->view->userID = $userID;
|
||||
$this->view->param = $param;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $browseType);
|
||||
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $browseType, $orderBy);
|
||||
$this->view->direction = $direction;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
<button type="button" class="btn btn-info btn-icon btn-sm dynamic-btn"><i class="icon icon-caret-down"></i></button>
|
||||
</div>
|
||||
<ul class="timeline timeline-tag-left <?php if($browseType == 'all') echo 'margin-l-50px';?>">
|
||||
<?php if(($orderBy == 'date_asc' and $direction == 'next') or ($orderBy == 'date_desc' and $direction == 'pre')) $actions = array_reverse($actions);?>
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
|
||||
Reference in New Issue
Block a user