This commit is contained in:
Catouse
2017-09-20 11:16:31 +08:00
239 changed files with 2195 additions and 884 deletions
+15 -9
View File
@@ -1,23 +1,27 @@
1. What is ZenTao for?
=====================
ZenTao is an open source project management software, developed by Qingdao Nature Easy Soft Network Technology Co., Ltd. Combining product management, project management, quality management, document management, organization management and to-do management, ZenTao is a professional R & D project management software, covering the core processes of R & D project management.
ZenTao is practical and pragmatic. It has full features and a beautiful interface, and is easy to operate. Zentao is well structured and can be flexibly extended. It also has powerful search functions, various forms of statistical reports and complete API.
ZenTao is practical and pragmatic. It has full features and a beautiful interface, and is easy to operate. Zentao is well structured and can be flexibly extended. It also has powerful search features, various reports and API.
ZenTao focuses on R & D project management!
2. Why called ZenTao?
============================
Zen(禅) and Tao(道) are the two Chinese characters that have rich meanings in both religion and culture. ZenTao Project Management Software take the cutural meaning of Zen and Tao, and is expected to convey our understanding and thinking on management. Inspired by The Tao of Programming and The Zen of Programming, we named our software ZenTao.
3. Design philosophy of ZenTao Project Management Software
==========================================================
The main management philosophy of ZenTao Project Management Software is based on Scrum, an internationally popular agile management methodology. Scrum is very pragmatic and easy to operate, so it fits in the fast iterative software development projects. However, Scrum only defines the core management framework. There are still many details and processes that need to be extended and developed. Based on the philosophy of Scrum and the observation of the current R&D situation in China, ZenTao integrates bug management, test case management, release management and document management, and it covers the entire life cycle of software R&D. In ZenTao, the concept of product, project and test is clearly defined. Product team, development team and testing team coordinate and check with each other while they function differently. The three teams interact with each other through working on stories, tasks and bugs, and eventually deliver the product with quality.
4. Why choose ZenTao Project Management Software?
===============================================
* ZenTao is a professional R&D project management software and canot be replaced by simple project management software.
@@ -26,25 +30,27 @@ The main management philosophy of ZenTao Project Management Software is based on
* Open source codes and flexible extension mechanism, convenient for uses and secondary development of companies.
* Underlying framework and front-end UI framework developed independently; robust and stable with beautiful interface and friendly interaction.
* Perfect community mechanism; you can get technical support and help in time.
* Zero input which means you have no risk for choosing ZenTao compared with other commercial software that cost you tens of thousands of dollars.
* Support various deployments, either private deployment or cloud services.
* Zero input which means you have no risk for choosing ZenTao compared with other commercial software that cost you thousands of dollars.
* Support various deployments, either private deployment or cloud service.
5. Features of ZenTao Project Management Software
======================================================
* Product management: including products, stories, plans, releases and roadmaps;
* Project management: including projects, tasks, teams, versions and burn-down charts;
* Quality management: including bus, test cases, test tasks and test results;
* Quality management: including bugs, test cases, test tasks and test results;
* Document management: including product document library, project document library and customized document library;
* Affair management: including to-do management and personal management, such as my tasks, my bugs, my story and my projects;
* Organization management: including department, users, groups and authorities;
* Statistics function: various statistical reports;
* Search function: powerful search functions to help you find the data you need.
* Extension mechanism:extensible almost anywhere in ZenTao;
* Work management: including to-do management and personal management, such as my tasks, my bugs, my story and my projects;
* Organization management: including department, users, groups and privileges;
* Statistics: various reports;
* Search: powerful search features to help you find the data you need.
* Extension mechanism: extensible almost anywhere in ZenTao;
* API mechanism, visible API: convenient for integration with other systems.
6. Website
==========
Our website is: [www.zentao.pm](http://www.zentao.pm)
+41
View File
@@ -0,0 +1,41 @@
一、什么是禅道项目管理软件?
禅道是第一款国产的开源项目管理软件。它集产品管理、项目管理、质量管理、文档管理、 组织管理和事务管理于一体,是一款专业的研发项目管理软件,完整地覆盖了项目管理的核心流程。禅道管理思想注重实效,软件架构合理,操作简洁高效,代码实现合理,内置灵活的扩展机制和api调用机制,支持多语言。
二、为什么用“禅道”这个名字?
禅和道是中国文化中极具代表意义的两个字,是中国传统文化的结晶。我们之所以选用“禅道”作为我们软件的名字,是希望通过这两个字来传达我们对管理的理解和思考。我们希望通过禅道来进行的管理,可以摒弃繁文缛节,还原管理的本质!
三、禅道的设计理念
禅道项目管理软件的主要管理思想基于国际流行的敏捷项目管理方 式——Scrum。scrum是一种注重实效的敏捷项目管理方式。它规定了核心的管理框架,但具体的细节还需要团队自行扩充。禅道在遵循其管理方式基础上,又融入了国内研发现状的很多需求,比如bug管理,测试用例管理,发布管理,文档管理等。因此禅道不仅仅是一款scrum敏捷项目管理工 具,更是一款完备的项目管理软件。基于scrum,又不局限于scrum。
禅道还首次创造性的将产品、项目、测试这三者的概念明确分开,互相配合,又互相制约,通过需求、任务、bug来进行交相互动,终通过项目拿到合格的产品。
四、选择禅道的八大理由:
1. 开源的软件,保证了您使用的放心和灵活。
2. 先进的管理思想,让您在竞争中拔得头筹。
3. 完备的管理功能,无需再整合其他多个系统。
4. 国产软件,中文支持,操作习惯更符合国人。
5. 灵活的扩展机制,可以保证您不局限于禅道自身的功能。
6. 日趋完善的社区机制,可以获得及时的技术支持和帮助,保证您无后顾之忧。
7. 几乎为零的投入,禅道作为开源软件,其投入几乎为零,相比动辄十几万的商业软件,您选择禅道没有任何风险。
8. 开发团队已经公司化运作,保证软件的持久发展。我们从04年从事开源软件开发以来,已经坚持了六年。
五、禅道的功能列表:
1. 产品管理:包括产品、需求、计划、发布、路线图等功能。
2. 项目管理:包括项目、任务、团队、build、燃尽图等功能。
3. 质量管理:包括bug、测试用例、测试任务、测试结果等功能。
4. 文档管理:包括产品文档库、项目文档库、自定义文档库等功能。
5. 事务管理:包括todo管理,我的任务、我的Bug、我的需求、我的项目等个人事务管理功能。
6. 组织管理:包括部门、用户、分组、权限等功能。
7. 统计功能:丰富的统计表。
8. 搜索功能:强大的搜索,帮助您找到相应的数据。
9. 灵活的扩展机制,几乎可以对禅道的任何地方进行扩展。
10. 强大的api机制,方便与其他系统集成。
也许您已经"众里寻她千百度",那么让禅道带给您“蓦然回首,那人却在灯火阑珊处”的惊喜吧!Let's zentao!
禅道官方网站: [www.zentao.net](http://www.zentao.net)
+1 -1
View File
@@ -1 +1 @@
9.4
9.5.stable
+9 -9
View File
@@ -16,20 +16,20 @@ if(!class_exists('config')){class config{}}
if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* 基本设置。Basic settings. */
$config->version = '9.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
$config->version = '9.5'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
$config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php.
$config->webRoot = ''; // URL根目录。 The root path of the url.
/* 框架路由相关设置。Routing settings. */
$config->requestType = 'PATH_INFO'; // 请求类型:PATH_INFO|PATHINFO2|GET。 The request type: PATH_INFO|PATH_INFO2|GET.
$config->requestFix = '-'; // PATH_INFO和PATH_INFO2模式的分隔符。 The divider in the url when PATH_INFO|PATH_INFO2.
$config->moduleVar = 'm'; // 请求类型为GET:模块变量名。 requestType=GET: the module var name.
$config->methodVar = 'f'; // 请求类型为GET:模块变量名。 requestType=GET: the method var name.
$config->viewVar = 't'; // 请求类型为GET:视图变量名。 requestType=GET: the view var name.
$config->sessionVar = 'zentaosid'; // 请求类型为GET:session变量名。 requestType=GET: the session var name.
$config->views = ',html,json,mhtml,'; // 支持的视图类型。 Supported view formats.
$config->requestFix = '-'; // PATH_INFO和PATH_INFO2模式的分隔符。 The divider in the url when PATH_INFO|PATH_INFO2.
$config->moduleVar = 'm'; // 请求类型为GET:模块变量名。 requestType=GET: the module var name.
$config->methodVar = 'f'; // 请求类型为GET:模块变量名。 requestType=GET: the method var name.
$config->viewVar = 't'; // 请求类型为GET:视图变量名。 requestType=GET: the view var name.
$config->sessionVar = 'zentaosid'; // 请求类型为GET:session变量名。 requestType=GET: the session var name.
$config->views = ',html,json,mhtml,'; // 支持的视图类型。 Supported view formats.
/* 支持的主题和语言。Supported thems and languages. */
$config->themes['default'] = 'default';
-1
View File
@@ -158,7 +158,6 @@ $filter->todo->export->cookie['checkedItem'] = 'reg::checked';
$filter->user->login->cookie['keepLogin'] = 'equal::on';
$filter->block->default->get['hash'] = 'reg::md5';
$filter->block->main->get['blockid'] = 'code';
$filter->block->main->get['blockTitle'] = 'reg::any';
+3
View File
@@ -0,0 +1,3 @@
ALTER TABLE `zt_bug` ADD `activatedDate` datetime NOT NULL AFTER `activatedCount`;
ALTER TABLE `zt_user` ADD `limitedUser` varchar(8) NOT NULL default 'no' AFTER `role`;
ALTER TABLE `zt_team` ADD `limitedUser` varchar(8) NOT NULL default 'no' AFTER `role`;
+1
View File
@@ -68,6 +68,7 @@ CREATE TABLE IF NOT EXISTS `zt_bug` (
`color` char(7) NOT NULL,
`confirmed` tinyint(1) NOT NULL default '0',
`activatedCount` smallint(6) NOT NULL,
`activatedDate` datetime NOT NULL,
`mailto` text,
`openedBy` varchar(30) NOT NULL default '',
`openedDate` datetime NOT NULL,
+25 -13
View File
@@ -1,17 +1,29 @@
2017-08-25 9.5.stable
3124 取消工时记录的255字数限制
3123 导出增加对个数字段的支持
3122 文档附件库默认按照时间从新到旧的顺序显示
3121 测试bug增加批量激活功能 已完成
3120 测试报告导出功能增加相应的权限
3119 每日提醒异步邮件列表中的发送人改成后台发信配置中的发信人
3118 测试-用例 从用例库导入用例的时候增加搜索功能
3117 已删除用户默认不再列出
3116 文档库的附件库增加列表展示方式
以及修改了大量的已知BUG。
2017-07-24 9.4
3078 将跳回然之框架的功能默认设置为关闭
3077 bug导出增加对 截止日期 字段的支持
3076 把禅道数据库中所有的mailto字段都修改成 text 类型
3075 增加bug提交和编辑表单编辑器的高度
3074 数据库受损修复增加超级管理员验证
3073 计划列表默认显示全部。
3071 集成到然之之后右上角个人中心的菜单向左展开
3070 批量操作的滚动条将选择和编辑按钮的边框去掉
3069 测试-版本关联用例的时候过滤掉未评审的用例
3068 发布关联需求的时候给默认的推荐列表
3067 调整产品发布关联需求页面的排版
3066 创建计划时提示之前的计划名称
3065 附件库继承产品或者项目的访问权限
3078 将跳回然之框架的功能默认设置为关闭
3077 bug导出增加对 截止日期 字段的支持
3076 把禅道数据库中所有的mailto字段都修改成 text 类型
3075 增加bug提交和编辑表单编辑器的高度
3074 数据库受损修复增加超级管理员验证
3073 计划列表默认显示全部。
3071 集成到然之之后右上角个人中心的菜单向左展开
3070 批量操作的滚动条将选择和编辑按钮的边框去掉
3069 测试-版本关联用例的时候过滤掉未评审的用例
3068 发布关联需求的时候给默认的推荐列表
3067 调整产品发布关联需求页面的排版
3066 创建计划时提示之前的计划名称
3065 附件库继承产品或者项目的访问权限
2017-06-21 9.3.beta
3038 修改loadModel改为单例模式,提升性能
+17
View File
@@ -124,3 +124,20 @@ function isonlybody()
{
return helper::inOnlyBodyMode();
}
/**
* Format time.
*
* @param int $time
* @param string $format
* @access public
* @return void
*/
function formatTime($time, $format = '')
{
$time = str_replace('0000-00-00', '', $time);
$time = str_replace('00:00:00', '', $time);
if(trim($time) == '') return ;
if($format) return date($format, strtotime($time));
return trim($time);
}
+1 -1
View File
@@ -112,7 +112,7 @@ class baseHTML
if(empty($title)) $title = $href;
$newline = $newline ? "\n" : '';
return "<a href='$href' $misc>$title</a>$newline";
}
+9 -4
View File
@@ -1724,16 +1724,16 @@ class PHPMailer {
switch (strtolower($position)) {
case 'phrase':
$encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
$encoded = preg_replace_callback("/([^A-Za-z0-9!*+\/ -])/", array(&$this, 'ordChar'), $encoded);
break;
case 'comment':
$encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
$encoded = preg_replace_callback("/([\(\)\"])/", array(&$this, 'ordChar'), $encoded);
case 'text':
default:
// Replace every high ascii, control =, ? and _ characters
//TODO using /e (equivalent to eval()) is probably not a good idea
$encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e',
"'='.sprintf('%02X', ord('\\1'))", $encoded);
$encoded = preg_replace_callback('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/',
array(&$this, 'ordChar'), $encoded);
break;
}
@@ -2309,6 +2309,11 @@ class PHPMailer {
call_user_func_array($this->action_function,$params);
}
}
public function ordChar($match)
{
return '=' . sprintf('%02X', ord($match[1]));
}
}
class phpmailerException extends Exception {
+10
View File
@@ -33,6 +33,13 @@ $lang->action->confirmHideAll = 'Do you want to hide all the records?';
$lang->action->needEdit = '%s you want to restore has already existed. Please edit it.';
$lang->action->historyEdit = 'The history editor cannot be empty.';
$lang->action->history = new stdclass();
$lang->action->history->action = 'Bound action';
$lang->action->history->field = 'Field';
$lang->action->history->old = 'Old value';
$lang->action->history->new = 'New value';
$lang->action->history->diff = 'Diff';
$lang->action->dynamic = new stdclass();
$lang->action->dynamic->today = 'Today';
$lang->action->dynamic->yesterday = 'Yesterday';
@@ -106,6 +113,7 @@ $lang->action->desc->paused = '$date, paused by <strong>$actor</strong>.
$lang->action->desc->diff1 = '<strong><i>%s</i></strong> has been changed. Its value was "%s" and the new value is "%s".<br />' . "\n";
$lang->action->desc->diff2 = '<strong><i>%s</i></strong> has been changed. The difference is ' . "\n" . "<blockquote>%s</blockquote>" . "\n<div class='hidden'>%s</div>";
$lang->action->desc->diff3 = 'File Name %s was changed to %s .' . "\n";
$lang->action->desc->linked2bug = '$date Link to build <strong>$extra</strong> by <strong>$actor</strong>';
/* 关联用例和移除用例时的历史操作记录。*/
$lang->action->desc->linkrelatedcase = '$date, <strong>$actor</strong> linked relevant use case <strong>$extra</strong>.' . "\n";
@@ -168,6 +176,8 @@ $lang->action->label->suspended = 'Suspended';
$lang->action->label->login = 'Login';
$lang->action->label->logout = "Logout";
$lang->action->label->deleteestimate = "Deleted Man-Hour";
$lang->action->label->linked2build = "Linked";
$lang->action->label->linked2bug = "Linked";
/* 用来生成相应对象的链接。*/
$lang->action->label->product = $lang->productCommon . '|product|view|productID=%s';
+10 -2
View File
@@ -33,6 +33,13 @@ $lang->action->confirmHideAll = '您确定要全部隐藏这些记录吗?';
$lang->action->needEdit = '要还原%s的名称或代号已经存在,请编辑更改。';
$lang->action->historyEdit = '历史记录编辑不能为空。';
$lang->action->history = new stdclass();
$lang->action->history->action = '关联日志';
$lang->action->history->field = '字段';
$lang->action->history->old = '旧值';
$lang->action->history->new = '新值';
$lang->action->history->diff = '不同';
$lang->action->dynamic = new stdclass();
$lang->action->dynamic->today = '今天';
$lang->action->dynamic->yesterday = '昨天';
@@ -106,6 +113,7 @@ $lang->action->desc->paused = '$date, 由 <strong>$actor</strong> 暂停
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值为 "%s",新值为 "%s"。<br />' . "\n";
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:' . "\n" . "<blockquote>%s</blockquote>" . "\n<div class='hidden'>%s</div>";
$lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n";
$lang->action->desc->linked2bug = '$date 由 <strong>$actor</strong> 关联到版本 <strong>$extra</strong>';
/* 关联用例和移除用例时的历史操作记录。*/
$lang->action->desc->linkrelatedcase = '$date, 由 <strong>$actor</strong> 关联相关用例 <strong>$extra</strong>。' . "\n";
@@ -168,8 +176,8 @@ $lang->action->label->suspended = '挂起';
$lang->action->label->login = '登录系统';
$lang->action->label->logout = "退出登录";
$lang->action->label->deleteestimate = "删除了工时";
$lang->action->label->linked2build = "关联版本";
$lang->action->label->linked2bug = "关联BUG";
$lang->action->label->linked2build = "关联了";
$lang->action->label->linked2bug = "关联了";
/* 用来生成相应对象的链接。*/
$lang->action->label->product = $lang->productCommon . '|product|view|productID=%s';
+10
View File
@@ -33,6 +33,13 @@ $lang->action->confirmHideAll = '您確定要全部隱藏這些記錄嗎?';
$lang->action->needEdit = '要還原%s的名稱或代號已經存在,請編輯更改。';
$lang->action->historyEdit = '歷史記錄編輯不能為空。';
$lang->action->history = new stdclass();
$lang->action->history->action = '關聯日誌';
$lang->action->history->field = '欄位';
$lang->action->history->old = '舊值';
$lang->action->history->new = '新值';
$lang->action->history->diff = '不同';
$lang->action->dynamic = new stdclass();
$lang->action->dynamic->today = '今天';
$lang->action->dynamic->yesterday = '昨天';
@@ -106,6 +113,7 @@ $lang->action->desc->paused = '$date, 由 <strong>$actor</strong> 暫停
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,舊值為 "%s",新值為 "%s"。<br />' . "\n";
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,區別為:' . "\n" . "<blockquote>%s</blockquote>" . "\n<div class='hidden'>%s</div>";
$lang->action->desc->diff3 = '將檔案名 %s 改為 %s 。' . "\n";
$lang->action->desc->linked2bug = '$date 由 <strong>$actor</strong> 關聯到版本 <strong>$extra</strong>';
/* 關聯用例和移除用例時的歷史操作記錄。*/
$lang->action->desc->linkrelatedcase = '$date, 由 <strong>$actor</strong> 關聯相關用例 <strong>$extra</strong>。' . "\n";
@@ -168,6 +176,8 @@ $lang->action->label->suspended = '掛起';
$lang->action->label->login = '登錄系統';
$lang->action->label->logout = "退出登錄";
$lang->action->label->deleteestimate = "刪除了工時";
$lang->action->label->linked2build = "關聯了";
$lang->action->label->linked2bug = "關聯了";
/* 用來生成相應對象的連結。*/
$lang->action->label->product = $lang->productCommon . '|product|view|productID=%s';
+35 -18
View File
@@ -222,84 +222,91 @@ class actionModel extends model
if($actionName == 'svncommited' and isset($commiters[$action->actor]))
{
$action->actor = $commiters[$action->actor];
if($this->config->requestType == 'GET') $action->comment = str_replace('+', '%2B', $action->comment);
}
elseif($actionName == 'gitcommited' and isset($commiters[$action->actor]))
{
$action->actor = $commiters[$action->actor];
if($this->config->requestType == 'GET') $action->comment = str_replace('+', '%2B', $action->comment);
}
elseif($actionName == 'linked2project')
{
$name = $this->dao->select('name')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('project', 'story', "projectID=$action->extra"), $name);
if($name) $action->extra = common::hasPriv('project', 'story') ? html::a(helper::createLink('project', 'story', "projectID=$action->extra"), $name) : $name;
}
elseif($actionName == 'linked2plan')
{
$title = $this->dao->select('title')->from(TABLE_PRODUCTPLAN)->where('id')->eq($action->extra)->fetch('title');
if($title) $action->extra = html::a(helper::createLink('productplan', 'view', "planID=$action->extra"), $title);
if($title) $action->extra = common::hasPriv('productplan', 'view') ? html::a(helper::createLink('productplan', 'view', "planID=$action->extra"), $title) : $title;
}
elseif($actionName == 'linked2build')
{
$name = $this->dao->select('name')->from(TABLE_BUILD)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('build', 'view', "builID=$action->extra&type={$action->objectType}"), $name);
if($name) $action->extra = common::hasPriv('build', 'view') ? html::a(helper::createLink('build', 'view', "builID=$action->extra&type={$action->objectType}"), $name) : $name;
}
elseif($actionName == 'linked2bug')
{
$name = $this->dao->select('name')->from(TABLE_BUILD)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = common::hasPriv('build', 'view') ? html::a(helper::createLink('build', 'view', "builID=$action->extra&type={$action->objectType}"), $name) : $name;
}
elseif($actionName == 'linked2release')
{
$name = $this->dao->select('name')->from(TABLE_RELEASE)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('release', 'view', "releaseID=$action->extra&type={$action->objectType}"), $name);
if($name) $action->extra = common::hasPriv('release', 'view') ? html::a(helper::createLink('release', 'view', "releaseID=$action->extra&type={$action->objectType}"), $name) : $name;
}
elseif($actionName == 'moved')
{
$name = $this->dao->select('name')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('project', 'task', "projectID=$action->extra"), "#$action->extra " . $name);
if($name) $action->extra = common::hasPriv('project', 'task') ? html::a(helper::createLink('project', 'task', "projectID=$action->extra"), "#$action->extra " . $name) : "#$action->extra " . $name;
}
elseif($actionName == 'frombug')
elseif($actionName == 'frombug' and common::hasPriv('bug', 'view'))
{
$action->extra = html::a(helper::createLink('bug', 'view', "bugID=$action->extra"), $action->extra);
}
elseif($actionName == 'unlinkedfromproject')
{
$name = $this->dao->select('name')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('project', 'story', "projectID=$action->extra"), "#$action->extra " . $name);
if($name) $action->extra = common::hasPriv('project', 'story') ? html::a(helper::createLink('project', 'story', "projectID=$action->extra"), "#$action->extra " . $name) : "#$action->extra " . $name;
}
elseif($actionName == 'unlinkedfrombuild')
{
$name = $this->dao->select('name')->from(TABLE_BUILD)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('build', 'view', "builID=$action->extra&type={$action->objectType}"), $name);
if($name) $action->extra = common::hasPriv('build', 'view') ? html::a(helper::createLink('build', 'view', "builID=$action->extra&type={$action->objectType}"), $name) : $name;
}
elseif($actionName == 'unlinkedfromrelease')
{
$name = $this->dao->select('name')->from(TABLE_RELEASE)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('release', 'view', "releaseID=$action->extra&type={$action->objectType}"), $name);
if($name) $action->extra = common::hasPriv('release', 'view') ? html::a(helper::createLink('release', 'view', "releaseID=$action->extra&type={$action->objectType}"), $name) : $name;
}
elseif($actionName == 'unlinkedfromplan')
{
$title = $this->dao->select('title')->from(TABLE_PRODUCTPLAN)->where('id')->eq($action->extra)->fetch('title');
if($title) $action->extra = html::a(helper::createLink('productplan', 'view', "planID=$action->extra"), "#$action->extra " . $title);
if($title) $action->extra = common::hasPriv('productplan', 'view') ? html::a(helper::createLink('productplan', 'view', "planID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title;
}
elseif($actionName == 'tostory')
{
$title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title');
if($title) $action->extra = html::a(helper::createLink('story', 'view', "storyID=$action->extra"), "#$action->extra " . $title);
if($title) $action->extra = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title;
}
elseif($actionName == 'totask')
{
$name = $this->dao->select('name')->from(TABLE_TASK)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('task', 'view', "taskID=$action->extra"), "#$action->extra " . $name);
if($name) $action->extra = common::hasPriv('task', 'view') ? html::a(helper::createLink('task', 'view', "taskID=$action->extra"), "#$action->extra " . $name) : "#$action->extra " . $name;
}
elseif($actionName == 'buildopened')
{
$name = $this->dao->select('name')->from(TABLE_BUILD)->where('id')->eq($action->objectID)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('build', 'view', "buildID=$action->objectID"), "#$action->objectID " . $name);
if($name) $action->extra = common::hasPriv('build', 'view') ? html::a(helper::createLink('build', 'view', "buildID=$action->objectID"), "#$action->objectID " . $name) : "#$action->objectID " . $name;
}
elseif($actionName == 'testtaskopened' or $actionName == 'testtaskstarted' or $actionName == 'testtaskclosed')
{
$name = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($action->objectID)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('testtask', 'view', "testtaskID=$action->objectID"), "#$action->objectID " . $name);
if($name) $action->extra = common::hasPriv('testtask', 'view') ? html::a(helper::createLink('testtask', 'view', "testtaskID=$action->objectID"), "#$action->objectID " . $name) : "#$action->objectID " . $name;
}
elseif($actionName == 'fromlib' and $action->objectType == 'case')
{
$name = $this->dao->select('name')->from(TABLE_TESTSUITE)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('testsuite', 'library', "libID=$action->extra"), $name);
if($name) $action->extra = common::hasPriv('testsuite', 'library') ? html::a(helper::createLink('testsuite', 'library', "libID=$action->extra"), $name) : $name;
}
elseif(($actionName == 'closed' and $action->objectType == 'story') or ($actionName == 'resolved' and $action->objectType == 'bug'))
{
@@ -698,7 +705,13 @@ class actionModel extends model
$objectType = strtolower($action->objectType);
$action->date = date(DT_MONTHTIME2, strtotime($action->date));
$action->actionLabel = isset($this->lang->action->label->$actionType) ? $this->lang->action->label->$actionType : $action->action;
$action->objectLabel = isset($this->lang->action->label->$objectType) ? $this->lang->action->label->$objectType : $objectType;
$action->objectLabel = $objectType;
if(isset($this->lang->action->label->$objectType))
{
$objectLabel = $this->lang->action->label->$objectType;
if(!is_array($objectLabel)) $action->objectLabel = $objectLabel;
if(is_array($objectLabel) and isset($objectLabel[$actionType])) $action->objectLabel = $objectLabel[$actionType];
}
/* If action type is login or logout, needn't link. */
if($actionType == 'svncommited')
@@ -710,8 +723,12 @@ class actionModel extends model
if(strpos($action->objectLabel, '|') !== false)
{
list($objectLabel, $moduleName, $methodName, $vars) = explode('|', $action->objectLabel);
$action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID));
if($action->objectType == 'user') $action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->actor));
$action->objectLink = '';
if(common::hasPriv($moduleName, $methodName))
{
$action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID));
if($action->objectType == 'user') $action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->actor));
}
$action->objectLabel = $objectLabel;
}
else
+1 -1
View File
@@ -51,7 +51,7 @@ class apiModel extends model
*/
public function request($moduleName, $methodName, $action)
{
$host = common::getSysURL() . $this->config->webRoot;
$host = common::getSysURL();
$param = '';
if($action == 'extendModel')
{
+2 -2
View File
@@ -21,7 +21,7 @@ class block extends control
{
parent::__construct($moduleName, $methodName);
/* Mark the call from zentao or ranzhi. */
$this->selfCall = strpos($this->server->http_referer, common::getSysURL()) === 0 || $this->session->blockModule;
$this->selfCall = strpos($this->server->http_referer, common::getSysURL() . $this->config->webRoot) === 0 || $this->session->blockModule;
if($this->methodName != 'admin' and $this->methodName != 'dashboard' and !$this->selfCall and !$this->loadModel('sso')->checkKey()) die('');
}
@@ -197,7 +197,7 @@ class block extends control
*/
public function dashboard($module)
{
$this->session->set('blockModule', $module);
if($this->loadModel('user')->isLogon()) $this->session->set('blockModule', $module);
$blocks = $this->block->getBlockList($module);
$inited = empty($this->config->$module->common->blockInited) ? '' : $this->config->$module->common->blockInited;
+8
View File
@@ -16,6 +16,14 @@ $lang->block->style = 'Style';
$lang->block->grid = 'Grid';
$lang->block->color = 'Color';
$lang->block->account = 'Account';
$lang->block->module = 'Module';
$lang->block->title = 'Title';
$lang->block->source = 'Source module';
$lang->block->block = 'Source block';
$lang->block->order = 'Order';
$lang->block->height = 'Height';
$lang->block->lblModule = 'Module';
$lang->block->lblBlock = 'Widget';
$lang->block->lblNum = 'Number';
+8
View File
@@ -16,6 +16,14 @@ $lang->block->style = '外观';
$lang->block->grid = '宽度';
$lang->block->color = '颜色';
$lang->block->account = '所属用户';
$lang->block->module = '所属模块';
$lang->block->title = '区块名称';
$lang->block->source = '来源模块';
$lang->block->block = '来源区块';
$lang->block->order = '排序';
$lang->block->height = '高度';
$lang->block->lblModule = '模块';
$lang->block->lblBlock = '区块';
$lang->block->lblNum = '条数';
+8
View File
@@ -16,6 +16,14 @@ $lang->block->style = '外觀';
$lang->block->grid = '寬度';
$lang->block->color = '顏色';
$lang->block->account = '所屬用戶';
$lang->block->module = '所屬模組';
$lang->block->title = '區塊名稱';
$lang->block->source = '來源模組';
$lang->block->block = '來源區塊';
$lang->block->order = '排序';
$lang->block->height = '高度';
$lang->block->lblModule = '模組';
$lang->block->lblBlock = '區塊';
$lang->block->lblNum = '條數';
+5
View File
@@ -7,5 +7,10 @@ $lang->branch->delete = 'Delete Branch';
$lang->branch->manageTitle = '%s Management';
$lang->branch->all = 'All';
$lang->branch->id = 'ID';
$lang->branch->product = 'Product';
$lang->branch->name = 'Name';
$lang->branch->order = 'Order';
$lang->branch->confirmDelete = 'Do you want to delete this @branch@?';
$lang->branch->canNotDelete = 'There is data in @branch@. It cannot be deleted.';
+5
View File
@@ -7,5 +7,10 @@ $lang->branch->delete = '分支删除';
$lang->branch->manageTitle = '%s管理';
$lang->branch->all = '所有';
$lang->branch->id = '编号';
$lang->branch->product = '所属产品';
$lang->branch->name = '名称';
$lang->branch->order = '排序';
$lang->branch->confirmDelete = '是否删除该@branch@?';
$lang->branch->canNotDelete = '该@branch@下已经有数据,不能删除!';
+5
View File
@@ -7,5 +7,10 @@ $lang->branch->delete = '分支刪除';
$lang->branch->manageTitle = '%s管理';
$lang->branch->all = '所有';
$lang->branch->id = '編號';
$lang->branch->product = '所屬產品';
$lang->branch->name = '名稱';
$lang->branch->order = '排序';
$lang->branch->confirmDelete = '是否刪除該@branch@?';
$lang->branch->canNotDelete = '該@branch@下已經有數據,不能刪除!';
+5
View File
@@ -202,6 +202,11 @@ $config->bug->datatable->fieldList['activatedCount']['fixed'] = 'no';
$config->bug->datatable->fieldList['activatedCount']['width'] = '80';
$config->bug->datatable->fieldList['activatedCount']['required'] = 'no';
$config->bug->datatable->fieldList['activatedDate']['title'] = 'activatedDate';
$config->bug->datatable->fieldList['activatedDate']['fixed'] = 'no';
$config->bug->datatable->fieldList['activatedDate']['width'] = '90';
$config->bug->datatable->fieldList['activatedDate']['required'] = 'no';
$config->bug->datatable->fieldList['openedBy']['title'] = 'openedByAB';
$config->bug->datatable->fieldList['openedBy']['fixed'] = 'no';
$config->bug->datatable->fieldList['openedBy']['width'] = '80';
+50 -41
View File
@@ -147,7 +147,7 @@ class bug extends control
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->moduleID = $moduleID;
$this->view->memberPairs = $this->user->getPairs('noletter');
$this->view->memberPairs = $this->user->getPairs('noletter|nodeleted');
$this->view->branch = $branch;
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
$this->view->setShowModule = true;
@@ -205,7 +205,7 @@ class bug extends control
*/
public function create($productID, $branch = '', $extras = '')
{
$this->view->users = $this->user->getPairs('devfirst|noclosed');
$this->view->users = $this->user->getPairs('devfirst|noclosed|nodeleted');
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
$this->app->loadLang('release');
@@ -264,6 +264,8 @@ class bug extends control
$keywords = '';
$severity = 3;
$type = 'codeerror';
$pri = '';
$color = '';
/* Parse the extras. */
$extras = str_replace(array(',', ' '), array('&', ''), $extras);
@@ -273,7 +275,7 @@ class bug extends control
if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version));// If not set runID but set caseID, get the result info by resultID and case info.
/* If bugID setted, use this bug as template. */
if(isset($bugID))
if(isset($bugID))
{
$bug = $this->bug->getById($bugID);
extract((array)$bug);
@@ -286,6 +288,7 @@ class bug extends control
$type = $bug->type;
$assignedTo = $bug->assignedTo;
$deadline = $bug->deadline;
$color = $bug->color;
}
/* If projectID is setted, get builds and stories of this project. */
@@ -302,13 +305,13 @@ class bug extends control
/* Set team members of the latest project as assignedTo list. */
$latestProject = $this->product->getLatestProject($productID);
if(!empty($latestProject))
if(!empty($latestProject))
{
$projectMembers = $this->loadModel('project')->getTeamMemberPairs($latestProject->id, 'nodeleted');
}
else
{
$projectMembers = $this->view->users;
$projectMembers = $this->view->users;
}
/* Set custom. */
@@ -336,6 +339,7 @@ class bug extends control
$this->view->version = $version;
$this->view->testtask = $testtask;
$this->view->bugTitle = $title;
$this->view->pri = $pri;
$this->view->steps = htmlspecialchars($steps);
$this->view->os = $os;
$this->view->browser = $browser;
@@ -348,6 +352,7 @@ class bug extends control
$this->view->type = $type;
$this->view->branch = $branch;
$this->view->branches = $branches;
$this->view->color = $color;
$this->display();
}
@@ -423,7 +428,7 @@ class bug extends control
$this->view->productID = $productID;
$this->view->stories = $stories;
$this->view->builds = $builds;
$this->view->users = $this->user->getPairs('devfirst');
$this->view->users = $this->user->getPairs('devfirst|nodeleted');
$this->view->projects = $this->product->getProjectPairs($productID, $branch ? "0,$branch" : 0, $params = 'nodeleted');
$this->view->projectID = $projectID;
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
@@ -513,18 +518,18 @@ class bug extends control
}
$bug = $this->bug->getById($bugID);
if($bug->toTask != 0)
if($bug->toTask != 0)
{
foreach($changes as $change)
{
if($change['field'] == 'status')
if($change['field'] == 'status')
{
$confirmURL = $this->createLink('task', 'view', "taskID=$bug->toTask");
$cancelURL = $this->server->HTTP_REFERER;
die(js::confirm(sprintf($this->lang->bug->remindTask, $bug->Task), $confirmURL, $cancelURL, 'parent', 'parent'));
}
}
}
}
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
@@ -576,7 +581,7 @@ class bug extends control
$this->view->stories = $bug->project ? $this->story->getProjectStoryPairs($bug->project) : $this->story->getProductStoryPairs($bug->product, $bug->branch);
$this->view->branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($bug->product);
$this->view->tasks = $this->task->getProjectTaskPairs($bug->project);
$this->view->users = $this->user->getPairs('', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy");
$this->view->users = $this->user->getPairs('nodeleted', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy");
$this->view->openedBuilds = $openedBuilds;
$this->view->resolvedBuilds = array('' => '') + $openedBuilds + $oldResolvedBuild;
$this->view->actions = $this->action->getList('bug', $bugID);
@@ -587,8 +592,8 @@ class bug extends control
/**
* Batch edit bug.
*
* @param int $productID
*
* @param int $productID
* @access public
* @return void
*/
@@ -618,7 +623,7 @@ class bug extends control
die(js::confirm(sprintf($this->lang->bug->remindTask, $bug->task), $confirmURL, $cancelURL, 'parent', 'parent'));
}
}
}
}
}
die(js::locate($this->session->bugList, 'parent'));
}
@@ -685,7 +690,7 @@ class bug extends control
$appendUsers[$bug->assignedTo] = $bug->assignedTo;
$appendUsers[$bug->resolvedBy] = $bug->resolvedBy;
}
$users = $this->user->getPairs('devfirst', $appendUsers);
$users = $this->user->getPairs('devfirst|nodeleted', $appendUsers);
$users = array('' => '', 'ditto' => $this->lang->bug->ditto) + $users;
/* Assign. */
@@ -738,7 +743,7 @@ class bug extends control
$this->view->title = $this->products[$bug->product] . $this->lang->colon . $this->lang->bug->assignedTo;
$this->view->position[] = $this->lang->bug->assignedTo;
$this->view->users = $this->user->getPairs('', $bug->assignedTo);
$this->view->users = $this->user->getPairs('nodeleted', $bug->assignedTo);
$this->view->bug = $bug;
$this->view->bugID = $bugID;
$this->view->actions = $this->action->getList('bug', $bugID);
@@ -828,7 +833,7 @@ class bug extends control
$this->view->position[] = $this->lang->bug->confirmBug;
$this->view->bug = $bug;
$this->view->users = $this->user->getPairs('', $bug->assignedTo);
$this->view->users = $this->user->getPairs('nodeleted', $bug->assignedTo);
$this->view->actions = $this->action->getList('bug', $bugID);
$this->display();
}
@@ -933,8 +938,8 @@ class bug extends control
/**
* Activate a bug.
*
* @param int $bugID
*
* @param int $bugID
* @access public
* @return void
*/
@@ -960,7 +965,7 @@ class bug extends control
$this->view->position[] = $this->lang->bug->activate;
$this->view->bug = $bug;
$this->view->users = $this->user->getPairs('', $bug->resolvedBy);
$this->view->users = $this->user->getPairs('nodeleted', $bug->resolvedBy);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $bug->branch, 'noempty');
$this->view->actions = $this->action->getList('bug', $bugID);
@@ -1122,36 +1127,39 @@ class bug extends control
}
/**
* Batch activate bugs.
*
* Batch activate bugs.
*
* @access public
* @return void
*/
public function batchActivate()
public function batchActivate($productID, $branch = 0)
{
if($this->post->bugIDList)
if($this->post->statusList)
{
$bugIDList = $this->post->bugIDList;
/* Reset $_POST. Do not unset that because the function of close need that in model. */
$_POST = array();
$bugs = $this->bug->getByList($bugIDList);
foreach($bugs as $bugID => $bug)
$activateBugs = $this->bug->batchActivate();
foreach($activateBugs as $bugID => $bug)
{
if($bug->status == 'active')
{
continue;
}
$this->bug->activate($bugID);
$actionID = $this->action->create('bug', $bugID, 'Activated');
$actionID = $this->action->create('bug', $bugID, 'Activated', $bug['comment']);
$this->bug->sendmail($bugID, $actionID);
}
die(js::locate($this->session->bugList, 'parent'));
}
die(js::reload('parent'));
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : die(js::locate($this->session->bugList, 'parent'));
$bugs = $this->dao->select('id, title, status, resolvedBy, openedBuild')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id');
$this->bug->setMenu($this->products, $productID, $branch);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->batchActivate;
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$this->view->position[] = $this->lang->bug->batchActivate;
$this->view->bugs = $bugs;
$this->view->users = $this->user->getPairs();
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'noempty');
$this->display();
}
/**
@@ -1280,6 +1288,7 @@ class bug extends control
* AJAX: get team members of the latest project of a product as assignedTo list.
*
* @param int $productID
* x
* @param string $selectedUser
* @access public
* @return string
@@ -1293,7 +1302,7 @@ class bug extends control
}
else
{
$projectMembers = $this->loadModel('user')->getPairs('devfirst|noclosed');
$projectMembers = $this->loadModel('user')->getPairs('devfirst|noclosed|nodeleted');
}
die(html::select('assignedTo', $projectMembers, $selectedUser, 'class="form-control"'));
@@ -1439,7 +1448,7 @@ class bug extends control
if(isset($bugLang->statusList[$bug->status])) $bug->status = $bugLang->statusList[$bug->status];
if(isset($bugLang->confirmedList[$bug->confirmed])) $bug->confirmed = $bugLang->confirmedList[$bug->confirmed];
if(isset($bugLang->resolutionList[$bug->resolution])) $bug->resolution = $bugLang->resolutionList[$bug->resolution];
if(isset($users[$bug->openedBy])) $bug->openedBy = $users[$bug->openedBy];
if(isset($users[$bug->assignedTo])) $bug->assignedTo = $users[$bug->assignedTo];
if(isset($users[$bug->resolvedBy])) $bug->resolvedBy = $users[$bug->resolvedBy];
+2 -2
View File
@@ -1,4 +1,4 @@
$(function()
$(function()
{
setModal4List('iframe', 'bugList');
@@ -12,7 +12,7 @@ $(function()
oldStoryID = $('#story').val() || 0;
oldProjectID = 0;
oldOpenedBuild = '';
oldTaskID = 0;
oldTaskID = $('#oldTaskID').val() || 0;
if(!assignedto) setAssignedTo(moduleID, productID);
notice();
}
+1
View File
@@ -32,6 +32,7 @@ $lang->bug->status = 'Status';
$lang->bug->statusAB = 'Status';
$lang->bug->activatedCount = 'Active';
$lang->bug->activatedCountAB = 'Active';
$lang->bug->activatedDate = 'Active On';
$lang->bug->confirmed = 'Confirmed';
$lang->bug->toTask = 'Convert to Task';
$lang->bug->toStory = 'Convert to Story';
+4 -3
View File
@@ -32,6 +32,7 @@ $lang->bug->status = 'Bug状态';
$lang->bug->statusAB = '状态';
$lang->bug->activatedCount = '激活次数';
$lang->bug->activatedCountAB = '激活次数';
$lang->bug->activatedDate = '激活日期';
$lang->bug->confirmed = '是否确认';
$lang->bug->toTask = '转任务';
$lang->bug->toStory = '转需求';
@@ -342,9 +343,9 @@ $lang->bug->report->bugHistories->graph->xAxisName = '处理步骤';
/* 操作记录。*/
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong>需求</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 导入为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong>需求</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 导入为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 关联到计划 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 从计划 <strong>$extra</strong> 移除。');
$lang->bug->action->linked2build = array('main' => '$date, 由 <strong>$actor</strong> 关联到版本 <strong>$extra</strong>。');
+7 -6
View File
@@ -32,6 +32,7 @@ $lang->bug->status = 'Bug狀態';
$lang->bug->statusAB = '狀態';
$lang->bug->activatedCount = '激活次數';
$lang->bug->activatedCountAB = '激活次數';
$lang->bug->activatedDate = '激活日期';
$lang->bug->confirmed = '是否確認';
$lang->bug->toTask = '轉任務';
$lang->bug->toStory = '轉需求';
@@ -150,9 +151,9 @@ $lang->bug->applyTemplate = '應用模板';
$lang->bug->confirmDeleteTemplate = '您確認要刪除該模板嗎?';
/* 模板。*/
$lang->bug->tplStep = "<p>[步驟]</p>\n";
$lang->bug->tplResult = "<p>[結果]</p>\n";
$lang->bug->tplExpect = "<p>[期望]</p>";
$lang->bug->tplStep = "<p>[步驟]</p>";
$lang->bug->tplResult = "</br><p>[結果]</p>";
$lang->bug->tplExpect = "</br><p>[期望]</p>";
/* 各個欄位取值列表。*/
$lang->bug->severityList[3] = '3';
@@ -342,9 +343,9 @@ $lang->bug->report->bugHistories->graph->xAxisName = '處理步驟';
/* 操作記錄。*/
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解決,方案為 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 轉為<strong>需求</strong>,編號為 <strong>$extra</strong>。');
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 導入為<strong>任務</strong>,編號為 <strong>$extra</strong>。');
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解決,方案為 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 轉為<strong>需求</strong>,編號為 <strong>$extra</strong>。');
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 導入為<strong>任務</strong>,編號為 <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 關聯到計劃 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 從計劃 <strong>$extra</strong> 移除。');
$lang->bug->action->linked2build = array('main' => '$date, 由 <strong>$actor</strong> 關聯到版本 <strong>$extra</strong>。');
+66 -9
View File
@@ -455,7 +455,7 @@ class bugModel extends model
*/
public function getModuleOwner($moduleID, $productID)
{
$users = $this->loadModel('user')->getPairs();
$users = $this->loadModel('user')->getPairs('nodeleted');
if($moduleID)
{
@@ -658,6 +658,57 @@ class bugModel extends model
return $allChanges;
}
/**
* Batch active bugs.
*
* @access public
* @return array
*/
public function batchActivate()
{
$now = helper::now();
$data = fixer::input('post')->get();
$activateBugs = array();
$bugIDList = $data->bugIDList ? $data->bugIDList : array();
if(empty($bugIDList)) return $activateBugs;
foreach($bugIDList as $bugID)
{
if($data->statusList[$bugID] == 'active') continue;
$activateBugs[$bugID]['assignedTo'] = $data->assignedToList[$bugID];
$activateBugs[$bugID]['openedBuild'] = $data->openedBuildList[$bugID];
$activateBugs[$bugID]['comment'] = $data->commentList[$bugID];
$activateBugs[$bugID]['assignedDate'] = $now;
$activateBugs[$bugID]['resolution'] = '';
$activateBugs[$bugID]['status'] = 'active';
$activateBugs[$bugID]['resolvedDate'] = '0000-00-00';
$activateBugs[$bugID]['resolvedBy'] = '';
$activateBugs[$bugID]['resolvedBuild'] = '';
$activateBugs[$bugID]['closedBy'] = '';
$activateBugs[$bugID]['closedDate'] = '0000-00-00';
$activateBugs[$bugID]['duplicateBug'] = 0;
$activateBugs[$bugID]['toTask'] = 0;
$activateBugs[$bugID]['toStory'] = 0;
$activateBugs[$bugID]['lastEditedBy'] = $this->app->user->account;
$activateBugs[$bugID]['lastEditedDate'] = $now;
}
/* Update bugs. */
foreach($activateBugs as $bugID => $bug)
{
$this->dao->update(TABLE_BUG)->data($bug, $skipFields = 'comment')->autoCheck()->where('id')->eq((int)$bugID)->exec();
if(dao::isError()) die(js::error('bug#' . $bugID . dao::getError(true)));
$this->dao->update(TABLE_BUG)->set('activatedCount = activatedCount + 1')->where('id')->eq((int)$bugID)->exec();
}
return $activateBugs;
}
/**
* Assign a bug to a user again.
*
@@ -925,6 +976,7 @@ class bugModel extends model
->add('toStory', 0)
->add('lastEditedBy', $this->app->user->account)
->add('lastEditedDate', $now)
->add('activatedDate', $now)
->join('openedBuild', ',')
->remove('comment,files,labels')
->get();
@@ -1506,7 +1558,7 @@ class bugModel extends model
{
foreach($openBuildIDList as $buildID)
{
if(isset($datas[$buildID]))
if(isset($datas[$buildID]))
{
$datas[$buildID]->value += $data->value;
}
@@ -1538,7 +1590,7 @@ class bugModel extends model
{
$datas = $this->dao->select('module as name, count(module) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('module')->orderBy('value DESC')->fetchAll('name');
if(!$datas) return array();
$modules = $this->loadModel('tree')->getModulesName(array_keys($datas),true,true);
$modules = $this->loadModel('tree')->getModulesName(array_keys($datas), true, true);
foreach($datas as $moduleID => $data) $data->name = isset($modules[$moduleID]) ? $modules[$moduleID] : '/';
return $datas;
}
@@ -2191,6 +2243,8 @@ class bugModel extends model
{
$action = strtolower($action);
if(!common::limitedUser($object)) return false;
if($action == 'confirmbug') return $object->status == 'active' and $object->confirmed == 0;
if($action == 'resolve') return $object->status == 'active';
if($action == 'close') return $object->status == 'resolved';
@@ -2249,12 +2303,12 @@ class bugModel extends model
/**
* Print cell data.
*
* @param object $col
* @param object $bug
* @param array $users
* @param array $builds
* @param array $branches
*
* @param object $col
* @param object $bug
* @param array $users
* @param array $builds
* @param array $branches
* @access public
* @return void
*/
@@ -2306,6 +2360,9 @@ class bugModel extends model
case 'activatedCount':
echo $bug->activatedCount;
break;
case 'activatedDate':
echo substr($bug->activatedDate, 5, 11);
break;
case 'openedBy':
echo zget($users, $bug->openedBy);
break;
+1 -1
View File
@@ -37,7 +37,7 @@
<tr>
<th><?php echo $lang->bug->files;?></th>
<td colspan='2' class='text-left'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
</tr>
<tr>
<th></th><td colspan='2'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->bugList);?></td>
</tr>
+46
View File
@@ -0,0 +1,46 @@
<?php
/**
* The batch activate view of bug module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Congzhi Chen <congzhi@cnezsoft.com>
* @package bug
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='titlebar'>
<div class='heading'>
<strong><small class='text-muted'></small> <?php echo $lang->bug->common . $lang->colon . $lang->bug->batchActivate;?></strong>
</div>
</div>
<form class='form-condensed' method='post' target='hiddenwin' action="<?php echo inLink('batchActivate', "productID=$productID");?>">
<table class='table table-fixed with-border'>
<thead>
<tr>
<th class='w-20px'><?php echo $lang->idAB;?></th>
<th class='w-50px'><?php echo $lang->bug->title;?></th>
<th class='w-70px'><?php echo $lang->bug->assignedTo;?></th>
<th class='w-70px'><?php echo $lang->bug->openedBuild;?></th>
<th class='w-150px'><?php echo $lang->bug->legendComment;?></th>
</tr>
</thead>
<tbody class='text-left'>
<?php foreach($bugs as $bug):?>
<tr>
<td class='text-center'><?php echo $bug->id . html::hidden("bugIDList[$bug->id]", $bug->id);?></td>
<td><?php echo $bug->title . html::hidden("statusList[$bug->id]", $bug->status);?></td>
<td style='overflow:visible'><?php echo html::select("assignedToList[$bug->id]", $users, $bug->resolvedBy, "class='form-control chosen'");?></td>
<td style='overflow:visible'><?php echo html::select("openedBuildList[$bug->id]", $builds, $bug->openedBuild, 'size=4 multiple=multiple class="form-control chosen"');?></td>
<td><?php echo html::input("commentList[$bug->id]", '', "class='form-control'");?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr><td colspan='5' class='text-center'><?php echo html::submitButton();?></td></tr>
</tfoot>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>
+4 -4
View File
@@ -193,15 +193,15 @@ js::set('branch', $branch);
<?php
$class = "class='disabled'";
$actionLink = $this->createLink('bug', 'batchConfirm');
$misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=\"setFormAction('$actionLink','hiddenwin')\"" : $class;
$misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : $class;
if($misc) echo "<li>" . html::a('javascript:;', $lang->bug->confirmBug, '', $misc) . "</li>";
$actionLink = $this->createLink('bug', 'batchClose');
$misc = common::hasPriv('bug', 'batchClose') ? "onclick=\"setFormAction('$actionLink','hiddenwin')\"" : $class;
$misc = common::hasPriv('bug', 'batchClose') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : $class;
if($misc) echo "<li>" . html::a('javascript:;', $lang->bug->close, '', $misc) . "</li>";
$actionLink = $this->createLink('bug', 'batchActivate');
$misc = common::hasPriv('bug', 'batchActivate') ? "onclick=\"setFormAction('$actionLink','hiddenwin')\"" : $class;
$actionLink = $this->createLink('bug', 'batchActivate', "productID=$productID&branch=$branch");
$misc = common::hasPriv('bug', 'batchActivate') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
if($misc) echo "<li>" . html::a('javascript:;', $lang->bug->activate, '', $misc) . "</li>";
if(common::hasPriv('bug', 'batchChangeModule'))
+2 -2
View File
@@ -48,7 +48,7 @@
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr class='text-center'>
<td class='cell-id bug-<?php echo $bug->status;?> strong text-left'>
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>'/>
<input type='checkbox' name='bugIDList[<?php echo $bug->id ?>]' value='<?php echo $bug->id;?>'/>
<?php echo html::a($bugLink, sprintf('%03d', $bug->id));?>
</td>
<td><span class='<?php echo 'severity' . zget($lang->bug->severityList, $bug->severity, $bug->severity);?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span></td>
@@ -100,7 +100,7 @@
<?php
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'search', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, '', 'list', '', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, $bug, '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');
+6 -6
View File
@@ -1,4 +1,4 @@
<?php
<?php
/**
* The create view of bug module of ZenTaoPMS.
*
@@ -149,7 +149,7 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
<div class='row-table'>
<div class='col-table w-p100'>
<div class='input-group w-p100'>
<input type='hidden' id='color' name='color' data-provide='colorpicker' data-wrapper='input-group-btn' data-pull-menu-right='false' data-btn-tip='<?php echo $lang->bug->colorTag ?>' data-update-text='#title'>
<input type='hidden' id='color' name='color' data-provide='colorpicker' data-wrapper='input-group-btn' data-pull-menu-right='false' data-btn-tip='<?php echo $lang->bug->colorTag ?>' data-update-text='#title' value='<?php echo $color;?>'>
<?php echo html::input('title', $bugTitle, "class='form-control'");?>
</div>
</div>
@@ -198,14 +198,14 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$lang->bug->priList, '', "class='form-control minw-80px'");?>
<?php echo html::select('pri', (array)$lang->bug->priList, $pri, "class='form-control minw-80px'");?>
<?php else: ?>
<div class='input-group-btn dropdown-pris'>
<button type='button' class='btn dropdown-toggle br-0' data-toggle='dropdown'>
<span class='pri-text'></span> &nbsp;<span class='caret'></span>
</button>
<ul class='dropdown-menu pull-right'></ul>
<?php echo html::select('pri', $lang->bug->priList, '', "class='hide'");?>
<?php echo html::select('pri', $lang->bug->priList, $pri, "class='hide'");?>
</div>
<?php endif;?>
<?php endif;?>
@@ -214,7 +214,7 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
<?php endif;?>
</div>
</td>
</tr>
</tr>
<tr>
<th><?php echo $lang->bug->steps;?></th>
<td colspan='2'>
@@ -250,7 +250,7 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
<?php if($showStory):?>
<span class='input-group-addon'><?php echo $lang->bug->task?></span>
<?php endif;?>
<span id='taskIdBox'> <?php echo html::select('task', '', $taskID, "class='form-control chosen'");?></span>
<span id='taskIdBox'> <?php echo html::select('task', '', $taskID, "class='form-control chosen'") . html::hidden('oldTaskID', $taskID);?></span>
</div>
</td>
<?php endif;?>
+10 -6
View File
@@ -31,20 +31,20 @@
ob_start();
echo "<div class='btn-group'>";
common::printIcon('bug', 'confirmBug', $params, $bug, 'button', 'search', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, '', 'button', '', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, $bug, 'button', '', '', 'iframe', true);
common::printIcon('bug', 'resolve', $params, $bug, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true);
common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe showinonlybody', true);
if($this->config->global->flow != 'onlyTest') common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&project=0&bugID=$bug->id", $bug, 'button', $lang->icons['story']);
common::printIcon('bug', 'createCase', $convertParams, '', 'button', 'sitemap');
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
echo '</div>';
echo "<div class='btn-group'>";
common::printIcon('bug', 'edit', $params);
common::printCommentIcon('bug');
common::printIcon('bug', 'create', $copyParams, '', 'button', 'copy');
common::printIcon('bug', 'delete', $params, '', 'button', '', 'hiddenwin');
common::printIcon('bug', 'edit', $params, $bug);
common::printCommentIcon('bug', $bug);
common::printIcon('bug', 'create', $copyParams, $bug, 'button', 'copy');
common::printIcon('bug', 'delete', $params, $bug, 'button', '', 'hiddenwin');
echo '</div>';
echo "<div class='btn-group'>";
@@ -168,6 +168,10 @@
<th><?php echo $lang->bug->activatedCount;?></th>
<td><?php echo $bug->activatedCount;?></td>
</tr>
<tr>
<th><?php echo $lang->bug->activatedDate;?></th>
<td><?php echo $bug->activatedDate;?></td>
</tr>
<tr>
<th><?php echo $lang->bug->confirmed;?></th>
<td><?php echo $lang->bug->confirmedList[$bug->confirmed];?></td>
+1 -1
View File
@@ -77,7 +77,7 @@ class build extends control
$this->view->products = $products;
$this->view->lastBuild = $this->build->getLast($projectID);
$this->view->productGroups = $productGroups;
$this->view->users = $this->user->getPairs();
$this->view->users = $this->user->getPairs('nodeleted');
$this->display();
}
+2 -1
View File
@@ -13,7 +13,6 @@ $lang->build->common = "Build";
$lang->build->create = "Create";
$lang->build->edit = "Edit";
$lang->build->linkStory = "Link Story";
$lang->build->linked2build = "Link build";
$lang->build->linkBug = "Link Bug";
$lang->build->delete = "Delete Build";
$lang->build->deleted = "Deleted";
@@ -30,6 +29,7 @@ $lang->build->basicInfo = 'Basic Info';
$lang->build->id = 'ID';
$lang->build->product = $lang->productCommon;
$lang->build->branch = 'Platform/Branch';
$lang->build->project = $lang->projectCommon;
$lang->build->name = 'Name';
$lang->build->date = 'Date';
@@ -39,6 +39,7 @@ $lang->build->filePath = 'File Path';
$lang->build->desc = 'Description';
$lang->build->files = 'Upload Files';
$lang->build->last = 'Last Build';
$lang->build->packageType = 'Package Type';
$lang->build->unlinkStory = 'Unlink Story';
$lang->build->unlinkBug = 'Unlink Bug';
$lang->build->stories = 'Finished Story';
+2
View File
@@ -29,6 +29,7 @@ $lang->build->basicInfo = '基本信息';
$lang->build->id = 'ID';
$lang->build->product = $lang->productCommon;
$lang->build->branch = '平台/分支';
$lang->build->project = '所属' . $lang->projectCommon;
$lang->build->name = '名称编号';
$lang->build->date = '打包日期';
@@ -38,6 +39,7 @@ $lang->build->filePath = '下载地址';
$lang->build->desc = '描述';
$lang->build->files = '上传发行包';
$lang->build->last = '上个版本';
$lang->build->packageType = '包类型';
$lang->build->unlinkStory = '移除需求';
$lang->build->unlinkBug = '移除Bug';
$lang->build->stories = '完成的需求';
+2 -1
View File
@@ -13,7 +13,6 @@ $lang->build->common = "版本";
$lang->build->create = "創建版本";
$lang->build->edit = "編輯版本";
$lang->build->linkStory = "關聯需求";
$lang->build->linked2build = "关联關聯版本";
$lang->build->linkBug = "關聯Bug";
$lang->build->delete = "刪除版本";
$lang->build->deleted = "已刪除";
@@ -30,6 +29,7 @@ $lang->build->basicInfo = '基本信息';
$lang->build->id = 'ID';
$lang->build->product = $lang->productCommon;
$lang->build->branch = '平台/分支';
$lang->build->project = '所屬' . $lang->projectCommon;
$lang->build->name = '名稱編號';
$lang->build->date = '打包日期';
@@ -39,6 +39,7 @@ $lang->build->filePath = '下載地址';
$lang->build->desc = '描述';
$lang->build->files = '上傳發行包';
$lang->build->last = '上個版本';
$lang->build->packageType = '包類型';
$lang->build->unlinkStory = '移除需求';
$lang->build->unlinkBug = '移除Bug';
$lang->build->stories = '完成的需求';
+16 -1
View File
@@ -66,7 +66,7 @@ class buildModel extends model
->where('t1.project')->eq((int)$projectID)
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date DESC, t1.id desc')
->fetchAll();
->fetchAll('id');
}
/**
@@ -407,4 +407,19 @@ class buildModel extends model
$this->loadModel('action')->create('bug', $unlinkBugID, 'unlinkedfrombuild', '', $buildID);
}
}
/**
* Judge an action is clickable or not.
*
* @param object $project
* @param string $action
* @access public
* @return bool
*/
public static function isClickable($build, $action)
{
if(!common::limitedUser($build)) return false;
return true;
}
}
+4 -4
View File
@@ -46,8 +46,8 @@ tfoot tr td .table-actions .btn{display:none;}
echo '</div>';
}
echo "<div class='btn-group'>";
common::printIcon('build', 'edit', "buildID=$build->id");
common::printIcon('build', 'delete', "buildID=$build->id", '', 'button', '', 'hiddenwin');
common::printIcon('build', 'edit', "buildID=$build->id", $build);
common::printIcon('build', 'delete', "buildID=$build->id", $build, 'button', '', 'hiddenwin');
echo '</div>';
}
echo common::printRPN($browseLink);
@@ -69,8 +69,8 @@ tfoot tr td .table-actions .btn{display:none;}
$browseLink = $this->session->buildList ? $this->session->buildList : $this->createLink('product', 'build', "productID=$build->product");
if(!$build->deleted)
{
common::printIcon('build', 'edit', "buildID=$build->id");
common::printIcon('build', 'delete', "buildID=$build->id", '', 'button', '', 'hiddenwin');
common::printIcon('build', 'edit', "buildID=$build->id", $build);
common::printIcon('build', 'delete', "buildID=$build->id", $build, 'button', '', 'hiddenwin');
}
echo common::printRPN($browseLink);
?>
+3 -3
View File
@@ -124,7 +124,7 @@ $lang->searchObjects['release'] = 'Release';
$lang->searchObjects['productplan'] = $lang->productCommon . 'Plan';
$lang->searchObjects['testtask'] = 'Test Task';
$lang->searchObjects['doc'] = 'Document';
$lang->searchObjects['caselib'] = 'Case Library';
$lang->searchObjects['testcase'] = 'Case Library';
$lang->searchObjects['testreport'] = 'Test Report';
$lang->searchTips = 'ID (ctrl+g)';
@@ -249,7 +249,7 @@ $lang->bug = new stdclass();
$lang->bug->menu = new stdclass();
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
$lang->bug->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
$lang->bug->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
@@ -478,7 +478,7 @@ $lang->datepicker->dpText->TEXT_CLOSE = 'Close';
$lang->datepicker->dpText->TEXT_DATE = 'Choose Time';
$lang->datepicker->dpText->TEXT_CHOOSE_DATE = 'Choose Date';
$lang->datepicker->dayNames = array('Sun', 'Mon', 'Tues', 'Wed', 'Thur', 'Fri', 'Sat');
$lang->datepicker->dayNames = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
$lang->datepicker->abbrDayNames = array('Sun', 'Mon', 'Tues', 'Wed', 'Thur', 'Fri', 'Sat');
$lang->datepicker->monthNames = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
+2 -2
View File
@@ -249,7 +249,7 @@ $lang->bug = new stdclass();
$lang->bug->menu = new stdclass();
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->bug->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
@@ -478,7 +478,7 @@ $lang->datepicker->dpText->TEXT_CLOSE = '关闭';
$lang->datepicker->dpText->TEXT_DATE = '选择时间段';
$lang->datepicker->dpText->TEXT_CHOOSE_DATE = '选择日期';
$lang->datepicker->dayNames = array('日', '一', '二', '三', '四', '五', '六');
$lang->datepicker->dayNames = array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
$lang->datepicker->abbrDayNames = array('日', '一', '二', '三', '四', '五', '六');
$lang->datepicker->monthNames = array('一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月');
+12 -12
View File
@@ -124,7 +124,7 @@ $lang->searchObjects['release'] = '發佈';
$lang->searchObjects['productplan'] = $lang->productCommon . '計劃';
$lang->searchObjects['testtask'] = '測試版本';
$lang->searchObjects['doc'] = '文檔';
$lang->searchObjects['caselib'] = '用例庫';
$lang->searchObjects['testcase'] = '用例庫';
$lang->searchObjects['testreport'] = '測試報告';
$lang->searchTips = '編號(ctrl+g)';
@@ -249,7 +249,7 @@ $lang->bug = new stdclass();
$lang->bug->menu = new stdclass();
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->bug->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
@@ -449,16 +449,16 @@ $lang->browserNotice = '你目前使用的瀏覽器可能無法得到最佳
$lang->noticePasteImg = "可以在編輯器直接貼圖。";
/* 時間格式設置。*/
define('DT_DATETIME1', 'Y-m-d H:i:s');
define('DT_DATETIME2', 'y-m-d H:i');
define('DT_MONTHTIME1', 'n/d H:i');
define('DT_MONTHTIME2', 'n月d日 H:i');
define('DT_DATE1', 'Y-m-d');
define('DT_DATE2', 'Ymd');
define('DT_DATE3', 'Y年m月d日');
define('DT_DATE4', 'n月j日');
define('DT_TIME1', 'H:i:s');
define('DT_TIME2', 'H:i');
if(!defined('DT_DATETIME1')) define('DT_DATETIME1', 'Y-m-d H:i:s');
if(!defined('DT_DATETIME2')) define('DT_DATETIME2', 'y-m-d H:i');
if(!defined('DT_MONTHTIME1'))define('DT_MONTHTIME1', 'n/d H:i');
if(!defined('DT_MONTHTIME2'))define('DT_MONTHTIME2', 'n月d日 H:i');
if(!defined('DT_DATE1')) define('DT_DATE1', 'Y-m-d');
if(!defined('DT_DATE2')) define('DT_DATE2', 'Ymd');
if(!defined('DT_DATE3')) define('DT_DATE3', 'Y年m月d日');
if(!defined('DT_DATE4')) define('DT_DATE4', 'n月j日');
if(!defined('DT_TIME1')) define('DT_TIME1', 'H:i:s');
if(!defined('DT_TIME2')) define('DT_TIME2', 'H:i');
/* datepicker 時間*/
$lang->datepicker = new stdclass();
+100 -49
View File
@@ -13,7 +13,7 @@ class commonModel extends model
{
/**
* The construc method, to do some auto things.
*
*
* @access public
* @return void
*/
@@ -35,7 +35,7 @@ class commonModel extends model
/**
* Set the header info.
*
*
* @access public
* @return void
*/
@@ -54,7 +54,7 @@ class commonModel extends model
* @return void
*/
public function setCompany()
{
{
$httpHost = $this->server->http_host;
if($this->session->company)
@@ -118,7 +118,7 @@ class commonModel extends model
/**
* Load custom lang from db.
*
*
* @access public
* @return void
*/
@@ -134,9 +134,9 @@ class commonModel extends model
/**
* Juage a method of one module is open or not?
*
* @param string $module
* @param string $method
*
* @param string $module
* @param string $method
* @access public
* @return bool
*/
@@ -249,9 +249,7 @@ class commonModel extends model
echo "<li class='divider'></li>";
}
$isLeft = ($app->company->website and $app->company->backyard) ? '' : ' left';
echo "<li class='dropdown-submenu{$isLeft}'>";
echo "<li class='dropdown-submenu left'>";
echo "<a href='javascript:;'>" . $lang->theme . "</a><ul class='dropdown-menu'>";
foreach ($app->lang->themes as $key => $value)
{
@@ -259,7 +257,7 @@ class commonModel extends model
}
echo '</ul></li>';
echo "<li class='dropdown-submenu{$isLeft}'>";
echo "<li class='dropdown-submenu left'>";
echo "<a href='javascript:;'>" . $lang->lang . "</a><ul class='dropdown-menu'>";
foreach ($app->config->langs as $key => $value)
{
@@ -294,7 +292,7 @@ class commonModel extends model
/**
* Create menu item link
*
*
* @param object $menuItemLink
* @param boolean $isTutorialMode
* @access public
@@ -321,8 +319,8 @@ class commonModel extends model
/**
* Print the main menu.
*
* @param string $moduleName
*
* @param string $moduleName
* @static
* @access public
* @return void
@@ -354,7 +352,7 @@ class commonModel extends model
/**
* Print the search box.
*
*
* @static
* @access public
* @return void
@@ -379,7 +377,7 @@ class commonModel extends model
$searchObject = $methodName;
}
if(empty($lang->searchObjects[$searchObject]))
{
{
$searchObject = 'bug';
if($config->global->flow == 'onlyStory') $searchObject = 'story';
if($config->global->flow == 'onlyTask') $searchObject = 'task';
@@ -600,9 +598,9 @@ class commonModel extends model
* @access public
* @return bool
*/
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '', $newline = true, $onlyBody = false)
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '', $newline = true, $onlyBody = false, $object = null)
{
if(!commonModel::hasPriv($module, $method)) return false;
if(!commonModel::hasPriv($module, $method, $object)) return false;
echo html::a(helper::createLink($module, $method, $vars, '', $onlyBody), $label, $target, $misc, $newline);
return true;
}
@@ -627,29 +625,29 @@ class commonModel extends model
* @access public
* @return void
*/
public static function printCommentIcon($module)
public static function printCommentIcon($module, $object = null)
{
if(isonlybody()) return false;
global $lang;
if(!commonModel::hasPriv($module, 'edit')) return false;
if(!commonModel::hasPriv($module, 'edit', $object)) return false;
echo html::a('#commentBox', '<i class="icon-comment-alt"></i>', '', "title='$lang->comment' onclick='setComment()' class='btn'");
}
/**
* Build icon button.
*
* @param string $module
* @param string $method
* @param string $vars
* @param object $object
* @param string $type button|list
* @param string $icon
* @param string $target
* @param string $extraClass
* @param bool $onlyBody
* @param string $misc
*
* @param string $module
* @param string $method
* @param string $vars
* @param object $object
* @param string $type button|list
* @param string $icon
* @param string $target
* @param string $extraClass
* @param bool $onlyBody
* @param string $misc
* @static
* @access public
* @return void
@@ -738,17 +736,17 @@ class commonModel extends model
/**
* Print link icon.
*
* @param string $module
* @param string $method
* @param string $vars
* @param object $object
* @param string $type button|list
* @param string $icon
* @param string $target
* @param string $extraClass
* @param bool $onlyBody
* @param string $misc
*
* @param string $module
* @param string $method
* @param string $vars
* @param object $object
* @param string $type button|list
* @param string $icon
* @param string $target
* @param string $extraClass
* @param bool $onlyBody
* @param string $misc
* @static
* @access public
* @return void
@@ -760,9 +758,9 @@ class commonModel extends model
/**
* Print backLink and preLink and nextLink.
*
* @param string $backLink
* @param object $preAndNext
*
* @param string $backLink
* @param object $preAndNext
* @access public
* @return void
*/
@@ -814,6 +812,9 @@ class commonModel extends model
if(strtolower($key) == 'editedby') continue;
if(strtolower($key) == 'editeddate') continue;
if(strtolower($key) == 'uid') continue;
if(strtolower($key) == 'finisheddate' && $value == '') continue;
if(strtolower($key) == 'canceleddate' && $value == '') continue;
if(strtolower($key) == 'closeddate' && $value == '') continue;
if($magicQuote) $value = stripslashes($value);
if($value != stripslashes($old->$key))
@@ -1117,14 +1118,14 @@ class commonModel extends model
/**
* Check the user has permisson of one method of one module.
*
* @param string $module
* @param string $method
*
* @param string $module
* @param string $method
* @static
* @access public
* @return bool
*/
public static function hasPriv($module, $method)
public static function hasPriv($module, $method, $object = null)
{
global $app, $lang;
@@ -1136,8 +1137,11 @@ class commonModel extends model
$acls = $app->user->rights['acls'];
$module = strtolower($module);
$method = strtolower($method);
if(isset($rights[$module][$method]))
{
if(!commonModel::limitedUser($object, $module, $method)) return false;
if(empty($acls['views'])) return true;
$menu = isset($lang->menugroup->$module) ? $lang->menugroup->$module : $module;
$menu = strtolower($menu);
@@ -1146,8 +1150,55 @@ class commonModel extends model
if($module == 'company' and $method == 'dynamic') return true;
if($module == 'action' and $method == 'editcomment') return true;
if(!isset($acls['views'][$menu])) return false;
return true;
}
return false;
}
public static function limitedUser($object, $module = null, $method = null)
{
global $app;
if(!empty($app->user->admin) || $app->user->account == 'guest') return true;
// limited project
$limitedProject = false;
if(!empty($module) && $module == 'task' && !empty($object->project) ||
!empty($module) && $module == 'task' && !empty($object->id))
{
$objectID = '';
if(!empty($object->id)) $objectID = $object->id;
if(!empty($object->id) && !empty($object->project)) $objectID = $object->project;
$sessionKey = $app->user->account . 'project' . $objectID;
if(!empty($_SESSION[$sessionKey]) && $_SESSION[$sessionKey] == $objectID)
{
$limitedProject = true;
}
}
if(!empty($app->user->limitedUser) && $app->user->limitedUser === 'no' && !$limitedProject) return true;
if(!is_null($method) && strpos($method, 'batch') === 0) return false;
if(!is_null($method) && strpos($method, 'link') === 0) return false;
if(!is_null($method) && strpos($method, 'create') === 0) return false;
if(!is_null($method) && strpos($method, 'import') === 0) return false;
if(is_null($object)) return true;
if(!empty($object->openedBy) && $object->openedBy == $app->user->account ||
!empty($object->addedBy) && $object->addedBy == $app->user->account ||
!empty($object->assignedTo) && $object->assignedTo == $app->user->account ||
!empty($object->finishedBy) && $object->finishedBy == $app->user->account ||
!empty($object->canceledBy) && $object->canceledBy == $app->user->account ||
!empty($object->closedBy) && $object->closedBy == $app->user->account ||
!empty($object->lastEditedBy) && $object->lastEditedBy == $app->user->account)
{
return true;
}
return false;
}
+1 -1
View File
@@ -189,7 +189,7 @@ class company extends control
$this->view->projects = $projects;
/* Get users.*/
$users = $this->loadModel('user')->getPairs('noclosed');
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$users[''] = $this->lang->company->user;
$this->view->users = $users;
+1
View File
@@ -25,6 +25,7 @@ $lang->company->zipcode = 'Zip Code';
$lang->company->website = 'Website';
$lang->company->backyard = 'Intranet';
$lang->company->guest = 'Guest Login';
$lang->company->admins = 'Administrators';
$lang->company->product = $lang->productCommon;
$lang->company->project = $lang->projectCommon;
+1
View File
@@ -25,6 +25,7 @@ $lang->company->zipcode = '邮政编码';
$lang->company->website = '官网';
$lang->company->backyard = '内网';
$lang->company->guest = '匿名登录';
$lang->company->admins = '管理员';
$lang->company->product = $lang->productCommon;
$lang->company->project = $lang->projectCommon;
+1
View File
@@ -25,6 +25,7 @@ $lang->company->zipcode = '郵政編碼';
$lang->company->website = '官網';
$lang->company->backyard = '內網';
$lang->company->guest = '匿名登錄';
$lang->company->admins = '管理員';
$lang->company->product = $lang->productCommon;
$lang->company->project = $lang->projectCommon;
+25 -12
View File
@@ -12,8 +12,8 @@
class custom extends control
{
/**
* Index
*
* Index
*
* @access public
* @return void
*/
@@ -23,11 +23,11 @@ class custom extends control
}
/**
* Custom
*
* @param string $module
* @param string $field
* @param string $lang
* Custom
*
* @param string $module
* @param string $field
* @param string $lang
* @access public
* @return void
*/
@@ -49,9 +49,10 @@ class custom extends control
if(($module == 'story' or $module == 'testcase') and $field == 'review')
{
$this->app->loadConfig($module);
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
$this->view->needReview = zget($this->config->$module, 'needReview', 1);
$this->view->forceReview = zget($this->config->$module, 'forceReview', '');
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$this->view->needReview = zget($this->config->$module, 'needReview', 1);
$this->view->forceReview = zget($this->config->$module, 'forceReview', '');
$this->view->forceNotReview = zget($this->config->$module, 'forceNotReview', '');
}
if($module == 'task' and $field == 'hours')
{
@@ -72,12 +73,19 @@ class custom extends control
$this->view->blockPairs = $this->block->getClosedBlockPairs($closedBlock);
$this->view->closedBlock = $closedBlock;
}
if($module == 'user' and $field == 'deleted')
{
$this->loadModel('user');
$this->view->showDeleted = isset($this->config->user->showDeleted) ? $this->config->user->showDeleted : '0';
}
if(strtolower($_SERVER['REQUEST_METHOD']) == "post")
{
if(($module == 'story' or $module == 'testcase') and $field == 'review')
{
$data = fixer::input('post')->join('forceReview', ',')->get();
$review = fixer::input('post')->get();
if($review->needReview) $data = fixer::input('post')->join('forceNotReview', ',')->remove('forceReview')->get();
if(!$review->needReview) $data = fixer::input('post')->join('forceReview', ',')->remove('forceNotReview')->get();
$this->loadModel('setting')->setItems("system.$module", $data);
}
elseif($module == 'task' and $field == 'hours')
@@ -93,6 +101,11 @@ class custom extends control
$data = fixer::input('post')->join('closed', ',')->get();
$this->loadModel('setting')->setItem('system.block.closed', zget($data, 'closed', ''));
}
elseif($module == 'user' and $field == 'deleted')
{
$data = fixer::input('post')->get();
$this->loadModel('setting')->setItem('system.user.showDeleted', $data->showDeleted);
}
else
{
$lang = $_POST['lang'];
@@ -107,7 +120,7 @@ class custom extends control
/* Fix bug #942. */
if($field == 'priList' and !is_numeric($key)) die(js::alert($this->lang->custom->notice->priListKey));
if($module == 'bug' and $field == 'severityList' and !is_numeric($key)) die(js::alert($this->lang->custom->notice->severityListKey));
if($module == 'bug' and $field == 'resolutionList' and !empty($key) and !validater::checkCode($key)) die(js::alert($this->lang->custom->notice->resolutionList));
if(!empty($key) and $key != 'n/a' and !validater::checkCode($key)) die(js::alert($this->lang->custom->notice->keyList));
/* the length of role is 20, check it when save. */
if($module == 'user' and $field == 'roleList' and strlen($key) > 20) die(js::alert($this->lang->custom->notice->userRole));
+12 -3
View File
@@ -9,6 +9,10 @@ $lang->custom->flow = 'Process';
$lang->custom->working = 'Working';
$lang->custom->select = 'Select Process';
$lang->custom->branch = 'Multi Branch';
$lang->custom->owner = 'Owner';
$lang->custom->module = 'Module';
$lang->custom->section = 'Section';
$lang->custom->lang = 'Language';
$lang->custom->object['story'] = 'Story';
$lang->custom->object['task'] = 'Task';
@@ -63,8 +67,9 @@ $lang->custom->todo->fields['typeList'] = 'Type';
$lang->custom->todo->fields['statusList'] = 'Status';
$lang->custom->user = new stdClass();
$lang->custom->user->fields['roleList'] = 'Role';
$lang->custom->user->fields['statusList'] = 'Status';
$lang->custom->user->fields['roleList'] = 'Role';
$lang->custom->user->fields['statusList'] = 'Status';
$lang->custom->user->fields['deleted'] = 'Show deleted user';
$lang->custom->block->fields['closed'] = 'Closed Block';
@@ -77,9 +82,10 @@ $lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = 'Key must be no more than 20 characters!';
$lang->custom->notice->canNotAdd = 'This item will be processed, so customized feature is not enabled.';
$lang->custom->notice->forceReview = 'Review is required for %s submitted by certain assignee.';
$lang->custom->notice->forceNotReview = "Not review is required for %s submitted by certain assignee.";
$lang->custom->notice->longlife = 'List "Undone" bugs that are older than hold days from "Longlife" bugs.';
$lang->custom->notice->priListKey = 'Priority list key should be numbers!';
$lang->custom->notice->resolutionList = 'Solution list key should be English or digital!';
$lang->custom->notice->keyList = 'key should be English or digital!';
$lang->custom->notice->severityListKey = 'Bug severity list key should be numbers.';
$lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Homepage. Do you want to enter Product Homepage?";
$lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Homepage. Do you want to enter Project Homepage?";
@@ -90,6 +96,9 @@ $lang->custom->forceReview = 'Review Required';
$lang->custom->reviewList[1] = 'On';
$lang->custom->reviewList[0] = 'Off';
$lang->custom->deletedList[1] = 'Show';
$lang->custom->deletedList[0] = 'Not Show';
$lang->custom->workingHours = 'Man-Hour/Day';
$lang->custom->weekend = 'Weekend';
$lang->custom->weekendList[2] = '2-Day Off';
+15 -5
View File
@@ -9,6 +9,10 @@ $lang->custom->flow = '流程';
$lang->custom->working = '工作方式';
$lang->custom->select = '请选择流程:';
$lang->custom->branch = '多分支';
$lang->custom->owner = '所有者';
$lang->custom->module = '模块';
$lang->custom->section = '附加部分';
$lang->custom->lang = '所属语言';
$lang->custom->object['story'] = '需求';
$lang->custom->object['task'] = '任务';
@@ -65,6 +69,7 @@ $lang->custom->todo->fields['statusList'] = '状态';
$lang->custom->user = new stdClass();
$lang->custom->user->fields['roleList'] = '职位';
$lang->custom->user->fields['statusList'] = '状态';
$lang->custom->user->fields['deleted'] = '列出已删除用户';
$lang->custom->block->fields['closed'] = '关闭的区块';
@@ -77,18 +82,23 @@ $lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = '键的长度必须小于20个字符!';
$lang->custom->notice->canNotAdd = '该项参与运算,不提供自定义添加功能';
$lang->custom->notice->forceReview = "指定人提交的%s必须评审。";
$lang->custom->notice->forceNotReview = "指定人提交的%s不需要评审。";
$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。';
$lang->custom->notice->priListKey = '优先级的键应当为数字!';
$lang->custom->notice->resolutionList = '解决方案的键值应当为英文或数字';
$lang->custom->notice->keyList = '键值应当为英文或数字';
$lang->custom->notice->severityListKey = 'Bug严重程度的键应当为数字!';
$lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?";
$lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?";
$lang->custom->notice->indexPage['qa'] = "从8.2版本起增加了测试主页视图,是否默认进入测试主页?";
$lang->custom->storyReview = '评审流程';
$lang->custom->forceReview = '强制评审';
$lang->custom->reviewList[1] = '开启';
$lang->custom->reviewList[0] = '关闭';
$lang->custom->storyReview = '评审流程';
$lang->custom->forceReview = '强制评审';
$lang->custom->forceNotReview = '不需要评审';
$lang->custom->reviewList[1] = '开启';
$lang->custom->reviewList[0] = '关闭';
$lang->custom->deletedList[1] = '列出';
$lang->custom->deletedList[0] = '不列出';
$lang->custom->workingHours = '每天可用工时';
$lang->custom->weekend = '休息日';
+6 -1
View File
@@ -9,6 +9,10 @@ $lang->custom->flow = '流程';
$lang->custom->working = '工作方式';
$lang->custom->select = '請選擇流程:';
$lang->custom->branch = '多分支';
$lang->custom->owner = '所有者';
$lang->custom->module = '模組';
$lang->custom->section = '附加部分';
$lang->custom->lang = '所屬語言';
$lang->custom->object['story'] = '需求';
$lang->custom->object['task'] = '任務';
@@ -78,8 +82,9 @@ $lang->custom->notice->userRole = '鍵的長度必須小於20個字
$lang->custom->notice->canNotAdd = '該項參與運算,不提供自定義添加功能';
$lang->custom->notice->forceReview = "指定人提交的%s必須評審。";
$lang->custom->notice->longlife = 'Bug列表頁面的久未處理標籤中,列出設置天數之前未處理的Bug。';
$lang->custom->notice->forceNotReview = "指定人提交的%s不需要評審。";
$lang->custom->notice->priListKey = '優先順序的鍵應當為數字!';
$lang->custom->notice->resolutionList = '解決方案的鍵值應當為英文或數字';
$lang->custom->notice->keyList = '鍵值應當為英文或數字';
$lang->custom->notice->severityListKey = 'Bug嚴重程度的鍵應當為數字!';
$lang->custom->notice->indexPage['product'] = "從8.2版本起增加了產品主頁視圖,是否預設進入產品主頁?";
$lang->custom->notice->indexPage['project'] = "從8.2版本起增加了項目主頁視圖,是否預設進入項目主頁?";
+21 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php
<?php
$itemRow = <<<EOT
<tr class='text-center'>
<td>
@@ -76,6 +76,13 @@ EOT;
<td><?php echo html::select('forceReview[]', $users, $forceReview, "class='form-control chosen' multiple");?></td>
<td class='w-180px'><?php printf($lang->custom->notice->forceReview, $lang->$module->common);?></td>
</tr>
<?php if($module == 'testcase'):?>
<tr <?php if(!$needReview) echo "class='hidden'"?>>
<th><?php echo $lang->custom->forceNotReview;?></th>
<td><?php echo html::select('forceNotReview[]', $users, $forceNotReview, "class='form-control chosen' multiple");?></td>
<td class='w-180px'><?php printf($lang->custom->notice->forceNotReview, $lang->$module->common);?></td>
</tr>
<?php endif;?>
<tr>
<td></td>
<td><?php echo html::submitButton();?></td>
@@ -122,6 +129,17 @@ EOT;
<td><?php echo html::submitButton();?></td>
</tr>
</table>
<?php elseif($module == 'user' and $field == 'deleted'):?>
<table class='table table-form mw-600px'>
<tr>
<th class='w-100px'><?php echo $lang->custom->user->fields['deleted'];?></th>
<td><?php echo html::radio('showDeleted', $lang->custom->deletedList, $showDeleted);?></td>
</tr>
<tr>
<td></td>
<td><?php echo html::submitButton();?></td>
</tr>
</table>
<?php else:?>
<table class='table table-form active-disabled table-condensed mw-600px'>
<tr class='text-center'>
@@ -171,10 +189,12 @@ $(function()
if($(this).val() == 0)
{
$('#forceReview').closest('tr').removeClass('hidden');
$('#forceNotReview').closest('tr').addClass('hidden');
}
else
{
$('#forceReview').closest('tr').addClass('hidden');
$('#forceNotReview').closest('tr').removeClass('hidden');
}
})
})
+2 -2
View File
@@ -40,8 +40,8 @@ class datatableModel extends model
/**
* Get save setting field.
*
* @param string $module
*
* @param string $module
* @access public
* @return object
*/
+1 -1
View File
@@ -91,7 +91,7 @@ class dept extends control
}
$dept = $this->dept->getById($deptID);
$users = $this->loadModel('user')->getPairs('noletter|noclosed');
$users = $this->loadModel('user')->getPairs('noletter|noclosed|nodeleted|all');
$this->view->optionMenu = $this->dept->getOptionMenu();
+1 -1
View File
@@ -423,7 +423,7 @@ class deptModel extends model
public function getDataStructure($rootDeptID = 0)
{
$tree = array_values($this->getSons($rootDeptID));
$users = $this->loadModel('user')->getPairs('noletter|noclosed');
$users = $this->loadModel('user')->getPairs('noletter|noclosed|nodeleted');
if(count($tree))
{
foreach ($tree as $node)
+4 -6
View File
@@ -16,13 +16,11 @@ $jsRoot = $webRoot . "js/";
?>
<?php include '../../common/view/chosen.html.php';?>
<div class='modal-dialog w-500px'>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title"><strong><small class='text-muted'><?php echo html::icon($lang->icons['edit']);?></small> <?php echo $lang->dept->edit;?></strong></h4>
</div>
<div class='modal-body'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['tree']);?></span>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['edit']);?></small> <?php echo $lang->dept->edit;?></strong>
</div>
</div>
<form action="<?php echo inlink('edit', 'deptID=' . $dept->id);?>" target='hiddenwin' class='form-condensed' method='post' class='mt-10px' id='dataform'>
<table class='table table-form' style='width:100%'>
<tr>
+26
View File
@@ -25,6 +25,7 @@ $config->dev->group['testreport'] = 'qa';
$config->dev->group['testsuite'] = 'qa';
$config->dev->group['testresult'] = 'qa';
$config->dev->group['testrun'] = 'qa';
$config->dev->group['suitecase'] = 'qa';
$config->dev->group['doc'] = 'doc';
$config->dev->group['doccontent'] = 'doc';
$config->dev->group['doclib'] = 'doc';
@@ -48,3 +49,28 @@ $config->dev->group['mail'] = 'admin';
$config->dev->group['backup'] = 'admin';
$config->dev->group['cron'] = 'admin';
$config->dev->group['dev'] = 'admin';
$config->dev->tableMap['storyspec'] = 'story';
$config->dev->tableMap['storystage'] = 'story';
$config->dev->tableMap['burn'] = 'task';
$config->dev->tableMap['projectproduct'] = 'project';
$config->dev->tableMap['projectstory'] = 'story';
$config->dev->tableMap['taskestimate'] = 'task';
$config->dev->tableMap['team'] = 'project';
$config->dev->tableMap['case'] = 'testcase';
$config->dev->tableMap['casestep'] = 'testcase';
$config->dev->tableMap['testresult'] = 'testtask';
$config->dev->tableMap['testrun'] = 'testtask';
$config->dev->tableMap['doccontent'] = 'doc';
$config->dev->tableMap['doclib'] = 'doc';
$config->dev->tableMap['grouppriv'] = 'group';
$config->dev->tableMap['usercontact'] = 'user-contacts';
$config->dev->tableMap['usergroup'] = 'user';
$config->dev->tableMap['userquery'] = 'search';
$config->dev->tableMap['usertpl'] = 'user-tpl';
$config->dev->tableMap['history'] = 'action-history';
$config->dev->tableMap['lang'] = 'custom';
$config->dev->tableMap['config'] = 'custom';
$config->dev->tableMap['mailqueue'] = 'mail';
$config->dev->tableMap['module'] = 'tree';
$config->dev->tableMap['suitecase'] = 'testcase';
+1
View File
@@ -89,6 +89,7 @@ $lang->dev->tableList['branch'] = 'Branch';
$lang->dev->tableList['doccontent'] = 'Doc Content';
$lang->dev->tableList['storystage'] = 'Story Stage';
$lang->dev->tableList['tutorial'] = 'Tutorial';
$lang->dev->tableList['suitecase'] = 'Suite Case';
$lang->dev->groupList['my'] = 'Dashboard';
$lang->dev->groupList['product'] = $lang->productCommon;
+1
View File
@@ -89,6 +89,7 @@ $lang->dev->tableList['branch'] = '平台/分支';
$lang->dev->tableList['doccontent'] = '文档内容';
$lang->dev->tableList['storystage'] = '需求阶段';
$lang->dev->tableList['tutorial'] = '新手教程';
$lang->dev->tableList['suitecase'] = '套件用例';
$lang->dev->groupList['my'] = '我的地盘';
$lang->dev->groupList['product'] = $lang->productCommon;
+1
View File
@@ -89,6 +89,7 @@ $lang->dev->tableList['branch'] = '平台/分支';
$lang->dev->tableList['doccontent'] = '文檔內容';
$lang->dev->tableList['storystage'] = '需求階段';
$lang->dev->tableList['tutorial'] = '新手教程';
$lang->dev->tableList['suitecase'] = '套件用例';
$lang->dev->groupList['my'] = '我的地盤';
$lang->dev->groupList['product'] = $lang->productCommon;
+9 -3
View File
@@ -35,11 +35,13 @@ class devModel extends model
*/
public function getFields($table)
{
$module = substr($table, strpos($table, '_') + 1);
$module = substr($table, strpos($table, '_') + 1);
$aliasModule = $subLang = '';
try
{
if($module == 'case') $module = 'testcase';
$this->app->loadLang($module);
if(isset($this->config->dev->tableMap[$module])) $aliasModule = $this->config->dev->tableMap[$module];
if(strpos($aliasModule, '-') !== false) list($aliasModule, $subLang) = explode('-', $aliasModule);
$this->app->loadLang($aliasModule ? $aliasModule : $module);
}
catch(PDOException $e)
{
@@ -57,6 +59,7 @@ class devModel extends model
{
$this->sqlError($e);
}
foreach($rawFields as $rawField)
{
$firstPOS = strpos($rawField->type, '(');
@@ -64,6 +67,9 @@ class devModel extends model
$type = str_replace(array('big', 'small', 'medium', 'tiny'), '', $type);
$field = array();
$field['name'] = isset($this->lang->$module->{$rawField->field}) ? $this->lang->$module->{$rawField->field} : '';
if(empty($field['name']) and $aliasModule) $field['name'] = isset($this->lang->$aliasModule->{$rawField->field}) ? $this->lang->$aliasModule->{$rawField->field} : '';
if($subLang) $field['name'] = isset($this->lang->$aliasModule->$subLang->{$rawField->field}) ? $this->lang->$aliasModule->$subLang->{$rawField->field} : $field['name'];
if(!is_string($field['name'])) $field['name'] = '';
$field['null'] = $rawField->null;
if($type == 'enum' or $type == 'set')
+5 -7
View File
@@ -13,7 +13,7 @@ class doc extends control
{
/**
* Construct function, load user, tree, action auto.
*
*
* @access public
* @return void
*/
@@ -223,7 +223,7 @@ class doc extends control
}
die(js::locate($this->createLink($this->moduleName, 'browse', "libID=$libID"), 'parent.parent'));
}
$lib = $this->doc->getLibByID($libID);
if(!empty($lib->product)) $this->view->product = $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->eq($lib->product)->fetch();
if(!empty($lib->project)) $this->view->project = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->eq($lib->project)->fetch();
@@ -259,7 +259,7 @@ class doc extends control
die(js::locate($this->createLink('doc', 'browse'), 'parent'));
}
}
/**
* Create a doc.
*
@@ -382,8 +382,8 @@ class doc extends control
/**
* View a doc.
*
* @param int $docID
*
* @param int $docID
* @access public
* @return void
*/
@@ -655,8 +655,6 @@ class doc extends control
$this->view->viewType = $viewType;
$this->view->orderBy = $orderBy;
$this->view->objectID = $objectID;
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->display();
}
+4
View File
@@ -40,6 +40,9 @@ $lang->doc->filePath = 'File Path';
$lang->doc->extension = 'Extension';
$lang->doc->size = 'Size';
$lang->doc->download = 'Download';
$lang->doc->acl = 'Right';
$lang->doc->groups = 'Groups';
$lang->doc->users = 'Users';
$lang->doc->moduleDoc = 'By Module';
$lang->doc->searchDoc = 'By Search';
@@ -107,6 +110,7 @@ $lang->doc->browseType = 'Categories';
$lang->doc->browseTypeList['list'] = 'List';
$lang->doc->browseTypeList['menu'] = 'Menu';
$lang->doc->browseTypeList['tree'] = 'Tree';
$lang->doc->browseTypeList['card'] = 'Card';
$lang->doc->confirmDelete = "Do you want to delete this document?";
$lang->doc->confirmDeleteLib = "Do you want to delete this Doc Lib?";
+4
View File
@@ -40,6 +40,9 @@ $lang->doc->filePath = '地址';
$lang->doc->extension = '类型';
$lang->doc->size = '大小';
$lang->doc->download = '下载';
$lang->doc->acl = '权限';
$lang->doc->groups = '分组';
$lang->doc->users = '用户';
$lang->doc->moduleDoc = '按模块浏览';
$lang->doc->searchDoc = '搜索';
@@ -107,6 +110,7 @@ $lang->doc->browseType = '浏览方式';
$lang->doc->browseTypeList['list'] = '列表';
$lang->doc->browseTypeList['menu'] = '目录';
$lang->doc->browseTypeList['tree'] = '树状图';
$lang->doc->browseTypeList['card'] = '卡片';
$lang->doc->confirmDelete = "您确定删除该文档吗?";
$lang->doc->confirmDeleteLib = "您确定删除该文档库吗?";
+4
View File
@@ -40,6 +40,9 @@ $lang->doc->filePath = '地址';
$lang->doc->extension = '類型';
$lang->doc->size = '大小';
$lang->doc->download = '下載';
$lang->doc->acl = '權限';
$lang->doc->groups = '分組';
$lang->doc->users = '用戶';
$lang->doc->moduleDoc = '按模組瀏覽';
$lang->doc->searchDoc = '搜索';
@@ -107,6 +110,7 @@ $lang->doc->browseType = '瀏覽方式';
$lang->doc->browseTypeList['list'] = '列表';
$lang->doc->browseTypeList['menu'] = '目錄';
$lang->doc->browseTypeList['tree'] = '樹狀圖';
$lang->doc->browseTypeList['card'] = '卡片';
$lang->doc->confirmDelete = "您確定刪除該文檔嗎?";
$lang->doc->confirmDeleteLib = "您確定刪除該文檔庫嗎?";
+17 -2
View File
@@ -70,8 +70,8 @@ class docModel extends model
$selectHtml .= "<div id='libMenu'>";
$selectHtml .= "<div id='libMenuHeading'><input id='searchLib' type='search' placeholder='{$this->lang->doc->searchDoc}' class='form-control'></div>";
$selectHtml .= "<div id='libMenuGroups' class='clearfix'>";
if($this->config->global->flow != 'onlyTask') $selectHtml .= "<div class='lib-menu-group' id='libMenuProductGroup'><div class='lib-menu-list-heading' data-type='product'>{$this->lang->doc->libTypeList['product']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
if($this->config->global->flow != 'onlyStory' and $this->config->global->flow != 'onlyTest') $selectHtml .= "<div class='lib-menu-group' id='libMenuProjectGroup'><div class='lib-menu-list-heading' data-type='project'>{$this->lang->doc->libTypeList['project']}<i class='icon icon-remove'></i></div><div class='lib-menu-project-done'>{$this->lang->project->statusList['done']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
if($this->config->global->flow != 'onlyTask' and isset($this->lang->doc->libTypeList['product'])) $selectHtml .= "<div class='lib-menu-group' id='libMenuProductGroup'><div class='lib-menu-list-heading' data-type='product'>{$this->lang->doc->libTypeList['product']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
if($this->config->global->flow != 'onlyStory' and $this->config->global->flow != 'onlyTest' and isset($this->lang->doc->libTypeList['project'])) $selectHtml .= "<div class='lib-menu-group' id='libMenuProjectGroup'><div class='lib-menu-list-heading' data-type='project'>{$this->lang->doc->libTypeList['project']}<i class='icon icon-remove'></i></div><div class='lib-menu-project-done'>{$this->lang->project->statusList['done']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
$selectHtml .= "<div class='lib-menu-group' id='libMenuCustomGroup'><div class='lib-menu-list-heading' data-type='custom'>{$this->lang->doc->libTypeList['custom']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
$selectHtml .= "</div></div></div>";
common::setMenuVars($this->lang->doc->menu, 'list', $selectHtml);
@@ -1158,4 +1158,19 @@ class docModel extends model
return $teams;
}
/**
* Judge an action is clickable or not.
*-
* @param object $product-
* @param string $action-
* @access public
* @return void
*/
public static function isClickable($doc, $action)
{
if(!common::limitedUser($doc)) return false;
return true;
}
}
+1 -1
View File
@@ -51,7 +51,7 @@
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php else: ?>
<?php elseif($libs): ?>
<div class='clearfix libs-group libs-custom <?php if(common::hasPriv('doc', 'sort')) echo 'sort'?>'>
<?php foreach($libs as $lib):?>
<a class='lib lib-custom' title='<?php echo $lib->name?>' href='<?php echo inlink('browse', "libID=$lib->id") ?>' data-id='<?php echo $lib->id;?>'>
+2 -2
View File
@@ -93,8 +93,8 @@ var browseType = '<?php echo $browseType;?>';
<td><?php echo substr($doc->editedDate, 5, 11);?></td>
<td>
<?php
common::printIcon('doc', 'edit', "doc={$doc->id}", '', 'list');
if(common::hasPriv('doc', 'delete'))
common::printIcon('doc', 'edit', "doc={$doc->id}", $doc, 'list');
if(common::hasPriv('doc', 'delete', $doc))
{
$deleteURL = $this->createLink('doc', 'delete', "docID=$doc->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"docList\",confirmDelete)", '<i class="icon-remove"></i>', '', "class='btn-icon' title='{$lang->doc->delete}'");
+48 -53
View File
@@ -28,72 +28,67 @@
echo html::hidden('pageID', isset($this->get->pageID) ? $this->get->pageID : 0);
}
?>
<div class='input-group input-group-sm'>
<div class='input-group input-group-sm w-200px'>
<?php echo html::input('title', $this->get->title, "class='form-control search-query' placeholder='{$lang->doc->fileTitle}'");?>
<span class='input-group-btn'>
<?php echo html::submitButton($lang->doc->search);?>
</span>
</div>
</form>
<?php echo html::backButton();?>
<div class='text-right pull-right'>
<?php
$changeType = "type=$type&objectID=$objectID&viewType=" . ($viewType == 'list' ? 'card' : 'list');
echo html::a(inLink('showFiles', $changeType), "<i class='icon icon-th-list icon-4x'></i> 切换界面布局");
?>
<div class="btn-group">
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class='icon <?php echo $viewType == 'list' ? 'icon-list' : 'icon-th'?>'></i> <?php echo $lang->doc->browseTypeList[$viewType]?> <span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<li><?php echo html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=card"), "<i class='icon icon-th'></i> {$lang->doc->browseTypeList['card']}");?></li>
<li><?php echo html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=list"), "<i class='icon icon-list'></i> {$lang->doc->browseTypeList['list']}");?></li>
</ul>
</div>
<?php echo html::backButton();?>
</div>
</div>
<?php if($viewType == 'list'):?>
<form method='post' id='ajaxForm'>
<table class='table table-hover table-striped tablesorter table-fixed' id='orderList'>
<thead>
<?php $vars = "type=$type&objectID=$objectID&viewType=list&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage";?>
<tr class='text-center'>
<th class='w-80px'> <?php common::printOrderLink('t1.id', $orderBy, $vars, $lang->doc->id);?> </th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->doc->fileTitle);?> </th>
<th> <?php common::printOrderLink('pathname', $orderBy, $vars, $lang->doc->filePath);?> </th>
<th class='w-60px'> <?php common::printOrderLink('extension', $orderBy, $vars, $lang->doc->extension);?> </th>
<th class='w-80px'> <?php common::printOrderLink('size', $orderBy, $vars, $lang->doc->size);?> </th>
<th class='w-100px'> <?php common::printOrderLink('addedBy', $orderBy, $vars, $lang->doc->addedBy);?> </th>
<th class='w-160px'> <?php common::printOrderLink('addedDate', $orderBy, $vars, $lang->doc->addedDate);?> </th>
<th class='w-80px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($files as $file):?>
<?php if(empty($file->pathname)) continue;?>
<tr class='text-center text-middle'>
<td>
<?php echo $file->id;?>
</td>
<td class='text-left'>
<?php echo $file->title;?>
</td>
<td class='text-left'> <?php echo $file->pathname;?> </td>
<td><?php echo $file->extension;?></td>
<td><?php echo number_format($file->size / 1024 , 1) . 'K';?></td>
<td><?php echo isset($file->addedBy) ? $file->addedBy : '';?></td>
<td><?php echo isset($file->addedDate) ? substr($file->addedDate, 0, 10) : '';?></td>
<td class='text-center'>
<?php
common::printLink('file', 'download', "fileID=$file->id", $lang->doc->download, "data-toggle='modal'");
common::printLink('file', 'delete', "fileID=$file->id", $lang->delete, 'hiddenwin');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='8'>
<?php $pager->show();?>
<table class='table table-hover table-striped tablesorter table-fixed' id='orderList'>
<thead>
<?php $vars = "type=$type&objectID=$objectID&viewType=list&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage";?>
<tr class='text-center'>
<th class='w-80px'> <?php common::printOrderLink('t1.id', $orderBy, $vars, $lang->doc->id);?> </th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->doc->fileTitle);?> </th>
<th> <?php common::printOrderLink('pathname', $orderBy, $vars, $lang->doc->filePath);?> </th>
<th class='w-60px'> <?php common::printOrderLink('extension', $orderBy, $vars, $lang->doc->extension);?> </th>
<th class='w-80px'> <?php common::printOrderLink('size', $orderBy, $vars, $lang->doc->size);?> </th>
<th class='w-100px'> <?php common::printOrderLink('addedBy', $orderBy, $vars, $lang->doc->addedBy);?> </th>
<th class='w-160px'> <?php common::printOrderLink('addedDate', $orderBy, $vars, $lang->doc->addedDate);?> </th>
<th class='w-80px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($files as $file):?>
<?php if(empty($file->pathname)) continue;?>
<tr class='text-center text-middle'>
<td><?php echo $file->id;?></td>
<td class='text-left'>
<a href='<?php echo $this->createLink($file->objectType, 'view', "objectID=$file->objectID");?>'><?php echo $file->title . '.' . $file->extension . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?></a>
</td>
<td class='text-left'> <?php echo $file->pathname;?> </td>
<td><?php echo $file->extension;?></td>
<td><?php echo number_format($file->size / 1024 , 1) . 'K';?></td>
<td><?php echo isset($file->addedBy) ? $file->addedBy : '';?></td>
<td><?php echo isset($file->addedDate) ? substr($file->addedDate, 0, 10) : '';?></td>
<td class='text-center'>
<?php
common::printLink('file', 'download', "fileID=$file->id", $lang->doc->download, "data-toggle='modal'", '', true, false, $file);
common::printLink('file', 'delete', "fileID=$file->id", $lang->delete, 'hiddenwin', '', true, false, $file);
?>
</td>
</tr>
</tfoot>
</table>
</form>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='8'> <?php $pager->show();?> </td>
</tr>
</tfoot>
</table>
<?php else:?>
<div class='lib-files cards'>
<?php foreach($files as $file):?>
+3 -3
View File
@@ -68,9 +68,9 @@
{
ob_start();
echo "<div class='btn-group'>";
common::printCommentIcon('doc');
common::printIcon('doc', 'edit', $params);
common::printIcon('doc', 'delete', $params, '', 'button', '', 'hiddenwin');
common::printCommentIcon('doc', $doc);
common::printIcon('doc', 'edit', $params, $doc);
common::printIcon('doc', 'delete', $params, $doc, 'button', '', 'hiddenwin');
echo '</div>';
echo "<div class='btn-group'>";
common::printRPN($browseLink, $preAndNext);
+12 -1
View File
@@ -30,8 +30,14 @@ $lang->extension->installed = 'Installed';
$lang->extension->deactivated = 'Deactivated';
$lang->extension->available = 'Downloaded';
$lang->extension->name = 'Extension Name';
$lang->extension->code = 'Code';
$lang->extension->desc = 'Describe';
$lang->extension->type = 'Type';
$lang->extension->dirs = 'Directories';
$lang->extension->files = 'Files';
$lang->extension->status = 'Status';
$lang->extension->version = 'Version';
$lang->extension->compatible = 'Compatible';
$lang->extension->latest = '<small>Latest:<strong><a href="%s" target="_blank" class="extension">%s</a></strong>,need zentao <a href="http://api.zentao.net/goto.php?item=latest" target="_blank"><strong>%s</strong></small>';
$lang->extension->author = 'Author';
$lang->extension->license = 'License';
@@ -40,6 +46,8 @@ $lang->extension->downloads = 'Downloads';
$lang->extension->compatible = 'Compatibility';
$lang->extension->grade = 'Score';
$lang->extension->depends = 'Dependent';
$lang->extension->zentaoCompatible = 'Compatible Version';
$lang->extension->installedTime = 'Installed Time';
$lang->extension->publicList[0] = 'Manually';
$lang->extension->publicList[1] = 'Auto';
@@ -47,6 +55,9 @@ $lang->extension->publicList[1] = 'Auto';
$lang->extension->compatibleList[0] = 'Unknown';
$lang->extension->compatibleList[1] = 'Compatible';
$lang->extension->obtainOfficial[0] = 'Third party';
$lang->extension->obtainOfficial[1] = 'Official';
$lang->extension->byDownloads = 'Downloads';
$lang->extension->byAddedTime = 'Latest Added';
$lang->extension->byUpdatedTime = 'Latest Update';
+12 -1
View File
@@ -30,8 +30,14 @@ $lang->extension->installed = '已安装';
$lang->extension->deactivated = '被禁用';
$lang->extension->available = '已下载';
$lang->extension->name = '插件名称';
$lang->extension->code = '代号';
$lang->extension->desc = '描述';
$lang->extension->type = '类型';
$lang->extension->dirs = '安装目录';
$lang->extension->files = '安装文件';
$lang->extension->status = '状态';
$lang->extension->version = '版本';
$lang->extension->compatible = '适用版本';
$lang->extension->latest = '<small>最新版本<strong><a href="%s" target="_blank" class="extension">%s</a></strong>,兼容禅道<a href="http://api.zentao.net/goto.php?item=latest" target="_blank" class="alert-link"><strong>%s</strong></a></small>';
$lang->extension->author = '作者';
$lang->extension->license = '授权';
@@ -40,6 +46,8 @@ $lang->extension->downloads = '下载量';
$lang->extension->compatible = '兼容性';
$lang->extension->grade = '评分';
$lang->extension->depends = '依赖';
$lang->extension->zentaoCompatible = '适用版本';
$lang->extension->installedTime = '安装时间';
$lang->extension->publicList[0] = '手工下载';
$lang->extension->publicList[1] = '直接下载';
@@ -47,6 +55,9 @@ $lang->extension->publicList[1] = '直接下载';
$lang->extension->compatibleList[0] = '未知';
$lang->extension->compatibleList[1] = '兼容';
$lang->extension->obtainOfficial[0] = '第三方';
$lang->extension->obtainOfficial[1] = '官方';
$lang->extension->byDownloads = '最多下载';
$lang->extension->byAddedTime = '最新添加';
$lang->extension->byUpdatedTime = '最近更新';
+12 -1
View File
@@ -30,8 +30,14 @@ $lang->extension->installed = '已安裝';
$lang->extension->deactivated = '被禁用';
$lang->extension->available = '已下載';
$lang->extension->name = '插件名稱';
$lang->extension->code = '代號';
$lang->extension->desc = '描述';
$lang->extension->type = '類型';
$lang->extension->dirs = '安裝目錄';
$lang->extension->files = '安裝檔案';
$lang->extension->status = '狀態';
$lang->extension->version = '版本';
$lang->extension->compatible = '適用版本';
$lang->extension->latest = '<small>最新版本<strong><a href="%s" target="_blank" class="extension">%s</a></strong>,兼容禪道<a href="http://api.zentao.net/goto.php?item=latest" target="_blank" class="alert-link"><strong>%s</strong></a></small>';
$lang->extension->author = '作者';
$lang->extension->license = '授權';
@@ -40,6 +46,8 @@ $lang->extension->downloads = '下載量';
$lang->extension->compatible = '兼容性';
$lang->extension->grade = '評分';
$lang->extension->depends = '依賴';
$lang->extension->zentaoCompatible = '適用版本';
$lang->extension->installedTime = '安裝時間';
$lang->extension->publicList[0] = '手工下載';
$lang->extension->publicList[1] = '直接下載';
@@ -47,6 +55,9 @@ $lang->extension->publicList[1] = '直接下載';
$lang->extension->compatibleList[0] = '未知';
$lang->extension->compatibleList[1] = '兼容';
$lang->extension->obtainOfficial[0] = '第三方';
$lang->extension->obtainOfficial[1] = '官方';
$lang->extension->byDownloads = '最多下載';
$lang->extension->byAddedTime = '最新添加';
$lang->extension->byUpdatedTime = '最近更新';
+6 -3
View File
@@ -38,7 +38,7 @@
<?php if($extensions):?>
<div class='cards pd-0 mg-0'>
<?php foreach($extensions as $extension):?>
<?php
<?php
$currentRelease = $extension->currentRelease;
$latestRelease = isset($extension->latestRelease) ? $extension->latestRelease : '';
?>
@@ -51,7 +51,10 @@
printf($lang->extension->latest, $latestRelease->viewLink, $latestRelease->releaseVersion, $latestRelease->zentaoCompatible);
}?>
</small>
<h5 class='mg-0'><?php echo $extension->name . "($currentRelease->releaseVersion)";?></h5>
<h5 class='mg-0'>
<?php echo $extension->name . "($currentRelease->releaseVersion)";?>
<small class='label <?php echo $extension->offcial ? 'label-info' : 'label-warning';?>'><?php echo $lang->extension->obtainOfficial[$extension->offcial];?></small>
</h5>
</div>
<div class='card-content text-muted'>
<?php echo $extension->abstract;?>
@@ -62,7 +65,7 @@
echo "{$lang->extension->author}: {$extension->author} ";
echo "{$lang->extension->downloads}: {$extension->downloads} ";
echo "{$lang->extension->compatible}: {$lang->extension->compatibleList[$currentRelease->compatible]} ";
echo " {$lang->extension->depends}: ";
if(!empty($currentRelease->depends))
{
+9
View File
@@ -30,6 +30,15 @@ $lang->file->addFile = 'Add File';
$lang->file->beginUpload = 'Start uploading';
$lang->file->uploadSuccess = 'uploaded Successfully';
$lang->file->pathname = 'Path Name';
$lang->file->title = 'Title';
$lang->file->extension = 'Extension';
$lang->file->size = 'Size';
$lang->file->addedBy = 'Added By';
$lang->file->addedDate = 'Added Date';
$lang->file->downloads = 'Downloads';
$lang->file->extra = 'Extra';
$lang->file->dragFile = 'Please drag here.';
$lang->file->errorNotExists = "<span class='red'>'%s' is not found.</span>";
$lang->file->errorCanNotWrite = "<span class='red'>'%s' is not writable. Please change its permission. Enter sudo chmod -R 777 '%s'</span> in Linux.";
+9
View File
@@ -30,6 +30,15 @@ $lang->file->addFile = '添加文件';
$lang->file->beginUpload = '开始上传';
$lang->file->uploadSuccess = '上传成功';
$lang->file->pathname = '路径';
$lang->file->title = '标题';
$lang->file->extension = '扩展名';
$lang->file->size = '大小';
$lang->file->addedBy = '由谁添加';
$lang->file->addedDate = '添加时间';
$lang->file->downloads = '下载次数';
$lang->file->extra = '备注';
$lang->file->dragFile = '请拖拽文件到此处';
$lang->file->errorNotExists = "<span class='red'>文件夹 '%s' 不存在</span>";
$lang->file->errorCanNotWrite = "<span class='red'>文件夹 '%s' 不可写,请改变文件夹的权限。在linux中输入指令:sudo chmod -R 777 %s</span>";
+11 -2
View File
@@ -30,9 +30,18 @@ $lang->file->addFile = '添加檔案';
$lang->file->beginUpload = '開始上傳';
$lang->file->uploadSuccess = '上傳成功';
$lang->file->pathname = '路徑';
$lang->file->title = '標題';
$lang->file->extension = '副檔名';
$lang->file->size = '大小';
$lang->file->addedBy = '由誰添加';
$lang->file->addedDate = '添加時間';
$lang->file->downloads = '下載次數';
$lang->file->extra = '備註';
$lang->file->dragFile = '請拖拽檔案到此處';
$lang->file->errorNotExists = "<span class='red'>檔案夾 '%s' 不存在</span>";
$lang->file->errorCanNotWrite = "<span class='red'>檔案夾 '%s' 不可寫,請改變檔案夾的權限。在linux中輸入指令:sudo chmod -R 777 '%s'</span>";
$lang->file->errorCanNotWrite = "<span class='red'>檔案夾 '%s' 不可寫,請改變檔案夾的權限。在linux中輸入指令:sudo chmod -R 777 %s</span>";
$lang->file->confirmDelete = " 您確定刪除該附件嗎?";
$lang->file->errorFileSize = " 檔案大小已經超過限制,可能不能成功上傳!";
$lang->file->errorFileUpload = " 檔案上傳失敗,檔案大小可能超出限制";
@@ -41,4 +50,4 @@ $lang->file->errorFileMove = " 檔案上傳失敗,移動檔案時出錯";
$lang->file->dangerFile = " 您選擇的檔案存在安全風險,系統將不予上傳。";
$lang->file->errorSuffix = '壓縮包格式錯誤,只能上傳zip壓縮包!';
$lang->file->errorExtract = '解壓縮失敗!可能檔案已經損壞,或壓縮包裡含有非法上傳檔案。';
$lang->file->uploadImagesExplain = '註:請上傳"jpg|jpeg|gif|png"格式的圖片,程序會以檔案名作為標題,以圖片作為內容。';
$lang->file->uploadImagesExplain = '註:請上傳"jpg, jpeg, gif, png"格式的圖片,程序會以檔案名作為標題,以圖片作為內容。';
+2
View File
@@ -32,6 +32,8 @@ $lang->group->noticeVisit = 'N/A means access is not restricted.';
$lang->group->id = 'ID';
$lang->group->name = 'Name';
$lang->group->desc = 'Description';
$lang->group->role = 'Role';
$lang->group->acl = 'Right';
$lang->group->users = 'Users';
$lang->group->module = 'Module';
$lang->group->method = 'Method';
+2
View File
@@ -32,6 +32,8 @@ $lang->group->noticeVisit = '空代表访问没有访问限制';
$lang->group->id = '编号';
$lang->group->name = '分组名称';
$lang->group->desc = '分组描述';
$lang->group->role = '角色';
$lang->group->acl = '权限';
$lang->group->users = '用户列表';
$lang->group->module = '模块';
$lang->group->method = '方法';
+2
View File
@@ -32,6 +32,8 @@ $lang->group->noticeVisit = '空代表訪問沒有訪問限制';
$lang->group->id = '編號';
$lang->group->name = '分組名稱';
$lang->group->desc = '分組描述';
$lang->group->role = '角色';
$lang->group->acl = '權限';
$lang->group->users = '用戶列表';
$lang->group->module = '模組';
$lang->group->method = '方法';
+7
View File
@@ -70,6 +70,13 @@ class install extends control
$this->view->pdoResult = $this->install->checkPDO();
$this->view->pdoMySQLResult = $this->install->checkPDOMySQL();
$this->view->jsonResult = $this->install->checkJSON();
$this->view->opensslResult = $this->install->checkOpenssl();
$this->view->mbstringResult = $this->install->checkMbstring();
$this->view->zlibResult = $this->install->checkZlib();
$this->view->curlResult = $this->install->checkCurl();
$this->view->filterResult = $this->install->checkFilter();
$this->view->gdResult = $this->install->checkGD();
$this->view->iconvResult = $this->install->checkIconv();
$this->view->tmpRootInfo = $this->install->getTmpRoot();
$this->view->tmpRootResult = $this->install->checkTmpRoot();
$this->view->dataRootInfo = $this->install->getDataRoot();
+14
View File
@@ -62,6 +62,20 @@ $lang->install->pdoMySQL = 'PDO_MySQL';
$lang->install->pdoMySQLFail = 'Edit PHP ini file to load PDO_MySQL extsion.';
$lang->install->json = 'JSON Extension';
$lang->install->jsonFail = 'Edit the php.ini file to load JSON extension.';
$lang->install->openssl = 'OPENSSL Extension';
$lang->install->opensslFail = 'Edit the php.ini file to load openssl extension.';
$lang->install->mbstring = 'MBSTRING Extension';
$lang->install->mbstringFail = 'Edit the php.ini file to load mbstring extension.';
$lang->install->zlib = 'ZLIB Extension';
$lang->install->zlibFail = 'Edit the php.ini file to load zlib extension.';
$lang->install->curl = 'CURL Extension';
$lang->install->curlFail = 'Edit the php.ini file to load curl extension.';
$lang->install->filter = 'FILTER Extension';
$lang->install->filterFail = 'Edit the php.ini file to load filter extension.';
$lang->install->gd = 'GD Extension';
$lang->install->gdFail = 'Edit the php.ini file to load gd extension.';
$lang->install->iconv = 'ICONV Extension';
$lang->install->iconvFail = 'Edit the php.ini file to load iconv extension.';
$lang->install->tmpRoot = 'Temp File Directory';
$lang->install->dataRoot = 'Uploaded File Directory';
$lang->install->session = 'Session Save Path';
+14
View File
@@ -62,6 +62,20 @@ $lang->install->pdoMySQL = 'PDO_MySQL扩展';
$lang->install->pdoMySQLFail = '修改PHP配置文件,加载pdo_mysql扩展。';
$lang->install->json = 'JSON扩展';
$lang->install->jsonFail = '修改PHP配置文件,加载JSON扩展。';
$lang->install->openssl = 'OPENSSL扩展';
$lang->install->opensslFail = '修改PHP配置文件,加载OPENSSL扩展。';
$lang->install->mbstring = 'MBSTRING扩展';
$lang->install->mbstringFail = '修改PHP配置文件,加载MBSTRING扩展。';
$lang->install->zlib = 'ZLIB扩展';
$lang->install->zlibFail = '修改PHP配置文件,加载ZLIB扩展。';
$lang->install->curl = 'CURL扩展';
$lang->install->curlFail = '修改PHP配置文件,加载CURL扩展。';
$lang->install->filter = 'FILTER扩展';
$lang->install->filterFail = '修改PHP配置文件,加载FILTER扩展。';
$lang->install->gd = 'GD扩展';
$lang->install->gdFail = '修改PHP配置文件,加载GD扩展。';
$lang->install->iconv = 'ICONV扩展';
$lang->install->iconvFail = '修改PHP配置文件,加载ICONV扩展。';
$lang->install->tmpRoot = '临时文件目录';
$lang->install->dataRoot = '上传文件目录';
$lang->install->session = 'Session存储目录';
+14
View File
@@ -62,6 +62,20 @@ $lang->install->pdoMySQL = 'PDO_MySQL擴展';
$lang->install->pdoMySQLFail = '修改PHP配置檔案,加載pdo_mysql擴展。';
$lang->install->json = 'JSON擴展';
$lang->install->jsonFail = '修改PHP配置檔案,加載JSON擴展。';
$lang->install->openssl = 'OPENSSL擴展';
$lang->install->opensslFail = '修改PHP配置檔案,加載OPENSSL擴展。';
$lang->install->mbstring = 'MBSTRING擴展';
$lang->install->mbstringFail = '修改PHP配置檔案,加載MBSTRING擴展。';
$lang->install->zlib = 'ZLIB擴展';
$lang->install->zlibFail = '修改PHP配置檔案,加載ZLIB擴展。';
$lang->install->curl = 'CURL擴展';
$lang->install->curlFail = '修改PHP配置檔案,加載CURL擴展。';
$lang->install->filter = 'FILTER擴展';
$lang->install->filterFail = '修改PHP配置檔案,加載FILTER擴展。';
$lang->install->gd = 'GD擴展';
$lang->install->gdFail = '修改PHP配置檔案,加載GD擴展。';
$lang->install->iconv = 'ICONV擴展';
$lang->install->iconvFail = '修改PHP配置檔案,加載ICONV擴展。';
$lang->install->tmpRoot = '臨時檔案目錄';
$lang->install->dataRoot = '上傳檔案目錄';
$lang->install->session = 'Session存儲目錄';
+78 -1
View File
@@ -90,7 +90,7 @@ class installModel extends model
/**
* Check json extension.
*
*
* @access public
* @return string ok|fail
*/
@@ -99,6 +99,83 @@ class installModel extends model
return $result = extension_loaded('json') ? 'ok' : 'fail';
}
/**
* Check openssl extension.
*
* @access public
* @return string ok|fail
*/
public function checkOpenssl()
{
return $result = extension_loaded('openssl') ? 'ok' : 'fail';
}
/**
* Check mbstring extension.
*
* @access public
* @return string ok|fail
*/
public function checkMbstring()
{
return $result = extension_loaded('mbstring') ? 'ok' : 'fail';
}
/**
* Check zlib extension.
*
* @access public
* @return string ok|fail
*/
public function checkZlib()
{
return $result = extension_loaded('zlib') ? 'ok' : 'fail';
}
/**
* Check curl extension.
*
* @access public
* @return string ok|fail
*/
public function checkCurl()
{
return $result = extension_loaded('curl') ? 'ok' : 'fail';
}
/**
* Check filter extension.
*
* @access public
* @return string ok|fail
*/
public function checkFilter()
{
return $result = extension_loaded('filter') ? 'ok' : 'fail';
}
/**
* Check gd extension.
*
* @access public
* @return string ok|fail
*/
public function checkGD()
{
return $result = extension_loaded('gd') ? 'ok' : 'fail';
}
/**
* Check iconv extension.
*
* @access public
* @return string ok|fail
*/
public function checkIconv()
{
return $result = extension_loaded('iconv') ? 'ok' : 'fail';
}
/**
* Get tempRoot info.
*
+57 -2
View File
@@ -47,6 +47,48 @@
<td class='<?php echo $jsonResult;?>'><?php echo $lang->install->$jsonResult;?></td>
<td class='text-left f-12px'><?php if($jsonResult == 'fail') echo $lang->install->jsonFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->openssl;?></th>
<td><?php $opensslResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $opensslResult;?>'><?php echo $lang->install->$opensslResult;?></td>
<td class='text-left f-12px'><?php if($opensslResult == 'fail') echo $lang->install->opensslFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->mbstring;?></th>
<td><?php $mbstringResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $mbstringResult;?>'><?php echo $lang->install->$mbstringResult;?></td>
<td class='text-left f-12px'><?php if($mbstringResult == 'fail') echo $lang->install->mbstringFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->zlib;?></th>
<td><?php $zlibResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $zlibResult;?>'><?php echo $lang->install->$zlibResult;?></td>
<td class='text-left f-12px'><?php if($zlibResult == 'fail') echo $lang->install->zlibFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->curl;?></th>
<td><?php $curlResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $curlResult;?>'><?php echo $lang->install->$curlResult;?></td>
<td class='text-left f-12px'><?php if($curlResult == 'fail') echo $lang->install->curlFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->filter;?></th>
<td><?php $filterResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $filterResult;?>'><?php echo $lang->install->$filterResult;?></td>
<td class='text-left f-12px'><?php if($filterResult == 'fail') echo $lang->install->filterFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->gd;?></th>
<td><?php $gdResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $gdResult;?>'><?php echo $lang->install->$gdResult;?></td>
<td class='text-left f-12px'><?php if($gdResult == 'fail') echo $lang->install->gdFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->iconv;?></th>
<td><?php $iconvResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $iconvResult;?>'><?php echo $lang->install->$iconvResult;?></td>
<td class='text-left f-12px'><?php if($iconvResult == 'fail') echo $lang->install->iconvFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->tmpRoot;?></th>
<td>
@@ -110,7 +152,20 @@
</div>
<div class='modal-footer'>
<?php
if($phpResult == 'ok' and $pdoResult == 'ok' and $pdoMySQLResult == 'ok' and $tmpRootResult == 'ok' and $dataRootResult == 'ok' and $sessionResult == 'ok')
if($phpResult == 'ok' and
$pdoResult == 'ok' and
$pdoMySQLResult == 'ok' and
$tmpRootResult == 'ok' and
$dataRootResult == 'ok' and
$sessionResult == 'ok' and
$jsonResult == 'ok' and
$opensslResult == 'ok' and
$mbstringResult == 'ok' and
$zlibResult == 'ok' and
$curlResult == 'ok' and
$filterResult == 'ok' and
$gdResult == 'ok' and
$iconvResult == 'ok')
{
echo html::a($this->createLink('install', 'step2'), $lang->install->next, '', "class='btn btn-primary'");
}
@@ -122,7 +177,7 @@
echo '<div class="panel panel-sm text-left"><div class="panel-heading strong">' . $lang->install->phpINI . '</div><div class="panel-body">' . nl2br($this->install->getIniInfo()) . '</div></div>';
}
}
?>
?>
</div>
</div>
</div>
+1 -1
View File
@@ -265,7 +265,7 @@ class mail extends control
}
}
$this->mail->send($this->post->to, $this->lang->mail->subject, $this->lang->mail->content, "", true);
$this->mail->send($this->post->to, $this->lang->mail->testSubject, $this->lang->mail->testContent, "", true);
if($this->mail->isError())
{
$this->view->error = $this->mail->getError();
+4 -3
View File
@@ -42,7 +42,8 @@ $lang->mail->sync = 'Synchronize';
$lang->mail->remove = 'Remove';
$lang->mail->toList = 'Addressee';
$lang->mail->subjectName = 'Subject';
$lang->mail->ccList = 'Copy to';
$lang->mail->subject = 'Subject';
$lang->mail->addedBy = 'Sender';
$lang->mail->addedDate = 'Added Date';
$lang->mail->sendTime = 'Send Date';
@@ -74,8 +75,8 @@ $lang->mail->noticeResend = 'Sent it again!';
$lang->mail->inputFromEmail = 'Enter Email Address';
$lang->mail->nextStep = 'Next';
$lang->mail->successSaved = 'Configuration has been saved.';
$lang->mail->subject = 'Testing Email';
$lang->mail->content = 'Email configured!';
$lang->mail->testSubject = 'Testing Email';
$lang->mail->testContent = 'Email configured!';
$lang->mail->successSended = 'Sent!';
$lang->mail->confirmDelete = 'Do you want to delete it?';
$lang->mail->sendmailTips = 'Note: Email author will not receive this email.';
+4 -3
View File
@@ -42,7 +42,8 @@ $lang->mail->sync = '同步';
$lang->mail->remove = '移除';
$lang->mail->toList = '收信人';
$lang->mail->subjectName = '主题';
$lang->mail->ccList = '抄送给';
$lang->mail->subject = '主题';
$lang->mail->addedBy = '发送者';
$lang->mail->addedDate = '创建时间';
$lang->mail->sendTime = '发送时间';
@@ -74,8 +75,8 @@ $lang->mail->noticeResend = '已经重新发信!';
$lang->mail->inputFromEmail = '请输入发信邮箱:';
$lang->mail->nextStep = '下一步';
$lang->mail->successSaved = '配置信息已经成功保存。';
$lang->mail->subject = '测试邮件';
$lang->mail->content = '邮箱设置成功';
$lang->mail->testSubject = '测试邮件';
$lang->mail->testContent = '邮箱设置成功';
$lang->mail->successSended = '成功发送!';
$lang->mail->confirmDelete = '是否删除邮件?';
$lang->mail->sendmailTips = '提示:系统不会为当前操作者发信。';
+4 -3
View File
@@ -42,7 +42,8 @@ $lang->mail->sync = '同步';
$lang->mail->remove = '移除';
$lang->mail->toList = '收信人';
$lang->mail->subjectName = '主題';
$lang->mail->ccList = '抄送給';
$lang->mail->subject = '主題';
$lang->mail->addedBy = '發送者';
$lang->mail->addedDate = '創建時間';
$lang->mail->sendTime = '發送時間';
@@ -74,8 +75,8 @@ $lang->mail->noticeResend = '已經重新發信!';
$lang->mail->inputFromEmail = '請輸入發信郵箱:';
$lang->mail->nextStep = '下一步';
$lang->mail->successSaved = '配置信息已經成功保存。';
$lang->mail->subject = '測試郵件';
$lang->mail->content = '郵箱設置成功';
$lang->mail->testSubject = '測試郵件';
$lang->mail->testContent = '郵箱設置成功';
$lang->mail->successSended = '成功發送!';
$lang->mail->confirmDelete = '是否刪除郵件?';
$lang->mail->sendmailTips = '提示:系統不會為當前操作者發信。';
+1 -1
View File
@@ -288,7 +288,7 @@ class mailModel extends model
}
/* Remove deleted users. */
$users = $this->loadModel('user')->getPairs();
$users = $this->loadModel('user')->getPairs('nodeleted|all');
foreach($toList as $key => $to) if(!isset($users[trim($to)])) unset($toList[$key]);
foreach($ccList as $key => $cc) if(!isset($users[trim($cc)])) unset($ccList[$key]);
+1 -1
View File
@@ -22,7 +22,7 @@
<tr>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('toList', $orderBy, $vars, $lang->mail->toList);?></th>
<th class='w-150px'> <?php common::printOrderLink('subject', $orderBy, $vars, $lang->mail->subjectName);?></th>
<th class='w-150px'> <?php common::printOrderLink('subject', $orderBy, $vars, $lang->mail->subject);?></th>
<th class='w-80px'> <?php common::printOrderLink('addedBy', $orderBy, $vars, $lang->mail->addedBy);?></th>
<th class='w-150px'> <?php common::printOrderLink('addedDate', $orderBy, $vars, $lang->mail->addedDate);?></th>
<th class='w-150px'> <?php common::printOrderLink('sendTime', $orderBy, $vars, $lang->mail->sendTime);?></th>
+1 -1
View File
@@ -62,7 +62,7 @@ $lang->misc->tableName = "Table Name";
$lang->misc->tableStatus = "Status";
$lang->misc->novice = "First time to ZenTao? Do you want to start rookie mode?";
$lang->user->noticeResetFile = "<h5>If you are not Administrator, please contact Administrator to repair table.</h5>
$lang->misc->noticeRepair = "<h5>If you are not Administrator, please contact Administrator to repair table.</h5>
<h5>If you are, please login into your Zentao host and create the <span>%s</span> file.</h5>
<p>Note:</p>
<ol>
+2 -2
View File
@@ -62,13 +62,13 @@ $lang->misc->tableName = "表名";
$lang->misc->tableStatus = "狀態";
$lang->misc->novice = "您可能初次使用禪道,是否進入新手模式?";
$lang->user->noticeResetFile = "<h5>普通用戶請聯繫管理員進行修復</h5>
$lang->misc->noticeRepair = "<h5>普通用戶請聯繫管理員進行修復</h5>
<h5>管理員請登錄禪道所在的伺服器,創建<span>%s</span>檔案。</h5>
<p>注意:</p>
<ol>
<li>檔案內容為空。</li>
<li>如果之前檔案存在,刪除之後重新創建。</li>
</ol>";
</ol>";
$lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = '最新版本';
+27 -20
View File
@@ -53,9 +53,12 @@ class my extends control
{
/* Save session. */
$uri = $this->app->getURI(true);
$this->session->set('todoList', $uri);
$this->session->set('bugList', $uri);
$this->session->set('taskList', $uri);
if($this->app->viewType != 'json')
{
$this->session->set('todoList', $uri);
$this->session->set('bugList', $uri);
$this->session->set('taskList', $uri);
}
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -98,7 +101,7 @@ class my extends control
public function story($type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. */
$this->session->set('storyList', $this->app->getURI(true));
if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true));
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -136,8 +139,11 @@ class my extends control
public function task($type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. */
$this->session->set('taskList', $this->app->getURI(true));
$this->session->set('storyList', $this->app->getURI(true));
if($this->app->viewType != 'json')
{
$this->session->set('taskList', $this->app->getURI(true));
$this->session->set('storyList', $this->app->getURI(true));
}
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -176,7 +182,7 @@ class my extends control
public function bug($type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. load Lang. */
$this->session->set('bugList', $this->app->getURI(true));
if($this->app->viewType != 'json') $this->session->set('bugList', $this->app->getURI(true));
$this->app->loadLang('bug');
/* Load pager. */
@@ -194,7 +200,7 @@ class my extends control
$this->view->position[] = $this->lang->my->bug;
$this->view->bugs = $bugs;
$this->view->users = $this->user->getPairs('noletter');
$this->view->memberPairs = $this->user->getPairs('noletter');
$this->view->memberPairs = $this->user->getPairs('noletter|nodeleted');
$this->view->tabID = 'bug';
$this->view->type = $type;
$this->view->recTotal = $recTotal;
@@ -219,7 +225,7 @@ class my extends control
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true));
if($this->app->viewType != 'json') $this->session->set('testtaskList', $this->app->getURI(true));
$this->app->loadLang('testcase');
@@ -242,22 +248,22 @@ class my extends control
/**
* My test case.
*
* @param string $type
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
*
* @param string $type
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function testcase($type = 'assigntome', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session, load lang. */
$this->session->set('caseList', $this->app->getURI(true));
if($this->app->viewType != 'json') $this->session->set('caseList', $this->app->getURI(true));
$this->app->loadLang('testcase');
$this->app->loadLang('testtask');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
@@ -275,7 +281,7 @@ class my extends control
$cases = $this->loadModel('testcase')->getByOpenedBy($this->app->user->account, $sort, $pager);
}
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', $type == 'assigntome' ? false : true);
$cases = $this->testcase->appendData($cases, $type == 'assigntome' ? 'run' : 'case');
/* Assign. */
@@ -290,7 +296,7 @@ class my extends control
$this->view->pageID = $pageID;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->display();
}
@@ -332,6 +338,7 @@ class my extends control
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->editProfile;
$this->view->position[] = $this->lang->my->editProfile;
$this->view->user = $this->user->getById($this->app->user->account);
$this->view->rand = $this->user->updateSessionRandom();
$this->display();
}
@@ -405,7 +412,7 @@ class my extends control
$this->view->mode = $mode;
$this->view->lists = $lists;
$this->view->listID = $listID;
$this->view->users = $this->user->getPairs('noletter|noempty|noclosed');
$this->view->users = $this->user->getPairs('noletter|noempty|noclosed|noclosed');
$this->display();
}
+9
View File
@@ -0,0 +1,9 @@
$(document).ready(function()
{
$('#dataform').submit(function()
{
var password = $('input#verifyPassword').val();
var rand = $('input#verifyRand').val();
$('input#verifyPassword').val(md5(md5(password) + rand));
});
});
+3 -1
View File
@@ -12,11 +12,12 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::import($jsRoot . 'md5.js');?>
<div class='container mw-800px'>
<div id='titlebar'>
<div class='heading'><i class='icon-pencil'></i> <?php echo $lang->my->editProfile;?></div>
</div>
<form method='post' target='hiddenwin' class='form-condensed'>
<form method='post' target='hiddenwin' class='form-condensed' id='dataform'>
<fieldset>
<legend><?php echo $lang->my->form->lblBasic;?></legend>
<table class='table table-form'>
@@ -113,6 +114,7 @@
</fieldset>
<div class='text-center'><?php echo html::submitButton() . ' &nbsp; ' . html::backButton();?></div>
</form>
<?php echo html::hidden('verifyRand', $rand);?>
</div>
<?php js::set('passwordStrengthList', $lang->user->passwordStrengthList)?>
<script>

Some files were not shown because too many files have changed in this diff Show More