Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -81,6 +81,7 @@ rpm:
|
||||
en:
|
||||
unzip ZenTaoPMS.${VERSION}.zip
|
||||
cd zentaopms/; grep -rl 'zentao.net'|xargs sed -i 's/zentao.net/zentao.pm/g';
|
||||
cd zentaopms/; grep -rl 'http://www.zentao.pm'|xargs sed -i 's/http:\/\/www.zentao.pm/https:\/\/www.zentao.pm/g';
|
||||
zip -r -9 ZenTaoPMS.$(VERSION).int.zip zentaopms
|
||||
rm -fr zentaopms
|
||||
echo $(VERSION).int > VERSION
|
||||
|
||||
@@ -945,7 +945,13 @@ class baseFixer
|
||||
public function cleanINT($fieldName = '')
|
||||
{
|
||||
$fields = $this->processFields($fieldName);
|
||||
foreach($fields as $fieldName) $this->data->$fieldName = (int)filter_var($this->data->$fieldName, FILTER_SANITIZE_NUMBER_INT);
|
||||
foreach($fields as $fieldName)
|
||||
{
|
||||
$filterVar = filter_var($this->data->$fieldName, FILTER_SANITIZE_NUMBER_INT);
|
||||
if(empty($filterVar)) $filterVar = 0;
|
||||
|
||||
$this->data->$fieldName = $filterVar;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
+1137
-1101
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,7 @@
|
||||
.product-info .progress {position: absolute; left: 10px; top: 35px; right: 90px;}
|
||||
.product-info .progress-info {position: absolute; left: 8px; top: 10px; width: 180px; font-size: 12px;}
|
||||
.product-info .type-info {color: #A6AAB8; text-align: center; position: absolute; right: 0; top: 6px; width: 100px;}
|
||||
html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; position: absolute; right: 0; top: 6px; width: 130px;}
|
||||
.product-info .type-value,
|
||||
.product-info .type-label {font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.product-info .type-value {font-size: 14px;}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
.product-info .progress {position: absolute; left: 10px; top: 35px; right: 90px;}
|
||||
.product-info .progress-info {position: absolute; left: 8px; top: 10px; width: 180px; font-size: 12px;}
|
||||
.product-info .type-info {color: #A6AAB8; text-align: center; position: absolute; right: 0; top: 6px; width: 100px;}
|
||||
html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; position: absolute; right: 0; top: 6px; width: 130px;}
|
||||
.product-info .type-value,
|
||||
.product-info .type-label {font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.product-info .type-value {font-size: 14px;}
|
||||
|
||||
@@ -1111,14 +1111,6 @@ class bug extends control
|
||||
*/
|
||||
public function linkBugs($bugID, $browseType = '', $param = 0)
|
||||
{
|
||||
/* Link bugs. */
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->bug->linkBugs($bugID);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.loadLinkBugs('$bugID')}"));
|
||||
die(js::locate($this->createLink('bug', 'edit', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
/* Get bug and queryID. */
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
|
||||
|
||||
@@ -54,33 +54,3 @@ function loadModuleRelated()
|
||||
productID = $('#product').val();
|
||||
setStories(moduleID, productID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink related bug.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @param int $bug2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function unlinkBug(bugID, bug2Unlink)
|
||||
{
|
||||
link = createLink('bug', 'unlinkBug', 'bugID=' + bugID + '&bug2Unlink=' + bug2Unlink);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'success') $('#linkBugBox').load(createLink('bug', 'ajaxGetLinkBugs', 'bugID=' + bugID));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load linkBugs.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadLinkBugs(bugID)
|
||||
{
|
||||
bugLink = createLink('bug', 'ajaxGetLinkBugs', 'bugID=' + bugID);
|
||||
$('#linkBugBox').load(bugLink);
|
||||
}
|
||||
|
||||
+1
-57
@@ -618,6 +618,7 @@ class bugModel extends model
|
||||
->add('lastEditedDate', $now)
|
||||
->join('openedBuild', ',')
|
||||
->join('mailto', ',')
|
||||
->join('linkBug', ',')
|
||||
->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now)
|
||||
->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
@@ -1159,26 +1160,6 @@ class bugModel extends model
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Link related bugs.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkBugs($bugID)
|
||||
{
|
||||
if($this->post->bugs == false) return;
|
||||
|
||||
$bug = $this->getById($bugID);
|
||||
$bugs2Link = $this->post->bugs;
|
||||
|
||||
$bugs = implode(',', $bugs2Link) . ',' . trim($bug->linkBug, ',');
|
||||
$this->dao->update(TABLE_BUG)->set('linkBug')->eq(trim($bugs, ','))->where('id')->eq($bugID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('bug', $bugID, 'linkRelatedBug', '', implode(',', $bugs2Link));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bugs to link.
|
||||
*
|
||||
@@ -1207,43 +1188,6 @@ class bugModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink related bug.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @param int $bug2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkBug($bugID, $bug2Unlink = 0)
|
||||
{
|
||||
$bug = $this->getById($bugID);
|
||||
|
||||
$bugs = explode(',', trim($bug->linkBug, ','));
|
||||
foreach($bugs as $key => $bugId)
|
||||
{
|
||||
if($bugId == $bug2Unlink) unset($bugs[$key]);
|
||||
}
|
||||
$bugs = implode(',', $bugs);
|
||||
|
||||
$this->dao->update(TABLE_BUG)->set('linkBug')->eq($bugs)->where('id')->eq($bugID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('bug', $bugID, 'unlinkRelatedBug', '', $bug2Unlink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get linkBugs.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLinkBugs($bugID)
|
||||
{
|
||||
$bug = $this->getById($bugID);
|
||||
return $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($bug->linkBug)->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Build search form.
|
||||
*
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->activate;?></small>
|
||||
|
||||
@@ -21,7 +21,7 @@ js::set('page', 'assignedto');
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->assignBug;?></small>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->close;?></small>
|
||||
|
||||
@@ -21,7 +21,7 @@ js::set('page', 'confirmbug');
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->confirmBug;?></small>
|
||||
|
||||
@@ -31,7 +31,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', 'class="bug-title"');?>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', "class='bug-title' title='$bug->title'");?>
|
||||
<small><?php echo $lang->arrow . ' ' . $lang->bug->edit;?></small>
|
||||
</h2>
|
||||
<div class="pull-right btn-toolbar">
|
||||
@@ -272,19 +272,20 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<ul class='list-unstyled' id='linkBugBox'>
|
||||
<?php
|
||||
if(isset($bug->linkBugTitles))
|
||||
{
|
||||
foreach($bug->linkBugTitles as $linkBugID => $linkBugTitle)
|
||||
{
|
||||
echo '<li>';
|
||||
echo html::a(inlink('view', "bugID=$linkBugID"), "#$linkBugID " . $linkBugTitle, '_blank');
|
||||
echo html::a("javascript:unlinkBug($bug->id, $linkBugID)", '<i class="icon-remove"></i>', '', "title='{$lang->unlink}' style='float:right'");
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
if(isset($bug->linkBugTitles))
|
||||
{
|
||||
foreach($bug->linkBugTitles as $linkBugID => $linkBugTitle)
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='linkBug[]' value=$linkBugID />";
|
||||
echo "<label>#{$linkBugID} {$linkBugTitle}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id='linkBugsBox'></span>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='space'>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '_blank');?>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '_blank', "title='$bug->title'");?>
|
||||
<small class='text-muted'> <?php echo $lang->arrow . $lang->bug->linkBugs;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
<div id='queryBox' class='show'></div>
|
||||
<div id='queryBox' class='show divider'></div>
|
||||
<?php if($bugs2Link):?>
|
||||
<form class='main-table' method='post' data-ride='table' target='hiddenwin' id='linkBugsForm'>
|
||||
<table class='table' id='bugList'>
|
||||
<thead class='hl-gray'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="c-id">
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
@@ -64,10 +64,33 @@
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar"><?php echo html::submitButton();?></div>
|
||||
<div class="table-actions btn-toolbar"><?php if($bugCount) echo html::submitButton('', '', 'btn btn-default');?></div>
|
||||
<?php echo html::hidden('bug', $bug->id);?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
<?php if($bugs2Link):?>
|
||||
$('#linkBugsForm').table();
|
||||
setTimeout(function(){$('#linkBugsForm .table-footer').removeClass('fixed-footer');}, 100);
|
||||
<?php endif;?>
|
||||
|
||||
$('#submit').click(function(){
|
||||
var output = '';
|
||||
$('#linkBugsForm').find('tr.checked').each(function(){
|
||||
var bugID = $(this).find('td.c-id').find('div.checkbox-primary input').attr('value');
|
||||
var bugTitle = "#" + bugID + ' ' + $(this).find('td').eq(3).attr('title');
|
||||
var checkbox = "<li><div class='checkbox-primary'><input type='checkbox' checked='checked' name='linkBug[]' " + "value=" + bugID + " /><label>" + bugTitle + "</label></div></li>";
|
||||
|
||||
output += checkbox;
|
||||
});
|
||||
$.closeModal();
|
||||
parent.$('#linkBugsBox').html(output);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -22,7 +22,7 @@ js::set('productID' , $bug->product);
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->resolve;?></small>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label-id'><?php echo $build->id;?></span>
|
||||
<?php echo html::a($this->createLink('build', 'view', 'build=' . $build->id), $build->name);?>
|
||||
<?php echo html::a($this->createLink('build', 'view', 'build=' . $build->id), $build->name, '', "title='$build->name'");?>
|
||||
<small><?php echo $lang->arrow . $lang->build->edit;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -1590,6 +1590,7 @@ EOD;
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
|
||||
curl_setopt($curl, CURLOPT_ENCODING, "");
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
curl_setopt($curl, CURLOPT_HEADER, FALSE);
|
||||
|
||||
$headers[] = "API-RemoteIP: " . $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
$(function()
|
||||
{
|
||||
<?php if(!empty($setShowModule)):?>
|
||||
$('#sidebar .cell .text-center:last').append("<a href='javascript:;' data-toggle='showModuleModal' class='text-secondary small'><?php echo $lang->datatable->showModule?></a><hr class='space-sm' />");
|
||||
$("a[data-toggle='showModuleModal']").click(function(){$('#showModuleModal').modal('show')});
|
||||
$('#sidebar .cell .text-center:last').append("<a href='#showModuleModal' data-toggle='modal' class='text-secondary small'><?php echo $lang->datatable->showModule?></a><hr class='space-sm' />");
|
||||
<?php endif;?>
|
||||
|
||||
var $btnToolbar = $('#main .table-header .btn-toolbar:first');
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
form {position:relative}
|
||||
#querybox {float: none!important; width: auto;}
|
||||
#moreOrLite {right: 10px!important}
|
||||
|
||||
#userList tbody td{white-space: nowrap; overflow:hidden}
|
||||
|
||||
@@ -70,7 +70,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
|
||||
</th>
|
||||
<th><?php common::printorderlink('realname', $orderBy, $vars, $lang->user->realname);?></th>
|
||||
<th><?php common::printOrderLink('account', $orderBy, $vars, $lang->user->account);?></th>
|
||||
<th class="c-type"><?php common::printOrderLink('role', $orderBy, $vars, $lang->user->role);?></th>
|
||||
<th class="w-90px"><?php common::printOrderLink('role', $orderBy, $vars, $lang->user->role);?></th>
|
||||
<th class="c-url"><?php common::printOrderLink('email', $orderBy, $vars, $lang->user->email);?></th>
|
||||
<th class="c-type"><?php common::printOrderLink('gender', $orderBy, $vars, $lang->user->gender);?></th>
|
||||
<th><?php common::printOrderLink('phone', $orderBy, $vars, $lang->user->phone);?></th>
|
||||
@@ -92,7 +92,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
|
||||
</td>
|
||||
<td><?php if(!common::printLink('user', 'view', "account=$user->account", $user->realname, '', "title='$user->realname'")) echo $user->realname;?></td>
|
||||
<td><?php echo $user->account;?></td>
|
||||
<td class="c-type"><?php echo zget($lang->user->roleList, $user->role, '');?></td>
|
||||
<td class="w-90px" title='<?php echo zget($lang->user->roleList, $user->role, '');?>'><?php echo zget($lang->user->roleList, $user->role, '');?></td>
|
||||
<td class="c-url" title="<?php echo $user->email;?>"><?php echo html::mailto($user->email);?></td>
|
||||
<td class="c-type"><?php echo zget($lang->user->genderList, $user->gender, $user->gender);?></td>
|
||||
<td><?php echo $user->phone;?></td>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $doc->id;?></span>
|
||||
<?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $doc->title);?>
|
||||
<?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $doc->title, '', "title='$doc->title'");?>
|
||||
<small> <?php echo $lang->arrow . ' ' . $lang->doc->edit;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<div class='heading'>
|
||||
<h2>
|
||||
<h2 title='<?php echo $entry->name;?>'>
|
||||
<?php echo $entry->name;?>
|
||||
<span class='label label-info'><?php echo $lang->entry->log;?></span>
|
||||
</h2>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
|
||||
<strong><?php echo $title;?></strong>
|
||||
<strong title='<?php echo $title;?>'><?php echo $title;?></strong>
|
||||
<small class='text-danger'><?php echo html::icon('cog');?> <?php echo $lang->extension->uninstall;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
|
||||
<strong><?php echo $title;?></strong>
|
||||
<strong title='<?php echo $title;?>'><?php echo $title;?></strong>
|
||||
</h2>
|
||||
</div>
|
||||
<?php if($error):?>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->group->confirmDelete);?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
@@ -24,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-table'>
|
||||
<table class='table' id='groupList'>
|
||||
<table class='table tablesorter' id='groupList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id text-center'><?php echo $lang->group->id;?></th>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<h2 title='<?php echo $group->name;?>'>
|
||||
<span class='label label-id'><?php echo $group->id;?></span>
|
||||
<?php echo $group->name;?>
|
||||
<small><?php echo $lang->arrow . $lang->group->edit;?></small>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<h2 title='<?php echo $group->name;?>'>
|
||||
<span class='label label-id'><?php echo $group->id;?></span>
|
||||
<?php echo $group->name;?>
|
||||
</h2>
|
||||
|
||||
@@ -13,9 +13,8 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<h2 title='<?php echo $group->name;?>'>
|
||||
<span class='label-id'><?php echo $group->id;?></span>
|
||||
<?php echo $group->name;?>
|
||||
<small> <?php echo $lang->arrow . $lang->group->manageView;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -16,10 +16,10 @@ $lang->misc->api = 'http://api.zentao.net';
|
||||
|
||||
$lang->misc->zentao = new stdclass();
|
||||
$lang->misc->zentao->version = 'Version %s';
|
||||
$lang->misc->zentao->labels['about'] = 'About ZenTao';
|
||||
$lang->misc->zentao->labels['support'] = 'Technical Support';
|
||||
$lang->misc->zentao->labels['about'] = 'About';
|
||||
$lang->misc->zentao->labels['support'] = 'Support';
|
||||
$lang->misc->zentao->labels['cowin'] = 'Help Us';
|
||||
$lang->misc->zentao->labels['service'] = 'Service List';
|
||||
$lang->misc->zentao->labels['service'] = 'Service';
|
||||
|
||||
$lang->misc->zentao->icons['about'] = 'group';
|
||||
$lang->misc->zentao->icons['support'] = 'question-sign';
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<main id="main">
|
||||
<div class="container">
|
||||
<div class="container" id='<?php echo $version;?>'>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-800px'>
|
||||
<div class='main-header clearfix'>
|
||||
<h2 class='pull-left'><?php echo $lang->changeLog ?></h2>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class='dropdown' id='versionMenu'>
|
||||
<button class='btn dropdown-toggle' type='button' data-toggle='dropdown'><?php echo $version === 'latest' ? $lang->misc->feature->lastest : ($lang->misc->releaseDate[$versionName] . ' ' . $version) ?> <span class='caret'></span></button>
|
||||
<button class='btn dropdown-toggle' type='button' data-toggle='dropdown'><?php echo $version === 'latest' ? $lang->misc->feature->lastest : ($lang->misc->releaseDate[$version] . ' ' . $version) ?> <span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php foreach(array_keys($lang->misc->feature->all) as $versionName):?>
|
||||
<li<?php echo $versionName === $version ? " class='active'" : '' ?>>
|
||||
|
||||
@@ -25,7 +25,7 @@ $lang->my->scoreRule = 'Score Rule';
|
||||
$lang->my->noTodo = 'No todos. ';
|
||||
|
||||
$lang->my->taskMenu = new stdclass();
|
||||
$lang->my->taskMenu->assignedToMe = 'AssignedToMe';
|
||||
$lang->my->taskMenu->assignedToMe = 'Assigned To Me';
|
||||
$lang->my->taskMenu->openedByMe = 'CreatedByMe';
|
||||
$lang->my->taskMenu->finishedByMe = 'FinishedByMe';
|
||||
$lang->my->taskMenu->closedByMe = 'ClosedByMe';
|
||||
|
||||
@@ -558,11 +558,12 @@ class product extends control
|
||||
$output = html::select($field, $plans, $planID, "class='form-control chosen'");
|
||||
if(count($plans) == 1 and $needCreate)
|
||||
{
|
||||
$output .= "<span class='input-group-addon'>";
|
||||
$output .= html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch"), $this->lang->productplan->create, '_blank');
|
||||
$output .= ' ';
|
||||
$output .= html::a("javascript:loadProductPlans($productID)", $this->lang->refresh);
|
||||
$output .= '</span>';
|
||||
$output .= "<div class='input-group-btn'>";
|
||||
$output .= html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch", '', true), "<i class='icon icon-plus'></i>", '', "class='btn btn-icon' data-toggle='modal' data-type='iframe' data-width='95%' title='{$this->lang->productplan->create}'");
|
||||
$output .= '</div>';
|
||||
$output .= "<div class='input-group-btn'>";
|
||||
$output .= html::a("#", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon refresh' data-toggle='tooltip' title='{$this->lang->refresh}' onclick='loadProductPlans($productID)'");
|
||||
$output .= '</div>';
|
||||
}
|
||||
die($output);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,23 @@
|
||||
$(function()
|
||||
{
|
||||
$('.popoverStage').mouseover(function(){$(this).popover('show')});
|
||||
$('.popoverStage').mouseout(function(){$(this).popover('hide')});
|
||||
|
||||
if($('#storyList thead th.c-title').width() < 150) $('#storyList thead th.c-title').width(150);
|
||||
|
||||
// Fix state dropdown menu position
|
||||
$('.c-stage > .dropdown').each(function()
|
||||
{
|
||||
var $this = $(this);
|
||||
var menuHeight = $(this).find('.dropdown-menu').outerHeight();
|
||||
var $tr = $this.closest('tr');
|
||||
var height = 0;
|
||||
while(height < menuHeight)
|
||||
{
|
||||
var $next = $tr.next('tr');
|
||||
if(!$next.length) break;
|
||||
height += $next.outerHeight;
|
||||
}
|
||||
if(height < menuHeight)
|
||||
{
|
||||
$this.addClass('dropup');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -116,8 +116,8 @@ $lang->product->aclList['open'] = "默认设置(有{$lang->productCommon}视
|
||||
$lang->product->aclList['private'] = "私有{$lang->productCommon}(只有{$lang->productCommon}相关负责人和{$lang->projectCommon}团队成员才能访问)";
|
||||
$lang->product->aclList['custom'] = '自定义白名单(团队成员和白名单的成员可以访问)';
|
||||
|
||||
$lang->product->storySummary = "本页共 <strong>%s</strong> 个需求,预计 <strong>%s</strong> 个工时,用例覆盖率<strong>%s</strong>。";
|
||||
$lang->product->checkedSummary = "选中 <strong>%total%</strong> 个需求,预计 <strong>%estimate%</strong> 个工时,用例覆盖率<strong>%rate%</strong>。";
|
||||
$lang->product->storySummary = "本页共 <strong>%s</strong> 个需求,预计 <strong>%s</strong> 个工时,用例覆盖率 <strong>%s</strong>。";
|
||||
$lang->product->checkedSummary = "选中 <strong>%total%</strong> 个需求,预计 <strong>%estimate%</strong> 个工时,用例覆盖率 <strong>%rate%</strong>。";
|
||||
$lang->product->noModule = '<div>您现在还没有模块信息</div><div>请维护产品模块</div>';
|
||||
$lang->product->noProduct = '暂时没有产品。';
|
||||
$lang->product->noMatched = '找不到包含"%s"的' . $lang->productCommon;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $product->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $product->name : html::a($this->createLink('product', 'view', "productID=$product->id"), $product->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$product->name'>" . $product->name . '</span>') : html::a($this->createLink('product', 'view', "productID=$product->id"), $product->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->product->close;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
if(count($lines) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=line"), $lang->tree->manageLine, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=line", '', true), $lang->tree->manageLine, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductLines({$rootID})", $lang->refresh, '', "class='refresh'");
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductLines($rootID)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="main-header">
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $product->id;?></span>
|
||||
<?php echo html::a($this->createLink('product', 'view', 'product=' . $product->id), $product->name);?>
|
||||
<?php echo html::a($this->createLink('product', 'view', 'product=' . $product->id), $product->name, '', "title='$product->name'");?>
|
||||
<small><?php echo $lang->arrow . ' ' . $lang->product->edit;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -49,6 +49,7 @@ class productplan extends control
|
||||
$planID = $this->productplan->create();
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('productplan', $planID, 'opened');
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.$('a.refresh').click()}"));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('productplan', 'browse', "productID=$product&branch=$branch")));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo html::a(inlink('view', "id=$plan->id"), $plan->title);?></strong></h2>
|
||||
<h2><?php echo html::a(inlink('view', "id=$plan->id"), $plan->title, '', "title='$plan->title'");?></strong></h2>
|
||||
</div>
|
||||
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $plan->id;?></span>
|
||||
<span title='<?php echo $plan->name;?>' class='text'><?php echo $plan->title;?></span>
|
||||
<span title='<?php echo $plan->title;?>' class='text'><?php echo $plan->title;?></span>
|
||||
<?php if($product->type !== 'normal') echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>" . $branches[$branch] . '</span>';?>
|
||||
<span class='label label-info label-badge'>
|
||||
<?php echo ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? $lang->productplan->future : $plan->begin . '~' . $plan->end;?>
|
||||
@@ -67,8 +67,8 @@
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory')):?>
|
||||
<?php $canOrder = common::hasPriv('project', 'storySort');?>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory')):?>
|
||||
<div class='actions'>
|
||||
<?php echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
|
||||
@@ -1014,7 +1014,9 @@ class project extends control
|
||||
}
|
||||
}
|
||||
|
||||
$this->project->setMenu($this->projects, key($this->projects));
|
||||
$projectID = key($this->projects);
|
||||
if($this->session->project) $projectID = $this->session->project;
|
||||
$this->project->setMenu($this->projects, $projectID);
|
||||
|
||||
$this->view->title = $this->lang->project->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
|
||||
@@ -38,7 +38,7 @@ $lang->project->teamname = 'Team Name';
|
||||
$lang->project->order = "Sort {$lang->projectCommon}";
|
||||
$lang->project->products = "Link {$lang->productCommon}";
|
||||
$lang->project->whitelist = 'Whitelist';
|
||||
$lang->project->totalEstimate = 'Est.(h)';
|
||||
$lang->project->totalEstimate = 'Est';
|
||||
$lang->project->totalConsumed = 'Cost';
|
||||
$lang->project->totalLeft = 'Left';
|
||||
$lang->project->progress = 'Progress';
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->project->activate;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . $lang->project->close;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->project->fixFirst;?></h2>
|
||||
<h2><?php echo $lang->project->fixFirst;?></h2>
|
||||
</div>
|
||||
<form target='hiddenwin' method='post'>
|
||||
<table class='table table-form'>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->project->putoff;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->project->start;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->project->suspend;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1156,32 +1156,6 @@ class story extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: if type is linkStories, get related stories else get child stories.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetLinkedStories($storyID, $type = '')
|
||||
{
|
||||
/* Get linked stories. */
|
||||
$stories = $this->story->getLinkedStories($storyID, $type);
|
||||
|
||||
/* Build linked stories list. */
|
||||
$output = '';
|
||||
foreach($stories as $storyId => $storyTitle)
|
||||
{
|
||||
$output .= '<li>';
|
||||
$output .= html::a(inlink('view', "storyID=$storyId"), "#$storyId " . $storyTitle, '_blank');
|
||||
$output .= html::a("javascript:unlinkStory($storyID, \"$type\", $storyId)", '<i class="icon-remove"></i>', '', "title='{$this->lang->unlink}' style='float:right'");
|
||||
$output .= '</li>';
|
||||
}
|
||||
|
||||
die($output);
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get stories of a project in html select.
|
||||
*
|
||||
|
||||
+33
-22
@@ -495,11 +495,29 @@ class storyModel extends model
|
||||
->join('mailto', ',')
|
||||
->join('linkStories', ',')
|
||||
->join('childStories', ',')
|
||||
->remove('files,labels,comment,contactListMenu')
|
||||
->remove('files,labels,comment,contactListMenu,stages')
|
||||
->get();
|
||||
if(isset($story->plan) and is_array($story->plan)) $story->plan = trim(join(',', $story->plan), ',');
|
||||
if(empty($_POST['product'])) $story->branch = $oldStory->branch;
|
||||
if(empty($_POST['branch'])) $story->branch = 0;
|
||||
if(!empty($_POST['stages']))
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_STORYSTAGE)->where('story')->eq($storyID)->exec();
|
||||
|
||||
$stageList = join(',', array_keys($this->lang->story->stageList));
|
||||
$minStagePos = strlen($stageList);
|
||||
$minStage = '';
|
||||
foreach($this->post->stages as $branch => $stage)
|
||||
{
|
||||
$this->dao->insert(TABLE_STORYSTAGE)->set('story')->eq($storyID)->set('branch')->eq($branch)->set('stage')->eq($stage)->exec();
|
||||
if(strpos($stageList, $stage) !== false and strpos($stageList, $stage) < $minStagePos)
|
||||
{
|
||||
$minStage = $stage;
|
||||
$minStagePos = strpos($stageList, $stage);
|
||||
}
|
||||
}
|
||||
$story->stage = $minStage;
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_STORY)
|
||||
->data($story)
|
||||
@@ -1270,20 +1288,6 @@ class storyModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get linked stories.
|
||||
*
|
||||
* @param string $storyID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLinkedStories($storyID, $type = 'linkStories')
|
||||
{
|
||||
$story = $this->getById($storyID);
|
||||
return $this->dao->select('id, title')->from(TABLE_STORY)->where('id')->in($story->$type)->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stories list of a product.
|
||||
*
|
||||
@@ -2358,15 +2362,22 @@ class storyModel extends model
|
||||
echo $story->estimate;
|
||||
break;
|
||||
case 'stage':
|
||||
echo "<div" . (isset($storyStages[$story->id]) ? " class='popoverStage' data-toggle='popover' data-placement='bottom' data-target='\$next'" : '') . "'>";
|
||||
echo $this->lang->story->stageList[$story->stage];
|
||||
if(isset($storyStages[$story->id])) echo "<span><i class='icon icon-caret-down'></i></span>";
|
||||
echo '</div>';
|
||||
if(isset($storyStages[$story->id]))
|
||||
{
|
||||
echo "<div class='popover'>";
|
||||
foreach($storyStages[$story->id] as $storyBranch => $storyStage) echo $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . '<br />';
|
||||
echo "</div>";
|
||||
echo "<div class='dropdown dropdown-hover'>";
|
||||
echo $this->lang->story->stageList[$story->stage];
|
||||
echo "<span class='caret'></span>";
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
foreach($storyStages[$story->id] as $storyBranch => $storyStage)
|
||||
{
|
||||
echo '<li class="text-ellipsis">' . $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . '</li>';
|
||||
}
|
||||
echo "</ul>";
|
||||
echo '</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $this->lang->story->stageList[$story->stage];
|
||||
}
|
||||
break;
|
||||
case 'taskCount':
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $story->id;?></span>
|
||||
<?php echo isonlybody() ? $story->title : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php echo isonlybody() ? ("<span title='$story->title'>" . $story->title . '</span>') : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->story->activate;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $story->id;?></span>
|
||||
<?php echo isonlybody() ? $story->title : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php echo isonlybody() ? ("<span title='$story->title'>" . $story->title . '</span>') : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->story->close;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
{
|
||||
echo "<div class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story¤tModuleID=0&branch=$branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story¤tModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'");
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
@@ -60,13 +60,13 @@
|
||||
<div class='input-group' id='planIdBox'>
|
||||
<?php
|
||||
echo html::select('plan', $plans, $planID, "class='form-control chosen'");
|
||||
if(count($plans) != 1)
|
||||
if(count($plans) == 1)
|
||||
{
|
||||
echo "<div class='input-group-btn'>";
|
||||
echo html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch"), "<i class='icon icon-plus'></i>", '_blank', "class='btn btn-icon' data-toggle='tooltip' title='{$lang->productplan->create}'");
|
||||
echo html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch", '', true), "<i class='icon icon-plus'></i>", '', "class='btn btn-icon' data-toggle='modal' data-type='iframe' data-width='95%' title='{$lang->productplan->create}'");
|
||||
echo '</div>';
|
||||
echo "<div class='input-group-btn'>";
|
||||
echo html::a("javascript:loadProductPlans($productID)", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon' data-toggle='tooltip' title='{$lang->refresh}'");
|
||||
echo html::a("#", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon refresh' data-toggle='tooltip' title='{$lang->refresh}' onclick='loadProductPlans($productID)'");
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -49,8 +49,6 @@
|
||||
<?php echo html::textarea('comment', '', "rows='5' class='form-control'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='linkStoriesBOX'><?php echo html::hidden('linkStories', $story->linkStories);?></div>
|
||||
<div id='childStoriesBOX'><?php echo html::hidden('childStories', $story->childStories);?></div>
|
||||
<div class='actions form-actions text-center'>
|
||||
<?php
|
||||
echo html::hidden('lastEditedDate', $story->lastEditedDate);
|
||||
@@ -86,9 +84,9 @@
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story¤tModuleID=0&branch=$story->branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story¤tModuleID=0&branch=$story->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductModules($story->product)", $lang->refresh);
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($story->product)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
@@ -104,8 +102,8 @@
|
||||
if(count($plans) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('productplan', 'create', "productID=$story->product&branch=$story->branch"), $lang->productplan->create, '_blank');
|
||||
echo html::a("javascript:loadProductPlans($story->product)", $lang->refresh);
|
||||
echo html::a($this->createLink('productplan', 'create', "productID=$story->product&branch=$story->branch", '', true), $lang->productplan->create, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductPlans($story->product)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
@@ -128,7 +126,21 @@
|
||||
<?php if($story->status != 'draft'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->stage;?></th>
|
||||
<td><?php echo html::select('stage', $lang->story->stageList, $story->stage, "class='form-control chosen'");?></td>
|
||||
<td>
|
||||
<?php
|
||||
if($story->stages and $branches)
|
||||
{
|
||||
foreach($story->stages as $branch => $stage)
|
||||
{
|
||||
if(isset($branches[$branch])) echo '<p>' . $branches[$branch] . html::select("stages[$branch]", $lang->story->stageList, $stage, "class='form-control chosen'") . '</p>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::select('stage', $lang->story->stageList, $story->stage, "class='form-control chosen'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
@@ -200,23 +212,24 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<ul class='list-unstyled' id='linkStoriesBox'>
|
||||
<?php
|
||||
if($story->linkStories)
|
||||
{
|
||||
$linkStories = explode(',', $story->linkStories);
|
||||
foreach($linkStories as $linkStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$linkStoryID]))
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='linkStories[]' value=$linkStoryID />";
|
||||
echo "<label>#{$linkStoryID} {$story->extraStories[$linkStoryID]}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
if($story->linkStories)
|
||||
{
|
||||
$linkStories = explode(',', $story->linkStories);
|
||||
foreach($linkStories as $linkStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$linkStoryID]))
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='linkStories[]' value=$linkStoryID />";
|
||||
echo "<label>#{$linkStoryID} {$story->extraStories[$linkStoryID]}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id='linkStoriesBox'></span>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -230,23 +243,24 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<ul class='list-unstyled' id='childStoriesBox'>
|
||||
<?php
|
||||
if($story->childStories)
|
||||
{
|
||||
$childStories = explode(',', $story->childStories);
|
||||
foreach($childStories as $childStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$childStoryID]))
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='childStories[]' value=$childStoryID />";
|
||||
echo "<label>#{$childStoryID} {$story->extraStories[$childStoryID]}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
if($story->childStories)
|
||||
{
|
||||
$childStories = explode(',', $story->childStories);
|
||||
foreach($childStories as $childStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$childStoryID]))
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='childStories[]' value=$childStoryID />";
|
||||
echo "<label>#{$childStoryID} {$story->extraStories[$childStoryID]}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id='childStoriesBox'></span>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $story->id;?></span>
|
||||
<?php echo isonlybody() ? $story->title : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php echo isonlybody() ? ("<span title='$story->title'>" . $story->title . '</span>') : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->story->linkStory;?></small>
|
||||
<?php endif;?>
|
||||
@@ -93,7 +93,7 @@ $(function()
|
||||
output += checkbox;
|
||||
});
|
||||
$.closeModal();
|
||||
parent.$('#' + linkType + 'Box').append(output);
|
||||
parent.$('#' + linkType + 'Box').html(output);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -183,6 +183,7 @@ $lang->task->error->left = 'Please enter "Left Hour"';
|
||||
$lang->task->error->work = '"Remark" must be less than %d characteres.';
|
||||
$lang->task->error->skipClose = 'Task: %s is not “Done” or “Cancelled”. Do you want to close it?';
|
||||
$lang->task->error->consumed = 'Task: %s Hour must be more than 0. Ignore changes to this Task.';
|
||||
$lang->task->error->assignedTo = 'Multiple task in the current state cannot be assigned to member who outside the task team.';
|
||||
|
||||
/* Report. */
|
||||
$lang->task->report = new stdclass();
|
||||
|
||||
@@ -183,6 +183,7 @@ $lang->task->error->left = '请填写"剩余"';
|
||||
$lang->task->error->work = '"备注"必须小于%d个字符';
|
||||
$lang->task->error->skipClose = '任务:%s 不是“已完成”或“已取消”状态,确定要关闭吗?';
|
||||
$lang->task->error->consumed = '任务:%s工时不能小于0,忽略该任务工时的改动';
|
||||
$lang->task->error->assignedTo = '当前状态的多人任务不能指派给任务团队外的成员。';
|
||||
|
||||
/* Report. */
|
||||
$lang->task->report = new stdclass();
|
||||
|
||||
+17
-7
@@ -505,12 +505,16 @@ class taskModel extends model
|
||||
$currentTask->finishedBy = '';
|
||||
$currentTask->finishedDate = '0000-00-00';
|
||||
}
|
||||
if($oldTask->assignedTo != $teams[count($teams) - 1] && isset($team[$currentTask->assignedTo]) && $oldTask->status == 'wait') $currentTask->status = 'doing';
|
||||
|
||||
if($currentTask->left == 0 && $oldTask->left != 0 && $currentTask->consumed != 0)
|
||||
{
|
||||
$currentTask->status = 'done';
|
||||
$currentTask->finishedBy = $this->app->user->account;
|
||||
$currentTask->finishedDate = $now;
|
||||
if($oldTask->assignedTo == $teams[count($teams) - 1] && $team[$oldTask->assignedTo]->left == 0 && $team[$oldTask->assignedTo]->consumed != 0)
|
||||
{
|
||||
$currentTask->status = 'done';
|
||||
$currentTask->finishedBy = $this->app->user->account;
|
||||
$currentTask->finishedDate = $now;
|
||||
}
|
||||
}
|
||||
|
||||
return $currentTask;
|
||||
@@ -581,6 +585,12 @@ class taskModel extends model
|
||||
$teams = array();
|
||||
if($this->post->multiple)
|
||||
{
|
||||
if(strpos(',done,closed,cancel,', ",{$task->status},") === false && !in_array($this->post->assignedTo, $this->post->team))
|
||||
{
|
||||
dao::$errors[] = $this->lang->task->error->assignedTo;
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach($this->post->team as $row => $account)
|
||||
{
|
||||
if(empty($account) or isset($team[$account])) continue;
|
||||
@@ -616,7 +626,7 @@ class taskModel extends model
|
||||
->checkIF($task->estimate != false, 'estimate', 'float')
|
||||
->checkIF($task->left != false, 'left', 'float')
|
||||
->checkIF($task->consumed != false, 'consumed', 'float')
|
||||
->checkIF($task->status != 'wait' and $task->left == 0 and $task->status != 'cancel' and $task->status != 'closed', 'status', 'equal', 'done')
|
||||
->checkIF($task->status != 'wait' and empty($teams) and $task->left == 0 and $task->status != 'cancel' and $task->status != 'closed', 'status', 'equal', 'done')
|
||||
|
||||
->batchCheckIF($task->status == 'wait' or $task->status == 'doing', 'finishedBy, finishedDate,canceledBy, canceledDate, closedBy, closedDate, closedReason', 'empty')
|
||||
|
||||
@@ -1123,7 +1133,7 @@ class taskModel extends model
|
||||
->setDefault('status', 'done')
|
||||
->setDefault('finishedBy, lastEditedBy', $this->app->user->account)
|
||||
->setDefault('finishedDate, lastEditedDate', $now)
|
||||
->removeIF(!empty($oldTask->team), 'finishedBy,finishedDate,status')
|
||||
->removeIF(!empty($oldTask->team), 'finishedBy,finishedDate,status,left')
|
||||
->remove('comment,files,labels')
|
||||
->get();
|
||||
|
||||
@@ -1145,8 +1155,8 @@ class taskModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$consumed = $oldTask->team[$this->app->user->account]->consumed;
|
||||
if($task->consumed < $consumed)
|
||||
$consumed = $task->consumed - $oldTask->team[$this->app->user->account]->consumed;
|
||||
if($consumed < 0)
|
||||
{
|
||||
dao::$errors[] = $this->lang->task->error->consumedSmall;
|
||||
return false;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . $lang->task->activate;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -15,19 +15,17 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<div style="padding: 0 50px 0 0">
|
||||
<div class="alert with-icon no-margin">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->transfer);?></p>
|
||||
</div>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->transfer);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . (empty($task->team) ? $lang->task->assign : $lang->task->transfer);?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . $lang->task->cancel;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->task->close;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . $lang->task->finish;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -14,10 +14,18 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->pause);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->task->pause;?></small>
|
||||
<?php endif;?>
|
||||
@@ -40,6 +48,7 @@
|
||||
</form>
|
||||
<hr class='small' />
|
||||
<div class='main'><?php include '../../common/view/action.html.php';?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -18,19 +18,17 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<div style="padding: 0 50px 0 0">
|
||||
<div class="alert with-icon no-margin">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->logEfforts);?></p>
|
||||
</div>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->logEfforts);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->task->logEfforts;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->task->start;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -931,14 +931,6 @@ class testcase extends control
|
||||
*/
|
||||
public function linkCases($caseID, $browseType = '', $param = 0)
|
||||
{
|
||||
/* Link cases. */
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->testcase->linkCases($caseID);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.loadLinkCases('$caseID')}"));
|
||||
die(js::locate($this->createLink('testcase', 'edit', "caseID=$caseID"), 'parent'));
|
||||
}
|
||||
|
||||
/* Get case and queryID. */
|
||||
$case = $this->testcase->getById($caseID);
|
||||
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
|
||||
@@ -965,47 +957,6 @@ class testcase extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get linkCases.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetLinkCases($caseID)
|
||||
{
|
||||
/* Get linkCases. */
|
||||
$cases = $this->testcase->getLinkCases($caseID);
|
||||
|
||||
/* Build linkCase list. */
|
||||
$output = '';
|
||||
foreach($cases as $caseId => $caseTitle)
|
||||
{
|
||||
$output .= '<li>';
|
||||
$output .= html::a(inlink('view', "caseID=$caseId"), "#$caseId " . $caseTitle, '_blank');
|
||||
$output .= html::a("javascript:unlinkCase($caseID, $caseId)", '<i class="icon-remove"></i>', '', "title='{$this->lang->unlink}' style='float:right'");
|
||||
$output .= '</li>';
|
||||
}
|
||||
|
||||
die($output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink related case.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param int $case2Unlink
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function unlinkCase($caseID, $case2Unlink = 0)
|
||||
{
|
||||
/* Unlink related case. */
|
||||
$this->testcase->unlinkCase($caseID, $case2Unlink);
|
||||
|
||||
die('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* Confirm testcase changed.
|
||||
*
|
||||
|
||||
@@ -2,4 +2,3 @@
|
||||
.col-side .chosen-container {width: 218px!important}
|
||||
.table-form > tbody > tr > td .btn.addbutton {display:block; margin:1px 0px; width:40px; padding:1px 6px;}
|
||||
.table-form > tbody > tr > td .btn.delbutton {display:block; margin:1px 0px; width:40px; padding:1px 6px;}
|
||||
#linkCaseBox li {margin-left:-56px}
|
||||
|
||||
@@ -20,37 +20,6 @@ $(document).ready(function()
|
||||
initSteps();
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Unlink related case.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param int $case2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function unlinkCase(caseID, case2Unlink)
|
||||
{
|
||||
link = createLink('testcase', 'unlinkCase', 'caseID=' + caseID + '&case2Unlink=' + case2Unlink);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'success') $('#linkCaseBox').load(createLink('testcase', 'ajaxGetLinkCases', 'caseID=' + caseID));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load linkCases.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadLinkCases(caseID)
|
||||
{
|
||||
caseLink = createLink('testcase', 'ajaxGetLinkCases', 'caseID=' + caseID);
|
||||
$('#linkCaseBox').load(caseLink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load lib modules.
|
||||
*
|
||||
|
||||
@@ -651,6 +651,7 @@ class testcaseModel extends model
|
||||
->setIF($this->post->story != false and $this->post->story != $oldCase->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->setDefault('story,branch', 0)
|
||||
->join('stage', ',')
|
||||
->join('linkCase', ',')
|
||||
->remove('comment,steps,expects,files,labels,stepType')
|
||||
->get();
|
||||
if(!$this->forceNotReview() and $stepChanged) $case->status = 'wait';
|
||||
@@ -749,26 +750,6 @@ class testcaseModel extends model
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Link related cases.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkCases($caseID)
|
||||
{
|
||||
if($this->post->cases == false) return;
|
||||
|
||||
$case = $this->getById($caseID);
|
||||
$cases2Link = $this->post->cases;
|
||||
|
||||
$cases = implode(',', $cases2Link) . ',' . trim($case->linkCase, ',');
|
||||
$this->dao->update(TABLE_CASE)->set('linkCase')->eq(trim($cases, ','))->where('id')->eq($caseID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('case', $caseID, 'linkRelatedCase', '', implode(',', $cases2Link));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cases to link.
|
||||
*
|
||||
@@ -797,43 +778,6 @@ class testcaseModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink related case.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param int $case2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkCase($caseID, $case2Unlink = 0)
|
||||
{
|
||||
$case = $this->getById($caseID);
|
||||
|
||||
$cases = explode(',', trim($case->linkCase, ','));
|
||||
foreach($cases as $key => $caseId)
|
||||
{
|
||||
if($caseId == $case2Unlink) unset($cases[$key]);
|
||||
}
|
||||
$cases = implode(',', $cases);
|
||||
|
||||
$this->dao->update(TABLE_CASE)->set('linkCase')->eq($cases)->where('id')->eq($caseID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('case', $caseID, 'unlinkRelatedCase', '', $case2Unlink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get linkCases.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLinkCases($caseID)
|
||||
{
|
||||
$case = $this->getById($caseID);
|
||||
return $this->dao->select('id, title')->from(TABLE_CASE)->where('id')->in($case->linkCase)->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch update testcases.
|
||||
*
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<?php echo $lang->testcase->batchCreate;?>
|
||||
<?php if($this->session->currentProductType !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
|
||||
<?php if($story):?>
|
||||
<small class='text'><?php echo $lang->arrow . $story->title ?></small>
|
||||
<small class='text' title='<?php echo $story->title ?>'><?php echo $lang->arrow . $story->title ?></small>
|
||||
<?php endif;?>
|
||||
</h2>
|
||||
<div class="pull-right btn-toolbar">
|
||||
|
||||
@@ -225,19 +225,20 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<ul class='list-unstyled' id='linkCaseBox'>
|
||||
<?php
|
||||
if(isset($case->linkCaseTitles))
|
||||
{
|
||||
foreach($case->linkCaseTitles as $linkCaseID => $linkCaseTitle)
|
||||
{
|
||||
echo '<li>';
|
||||
echo html::a(inlink('view', "caseID=$linkCaseID"), "#$linkCaseID " . $linkCaseTitle, '_blank');
|
||||
echo html::a("javascript:unlinkCase($case->id, $linkCaseID)", '<i class="icon-trash"></i>', '', "title='{$lang->unlink}' style='float:right'");
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
if(isset($case->linkCaseTitles))
|
||||
{
|
||||
foreach($case->linkCaseTitles as $linkCaseID => $linkCaseTitle)
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='linkCase[]' value=$linkCaseID />";
|
||||
echo "<label>#{$linkCaseID} {$linkCaseTitle}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id='linkCaseBox'></span>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -11,16 +11,15 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $case->id;?></span>
|
||||
<?php echo html::a($this->createLink('case', 'view', 'caseID=' . $case->id), $case->title, '_blank', "class='text' title='{$case->title}'");?> <span class='text-muted'><i class="icon-angle-right"></i> <span><?php echo $lang->testcase->linkCases;?></span></span>
|
||||
</div>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $case->id;?></span>
|
||||
<?php echo html::a($this->createLink('case', 'view', "caseID={$case->id}"), $case->title, '_blank');?>
|
||||
<small class='text-muted'> <?php echo $lang->arrow . $lang->testcase->linkCases;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div id='queryBox' class='cell show'></div>
|
||||
<div id='mainContent'>
|
||||
<div id='queryBox' class='show divider'></div>
|
||||
<?php if($cases2Link):?>
|
||||
<form class='main-table' method='post' target='hiddenwin' id='linkCasesForm' data-ride='table'>
|
||||
<table class='table' id='caseList'>
|
||||
@@ -33,6 +32,7 @@
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='w-pri'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->testcase->product;?></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class='w-type'><?php echo $lang->testcase->type;?></th>
|
||||
<th class='w-user'><?php echo $lang->openedByAB;?></th>
|
||||
@@ -51,7 +51,8 @@
|
||||
<?php printf('%03d', $case2Link->id);?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case2Link->pri, $case2Link->pri)?>'><?php echo zget($lang->testcase->priList, $case2Link->pri, $case2Link->pri)?></span></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$case2Link->id"), $case2Link->title, '_blank');?></td>
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID={$case2Link->product}&branch={$case2Link->branch}"), $products[$case2Link->product], '_blank');?></td>
|
||||
<td class='text-left' title='<?php echo $case2Link->title;?>'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$case2Link->id"), $case2Link->title, '_blank');?></td>
|
||||
<td><?php echo $lang->testcase->typeList[$case2Link->type];?></td>
|
||||
<td><?php echo $users[$case2Link->openedBy];?></td>
|
||||
<td class='case-<?php echo $case2Link->status?>'><?php echo $lang->testcase->statusList[$case2Link->status];?></td>
|
||||
@@ -62,10 +63,33 @@
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class='table-actions btn-toolbar show-always'><?php echo html::submitButton('', '', 'btn btn-secondary');?></div>
|
||||
<div class="table-actions btn-toolbar"><?php if($caseCount) echo html::submitButton('', '', 'btn btn-default');?></div>
|
||||
<?php echo html::hidden('case', $case->id);?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
<?php if($cases2Link):?>
|
||||
$('#linkCasesForm').table();
|
||||
setTimeout(function(){$('#linkCasesForm .table-footer').removeClass('fixed-footer');}, 100);
|
||||
<?php endif;?>
|
||||
|
||||
$('#submit').click(function(){
|
||||
var output = '';
|
||||
$('#linkCasesForm').find('tr.checked').each(function(){
|
||||
var caseID = $(this).find('td.c-id').find('div.checkbox-primary input').attr('value');
|
||||
var caseTitle = "#" + caseID + ' ' + $(this).find('td').eq(3).attr('title');
|
||||
var checkbox = "<li><div class='checkbox-primary'><input type='checkbox' checked='checked' name='linkCase[]' " + "value=" + caseID + " /><label>" + caseTitle + "</label></div></li>";
|
||||
|
||||
output += checkbox;
|
||||
});
|
||||
$.closeModal();
|
||||
parent.$('#linkCaseBox').html(output);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $testtask->id;?></span>
|
||||
<?php echo isonlybody() ? $testtask->name : html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$testtask->name'>" . $testtask->name . '</span>') : html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->testtask->start;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
#todoBatchAddForm .col-id {width: 50px; text-align: center; color: #838A9D}
|
||||
#todoBatchAddForm .col-type {width: 120px;}
|
||||
#todoBatchAddForm .col-pri {width: 90px;}
|
||||
#todoBatchAddForm .col-date {width: 230px;}
|
||||
html[lang="en"] #todoBatchAddForm .col-pri {width: 105px}
|
||||
#todoBatchAddForm .col-date {width: 180px;}
|
||||
#todoBatchAddForm .col-pending {width: 70px;}
|
||||
html[lang="en"] #todoBatchAddForm .col-pending {width: 90px;}
|
||||
#todoBatchAddForm .chosen-container-single .chosen-single {border-radius: 0;}
|
||||
#todoBatchAddForm .control-time-begin + .chosen-container-single .chosen-single {border-radius: 2px 0 0 2px; border-right-width: 0; padding-right: 1px;}
|
||||
#todoBatchAddForm .control-time-begin + .chosen-container-active .chosen-single {border-right-width: 1px; padding-right: 0;}
|
||||
#todoBatchAddHeader [name="date"]:disabled {color: #ccc; text-decoration: line-through;}
|
||||
.main-header > .input-group {width: 240px;}
|
||||
.main-header > .input-group {width: 240px;}
|
||||
html[lang="en"] .main-header > .input-group {width: 250px;}
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
|
||||
<div id="mainContent" class="main-content">
|
||||
<div id="mainContent">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->todo->batchCreate . $lang->todo->common;?></h2>
|
||||
<div class="input-group pull-left">
|
||||
<div class="input-group pull-left" style='width:255px;'>
|
||||
<span class="input-group-addon"><?php echo $lang->todo->date;?></span>
|
||||
<input type="text" name="date" value="<?php echo $date;?>" class="form-control form-date" autocomplete="off" />
|
||||
<span class="input-group-addon">
|
||||
@@ -40,54 +40,52 @@
|
||||
}
|
||||
$columns = count($visibleFields) + 2;
|
||||
?>
|
||||
<div class="table-responsive">
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='col-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='col-type<?php echo zget($visibleFields, 'type', ' hidden')?>'><?php echo $lang->todo->type;?></th>
|
||||
<th class='col-pri<?php echo zget($visibleFields, 'pri', ' hidden')?>'><?php echo $lang->todo->pri;?></th>
|
||||
<th class='col-name required'><?php echo $lang->todo->name;?></th>
|
||||
<th class='col-desc<?php echo zget($visibleFields, 'desc', ' hidden');?>'><?php echo $lang->todo->desc;?></th>
|
||||
<th class='col-date<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-70px'></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $pri = 3;?>
|
||||
<?php $time = $date != date('Y-m-d') ? key($times) : $time;?>
|
||||
<?php for($i = 0; $i < $config->todo->batchCreate; $i++):?>
|
||||
<tr class='text-left'>
|
||||
<td class='col-id'><?php echo $i+1;?></td>
|
||||
<td <?php echo zget($visibleFields, 'type', "class='hidden'")?> style='overflow:visible'><?php echo html::select("types[$i]", $lang->todo->typeList, '', "onchange='loadList(this.value, " . ($i + 1) . ")' class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?> style='overflow:visible'><?php echo html::select("pris[$i]", $lang->todo->priList, $pri, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div id='<?php echo "nameBox" . ($i+1);?>' class='hidden'><?php echo html::input("names[$i]", '', 'class="text-left form-control" autocomplete="off"');?></div>
|
||||
<div class='<?php echo "nameBox" . ($i+1);?>'><?php echo html::input("names[$i]", '', 'class="text-left form-control" autocomplete="off"');?></div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("descs[$i]", '', "rows='1' class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select("begins[$i]", $times, $time, "onchange=\"setBeginsAndEnds($i, 'begin');\" class='form-control chosen control-time-begin'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));?>
|
||||
</div>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select("ends[$i]", $times, '', "onchange=\"setBeginsAndEnds($i, 'end');\" class='form-control chosen control-time-end'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' name="switchDate[<?php echo $i?>]" id="switchDate<?php echo $i?>" class='control-time-switch' onclick='switchDateList(<?php echo $i?>);' />
|
||||
<label for="switchDate<?php echo $i?>"> <?php echo $lang->todo->periods['future'];?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td class='text-center form-actions' colspan='<?php echo isset($visibleFields['beginAndEnd']) ? $columns + 1 : $columns;?>'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::backButton('', '', 'btn btn-wide');?></td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='col-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='col-type<?php echo zget($visibleFields, 'type', ' hidden')?>'><?php echo $lang->todo->type;?></th>
|
||||
<th class='col-pri<?php echo zget($visibleFields, 'pri', ' hidden')?>'><?php echo $lang->todo->pri;?></th>
|
||||
<th class='col-name required'><?php echo $lang->todo->name;?></th>
|
||||
<th class='col-desc<?php echo zget($visibleFields, 'desc', ' hidden');?>'><?php echo $lang->todo->desc;?></th>
|
||||
<th class='col-date<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='col-pending'></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $pri = 3;?>
|
||||
<?php $time = $date != date('Y-m-d') ? key($times) : $time;?>
|
||||
<?php for($i = 0; $i < $config->todo->batchCreate; $i++):?>
|
||||
<tr class='text-left'>
|
||||
<td class='col-id'><?php echo $i+1;?></td>
|
||||
<td <?php echo zget($visibleFields, 'type', "class='hidden'")?> style='overflow:visible'><?php echo html::select("types[$i]", $lang->todo->typeList, '', "onchange='loadList(this.value, " . ($i + 1) . ")' class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?> style='overflow:visible'><?php echo html::select("pris[$i]", $lang->todo->priList, $pri, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div id='<?php echo "nameBox" . ($i+1);?>' class='hidden'><?php echo html::input("names[$i]", '', 'class="text-left form-control" autocomplete="off"');?></div>
|
||||
<div class='<?php echo "nameBox" . ($i+1);?>'><?php echo html::input("names[$i]", '', 'class="text-left form-control" autocomplete="off"');?></div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("descs[$i]", '', "rows='1' class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select("begins[$i]", $times, $time, "onchange=\"setBeginsAndEnds($i, 'begin');\" class='form-control chosen control-time-begin'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));?>
|
||||
</div>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select("ends[$i]", $times, '', "onchange=\"setBeginsAndEnds($i, 'end');\" class='form-control chosen control-time-end'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' name="switchDate[<?php echo $i?>]" id="switchDate<?php echo $i?>" class='control-time-switch' onclick='switchDateList(<?php echo $i?>);' />
|
||||
<label for="switchDate<?php echo $i?>"> <?php echo $lang->todo->periods['future'];?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td class='text-center form-actions' colspan='<?php echo isset($visibleFields['beginAndEnd']) ? $columns + 1 : $columns;?>'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::backButton('', '', 'btn btn-wide');?></td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="hidden">
|
||||
<input type="hidden" name="date" value="<?php echo $date;?>" />
|
||||
<input type="checkbox" name="switchDate" class="control-time-switch" />
|
||||
|
||||
@@ -31,79 +31,77 @@
|
||||
$columns = count($visibleFields) + 4;
|
||||
?>
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->inlink('batchEdit', "from=todoBatchEdit");?>'>
|
||||
<div class="table-responsive">
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-40px'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->todo->date;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->todo->type;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->todo->pri;?></th>
|
||||
<th><?php echo $lang->todo->name;?></th>
|
||||
<th <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo $lang->todo->desc;?></th>
|
||||
<th class='w-300px<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'status', ' hidden')?>'> <?php echo $lang->todo->status;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($editedTodos as $todo):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo $todo->id . html::hidden("todoIDList[$todo->id]", $todo->id);?></td>
|
||||
<td><?php echo html::input("dates[$todo->id]", $todo->date, "class='form-control form-date'");?></td>
|
||||
<td class='text-center'>
|
||||
<?php echo zget($lang->todo->typeList, $todo->type);?>
|
||||
<?php echo html::hidden("types[$todo->id]", $todo->type);?>
|
||||
</td>
|
||||
<td style='overflow:visible' <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$todo->id]", $lang->todo->priList, $todo->pri, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div id='<?php echo "nameBox" . $todo->id;?>' class='hidden'><? echo html::input("names[$todo->id]", '', "class='text-left form-control hiddenwin' autocomplete='off'"); ?></div>
|
||||
<div class='<?php echo "nameBox" . $todo->id;?> text-left'>
|
||||
<?php
|
||||
if($todo->type == 'custom' or $todo->type == 'cycle')
|
||||
{
|
||||
echo html::input("names[$todo->id]", $todo->name, "class='form-control' autocomplete='off'"); ;
|
||||
}
|
||||
elseif($todo->type == 'task')
|
||||
{
|
||||
echo html::select("tasks[$todo->id]", $tasks, $todo->idvalue, 'class="form-control chosen"');
|
||||
}
|
||||
elseif($todo->type == 'bug')
|
||||
{
|
||||
echo html::select("bugs[$todo->id]", $bugs, $todo->idvalue, 'class="form-control chosen"');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("descs[$todo->id]", $todo->desc, "rows='1' class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::select("begins[$todo->id]", $times, $todo->begin, "onchange=\"setBeginsAndEnds($todo->id, 'begin');\" class='form-control chosen control-time-begin'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
echo '<span class="input-group-addon fix-border fix-padding"></span>';
|
||||
echo html::select("ends[$todo->id]", $times, $todo->end, "onchange=\"setBeginsAndEnds($todo->id, 'end');\" class='form-control chosen control-time-end'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
?>
|
||||
<span class="input-group-addon">
|
||||
<div class='checkbox-primary dateSwitcher'>
|
||||
<input type='checkbox' name="switchDate[<?php echo $todo->id;?>]" id="switchDate<?php echo $todo->id;?>" data-key="<?php echo $todo->id;?>" onclick='switchDateList(<?php echo $todo->id?>);' <?php if($todo->begin == '2400') echo "checked='checked'";?>>
|
||||
<label for='switchDate'><?php echo $lang->todo->periods['future'];?></label>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?> style='overflow:visible'><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control chosen'");?></td>
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-40px'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->todo->date;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->todo->type;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->todo->pri;?></th>
|
||||
<th><?php echo $lang->todo->name;?></th>
|
||||
<th <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo $lang->todo->desc;?></th>
|
||||
<th class='w-300px<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'status', ' hidden')?>'> <?php echo $lang->todo->status;?></th>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='<?php echo $columns?>' class='text-center form-actions'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide');?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($editedTodos as $todo):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo $todo->id . html::hidden("todoIDList[$todo->id]", $todo->id);?></td>
|
||||
<td><?php echo html::input("dates[$todo->id]", $todo->date, "class='form-control form-date'");?></td>
|
||||
<td class='text-center'>
|
||||
<?php echo zget($lang->todo->typeList, $todo->type);?>
|
||||
<?php echo html::hidden("types[$todo->id]", $todo->type);?>
|
||||
</td>
|
||||
<td style='overflow:visible' <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$todo->id]", $lang->todo->priList, $todo->pri, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div id='<?php echo "nameBox" . $todo->id;?>' class='hidden'><? echo html::input("names[$todo->id]", '', "class='text-left form-control hiddenwin' autocomplete='off'"); ?></div>
|
||||
<div class='<?php echo "nameBox" . $todo->id;?> text-left'>
|
||||
<?php
|
||||
if($todo->type == 'custom' or $todo->type == 'cycle')
|
||||
{
|
||||
echo html::input("names[$todo->id]", $todo->name, "class='form-control' autocomplete='off'"); ;
|
||||
}
|
||||
elseif($todo->type == 'task')
|
||||
{
|
||||
echo html::select("tasks[$todo->id]", $tasks, $todo->idvalue, 'class="form-control chosen"');
|
||||
}
|
||||
elseif($todo->type == 'bug')
|
||||
{
|
||||
echo html::select("bugs[$todo->id]", $bugs, $todo->idvalue, 'class="form-control chosen"');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("descs[$todo->id]", $todo->desc, "rows='1' class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::select("begins[$todo->id]", $times, $todo->begin, "onchange=\"setBeginsAndEnds($todo->id, 'begin');\" class='form-control chosen control-time-begin'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
echo '<span class="input-group-addon fix-border fix-padding"></span>';
|
||||
echo html::select("ends[$todo->id]", $times, $todo->end, "onchange=\"setBeginsAndEnds($todo->id, 'end');\" class='form-control chosen control-time-end'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
?>
|
||||
<span class="input-group-addon">
|
||||
<div class='checkbox-primary dateSwitcher'>
|
||||
<input type='checkbox' name="switchDate[<?php echo $todo->id;?>]" id="switchDate<?php echo $todo->id;?>" data-key="<?php echo $todo->id;?>" onclick='switchDateList(<?php echo $todo->id?>);' <?php if($todo->begin == '2400') echo "checked='checked'";?>>
|
||||
<label for='switchDate'><?php echo $lang->todo->periods['future'];?></label>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?> style='overflow:visible'><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='<?php echo $columns?>' class='text-center form-actions'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide');?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -296,6 +296,9 @@ class tree extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->tree->manageChild($rootID, $viewType);
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.$('a.refresh').click()}"));
|
||||
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
@@ -357,9 +360,9 @@ class tree extends control
|
||||
if(count($optionMenu) == 1 and $needManage)
|
||||
{
|
||||
$output .= "<span class='input-group-addon'>";
|
||||
$output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType¤tModuleID=0&branch=$branch"), $viewType == 'line' ? $this->lang->tree->manageLine : $this->lang->tree->manage, '_blank');
|
||||
$output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType¤tModuleID=0&branch=$branch", '', true), $viewType == 'line' ? $this->lang->tree->manageLine : $this->lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
$output .= ' ';
|
||||
$output .= $viewType == 'line' ? html::a("javascript:loadProductLines($rootID)", $this->lang->refresh) : html::a("javascript:loadProductModules($rootID)", $this->lang->refresh);
|
||||
$output .= $viewType == 'line' ? html::a("#", $this->lang->refresh, '', "class='refresh' onclick='loadProductLines($rootID)'") : html::a("#", $this->lang->refresh, '', "class='refresh' onclick='loadProductModules($rootID)'");
|
||||
$output .= '</span>';
|
||||
}
|
||||
die($output);
|
||||
|
||||
@@ -17,3 +17,5 @@
|
||||
#modulesTree li > .list-toggle {top: 0}
|
||||
|
||||
#childrenForm table tr > td.text-middle span{display:block; float:left;}
|
||||
|
||||
.body-modal #mainMenu{display: none;}
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
</a>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<span class="text" title='<?php echo $root->name;?>'>
|
||||
<?php $rootName = $viewType == 'line' ? '' : $root->name;?>
|
||||
<span class="text" title='<?php echo $rootName;?>'>
|
||||
<?php
|
||||
if($viewType == 'doc')
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
$lang->tutorial = new stdclass();
|
||||
$lang->tutorial->common = 'Tutorial';
|
||||
$lang->tutorial->desc = 'Get to know ZenTao through finishing tasks. It will take about 10 mins, and you can quit it anytime.';
|
||||
$lang->tutorial->desc = 'Get know ZenTao by doing tasks. It takes about 10 minutes, and you can quit it anytime.';
|
||||
$lang->tutorial->start = "Let's go!";
|
||||
$lang->tutorial->exit = 'Quit';
|
||||
$lang->tutorial->congratulation = 'Congratulations! You have finished all tasks.';
|
||||
|
||||
@@ -44,7 +44,7 @@ $lang->user->last = 'Last Login';
|
||||
$lang->user->ranzhi = 'Zdoo Account';
|
||||
$lang->user->ditto = 'Ditto';
|
||||
$lang->user->originalPassword = 'Old Password';
|
||||
$lang->user->verifyPassword = 'Your login password';
|
||||
$lang->user->verifyPassword = 'Your Login Password';
|
||||
$lang->user->resetPassword = 'Forgot Password?';
|
||||
|
||||
$lang->user->index = "Home";
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user