diff --git a/Makefile b/Makefile index 2d2a9657fc..bcb84bcb74 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ tgz: # create the restart file for svn. # touch zentaopms/module/svn/restart # delee the unused files. - find zentaopms -name .svn |xargs rm -fr + find zentaopms -name .gitkeep |xargs rm -fr find zentaopms -name tests |xargs rm -fr # notify.zip. mkdir zentaopms/www/data/notify/ diff --git a/module/bug/view/browse.custom.html.php b/module/bug/view/browse.custom.html.php index b1f3177b41..9c54c6195c 100644 --- a/module/bug/view/browse.custom.html.php +++ b/module/bug/view/browse.custom.html.php @@ -12,7 +12,77 @@
'> - + + recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + + + + + + + + + id");?> + + + + + + + + + + + + + + + +
bug->$fieldName);?>actions;?>
+ + + + $fieldName); + } + elseif(preg_match('/assignedTo|by/i', $fieldName)) + { + echo $users[$bug->$fieldName]; + } + elseif(preg_match('/^(severity|pri|resolution|os|type|browse|status|confirmed)$/i', $fieldName)) + { + $key = $fieldName . 'List'; + $list = $lang->bug->$key; + echo $list[$bug->$fieldName]; + } + else + { + echo !($bug->$fieldName == '0') ? $bug->$fieldName : ''; + } + ?> + + id"; + common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'edit', $params, $bug, 'list'); + ?> + +
+ +
+ edit); + ?> +
+ +
show();?>
+
diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index b6acdf60f9..5fd617edc9 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -11,13 +11,6 @@ */ ?> - - + + recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + + + + id");?> + + + + + + confirmed;?> + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + cookie->windowWidth >= $this->config->wideSize):?> + + + + + + + + + + + cookie->windowWidth >= $this->config->wideSize ? 12 : 9; + if($browseType == 'needconfirm') $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 7 : 6; + ?> + + + +
idAB);?> bug->severityAB);?> priAB);?> bug->title);?>bug->statusAB);?>bug->story);?>actions;?>openedByAB);?>bug->openedDateAB);?>assignedToAB);?>bug->resolvedByAB);?>bug->resolutionAB);?>bug->resolvedDateAB);?>actions;?>
+ + + + id));?> + severity;?>'>severity;?>bug->priList[$bug->pri];?>'>bug->priList[$bug->pri];?>[{$lang->bug->confirmedList[$bug->confirmed]}] " . html::a($bugLink, $bug->title);?>bug->statusList[$bug->status];?>createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?>bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?>openedBy];?>openedDate, 5, 11)?>assignedTo == $this->app->user->account) echo 'class="red"';?>>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?>resolvedDate, 5, 11)?> + id"; + common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); + common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'edit', $params, $bug, 'list'); + common::printIcon('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $bug, 'list', 'copy'); + ?> +
+ +
+ edit); + ?> +
+ +
show();?>
+
diff --git a/module/bug/view/buglist.custom.html.php b/module/bug/view/buglist.custom.html.php deleted file mode 100644 index c07c6b86ed..0000000000 --- a/module/bug/view/buglist.custom.html.php +++ /dev/null @@ -1,71 +0,0 @@ - - recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - - - id");?> - - - - - - - - - - - - - - - -
bug->$fieldName);?>actions;?>
- - - - $fieldName); - } - elseif(preg_match('/assignedTo|by/i', $fieldName)) - { - echo $users[$bug->$fieldName]; - } - elseif(preg_match('/^(severity|pri|resolution|os|type|browse|status|confirmed)$/i', $fieldName)) - { - $key = $fieldName . 'List'; - $list = $lang->bug->$key; - echo $list[$bug->$fieldName]; - } - else - { - echo !($bug->$fieldName == '0') ? $bug->$fieldName : ''; - } - ?> - - id"; - common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, $bug, 'list'); - ?> - -
- -
- edit); - ?> -
- -
show();?>
-
diff --git a/module/bug/view/buglist.html.php b/module/bug/view/buglist.html.php deleted file mode 100644 index 3a99b44e3e..0000000000 --- a/module/bug/view/buglist.html.php +++ /dev/null @@ -1,110 +0,0 @@ - - recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - - - id");?> - - - - - - confirmed;?> - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - cookie->windowWidth >= $this->config->wideSize):?> - - - - - - - - - - - cookie->windowWidth >= $this->config->wideSize ? 12 : 9; - if($browseType == 'needconfirm') $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 7 : 6; - ?> - - - -
idAB);?> bug->severityAB);?> priAB);?> bug->title);?>bug->statusAB);?>bug->story);?>actions;?>openedByAB);?>bug->openedDateAB);?>assignedToAB);?>bug->resolvedByAB);?>bug->resolutionAB);?>bug->resolvedDateAB);?>actions;?>
- - - - id));?> - severity;?>'>severity;?>bug->priList[$bug->pri];?>'>bug->priList[$bug->pri];?>[{$lang->bug->confirmedList[$bug->confirmed]}] " . html::a($bugLink, $bug->title);?>bug->statusList[$bug->status];?>createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?>bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?>openedBy];?>openedDate, 5, 11)?>assignedTo == $this->app->user->account) echo 'class="red"';?>>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?>resolvedDate, 5, 11)?> - id"; - common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); - common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, $bug, 'list'); - common::printIcon('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $bug, 'list', 'copy'); - ?> -
- -
- edit); - ?> -
- -
show();?>
-
diff --git a/module/build/control.php b/module/build/control.php index 944ede73ed..c6dc5970d0 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -153,9 +153,17 @@ class build extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $build = $this->build->getById($buildID); $this->build->delete(TABLE_BUILD, $buildID); - die(js::locate($this->createLink('project', 'build', "projectID=$build->project"), 'parent')); + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } diff --git a/module/common/view/tablesorter.html.php b/module/common/view/tablesorter.html.php index 2f68b1e1b6..ffdbc37e1b 100644 --- a/module/common/view/tablesorter.html.php +++ b/module/common/view/tablesorter.html.php @@ -4,8 +4,12 @@ js::import($jsRoot . 'jquery/tablesorter/min.js'); js::import($jsRoot . 'jquery/tablesorter/metadata.js'); ?> diff --git a/module/doc/control.php b/module/doc/control.php index 8b55c04b76..841c6f8ae8 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -417,8 +417,16 @@ class doc extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $this->doc->delete(TABLE_DOC, $docID); - die(js::locate($this->session->docList, 'parent')); + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } } diff --git a/module/doc/js/browse.js b/module/doc/js/browse.js index b6a7404ab5..8e37fb28db 100644 --- a/module/doc/js/browse.js +++ b/module/doc/js/browse.js @@ -27,3 +27,35 @@ $(function(){ browseBySearch(); } }); + +/** + * Delete doc. + * + * @param int $docID + * @access public + * @return void + */ +function deleteDoc(docID) +{ + if(confirm(confirmDelete)) + { + url = createLink('doc', 'delete','docID=' + docID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + $('#docbox').load(request + ' #doclist', function() + { + $('.colored').colorize(); + $('tfoot td').css('background', 'white').unbind('click').unbind('hover'); + }); + } + } + }); + } +} diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 4b90f11ef8..117e664434 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -14,6 +14,8 @@ +doc->confirmDelete)?> +app->getURI(true))?> @@ -41,8 +43,8 @@ var browseType = ''; - - +
+ recTotal}&recPerPage={$pager->recPerPage}";?> @@ -70,7 +72,7 @@ var browseType = ''; id}"; common::printIcon('doc', 'edit', $vars, '', 'list'); - common::printIcon('doc', 'delete', $vars, '', 'list', '', 'hiddenwin'); + echo html::a("javascript:deleteDoc($doc->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'"); ?> diff --git a/module/my/js/todo.js b/module/my/js/todo.js index a3a789eb21..9ce579181e 100644 --- a/module/my/js/todo.js +++ b/module/my/js/todo.js @@ -20,4 +20,37 @@ function changeAction(formName, actionName, actionLink) $('#' + formName).attr('action', actionLink).submit(); } +/** + * Delete todo. + * + * @param int todoID + * @access public + * @return void + */ +function deleteTodo(todoID) +{ + if(confirm(confirmDelete)) + { + url = createLink('todo', 'delete','todoID=' + todoID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('my', 'todo'); + $('#todo').load(url + ' #todoList', function() + { + $('.colored').colorize(); + $('tfoot td').css('background', 'white').unbind('click').unbind('hover'); + }); + } + } + }); + } +} + $(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'}); diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index ed0665daa7..cc65a51666 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> -
@@ -24,7 +23,60 @@
'> - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?> bug->severityAB);?> priAB);?> typeAB);?> bug->title);?> openedByAB);?> bug->resolvedByAB);?>bug->resolutionAB);?>actions;?>
+ + createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id), '_blank');?> + bug->severityList[$bug->severity]?>'>bug->severityList[$bug->severity]) ? $lang->bug->severityList[$bug->severity] : $bug->severity;?>bug->priList[$bug->pri]?>'>bug->priList[$bug->pri]) ? $lang->bug->priList[$bug->pri] : $bug->pri?>bug->typeList[$bug->type]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> + id"; + common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); + common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'edit', $params, '', 'list'); + ?> +
+ +
+ edit);?> +
+ + show();?> +
diff --git a/module/my/view/buglist.html.php b/module/my/view/buglist.html.php deleted file mode 100644 index 36728068b9..0000000000 --- a/module/my/view/buglist.html.php +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB);?> bug->severityAB);?> priAB);?> typeAB);?> bug->title);?> openedByAB);?> bug->resolvedByAB);?>bug->resolutionAB);?>actions;?>
- - createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id), '_blank');?> - bug->severityList[$bug->severity]?>'>bug->severityList[$bug->severity]) ? $lang->bug->severityList[$bug->severity] : $bug->severity;?>bug->priList[$bug->pri]?>'>bug->priList[$bug->pri]) ? $lang->bug->priList[$bug->pri] : $bug->pri?>bug->typeList[$bug->type]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> - id"; - common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); - common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, '', 'list'); - ?> -
- -
- edit);?> -
- - show();?> -
diff --git a/module/my/view/caselist.html.php b/module/my/view/caselist.html.php deleted file mode 100644 index c01e1eac45..0000000000 --- a/module/my/view/caselist.html.php +++ /dev/null @@ -1,76 +0,0 @@ - - app->loadLang('testtask'); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB);?> priAB);?> testcase->title);?> typeAB);?> openedByAB);?> testtask->lastRunAccount);?> testtask->lastRunTime);?> testtask->lastRunResult);?>statusAB);?>actions;?>
- - createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?> - pri?>'>pri?> - createLink('testcase', 'view', "testcaseID=$case->id"), $case->title);?>testcase->typeList[$case->type];?>openedBy];?>lastRunner];?>lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?>lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?>testcase->statusList[$case->status];?> - id&version=$case->version", '', 'list', '', '', 'iframe'); - common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'iframe'); - common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list'); - common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy'); - common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin'); - common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug'); - ?> -
- -
- createLink('testcase', 'batchEdit'); - echo html::submitButton($lang->edit, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')"); - } - if($canBatchRun) - { - $actionLink = $this->createLink('testtask', 'batchRun', "productID=0&orderBy=$orderBy&from=testcase"); - echo html::submitButton($lang->testtask->runCase, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')"); - } - ?> -
- - show();?> -
diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index 5df9859f9b..06b02715a9 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> - @@ -26,7 +25,79 @@
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?> priAB);?> task->project);?> task->name);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?> task->deadlineAB);?>statusAB);?> openedByAB);?> actions;?>
+ + createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?> + task->priList[$task->pri];?>'>task->priList[$task->pri]) ? $lang->task->priList[$task->pri] : $task->pri;?>createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?> + createLink('task', 'view', "taskID=$task->id"), $task->name);?>estimate;?>consumed;?>left;?>delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?>task->statusList[$task->status];?>openedBy];?> + project&taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'edit', "taskID=$task->id", '', 'list'); + ?> +
+ +
+ createLink('task', 'batchEdit', "projectID=0&orderBy=$orderBy"); + echo html::commonButton($lang->edit, "onclick=\"changeAction('myTaskForm', 'batchEdit', '$actionLink')\""); + } + if($canBatchClose) + { + $actionLink = $this->createLink('task', 'batchClose'); + echo html::commonButton($lang->close, "onclick=\"changeAction('myTaskForm', 'batchClose', '$actionLink')\""); + } + ?> +
+ + show();?> +
diff --git a/module/my/view/tasklist.html.php b/module/my/view/tasklist.html.php deleted file mode 100644 index 8f09c1578e..0000000000 --- a/module/my/view/tasklist.html.php +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB);?> priAB);?> task->project);?> task->name);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?> task->deadlineAB);?>statusAB);?> openedByAB);?> actions;?>
- - createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?> - task->priList[$task->pri];?>'>task->priList[$task->pri]) ? $lang->task->priList[$task->pri] : $task->pri;?>createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?> - createLink('task', 'view', "taskID=$task->id"), $task->name);?>estimate;?>consumed;?>left;?>delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?>task->statusList[$task->status];?>openedBy];?> - project&taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'edit', "taskID=$task->id", '', 'list'); - ?> -
- -
- createLink('task', 'batchEdit', "projectID=0&orderBy=$orderBy"); - echo html::commonButton($lang->edit, "onclick=\"changeAction('myTaskForm', 'batchEdit', '$actionLink')\""); - } - if($canBatchClose) - { - $actionLink = $this->createLink('task', 'batchClose'); - echo html::commonButton($lang->close, "onclick=\"changeAction('myTaskForm', 'batchClose', '$actionLink')\""); - } - ?> -
- - show();?> -
diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 538eada6c9..ef75d92a12 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> -
@@ -25,7 +24,82 @@
- + + app->loadLang('testtask'); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?> priAB);?> testcase->title);?> typeAB);?> openedByAB);?> testtask->lastRunAccount);?> testtask->lastRunTime);?> testtask->lastRunResult);?>statusAB);?>actions;?>
+ + createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?> + pri?>'>pri?> + createLink('testcase', 'view', "testcaseID=$case->id"), $case->title);?>testcase->typeList[$case->type];?>openedBy];?>lastRunner];?>lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?>lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?>testcase->statusList[$case->status];?> + id&version=$case->version", '', 'list', '', '', 'iframe'); + common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', '', '', 'iframe'); + common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list'); + common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy'); + common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin'); + common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'createBug'); + ?> +
+ +
+ createLink('testcase', 'batchEdit'); + echo html::submitButton($lang->edit, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')"); + } + if($canBatchRun) + { + $actionLink = $this->createLink('testtask', 'batchRun', "productID=0&orderBy=$orderBy&from=testcase"); + echo html::submitButton($lang->testtask->runCase, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')"); + } + ?> +
+ + show();?> +
diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index b09db9ac73..cf223b6350 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -10,10 +10,10 @@ * @link http://www.zentao.net */ ?> - +todo->confirmDelete)?>
@@ -48,7 +48,83 @@ ?>
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?> todo->date);?> todo->type);?> priAB);?> todo->name);?> todo->beginAB);?> todo->endAB);?>todo->status);?>actions;?>
+ + + + id; ?> + date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?>todo->typeList[$todo->type];?>pri;?>'>pri?>createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "class='colorbox'");?>begin;?>end;?>todo->statusList[$todo->status];?> + id", $todo, 'list', '', 'hiddenwin'); + common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', '', '', 'iframe', true); + common::printIcon('todo', 'delete', "id=$todo->id", '', 'list', '', 'hiddenwin'); + ?> +
+
+ createLink('todo', 'batchEdit', "from=myTodo&type=$type&account=$account&status=$status"); + echo html::commonButton($lang->edit, "onclick=\"changeAction('todoform', 'batchEdit', '$actionLink')\""); + + } + if(common::hasPriv('todo', 'batchFinish')) + { + $actionLink = $this->createLink('todo', 'batchFinish'); + echo html::commonButton($lang->todo->finish, "onclick=\"changeAction('todoform', 'batchFinish', '$actionLink')\""); + + } + if(common::hasPriv('todo', 'import2Today') and $importFuture) + { + $actionLink = $this->createLink('todo', 'import2Today'); + echo html::commonButton($lang->todo->import, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\""); + echo html::input('date', date('Y-m-d'), "class='date w-80px'"); + } + ?> +
+ show();?> +
diff --git a/module/my/view/todolist.html.php b/module/my/view/todolist.html.php deleted file mode 100644 index 3c4881f51b..0000000000 --- a/module/my/view/todolist.html.php +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
idAB);?> todo->date);?> todo->type);?> priAB);?> todo->name);?> todo->beginAB);?> todo->endAB);?>todo->status);?>actions;?>
- - - - id; ?> - date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?>todo->typeList[$todo->type];?>pri;?>'>pri?>createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "class='colorbox'");?>begin;?>end;?>todo->statusList[$todo->status];?> - id", $todo, 'list', '', 'hiddenwin'); - common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', '', '', 'iframe', true); - common::printIcon('todo', 'delete', "id=$todo->id", '', 'list', '', 'hiddenwin'); - ?> -
-
- createLink('todo', 'batchEdit', "from=myTodo&type=$type&account=$account&status=$status"); - echo html::commonButton($lang->edit, "onclick=\"changeAction('todoform', 'batchEdit', '$actionLink')\""); - - } - if(common::hasPriv('todo', 'batchFinish')) - { - $actionLink = $this->createLink('todo', 'batchFinish'); - echo html::commonButton($lang->todo->finish, "onclick=\"changeAction('todoform', 'batchFinish', '$actionLink')\""); - - } - if(common::hasPriv('todo', 'import2Today') and $importFuture) - { - $actionLink = $this->createLink('todo', 'import2Today'); - echo html::commonButton($lang->todo->import, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\""); - echo html::input('date', date('Y-m-d'), "class='date w-80px'"); - } - ?> -
- show();?> -
diff --git a/module/product/control.php b/module/product/control.php index b2a6e759d1..15e425b522 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -183,9 +183,9 @@ class product extends control $this->view->title = $this->lang->product->create; $this->view->position[] = $this->view->title; $this->view->groups = $this->loadModel('group')->getPairs(); - $this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst'); - $this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst'); - $this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst'); + $this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst|noclosed'); + $this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst|noclosed'); + $this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst|noclosed'); $this->display(); } diff --git a/module/product/js/browse.js b/module/product/js/browse.js index c6881fa941..6e4d9fba04 100644 --- a/module/product/js/browse.js +++ b/module/product/js/browse.js @@ -87,5 +87,4 @@ function toggleSubMenu(currentID, position, menuIndex) $(function() { if(browseType == 'bysearch') ajaxGetSearchForm(); - setModal4List('iframe', 'storyList'); }) diff --git a/module/product/js/doc.js b/module/product/js/doc.js new file mode 100644 index 0000000000..e9df54bd07 --- /dev/null +++ b/module/product/js/doc.js @@ -0,0 +1,28 @@ +/** + * Delete doc. + * + * @param int $docID + * @access public + * @return void + */ +function deleteDoc(docID) +{ + if(confirm(confirmDelete)) + { + url = createLink('doc', 'delete','docID=' + docID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('product', 'doc', 'productID=' + productID); + $('.outer').load(url + ' #doclist', function(){sortTable();}); + } + } + }); + } +} diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index e3bc3b6292..d1101de867 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> - @@ -56,7 +55,175 @@ var browseType = '';
- + + + + recTotal}&recPerPage={$pager->recPerPage}";?> + + + + + + + + + + + + + + + $story):?> + createLink('story', 'view', "storyID=$story->id"); + $canView = common::hasPriv('story', 'view'); + ?> + + + + + + + + + + + + + + + + + + + + +
idAB);?> priAB);?> story->title);?> story->planAB);?> story->source);?> openedByAB);?> assignedToAB);?>story->estimateAB);?> statusAB);?> story->stageAB);?>actions;?>
+ + id)); else printf('%03d', $story->id);?> + story->priList[$story->pri];?>'>story->priList[$story->pri]?>title);?>planTitle;?>story->sourceList[$story->source];?>openedBy];?>assignedTo];?>estimate;?>story->statusList[$story->status];?>story->stageList[$story->stage];?> + id}"; + common::printIcon('story', 'change', $vars, $story, 'list'); + common::printIcon('story', 'review', $vars, $story, 'list'); + common::printIcon('story', 'close', $vars, $story, 'list'); + common::printIcon('story', 'edit', $vars, $story, 'list'); + common::printIcon('story', 'createCase', "productID=$story->product&module=0&from=¶m=0&$vars", $story, 'list', 'createCase'); + ?> +
+
+ "; + echo html::selectAll() . html::selectReverse(); + echo "
"; + + $canBatchEdit = common::hasPriv('story', 'batchEdit'); + $disabled = $canBatchEdit ? '' : "disabled='disabled'"; + $actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0"); + + echo "
"; + echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled"); + echo ""; + echo "
"; + } + + echo $summary; + ?> + + show();?> +
+ + + + + + + + + +
diff --git a/module/product/view/doc.html.php b/module/product/view/doc.html.php index b197c81106..6a59a7d046 100644 --- a/module/product/view/doc.html.php +++ b/module/product/view/doc.html.php @@ -13,9 +13,11 @@ +doc->confirmDelete)?> +id)?>
- +
@@ -41,9 +43,8 @@ diff --git a/module/product/view/storylist.html.php b/module/product/view/storylist.html.php deleted file mode 100644 index 7c51aa6a0c..0000000000 --- a/module/product/view/storylist.html.php +++ /dev/null @@ -1,169 +0,0 @@ -
id}&projectID=0&from=product");?>
addedDate;?> id}"; - common::printIcon('doc', 'edit', $vars); - common::printIcon('doc', 'delete', $vars, '', 'button', '', 'hiddenwin'); + common::printIcon('doc', 'edit', "doc={$doc->id}"); + echo html::a("javascript:deleteDoc($doc->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'"); ?>
- - - recTotal}&recPerPage={$pager->recPerPage}";?> - - - - - - - - - - - - - - - $story):?> - createLink('story', 'view', "storyID=$story->id"); - $canView = common::hasPriv('story', 'view'); - ?> - - - - - - - - - - - - - - - - - - - - -
idAB);?> priAB);?> story->title);?> story->planAB);?> story->source);?> openedByAB);?> assignedToAB);?>story->estimateAB);?> statusAB);?> story->stageAB);?>actions;?>
- - id)); else printf('%03d', $story->id);?> - story->priList[$story->pri];?>'>story->priList[$story->pri]?>title);?>planTitle;?>story->sourceList[$story->source];?>openedBy];?>assignedTo];?>estimate;?>story->statusList[$story->status];?>story->stageList[$story->stage];?> - id}"; - common::printIcon('story', 'change', $vars, $story, 'list'); - common::printIcon('story', 'review', $vars, $story, 'list'); - common::printIcon('story', 'close', $vars, $story, 'list'); - common::printIcon('story', 'edit', $vars, $story, 'list'); - common::printIcon('story', 'createCase', "productID=$story->product&module=0&from=¶m=0&$vars", $story, 'list', 'createCase'); - ?> -
-
- "; - echo html::selectAll() . html::selectReverse(); - echo "
"; - - $canBatchEdit = common::hasPriv('story', 'batchEdit'); - $disabled = $canBatchEdit ? '' : "disabled='disabled'"; - $actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0"); - - echo "
"; - echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled"); - echo ""; - echo "
"; - } - - echo $summary; - ?> - - show();?> -
- - - - - - - - - - diff --git a/module/productplan/control.php b/module/productplan/control.php index ed356dbc7b..b1750059d5 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -94,9 +94,17 @@ class productplan extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $plan = $this->productplan->getById($planID); $this->productplan->delete(TABLE_PRODUCTPLAN, $planID); - die(js::locate(inlink('browse', "productID=$plan->product"), 'parent')); + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } diff --git a/module/productplan/js/browse.js b/module/productplan/js/browse.js new file mode 100644 index 0000000000..7f00434452 --- /dev/null +++ b/module/productplan/js/browse.js @@ -0,0 +1,21 @@ +function deletePlan(planID) +{ + if(confirm(confirmDelete)) + { + url = createLink('productplan', 'delete','planID=' + planID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('productplan', 'browse', 'productID=' + productID); + $('.outer').load(url + ' #productplan'); + } + } + }); + } +} diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index bf0858418c..b7a1066347 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -11,6 +11,8 @@ */ ?> +productplan->confirmDelete)?> +
productplan->browse;?>
@@ -40,7 +42,7 @@ common::printIcon('productplan', 'linkStory', "planID=$plan->id", '', 'list'); common::printIcon('productplan', 'linkBug', "planID=$plan->id", '', 'list'); common::printIcon('productplan', 'edit', "planID=$plan->id", '', 'list'); - common::printIcon('productplan', 'delete', "planID=$plan->id", '', 'list', '', 'hiddenwin'); + echo html::a("javascript:deletePlan($plan->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->productplan->delete}'"); ?> diff --git a/module/project/control.php b/module/project/control.php index 92ccbfeb0a..5973c5bb3f 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1349,8 +1349,16 @@ class project extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $this->project->unlinkMember($projectID, $account); - die(js::locate($this->inlink('team', "projectID=$projectID"), 'parent')); + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } @@ -1441,9 +1449,16 @@ class project extends control } else { + $response['result'] = 'success'; + $response['message'] = ''; + $this->project->unlinkStory($projectID, $storyID); - echo js::locate($this->app->session->storyList, 'parent'); - exit; + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + } + $this->send($response); } } diff --git a/module/project/js/bug.js b/module/project/js/bug.js index e46b1e5912..e69de29bb2 100644 --- a/module/project/js/bug.js +++ b/module/project/js/bug.js @@ -1,26 +0,0 @@ -function setModal4List(colorboxClass, replaceID) -{ - replaceID = 'bugList'; - $('.' + colorboxClass).colorbox( - { - width:900, - height:500, - iframe:true, - transition:'none', - - onCleanup:function() - { - saveWindowSize(); - - var link = self.location.href; - $.get(link, {ajax: "yes"}, function(data) - { - $('#' + replaceID).replaceWith(data) - setModal4List(colorboxClass, replaceID) - - $('.colored').colorize(); - $('tfoot td').css('background', 'white').unbind('click').unbind('hover'); - }); - } - }); -} diff --git a/module/project/js/build.js b/module/project/js/build.js new file mode 100644 index 0000000000..3eb813f637 --- /dev/null +++ b/module/project/js/build.js @@ -0,0 +1,28 @@ +/** + * Delete build. + * + * @param int buildID + * @access public + * @return void + */ +function deleteBuild(buildID) +{ + if(confirm(confirmDelete)) + { + url = createLink('build', 'delete','buildID=' + buildID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('project', 'build', 'projectID=' + projectID); + $('.outer').load(url + ' #buildlist', function(){sortTable();}); + } + } + }); + } +} diff --git a/module/project/js/common.js b/module/project/js/common.js index e0bcf39255..53723c0cfc 100644 --- a/module/project/js/common.js +++ b/module/project/js/common.js @@ -113,7 +113,7 @@ function computeEndDate(delta) $(function() { $(".chosenBox select").chosen({no_results_text: noResultsMatch}); - setModal4List('iframe', 'taskList'); + if(typeof(replaceID) != 'undefined') setModal4List('iframe', replaceID); $(".date").bind('dateSelected', function() { computeWorkDays(this.id); diff --git a/module/project/js/doc.js b/module/project/js/doc.js new file mode 100644 index 0000000000..ff602015bb --- /dev/null +++ b/module/project/js/doc.js @@ -0,0 +1,28 @@ +/** + * Delete doc. + * + * @param int $docID + * @access public + * @return void + */ +function deleteDoc(docID) +{ + if(confirm(confirmDelete)) + { + url = createLink('doc', 'delete','docID=' + docID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('project', 'doc', 'projectID=' + projectID); + $('.outer').load(url + ' #doclist', function(){sortTable();}); + } + } + }); + } +} diff --git a/module/project/js/story.js b/module/project/js/story.js index 3eee9acf9b..dae22c74ba 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -16,3 +16,33 @@ function changeAction(formName, actionName, actionLink) { $('#' + formName).attr('action', actionLink).submit(); } + +/** + * unlink story. + * + * @param int $projectID + * @param int $storyID + * @access public + * @return void + */ +function unlink(projectID, storyID) +{ + if(confirm(confirmUnlinkStory)) + { + url = createLink('project', 'unlinkStory','projectID=' + projectID + '&storyID=' + storyID + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('project', 'story', 'projectID=' + projectID); + $('#projectStoryForm').load(url + ' #storyList', function(){sortTable();}); + } + } + }); + } +} diff --git a/module/project/js/team.js b/module/project/js/team.js new file mode 100644 index 0000000000..a9bb828a7a --- /dev/null +++ b/module/project/js/team.js @@ -0,0 +1,29 @@ +/** + * unlink member. + * + * @param int projectID + * @param string account + * @access public + * @return void + */ +function unlinkMember(projectID, account) +{ + if(confirm(confirmUnlinkMember)) + { + url = createLink('project', 'unlinkMember','projectID=' + projectID + '&account=' + account + '&confrim=yes'); + $.ajax( + { + type: 'GET', + url: url, + dataType: 'json', + success: function(data) + { + if(data.result == 'success') + { + url = createLink('project', 'team', 'projectID=' + projectID); + $('.outer').load(url + ' #memberlist', function(){sortTable();}); + } + } + }); + } +} diff --git a/module/project/lang/en.php b/module/project/lang/en.php index 67255201d6..281224620f 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -193,6 +193,7 @@ $lang->project->setTeam = 'Set team'; $lang->project->linkStory = 'Link story'; $lang->project->createTask = 'Create task'; $lang->project->goback = 'Go back(Automatically after 5 seconds)'; +$lang->project->linkProduct = 'Select product to link...'; /* Report. */ $lang->project->charts = new stdclass(); diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 49ccbcf0a8..5682955c6c 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -193,6 +193,7 @@ $lang->project->setTeam = '设置团队'; $lang->project->linkStory = '关联需求'; $lang->project->createTask = '添加任务'; $lang->project->goback = '返回项目首页(5秒后将自动跳转)'; +$lang->project->linkProduct = '选择产品关联...'; /* 统计。*/ $lang->project->charts = new stdclass(); diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index 55a98d5b53..e1af1bab9d 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -10,8 +10,58 @@ * @link http://www.zentao.net */ ?> - - + + + + + id}&orderBy=%s&build=$buildID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ project->bug; + if($build) echo '(Build:' . $build->name . ')'; + ?> +
+
id");?>
+
idAB);?>bug->severityAB);?> priAB);?> bug->title);?> openedByAB);?> assignedToAB);?> bug->resolvedBy);?>bug->resolutionAB);?>actions;?>
createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?>bug->severityList[$bug->severity]?>'>bug->severityList[$bug->severity]?>bug->priList[$bug->pri]?>'>bug->priList[$bug->pri]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> + id"; + common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); + common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); + common::printIcon('bug', 'edit', $params, $bug, 'list'); + common::printIcon('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $bug, 'list', 'copy'); + ?> +
show();?>
+
+ diff --git a/module/project/view/buglist.html.php b/module/project/view/buglist.html.php deleted file mode 100644 index fe00c40c51..0000000000 --- a/module/project/view/buglist.html.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - - id}&orderBy=%s&build=$buildID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- project->bug; - if($build) echo '(Build:' . $build->name . ')'; - ?> -
-
id");?>
-
idAB);?>bug->severityAB);?> priAB);?> bug->title);?> openedByAB);?> assignedToAB);?> bug->resolvedBy);?>bug->resolutionAB);?>actions;?>
createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?>bug->severityList[$bug->severity]?>'>bug->severityList[$bug->severity]?>bug->priList[$bug->pri]?>'>bug->priList[$bug->pri]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?>openedBy];?>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> - id"; - common::printIcon('bug', 'confirmBug', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true); - common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); - common::printIcon('bug', 'edit', $params, $bug, 'list'); - common::printIcon('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $bug, 'list', 'copy'); - ?> -
show();?>
- diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index d59b83fe10..bc066c1293 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -12,7 +12,9 @@ ?> - +build->confirmDelete)?> + +
- + diff --git a/module/project/view/doc.html.php b/module/project/view/doc.html.php index 742396fb68..a71ffadb29 100644 --- a/module/project/view/doc.html.php +++ b/module/project/view/doc.html.php @@ -13,7 +13,9 @@ -
project->build;?>
id");?>
@@ -45,7 +47,7 @@ $lang->project->bug = $lang->project->viewBug; common::printIcon('project', 'bug', "project=$project->id&orderBy=status&build=$build->id", '', 'list'); common::printIcon('build', 'edit', "buildID=$build->id"); - common::printIcon('build', 'delete', "buildID=$build->id", '', 'list', '', 'hiddenwin'); + echo html::a("javascript:deleteBuild($build->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->build->delete}'"); ?> diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php index 9c7c3804a8..8da31c40a2 100644 --- a/module/project/view/create.html.php +++ b/module/project/view/create.html.php @@ -78,7 +78,7 @@ $(document).ready(function()
project->manageProducts;?>project->linkProduct}' multiple");?>
project->goal;?>
+doc->confirmDelete)?> +id)?> +
diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index 8868b52d60..ff56d06463 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -67,7 +67,7 @@ - + diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index dc2707f599..d251cd3d4f 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -12,8 +12,9 @@ ?> +project->confirmUnlinkStory)?> -
project->doc;?>
id&from=project");?>
@@ -42,9 +44,8 @@
addedDate;?> id}"; - common::printIcon('doc', 'edit', $vars); - common::printIcon('doc', 'delete', $vars, '', 'list', '','hiddenwin'); + common::printIcon('doc', 'edit', "doc=$doc->id"); + echo html::a("javascript:deleteDoc($doc->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->doc->delete}'"); ?>
project->manageProducts;?>project->linkProduct}' multiple");?>
project->goal;?>
+
+ diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index f086a1daf9..c84ce5dcf1 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> - @@ -40,11 +39,141 @@ var browseType = '';
project->story;?>
@@ -53,7 +54,7 @@ $storyLink = $this->createLink('story', 'view', "storyID=$story->id"); $totalEstimate += $story->estimate; ?> -
@@ -87,7 +88,7 @@ if($productID) common::printIcon('testcase', 'batchCreate', "productID=$story->product&moduleID=$story->module&storyID=$story->id", '', 'list'); $lang->project->unlinkStory = $lang->unlink; - common::printIcon('project', 'unlinkStory', $param, '', 'list', '', 'hiddenwin'); + echo html::a("javascript:unlink($project->id,$story->id)", ' ', '', "class='icon-green-project-unlinkStory' title='$lang->unlink'"); ?>
- + + id&status=$status&parma=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; ?> + + + + + + + + + cookie->windowWidth > $this->config->wideSize):?> + + + + + + + cookie->windowWidth > $this->config->wideSize):?> + + + + + + + type == 'sprint') print '';?> + + + + + + + assignedTo == $app->user->account ? 'style=color:red' : ''; ?> + + + + + + + + cookie->windowWidth > $this->config->wideSize):?> + + + + cookie->windowWidth > $this->config->wideSize):?> + + + + type == 'sprint') + { + echo ''; + } + ?> + + + + + + + cookie->windowWidth > $this->config->wideSize ? 14 : 12) - ($project->type == 'sprint' ? 0 : 1);?> + + + +
idAB);?> priAB);?> task->name);?>statusAB);?> task->deadlineAB);?> task->openedDateAB);?> task->assignedToAB);?> task->finishedByAB);?> task->finishedDateAB);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?>' and common::printOrderLink('story', $orderBy, $vars, $lang->task->story) and print 'actions;?>
+ + + + id", sprintf('%03d', $task->id))) printf('%03d', $task->id);?> + task->priList[$task->pri]?>'>task->priList[$task->pri];?> + id", $task->name)) echo $task->name; + if($task->fromBug) echo html::a($this->createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'"); + ?> + status;?> > + storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion); + $storyChanged ? print("{$lang->story->changed} ") : print($lang->task->statusList[$task->status]); + ?> + delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo substr($task->deadline, 5, 6);?>openedDate, 5, 6);?> + + + >assignedTo == 'closed' ? 'Closed' : $task->assignedToRealName;?>finishedBy];?>finishedDate, 5, 6);?> + + + estimate;?>consumed;?>left;?>storyID) + { + if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) print $task->storyTitle; + } + echo ' + project&taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + + common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + if($browseType == 'needconfirm') + { + $lang->task->confirmStoryChange = $lang->confirm; + common::printIcon('task', 'confirmStoryChange', "taskid=$task->id", '', 'list', '', 'hiddenwin'); + } + common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); + common::printIcon('task', 'edit',"taskID=$task->id", '', 'list'); + ?> +
+
+ createLink('task', 'batchEdit', "projectID=$projectID"); + echo html::commonButton($lang->edit, "onclick=\"changeAction('projectTaskForm', 'batchEdit', '$actionLink')\""); + } + if($canBatchClose) + { + $actionLink = $this->createLink('task', 'batchClose'); + echo html::commonButton($lang->close, "onclick=\"changeAction('projectTaskForm', 'batchClose', '$actionLink')\""); + } + } + echo $summary; + ?> +
+ show();?> +
+