Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -465,7 +465,7 @@ class bug extends control
|
||||
$this->view->productName = $productName;
|
||||
$this->view->modulePath = $this->tree->getParents($bug->module);
|
||||
$this->view->bug = $bug;
|
||||
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : $this->loadModel('branch')->getById($bug->branch);
|
||||
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : $this->loadModel('branch')->getById($bug->branch, $bug->product);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
.col-side .chosen-container {width: 218px!important}
|
||||
.col-side .chosen-container[id^="openedBuild"] {width: 172px!important}
|
||||
.col-side .chosen-container[id^="resolvedBuild"] {width: 172px!important}
|
||||
.chosen-choices li.search-choice{word-break: break-all;}
|
||||
#linkBugBox > li {margin-left:-56px}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<?php if($this->session->currentProductType !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
|
||||
</strong>
|
||||
<div class='actions'>
|
||||
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=bug¶ms=' . helper::safe64Encode("productID=$productID&projectID=$projectID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn' data-width='600px'")?>
|
||||
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=bug¶ms=' . helper::safe64Encode("productID=$productID&projectID=$projectID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn' data-width='70%'")?>
|
||||
<?php echo html::commonButton($lang->pasteText, "data-toggle='myModal'")?>
|
||||
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i> </button>
|
||||
</div>
|
||||
|
||||
+11
-1
@@ -128,10 +128,11 @@ class cron extends control
|
||||
/**
|
||||
* Ajax exec cron.
|
||||
*
|
||||
* @param bool $restart
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxExec()
|
||||
public function ajaxExec($restart = false)
|
||||
{
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(0);
|
||||
@@ -139,6 +140,10 @@ class cron extends control
|
||||
/* Check cron turnon. */
|
||||
if(empty($this->config->global->cron)) die();
|
||||
|
||||
/* Create restart tag file. */
|
||||
$restartTag = $this->app->getCacheRoot() . 'restartcron';
|
||||
if($restart) touch($restartTag);
|
||||
|
||||
/* make cron status to running. */
|
||||
$configID = $this->cron->getConfigID();
|
||||
$configID = $this->cron->markCronStatus('running', $configID);
|
||||
@@ -158,11 +163,16 @@ class cron extends control
|
||||
if(empty($parsedCrons)) break;
|
||||
if(!$this->cron->getTurnon()) break;
|
||||
|
||||
/* Die old process when restart. */
|
||||
if(file_exists($restartTag) and !$restart) die(unlink($restartTag));
|
||||
$restart = false;
|
||||
|
||||
/* Run crons. */
|
||||
$now = new datetime('now');
|
||||
$this->common->loadConfigFromDB();
|
||||
foreach($parsedCrons as $id => $cron)
|
||||
{
|
||||
|
||||
$cronInfo = $this->cron->getById($id);
|
||||
/* Skip empty and stop cron.*/
|
||||
if(empty($cronInfo) or $cronInfo->status == 'stop') continue;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
startCron();
|
||||
startCron(1);
|
||||
setTimeout(function(){parent.location.href = parent.location.href}, 300);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -107,9 +107,7 @@
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
|
||||
<?php if($doc->files):?>
|
||||
<div class='file-content'><?php echo $this->fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'false'));?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class='actions'><?php if(!$doc->deleted) echo $actionLinks;?></div>
|
||||
|
||||
+44
-16
@@ -126,6 +126,15 @@ class file extends control
|
||||
*/
|
||||
public function download($fileID, $mouse = '')
|
||||
{
|
||||
/* When get sid then change session id. */
|
||||
if(isset($_GET[$this->config->sessionVar]))
|
||||
{
|
||||
$sessionID = isset($_COOKIE[$this->config->sessionVar]) ? $_COOKIE[$this->config->sessionVar] : sha1(mt_rand());
|
||||
session_write_close();
|
||||
session_id($sessionID);
|
||||
session_start();
|
||||
}
|
||||
|
||||
$file = $this->file->getById($fileID);
|
||||
|
||||
/* Judge the mode, down or open. */
|
||||
@@ -364,30 +373,49 @@ class file extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function uploadImages($module, $params)
|
||||
public function uploadImages($module, $params, $uid = '', $locate = false)
|
||||
{
|
||||
if($locate)
|
||||
{
|
||||
$sessionName = $uid . 'ImagesFile';
|
||||
$imageFiles = $this->session->$sessionName;
|
||||
$this->session->set($module . 'ImagesFile', $imageFiles);
|
||||
unset($_SESSION[$sessionName]);
|
||||
die(js::locate($this->createLink($module, 'batchCreate', helper::safe64Decode($params)), 'parent.parent'));
|
||||
}
|
||||
|
||||
if($_FILES)
|
||||
{
|
||||
$file = $this->file->getUpload('file');
|
||||
$file = $file[0];
|
||||
|
||||
if(!$file) die(js::alert($this->lang->error->noData));
|
||||
if($file['extension'] != 'zip') die(js::alert($this->lang->file->errorSuffix));
|
||||
if($file['size'] == 0) die(js::alert($this->lang->file->errorFileUpload));
|
||||
|
||||
if(@move_uploaded_file($file['tmpname'], $this->file->savePath . $file['pathname']))
|
||||
$file = $this->file->getUploadImageFile('file');
|
||||
if(!$file) die(json_encode(array('result' => 'fail', 'message' => $this->lang->error->noData)));
|
||||
if(empty($file['extension']) or !in_array($file['extension'], $this->config->file->imageExtensions))
|
||||
{
|
||||
$zipFile = $this->file->savePath . $file['pathname'];
|
||||
$files = $this->file->extractZip($zipFile);
|
||||
die(json_encode(array('result' => 'fail', 'message' => $this->lang->file->errorFileFormate)));
|
||||
}
|
||||
|
||||
unlink($zipFile);
|
||||
if(!$files) die(js::alert($this->lang->file->errorExtract));
|
||||
|
||||
$this->session->set($module . 'ImagesFile', $files);
|
||||
die(js::locate($this->createLink($module, 'batchCreate', helper::safe64Decode($params)), 'parent.parent'));
|
||||
$imageFile = $this->file->saveUploadImageFile($file, $uid);
|
||||
if($imageFile === false)
|
||||
{
|
||||
die(json_encode(array('result' => 'fail', 'message' => $this->lang->file->errorFileMove)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!empty($imageFile))
|
||||
{
|
||||
$sessionName = $uid . 'ImagesFile';
|
||||
$imageFiles = $this->session->$sessionName;
|
||||
$fileName = basename($imageFile['pathname']);
|
||||
$imageFiles[$fileName] = $imageFile;
|
||||
$this->session->set($sessionName, $imageFiles);
|
||||
}
|
||||
die(json_encode(array('result' => 'success', 'file' => $file, 'message' => $this->lang->file->uploadSuccess)));
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->uid = empty($uid) ? uniqid() : $uid;
|
||||
$this->view->module = $module;
|
||||
$this->view->params = $params;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,17 +26,19 @@ $lang->file->exportFields = "要导出字段";
|
||||
$lang->file->defaultTPL = "默认模板";
|
||||
$lang->file->setExportTPL = "设置";
|
||||
$lang->file->preview = "预览";
|
||||
$lang->file->addFile = '添加文件';
|
||||
$lang->file->beginUpload = '开始上传';
|
||||
$lang->file->uploadSuccess = '上传成功';
|
||||
|
||||
$lang->file->dragFile = '请拖拽文件到此处';
|
||||
$lang->file->errorNotExists = "<span class='red'>文件夹 '%s' 不存在</span>";
|
||||
$lang->file->errorCanNotWrite = "<span class='red'>文件夹 '%s' 不可写,请改变文件夹的权限。在linux中输入指令:sudo chmod -R 777 '%s'</span>";
|
||||
$lang->file->confirmDelete = " 您确定删除该附件吗?";
|
||||
$lang->file->errorFileSize = " 文件大小已经超过限制,可能不能成功上传!";
|
||||
$lang->file->errorFileUpload = " 文件上传失败,文件大小可能超出限制";
|
||||
$lang->file->errorFileFormate = " 文件上传失败,文件格式不在规定范围内";
|
||||
$lang->file->errorFileMove = " 文件上传失败,移动文件时出错";
|
||||
$lang->file->dangerFile = " 您选择的文件存在安全风险,系统将不予上传。";
|
||||
$lang->file->errorSuffix = '压缩包格式错误,只能上传zip压缩包!';
|
||||
$lang->file->errorExtract = '解压缩失败!可能文件已经损坏,或压缩包里含有非法上传文件。';
|
||||
$lang->file->uploadImagesExplain = <<<EOD
|
||||
<p>1、上传文件为包含图片的zip压缩包,程序会以文件名作为标题,以图片作为内容。</p>
|
||||
<p>2、如果文件名开头含有 数字+下划线,以方便排序,程序会将他们忽略。</p>
|
||||
<p>3、图片格式:jpg|jpeg|gif|png。</p>
|
||||
EOD;
|
||||
$lang->file->uploadImagesExplain = '注:请上传"jpg|jpeg|gif|png"格式的图片,程序会以文件名作为标题,以图片作为内容。';
|
||||
|
||||
@@ -171,6 +171,109 @@ class fileModel extends model
|
||||
return $files;
|
||||
}
|
||||
|
||||
/**
|
||||
* get uploaded image file from zui.uploader.
|
||||
*
|
||||
* @param string $htmlTagName
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUploadImageFile($htmlTagName = 'file')
|
||||
{
|
||||
if(!isset($_FILES[$htmlTagName]) || empty($_FILES[$htmlTagName]['name'])) return;
|
||||
|
||||
$this->app->loadClass('purifier', true);
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Cache.DefinitionImpl', null);
|
||||
$purifier = new HTMLPurifier($config);
|
||||
|
||||
extract($_FILES[$htmlTagName]);
|
||||
if(!validater::checkFileName($name)) return array();
|
||||
if($this->post->name) $name = $this->post->name;
|
||||
|
||||
$file = array();
|
||||
$file['id'] = 0;
|
||||
$file['extension'] = $this->getExtension($name);
|
||||
$file['title'] = !empty($_POST['label']) ? htmlspecialchars($_POST['label']) : substr($name, 0, strpos($name, $file['extension']) - 1);
|
||||
$file['title'] = $purifier->purify($file['title']);
|
||||
$file['size'] = $_POST['size'];
|
||||
$file['tmpname'] = $tmp_name;
|
||||
$file['uuid'] = $_POST['uuid'];
|
||||
$file['pathname'] = $this->setPathName(0, $file['extension']);
|
||||
$file['chunkpath'] = 'chunks' . DS .'f_' . $file['uuid'] . '.' . $file['extension'] . '.part';
|
||||
$file['chunks'] = isset($_POST['chunks']) ? intval($_POST['chunks']) : 0;
|
||||
$file['chunk'] = isset($_POST['chunk']) ? intval($_POST['chunk']) : 0;
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save uploaded image file.
|
||||
*
|
||||
* @param int $file
|
||||
* @param int $uid
|
||||
* @access public
|
||||
* @return array|bool
|
||||
*/
|
||||
public function saveUploadImageFile($file, $uid)
|
||||
{
|
||||
$imageFile = array();
|
||||
|
||||
$cachePath = $this->app->getCacheRoot() . 'uploadimages/';
|
||||
if(!is_dir($cachePath)) mkdir($cachePath, 0777, true);
|
||||
|
||||
$imageFilePath = $cachePath . $uid . '/';
|
||||
if(!is_dir($imageFilePath)) mkdir($imageFilePath);
|
||||
|
||||
$fileName = basename($file['pathname']);
|
||||
$file['realpath'] = $imageFilePath . $fileName;
|
||||
|
||||
if($file['chunks'] > 1)
|
||||
{
|
||||
$fileSavePath = $cachePath . $file['chunkpath'];
|
||||
if(!file_exists($fileSavePath)) mkdir(dirname($fileSavePath));
|
||||
|
||||
if($file['chunk'] > 0)
|
||||
{
|
||||
$uploadFile = fopen($fileSavePath, 'a+b');
|
||||
$tmpChunkFile = fopen($file['tmpname'], 'rb');
|
||||
while($buff = fread($tmpChunkFile, 4069))
|
||||
{
|
||||
fwrite($uploadFile, $buff);
|
||||
}
|
||||
fclose($uploadFile);
|
||||
fclose($tmpChunkFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!move_uploaded_file($file['tmpname'], $fileSavePath)) return false;
|
||||
}
|
||||
|
||||
if($file['chunk'] == ($file['chunks'] - 1))
|
||||
{
|
||||
rename($fileSavePath, $file['realpath']);
|
||||
|
||||
$imageFile['extension'] = $file['extension'];
|
||||
$imageFile['pathname'] = $file['pathname'];
|
||||
$imageFile['title'] = $file['title'];
|
||||
$imageFile['realpath'] = $file['realpath'];
|
||||
$imageFile['size'] = $file['size'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!move_uploaded_file($file['tmpname'], $file['realpath'])) return false;
|
||||
|
||||
$imageFile['extension'] = $file['extension'];
|
||||
$imageFile['pathname'] = $file['pathname'];
|
||||
$imageFile['title'] = $file['title'];
|
||||
$imageFile['realpath'] = $file['realpath'];
|
||||
$imageFile['size'] = $file['size'];
|
||||
}
|
||||
|
||||
return $imageFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get extension of a file.
|
||||
*
|
||||
|
||||
@@ -11,13 +11,42 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<form class='form-condensed' enctype='multipart/form-data' method='post' target='hiddenwin' style='padding: 20px 5% 50px'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<td class='w-p70'><input type='file' name='file' class='form-control'/></td>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2'><div class='alert'><?php echo $lang->file->uploadImagesExplain?></div></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
js::import($jsRoot . 'uploader/min.js');
|
||||
css::import($jsRoot . 'uploader/min.css');
|
||||
?>
|
||||
<style>
|
||||
#uploader{padding: 20px;}
|
||||
#uploader > span{display:block; margin-bottom:10px; color: #29a8cd;}
|
||||
</style>
|
||||
<div class='uploader' id='uploader' data-url='<?php echo inlink('uploadImages', "module=$module¶ms=$params&uid=$uid");?>'>
|
||||
<div class='uploader-message text-center'>
|
||||
<div class='content'></div>
|
||||
<button type='button' class='close'>×</button>
|
||||
</div>
|
||||
<div class='file-list file-list-lg' data-drag-placeholder="<?php echo $lang->file->dragFile;?>"></div>
|
||||
<span><?php echo $this->lang->file->uploadImagesExplain?></span>
|
||||
<div class='uploader-footer'>
|
||||
<div class='uploader-status pull-right text-muted'></div>
|
||||
<button type='button' class='btn btn-primary uploader-btn-browse'><i class='icon icon-plus'></i><?php echo $lang->file->addFile;?></button>
|
||||
<button type='button' class='btn btn-success uploader-btn-start'><i class='icon icon-cloud-upload'></i><?php echo $lang->file->beginUpload;?></button>
|
||||
<?php echo html::a(inlink('uploadImages', "module=$module¶ms=$params&uid=$uid&locate=true"), $lang->save, '', "class='btn'");?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#uploader').uploader({
|
||||
onBeforeUpload: function(file)
|
||||
{
|
||||
this.plupload.setOption(
|
||||
{
|
||||
'multipart_params':
|
||||
{
|
||||
label: file.ext ? file.name.substr(0, file.name.length - file.ext.length - 1) : file.name,
|
||||
uuid: file.id,
|
||||
size: file.size
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -301,6 +301,8 @@ class mail extends control
|
||||
*/
|
||||
public function asyncSend()
|
||||
{
|
||||
/* Reload mail config. */
|
||||
$this->app->loadConfig('mail');
|
||||
$queueList = $this->mail->getQueue('wait', 'id_asc');
|
||||
$now = helper::now();
|
||||
if(isset($this->config->mail->async))$this->config->mail->async = 0;
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
<tr>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->story->product;?></th>
|
||||
<th><?php echo $lang->story->module;?></th>
|
||||
<th class='w-150px'><?php echo $lang->story->product;?></th>
|
||||
<th class='w-150px'><?php echo $lang->story->module;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th><?php echo $lang->story->plan;?></th>
|
||||
<th class='w-120px'><?php echo $lang->story->plan;?></th>
|
||||
<th class='w-80px'><?php echo $lang->story->stage;?></th>
|
||||
<?php if($productType != 'normal'):?>
|
||||
<th><?php echo $lang->product->branchName[$productType];?></th>
|
||||
<th class='w-80px'><?php echo $lang->product->branchName[$productType];?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->story->estimateAB;?></th>
|
||||
@@ -50,14 +50,14 @@
|
||||
<?php echo html::a($storyLink, sprintf('%03d', $story->id));?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->story->priList, $story->pri, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch"), $products[$story->product]->name, '_blank');?></td>
|
||||
<td class='text-left'><?php echo zget($modules, $story->module, '')?></td>
|
||||
<td class='text-left' title='<?php echo $products[$story->product]->name?>'><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch"), $products[$story->product]->name, '_blank');?></td>
|
||||
<td class='text-left' title='<?php echo zget($modules, $story->module, '')?>'><?php echo zget($modules, $story->module, '')?></td>
|
||||
<td class='text-left nobr' title="<?php echo $story->title?>"><?php echo html::a($storyLink, $story->title);?></td>
|
||||
<td><?php echo $story->planTitle;?></td>
|
||||
<td title='<?php echo $story->planTitle;?>'><?php echo $story->planTitle;?></td>
|
||||
<td><?php echo zget($lang->story->stageList, $story->stage);?></td>
|
||||
<?php if($productType != 'normal'):?>
|
||||
<td><?php if(isset($branchGroups[$story->product][$story->branch])) echo $branchGroups[$story->product][$story->branch];?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo zget($lang->story->stageList, $story->stage);?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
</tr>
|
||||
|
||||
@@ -66,9 +66,9 @@
|
||||
<th class='w-hour {sorter:false}'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
<th class='w-hour {sorter:false}'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-70px {sorter:false}'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th class='w-30px'> <?php echo $lang->story->taskCountAB;?></th>
|
||||
<th class='w-30px'> <?php echo $lang->story->bugCountAB;?></th>
|
||||
<th class='w-30px'> <?php echo $lang->story->caseCountAB;?></th>
|
||||
<th title='<?php echo $lang->story->taskCount?>' class='w-30px'><?php echo $lang->story->taskCountAB;?></th>
|
||||
<th title='<?php echo $lang->story->bugCount?>' class='w-30px'><?php echo $lang->story->bugCountAB;?></th>
|
||||
<th title='<?php echo $lang->story->caseCount?>' class='w-30px'><?php echo $lang->story->caseCountAB;?></th>
|
||||
<th class='w-110px {sorter:false}'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<?php if($product->type !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
|
||||
</strong>
|
||||
<div class='actions'>
|
||||
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=story¶ms=' . helper::safe64Encode("productID=$productID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn' data-width='600px'")?>
|
||||
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=story¶ms=' . helper::safe64Encode("productID=$productID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn' data-width='70%'")?>
|
||||
<?php echo html::commonButton($lang->pasteText, "data-toggle='myModal'")?>
|
||||
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i> </button>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,15 @@ class testreportModel extends model
|
||||
{
|
||||
$this->loadModel('product')->setMenu($products, $productID, $branch);
|
||||
$selectHtml = $this->product->select($products, $productID, 'testreport', 'browse', '', $branch);
|
||||
|
||||
/* Remove branch. */
|
||||
if(strpos($selectHtml, 'currentBranch') !== false)
|
||||
{
|
||||
$selectHtml = substr($selectHtml, 0, strpos($selectHtml, 'currentBranch'));
|
||||
$selectHtml = substr($selectHtml, 0, strrpos($selectHtml, '<'));
|
||||
if(strpos($selectHtml, '</li>') !== false) $selectHtml = substr($selectHtml, 0, strrpos($selectHtml, '</li>'));
|
||||
}
|
||||
|
||||
foreach($this->lang->testtask->menu as $key => $value)
|
||||
{
|
||||
$replace = ($key == 'product') ? $selectHtml : $productID;
|
||||
|
||||
@@ -11,53 +11,51 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='container mw-1400px'>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<strong><?php echo $lang->testreport->browse;?></strong>
|
||||
</div>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<strong><?php echo $lang->testreport->browse;?></strong>
|
||||
</div>
|
||||
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable' id='reportList'>
|
||||
<?php $vars = "objectID=$objectID&objectType=$objectType&extra=$extra&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testreport->title);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-120px'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->testreport->createdDate);?></th>
|
||||
<th class='w-250px'><?php common::printOrderLink('project', $orderBy, $vars, $lang->testreport->project);?></th>
|
||||
<th class='w-250px'><?php echo $lang->testreport->testtask;?></th>
|
||||
<th class='w-50px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($reports):?>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($reports as $report):?>
|
||||
<tr>
|
||||
<td><?php echo $report->id?></td>
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(inlink('view', "reportID=$report->id&from=$objectType"), $report->title)?></td>
|
||||
<td><?php echo zget($users, $report->createdBy);?></td>
|
||||
<td><?php echo substr($report->createdDate, 2);?></td>
|
||||
<?php $projectName = '#' . $report->project . $projects[$report->project];?>
|
||||
<td class='text-left' title='<?php echo $projectName?>'><?php echo $projectName;?></td>
|
||||
<?php
|
||||
$taskName = '';
|
||||
foreach(explode(',', $report->tasks) as $taskID) $taskName .= '#' . $taskID . $tasks[$taskID] . ' ';
|
||||
?>
|
||||
<td class='text-left' title='<?php echo $taskName?>'><?php echo $taskName;?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printIcon('testreport', 'edit', "id=$report->id", '', 'list');
|
||||
common::printIcon('testreport', 'delete', "id=$report->id", '', 'list', 'remove', 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot><tr><td colspan='7'><?php $pager->show();?></td></tr></tfoot>
|
||||
<?php else:?>
|
||||
<tbody><tr><td colspan='7'><?php echo $lang->testreport->noReport;?></td></tr></tbody>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</div>
|
||||
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable' id='reportList'>
|
||||
<?php $vars = "objectID=$objectID&objectType=$objectType&extra=$extra&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testreport->title);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-120px'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->testreport->createdDate);?></th>
|
||||
<th class='w-250px'><?php common::printOrderLink('project', $orderBy, $vars, $lang->testreport->project);?></th>
|
||||
<th class='w-250px'><?php echo $lang->testreport->testtask;?></th>
|
||||
<th class='w-50px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($reports):?>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($reports as $report):?>
|
||||
<tr>
|
||||
<td><?php echo $report->id?></td>
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(inlink('view', "reportID=$report->id&from=$objectType"), $report->title)?></td>
|
||||
<td><?php echo zget($users, $report->createdBy);?></td>
|
||||
<td><?php echo substr($report->createdDate, 2);?></td>
|
||||
<?php $projectName = '#' . $report->project . $projects[$report->project];?>
|
||||
<td class='text-left' title='<?php echo $projectName?>'><?php echo $projectName;?></td>
|
||||
<?php
|
||||
$taskName = '';
|
||||
foreach(explode(',', $report->tasks) as $taskID) $taskName .= '#' . $taskID . $tasks[$taskID] . ' ';
|
||||
?>
|
||||
<td class='text-left' title='<?php echo $taskName?>'><?php echo $taskName;?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printIcon('testreport', 'edit', "id=$report->id", '', 'list');
|
||||
common::printIcon('testreport', 'delete', "id=$report->id", '', 'list', 'remove', 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot><tr><td colspan='7'><?php $pager->show();?></td></tr></tfoot>
|
||||
<?php else:?>
|
||||
<tbody><tr><td colspan='7'><?php echo $lang->testreport->noReport;?></td></tr></tbody>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
+3
-2
@@ -1373,9 +1373,10 @@ function fixStyle()
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function startCron()
|
||||
function startCron(restart)
|
||||
{
|
||||
$.ajax({type:"GET", timeout:100, url:createLink('cron', 'ajaxExec')});
|
||||
if(typeof(restart) == 'undefined') restart = 0;
|
||||
$.ajax({type:"GET", timeout:100, url:createLink('cron', 'ajaxExec', 'restart=' + restart)});
|
||||
}
|
||||
|
||||
function computePasswordStrength(password)
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user