Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/211_tianshujie_58555

This commit is contained in:
tianshujie
2022-07-07 09:41:09 +08:00
50 changed files with 467 additions and 127 deletions
+1
View File
@@ -221,6 +221,7 @@ $config->openMethods[] = 'kanban.finishcard';
$config->openMethods[] = 'kanban.deleteobjectcard';
$config->openMethods[] = 'admin.ignore';
$config->openMethods[] = 'personnel.unbindwhitelist';
$config->openMethods[] = 'tree.viewhistory';
/* Define the tables. */
define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`');
+20
View File
@@ -312,6 +312,26 @@ class control extends baseControl
chdir($currentPWD);
}
/**
* 获取一个方法的输出内容,这样我们可以在一个方法里获取其他模块方法的内容。
* 如果模块名为空,则调用该模块、该方法;如果设置了模块名,调用指定模块指定方法。
*
* Get the output of one module's one method as a string, thus in one module's method, can fetch other module's content.
* If the module name is empty, then use the current module and method. If set, use the user defined module and method.
*
* @param string $moduleName module name.
* @param string $methodName method name.
* @param array $params params.
* @access public
* @return string the parsed html.
*/
public function fetch($moduleName = '', $methodName = '', $params = array(), $appName = '')
{
if($moduleName != $this->moduleName) $this->app->fetchModule = $moduleName;
return parent::fetch($moduleName, $methodName, $params, $appName);
}
/**
* Build operate menu of a method.
*
+9
View File
@@ -46,6 +46,15 @@ class router extends baseRouter
*/
public $isFlow = false;
/**
* Fetch的模块名。
* The fetched module name.
*
* @var string
* @access public
*/
public $fetchModule;
/**
* Get the $moduleRoot var.
*
+1 -1
View File
@@ -48,7 +48,7 @@ class dao extends baseDAO
/* Check current module is buildin workflow. */
if(isset($config->workflow->buildin->modules))
{
$currentModule = $app->rawModule;
$currentModule = $app->fetchModule ? $app->fetchModule : $app->rawModule;
foreach($config->workflow->buildin->modules as $appModules)
{
if(!empty($appModules->$currentModule))
+1 -1
View File
@@ -51,7 +51,7 @@ class fixer extends baseFixer
{
global $app, $dbh;
$flowFields = array();
$moduleName = $app->rawModule;
$moduleName = $app->fetchModule ? $app->fetchModule : $app->rawModule;
$stmt = $dbh->query("SELECT * FROM " . TABLE_WORKFLOWFIELD . " WHERE `module` = '{$moduleName}' and `buildin` = '0'");
while($flowField = $stmt->fetch()) $flowFields[$flowField->field] = $flowField;
+10 -3
View File
@@ -395,6 +395,12 @@ class bug extends control
{
$this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($output['todoID'])->exec();
$this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID");
if($this->config->edition == 'biz' || $this->config->edition == 'max')
{
$todo = $this->dao->select('type, idvalue')->from(TABLE_TODO)->where('id')->eq($output['todoID'])->fetch();
if($todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done');
}
}
$message = $this->executeHooks($bugID);
@@ -404,11 +410,12 @@ class bug extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $bugID));
/* If link from no head then reload. */
if(isset($output['executionID']) and isonlybody())
if(isonlybody())
{
$executionID = $this->post->execution ? $this->post->execution : $output['executionID'];
$executionID = isset($output['executionID']) ? $output['executionID'] : $this->session->execution;
$executionID = $this->post->execution ? $this->post->execution : $executionID;
$execution = $this->loadModel('execution')->getByID($executionID);
if($executionID == $output['executionID'] and $this->app->tab == 'execution' and $execution->type == 'kanban')
if($this->app->tab == 'execution' and $execution->type == 'kanban')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
+1
View File
@@ -409,6 +409,7 @@ class deptModel extends model
->where('deleted')->eq(0)
->beginIF(strpos($params, 'all') === false)->andWhere('type')->eq($type)->fi()
->beginIF($childDepts)->andWhere('dept')->in($childDepts)->fi()
->beginIF($deptID === '0')->andWhere('dept')->eq($deptID)->fi()
->beginIF($this->config->vision)->andWhere("CONCAT(',', visions, ',')")->like("%,{$this->config->vision},%")->fi()
->orderBy('account')
->fetchPairs();
-4
View File
@@ -2271,7 +2271,6 @@ class execution extends control
public function kanban($executionID, $browseType = 'all', $orderBy = 'id_asc', $groupBy = 'default')
{
$this->app->loadLang('bug');
$this->loadModel('story');
if(empty($groupBy)) $groupBy = 'default';
@@ -2345,7 +2344,6 @@ class execution extends control
$this->view->kanbanData = $kanbanData;
$this->view->executionActions = $executionActions;
$this->view->kanban = $this->lang->execution->kanban;
$this->view->reviewStoryParis = $this->story->getExecutionStoryPairs($execution->id, 0, 'all', 0, 'full', 'review');
$this->display();
}
@@ -2374,7 +2372,6 @@ class execution extends control
/* Load language. */
$this->app->loadLang('task');
$this->app->loadLang('bug');
$this->loadModel('story');
$this->loadModel('kanban');
/* Compatibility IE8. */
@@ -2435,7 +2432,6 @@ class execution extends control
$this->view->groupBy = $groupBy;
$this->view->canBeChanged = $canBeChanged;
$this->view->userList = $userList;
$this->view->reviewStoryParis = $this->story->getExecutionStoryPairs($execution->id, 0, 'all', 0, 'full', 'review');
$this->display();
}
+19 -6
View File
@@ -2,20 +2,33 @@
.pull-left .input-control {margin-right: 10px;}
#cfdWrapper {max-width: 1450px; padding: 25px 0px 10px; position: relative}
#cfdYUnit {position: absolute; color: #CBD0DB; top: 40px; left: 30px}
#cfdXUnit {position: absolute; color: #CBD0DB; bottom: 20px; left: 1200px}
@media screen and (max-width: 1920px)
{
#cfdWrapper {max-width: 1400px; margin: 0 auto; padding: 25px 0px 10px; position: relative}
#cfdChart {width:1400px !important; height:600px !important}
#cfdYUnit {position: absolute; color: #CBD0DB; top: 40px; left: 30px}
#cfdXUnit {position: absolute; color: #CBD0DB; bottom: 20px; right: 0px}
#mainContent {min-width: 1550px !important;}
#burnStatistics {left: 1400px !important;}
#cfdXUnit {left: 1400px;}
}
@media screen and (max-width: 1680px)
{
#cfdChart {width:1150px !important; height:500px !important}
#mainContent {min-width: 1350px !important;}
#burnStatistics {left: 1150px !important;}
#cfdXUnit {left: 1150px;}
}
@media screen and (max-width: 1366px)
{
#cfdChart {width:1150px !important; height:400px !important};
#cfdChart {width:1000px !important; height:400px !important}
#mainContent {min-width: 1200px !important;}
#burnStatistics {left: 1000px !important;}
#cfdXUnit {left: 1000px;}
}
#mainContent {min-width: 1400px;}
#burnStatistics {position: absolute; left: 1200px; width: 180px; height: 200px; top: 20%; margin-top: -30px; line-height: 30px; color: #838A9D; font-size: 12px; border: 1px solid #dcdcdc; background-color: #F8F8F8; padding: 15px 20px; color: #3c4353; border-radius: 8px;}
#burnStatistics {position: absolute; width: 180px; left: 1200px; height: 200px; top: 20%; margin-top: -30px; line-height: 30px; color: #838A9D; font-size: 12px; border: 1px solid #dcdcdc; background-color: #F8F8F8; padding: 15px 20px; color: #3c4353; border-radius: 8px;}
#burnStatistics .bg-primary {margin-right: 5px;}
#burnStatistics .icon-help {color: black;}
#burnStatistics h3 {margin-top: 10px; text-indent: 10px; margin-bottom: 30px;}
#burnStatistics h3 {margin-top: 10px; text-indent: 10px; margin-bottom: 30px;}
+3 -1
View File
@@ -30,6 +30,8 @@
#dateRange {vertical-align: top; padding-top: 13px;}
#dateRangeOption {vertical-align: top; padding-top: 13px;}
#beginLabel {white-space: nowrap;}
#endLabel {white-space: nowrap;}
#copyProjectModal .projectSelect {display: inline-block; margin-left: 10px; width: 20%;}
#copyProjectModal .titleBox{position: relative; bottom: 3px; display: inline-block;}
a.chosen-single > div > b {top: -4px !important;}
a.chosen-single > div > b {top: -4px !important;}
+52 -19
View File
@@ -1092,28 +1092,29 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
}
else
{
if(toColType == 'ready' && typeof(reviewStoryParis[objectID]) != 'undefined')
if(toColType == 'ready')
{
bootbox.alert(executionLang.storyDragError);
return false;
$.get(createLink('story', 'ajaxGetInfo', "storyID=" + cardID), function(data)
{
if(data)
{
data = $.parseJSON(data);
if(data.status == 'draft' || data.status == 'changed')
{
bootbox.alert(executionLang.storyDragError);
}
else
{
ajaxMoveCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID);
}
}
});
}
else
{
ajaxMoveCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID);
}
var link = createLink('kanban', 'ajaxMoveCard', 'cardID=' + objectID + '&fromColID=' + fromColID + '&toColID=' + toColID + '&fromLaneID=' + fromLaneID + '&toLaneID=' + toLaneID + '&execitionID=' + executionID + '&browseType=' + browseType + '&groupBy=' + groupBy + '&regionID=' + regionID+ '&orderBy=' + orderBy );
$.ajax(
{
method: 'post',
dataType: 'json',
url: link,
success: function(data)
{
data = groupBy == 'default' ? data[regionID] : data[groupBy];
updateRegion(regionID, data);
},
error: function(xhr, status, error)
{
showErrorMessager(error || lang.timeout);
}
});
}
}
@@ -1124,6 +1125,38 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
}
}
/**
* AJAX: move card.
*
* @param int $objectID
* @param int $fromColID
* @param int $toColID
* @param int $fromLaneID
* @param int $toLaneID
* @param int $regionID
* @access public
* @return void
*/
function ajaxMoveCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID)
{
var link = createLink('kanban', 'ajaxMoveCard', 'cardID=' + objectID + '&fromColID=' + fromColID + '&toColID=' + toColID + '&fromLaneID=' + fromLaneID + '&toLaneID=' + toLaneID + '&execitionID=' + executionID + '&browseType=' + browseType + '&groupBy=' + groupBy + '&regionID=' + regionID+ '&orderBy=' + orderBy );
$.ajax(
{
method: 'post',
dataType: 'json',
url: link,
success: function(data)
{
data = groupBy == 'default' ? data[regionID] : data[groupBy];
updateRegion(regionID, data);
},
error: function(xhr, status, error)
{
showErrorMessager(error || lang.timeout);
}
});
}
/**
* Delete a card.
*
+49 -18
View File
@@ -774,28 +774,28 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
}
else
{
if(toColType == 'ready' && typeof(reviewStoryParis[objectID]) != 'undefined')
if(toColType == 'ready')
{
bootbox.alert(executionLang.storyDragError);
return false;
}
var link = createLink('kanban', 'ajaxMoveCard', 'cardID=' + objectID + '&fromColID=' + fromColID + '&toColID=' + toColID + '&fromLaneID=' + fromLaneID + '&toLaneID=' + toLaneID + '&execitionID=' + executionID + '&browseType=' + browseType + '&groupBy=' + groupBy);
$.get(link, function(data)
{
if(data)
$.get(createLink('story', 'ajaxGetInfo', "storyID=" + cardID), function(data)
{
kanbanGroup = $.parseJSON(data);
if(groupBy == 'default')
if(data)
{
updateKanban('story', kanbanGroup.story);
data = $.parseJSON(data);
if(data.status == 'draft' || data.status == 'changed')
{
bootbox.alert(executionLang.storyDragError);
}
else
{
ajaxMoveCard(objectID, fromColID, toColID, fromLaneID, toLaneID);
}
}
else
{
updateKanban(browseType, kanbanGroup[groupBy]);
}
}
});
});
}
else
{
ajaxMoveCard(objectID, fromColID, toColID, fromLaneID, toLaneID);
}
}
}
@@ -806,6 +806,37 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
}
}
/**
* AJAX: move card.
*
* @param int $objectID
* @param int $fromColID
* @param int $toColID
* @param int $fromLaneID
* @param int $toLaneID
* @access public
* @return void
*/
function ajaxMoveCard(objectID, fromColID, toColID, fromLaneID, toLaneID)
{
var link = createLink('kanban', 'ajaxMoveCard', 'cardID=' + objectID + '&fromColID=' + fromColID + '&toColID=' + toColID + '&fromLaneID=' + fromLaneID + '&toLaneID=' + toLaneID + '&execitionID=' + executionID + '&browseType=' + browseType + '&groupBy=' + groupBy);
$.get(link, function(data)
{
if(data)
{
kanbanGroup = $.parseJSON(data);
if(groupBy == 'default')
{
updateKanban('story', kanbanGroup.story);
}
else
{
updateKanban(browseType, kanbanGroup[groupBy]);
}
}
});
}
/**
* Handle drop task.
*
-1
View File
@@ -53,7 +53,6 @@ js::set('projectID', $projectID);
js::set('vision', $this->config->vision);
js::set('productCount', count($productNames));
js::set('executionID', $execution->id);
js::set('reviewStoryParis', $reviewStoryParis);
js::set('needLinkProducts', $lang->execution->needLinkProducts);
js::set('lastUpdateData', '');
js::set('rdSearchValue', '');
@@ -218,7 +218,6 @@ js::set('priv',
<?php js::set('entertime', time());?>
<?php js::set('fluidBoard', $execution->fluidBoard);?>
<?php js::set('displayCards', $execution->displayCards);?>
<?php js::set('reviewStoryParis', $reviewStoryParis);?>
<?php js::set('needLinkProducts', $lang->execution->needLinkProducts);?>
<?php js::set('hourUnit', $config->hourUnit);?>
<?php include '../../common/view/footer.html.php';?>
+11 -4
View File
@@ -634,12 +634,19 @@ class gitlab extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browseUser', "gitlabID=$gitlabID")));
}
$userPairs = $this->loadModel('user')->getPairs('noclosed|noletter');
$user = $this->gitlab->apiGetSingleUser($gitlabID, $userID);
$zentaoBindAccount = $this->dao->select('account')->from(TABLE_OAUTH)->where('providerType')->eq('gitlab')->andWhere('providerID')->eq($gitlabID)->andWhere('openID')->eq($user->id)->fetch('account');
$gitlabUser = $this->gitlab->apiGetSingleUser($gitlabID, $userID);
$zentaoBindAccount = $this->dao->select('account')->from(TABLE_OAUTH)->where('providerType')->eq('gitlab')->andWhere('providerID')->eq($gitlabID)->andWhere('openID')->eq($gitlabUser->id)->fetch('account');
$users = $this->loadModel('user')->getList();
$bindedUsers = $this->gitlab->getUserAccountIdPairs($gitlabID);
$userPairs = array('' => '');
foreach($users as $user)
{
if(!isset($bindedUsers[$user->account]) or $u->account == $zentaoBindAccount) $userPairs[$user->account] = $user->realname;
}
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->user->edit;
$this->view->user = $user;
$this->view->user = $gitlabUser;
$this->view->userPairs = $userPairs;
$this->view->zentaoBindAccount = $zentaoBindAccount;
$this->view->gitlabID = $gitlabID;
+1 -1
View File
@@ -14,7 +14,7 @@
<div id="mainMenu" class="clearfix">
<?php echo $this->gitlab->getGitlabMenu($gitlabID, 'group');?>
<div class="btn-toolbar pull-left">
<form id='gitlabForm' method='post'>
<form id='gitlabForm' method='post' class="not-watch">
<?php echo html::input('keyword', $keyword, "class='form-control' placeholder='{$lang->gitlab->placeholderSearch}' style='display: inline-block;width:auto;margin:0 10px'");?>
<a id="gitlabSearch" class="btn btn-primary"><?php echo $lang->gitlab->search?></a>
</form>
+2 -2
View File
@@ -16,7 +16,7 @@
<div id="mainMenu" class="clearfix">
<?php echo $this->gitlab->getGitlabMenu($gitlabID, 'project');?>
<div class="btn-toolbar pull-left">
<form id='gitlabForm' method='post'>
<form id='gitlabForm' method='post' class="not-watch">
<?php echo html::input('keyword', $keyword, "class='form-control' placeholder='{$lang->gitlab->placeholderSearch}' style='display: inline-block;width:auto;margin:0 10px'");?>
<a id="gitlabSearch" class="btn btn-primary"><?php echo $lang->gitlab->search?></a>
</form>
@@ -45,7 +45,7 @@
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->project->name);?></th>
<th class='text-left'></th>
<th class='text-left'><?php echo $lang->gitlab->lastUpdate;?></th>
<th class='c-actions-7'><?php echo $lang->actions;?></th>
<th class='c-actions-8'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
+3 -3
View File
@@ -14,20 +14,20 @@
<div id="mainMenu" class="clearfix">
<?php echo $this->gitlab->getGitlabMenu($gitlabID, 'user');?>
<div class="btn-toolbar pull-left">
<form id='gitlabForm' method='post'>
<form id='gitlabForm' method='post' class="not-watch">
<?php echo html::input('keyword', $keyword, "class='form-control' placeholder='{$lang->gitlab->placeholderSearch}' style='display: inline-block;width:auto;margin:0 10px'");?>
<a id="gitlabSearch" class="btn btn-primary"><?php echo $lang->gitlab->search?></a>
</form>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('gitlab', 'createUser', "gitlabID=$gitlabID", "<i class='icon icon-plus'></i> " . $lang->gitlab->user->create, '', "class='btn btn-primary'");?>
<?php if($isAdmin) common::printLink('gitlab', 'createUser', "gitlabID=$gitlabID", "<i class='icon icon-plus'></i> " . $lang->gitlab->user->create, '', "class='btn btn-primary'");?>
</div>
</div>
<?php if(empty($gitlabUserList)):?>
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->noData;?></span>
<?php echo html::a($this->createLink('gitlab', 'createProject', "gitlabID=$gitlabID"), "<i class='icon icon-plus'></i> " . $lang->gitlab->user->create, '', "class='btn btn-info'");?>
<?php if($isAdmin) echo html::a($this->createLink('gitlab', 'createProject', "gitlabID=$gitlabID"), "<i class='icon icon-plus'></i> " . $lang->gitlab->user->create, '', "class='btn btn-info'");?>
</p>
</div>
<?php else:?>
+2
View File
@@ -1146,6 +1146,7 @@ $lang->resource->repo->download = 'downloadAction';
$lang->resource->repo->maintain = 'maintain';
$lang->resource->repo->setRules = 'setRules';
$lang->resource->repo->apiGetRepoByUrl = 'apiGetRepoByUrl';
$lang->resource->repo->downloadCode = 'downloadCode';
$lang->repo->methodOrder[5] = 'create';
$lang->repo->methodOrder[10] = 'edit';
@@ -1161,6 +1162,7 @@ $lang->repo->methodOrder[55] = 'blame';
$lang->repo->methodOrder[60] = 'download';
$lang->repo->methodOrder[65] = 'setRules';
$lang->repo->methodOrder[70] = 'apiGetRepoByUrl';
$lang->repo->methodOrder[75] = 'downloadCode';
$lang->resource->ci = new stdclass();
$lang->resource->ci->commitResult = 'commitResult';
+1 -1
View File
@@ -32,7 +32,7 @@
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module='workFeedback'></div>
<?php if(empty($feedbacks)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->noData;?></span></p>
<p><span class="text-muted"><?php echo $lang->feedback->noFeedback;?></span></p>
</div>
<?php else:?>
<?php
+2
View File
@@ -86,6 +86,7 @@ class pipelineModel extends model
$this->dao->insert(TABLE_PIPELINE)->data($pipeline)
->batchCheck($this->config->pipeline->create->requiredFields, 'notempty')
->batchCheck("url", 'URL')
->check('name', 'unique', "`type` = '$type'")
->autoCheck()
->exec();
if(dao::isError()) return false;
@@ -116,6 +117,7 @@ class pipelineModel extends model
$this->dao->update(TABLE_PIPELINE)->data($pipeline)
->batchCheck($this->config->pipeline->edit->requiredFields, 'notempty')
->batchCheck("url", 'URL')
->check('name', 'unique', "`type` = '$type' and id <> $id")
->autoCheck()
->where('id')->eq($id)
->exec();
+2 -4
View File
@@ -11,10 +11,8 @@ function addItem(obj)
$(obj).closest('tr').after('<tr class="addedItem">' + item + '</tr>');
var newItem = $('#names' + itemIndex).closest('tr');
newItem.find('.form-date').datepicker();
$("#output" + itemIndex).chosen();
$("#PM_i__chosen").remove();
$("#PM" + itemIndex).chosen();
$("#output_i__chosen").remove();
$("#output" + itemIndex).picker();
$("#PM" + itemIndex).picker();
itemIndex ++;
}
+17 -16
View File
@@ -80,7 +80,7 @@
<?php foreach($stages as $stage):?>
<tr>
<td><input type='text' name='names[<?php echo $i;?>]' id='names<?php echo $i;?>' value='<?php echo $stage->name;?>' class='form-control' /></td>
<td <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>><?php echo html::select("PM[$i]", $PMUsers, '', "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>><?php echo html::select("PM[$i]", $PMUsers, '', "class='form-control picker-select'");?></td>
<td <?php echo zget($visibleFields, 'percent', ' hidden') . zget($requiredFields, 'percent', '', ' required');?>>
<div class='input-group'>
<input type='text' name='percents[<?php echo $i;?>]' id='percent<?php echo $i;?>' value='<?php echo $stage->percent;?>' class='form-control'/>
@@ -89,15 +89,15 @@
</td>
<td class='<?php echo $hideAttribute?> <?php echo zget($visibleFields, 'attribute', ' hidden') . zget($requiredFields, 'attribute', '', ' required');?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, $stage->type, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>'><?php echo html::select("acl[$i]", $lang->execution->aclList, 'open', "class='form-control' $class");?></td>
<td <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td class='text-center' <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td><input type='text' name='begin[<?php echo $i;?>]' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td><input type='text' name='end[<?php echo $i;?>]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realBegan', ' hidden') . zget($requiredFields, 'realBegan', '', ' required');?>><input type='text' name='realBegan[<?php echo $i;?>]' id='realBegan<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realEnd', ' hidden') . zget($requiredFields, 'realEnd', '', ' required');?>><input type='text' name='realEnd[<?php echo $i;?>]' id='realEnd<?php echo $i;?>' value='' class='form-control form-date' /></td>
<?php if($this->config->edition == 'max'):?>
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control chosen' multiple");?></td>
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control picker-select' data-drop-width='auto' multiple");?></td>
<?php endif;?>
<td class='c-actions text-left'>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
@@ -111,7 +111,7 @@
<?php echo html::hidden("planIDList[$i]", $plan->id);?>
<tr>
<td><input type='text' name="names[<?php echo $i;?>]" id='names<?php echo $i;?>' value='<?php echo $plan->name;?>' class='form-control' /></td>
<td <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>><?php echo html::select("PM[$i]", $PMUsers, $plan->PM, "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>><?php echo html::select("PM[$i]", $PMUsers, $plan->PM, "class='form-control picker-select'");?></td>
<td <?php echo zget($visibleFields, 'percent', ' hidden') . zget($requiredFields, 'percent', '', ' required');?>>
<div class='input-group'>
<input type='text' name='percents[<?php echo $i;?>]' id='percent<?php echo $i;?>' value='<?php echo $plan->percent;?>' class='form-control' />
@@ -120,17 +120,18 @@
</td>
<td class='<?php echo $hideAttribute?> <?php echo zget($visibleFields, 'attribute', ' hidden') . zget($requiredFields, 'attribute', '', ' required');?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, $plan->attribute, "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>><?php echo html::select("acl[$i]", $lang->execution->aclList, $plan->acl, "class='form-control' $class");?></td>
<td <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, $plan->milestone, $disabled);?></td>
<td class='text-center' <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, $plan->milestone, $disabled);?></td>
<td><input type='text' name='begin[<?php echo $i;?>] ' id='begin<?php echo $i;?>' value='<?php echo $plan->begin;?>' class='form-control form-date' /></td>
<td><input type='text' name='end[<?php echo $i;?>]' id='end<?php echo $i;?>' value='<?php echo $plan->end;?>' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realBegan', ' hidden') . zget($requiredFields, 'realBegan', '', ' required');?>><input type='text' name='realBegan[<?php echo $i;?>] ' id='realBegan<?php echo $i;?>' value='<?php echo $plan->realBegan;?>' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realEnd', ' hidden') . zget($requiredFields, 'realEnd', '', ' required');?>><input type='text' name='realEnd[<?php echo $i;?>]' id='realEnd<?php echo $i;?>' value='<?php echo $plan->realEnd;?>' class='form-control form-date' /></td>
<?php if($this->config->edition == 'max'):?>
<?php $option = empty($plan->output) ? 0 : explode(',', $plan->output);?>
<td><?php echo html::select("output[$i][]", $documentList, $option, "class='form-control chosen' multiple");?></td>
<td><?php echo html::select("output[$i][]", $documentList, $option, "class='form-control picker-select' data-drop-width='auto' multiple");?></td>
<?php endif;?>
<td class='c-actions text-left'>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='invisible btn btn-link'><i class='icon icon-close'></i></a>
</td>
</tr>
<?php $i ++;?>
@@ -139,7 +140,7 @@
<?php for($j = 0; $j < 5; $j ++):?>
<tr class='addedItem'>
<td><input type='text' name='names[<?php echo $i;?>]' id='names<?php echo $i;?>' value='' class='form-control' /></td>
<td <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>><?php echo html::select("PM[$i]", $PMUsers, '', "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>><?php echo html::select("PM[$i]", $PMUsers, '', "class='form-control picker-select'");?></td>
<td <?php echo zget($visibleFields, 'percent', ' hidden') . zget($requiredFields, 'percent', '', ' required');?>>
<div class='input-group'>
<input type='text' name='percents[<?php echo $i;?>]' id='percent<?php echo $i;?>' value='' class='form-control' />
@@ -148,15 +149,15 @@
</td>
<td class='<?php echo $hideAttribute?> <?php echo zget($visibleFields, 'attribute', ' hidden') . zget($requiredFields, 'attribute', '', ' required');?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>><?php echo html::select("acl[$i]", $lang->execution->aclList, 'open', "class='form-control' $class");?></td>
<td <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td class='text-center' <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td><input type='text' name='begin[<?php echo $i;?>] ' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td><input type='text' name='end[<?php echo $i;?>]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realBegan', ' hidden') . zget($requiredFields, 'realBegan', '', ' required');?>><input type='text' name='realBegan[<?php echo $i;?>] ' id='realBegan<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realEnd', ' hidden') . zget($requiredFields, 'realEnd', '', ' required');?>><input type='text' name='realEnd[<?php echo $i;?>]' id='realEnd<?php echo $i;?>' value='' class='form-control form-date' /></td>
<?php if($this->config->edition == 'max'):?>
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control chosen' multiple");?></td>
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control picker-select' data-drop-width='auto' multiple");?></td>
<?php endif;?>
<td class='c-actions text-left'>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
@@ -180,7 +181,7 @@
<table class='hidden'>
<tr id='addItem' class='hidden'>
<td><input type='text' name='<?php echo "names[$i]";?>' id='names<?php echo $i;?>' class='form-control' /></td>
<td <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>><?php echo html::select("PM[$i]", $PMUsers, '', "class='form-control chosen' id='PM$i'");?></td>
<td <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>><?php echo html::select("PM[$i]", $PMUsers, '', "class='form-control' id='PM$i'");?></td>
<?php echo html::hidden("planIDList[$i]", 0);?>
<td <?php echo zget($visibleFields, 'percent', ' hidden') . zget($requiredFields, 'percent', '', ' required');?>>
<div class='input-group'>
@@ -190,15 +191,15 @@
</td>
<td class='<?php echo $hideAttribute?> <?php echo zget($visibleFields, 'attribute', ' hidden') . zget($requiredFields, 'attribute', '', ' required');?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
<td <?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>><?php echo html::select("acl[$i]", $lang->execution->aclList, 'open', "class='form-control' $class");?></td>
<td <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td class='text-center' <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td><input type='text' name='<?php echo "begin[$i]";?>' id='begin<?php echo $i;?>' class='form-control form-date' /></td>
<td><input type='text' name='<?php echo "end[$i]";?>' id='end<?php echo $i;?>' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realBegan', ' hidden') . zget($requiredFields, 'realBegan', '', ' required');?>><input type='text' name='<?php echo "realBegan[$i]";?>' id='realBegan<?php echo $i;?>' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realEnd', ' hidden') . zget($requiredFields, 'realEnd', '', ' required');?>><input type='text' name='<?php echo "realEnd[$i]";?>' id='realEnd<?php echo $i;?>' class='form-control form-date' /></td>
<?php if($this->config->edition == 'max'):?>
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control chosen ' multiple");?></td>
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control' data-drop-width='auto' multiple");?></td>
<?php endif;?>
<td class='c-actions'>
<td class='c-actions text-center'>
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
</td>
+18
View File
@@ -497,6 +497,7 @@ class repo extends control
$this->view->pager = $pager;
$this->view->path = urldecode($path);
$this->view->logType = $logType;
$this->view->cloneUrl = $this->repo->getCloneUrl($repo);
$this->view->cacheTime = date('m-d H:i', filemtime($cacheFile));
$this->view->branchOrTag = $branchOrTag;
@@ -1293,4 +1294,21 @@ class repo extends control
$executions = $this->repo->getExecutionPairs($productID, $branch);
echo html::select('execution', array('' => '') + $executions, '', 'class="form-control chosen"');
}
/**
* Download zip code.
*
* @param int $repoID
* @param string $branch
* @access public
* @return void
*/
public function downloadCode($repoID = 0, $branch = '')
{
$repo = $this->repo->getRepoByID($repoID);
if($repo->SCM == 'Gitlab')
{
return '';
}
}
}
+5
View File
@@ -26,3 +26,8 @@
/* Fix bug #21893. */
.in #sidebar>.sidebar-toggle>.icon-angle-left:before {content: "\e315";}
.hide-sidebar #sidebar>.sidebar-toggle>.icon-angle-left:before {content: "\e314";}
.download-popover {width: 400px; max-width: none;}
.popover-content {padding: 0;}
.download-popover .table {margin-bottom: 0;}
.download-popover .table td {padding-right: 0;}
+82
View File
@@ -0,0 +1,82 @@
function getDownload()
{
var content = "<div class='main-col'>";
content += "<div class='center-block'>";
content += "<table class='table table-borderless'>";
if(cloneUrl.ssh)
{
content += "<tr>";
content += "<th>" + lang.sshClone + "</th>";
content += "</tr>";
content += "<tr>";
content += "<td><input type='input' class='form-control' value='" + cloneUrl.ssh + "' readonly></td>";
content += "<td><button type='button' class='btn copy-btn'><i class='icon-common-copy icon-copy' title='" + lang.copy + "'></i></button></td>";
content += "</tr>";
content += "<tr>";
}
if(cloneUrl.http)
{
content += "<th>" + lang.httpClone + "</th>";
content += "</tr>";
content += "<tr>";
content += "<td><input type='input' class='form-control' value='" + cloneUrl.http + "' readonly></td>";
content += "<td><button type='button' class='btn copy-btn'><i class='icon-common-copy icon-copy' title='" + lang.copy + "'></i></button></td>";
content += "</tr>";
}
content += "<tr>";
content += "<td><button type='button' class='btn download-btn'><i class='icon-down-circle'></i> <span>" + lang.downloadZip + "</span></button></td>";
content += "<td>";
content += "</td>";
content += "</tr>";
content += "</table>";
content += "</div>";
content += "</div>";
return content;
}
$(function()
{
/* Init popover. */
var options = {
container: 'body',
content: getDownload(),
html: true,
placement: 'bottom',
template: '<div class="popover"><h3 class="popover-title"></h3><div class="popover-content"></div></div',
tipClass: 'download-popover',
trigger: 'manual'
};
$('#downloadCode').popover(options);
$('#downloadCode').click(function()
{
if($('.download-popover').css('display') == 'block')
{
$('#downloadCode').popover('hide');
}
else
{
$('#downloadCode').popover('show');
/* Set popover area. */
var left = parseFloat($('.download-popover').css('left')) - 155;
$('.download-popover').css('left', left + 'px')
}
})
$('.copy-btn').live('click', function()
{
var copyText = $(this).parent().parent().find('input');
copyText .select();
document.execCommand("Copy");
alert(lang.copied);
})
$('.download-btn').live('click', function()
{
var link = createLink('repo', 'downloadCode', 'repoID=' + repoID);
window.open(link);
})
})
+18 -12
View File
@@ -8,9 +8,9 @@ $lang->repo->create = 'Create';
$lang->repo->maintain = 'Repo List';
$lang->repo->edit = 'Edit';
$lang->repo->delete = 'Delete Repo';
$lang->repo->showSyncCommit = 'Display Synchronization';
$lang->repo->showSyncCommit = 'Display Sync';
$lang->repo->ajaxSyncCommit = 'Interface: Ajax Sync Note';
$lang->repo->setRules = 'Set rules';
$lang->repo->setRules = 'Set Rules';
$lang->repo->download = 'Download File';
$lang->repo->downloadDiff = 'Download Diff';
$lang->repo->addBug = 'Add Review';
@@ -30,16 +30,22 @@ $lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
$lang->repo->browseAction = 'Browse Repo';
$lang->repo->createAction = 'Create Repo';
$lang->repo->editAction = 'Edit Repo';
$lang->repo->diffAction = 'Revision Diff';
$lang->repo->diffAction = 'Diff Revision';
$lang->repo->downloadAction = 'Download File';
$lang->repo->revisionAction = 'Revision Detail';
$lang->repo->blameAction = 'Repo Blame';
$lang->repo->blameAction = 'Blame';
$lang->repo->reviewAction = 'Review List';
$lang->repo->downloadCode = 'Download Code';
$lang->repo->downloadZip = 'Download Zip file';
$lang->repo->sshClone = 'Clone by SSH';
$lang->repo->httpClone = 'Clone by HTTP';
$lang->repo->submit = 'Submit';
$lang->repo->cancel = 'Cancel';
$lang->repo->addComment = 'Add Comment';
$lang->repo->copy = 'Click to copy';
$lang->repo->copied = 'Copy successful';
$lang->repo->module = 'Module';
$lang->repo->type = 'Type';
$lang->repo->assign = 'AssignTo';
@@ -106,7 +112,7 @@ $lang->repo->openedDate = 'CreatedDate';
$lang->repo->latestRevision = 'Latest Revision';
$lang->repo->actionInfo = "Add by %s in %s";
$lang->repo->changes = "Change Log";
$lang->repo->reviewLocation = "File: %s@%s, line:%s - %s";
$lang->repo->reviewLocation = "File: %s@%s, Line: %s - %s";
$lang->repo->commentEdit = '<i class="icon-pencil"></i>';
$lang->repo->commentDelete = '<i class="icon-remove"></i>';
$lang->repo->allChanges = "Other Changes";
@@ -119,7 +125,7 @@ $lang->repo->objectIdRule = 'Object ID Rule';
$lang->repo->actionRule = 'Action Rule';
$lang->repo->manHourRule = 'Man-hour Rule';
$lang->repo->ruleUnit = "Unit";
$lang->repo->ruleSplit = "Multiple keywords are divided by ';'. For example: task multiple keywords: Task;task";
$lang->repo->ruleSplit = "Multiple keywords are divided by ';', e.g. task multiple keywords: Task;task";
$lang->repo->viewDiffList['inline'] = 'Inline';
$lang->repo->viewDiffList['appose'] = 'Parallel';
@@ -136,7 +142,7 @@ $lang->repo->encodingList['gbk'] = 'GBK';
$lang->repo->scmList['Gitlab'] = 'GitLab';
$lang->repo->scmList['Git'] = 'Git';
$lang->repo->scmList['Subversion'] = 'Subversion';
$lang->repo->scmList['Subversion'] = 'SVN';
$lang->repo->gitlabHost = 'GitLab Host';
$lang->repo->gitlabToken = 'GitLab Token';
@@ -149,12 +155,12 @@ $lang->repo->notice = new stdclass();
$lang->repo->notice->syncing = 'Synchronizing. Please wait ...';
$lang->repo->notice->syncComplete = 'Synchronized. Now redirecting ...';
$lang->repo->notice->syncedCount = 'The number of records synchronized is ';
$lang->repo->notice->delete = 'Are you sure delete this repo?';
$lang->repo->notice->delete = 'Do you want to delete this repo?';
$lang->repo->notice->successDelete = 'Repository is removed.';
$lang->repo->notice->commentContent = 'Comment';
$lang->repo->notice->deleteReview = 'Do you want to delete this review?';
$lang->repo->notice->deleteBug = 'Are you sure to delete this bug?';
$lang->repo->notice->deleteComment = 'Are you sure to delete this comment?';
$lang->repo->notice->deleteBug = 'Do you want to delete this bug?';
$lang->repo->notice->deleteComment = 'Do you want to delete this comment?';
$lang->repo->notice->lastSyncTime = 'Last Sync:';
$lang->repo->rules = new stdclass();
@@ -182,14 +188,14 @@ $lang->repo->error->noFile = '%s does not exist.';
$lang->repo->error->noPriv = 'The program does not have the privilege to switch to %s';
$lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n";
$lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client";
$lang->repo->error->encoding = "The encoding maybe wrong. Please change the encoding and try again.";
$lang->repo->error->encoding = "The encoding might be wrong. Please change the encoding and try again.";
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has a commit record associated with the design.";
$lang->repo->error->linkedJob = "Deletion of the repository failed. The current repository has associated with the Compile.";
$lang->repo->error->clientPath = "The client installation directory cannot have spaces!";
$lang->repo->error->notFound = "The repository %s’s URL %s does not exist. Please confirm if this repository has been deleted from the local server.";
$lang->repo->syncTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,e.g. utf-8";
$lang->repo->encodingsTips = "The encodings of comments can be comma separated values, e.g. utf-8.";
$lang->repo->pathTipsForGitlab = "GitLab Project URL";
$lang->repo->example = new stdclass();
+6
View File
@@ -35,11 +35,17 @@ $lang->repo->downloadAction = 'Download File';
$lang->repo->revisionAction = 'Revision Detail';
$lang->repo->blameAction = 'Blame';
$lang->repo->reviewAction = 'Review List';
$lang->repo->downloadCode = 'Download Code';
$lang->repo->downloadZip = 'Download compressed package';
$lang->repo->sshClone = 'Clone by SSH';
$lang->repo->httpClone = 'Clone by HTTP';
$lang->repo->submit = 'Submit';
$lang->repo->cancel = 'Cancel';
$lang->repo->addComment = 'Add Comment';
$lang->repo->copy = 'Click to copy';
$lang->repo->copied = 'Copy successful';
$lang->repo->module = 'Module';
$lang->repo->type = 'Type';
$lang->repo->assign = 'AssignTo';
+6
View File
@@ -35,11 +35,17 @@ $lang->repo->downloadAction = 'Download File';
$lang->repo->revisionAction = 'Détail Révision';
$lang->repo->blameAction = 'Blâme du Référentiel';
$lang->repo->reviewAction = 'Review List';
$lang->repo->downloadCode = 'Download Code';
$lang->repo->downloadZip = 'Download compressed package';
$lang->repo->sshClone = 'Clone by SSH';
$lang->repo->httpClone = 'Clone by HTTP';
$lang->repo->submit = 'Soumettre';
$lang->repo->cancel = 'Annuler';
$lang->repo->addComment = 'Ajout Comment.';
$lang->repo->copy = 'Click to copy';
$lang->repo->copied = 'Copy successful';
$lang->repo->module = 'Module';
$lang->repo->type = 'Type';
$lang->repo->assign = 'Assigner à';
+15
View File
@@ -27,10 +27,25 @@ $lang->repo->tag = 'Tag';
$lang->repo->addWebHook = 'Add Webhook';
$lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
$lang->repo->browseAction = 'Browse Repo';
$lang->repo->createAction = 'Create Repo';
$lang->repo->editAction = 'Edit Repo';
$lang->repo->diffAction = 'Diff Revision';
$lang->repo->downloadAction = 'Download File';
$lang->repo->revisionAction = 'Revision Detail';
$lang->repo->blameAction = 'Blame';
$lang->repo->reviewAction = 'Review List';
$lang->repo->downloadCode = 'Download Code';
$lang->repo->downloadZip = 'Download compressed package';
$lang->repo->sshClone = 'Clone by SSH';
$lang->repo->httpClone = 'Clone by HTTP';
$lang->repo->submit = 'Gửi';
$lang->repo->cancel = 'Hủy';
$lang->repo->addComment = 'Thêm nhận xét';
$lang->repo->copy = 'Click to copy';
$lang->repo->copied = 'Copy successful';
$lang->repo->module = 'Module';
$lang->repo->type = 'Loại';
$lang->repo->assign = 'Giao cho';
+6
View File
@@ -35,11 +35,17 @@ $lang->repo->downloadAction = '下载代码库文件';
$lang->repo->revisionAction = '版本详情';
$lang->repo->blameAction = '版本追溯';
$lang->repo->reviewAction = '评审列表';
$lang->repo->downloadCode = '下载代码';
$lang->repo->downloadZip = '下载压缩包';
$lang->repo->sshClone = '使用SSH克隆';
$lang->repo->httpClone = '使用HTTP克隆';
$lang->repo->submit = '提交';
$lang->repo->cancel = '取消';
$lang->repo->addComment = '添加评论';
$lang->repo->copy = '点击复制';
$lang->repo->copied = '复制成功';
$lang->repo->module = '模块';
$lang->repo->type = '类型';
$lang->repo->assign = '指派';
+25
View File
@@ -2131,4 +2131,29 @@ class repoModel extends model
foreach($executions as $execution) $pairs[$execution->id] = $execution->name;
return $pairs;
}
/**
* Get clone url.
*
* @param object $repo
* @access public
* @return object
*/
public function getCloneUrl($repo)
{
if(empty($repo)) return null;
$url = new stdClass();
if($repo->SCM == 'Gitlab')
{
$project = $this->loadModel('gitlab')->apiGetSingleProject($repo->gitlab, $repo->project);
if(isset($project->id))
{
$url->http = $project->http_url_to_repo;
$url->ssh = $project->ssh_url_to_repo;
}
}
return $url;
}
}
+7 -1
View File
@@ -9,6 +9,10 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('repoID', $repoID);?>
<?php js::set('branch', $branchID);?>
<?php js::set('lang', $lang->repo);?>
<?php js::set('cloneUrl', $cloneUrl);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php if(!empty($branchesAndTags)):?>
@@ -82,7 +86,9 @@
<div class="btn-toolbar pull-right">
<span class='last-sync-time'><?php echo $lang->repo->notice->lastSyncTime . $cacheTime?></span>
<?php echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=" . $base64BranchID . "&objectID=$objectID&path=" . $this->repo->encodePath($path) . "&revision=$revision&refresh=1"), "<i class='icon icon-refresh'></i> " . $lang->refresh, '', "class='btn btn-primary' data-app={$app->tab}");?>
<?php if($repo->SCM == 'Gitlab' and common::hasPriv('gitlab', 'createBranch')) echo html::a($this->createLink('gitlab', 'createBranch', "gitlabID={$repo->gitlab}&projectID={$repo->project}"), "<i class='icon icon-sm icon-plus'></i> " . $lang->gitlab->createBranch, '', "class='btn btn-primary'");?>
<?php if(common::hasPriv('repo', 'downloadCode')): ?>
<button type="button" class="btn btn-primary" data-toggle="popover" id="downloadCode" title="<?php echo $lang->repo->downloadCode;?>"><i class='icon icon-sm icon-download'></i> <?php echo $lang->repo->download;?> <i class='icon icon-sm icon-caret-down'></i></button>
<?php endif;?>
</div>
</div>
<div id="mainContent" class="main-row fade">
+14 -16
View File
@@ -315,6 +315,20 @@ class report extends control
$users[''] = $this->lang->report->annualData->allUser;
$depts = $this->loadModel('dept')->getOptionMenu();
$accounts = array();
if($userID)
{
$user = $this->loadModel('user')->getById($userID, 'id');
$dept = $user->dept;
$users = $this->loadModel('dept')->getDeptUserPairs($dept, 'id');
$accounts = array($user->account => ($user->realname ? $user->realname : $user->account));
}
else
{
$users = $this->loadModel('dept')->getDeptUserPairs($dept, 'id');
$users = array('' => $this->lang->report->annualData->allUser) + $users;
$accounts = $this->loadModel('dept')->getDeptUserPairs($dept);
}
if(!$this->app->user->admin)
{
foreach($depts as $id => $name) if($id != $this->app->user->dept) unset($depts[$id]);
@@ -323,25 +337,9 @@ class report extends control
{
$depts = array('' => $this->lang->report->annualData->allDept) + $depts;
}
if(empty($userID)) unset($depts[0]);
$accounts = array();
if($dept) $accounts = $this->loadModel('dept')->getDeptUserPairs($dept);
if($userID)
{
$user = $this->loadModel('user')->getById($userID, 'id');
$dept = $user->dept;
$accounts = array($user->account => ($user->realname ? $user->realname : $user->account));
}
if(empty($accounts)) $accounts = $this->user->getPairs('noletter|noclosed');
if($accounts) $accounts = array_keys($accounts);
if($dept)
{
$users = $this->loadModel('dept')->getDeptUserPairs($dept, 'id');
$users = array('' => $this->lang->report->annualData->allUser) + $users;
}
/* Get annual data. */
$data = array();
if(!$userID)
+1
View File
@@ -30,6 +30,7 @@ $lang->search->noQuery = 'Keine Suche gespeichert';
$lang->search->onMenuBar = 'In Menü anzeigen';
$lang->search->custom = 'Eigene';
$lang->search->setCommon = 'Set as public query criteria';
$lang->search->saveCondition = 'Save search options';
$lang->search->account = 'Konto';
$lang->search->module = 'Module';
+1
View File
@@ -30,6 +30,7 @@ $lang->search->noQuery = 'No query is saved yet!';
$lang->search->onMenuBar = 'Show in Menu';
$lang->search->custom = 'Custom';
$lang->search->setCommon = 'Set as public query criteria';
$lang->search->saveCondition = 'Save search options';
$lang->search->account = 'Account';
$lang->search->module = 'Module';
+1
View File
@@ -30,6 +30,7 @@ $lang->search->noQuery = 'Aucune query de sauvegardée !';
$lang->search->onMenuBar = 'Montrer dans le Menu';
$lang->search->custom = 'Personnalisation';
$lang->search->setCommon = 'Set as public query criteria';
$lang->search->saveCondition = 'Save search options';
$lang->search->account = 'Compte';
$lang->search->module = 'Module';
+1
View File
@@ -30,6 +30,7 @@ $lang->search->noQuery = '还没有保存查询!';
$lang->search->onMenuBar = '显示在菜单栏';
$lang->search->custom = '自定义';
$lang->search->setCommon = '设为公共查询条件';
$lang->search->saveCondition = '保存搜索条件';
$lang->search->account = '用户名';
$lang->search->module = '模块';
+1 -1
View File
@@ -320,7 +320,7 @@ class searchModel extends model
{
$params[$fieldName]['values'] = array('' => '', 'null' => $this->lang->search->null);
}
elseif(empty($params[$fieldName]['notnull']))
elseif(empty($params[$fieldName]['nonull']))
{
$params[$fieldName]['values'] = $params[$fieldName]['values'] + array('null' => $this->lang->search->null);
}
+7 -7
View File
@@ -64,6 +64,7 @@ $formId = 'searchForm-' . uniqid('');
html[lang^='zh-'] .fieldWidth {width: 110px !important;}
html[lang^='zh-'] .operatorWidth {width: 90px !important;}
.table tbody tr td input {display: block !important;}
#save-query {color: #0061f2;}
</style>
<?php if($style != 'simple'):?>
<div id='toggle-queries'>
@@ -242,12 +243,9 @@ foreach($fieldParams as $fieldName => $param)
echo html::hidden('actionURL', $actionURL);
echo html::hidden('groupItems', $groupItems);
echo html::submitButton($lang->search->common, '', 'btn btn-primary') . " &nbsp; ";
if($style != 'simple')
{
if(common::hasPriv('search', 'saveQuery')) echo html::a($this->createLink('search', 'saveQuery', "module=$module&onMenuBar=$onMenuBar"), $lang->save, '', "class='btn-save-form btn btn-secondary iframe' id='save-query'") . "&nbsp;";
echo html::commonButton($lang->search->reset, '', 'btn-reset-form btn');
}
if($style != 'simple') echo html::commonButton($lang->search->reset, '', 'btn-reset-form btn');
echo html::commonButton('<i class="icon icon-chevron-double-down"></i>', '', 'btn-expand-form btn btn-info pull-right');
if($style != 'simple' and common::hasPriv('search', 'saveQuery')) echo html::a($this->createLink('search', 'saveQuery', "module=$module&onMenuBar=$onMenuBar"), '<i class="icon-bug-confirmBug icon-ok"></i> ' . $lang->search->saveCondition, '', "class='btn-save-form btn btn-link iframe pull-right' id='save-query'");
echo html::hidden('formType', zget($formSession, 'formType', 'lite'));
?>
</td>
@@ -306,9 +304,11 @@ $(function()
$select.picker(pickerOptions);
});
$('#queryBox select, #queryBox input').change(function(){
$('#save-query').attr("disabled","disabled");
$('#queryBox select, #queryBox input').change(function()
{
$('#save-query').attr("disabled", "disabled");
})
/* Toggle user queries action. */
$('#toggle-queries').click(function()
{
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
$config->stakeholder->create = new stdclass();
$config->stakeholder->create->requiredFields = 'name,company';
$config->stakeholder->create->requiredFields = 'user,name,company';
$config->stakeholder->expect = new stdclass();
$config->stakeholder->expect->requiredFields = 'expect,progress';
+2
View File
@@ -2,6 +2,8 @@ $(function()
{
$('input[name*=from]').change(function()
{
$('#userLabel').remove();
if($(this).val() == 'team')
{
$('.user-info').addClass('hidden');
+2 -2
View File
@@ -26,7 +26,7 @@ class stakeholderModel extends model
{
if(!$account)
{
dao::$errors[] = $this->lang->stakeholder->userEmpty;
dao::$errors['user'] = $this->lang->stakeholder->userEmpty;
return false;
}
$user = new stdclass();
@@ -43,7 +43,7 @@ class stakeholderModel extends model
{
if(!$data->name)
{
dao::$errors[] = $this->lang->stakeholder->nameEmpty;
dao::$errors['name'] = $this->lang->stakeholder->nameEmpty;
return false;
}
+25 -1
View File
@@ -175,6 +175,12 @@ class story extends control
{
$this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec();
$this->action->create('todo', $todoID, 'finished', '', "STORY:$storyID");
if($this->config->edition == 'biz' || $this->config->edition == 'max')
{
$todo = $this->dao->select('type, idvalue')->from(TABLE_TODO)->where('id')->eq($todoID)->fetch();
if($todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done');
}
}
$message = $this->executeHooks($storyID);
@@ -184,7 +190,24 @@ class story extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $storyID));
/* If link from no head then reload. */
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
if(isonlybody())
{
$execution = $this->execution->getByID($this->session->execution);
if($this->app->tab == 'execution' and $execution->type == 'kanban')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, 0)"));
}
else
{
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
}
if($this->post->newStory)
{
@@ -2187,6 +2210,7 @@ class story extends control
$storyInfo['estimate'] = $story->estimate;
$storyInfo['pri'] = $story->pri;
$storyInfo['spec'] = html_entity_decode($story->spec, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8');
$storyInfo['status'] = $story->status;
echo json_encode($storyInfo);
}
+2
View File
@@ -168,6 +168,8 @@ class task extends control
{
$this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec();
$this->action->create('todo', $todoID, 'finished', '', "TASK:$taskID");
if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done');
}
$message = $this->executeHooks($taskID);
+2
View File
@@ -73,6 +73,8 @@ $lang->tree->all = 'Alle Module';
$lang->tree->executionDoc = "{$lang->executionCommon} Dok";
$lang->tree->product = $lang->productCommon;
$lang->tree->emptyHistory = "No History";
$lang->module = new stdclass();
$lang->module->action = new stdclass();
$lang->module->action->created = array('main' => "\$date, created <strong>\$extra</strong> by <strong>\$actor</strong>.");
+2
View File
@@ -73,6 +73,8 @@ $lang->tree->all = 'All Modules';
$lang->tree->executionDoc = "{$lang->executionCommon} Document";
$lang->tree->product = $lang->productCommon;
$lang->tree->emptyHistory = "No History";
$lang->module = new stdclass();
$lang->module->action = new stdclass();
$lang->module->action->created = array('main' => "\$date, created <strong>\$extra</strong> by <strong>\$actor</strong>.");
+2
View File
@@ -73,6 +73,8 @@ $lang->tree->all = 'Tous les Modules';
$lang->tree->executionDoc = "Document {$lang->executionCommon}";
$lang->tree->product = $lang->productCommon;
$lang->tree->emptyHistory = "Pas Historique";
$lang->module = new stdclass();
$lang->module->action = new stdclass();
$lang->module->action->created = array('main' => "\$date, créé <strong>\$extra</strong> par <strong>\$actor</strong>.");
+2
View File
@@ -73,6 +73,8 @@ $lang->tree->all = '所有模块';
$lang->tree->executionDoc = "{$lang->executionCommon}文档";
$lang->tree->product = "所属{$lang->productCommon}";
$lang->tree->emptyHistory = "暂时没有历史记录。";
$lang->module = new stdclass();
$lang->module->action = new stdclass();
$lang->module->action->created = array('main' => "\$date, 由 <strong>\$actor</strong> 创建了 <strong>\$extra</strong>。");
+6
View File
@@ -11,5 +11,11 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php if(empty($actions)):?>
<div class="table-empty-tip" id="emptyBox">
<p><span class="text-muted"><?php echo $lang->tree->emptyHistory;?></span></p>
</div>
<?php else:?>
<?php include '../../common/view/action.html.php';?>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>