Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -322,6 +322,42 @@ if($config->systemMode == 'new')
|
||||
$lang->projectrelease->methodOrder[60] = 'unlinkBug';
|
||||
$lang->projectrelease->methodOrder[65] = 'batchUnlinkBug';
|
||||
$lang->projectrelease->methodOrder[70] = 'changeStatus';
|
||||
|
||||
/* Stakeholer. */
|
||||
$lang->resource->stakeholder = new stdclass();
|
||||
$lang->resource->stakeholder->browse = 'browse';
|
||||
$lang->resource->stakeholder->create = 'create';
|
||||
$lang->resource->stakeholder->batchCreate = 'batchCreate';
|
||||
$lang->resource->stakeholder->edit = 'edit';
|
||||
$lang->resource->stakeholder->delete = 'delete';
|
||||
$lang->resource->stakeholder->view = 'viewAction';
|
||||
$lang->resource->stakeholder->issue = 'issue';
|
||||
$lang->resource->stakeholder->viewIssue = 'viewIssueAction';
|
||||
$lang->resource->stakeholder->communicate = 'communicate';
|
||||
$lang->resource->stakeholder->expect = 'expect';
|
||||
$lang->resource->stakeholder->expectation = 'expectation';
|
||||
$lang->resource->stakeholder->deleteExpect = 'deleteExpect';
|
||||
$lang->resource->stakeholder->createExpect = 'createExpect';
|
||||
$lang->resource->stakeholder->editExpect = 'editExpect';
|
||||
$lang->resource->stakeholder->viewExpect = 'viewExpect';
|
||||
$lang->resource->stakeholder->userIssue = 'userIssue';
|
||||
|
||||
$lang->stakeholder->methodOrder[5] = 'browse';
|
||||
$lang->stakeholder->methodOrder[10] = 'create';
|
||||
$lang->stakeholder->methodOrder[13] = 'batchCreate';
|
||||
$lang->stakeholder->methodOrder[15] = 'edit';
|
||||
$lang->stakeholder->methodOrder[25] = 'delete';
|
||||
$lang->stakeholder->methodOrder[30] = 'view';
|
||||
$lang->stakeholder->methodOrder[35] = 'issue';
|
||||
$lang->stakeholder->methodOrder[40] = 'viewIssue';
|
||||
$lang->stakeholder->methodOrder[45] = 'communicate';
|
||||
$lang->stakeholder->methodOrder[50] = 'expect';
|
||||
$lang->stakeholder->methodOrder[55] = 'expectation';
|
||||
$lang->stakeholder->methodOrder[60] = 'deleteExpect';
|
||||
$lang->stakeholder->methodOrder[65] = 'createExpect';
|
||||
$lang->stakeholder->methodOrder[70] = 'editExpect';
|
||||
$lang->stakeholder->methodOrder[75] = 'viewExpect';
|
||||
$lang->stakeholder->methodOrder[80] = 'userIssue';
|
||||
}
|
||||
|
||||
/* Product. */
|
||||
@@ -378,42 +414,6 @@ $lang->branch->methodOrder[0] = 'manage';
|
||||
$lang->branch->methodOrder[5] = 'sort';
|
||||
$lang->branch->methodOrder[10] = 'delete';
|
||||
|
||||
/* Stakeholer. */
|
||||
$lang->resource->stakeholder = new stdclass();
|
||||
$lang->resource->stakeholder->browse = 'browse';
|
||||
$lang->resource->stakeholder->create = 'create';
|
||||
$lang->resource->stakeholder->batchCreate = 'batchCreate';
|
||||
$lang->resource->stakeholder->edit = 'edit';
|
||||
$lang->resource->stakeholder->delete = 'delete';
|
||||
$lang->resource->stakeholder->view = 'viewAction';
|
||||
$lang->resource->stakeholder->issue = 'issue';
|
||||
$lang->resource->stakeholder->viewIssue = 'viewIssueAction';
|
||||
$lang->resource->stakeholder->communicate = 'communicate';
|
||||
$lang->resource->stakeholder->expect = 'expect';
|
||||
$lang->resource->stakeholder->expectation = 'expectation';
|
||||
$lang->resource->stakeholder->deleteExpect = 'deleteExpect';
|
||||
$lang->resource->stakeholder->createExpect = 'createExpect';
|
||||
$lang->resource->stakeholder->editExpect = 'editExpect';
|
||||
$lang->resource->stakeholder->viewExpect = 'viewExpect';
|
||||
$lang->resource->stakeholder->userIssue = 'userIssue';
|
||||
|
||||
$lang->stakeholder->methodOrder[5] = 'browse';
|
||||
$lang->stakeholder->methodOrder[10] = 'create';
|
||||
$lang->stakeholder->methodOrder[13] = 'batchCreate';
|
||||
$lang->stakeholder->methodOrder[15] = 'edit';
|
||||
$lang->stakeholder->methodOrder[25] = 'delete';
|
||||
$lang->stakeholder->methodOrder[30] = 'view';
|
||||
$lang->stakeholder->methodOrder[35] = 'issue';
|
||||
$lang->stakeholder->methodOrder[40] = 'viewIssue';
|
||||
$lang->stakeholder->methodOrder[45] = 'communicate';
|
||||
$lang->stakeholder->methodOrder[50] = 'expect';
|
||||
$lang->stakeholder->methodOrder[55] = 'expectation';
|
||||
$lang->stakeholder->methodOrder[60] = 'deleteExpect';
|
||||
$lang->stakeholder->methodOrder[65] = 'createExpect';
|
||||
$lang->stakeholder->methodOrder[70] = 'editExpect';
|
||||
$lang->stakeholder->methodOrder[75] = 'viewExpect';
|
||||
$lang->stakeholder->methodOrder[80] = 'userIssue';
|
||||
|
||||
/* Story. */
|
||||
$lang->resource->story = new stdclass();
|
||||
$lang->resource->story->create = 'create';
|
||||
|
||||
@@ -475,6 +475,8 @@ class groupModel extends model
|
||||
ksort($this->lang->moduleOrder, SORT_ASC);
|
||||
foreach($this->lang->moduleOrder as $moduleName)
|
||||
{
|
||||
if(!isset($resources->$moduleName)) continue;
|
||||
|
||||
$resource = $resources->$moduleName;
|
||||
unset($resources->$moduleName);
|
||||
$this->lang->resource->$moduleName = $resource;
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
<tr class='text-left'>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-name text-left'><?php echo $lang->my->name;?></th>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<th class='c-name text-left'><?php echo $lang->my->projects;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-date'><?php echo $lang->execution->begin;?></th>
|
||||
<th class='c-date'><?php echo $lang->execution->end;?></th>
|
||||
<th class='c-status'><?php echo $lang->statusAB;?></th>
|
||||
@@ -54,7 +56,9 @@
|
||||
<span class='project-type-label label label-info label-outline'><?php echo zget($lang->execution->typeList, $execution->type);?></span>
|
||||
<?php echo html::a($link, $execution->name, '', "title='$execution->name'");?>
|
||||
</td>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<td class='c-name text-left'><?php echo html::a($this->createLink('project', 'browse', "id=$execution->project", '', '', $execution->project), $execution->projectName, '', "title='$execution->projectName'");?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $execution->begin;?></td>
|
||||
<td><?php echo $execution->end;?></td>
|
||||
<td class="c-status">
|
||||
|
||||
@@ -24,6 +24,7 @@ $config->product->search['fields']['pri'] = $lang->story->pri;
|
||||
$config->product->search['fields']['product'] = $lang->story->product;
|
||||
$config->product->search['fields']['branch'] = '';
|
||||
$config->product->search['fields']['module'] = $lang->story->module;
|
||||
$config->product->search['fields']['plan'] = $lang->story->plan;
|
||||
$config->product->search['fields']['estimate'] = $lang->story->estimate;
|
||||
|
||||
$config->product->search['fields']['source'] = $lang->story->source;
|
||||
@@ -56,6 +57,7 @@ $config->product->search['params']['pri'] = array('operator' => '=',
|
||||
$config->product->search['params']['product'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->product->search['params']['branch'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->product->search['params']['module'] = array('operator' => 'belong', 'control' => 'select', 'values' => '');
|
||||
$config->product->search['params']['plan'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->product->search['params']['estimate'] = array('operator' => '=', 'control' => 'input', 'values' => '');
|
||||
|
||||
$config->product->search['params']['source'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->story->sourceList);
|
||||
|
||||
@@ -159,7 +159,7 @@ class product extends control
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
|
||||
/* Set menu. The projectstory module does not execute. */
|
||||
if($this->app->rawModule == 'product')
|
||||
if($this->app->openApp == 'product')
|
||||
{
|
||||
/* Save session. */
|
||||
$this->session->set('storyList', $this->app->getURI(true), 'product');
|
||||
@@ -245,6 +245,7 @@ class product extends control
|
||||
$this->lang->story->title = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->title);
|
||||
$this->lang->story->create = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->create);
|
||||
$this->config->product->search['fields']['title'] = $this->lang->story->title;
|
||||
unset($this->config->product->search['fields']['plan']);
|
||||
}
|
||||
|
||||
/* Build search form. */
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
.c-desc {overflow-x: scroll;}
|
||||
.table td.c-desc div {height: 25px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; float: left; max-width: calc(100% - 20px);}
|
||||
.table td.c-desc .more {height: 25px; float: left;}
|
||||
|
||||
@@ -7,4 +7,32 @@ $(function()
|
||||
$(this).parent().toggleClass('active');
|
||||
});
|
||||
}
|
||||
|
||||
$('#suiteList tbody tr').each(function()
|
||||
{
|
||||
var $content = $(this).find('td.c-desc');
|
||||
var content = $content.find('div').html();
|
||||
if(content.indexOf('<br') >= 0)
|
||||
{
|
||||
$content.append("<a href='###' class='more'><i class='icon icon-chevron-double-down'></i></a>");
|
||||
}
|
||||
});
|
||||
})
|
||||
$(document).on('click', 'td.c-desc .more', function(e)
|
||||
{
|
||||
var $toggle = $(this);
|
||||
if($toggle.hasClass('open'))
|
||||
{
|
||||
$toggle.removeClass('open');
|
||||
$toggle.closest('.c-desc').find('div').css('height', '25px');
|
||||
$toggle.css('padding-top', 0);
|
||||
$toggle.find('i').removeClass('icon-chevron-double-up').addClass('icon-chevron-double-down');
|
||||
}
|
||||
else
|
||||
{
|
||||
$toggle.addClass('open');
|
||||
$toggle.closest('.c-desc').find('div').css('height', 'auto');
|
||||
$toggle.css('padding-top', ($toggle.closest('.c-desc').find('div').height() - $toggle.height()) / 2);
|
||||
$toggle.find('i').removeClass('icon-chevron-double-down').addClass('icon-chevron-double-up');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -62,7 +62,10 @@
|
||||
<?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);?>
|
||||
</td>
|
||||
<td class='c-desc'><?php echo $suite->desc;?></td>
|
||||
<td class='c-desc'>
|
||||
<?php $desc = trim(strip_tags(str_replace(array('</p>', '<br />', '<br>', '<br/>'), "\n", str_replace(array("\n", "\r"), '', $suite->desc)), '<img>'));?>
|
||||
<div title='<?php echo $desc;?>'><?php echo nl2br($desc);?></div>
|
||||
</td>
|
||||
<td><?php echo zget($users, $suite->addedBy);?></td>
|
||||
<td><?php echo $suite->addedDate;?></td>
|
||||
<?php foreach($extendFields as $extendField) echo "<td>" . $this->loadModel('flow')->getFieldValue($extendField, $suite) . "</td>";?>
|
||||
|
||||
@@ -1018,7 +1018,7 @@ class treeModel extends model
|
||||
*/
|
||||
public function createStoryLink($type, $module, $extra = array())
|
||||
{
|
||||
if(isset($extra['projectID']))
|
||||
if(isset($extra['projectID']) and !empty($extra['projectID']))
|
||||
{
|
||||
$productID = zget($extra , 'productID', 0);
|
||||
$projectID = $extra['projectID'];
|
||||
|
||||
@@ -3973,7 +3973,21 @@ class upgradeModel extends model
|
||||
*/
|
||||
public function adjustPriv15_0()
|
||||
{
|
||||
$this->dao->update(TABLE_GROUPPRIV)->set('module')->eq('execution')->where('module')->eq('project')->exec();
|
||||
$executionPriv = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('execution')->limit(1)->fetch();
|
||||
if(empty($executionPriv)) $this->dao->update(TABLE_GROUPPRIV)->set('module')->eq('execution')->where('module')->eq('project')->exec();
|
||||
|
||||
$groups = $this->dao->select('id')->from(TABLE_GROUP)->fetchPairs('id', 'id');
|
||||
foreach($groups as $groupID)
|
||||
{
|
||||
$groupPriv = new stdclass();
|
||||
$groupPriv->group = $groupID;
|
||||
$groupPriv->module = 'my';
|
||||
$groupPriv->method = 'work';
|
||||
$this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec();
|
||||
|
||||
$groupPriv->method = 'contribute';
|
||||
$this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec();
|
||||
}
|
||||
|
||||
$stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('program')->andWhere('method')->like('PGM%')->query();
|
||||
while($grouppriv = $stmt->fetch())
|
||||
|
||||
Reference in New Issue
Block a user