Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -139,6 +139,7 @@ $config->openMethods[] = 'index.changelog';
|
||||
$config->openMethods[] = 'my.preference';
|
||||
$config->openMethods[] = 'my.changepassword';
|
||||
$config->openMethods[] = 'my.profile';
|
||||
$config->openMethods[] = 'my.settutorialconfig';
|
||||
|
||||
/* Define the tables. */
|
||||
define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`');
|
||||
|
||||
@@ -19,7 +19,7 @@ include 'chosen.html.php';
|
||||
<div id='userMenu'>
|
||||
<ul id="userNav" class="nav nav-default">
|
||||
<li class='dropdown dropdown-hover has-avatar'><?php common::printUserBar();?></li>
|
||||
<li class='dropdown dropdown-hover'><?php common::printCreateList();?></li>
|
||||
<li class='dropdown dropdown-hover' id='globalCreate'><?php common::printCreateList();?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -507,7 +507,7 @@ class executionModel extends model
|
||||
->batchcheck($this->config->execution->edit->requiredFields, 'notempty')
|
||||
->checkIF($execution->begin != '', 'begin', 'date')
|
||||
->checkIF($execution->end != '', 'end', 'date')
|
||||
->checkIF($execution->end != '', 'end', 'gt', $execution->begin)
|
||||
->checkIF($execution->end != '', 'end', 'ge', $execution->begin)
|
||||
->check('code', 'unique', "id != $executionID and code != '' and deleted = '0'")
|
||||
->where('id')->eq($executionID)
|
||||
->limit(1)
|
||||
|
||||
@@ -96,9 +96,6 @@ class program extends control
|
||||
|
||||
$this->program->setMenu($programID);
|
||||
|
||||
$program = $this->program->getByID($programID);
|
||||
if(empty($program) || $program->type != 'program') die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
/* Load pager and get tasks. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
@@ -106,6 +103,7 @@ class program extends control
|
||||
/* Get the top programID. */
|
||||
if($programID)
|
||||
{
|
||||
$program = $this->program->getByID($programID);
|
||||
$path = explode(',', $program->path);
|
||||
$path = array_filter($path);
|
||||
$programID = current($path);
|
||||
@@ -113,7 +111,7 @@ class program extends control
|
||||
|
||||
$this->view->title = $this->lang->program->product;
|
||||
$this->view->position[] = $this->lang->program->product;
|
||||
$this->view->program = $program;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
@@ -386,12 +384,12 @@ class program extends control
|
||||
{
|
||||
$programID = $this->program->saveState($programID, $this->program->getPairs());
|
||||
setCookie("lastProgram", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
if(!$programID) $this->locate($this->createLink('program', 'browse'));
|
||||
|
||||
$this->program->setMenu($programID);
|
||||
|
||||
$this->app->session->set('programProject', $this->app->getURI(true), 'program');
|
||||
$this->app->session->set('projectList', $this->app->getURI(true), 'project');
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->app->session->set('programProject', $uri, 'program');
|
||||
$this->app->session->set('projectList', $uri, 'program');
|
||||
|
||||
$this->loadModel('datatable');
|
||||
|
||||
@@ -410,7 +408,6 @@ class program extends control
|
||||
$this->view->projectStats = $projectStats;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->program = $this->program->getByID($programID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<?php foreach($lang->product->featureBar['all'] as $key => $label):?>
|
||||
<?php $active = $key == $browseType ? 'btn-active-text' : '';?>
|
||||
<?php if($key == $browseType) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink("product", "programID=$program->id&browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>", '', "class='btn btn-link $active'");?>
|
||||
<?php echo html::a(inlink("product", "programID=$programID&browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>", '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('product', 'create', "programID=$program->id", '<i class="icon icon-plus"></i> ' . $lang->product->create, '', 'class="btn btn-primary"');?>
|
||||
<?php common::printLink('product', 'create', "programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->product->create, '', 'class="btn btn-primary"');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -32,11 +32,11 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class="main-col">
|
||||
<form class="main-table table-product" data-ride="table" id="productListForm" method="post" action='<?php echo $this->createLink('product', 'batchEdit', "programID=$program->id");?>'>
|
||||
<form class="main-table table-product" data-ride="table" id="productListForm" method="post" action='<?php echo $this->createLink('product', 'batchEdit', "programID=$programID");?>'>
|
||||
<?php $canOrder = common::hasPriv('product', 'updateOrder');?>
|
||||
<?php $canBatchEdit = common::hasPriv('product', 'batchEdit');?>
|
||||
<table id="productList" class="table has-sort-head table-bordered table-fixed">
|
||||
<?php $vars = "programID=$program->id&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<?php $vars = "programID=$programID&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th class='c-id text-left' rowspan='2'>
|
||||
@@ -104,7 +104,7 @@
|
||||
<td><?php echo $product->plans;?></td>
|
||||
<td><?php echo $product->releases;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php common::printIcon('product', 'edit', "product=$product->id&action=edit&extra=&programID=$program->id", $product, 'list', 'edit');?>
|
||||
<?php common::printIcon('product', 'edit', "product=$product->id&action=edit&extra=&programID=$programID", $product, 'list', 'edit');?>
|
||||
<?php if($canOrder):?>
|
||||
<span class='c-actions sort-handler'><i class="icon icon-move"></i></span>
|
||||
<?php endif;?>
|
||||
@@ -129,7 +129,7 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php js::set('orderBy', $orderBy)?>
|
||||
<?php js::set('programID', $program->id)?>
|
||||
<?php js::set('programID', $programID)?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ function saveMemebers()
|
||||
function setRole(account, roleID)
|
||||
{
|
||||
role = roles[account]; // get role according the account.
|
||||
roleOBJ = $('#role' + roleID); // get role object.
|
||||
roleOBJ = $(document.getElementById('roles[' + roleID + ']')); // get role object.
|
||||
roleOBJ.val(role) // set the role.
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
<?php echo html::textarea('desc', $project->desc, "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=3');?>
|
||||
<?php $this->printExtendFields($project, 'table', 'columns=3');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?></th>
|
||||
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
|
||||
@@ -39,7 +39,7 @@ class task extends control
|
||||
*/
|
||||
public function create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0)
|
||||
{
|
||||
if($executionID == 0) $this->locate($this->createLink('execution', 'create'));
|
||||
if(empty($this->app->user->view->sprints) and !$executionID) $this->locate($this->createLink('execution', 'create'));
|
||||
|
||||
$executions = $this->execution->getPairs();
|
||||
$executionID = $this->execution->saveState($executionID, $executions);
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
<?php foreach($reports as $report):?>
|
||||
<tr>
|
||||
<?php $viewLink = helper::createLink('testreport', 'view', "reportID=$report->id");?>
|
||||
<td><?php echo html::a($viewLink, sprintf('%03d', $report->id), '', "data-app='{$this->app->tab}'");?></td>
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a($viewLink, $report->title, '', "data-app='{$this->app->tab}'")?></td>
|
||||
<td><?php echo html::a($viewLink, sprintf('%03d', $report->id), '', "data-app='{$app->tab}'");?></td>
|
||||
<td class='c-name'><?php echo html::a($viewLink, $report->title, '', "data-app='{$app->tab}' title='{$report->title}'")?></td>
|
||||
<td><?php echo zget($users, $report->createdBy);?></td>
|
||||
<td><?php echo substr($report->createdDate, 2);?></td>
|
||||
<?php $executionName = $report->execution ? '#' . $report->execution . zget($executions, $report->execution, '') : '';?>
|
||||
|
||||
@@ -874,4 +874,16 @@ $(document).ready(function()
|
||||
{
|
||||
$('a').attr('target', '');
|
||||
});
|
||||
|
||||
/* Hide the global create drop-down when hovering over the avatar. */
|
||||
$('.has-avatar').hover(function()
|
||||
{
|
||||
$(this).next().removeClass('open');
|
||||
});
|
||||
|
||||
/* Hide the avatar drop-down when hovering over the global create button. */
|
||||
$('#globalCreate').hover(function()
|
||||
{
|
||||
$(this).prev().removeClass('open');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user