Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -2038,9 +2038,9 @@ class execution extends control
|
||||
{
|
||||
/* Delete execution. */
|
||||
$this->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->eq($executionID)->exec();
|
||||
$this->loadModel('action')->create($this->objectType, $executionID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
|
||||
$this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('execution')->eq($executionID)->exec();
|
||||
$this->loadModel('action')->create('execution', $executionID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
|
||||
$this->execution->updateUserView($executionID);
|
||||
|
||||
$this->session->set('execution', '');
|
||||
$this->executeHooks($executionID);
|
||||
die(js::locate(inlink('index'), 'parent'));
|
||||
@@ -2554,7 +2554,7 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($module, $method, $extra)
|
||||
public function ajaxGetDropMenu($executionID, $module, $method, $extra)
|
||||
{
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($this->app->user->view->projects)->andWhere('deleted')->eq(0)->orderBy('order_desc')->fetchAll('id');
|
||||
|
||||
@@ -2582,6 +2582,7 @@ class execution extends control
|
||||
$this->view->link = $this->execution->getLink($module, $method, $extra);
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->projects = $this->project->getPairsByModel();
|
||||
$this->view->executions = $orderedExecutions;
|
||||
|
||||
@@ -139,7 +139,7 @@ class executionModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "executionID=$executionID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$currentExecutionName = '';
|
||||
if(isset($currentExecution->name)) $currentExecutionName = $currentExecution->name;
|
||||
|
||||
@@ -850,7 +850,7 @@ class executionModel extends model
|
||||
$currentExecutionName = $currentExecution->name;
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "module=$currentModule&method=$currentMethod&extra=");
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "executionID=$executionID&module=$currentModule&method=$currentMethod&extra=");
|
||||
$output = "<div class='btn-group header-btn'><i class='icon icon-run'></i> {$this->lang->execution->common}</div> ";
|
||||
$output .= "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentExecutionName}'><span class='text'>{$currentExecutionName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
@@ -2444,8 +2444,8 @@ class executionModel extends model
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.status')->ne('closed')
|
||||
->andWhere('t2.stage')->in('wait,planned,executioned,developing')
|
||||
->groupBy('execution')
|
||||
->fetchAll('execution');
|
||||
->groupBy('project')
|
||||
->fetchAll('project');
|
||||
|
||||
foreach($burns as $executionID => $burn)
|
||||
{
|
||||
|
||||
@@ -20,33 +20,34 @@ $executionsPinYin = common::convert2Pinyin($executionNames);
|
||||
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
$selected = $execution->id == $executionID ? 'selected' : '';
|
||||
$executionName = zget($projects, $execution->project) . '/' . $execution->name;
|
||||
if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account)
|
||||
{
|
||||
$myProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "class='text-important' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
$myProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "class='text-important $selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
}
|
||||
else if($execution->status != 'done' and $execution->status != 'closed' and !($execution->PM == $this->app->user->account))
|
||||
{
|
||||
$normalProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
$normalProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "class='$selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
}
|
||||
else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "class='$selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->execution->mine}</div>";
|
||||
echo $myProjectsHtml;
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->execution->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProjectsHtml;
|
||||
?>
|
||||
<?php
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->execution->mine}</div>";
|
||||
echo $myProjectsHtml;
|
||||
if(!empty($myProjectsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->execution->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProjectsHtml;
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php //echo html::a(helper::createLink('execution', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->execution->all, '', 'class="not-list-item"'); ?>
|
||||
@@ -54,10 +55,15 @@ foreach($executions as $execution)
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-col col-right">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
echo $closedProjectsHtml;
|
||||
?>
|
||||
</div>
|
||||
<div class='list-group'><?php echo $closedProjectsHtml;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
if($('#dropMenu .table-row .col-left .list-group .selected').length > 0)
|
||||
{
|
||||
$('#dropMenu .table-row .col-left .list-group').scrollTop($('#dropMenu .table-row .col-left .list-group .selected').position().top - 75);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user