Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -731,7 +731,7 @@ class bugModel extends model
|
||||
$bug->duplicateBug = $data->duplicateBugs[$bugID] ? $data->duplicateBugs[$bugID] : $oldBug->duplicateBug;
|
||||
|
||||
if($bug->assignedTo != $oldBug->assignedTo) $bug->assignedDate = $now;
|
||||
if(($bug->resolvedBy != '' or $bug->resolution != '') and $oldBug->status != 'resolved') $bug->resolvedDate = $now;
|
||||
if(($bug->resolvedBy != '' or $bug->resolution != '') and $oldBug->status != 'resolved' and $bug->status != 'closed') $bug->resolvedDate = $now;
|
||||
if($bug->resolution != '' and $bug->resolvedBy == '') $bug->resolvedBy = $this->app->user->account;
|
||||
if($bug->resolution != '' and $bug->status != 'closed')
|
||||
{
|
||||
|
||||
@@ -404,8 +404,8 @@ class commonModel extends model
|
||||
public static function printAdminSubMenu($subMenu)
|
||||
{
|
||||
global $app, $lang;
|
||||
$moduleName = $app->getModuleName();
|
||||
$methodName = $app->getMethodName();
|
||||
$currentModule = $app->getModuleName();
|
||||
$currentMethod = $app->getMethodName();
|
||||
if(isset($lang->admin->subMenuOrder->$subMenu))
|
||||
{
|
||||
ksort($lang->admin->subMenuOrder->$subMenu);
|
||||
@@ -424,13 +424,13 @@ class commonModel extends model
|
||||
if(isset($subMenuType['link'])) $link = $subMenuType['link'];
|
||||
}
|
||||
|
||||
list($text, $currentModule, $currentMethod)= explode('|', $link);
|
||||
if(!common::hasPriv($currentModule, $currentMethod)) continue;
|
||||
list($text, $moduleName, $methodName)= explode('|', $link);
|
||||
if(!common::hasPriv($moduleName, $methodName)) continue;
|
||||
|
||||
$active = ($moduleName == $currentModule and $methodName == $currentMethod) ? 'btn-active-text' : '';
|
||||
if($subModule and strpos(",{$subModule}," , ",{$moduleName},") !== false) $active = 'btn-active-text';
|
||||
if($alias and $moduleName == $currentModule and strpos(",$alias,", ",$currentMethod,") !== false) $active = 'btn-active-text';
|
||||
echo html::a(helper::createLink($currentModule, $currentMethod), "<span class='text'>$text</span>", '', "class='btn btn-link {$active}' id='{$type}Tab'");
|
||||
$active = ($currentModule == $moduleName and $currentMethod == $methodName) ? 'btn-active-text' : '';
|
||||
if($subModule and strpos(",{$subModule}," , ",{$currentModule},") !== false) $active = 'btn-active-text';
|
||||
if($alias and $currentModule == $moduleName and strpos(",$alias,", ",$currentMethod,") !== false) $active = 'btn-active-text';
|
||||
echo html::a(helper::createLink($moduleName, $methodName), "<span class='text'>$text</span>", '', "class='btn btn-link {$active}' id='{$type}Tab'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1134,66 +1134,6 @@ class docModel extends model
|
||||
|
||||
if($type == 'product' or $type == 'project') $libs = $this->dao->select('*')->from($table)->where('id')->in(array_keys($libs))->orderBy('`order` desc')->fetchAll('id');
|
||||
|
||||
/* Order the same as drop menu.*/
|
||||
if($type == 'product')
|
||||
{
|
||||
$this->loadModel('product');
|
||||
$products = $mineProducts = $otherProducts = $closedProducts = array();
|
||||
foreach($libs as $lib)
|
||||
{
|
||||
if(!$this->app->user->admin and !$this->product->checkPriv($lib->id)) continue;
|
||||
if($lib->status == 'normal' and $lib->PO == $this->app->user->account)
|
||||
{
|
||||
$mineProducts[$lib->id] = $lib;
|
||||
}
|
||||
elseif($lib->status == 'normal' and $lib->PO != $this->app->user->account)
|
||||
{
|
||||
$otherProducts[$lib->id] = $lib;
|
||||
}
|
||||
elseif($lib->status == 'closed')
|
||||
{
|
||||
$closedProducts[$lib->id] = $lib;
|
||||
}
|
||||
}
|
||||
$products = $mineProducts + $otherProducts + $closedProducts;
|
||||
$libs = array();
|
||||
foreach($products as $product)
|
||||
{
|
||||
$libs[$product->id] = new stdclass();
|
||||
$libs[$product->id]->id = $product->id;
|
||||
$libs[$product->id]->name = $product->name;
|
||||
}
|
||||
}
|
||||
elseif($type == 'project')
|
||||
{
|
||||
$this->loadModel('project');
|
||||
$projects = $mineProjects = $otherProjects = $closedProjects = array();
|
||||
foreach($libs as $lib)
|
||||
{
|
||||
if(!$this->app->user->admin and !$this->project->checkPriv($lib->id)) continue;
|
||||
if($lib->status != 'done' and $lib->status != 'closed' and $lib->PM == $this->app->user->account)
|
||||
{
|
||||
$mineProjects[$lib->id] = $lib;
|
||||
}
|
||||
elseif($lib->status != 'done' and $lib->status != 'closed' and !($lib->PM == $this->app->user->account))
|
||||
{
|
||||
$otherProjects[$lib->id] = $lib;
|
||||
}
|
||||
elseif($lib->status == 'done' or $lib->status == 'closed')
|
||||
{
|
||||
$closedProjects[$lib->id] = $lib;
|
||||
}
|
||||
}
|
||||
$projects = $mineProjects + $otherProjects + $closedProjects;
|
||||
$libs = array();
|
||||
foreach($projects as $project)
|
||||
{
|
||||
$libs[$project->id] = new stdclass();
|
||||
$libs[$project->id]->id = $project->id;
|
||||
$libs[$project->id]->name = $project->name;
|
||||
}
|
||||
}
|
||||
|
||||
return $libs;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ js::set('sysurl', common::getSysUrl());
|
||||
<img onload="setImageSize(this, 0)" src="<?php echo $this->createLink('file', 'read', "fileID={$file->id}");?>" alt="<?php echo $file->title?>">
|
||||
</a>
|
||||
<span class='right-icon'>
|
||||
<?php if(common::hasPriv('file', 'delete')) echo html::a('###', "<i class='icon icon-trash'></i>" . ' ' . $lang->doc->deleteFile, '', "class='btn-icon' onclick='deleteFile($file->id)'");?>
|
||||
<?php if(common::hasPriv('file', 'delete')) echo html::a('###', "<i class='icon icon-trash'></i>", '', "class='btn-icon' title=\"{$lang->doc->deleteFile}\" onclick='deleteFile($file->id)'");?>
|
||||
</span>
|
||||
</div>
|
||||
<?php unset($doc->files[$file->id]);?>
|
||||
|
||||
Reference in New Issue
Block a user