This commit is contained in:
sgm0422
2020-05-27 14:05:18 +08:00
31 changed files with 233 additions and 218 deletions
+22 -20
View File
@@ -36,25 +36,25 @@ class bugModel extends model
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
$pageNav = html::a(helper::createLink('qa', 'index', '', '', '', $this->session->program), $this->lang->qa->index) . $this->lang->colon;
}
else
{
if($this->config->global->flow == 'full')
{
$this->app->loadLang('qa');
$pageNav = '<div class="btn-group angle-btn"><div class="btn-group">' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '</div></div>';
$pageNav = '<div class="btn-group angle-btn"><div class="btn-group">' . html::a(helper::createLink('qa', 'index', 'locate=no', '', '', $this->session->program), $this->lang->qa->index, '', "class='btn'") . '</div></div>';
}
else
{
if(common::hasPriv('bug', 'report'))
{
$link = helper::createLink('bug', 'report', "productID=$productID&browseType=$browseType&branchID=$branch&moduleID=$moduleID");
$link = helper::createLink('bug', 'report', "productID=$productID&browseType=$browseType&branchID=$branch&moduleID=$moduleID", '', '', $this->session->program);
$pageActions .= html::a($link, "<i class='icon-common-report icon-bar-chart muted'></i> <span class='text'>" . $this->lang->bug->report->common . '</span>', '', "class='btn btn-link'");
}
if(common::hasPriv('bug', 'export'))
{
$link = helper::createLink('bug', 'export', "productID=$productID&orderBy=$orderBy");
$link = helper::createLink('bug', 'export', "productID=$productID&orderBy=$orderBy", '', '', $this->session->program);
$pageActions .= "<div class='btn-group'>";
$pageActions .= "<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'>";
$pageActions .= "<i class='icon icon-export muted'></i><span class='text'>{$this->lang->export}</span><span class='caret'></span></button>";
@@ -66,20 +66,20 @@ class bugModel extends model
}
if(common::hasPriv('bug', 'batchCreate'))
{
$link = helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID");
$link = helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", '', '', $this->session->program);
$pageActions .= html::a($link, "<i class='icon icon-plus'></i>" . $this->lang->bug->batchCreate, '', "class='btn btn-secondary'");
}
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
$link = helper::createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams");
$link = helper::createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams", '', '', $this->session->program);
$pageActions .= html::a($link, "<i class='icon-plus'></i>" . $this->lang->bug->create, '', "class='btn btn-primary btn-bug-create'");
}
else
{
if(common::hasPriv('bug', 'create'))
{
$link = helper::createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID");
$link = helper::createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", '', '', $this->session->program);
$pageActions .= html::a($link, "<i class='icon icon-plus'></i>" . $this->lang->bug->create, '', "class='btn btn-primary'");
}
}
@@ -135,6 +135,7 @@ class bugModel extends model
{
$now = helper::now();
$bug = fixer::input('post')
->setDefault('program', $this->session->program)
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', $now)
->setDefault('project,story,task', 0)
@@ -285,6 +286,7 @@ class bugModel extends model
}
}
$bug->program = $this->session->program;
$this->dao->insert(TABLE_BUG)->data($bug)
->autoCheck()
->batchCheck($this->config->bug->create->requiredFields, 'notempty')
@@ -415,7 +417,7 @@ class bugModel extends model
{
echo(js::alert($this->lang->bug->projectAccessDenied));
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('bug', 'index')));
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('bug', 'index', '', '', '', $this->session->program)));
die(js::locate('back'));
}
}
@@ -2476,7 +2478,7 @@ class bugModel extends model
}
}
$bugLink = inlink('view', "bugID=$bug->id");
$bugLink = helper::createLink('bug', 'view', "bugID=$bug->id", '', '', $this->session->program);
$account = $this->app->user->account;
$id = $col->id;
if($col->show)
@@ -2517,7 +2519,7 @@ class bugModel extends model
case 'id':
if($canBatchAction)
{
echo html::checkbox('bugIDList', array($bug->id => '')) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));
echo html::checkbox('bugIDList', array($bug->id => '')) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id", '', '', $this->session->program), sprintf('%03d', $bug->id));
}
else
{
@@ -2561,14 +2563,14 @@ class bugModel extends model
if(isset($stories[$bug->story]))
{
$story = $stories[$bug->story];
echo common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$story->id", 'html', true), $story->title, '', "class='iframe'") : $story->title;
echo common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$story->id", 'html', true, $this->session->program), $story->title, '', "class='iframe'") : $story->title;
}
break;
case 'task':
if(isset($tasks[$bug->task]))
{
$task = $tasks[$bug->task];
echo common::hasPriv('task', 'view') ? html::a(helper::createLink('task', 'view', "taskID=$task->id", 'html', true), $task->name, '', "class='iframe'") : $task->name;
echo common::hasPriv('task', 'view') ? html::a(helper::createLink('task', 'view', "taskID=$task->id", 'html', true, $this->session->program), $task->name, '', "class='iframe'") : $task->name;
}
break;
case 'type':
@@ -2623,7 +2625,7 @@ class bugModel extends model
}
elseif($buildID and common::hasPriv('build', 'view'))
{
echo html::a(helper::createLink('build', 'view', "buildID=$buildID"), $build, '', "title='$bug->openedBuild'");
echo html::a(helper::createLink('build', 'view', "buildID=$buildID", '', '', $this->session->program), $build, '', "title='$bug->openedBuild'");
}
else
{
@@ -2666,11 +2668,11 @@ class bugModel extends model
break;
case 'actions':
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true);
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true);
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'edit', $params, $bug, 'list');
common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy');
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true, '', '', $this->session->program);
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true, '', '', $this->session->program);
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true, '', '', $this->session->program);
common::printIcon('bug', 'edit', $params, $bug, 'list', '', '', '', '', '', '', $this->session->program);
common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy', '', '', '', '', '', $this->session->program);
break;
}
echo '</td>';
@@ -2695,7 +2697,7 @@ class bugModel extends model
$btnClass = $bug->assignedTo == 'closed' ? ' disabled' : '';
$btnClass = "iframe btn btn-icon-left btn-sm {$btnClass}";
$assignToLink = helper::createLink('bug', 'assignTo', "bugID=$bug->id", '', true);
$assignToLink = helper::createLink('bug', 'assignTo', "bugID=$bug->id", '', true, $this->session->program);
$assignToHtml = html::a($assignToLink, "<i class='icon icon-hand-right'></i> <span title='" . zget($users, $bug->assignedTo) . "' class='{$btnTextClass}'>{$assignedToText}</span>", '', "class='$btnClass'");
echo !common::hasPriv('bug', 'assignTo', $bug) ? "<span style='padding-left: 21px' class='{$btnTextClass}'>{$assignedToText}</span>" : $assignToHtml;
@@ -2727,7 +2729,7 @@ class bugModel extends model
if($id)
{
$name = $this->dao->select('title')->from(TABLE_BUG)->where('id')->eq($id)->fetch('title');
if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id", 'html'), "#$id " . $name);
if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id", 'html', '', $this->session->program), "#$id " . $name);
}
}
+23 -23
View File
@@ -36,7 +36,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
echo $moduleName;
if($moduleID)
{
$removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType&param=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("bugModule")';
$removeLink = $browseType == 'bymodule' ? $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}", '', '', $this->session->program) : 'javascript:removeCookieByKey("bugModule")';
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
}
?>
@@ -62,13 +62,13 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
foreach($lang->bug->mySelects as $key => $value)
{
echo '<li' . ($key == $currentBrowseType ? " class='active'" : '') . '>';
echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$key"), $value);
echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$key", '', '', $this->session->program), $value);
}
echo '</ul></li>';
}
elseif($menuItem->name == 'QUERY')
{
$searchBrowseLink = inlink('browse', "productID=$productID&branch=$branch&browseType=bySearch&param=%s");
$searchBrowseLink = $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&param=%s", '', '', $this->session->program);
$isBySearch = $browseType == 'bysearch';
include '../../common/view/querymenu.html.php';
}
@@ -88,14 +88,14 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
foreach($lang->bug->moreSelects as $menuBrowseType => $label)
{
$active = $menuBrowseType == $browseType ? 'btn-active-text' : '';
echo '<li>' . html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType"), "<span class='text'>{$label}</span>", '', "class='btn btn-link $active'") . '</li>';
echo '<li>' . html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType", '', '', $this->session->program), "<span class='text'>{$label}</span>", '', "class='btn btn-link $active'") . '</li>';
}
echo '</ul></div>';
}
}
else
{
echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType"), $label, '', "class='btn btn-link $active'");
echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType", '', '', $this->session->program), $label, '', "class='btn btn-link $active'");
}
}
?>
@@ -111,22 +111,22 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<?php
$class = common::hasPriv('bug', 'export') ? "" : "class='disabled'";
$misc = common::hasPriv('bug', 'export') ? "class='export'" : "class='disabled'";
$link = common::hasPriv('bug', 'export') ? $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=$browseType") : '#';
$link = common::hasPriv('bug', 'export') ? $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=$browseType", '', '', $this->session->program) : '#';
echo "<li $class>" . html::a($link, $lang->bug->export, '', $misc) . "</li>";
?>
</ul>
</div>
<?php if(!common::checkNotCN()):?>
<?php
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'", '', '', '', $this->session->program);
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams"), "<i class='icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary btn-bug-create'");
echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams", '', '', $this->session->program), "<i class='icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary btn-bug-create'");
}
else
{
common::printLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'");
common::printLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'", '', '', '', $this->session->program);
}
?>
<?php else:?>
@@ -135,12 +135,12 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
$link = $this->createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams");
$link = $this->createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams", '', '', $this->session->program);
echo html::a($link, "<i class='icon icon-plus'></i> {$lang->bug->create} </span><span class='caret'>", '', "class='btn btn-primary btn-bug-create'");
}
else
{
$link = $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID");
$link = $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", '', '', $this->session->program);
$disabled = '';
if(!common::hasPriv('bug', 'create'))
{
@@ -154,7 +154,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<?php $disabled = common::hasPriv('bug', 'batchCreate') ? '' : "class='disabled'";?>
<li <?php echo $disabled?>>
<?php
$batchLink = $this->createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID");
$batchLink = $this->createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", '', '', $this->session->program);
echo "<li>" . html::a($batchLink, "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate) . "</li>";
?>
</li>
@@ -175,7 +175,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<?php endif;?>
<?php echo $moduleTree;?>
<div class="text-center">
<?php common::printLink('tree', 'browse', "productID=$productID&view=bug", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
<?php common::printLink('tree', 'browse', "productID=$productID&view=bug", $lang->tree->manage, '', "class='btn btn-info btn-wide'", '', '', '', $this->session->program);?>
<hr class="space-sm" />
</div>
</div>
@@ -187,7 +187,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<p>
<span class="text-muted"><?php echo $lang->bug->noBug;?></span>
<?php if(common::hasPriv('bug', 'create')):?>
<?php echo html::a($this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID"), "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -241,7 +241,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<div class="table-actions btn-toolbar">
<div class='btn-group dropup'>
<?php
$actionLink = $this->createLink('bug', 'batchEdit', "productID=$productID&branch=$branch");
$actionLink = $this->createLink('bug', 'batchEdit', "productID=$productID&branch=$branch", '', '', $this->session->program);
$misc = common::hasPriv('bug', 'batchEdit') ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
echo html::commonButton($lang->edit, $misc);
?>
@@ -249,15 +249,15 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<ul class='dropdown-menu'>
<?php
$class = "class='disabled'";
$actionLink = $this->createLink('bug', 'batchConfirm');
$actionLink = $this->createLink('bug', 'batchConfirm', '', '', '', $this->session->program);
$misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : $class;
if($misc) echo "<li>" . html::a('javascript:;', $lang->bug->confirmBug, '', $misc) . "</li>";
$actionLink = $this->createLink('bug', 'batchClose');
$actionLink = $this->createLink('bug', 'batchClose', '', '', '', $this->session->program);
$misc = common::hasPriv('bug', 'batchClose') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : $class;
if($misc) echo "<li>" . html::a('javascript:;', $lang->bug->close, '', $misc) . "</li>";
$actionLink = $this->createLink('bug', 'batchActivate', "productID=$productID&branch=$branch");
$actionLink = $this->createLink('bug', 'batchActivate', "productID=$productID&branch=$branch", '', '', $this->session->program);
$misc = common::hasPriv('bug', 'batchActivate') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
if($misc) echo "<li>" . html::a('javascript:;', $lang->bug->activate, '', $misc) . "</li>";
@@ -271,7 +271,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
unset($lang->bug->resolutionList['tostory']);
foreach($lang->bug->resolutionList as $key => $resolution)
{
$actionLink = $this->createLink('bug', 'batchResolve', "resolution=$key");
$actionLink = $this->createLink('bug', 'batchResolve', "resolution=$key", '', '', $this->session->program);
if($key == 'fixed')
{
$withSearch = count($builds) > 4;
@@ -282,7 +282,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
unset($builds['']);
foreach($builds as $key => $build)
{
$actionLink = $this->createLink('bug', 'batchResolve', "resolution=fixed&resolvedBuild=$key");
$actionLink = $this->createLink('bug', 'batchResolve', "resolution=fixed&resolvedBuild=$key", '', '', $this->session->program);
echo "<li class='option' data-key='$key'>";
echo html::a('javascript:;', $build, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
echo "</li>";
@@ -321,7 +321,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
foreach($branches as $branchID => $branchName)
{
$searchKey = $withSearch ? ('data-key="' . zget($branchsPinYin, $branchName, '') . '"') : '';
$actionLink = $this->createLink('bug', 'batchChangeBranch', "branchID=$branchID");
$actionLink = $this->createLink('bug', 'batchChangeBranch', "branchID=$branchID", '', '', $this->session->program);
echo html::a('#', $branchName, '', "$searchKey onclick=\"setFormAction('$actionLink', 'hiddenwin')\" data-key='$branchID'");
}
?>
@@ -349,7 +349,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
foreach($modules as $moduleId => $module)
{
$searchKey = $withSearch ? ('data-key="' . zget($modulesPinYin, $module, '') . '"') : '';
$actionLink = $this->createLink('bug', 'batchChangeModule', "moduleID=$moduleId");
$actionLink = $this->createLink('bug', 'batchChangeModule', "moduleID=$moduleId", '', '', $this->session->program);
echo html::a('#', $module, '', "$searchKey onclick=\"setFormAction('$actionLink', 'hiddenwin')\" data-key='$moduleID'");
}
?>
@@ -374,7 +374,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<?php endif;?>
<div class="list-group">
<?php
$actionLink = $this->createLink('bug', 'batchAssignTo', "productID={$productID}&type=product");
$actionLink = $this->createLink('bug', 'batchAssignTo', "productID={$productID}&type=product", '', '', $this->session->program);
echo html::select('assignedTo', $memberPairs, '', 'class="hidden"');
foreach ($memberPairs as $key => $value)
{
+1
View File
@@ -199,6 +199,7 @@ class buildModel extends model
$build->bugs = '';
$build = fixer::input('post')
->setDefault('program', $this->session->program)
->setDefault('product', 0)
->setDefault('branch', 0)
->cleanInt('product,branch')
+2 -1
View File
@@ -85,7 +85,7 @@ class caselibModel extends model
$pageActions .= "<div class='btn-group'>";
if(common::hasPriv('caselib', 'exportTemplet'))
{
$link = helper::createLink('caselib', 'exportTemplet', "libID=$libID");
$link = helper::createLink('caselib', 'exportTemplet', "libID=$libID", '', '', $this->session->program);
$pageActions .= html::a($link, "<i class='icon icon-export muted'> </i>" . $this->lang->caselib->exportTemplet, '', "class='btn btn-link export'");
}
if(common::hasPriv('caselib', 'import'))
@@ -235,6 +235,7 @@ class caselibModel extends model
$lib = fixer::input('post')
->stripTags($this->config->caselib->editor->create['id'], $this->config->allowedTags)
->setForce('type', 'library')
->add('program', $this->session->program)
->add('addedBy', $this->app->user->account)
->add('addedDate', helper::now())
->remove('uid')
+13 -13
View File
@@ -53,12 +53,12 @@ js::set('flow', $config->global->flow);
</div>
<div class='btn-toolbar pull-right'>
<div class='btn-group'>
<?php common::printLink('caselib', 'exportTemplet', "libID=$libID", "<i class='icon icon-export muted'> </i>" . $lang->caselib->exportTemplet, '', "class='btn btn-link export' data-width='35%'");?>
<?php common::printLink('caselib', 'import', "libID=$libID", "<i class='icon muted icon-import'> </i>" . $lang->testcase->importFile, '', "class='btn btn-link export'");?>
<?php common::printLink('caselib', 'exportTemplet', "libID=$libID", "<i class='icon icon-export muted'> </i>" . $lang->caselib->exportTemplet, '', "class='btn btn-link export' data-width='35%'", '', '', '', $this->session->program);?>
<?php common::printLink('caselib', 'import', "libID=$libID", "<i class='icon muted icon-import'> </i>" . $lang->testcase->importFile, '', "class='btn btn-link export'", '', '', '', $this->session->program);?>
</div>
<?php $params = "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0);?>
<?php common::printLink('caselib', 'batchCreateCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->batchCreate, '', "class='btn btn-secondary'");?>
<?php common::printLink('caselib', 'createCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'");?>
<?php common::printLink('caselib', 'batchCreateCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->batchCreate, '', "class='btn btn-secondary'", '', '', '', $this->session->program);?>
<?php common::printLink('caselib', 'createCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'", '', '', '', $this->session->program);?>
</div>
</div>
<?php endif;?>
@@ -75,7 +75,7 @@ js::set('flow', $config->global->flow);
<?php endif;?>
<?php echo $moduleTree;?>
<div class="text-center">
<?php common::printLink('tree', 'browse', "libID=$libID&view=caselib", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
<?php common::printLink('tree', 'browse', "libID=$libID&view=caselib", $lang->tree->manage, '', "class='btn btn-info btn-wide'", '', '', '', $this->session->program);?>
<hr class="space-sm" />
</div>
</div>
@@ -87,7 +87,7 @@ js::set('flow', $config->global->flow);
<p>
<span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
<?php if(common::hasPriv('caselib', 'createCase')):?>
<?php echo html::a($this->createLink('caselib', 'createCase', "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0)), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('caselib', 'createCase', "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0), '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -124,7 +124,7 @@ js::set('flow', $config->global->flow);
<tr>
<td class='c-id'>
<?php if($canBatchAction):?>
<?php echo html::checkbox('caseIDList', array($case->id => '')) . html::a($this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version"), sprintf('%03d', $case->id));?>
<?php echo html::checkbox('caseIDList', array($case->id => '')) . html::a($this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version", '', '', $this->session->program), sprintf('%03d', $case->id));?>
<?php else:?>
<?php echo sprintf('%03d', $case->id);?>
<?php endif;?>
@@ -132,7 +132,7 @@ js::set('flow', $config->global->flow);
<td><span class='label-pri label-pri-<?php echo $case->pri;?>' title='<?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
<td class='text-left' title="<?php echo $case->title?>">
<?php if($modulePairs and $case->module) echo "<span title='{$lang->testcase->module}' class='label label-info label-badge'>{$modulePairs[$case->module]}</span> ";?>
<?php $viewLink = $this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version");?>
<?php $viewLink = $this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version", '', '', $this->session->program);?>
<?php echo html::a($viewLink, $case->title, null, "style='color: $case->color'");?>
</td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
@@ -144,7 +144,7 @@ js::set('flow', $config->global->flow);
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
if(common::hasPriv('testcase', 'delete'))
{
$deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes");
$deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes", '', '', $this->session->program);
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"caseList\", confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->testcase->delete}' class='btn'");
}
?>
@@ -158,7 +158,7 @@ js::set('flow', $config->global->flow);
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<div class='btn-group dropup'>
<?php $actionLink = $this->createLink('testcase', 'batchEdit', "libID=$libID&branch=0&type=lib");?>
<?php $actionLink = $this->createLink('testcase', 'batchEdit', "libID=$libID&branch=0&type=lib", '', '', $this->session->program);?>
<?php $misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";?>
<?php echo html::commonButton($lang->edit, $misc);?>
<?php if($canBatchDelete or $canBatchReview or $canBatchChangeModule):?>
@@ -167,7 +167,7 @@ js::set('flow', $config->global->flow);
<?php
if($canBatchDelete)
{
$actionLink = $this->createLink('testcase', 'batchDelete', "libID=$libID");
$actionLink = $this->createLink('testcase', 'batchDelete', "libID=$libID", '', '', $this->session->program);
$misc = "onclick=\"confirmBatchDelete('$actionLink')\"";
echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
}
@@ -180,7 +180,7 @@ js::set('flow', $config->global->flow);
unset($lang->testcase->reviewResultList['']);
foreach($lang->testcase->reviewResultList as $key => $result)
{
$actionLink = $this->createLink('testcase', 'batchReview', "result=$key");
$actionLink = $this->createLink('testcase', 'batchReview', "result=$key", '', '', $this->session->program);
echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . '</li>';
}
echo '</ul></li>';
@@ -195,7 +195,7 @@ js::set('flow', $config->global->flow);
echo '<ul class="dropdown-list">';
foreach($modules as $moduleId => $module)
{
$actionLink = $this->createLink('testcase', 'batchChangeModule', "moduleID=$moduleId");
$actionLink = $this->createLink('testcase', 'batchChangeModule', "moduleID=$moduleId", '', '', $this->session->program);
echo "<li class='option' data-key='$moduleID'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . "</li>";
}
echo '</ul>';
+2 -2
View File
@@ -993,10 +993,10 @@ class commonModel extends model
* @access public
* @return bool
*/
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '', $newline = true, $onlyBody = false, $object = null)
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '', $newline = true, $onlyBody = false, $object = null, $programID = 0)
{
if(!commonModel::hasPriv($module, $method, $object)) return false;
echo html::a(helper::createLink($module, $method, $vars, '', $onlyBody), $label, $target, $misc, $newline);
echo html::a(helper::createLink($module, $method, $vars, '', $onlyBody, $programID), $label, $target, $misc, $newline);
return true;
}
+1 -1
View File
@@ -315,7 +315,7 @@ class doc extends control
if(!$docResult or dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$docID = $docResult['id'];
$files = $docResult['files'];
$files = isset($docResult['files']) ? $docResult['files'] : '';
$lib = $this->doc->getLibByID($this->post->lib);
if($docResult['status'] == 'exists')
{
+1 -1
View File
@@ -108,7 +108,7 @@ class docModel extends model
}
$actions = $this->setFastMenu($fastLib);
$actions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), "<i class='icon icon-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
$actions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}", '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
$this->lang->modulePageActions = $actions;
}
+17 -17
View File
@@ -46,9 +46,9 @@ var browseType = '<?php echo $browseType;?>';
<div class="dropdown">
<button class="btn" type="button" data-toggle="dropdown"><i class='icon-cog'></i> <span class="caret"></span></button>
<ul class='dropdown-menu'>
<li><?php common::printLink('tree', 'browse', "libID=$libID&viewType=doc", "<i class='icon icon-cog'></i>" . $lang->doc->manageType);?></li>
<li><?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>" . $lang->doc->editLib, '', "class='iframe'");?></li>
<li><?php common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>" . $lang->doc->deleteLib, 'hiddenwin');?></li>
<li><?php common::printLink('tree', 'browse', "libID=$libID&viewType=doc", "<i class='icon icon-cog'></i>" . $lang->doc->manageType, '', '', '', '', '', $this->session->program);?></li>
<li><?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>" . $lang->doc->editLib, '', "class='iframe'", '', '', '', $this->session->program);?></li>
<li><?php common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>" . $lang->doc->deleteLib, 'hiddenwin', '', '', '', '', $this->session->program);?></li>
</ul>
</div>
<?php if(common::hasPriv('doc', 'create')):?>
@@ -57,7 +57,7 @@ var browseType = '<?php echo $browseType;?>';
<ul class='dropdown-menu'>
<?php foreach($lang->doc->typeList as $typeKey => $typeName):?>
<?php $class = strpos($config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';?>
<li><?php echo html::a($this->createLink('doc', 'create', "libID=$libID&moduleID=$moduleID&type=$typeKey"), $typeName, '', "class='$class'");?></li>
<li><?php echo html::a($this->createLink('doc', 'create', "libID=$libID&moduleID=$moduleID&type=$typeKey", '', '', $this->session->program), $typeName, '', "class='$class'");?></li>
<?php endforeach;?>
</ul>
</div>
@@ -75,7 +75,7 @@ var browseType = '<?php echo $browseType;?>';
<?php if($libID):?>
<span class="text-muted"><?php echo $lang->doc->noDoc;?></span>
<?php if(common::hasPriv('doc', 'create')):?>
<?php echo html::a($this->createLink('doc', 'create', "libID={$libID}&moduleID=$moduleID"), "<i class='icon icon-plus'></i> " . $lang->doc->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('doc', 'create', "libID={$libID}&moduleID=$moduleID", '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $lang->doc->create, '', "class='btn btn-info'");?>
<?php endif;?>
<?php elseif($browseType == 'byediteddate'):?>
<span class="text-muted"><?php echo $lang->doc->noEditedDoc;?></span>
@@ -105,17 +105,17 @@ var browseType = '<?php echo $browseType;?>';
<?php $star = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
<tr>
<td class="c-name"><?php echo html::a(inlink('browse', "libID={$lib->id}&browseType=all&param=0&orderBy=$orderBy&from=$from"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $lib->name);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'browse', "libID={$lib->id}&browseType=all&param=0&orderBy=$orderBy&from=$from", '', '', $this->session->program), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $lib->name);?></td>
<td class="c-num"></td>
<td class="c-user"></td>
<td class="c-datetime"></td>
<td class="c-datetime"></td>
<td>
<?php if(common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$lib->id&objectType=doclib");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$lib->id&objectType=doclib", '', '', $this->session->program);?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<?php endif;?>
<?php common::printLink('doc', 'editLib', "libID=$lib->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
<?php common::printLink('tree', 'browse', "rootID=$lib->id&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->tree->manage}' class='btn btn-link'")?>
<?php common::printLink('doc', 'editLib', "libID=$lib->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'", '', '', '', $this->session->program)?>
<?php common::printLink('tree', 'browse', "rootID=$lib->id&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->tree->manage}' class='btn btn-link'", '', '', '', $this->session->program)?>
</td>
</tr>
<?php endforeach;?>
@@ -124,9 +124,9 @@ var browseType = '<?php echo $browseType;?>';
<?php foreach($attachLibs as $libType => $attachLib):?>
<tr>
<?php if($libType == 'project'):?>
<td class="c-name"><?php echo html::a(inlink('allLibs', "type=project&product={$currentLib->product}"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'allLibs', "type=project&product={$currentLib->product}", '', '', $this->session->program), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<?php elseif($libType == 'files'):?>
<td class="c-name"><?php echo html::a(inlink('showFiles', "type=$type&objectID={$currentLib->$type}"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'showFiles', "type=$type&objectID={$currentLib->$type}", '', '', $this->session->program), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<?php endif;?>
<td class="c-num"></td>
<td class="c-user"></td>
@@ -141,14 +141,14 @@ var browseType = '<?php echo $browseType;?>';
<?php $star = strpos($module->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($module->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
<tr>
<td class="c-name"><?php echo html::a(inlink('browse', "libID=$libID&browseType=bymodule&param=$module->id&orderBy=$orderBy&from=$from"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $module->name);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'browse', "libID=$libID&browseType=bymodule&param=$module->id&orderBy=$orderBy&from=$from", '', '', $this->session->program), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $module->name);?></td>
<td class="c-num"></td>
<td class="c-user"></td>
<td class="c-datetime"></td>
<td class="c-datetime"></td>
<td class="c-actions">
<?php if(common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$module->id&objectType=module");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$module->id&objectType=module", '', '', $this->session->program);?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<?php endif;?>
</td>
</tr>
@@ -158,17 +158,17 @@ var browseType = '<?php echo $browseType;?>';
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
<tr>
<td class="c-name"><?php echo html::a(inlink('view', "docID=$doc->id"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title);?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id", '', '', $this->session->program), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title);?></td>
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'y-m-d');?></td>
<td class="c-actions">
<?php if(common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc", '', '', $this->session->program);?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<?php endif;?>
<?php common::printLink('doc', 'edit', "docID=$doc->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'")?>
<?php common::printLink('doc', 'delete', "docID=$doc->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
<?php common::printLink('doc', 'edit', "docID=$doc->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'", '', '', '', $this->session->program)?>
<?php common::printLink('doc', 'delete', "docID=$doc->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'", '', '', '', $this->session->program)?>
</td>
</tr>
<?php endforeach;?>
+10 -10
View File
@@ -37,7 +37,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
<li>
<?php
$text = zget($lang->doclib->create, $tabValue, '');
if($text and common::hasPriv($tabValue, 'create')) echo html::a($this->createLink($tabValue, 'create'), $text, '', "class='text-ellipsis'");
if($text and common::hasPriv($tabValue, 'create')) echo html::a($this->createLink($tabValue, 'create', '', '', '', $this->session->program), $text, '', "class='text-ellipsis'");
?>
</li>
<?php else:?>
@@ -60,9 +60,9 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
?>
<li <?php echo "class='$activeClass'";?>>
<?php if($customLibCount > 0):?>
<?php echo html::a($this->createLink('doc', 'objectLibs', "type=$tabValue&objectID=$tabMenu->id"), $icon . $tabMenu->name, '', "class='text-ellipsis' title='{$tabMenu->name}'");?>
<?php echo html::a($this->createLink('doc', 'objectLibs', "type=$tabValue&objectID=$tabMenu->id", '', '', $this->session->program), $icon . $tabMenu->name, '', "class='text-ellipsis' title='{$tabMenu->name}'");?>
<?php else:?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$mainLibID"), $icon . $tabMenu->name, '', "class='text-ellipsis' title='{$tabMenu->name}'");?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$mainLibID", '', '', $this->session->program), $icon . $tabMenu->name, '', "class='text-ellipsis' title='{$tabMenu->name}'");?>
<?php endif;?>
<?php if(isset($sideSubLibs[$tabValue][$tabMenu->id])):?>
<ul>
@@ -70,19 +70,19 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
<?php
if($subLibID == 'project')
{
$subLibLink = inlink('allLibs', "type=project&product=$tabMenu->id");
$subLibLink = $this->createLink('doc', 'allLibs', "type=project&product=$tabMenu->id", '', '', $this->session->program);
$activeClass = ($this->methodName == 'alllibs' && $type == 'project' && $$tabValue == $tabMenu->id) ? "class='active'" : '';
$icon = 'icon-stack';
}
elseif($subLibID == 'files')
{
$subLibLink = inlink('showFiles', "type=$tabValue&objectID=$tabMenu->id");
$subLibLink = $this->createLink('doc', 'showFiles', "type=$tabValue&objectID=$tabMenu->id", '', '', $this->session->program);
$activeClass = ($this->methodName == 'showfiles' && $type == $tabValue && $object->id == $tabMenu->id) ? "class='active'" : '';
$icon = 'icon-paper-clip';
}
else
{
$subLibLink = inlink('browse', "libID=$subLibID");
$subLibLink = $this->createLink('doc', 'browse', "libID=$subLibID", '', '', $this->session->program);
$activeClass = ($this->methodName == 'browse' && $browseType != 'bymodule' && $subLibID == $libID) ? "class='active'" : '';
$icon = 'icon-folder-outline';
}
@@ -126,7 +126,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
<li>
<?php
$text = zget($lang->doclib->create, $tabValue, '');
if($text and common::hasPriv('doc', 'createLib')) echo html::a($this->createLink('doc', 'createLib', "type={$tabValue}"), $text, '', "class='iframe' data-width='70%'");
if($text and common::hasPriv('doc', 'createLib')) echo html::a($this->createLink('doc', 'createLib', "type={$tabValue}", '', '', $this->session->program), $text, '', "class='iframe' data-width='70%'");
?>
</li>
<?php else:?>
@@ -139,13 +139,13 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
$activeClass = ($this->methodName == 'browse' && isset($currentLib->id) && $currentLib->id == $sideLibID) ? 'active' : $activeClass;
?>
<li <?php echo "class='$activeClass'";?>>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$sideLibID"), "<i class='icon icon-folder-o'></i> " . $sideLibName, '', "class='text-ellipsis' title='{$sideLibName}'");?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$sideLibID", '', '', $this->session->program), "<i class='icon icon-folder-o'></i> " . $sideLibName, '', "class='text-ellipsis' title='{$sideLibName}'");?>
<?php if(isset($allModules[$sideLibID])):?>
<ul>
<?php foreach($allModules[$sideLibID] as $module):?>
<?php if($module->parent != 0) continue;?>
<li <?php if($this->methodName == 'browse' && $browseType == 'bymodule' && $moduleID == $module->id) echo "class='active'";?>>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$sideLibID&browseType=byModule&param={$module->id}"), "<i class='icon icon-folder-outline'></i> " . $module->name, '', "class='text-ellipsis' title='{$module->name}'");?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$sideLibID&browseType=byModule&param={$module->id}", '', '', $this->session->program), "<i class='icon icon-folder-outline'></i> " . $module->name, '', "class='text-ellipsis' title='{$module->name}'");?>
<?php $this->doc->printChildModule($module, $sideLibID, $this->methodName, $browseType, $moduleID);?>
</li>
<?php endforeach;?>
@@ -185,7 +185,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
<strong><?php echo $lang->doc->customShowLibs;?></strong>
</div>
<div class='modal-body'>
<form action='<?php echo $this->createLink('custom', 'ajaxSetDoc');?>' target='hiddenwin' method='post'>
<form action='<?php echo $this->createLink('custom', 'ajaxSetDoc', '', '', '', $this->session->program);?>' target='hiddenwin' method='post'>
<table class='table table-form'>
<tr>
<td><?php echo html::checkbox('showLibs', $lang->doc->customShowLibsList, $config->doc->custom->showLibs);?></td>
+1 -1
View File
@@ -35,7 +35,7 @@ class jenkins extends control
*/
public function browse($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
if(common::hasPriv('jenkins', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('jenkins', 'create'), "<i class='icon icon-plus'></i> " . $this->lang->jenkins->create, '', "class='btn btn-primary'");
if(common::hasPriv('jenkins', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('jenkins', 'create', '', '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $this->lang->jenkins->create, '', "class='btn btn-primary'");
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
+5 -5
View File
@@ -13,11 +13,11 @@
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('job', 'browse'), "<span class='text'>{$lang->ci->task}</span>", '', "class='btn btn-link btn-active-text'");?>
<?php echo html::a($this->createLink('compile', 'browse'), "<span class='text'>{$lang->ci->history}</span>", '', "class='btn btn-link'");?>
<?php echo html::a($this->createLink('job', 'browse', '', '', '', $this->session->program), "<span class='text'>{$lang->ci->task}</span>", '', "class='btn btn-link btn-active-text'");?>
<?php echo html::a($this->createLink('compile', 'browse', '', '', '', $this->session->program), "<span class='text'>{$lang->ci->history}</span>", '', "class='btn btn-link'");?>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('job', 'create')) common::printLink('job', 'create', "", "<i class='icon icon-plus'></i> " . $lang->job->create, '', "class='btn btn-primary'");?>
<?php if(common::hasPriv('job', 'create')) common::printLink('job', 'create', "", "<i class='icon icon-plus'></i> " . $lang->job->create, '', "class='btn btn-primary'", '', '', '', $this->session->program);?>
</div>
</div>
<div id='mainContent'>
@@ -41,7 +41,7 @@
<?php foreach($jobList as $id => $job):?>
<tr>
<td class='text-center'><?php echo $id; ?></td>
<td title='<?php echo $job->name; ?>'><?php echo common::hasPriv('job', 'view') ? html::a($this->createLink('job', 'view', "jobID={$job->id}", 'html', true), $job->name, '', "class='iframe' data-width='90%'") : $job->name;?></td>
<td title='<?php echo $job->name; ?>'><?php echo common::hasPriv('job', 'view') ? html::a($this->createLink('job', 'view', "jobID={$job->id}", 'html', true, $this->session->program), $job->name, '', "class='iframe' data-width='90%'") : $job->name;?></td>
<td title='<?php echo $job->repoName; ?>'><?php echo $job->repoName; ?></td>
<td><?php echo zget($lang->job->frameList, $job->frame);?></td>
<?php $jenkins = urldecode($job->jkJob) . '@' . $job->jenkinsName;?>
@@ -55,7 +55,7 @@
common::printIcon('compile', 'browse', "jobID=$id", '', 'list', 'history');
common::printIcon('job', 'edit', "jobID=$id", '', 'list', 'edit');
common::printIcon('job', 'exec', "jobID=$id", '', 'list', 'play', 'hiddenwin');
if(common::hasPriv('job', 'delete')) echo html::a($this->createLink('job', 'delete', "jobID=$id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->job->delete}' class='btn'");
if(common::hasPriv('job', 'delete')) echo html::a($this->createLink('job', 'delete', "jobID=$id", '', '', $this->session->program), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->job->delete}' class='btn'");
?>
</td>
</tr>
+1 -1
View File
@@ -102,7 +102,7 @@ class product extends control
* @return void
*/
public function browse($productID = 0, $branch = '', $browseType = 'unclosed', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
{die();
/* Lower browse type. */
$browseType = strtolower($browseType);
+23 -23
View File
@@ -31,7 +31,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
echo $moduleName;
if($moduleID)
{
$removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType&param=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")';
$removeLink = $browseType == 'bymodule' ? $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}", '', '', $this->session->program) : 'javascript:removeCookieByKey("storyModule")';
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
}
?>
@@ -62,50 +62,50 @@ js::set('foldAll', $lang->project->treeLevel['root']);
foreach($lang->product->moreSelects as $key => $value)
{
$active = $key == $storyBrowseType ? 'btn-active-text' : '';
echo '<li>' . html::a($this->inlink('browse', "productID=$productID&branch=$branch&browseType=$key&param=0&storyType=$storyType"), "<span class='text'>{$value}</span>", '', "class='btn btn-link $active'") . '</li>';
echo '<li>' . html::a($this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$key&param=0&storyType=$storyType", '', '', $this->session->program), "<span class='text'>{$value}</span>", '', "class='btn btn-link $active'") . '</li>';
}
echo '</ul></div>';
}
}
elseif($menuItem->name == 'QUERY')
{
$searchBrowseLink = inlink('browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType&param=%s&storyType=$storyType");
$searchBrowseLink = $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType&param=%s&storyType=$storyType", '', '', $this->session->program);
$isBySearch = $this->session->storyBrowseType == 'bysearch';
include '../../common/view/querymenu.html.php';
}
else
{
echo html::a($this->inlink('browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType&param=0&storyType=$storyType"), "<span class='text'>$menuItem->text</span>" . ($menuItem->name == $this->session->storyBrowseType ? ' <span class="label label-light label-badge">' . $pager->recTotal . '</span>' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'");
echo html::a($this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType&param=0&storyType=$storyType", '', '', $this->session->program), "<span class='text'>$menuItem->text</span>" . ($menuItem->name == $this->session->storyBrowseType ? ' <span class="label label-light label-badge">' . $pager->recTotal . '</span>' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'");
}
}
?>
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->product->searchStory;?></a>
</div>
<div class="btn-toolbar pull-right">
<?php common::printIcon('story', 'report', "productID=$productID&browseType=$browseType&branchID=$branch&moduleID=$moduleID&chartType=pie&storyType=$storyType", '', 'button', 'bar-chart muted'); ?>
<?php common::printIcon('story', 'report', "productID=$productID&browseType=$browseType&branchID=$branch&moduleID=$moduleID&chartType=pie&storyType=$storyType", '', 'button', 'bar-chart muted', '', '', '', '', '', $this->session->program); ?>
<div class="btn-group">
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-export muted"></i> <span class="text"><?php echo $lang->export ?></span> <span class="caret"></span></button>
<ul class="dropdown-menu" id='exportActionMenu'>
<?php
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
$misc = common::hasPriv('story', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType") : '#';
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType", '', '', $this->session->program) : '#';
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
?>
</ul>
</div>
<?php if(!common::checkNotCN()):?>
<?php if(common::hasPriv('story', 'batchCreate')) echo html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID"), "<i class='icon icon-plus'></i> {$lang->story->batchCreate}", '', "class='btn btn btn-secondary'");?>
<?php if(common::hasPriv('story', 'batchCreate')) echo html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID", '', '', $this->session->program), "<i class='icon icon-plus'></i> {$lang->story->batchCreate}", '', "class='btn btn btn-secondary'");?>
<?php
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create&params=$wizardParams");
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create&params=$wizardParams", '', '', $this->session->program);
echo html::a($link, "<i class='icon icon-plus'></i> {$lang->story->create}", '', "class='btn btn-primary create-story-btn'");
}
else
{
$link = $this->createLink('story', 'create', "productID=$productID&branch=$branch&moduleID=$moduleID");
$link = $this->createLink('story', 'create', "productID=$productID&branch=$branch&moduleID=$moduleID", '', '', $this->session->program);
if(common::hasPriv('story', 'create')) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->story->create}", '', "class='btn btn-primary'");
}
?>
@@ -115,12 +115,12 @@ js::set('foldAll', $lang->project->treeLevel['root']);
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create&params=$wizardParams");
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create&params=$wizardParams", '', '', $this->session->program);
echo html::a($link, "<i class='icon icon-plus'></i> {$lang->story->create} </span><span class='caret'>", '', "class='btn btn-primary create-story-btn'");
}
else
{
$link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID");
$link = $this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID", '', '', $this->session->program);
$disabled = '';
if(!common::hasPriv('story', 'create'))
{
@@ -134,7 +134,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<?php $disabled = common::hasPriv('story', 'batchCreate') ? '' : "class='disabled'";?>
<li <?php echo $disabled?>>
<?php
$batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID");
$batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID", '', '', $this->session->program);
echo "<li>" . html::a($batchLink, "<i class='icon icon-plus'></i>" . $lang->story->batchCreate) . "</li>";
?>
</li>
@@ -156,7 +156,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<?php endif;?>
<?php echo $moduleTree;?>
<div class="text-center">
<?php common::printLink('tree', 'browse', "rootID=$productID&view=story", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
<?php common::printLink('tree', 'browse', "rootID=$productID&view=story", $lang->tree->manage, '', "class='btn btn-info btn-wide'", '', '', '', $this->session->program);?>
<hr class="space-sm" />
</div>
</div>
@@ -168,7 +168,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<p>
<span class="text-muted"><?php echo $lang->story->noStory;?></span>
<?php if(common::hasPriv('story', 'create')):?>
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}"), "<i class='icon icon-plus'></i> " . $lang->story->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}", '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $lang->story->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -230,7 +230,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<?php
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$disabled = $canBatchEdit ? '' : "disabled='disabled'";
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0&branch=$branch");
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0&branch=$branch", '', '', $this->session->program);
?>
<?php echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");?>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
@@ -238,7 +238,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<?php
$class = "class='disabled'";
$canBatchClose = common::hasPriv('story', 'batchClose') && strtolower($browseType) != 'closedbyme' && strtolower($browseType) != 'closedstory';
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0");
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0", '', '', $this->session->program);
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink')\"" : $class;
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
@@ -251,7 +251,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
unset($lang->story->reviewResultList['revert']);
foreach($lang->story->reviewResultList as $key => $result)
{
$actionLink = $this->createLink('story', 'batchReview', "result=$key");
$actionLink = $this->createLink('story', 'batchReview', "result=$key", '', '', $this->session->program);
if($key == 'reject')
{
echo "<li class='dropdown-submenu'>";
@@ -263,7 +263,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
foreach($lang->story->reasonList as $key => $reason)
{
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key", '', '', $this->session->program);
echo "<li>";
echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
echo "</li>";
@@ -291,7 +291,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
echo "<ul class='dropdown-list'>";
foreach($branches as $branchID => $branchName)
{
$actionLink = $this->createLink('story', 'batchChangeBranch', "branchID=$branchID");
$actionLink = $this->createLink('story', 'batchChangeBranch', "branchID=$branchID", '', '', $this->session->program);
echo "<li class='option' data-key='$branchID'>" . html::a('#', $branchName, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . "</li>";
}
echo '</ul>';
@@ -308,7 +308,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
{
if(empty($key)) continue;
if(strpos('tested|verified|released|closed', $key) === false) continue;
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key", '', '', $this->session->program);
echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . "</li>";
}
echo '</ul></li>';
@@ -340,7 +340,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
foreach($modules as $moduleId => $module)
{
$searchKey = $withSearch ? ('data-key="' . zget($modulesPinYin, $module, '') . '"') : '';
$actionLink = $this->createLink('story', 'batchChangeModule', "moduleID=$moduleId");
$actionLink = $this->createLink('story', 'batchChangeModule', "moduleID=$moduleId", '', '', $this->session->program);
echo html::a('#', empty($module) ? '/' : $module, '', "$searchKey onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
}
?>
@@ -370,7 +370,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
foreach($plans as $planID => $plan)
{
$searchKey = $withSearch ? ('data-key="' . zget($plansPinYin, $plan, '') . '"') : '';
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID");
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID", '', '', $this->session->program);
echo html::a('#', $plan, '', "$searchKey title='{$plan}' onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
}
?>
@@ -384,7 +384,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->assignedTo;?> <span class="caret"></span></button>
<?php
$withSearch = count($users) > 10;
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID");
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID", '', '', $this->session->program);
echo html::select('assignedTo', $users, '', 'class="hidden"');
?>
<div class="dropdown-menu search-list<?php if($withSearch) echo ' search-box-sink';?>" data-ride="searchList">
+2
View File
@@ -132,6 +132,7 @@ class releaseModel extends model
else
{
$build = new stdclass();
$build->program = $this->session->program;
$build->product = (int)$productID;
$build->branch = (int)$branch;
$build->name = $this->post->name;
@@ -152,6 +153,7 @@ class releaseModel extends model
if($this->post->build) $branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq($this->post->build)->fetch('branch');
$release = fixer::input('post')
->add('program', $this->session->program)
->add('product', (int)$productID)
->add('branch', (int)$branch)
->setDefault('stories', '')
+13 -13
View File
@@ -16,13 +16,13 @@
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php
echo html::a($this->inlink('browse', "productID={$product->id}&branch=$branch&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->inlink('browse', "productID={$product->id}&branch=$branch&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->inlink('browse', "productID={$product->id}&branch=$branch&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->createLink('release', 'browse', "productID={$product->id}&branch=$branch&type=all", '', '', $this->session->program), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->createLink('release', 'browse', "productID={$product->id}&branch=$branch&type=normal", '', '', $this->session->program), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->createLink('release', 'browse', "productID={$product->id}&branch=$branch&type=terminate", '', '', $this->session->program), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
?>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('release', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
<?php common::printLink('release', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'", '', '', '', $this->session->program);?>
</div>
</div>
<div id="mainContent" class='main-table'>
@@ -31,7 +31,7 @@
<p>
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
<?php if(common::hasPriv('release', 'create')):?>
<?php echo html::a($this->createLink('release', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('release', 'create', "productID=$product->id&branch=$branch", '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -53,14 +53,14 @@
<tbody>
<?php foreach($releases as $release):?>
<tr>
<td><?php echo html::a(helper::createLink('release', 'view', "releaseID=$release->id"), sprintf('%03d', $release->id));?></td>
<td><?php echo html::a(helper::createLink('release', 'view', "releaseID=$release->id", '', '', $this->session->program), sprintf('%03d', $release->id));?></td>
<td>
<?php
$flagIcon = $release->marker ? "<icon class='icon icon-flag-alt' title='{$lang->release->marker}'></icon> " : '';
echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon;
echo html::a($this->createLink('release', 'view', "release=$release->id", '', '', $this->session->program), $release->name) . $flagIcon;
?>
</td>
<td title='<?php echo $release->buildName?>'><?php echo empty($release->project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
<td title='<?php echo $release->buildName?>'><?php echo empty($release->project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID", '', '', $this->session->program), $release->buildName);?></td>
<?php if($product->type != 'normal'):?>
<td class='text-center' title='<?php echo zget($branches, $release->branch, '');?>'><?php echo $branches[$release->branch];?></td>
<?php endif;?>
@@ -71,17 +71,17 @@
</td>
<td class='c-actions'>
<?php
if(common::hasPriv('release', 'linkStory')) echo html::a(inlink('view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
if(common::hasPriv('release', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
if(common::hasPriv('release', 'linkStory')) echo html::a($this->createLink('release', 'view', "releaseID=$release->id&type=story&link=true", '', '', $this->session->program), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
if(common::hasPriv('release', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a($this->createLink('release', 'view', "releaseID=$release->id&type=bug&link=true", '', '', $this->session->program), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
if(common::hasPriv('release', 'changeStatus', $release))
{
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'");
echo html::a($this->createLink('release', 'changeStatus', "releaseID=$release->id&status=$changedStatus", '', '', $this->session->program), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'");
}
common::printIcon('release', 'edit', "release=$release->id", $release, 'list');
common::printIcon('release', 'edit', "release=$release->id", $release, 'list', '', '', '', '', '', '', $this->session->program);
if(common::hasPriv('release', 'delete', $release))
{
$deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes");
$deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes", '', '', $this->session->program);
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn' title='{$lang->release->delete}'");
}
?>
+15 -15
View File
@@ -16,7 +16,7 @@
<?php js::set('confirmUnlinkBug', $lang->release->confirmUnlinkBug)?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php $browseLink = $this->session->releaseList ? $this->session->releaseList : inlink('browse', "productID=$release->product");?>
<?php $browseLink = $this->session->releaseList ? $this->session->releaseList : $this->createLink('release', 'browse', "productID=$release->product", '', '', $this->session->program);?>
<?php common::printBack($browseLink, 'btn btn-primary');?>
<div class='divider'></div>
<div class='page-title'>
@@ -38,10 +38,10 @@
if(common::hasPriv('release', 'changeStatus', $release))
{
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ' . $lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'");
echo html::a($this->createLink('release', 'changeStatus', "releaseID=$release->id&status=$changedStatus", '', '', $this->session->program), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ' . $lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'");
}
if(common::hasPriv('release', 'edit')) echo html::a($this->createLink('release', 'edit', "releaseID=$release->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
if(common::hasPriv('release', 'delete')) echo html::a($this->createLink('release', 'delete', "releaseID=$release->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
if(common::hasPriv('release', 'edit')) echo html::a($this->createLink('release', 'edit', "releaseID=$release->id", '', '', $this->session->program), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
if(common::hasPriv('release', 'delete')) echo html::a($this->createLink('release', 'delete', "releaseID=$release->id", '', '', $this->session->program), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
}
?>
</div>
@@ -59,7 +59,7 @@
<?php endif;?>
<li <?php if($type == 'releaseInfo') echo "class='active'"?>><a href='#releaseInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan'], 'text-info') . ' ' . $lang->release->view;?></a></li>
<?php if($countStories or ($config->global->flow != 'onlyStory' and ($countBugs or $countLeftBugs))):?>
<li class='pull-right'><div><?php common::printIcon('release', 'export', '', '', 'button', '', '', "export btn-sm");?></div></li>
<li class='pull-right'><div><?php common::printIcon('release', 'export', '', '', 'button', '', '', "export btn-sm", '', '', '', $this->session->program);?></div></li>
<?php endif;?>
</ul>
<div class='tab-content'>
@@ -93,7 +93,7 @@
</thead>
<tbody class='text-center'>
<?php foreach($stories as $storyID => $story):?>
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id", '', true);?>
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id", '', true, $this->session->program);?>
<tr>
<td class='c-id text-left'>
<?php if($canBatchUnlink):?>
@@ -121,7 +121,7 @@
<?php
if(common::hasPriv('release', 'unlinkStory'))
{
$unlinkURL = $this->createLink('release', 'unlinkStory', "releaseID=$release->id&story=$story->id");
$unlinkURL = $this->createLink('release', 'unlinkStory', "releaseID=$release->id&story=$story->id", '', '', $this->session->program);
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkStory}'");
}
?>
@@ -137,13 +137,13 @@
<?php
if(common::hasPriv('release', 'batchUnlinkStory'))
{
$unlinkURL = inlink('batchUnlinkStory', "release=$release->id");
$unlinkURL = $this->createLink('release', 'batchUnlinkStory', "release=$release->id", '', '', $this->session->program);
echo html::a('###', $lang->release->batchUnlink, '', "onclick='setFormAction(\"$unlinkURL\", \"hiddenwin\", this)' class='btn'");
}
if(common::hasPriv('story', 'batchClose'))
{
$closeURL = $this->createLink('story', 'batchClose', "productID=$release->product");
$closeURL = $this->createLink('story', 'batchClose', "productID=$release->product", '', '', $this->session->program);
echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"\", this)' class='btn'");
}
?>
@@ -183,7 +183,7 @@
</thead>
<tbody class='text-center'>
<?php foreach($bugs as $bug):?>
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true, $this->session->program);?>
<tr>
<td class='c-id text-left'>
<?php if($canBatchUnlink):?>
@@ -206,7 +206,7 @@
<?php
if(common::hasPriv('release', 'unlinkBug'))
{
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id");
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id", '', '', $this->session->program);
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
}
?>
@@ -231,7 +231,7 @@
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"leftBug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
<div class='linkBox cell hidden'></div>
<?php endif;?>
<form class='main-table table-bug' method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug', "releaseID=$release->id&type=leftBug");?>" id='linkedBugsForm' data-ride="table">
<form class='main-table table-bug' method='post' target='hiddenwin' action="<?php echo $this->createLink('release', 'batchUnlinkBug', "releaseID=$release->id&type=leftBug", '', '', $this->session->program);?>" id='linkedBugsForm' data-ride="table">
<table class='table has-sort-head' id='leftBugList'>
<?php $canBatchUnlink = common::hasPriv('release', 'batchUnlinkBug');?>
<?php $vars = "releaseID={$release->id}&type=leftBug&link=$link&param=$param&orderBy=%s";?>
@@ -266,7 +266,7 @@
?>
<tbody class='text-center'>
<?php foreach($leftBugs as $bug):?>
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true, $this->session->program);?>
<tr>
<td class='c-id text-left'>
<?php if($canBatchUnlink):?>
@@ -292,7 +292,7 @@
<?php
if(common::hasPriv('release', 'unlinkBug'))
{
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug");
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug", '', '', $this->session->program);
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"leftBugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
}
?>
@@ -336,7 +336,7 @@
<tr>
<th><?php echo $lang->release->build;?></th>
<td title='<?php echo $release->buildName?>'>
<?php echo ($release->project) ? html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName, '_blank') : $release->buildName;?>
<?php echo ($release->project) ? html::a($this->createLink('build', 'view', "buildID=$release->buildID", '', '', $this->session->program), $release->buildName, '_blank') : $release->buildName;?>
</td>
</tr>
<tr>
+5 -1
View File
@@ -190,7 +190,11 @@ class repoModel extends model
public function create()
{
$this->checkConnection();
$data = fixer::input('post')->skipSpecial('path,client,account,password')->get();
$data = fixer::input('post')
->skipSpecial('path,client,account,password')
->add('program', $this->session->program)
->get();
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
if(empty($data->client)) $data->client = 'svn';
+7 -6
View File
@@ -172,6 +172,7 @@ class storyModel extends model
->add('assignedDate', 0)
->add('version', 1)
->add('status', 'draft')
->setDefault('program', $this->session->program)
->setDefault('plan,verify', '')
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', $now)
@@ -2909,12 +2910,12 @@ class storyModel extends model
break;
}
common::printIcon('story', 'change', $vars, $story, 'list', 'fork');
common::printIcon('story', 'review', $vars, $story, 'list', 'glasses');
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
common::printIcon('story', 'edit', $vars, $story, 'list');
if($this->config->global->flow != 'onlyStory') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$vars", $story, 'list', 'sitemap');
common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=0&storyID=$story->id", $story, 'list', 'treemap-alt', '', '', '', '', $this->lang->story->subdivide);
common::printIcon('story', 'change', $vars, $story, 'list', 'fork', '', '', '', '', '', $this->session->program);
common::printIcon('story', 'review', $vars, $story, 'list', 'glasses', '', '', '', '', '', $this->session->program);
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true, '', '', $this->session->program);
common::printIcon('story', 'edit', $vars, $story, 'list', '', '', '', '', '', '', $this->session->program);
if($this->config->global->flow != 'onlyStory') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$vars", $story, 'list', 'sitemap', '', '', '', '', '', $this->session->program);
common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=0&storyID=$story->id", $story, 'list', 'treemap-alt', '', '', '', '', $this->lang->story->subdivide, $this->session->program);
break;
}
echo '</td>';
+14 -13
View File
@@ -66,7 +66,7 @@ class testcaseModel extends model
}
if($exportTempletPriv)
{
$link = helper::createLink('testcase', 'exportTemplet', "productID=$productID");
$link = helper::createLink('testcase', 'exportTemplet', "productID=$productID", '', '', $this->session->program);
$pageActions .= '<li>' . html::a($link, $this->lang->testcase->exportTemplet, '', "class='export'") . '</li>';
}
$pageActions .= '</ul>';
@@ -190,6 +190,7 @@ class testcaseModel extends model
->add('status', $status)
->add('version', 1)
->add('fromBug', $bugID)
->add('program', $this->session->program)
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', $now)
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
@@ -1396,7 +1397,7 @@ class testcaseModel extends model
switch($id)
{
case 'id':
echo html::checkbox('caseIDList', array($case->id => '')) . html::a(helper::createLink('testcase', 'view', "caseID=$case->id"), sprintf('%03d', $case->id));
echo html::checkbox('caseIDList', array($case->id => '')) . html::a(helper::createLink('testcase', 'view', "caseID=$case->id", '', '', $this->session->program), sprintf('%03d', $case->id));
break;
case 'pri':
echo "<span class='label-pri label-pri-" . $case->pri . "' title='" . zget($this->lang->testcase->priList, $case->pri, $case->pri) . "'>";
@@ -1406,7 +1407,7 @@ class testcaseModel extends model
case 'title':
if($case->branch) echo "<span class='label label-info label-outline'>{$branches[$case->branch]}</span> ";
if($modulePairs and $case->module) echo "<span class='label label-gray label-badge'>{$modulePairs[$case->module]}</span> ";
echo $canView ? ($fromCaseID ? html::a($caseLink, $case->title, null, "style='color: $case->color'") . html::a(helper::createLink('testcase', 'view', "caseID=$fromCaseID"), "[<i class='icon icon-share' title='{$this->lang->testcase->fromCase}'></i>#$fromCaseID]") : html::a($caseLink, $case->title, null, "style='color: $case->color'")) : "<span style='color: $case->color'>$case->title</span>";
echo $canView ? ($fromCaseID ? html::a($caseLink, $case->title, null, "style='color: $case->color'") . html::a(helper::createLink('testcase', 'view', "caseID=$fromCaseID", '', '', $this->session->program), "[<i class='icon icon-share' title='{$this->lang->testcase->fromCase}'></i>#$fromCaseID]") : html::a($caseLink, $case->title, null, "style='color: $case->color'")) : "<span style='color: $case->color'>$case->title</span>";
break;
case 'branch':
echo $branches[$case->branch];
@@ -1437,7 +1438,7 @@ class testcaseModel extends model
case 'story':
static $stories = array();
if(empty($stories)) $stories = $this->dao->select('id,title')->from(TABLE_STORY)->where('deleted')->eq('0')->andWhere('product')->eq($case->product)->fetchPairs('id', 'title');
if($case->story and isset($stories[$case->story])) echo html::a(helper::createLink('story', 'view', "storyID=$case->story"), $stories[$case->story]);
if($case->story and isset($stories[$case->story])) echo html::a(helper::createLink('story', 'view', "storyID=$case->story", '', '', $this->session->program), $stories[$case->story]);
break;
case 'precondition':
echo $case->precondition;
@@ -1478,10 +1479,10 @@ class testcaseModel extends model
echo "<span class='$class'>" . $lastRunResultText . "</span>";
break;
case 'bugs':
echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a(helper::createLink('testcase', 'bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs;
echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a(helper::createLink('testcase', 'bugs', "runID=0&caseID={$case->id}", '', '', $this->session->program), $case->bugs, '', "class='iframe'") : $case->bugs;
break;
case 'results':
echo (common::hasPriv('testtask', 'results') and $case->results) ? html::a(helper::createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->results, '', "class='iframe'") : $case->results;
echo (common::hasPriv('testtask', 'results') and $case->results) ? html::a(helper::createLink('testtask', 'results', "runID=0&caseID={$case->id}", '', '', $this->session->program), $case->results, '', "class='iframe'") : $case->results;
break;
case 'stepNumber':
echo $case->stepNumber;
@@ -1489,16 +1490,16 @@ class testcaseModel extends model
case 'actions':
if($case->needconfirm or $browseType == 'needconfirm')
{
common::printIcon('testcase', 'confirmstorychange', "caseID=$case->id", $case, 'list', 'confirm', 'hiddenwin', '', '', '', $this->lang->confirm);
common::printIcon('testcase', 'confirmstorychange', "caseID=$case->id", $case, 'list', 'confirm', 'hiddenwin', '', '', '', $this->lang->confirm, $this->session->program);
break;
}
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", $case, 'list', '', '', 'iframe', true, "data-width='95%'");
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", $case, 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
if($this->config->testcase->needReview or !empty($this->config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'glasses', '', 'iframe');
common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'bug', '', 'iframe', '', "data-width='90%'");
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase&param=$case->id", $case, 'list', 'copy');
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", $case, 'list', '', '', 'iframe', true, "data-width='95%'", '', $this->session->program);
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", $case, 'list', 'play', '', 'runCase iframe', false, "data-width='95%'", '', $this->session->program);
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list', '', '', '', '', '', '', $this->session->program);
if($this->config->testcase->needReview or !empty($this->config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'glasses', '', 'iframe', '', '', '', $this->session->program);
common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'bug', '', 'iframe', '', "data-width='90%'", '', $this->session->program);
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase&param=$case->id", $case, 'list', 'copy', '', '', '', '', '', $this->session->program);
break;
}
+2 -2
View File
@@ -35,7 +35,7 @@ js::set('suiteID', $suiteID);
<?php endif;?>
<?php echo $moduleTree;?>
<div class='text-center'>
<?php common::printLink('tree', 'browse', "productID=$productID&view=case", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
<?php common::printLink('tree', 'browse', "productID=$productID&view=case", $lang->tree->manage, '', "class='btn btn-info btn-wide'", '', '', '', $this->session->program);?>
<hr class="space-sm" />
</div>
</div>
@@ -49,7 +49,7 @@ js::set('suiteID', $suiteID);
<span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
<?php if(common::hasPriv('testcase', 'create')):?>
<?php $initModule = isset($moduleID) ? (int)$moduleID : 0;?>
<?php echo html::a($this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule"), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule", '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
+15 -15
View File
@@ -8,7 +8,7 @@
echo !empty($moduleID) ? $moduleName : $this->lang->tree->all;
if(!empty($moduleID))
{
$removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType&param=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
$removeLink = $browseType == 'bymodule' ? $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}", '', '', $this->session->program) : 'javascript:removeCookieByKey("caseModule")';
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
}
?>
@@ -28,13 +28,13 @@
if($config->global->flow == 'onlyTest' and (strpos(',needconfirm,group,zerocase,', ',' . $menuType . ',') !== false)) continue;
if($hasBrowsePriv and $menuType == 'QUERY')
{
$searchBrowseLink = inlink('browse', "productID=$productID&branch=$branch&browseType=bySearch&param=%s");
$searchBrowseLink = $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&param=%s", '', '', $this->session->program);
$isBySearch = $browseType == 'bysearch';
include '../../common/view/querymenu.html.php';
}
elseif($hasBrowsePriv and ($menuType == 'all' or $menuType == 'needconfirm' or $menuType == 'wait'))
{
echo html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$menuType"), "<span class='text'>{$menuItem->text}</span>", '', "class='btn btn-link' id='{$menuType}Tab'");
echo html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$menuType", '', '', $this->session->program), "<span class='text'>{$menuItem->text}</span>", '', "class='btn btn-link' id='{$menuType}Tab'");
}
elseif($hasBrowsePriv and $menuType == 'suite')
{
@@ -49,7 +49,7 @@
if(empty($suiteList))
{
echo '<li>';
echo html::a($this->createLink('testsuite', 'create', "productID=$productID"), "<i class='icon-plus'></i>" . $lang->testsuite->create);
echo html::a($this->createLink('testsuite', 'create', "productID=$productID", '', '', $this->session->program), "<i class='icon-plus'></i>" . $lang->testsuite->create);
echo '</li>';
}
@@ -57,7 +57,7 @@
{
$suiteName = $suite->name;
echo '<li' . ($suiteID == (int)$currentSuiteID ? " class='active'" : '') . '>';
echo html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySuite&param=$suiteID"), $suiteName);
echo html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySuite&param=$suiteID", '', '', $this->session->program), $suiteName);
echo "</li>";
}
@@ -69,12 +69,12 @@
$active = !empty($groupBy) ? 'btn-active-text' : '';
echo "<div id='groupTab' class='btn-group'>";
echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&branch=$branch&groupBy=story"), "<span class='text'>{$lang->testcase->groupByStories}</span>", '', "class='btn btn-link $active'");
echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&branch=$branch&groupBy=story", '', '', $this->session->program), "<span class='text'>{$lang->testcase->groupByStories}</span>", '', "class='btn btn-link $active'");
echo '</div>';
}
elseif($hasZeroPriv and $menuType == 'zerocase')
{
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID"), "<span class='text'>{$lang->story->zeroCase}</span>", '', "class='btn btn-link' id='zerocaseTab'");
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID", '', '', $this->session->program), "<span class='text'>{$lang->story->zeroCase}</span>", '', "class='btn btn-link' id='zerocaseTab'");
}
?>
<?php endforeach;?>
@@ -92,12 +92,12 @@
<?php
$class = common::hasPriv('testcase', 'export') ? '' : "class=disabled";
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy&taskID=0&browseType=$browseType") : '#';
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy&taskID=0&browseType=$browseType", '', '', $this->session->program) : '#';
echo "<li $class>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
$class = common::hasPriv('testcase', 'exportTemplet') ? '' : "class=disabled";
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID", '', '', $this->session->program) : '#';
echo "<li $class>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
?>
</ul>
@@ -108,12 +108,12 @@
<?php
$class = common::hasPriv('testcase', 'import') ? '' : "class=disabled";
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch", '', '', $this->session->program) : '#';
echo "<li $class>" . html::a($link, $lang->testcase->importFile, '', $misc) . "</li>";
$class = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch", '', '', $this->session->program) : '#';
echo "<li $class>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
?>
</ul>
@@ -123,20 +123,20 @@
<?php
if(common::hasPriv('testcase', 'batchCreate'))
{
$link = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
$link = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule", '', '', $this->session->program);
echo html::a($link, "<i class='icon-plus'></i> " . $lang->testcase->batchCreate, '', "class='btn btn-secondary'");
}
if(common::hasPriv('testcase', 'create'))
{
$link = $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
$link = $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule", '', '', $this->session->program);
echo html::a($link, "<i class='icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");
}
?>
<?php else:?>
<div class='btn-group dropdown-hover'>
<?php
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '###';
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule", '', '', $this->session->program) : '###';
$disabled = common::hasPriv('testcase', 'create') ? '' : "disabled";
echo html::a($link, "<i class='icon icon-plus'></i> {$lang->testcase->create} </span><span class='caret'>", '', "class='btn btn-primary $disabled'");
?>
@@ -144,7 +144,7 @@
<?php $disabled = common::hasPriv('testcase', 'batchCreate') ? '' : "class='disabled'";?>
<li <?php echo $disabled?>>
<?php
$batchLink = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
$batchLink = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule", '', '', $this->session->program);
echo "<li>" . html::a($batchLink, "<i class='icon icon-plus'></i>" . $lang->testcase->batchCreate) . "</li>";
?>
</li>
+1
View File
@@ -91,6 +91,7 @@ class testreportModel extends model
{
$data = fixer::input('post')
->stripTags($this->config->testreport->editor->create['id'], $this->config->allowedTags)
->add('program', $this->session->program)
->add('createdBy', $this->app->user->account)
->add('createdDate', helper::now())
->join('stories', ',')
+5 -5
View File
@@ -20,7 +20,7 @@
</span>
</div>
<div class='pull-right btn-toolbar'>
<?php if($objectType == 'product') common::printLink('testreport', 'create', "objectID=0&objectType=testtask&productID=$objectID", "<i class='icon icon-plus'></i>" . $lang->testreport->create, '', "class='btn btn-primary'");?>
<?php if($objectType == 'product') common::printLink('testreport', 'create', "objectID=0&objectType=testtask&productID=$objectID", "<i class='icon icon-plus'></i>" . $lang->testreport->create, '', "class='btn btn-primary'", '', '', '', $this->session->program);?>
</div>
</div>
<?php endif;?>
@@ -49,8 +49,8 @@
<tbody class='text-center'>
<?php foreach($reports as $report):?>
<tr>
<td><?php echo html::a(helper::createLink('testreport', 'view', "reportID=$report->id"), sprintf('%03d', $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 html::a(helper::createLink('testreport', 'view', "reportID=$report->id", '', '', $this->session->program), sprintf('%03d', $report->id));?></td>
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(helper::createLink('testreport', 'view', "reportID=$report->id&from=$objectType", '', '', $this->session->program), $report->title)?></td>
<td><?php echo zget($users, $report->createdBy);?></td>
<td><?php echo substr($report->createdDate, 2);?></td>
<?php if($config->global->flow != 'onlyTest'):?>
@@ -64,8 +64,8 @@
<td class='text-left' title='<?php echo $taskName?>'><?php echo $taskName;?></td>
<td class='c-actions'>
<?php
common::printIcon('testreport', 'edit', "id=$report->id", '', 'list');
common::printIcon('testreport', 'delete', "id=$report->id", '', 'list', 'trash', 'hiddenwin');
common::printIcon('testreport', 'edit', "id=$report->id", '', 'list', '', '', '', '', '', '', $this->session->program);
common::printIcon('testreport', 'delete', "id=$report->id", '', 'list', 'trash', 'hiddenwin', '', '', '', '', $this->session->program);
?>
</td>
</tr>
+1
View File
@@ -111,6 +111,7 @@ class testsuiteModel extends model
{
$suite = fixer::input('post')
->stripTags($this->config->testsuite->editor->create['id'], $this->config->allowedTags)
->add('program', $this->session->program)
->add('product', (int)$productID)
->add('addedBy', $this->app->user->account)
->add('addedDate', helper::now())
+7 -7
View File
@@ -22,7 +22,7 @@
</a>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('testsuite', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-primary'");?>
<?php common::printLink('testsuite', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-primary'", '', '', '', $this->session->program);?>
</div>
</div>
<?php endif;?>
@@ -32,7 +32,7 @@
<p>
<span class="text-muted"><?php echo $lang->testsuite->noTestsuite;?></span>
<?php if(common::hasPriv('testsuite', 'create')):?>
<?php echo html::a($this->createLink('testsuite', 'create', "product=$productID"), "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('testsuite', 'create', "product=$productID", '', '', $this->session->program), "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -52,23 +52,23 @@
<tbody>
<?php foreach($suites as $suite):?>
<tr class='text-left'>
<td><?php echo html::a(helper::createLink('testsuite', 'view', "suiteID=$suite->id"), sprintf('%03d', $suite->id));?></td>
<td><?php echo html::a(helper::createLink('testsuite', 'view', "suiteID=$suite->id", '', '', $this->session->program), sprintf('%03d', $suite->id));?></td>
<td class='text-left' title="<?php echo $suite->name?>">
<?php if($suite->type == 'public') echo "<span class='label label-success label-badge'>{$lang->testsuite->authorList['public']}</span> ";?>
<?php if($suite->type == 'private') echo "<span class='label label-info label-badge'>{$lang->testsuite->authorList['private']}</span> ";?>
<?php echo html::a(inlink('view', "suiteID=$suite->id"), $suite->name);?>
<?php echo html::a(helper::createLink('testsuite', 'view', "suiteID=$suite->id", '', '', $this->session->program), $suite->name);?>
</td>
<td><?php echo $suite->desc;?></td>
<td><?php echo zget($users, $suite->addedBy);?></td>
<td><?php echo $suite->addedDate;?></td>
<td class='c-actions'>
<?php
common::printIcon('testsuite', 'linkCase', "suiteID=$suite->id", $suite, 'list', 'link');
common::printIcon('testsuite', 'edit', "suiteID=$suite->id", $suite, 'list');
common::printIcon('testsuite', 'linkCase', "suiteID=$suite->id", $suite, 'list', 'link', '', '', '', '', '', $this->session->program);
common::printIcon('testsuite', 'edit', "suiteID=$suite->id", $suite, 'list', '', '', '', '', '', '', $this->session->program);
if(common::hasPriv('testsuite', 'delete', $suite))
{
$deleteURL = $this->createLink('testsuite', 'delete', "suiteID=$suite->id&confirm=yes");
$deleteURL = $this->createLink('testsuite', 'delete', "suiteID=$suite->id&confirm=yes", '', '', $this->session->program);
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"suiteList\", confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->testsuite->delete}' class='btn'");
}
?>
+14 -14
View File
@@ -30,13 +30,13 @@ $status = $this->session->testTaskVersionStatus;
<a href='javascript:;' class='btn btn-link btn-limit' data-toggle='dropdown'><span class='text' title='<?php echo $viewName;?>'><?php echo $viewName;?></span> <span class='caret'></span></a>
<ul class='dropdown-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
<?php
echo "<li>" . html::a(inlink('browse', "productID=$productID&branch=0&type=all,$status"), $lang->testtask->all) . "</li>";
echo "<li>" . html::a(inlink('browse', "productID=$productID&branch=$branch&type=local,$status"), $productName, '', "title='{$productName}' class='text-ellipsis'") . "</li>";
echo "<li>" . html::a($this->createLink('testtask', 'browse', "productID=$productID&branch=0&type=all,$status", '', '', $this->session->program), $lang->testtask->all) . "</li>";
echo "<li>" . html::a($this->createLink('testtask', 'browse', "productID=$productID&branch=$branch&type=local,$status", '', '', $this->session->program), $productName, '', "title='{$productName}' class='text-ellipsis'") . "</li>";
?>
</ul>
</div>
<?php foreach($lang->testtask->featureBar['browse'] as $key => $label):?>
<?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,$key"), "<span class='text'>$label</span>", '', "id='{$key}Tab' class='btn btn-link'");?>
<?php echo html::a($this->createLink('testtask', 'browse', "productID=$productID&branch=$branch&type=$scope,$key", '', '', $this->session->program), "<span class='text'>$label</span>", '', "id='{$key}Tab' class='btn btn-link'");?>
<?php endforeach;?>
<?php $condition = "productID=$productID&branch=$branch&type=$scope,$status&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}&pageID=1"?>
<div class='input-group w-300px input-group-sm'>
@@ -47,7 +47,7 @@ $status = $this->session->testTaskVersionStatus;
</div>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('testtask', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
<?php common::printLink('testtask', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'", '', '', '', $this->session->program);?>
</div>
</div>
<?php endif;?>
@@ -57,7 +57,7 @@ $status = $this->session->testTaskVersionStatus;
<p>
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
<?php if(common::hasPriv('testtask', 'create')):?>
<?php echo html::a($this->createLink('testtask', 'create', "product=$productID"), "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('testtask', 'create', "product=$productID"), '', '', $this->session->program, "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -83,13 +83,13 @@ $status = $this->session->testTaskVersionStatus;
<tbody>
<?php foreach($tasks as $task):?>
<tr class='text-left'>
<td><?php echo html::a(inlink('cases', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a(inlink('cases', "taskID=$task->id"), $task->name);?></td>
<td><?php echo html::a($this->createLink('testtask', 'cases', "taskID=$task->id", '', '', $this->session->program), sprintf('%03d', $task->id));?></td>
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a($this->createLink('testtask', 'cases', "taskID=$task->id", '', '', $this->session->program), $task->name);?></td>
<td class='c-name' title="<?php echo $task->productName?>"><?php echo $task->productName?></td>
<?php if($config->global->flow != 'onlyTest'):?>
<td class='c-name' title="<?php echo $task->projectName?>"><?php echo $task->projectName?></td>
<?php endif;?>
<td class='c-name'><?php echo ($task->build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build",'',true), $task->buildName);?></td>
<td class='c-name'><?php echo ($task->build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build", '', true, $this->session->program), $task->buildName);?></td>
<td><?php echo zget($users, $task->owner);?></td>
<td><?php echo $task->begin?></td>
<td><?php echo $task->end?></td>
@@ -102,15 +102,15 @@ $status = $this->session->testTaskVersionStatus;
<td class='c-actions'>
<?php
echo '<div id="action-divider">';
common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link');
common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list','flag');
common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap', '', '', '', '', '', $this->session->program);
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link', '', '', '', '', '', $this->session->program);
common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list','flag', '', '', '', '', '', $this->session->program);
echo '</div>';
common::printIcon('testtask', 'view', "taskID=$task->id", '', 'list', 'list-alt','','iframe',true);
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list','','','',true);
common::printIcon('testtask', 'view', "taskID=$task->id", '', 'list', 'list-alt','','iframe',true, '', '', $this->session->program);
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list','','','',true, '', '', $this->session->program);
if(common::hasPriv('testtask', 'delete', $task))
{
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes", '', '', $this->session->program);
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '<i class="icon-common-delete icon-trash"></i>', '', "title='{$lang->testtask->delete}' class='btn'");
}
?>
+6 -5
View File
@@ -9992,7 +9992,7 @@ KindEditor.plugin('wordpaste', function(K) {
/* ========================================================================
* ZUI: Kindeditor plugin - zui
* http://zui.sexy
* http://openzui.com
* ========================================================================
* Copyright (c) 2019-2019 cnezsoft.com; Licensed MIT
* ======================================================================== */
@@ -10054,9 +10054,10 @@ KindEditor.plugin('zui', function(K) {
});
}
});
/* ========================================================================
* ZUI: Kindeditor plugin - placeholder
* http://zui.sexy
* http://openzui.com
* ========================================================================
* Copyright (c) 2019-2019 cnezsoft.com; Licensed MIT
* ======================================================================== */
@@ -10082,7 +10083,7 @@ KindEditor.EditorClass.prototype.setPlaceholder = function(placeholder, asHtml)
};
KindEditor.EditorClass.prototype.getPlaceholder = function(asHtml) {
return self.$placeholder && self.$placeholder[asHtml ? 'html' : 'text']();
return this.$placeholder ? this.$placeholder[asHtml ? 'html' : 'text']() : '';
};
KindEditor.plugin('placeholder', function(K) {
@@ -10114,7 +10115,7 @@ KindEditor.plugin('placeholder', function(K) {
/* ========================================================================
* ZUI: Kindeditor plugin - paste-image
* http://zui.sexy
* http://openzui.com
* ========================================================================
* Copyright (c) 2019-2019 cnezsoft.com; Licensed MIT
* ======================================================================== */
@@ -10433,7 +10434,7 @@ KindEditor.plugin('table', function (K) {
};
var $elements = [];
var langName = $.clientLang ? $.clientLang() : ($.zui && $.zui.clientLang) ? $.zui.clientLang() : 'en';
var lang = ($.zui && $.zui.getLangData) ? $.zui.getLangData('kindeditor.advanceTable', langName, allLangs) : $.extend({}, allLangs.en, self.lang('table.'), allLangs[langName]);
var lang = ($.zui && $.zui.getLangData) ? $.extend({}, self.lang('table.'), $.zui.getLangData('kindeditor.advanceTable', langName, allLangs)) : $.extend({}, allLangs.en, self.lang('table.'), allLangs[langName]);
var defaultTableBorderColor = self.options.tableBorderColor || '#ddd';
self.tableIdIndex = 0;
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long