Merge branch 'sprint/175_liumengyi_45156' into 'sprint/168'
* Finish task #45156. See merge request easycorp/zentaopms!634
This commit is contained in:
@@ -167,10 +167,11 @@ class company extends control
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
* @param int $executionID
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function dynamic($browseType = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next', $userID = '', $productID = 0, $projectID = 0, $executionID = 0)
|
||||
public function dynamic($browseType = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next', $userID = '', $productID = 0, $projectID = 0, $executionID = 0, $orderBy = 'date_desc')
|
||||
{
|
||||
$this->company->setMenu();
|
||||
$this->app->loadLang('user');
|
||||
@@ -203,7 +204,6 @@ class company extends control
|
||||
$pager = new pager($recTotal, $recPerPage = 50, $pageID = 1);
|
||||
|
||||
/* Append id for secend sort. */
|
||||
$orderBy = $direction == 'next' ? 'date_desc' : 'date_asc';
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
|
||||
@@ -18,5 +18,6 @@
|
||||
.dynamic.collapsed .timeline > li + li {display: none;}
|
||||
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8';}
|
||||
|
||||
.c-user, .c-project, .c-product, .c-execution {width: 150px !important; overflow: unset;}
|
||||
.c-project, .c-product, .c-execution {width: 150px !important; overflow: unset;}
|
||||
.c-user,.c-order {width: 100px !important; overflow: unset;}
|
||||
.c-date {width: 200px;}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
$('#account, #product, #project, #execution').change(function()
|
||||
$('#account, #product, #project, #execution, #orderBy').change(function()
|
||||
{
|
||||
var userID = $('#account').val();
|
||||
var productID = $('#product').val();
|
||||
var projectID = systemMode == 'new' ? $('#project').val() : 0;
|
||||
var executionID = $('#execution').val();
|
||||
var orderBy = $('#orderBy').val();
|
||||
|
||||
browseType = browseType == 'bysearch' ? 'all' : browseType;
|
||||
link = createLink('company', 'dynamic', 'browseType=' + browseType + '¶m=&recTotal=0&date=&direction=next&userID=' + userID + '&productID=' + productID + '&projectID=' + projectID + '&executionID=' + executionID);
|
||||
link = createLink('company', 'dynamic', 'browseType=' + browseType + '¶m=&recTotal=0&date=&direction=next&userID=' + userID + '&productID=' + productID + '&projectID=' + projectID + '&executionID=' + executionID + '&orderBy=' + orderBy);
|
||||
location.href = link;
|
||||
})
|
||||
|
||||
@@ -37,3 +37,6 @@ $lang->company->user = 'User';
|
||||
|
||||
$lang->company->guestOptions[0] = 'Deny';
|
||||
$lang->company->guestOptions[1] = 'Allow';
|
||||
|
||||
$lang->company->order['date_desc'] = 'Descending';
|
||||
$lang->company->order['date_asc'] = 'Ascending';
|
||||
|
||||
@@ -37,3 +37,6 @@ $lang->company->user = '用户';
|
||||
|
||||
$lang->company->guestOptions[0] = '不允许';
|
||||
$lang->company->guestOptions[1] = '允许';
|
||||
|
||||
$lang->company->order['date_desc'] = '倒序排列';
|
||||
$lang->company->order['date_asc'] = '正序排列';
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
$active = 'btn-active-text';
|
||||
$label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
|
||||
}
|
||||
echo html::a(inlink('dynamic', "browseType=$period¶m=&recTotal=0&date=&direction=next&userID=$userID&productID=$productID&projectID=$projectID&executionID=$executionID"), $label, '', "class='btn btn-link $active' id='{$period}'")
|
||||
echo html::a(inlink('dynamic', "browseType=$period¶m=&recTotal=0&date=&direction=next&userID=$userID&productID=$productID&projectID=$projectID&executionID=$executionID&orderBy=$orderBy"), $label, '', "class='btn btn-link $active' id='{$period}'")
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
<div class="input-control space c-user"><?php echo html::select('account', $userIdPairs, $userID, 'class="form-control chosen" data-max_drop_width="215"');?></div>
|
||||
@@ -33,6 +33,7 @@
|
||||
<div class="input-control space c-project"><?php echo html::select('project', $projects, $projectID, 'class="form-control chosen" data-max_drop_width="215"');?></div>
|
||||
<?php endif;?>
|
||||
<div class="input-control space c-execution"><?php echo html::select('execution', $executions, $executionID, 'class="form-control chosen" data-max_drop_width="215"'); ?></div>
|
||||
<div class="input-control space c-order"><?php echo html::select('orderBy', $lang->company->order, $orderBy, 'class="form-control chosen" data-max_drop_width="215"'); ?></div>
|
||||
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->action->dynamic->search;?></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,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($direction == 'next') $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