Merge branch '12.x' of github.com:easysoft/zentaopms into 12.x

This commit is contained in:
z
2020-11-04 10:38:43 +08:00
22 changed files with 376 additions and 158 deletions
+1
View File
@@ -1 +1,2 @@
ALTER TABLE `zt_doc` ADD `mailto` text AFTER `editedDate`;
ALTER TABLE `zt_task` CHANGE `realStarted` `realStarted` datetime NOT NULL AFTER `estStarted`;
+1
View File
@@ -304,6 +304,7 @@ CREATE TABLE IF NOT EXISTS `zt_doc` (
`addedDate` datetime NOT NULL,
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`mailto` text,
`acl` varchar(10) NOT NULL DEFAULT 'open',
`groups` varchar(255) NOT NULL,
`users` text NOT NULL,
+2 -1
View File
@@ -1603,11 +1603,12 @@ class bugModel extends model
* @access public
* @return array
*/
public function getStoryBugs($storyID)
public function getStoryBugs($storyID, $projectID = 0)
{
return $this->dao->select('id, title, pri, type, status, assignedTo, resolvedBy, resolution')
->from(TABLE_BUG)
->where('story')->eq((int)$storyID)
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->andWhere('deleted')->eq(0)
->fetchAll('id');
}
+6 -2
View File
@@ -371,7 +371,7 @@ class doc extends control
$this->view->type = $type;
$this->view->docType = $docType;
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->users = $this->user->getPairs('nocode');
$this->view->users = $this->user->getPairs('nocode|noclosed|nodeleted');
$this->display();
}
@@ -424,7 +424,7 @@ class doc extends control
$this->view->type = $type;
$this->view->libs = $this->doc->getLibs($type = 'all', $extra = 'withObject');
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->users = $this->user->getPairs('noletter', $doc->users);
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted', $doc->users);
$this->display();
}
@@ -432,6 +432,7 @@ class doc extends control
* View a doc.
*
* @param int $docID
* @param int $version
* @access public
* @return void
*/
@@ -445,6 +446,9 @@ class doc extends control
{
$hyperdown = $this->app->loadClass('hyperdown');
$doc->content = $hyperdown->makeHtml($doc->content);
/* Add a newline attribute to the table. */
$doc->content = str_replace("<th>", "<th style='word-break: break-word;'>", $doc->content);
$doc->content = str_replace("<td>", "<td style='word-break: break-word;'>", $doc->content);
$doc->digest = $hyperdown->makeHtml($doc->digest);
}
+2
View File
@@ -1 +1,3 @@
#whiteListBox .input-group:last-child{margin-top:10px}
#mailtoGroup .input-group-btn > .btn {margin-left: -1px!important;}
#mailtoGroup .chosen-container-single a {border-left-width: 0px;}
+7
View File
@@ -47,6 +47,7 @@ $lang->doc->users = 'Benutzer';
$lang->doc->item = ' Einträge';
$lang->doc->num = 'Doks';
$lang->doc->searchResult = 'Suchergebnis';
$lang->doc->mailto = 'Mailto';
$lang->doc->moduleDoc = 'Nach Modulen';
$lang->doc->searchDoc = 'Suche';
@@ -155,6 +156,12 @@ $lang->doc->customShowLibsList['zero'] = 'Display Empty Library';
$lang->doc->customShowLibsList['children'] = 'Display Child-category Documents';
$lang->doc->customShowLibsList['unclosed'] = "Display Active {$lang->projectCommon}s Only";
$lang->doc->mail = new stdclass();
$lang->doc->mail->create = new stdclass();
$lang->doc->mail->edit = new stdclass();
$lang->doc->mail->create->title = "%s created document #%s:%s";
$lang->doc->mail->edit->title = "%s edited document #%s:%s";
$lang->doc->confirmDelete = "Möchten Sie dieses Dokument löschen?";
$lang->doc->confirmDeleteLib = "Möchten Sie diese Bibliothek löschen?";
$lang->doc->errorEditSystemDoc = "System Dokumentenbibliothek darf nicht geändert werden.";
+7
View File
@@ -47,6 +47,7 @@ $lang->doc->users = 'Users';
$lang->doc->item = ' Items';
$lang->doc->num = 'Documents';
$lang->doc->searchResult = 'Search Result';
$lang->doc->mailto = 'Mailto';
$lang->doc->moduleDoc = 'By Module';
$lang->doc->searchDoc = 'Search';
@@ -155,6 +156,12 @@ $lang->doc->customShowLibsList['zero'] = 'Display Empty Library';
$lang->doc->customShowLibsList['children'] = 'Display Child-category Documents';
$lang->doc->customShowLibsList['unclosed'] = "Display Active {$lang->projectCommon}s Only";
$lang->doc->mail = new stdclass();
$lang->doc->mail->create = new stdclass();
$lang->doc->mail->edit = new stdclass();
$lang->doc->mail->create->title = "%s created document #%s:%s";
$lang->doc->mail->edit->title = "%s edited document #%s:%s";
$lang->doc->confirmDelete = "Do you want to delete this document?";
$lang->doc->confirmDeleteLib = "Do you want to delete this document library?";
$lang->doc->errorEditSystemDoc = "You don't have to change system document library.";
+7
View File
@@ -47,6 +47,7 @@ $lang->doc->users = 'Utilisateurs';
$lang->doc->item = ' Objets';
$lang->doc->num = 'Documents';
$lang->doc->searchResult = 'Résultat de Recherche';
$lang->doc->mailto = 'Mailto';
$lang->doc->moduleDoc = 'Par Module';
$lang->doc->searchDoc = 'Rechercher';
@@ -155,6 +156,12 @@ $lang->doc->customShowLibsList['zero'] = 'Montrer Bibliothèques Vides';
$lang->doc->customShowLibsList['children'] = 'Montrer sous-catégorie de Documents';
$lang->doc->customShowLibsList['unclosed'] = "Montrer {$lang->projectCommon}s actifs seulement";
$lang->doc->mail = new stdclass();
$lang->doc->mail->create = new stdclass();
$lang->doc->mail->edit = new stdclass();
$lang->doc->mail->create->title = "%s created document #%s:%s";
$lang->doc->mail->edit->title = "%s edited document #%s:%s";
$lang->doc->confirmDelete = "Voulez-vous supprimer ce document ?";
$lang->doc->confirmDeleteLib = "Voulez-vous supprimer cette Bibliothèque ?";
$lang->doc->errorEditSystemDoc = "Vous n'avez pas besoin de changer de système de Bibliothèque.";
+153 -146
View File
@@ -10,104 +10,105 @@
* @link http://www.zentao.net
*/
/* Fields. */
$lang->doc->common = 'Tài liệu';
$lang->doc->id = 'ID';
$lang->doc->product = $lang->productCommon;
$lang->doc->project = $lang->projectCommon;
$lang->doc->lib = 'Thư viện';
$lang->doc->module = 'Danh mục';
$lang->doc->title = 'Tên';
$lang->doc->digest = 'Tóm tắt';
$lang->doc->comment = 'Nhận xét';
$lang->doc->type = 'Loại';
$lang->doc->content = 'Text';
$lang->doc->keywords = 'Tags';
$lang->doc->url = 'URL';
$lang->doc->files = 'Files';
$lang->doc->addedBy = 'Author';
$lang->doc->addedDate = 'Đã thêm';
$lang->doc->editedBy = 'UpdatedBy';
$lang->doc->editedDate = 'UpdatedDate';
$lang->doc->version = 'Phiên bản';
$lang->doc->basicInfo = 'Thông tin cơ bản';
$lang->doc->deleted = 'Đã xóa';
$lang->doc->fileObject = 'Dependent Item';
$lang->doc->whiteList = 'Danh sách trắng';
$lang->doc->contentType = 'Định dạng';
$lang->doc->separator = "<i class='icon-angle-right'></i>";
$lang->doc->fileTitle = 'File tên';
$lang->doc->filePath = 'File Path';
$lang->doc->extension = 'Extension';
$lang->doc->size = 'Size';
$lang->doc->download = 'Tải về';
$lang->doc->acl = 'Right';
$lang->doc->fileName = 'Files';
$lang->doc->groups = 'Nhóm';
$lang->doc->users = 'Người dùng';
$lang->doc->item = ' Items';
$lang->doc->num = 'Documents';
$lang->doc->searchResult = 'Search kết quả';
$lang->doc->common = 'Tài liệu';
$lang->doc->id = 'ID';
$lang->doc->product = $lang->productCommon;
$lang->doc->project = $lang->projectCommon;
$lang->doc->lib = 'Thư viện';
$lang->doc->module = 'Danh mục';
$lang->doc->title = 'Tên';
$lang->doc->digest = 'Tóm tắt';
$lang->doc->comment = 'Nhận xét';
$lang->doc->type = 'Loại';
$lang->doc->content = 'Text';
$lang->doc->keywords = 'Tags';
$lang->doc->url = 'URL';
$lang->doc->files = 'Files';
$lang->doc->addedBy = 'Author';
$lang->doc->addedDate = 'Đã thêm';
$lang->doc->editedBy = 'UpdatedBy';
$lang->doc->editedDate = 'UpdatedDate';
$lang->doc->version = 'Phiên bản';
$lang->doc->basicInfo = 'Thông tin cơ bản';
$lang->doc->deleted = 'Đã xóa';
$lang->doc->fileObject = 'Dependent Item';
$lang->doc->whiteList = 'Danh sách trắng';
$lang->doc->contentType = 'Định dạng';
$lang->doc->separator = "<i class='icon-angle-right'></i>";
$lang->doc->fileTitle = 'File tên';
$lang->doc->filePath = 'File Path';
$lang->doc->extension = 'Extension';
$lang->doc->size = 'Size';
$lang->doc->download = 'Tải về';
$lang->doc->acl = 'Right';
$lang->doc->fileName = 'Files';
$lang->doc->groups = 'Nhóm';
$lang->doc->users = 'Người dùng';
$lang->doc->item = ' Items';
$lang->doc->num = 'Documents';
$lang->doc->searchResult = 'Search kết quả';
$lang->doc->mailto = 'Mailto';
$lang->doc->moduleDoc = 'By Module';
$lang->doc->searchDoc = 'Tìm kiếm';
$lang->doc->fast = 'Quick Entry';
$lang->doc->allDoc = 'Tất cả tài liệu';
$lang->doc->openedByMe = 'Của bạn';
$lang->doc->orderByOpen = 'Recent Added';
$lang->doc->orderByEdit = 'Recent Updated';
$lang->doc->orderByVisit = 'Last Visited';
$lang->doc->todayEdited = 'Updated Today';
$lang->doc->pastEdited = 'Tổng Updated';
$lang->doc->myDoc = 'My tài liệu';
$lang->doc->myCollection = 'My Favorites';
$lang->doc->moduleDoc = 'By Module';
$lang->doc->searchDoc = 'Tìm kiếm';
$lang->doc->fast = 'Quick Entry';
$lang->doc->allDoc = 'Tất cả tài liệu';
$lang->doc->openedByMe = 'Của bạn';
$lang->doc->orderByOpen = 'Recent Added';
$lang->doc->orderByEdit = 'Recent Updated';
$lang->doc->orderByVisit = 'Last Visited';
$lang->doc->todayEdited = 'Updated Today';
$lang->doc->pastEdited = 'Tổng Updated';
$lang->doc->myDoc = 'My tài liệu';
$lang->doc->myCollection = 'My Favorites';
/* Methods list */
$lang->doc->index = 'Document Home';
$lang->doc->create = 'Tạo tài liệu';
$lang->doc->edit = 'Sửa tài liệu';
$lang->doc->delete = 'Xóa tài liệu';
$lang->doc->browse = 'Document danh sách';
$lang->doc->view = 'Document Detail';
$lang->doc->diff = 'Diff';
$lang->doc->diffAction = 'Diff tài liệu';
$lang->doc->sort = 'Đánh giá tài liệu';
$lang->doc->manageType = 'Quản lý danh mục';
$lang->doc->editType = 'Sửa';
$lang->doc->deleteType = 'Xóa';
$lang->doc->addType = 'Thêm';
$lang->doc->childType = 'Categories';
$lang->doc->collect = 'Thêm Favorite';
$lang->doc->cancelCollection = 'Remove Favorite';
$lang->doc->deleteFile = 'Xóa File';
$lang->doc->index = 'Document Home';
$lang->doc->create = 'Tạo tài liệu';
$lang->doc->edit = 'Sửa tài liệu';
$lang->doc->delete = 'Xóa tài liệu';
$lang->doc->browse = 'Document danh sách';
$lang->doc->view = 'Document Detail';
$lang->doc->diff = 'Diff';
$lang->doc->diffAction = 'Diff tài liệu';
$lang->doc->sort = 'Đánh giá tài liệu';
$lang->doc->manageType = 'Quản lý danh mục';
$lang->doc->editType = 'Sửa';
$lang->doc->deleteType = 'Xóa';
$lang->doc->addType = 'Thêm';
$lang->doc->childType = 'Categories';
$lang->doc->collect = 'Thêm Favorite';
$lang->doc->cancelCollection = 'Remove Favorite';
$lang->doc->deleteFile = 'Xóa File';
$lang->doc->libName = 'Thư viện tài liệu';
$lang->doc->libType = 'Danh mục';
$lang->doc->custom = 'Tùy biến thư viện tài liệu';
$lang->doc->customAB = 'Tùy biến Doc Lib';
$lang->doc->createLib = 'Tạo thư viện tài liệu';
$lang->doc->allLibs = 'Library danh sách';
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->projectCommon} Libraries";
$lang->doc->showFiles = 'Attachments';
$lang->doc->editLib = 'Sửa thư viện tài liệu';
$lang->doc->deleteLib = 'Xóa thư viện tài liệu';
$lang->doc->fixedMenu = 'Sửa to Menu';
$lang->doc->removeMenu = 'Remove from Menu';
$lang->doc->search = 'Tìm kiếm';
$lang->doc->libName = 'Thư viện tài liệu';
$lang->doc->libType = 'Danh mục';
$lang->doc->custom = 'Tùy biến thư viện tài liệu';
$lang->doc->customAB = 'Tùy biến Doc Lib';
$lang->doc->createLib = 'Tạo thư viện tài liệu';
$lang->doc->allLibs = 'Library danh sách';
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->projectCommon} Libraries";
$lang->doc->showFiles = 'Attachments';
$lang->doc->editLib = 'Sửa thư viện tài liệu';
$lang->doc->deleteLib = 'Xóa thư viện tài liệu';
$lang->doc->fixedMenu = 'Sửa to Menu';
$lang->doc->removeMenu = 'Remove from Menu';
$lang->doc->search = 'Tìm kiếm';
/* Query condition list. */
$lang->doc->allProduct = 'All' . $lang->productCommon;
$lang->doc->allProject = 'All' . $lang->projectCommon;
$lang->doc->allProduct = 'All' . $lang->productCommon;
$lang->doc->allProject = 'All' . $lang->projectCommon;
$lang->doc->libTypeList['product'] = $lang->productCommon . ' thư viện';
$lang->doc->libTypeList['project'] = $lang->projectCommon . ' thư viện';
$lang->doc->libTypeList['custom'] = 'Tùy biến thư viện';
$lang->doc->libTypeList['product'] = $lang->productCommon . ' thư viện';
$lang->doc->libTypeList['project'] = $lang->projectCommon . ' thư viện';
$lang->doc->libTypeList['custom'] = 'Tùy biến thư viện';
$lang->doc->libIconList['product'] = 'icon-cube';
$lang->doc->libIconList['project'] = 'icon-stack';
$lang->doc->libIconList['custom'] = 'icon-folder-o';
$lang->doc->libIconList['product'] = 'icon-cube';
$lang->doc->libIconList['project'] = 'icon-stack';
$lang->doc->libIconList['custom'] = 'icon-folder-o';
$lang->doc->systemLibs['product'] = $lang->productCommon;
$lang->doc->systemLibs['project'] = $lang->projectCommon;
$lang->doc->systemLibs['product'] = $lang->productCommon;
$lang->doc->systemLibs['project'] = $lang->projectCommon;
global $config;
if($config->global->flow == 'onlyStory' or $config->global->flow == 'onlyTest') unset($lang->doc->systemLibs['project']);
@@ -115,76 +116,82 @@ if($config->global->flow == 'onlyStory' or $config->global->flow == 'onlyTest')
if($config->global->flow == 'onlyTask') unset($lang->doc->systemLibs['product']);
if($config->global->flow == 'onlyTask') unset($lang->doc->libTypeList['product']);
$lang->doc->aclList['open'] = 'Công khai';
$lang->doc->aclList['custom'] = 'Tùy biến';
$lang->doc->aclList['private'] = 'Riêng tư';
$lang->doc->aclList['open'] = 'Công khai';
$lang->doc->aclList['custom'] = 'Tùy biến';
$lang->doc->aclList['private'] = 'Riêng tư';
$lang->doc->typeList['html'] = 'Html';
$lang->doc->typeList['markdown'] = 'Markdown';
$lang->doc->typeList['url'] = 'URL';
$lang->doc->typeList['word'] = 'Word';
$lang->doc->typeList['ppt'] = 'PPT';
$lang->doc->typeList['excel'] = 'Excel';
$lang->doc->typeList['html'] = 'Html';
$lang->doc->typeList['markdown'] = 'Markdown';
$lang->doc->typeList['url'] = 'URL';
$lang->doc->typeList['word'] = 'Word';
$lang->doc->typeList['ppt'] = 'PPT';
$lang->doc->typeList['excel'] = 'Excel';
$lang->doc->types['text'] = 'Text';
$lang->doc->types['url'] = 'URL';
$lang->doc->types['text'] = 'Text';
$lang->doc->types['url'] = 'URL';
$lang->doc->contentTypeList['html'] = 'HTML';
$lang->doc->contentTypeList['markdown'] = 'MarkDown';
$lang->doc->contentTypeList['html'] = 'HTML';
$lang->doc->contentTypeList['markdown'] = 'MarkDown';
$lang->doc->browseType = 'Danh mục';
$lang->doc->browseTypeList['list'] = 'Danh sách';
$lang->doc->browseTypeList['grid'] = 'Card';
$lang->doc->browseType = 'Danh mục';
$lang->doc->browseTypeList['list'] = 'Danh sách';
$lang->doc->browseTypeList['grid'] = 'Card';
$lang->doc->fastMenuList['byediteddate'] = 'Recent Edited';
//$lang->doc->fastMenuList['visiteddate'] = 'Recently Visited';
$lang->doc->fastMenuList['openedbyme'] = 'My tài liệu';
$lang->doc->fastMenuList['collectedbyme'] = 'My Favorites';
$lang->doc->fastMenuList['byediteddate'] = 'Recent Edited';
//$lang->doc->fastMenuList['visiteddate'] = 'Recently Visited';
$lang->doc->fastMenuList['openedbyme'] = 'My tài liệu';
$lang->doc->fastMenuList['collectedbyme'] = 'My Favorites';
$lang->doc->fastMenuIconList['byediteddate'] = 'icon-folder-upload';
//$lang->doc->fastMenuIconList['visiteddate'] = 'icon-folder-move';
$lang->doc->fastMenuIconList['openedbyme'] = 'icon-folder-account';
$lang->doc->fastMenuIconList['collectedbyme'] = 'icon-folder-star';
$lang->doc->fastMenuIconList['byediteddate'] = 'icon-folder-upload';
//$lang->doc->fastMenuIconList['visiteddate'] = 'icon-folder-move';
$lang->doc->fastMenuIconList['openedbyme'] = 'icon-folder-account';
$lang->doc->fastMenuIconList['collectedbyme'] = 'icon-folder-star';
$lang->doc->customObjectLibs['files'] = 'Hiện Attachment thư viện';
$lang->doc->customObjectLibs['customFiles'] = 'Hiện Custom thư viện';
$lang->doc->customObjectLibs['files'] = 'Hiện Attachment thư viện';
$lang->doc->customObjectLibs['customFiles'] = 'Hiện Custom thư viện';
$lang->doc->orderLib = 'Đánh giá Thiết lập';
$lang->doc->customShowLibs = 'Display Thiết lập';
$lang->doc->customShowLibsList['zero'] = 'Display Empty thư viện';
$lang->doc->customShowLibsList['children'] = 'Display Child-category tài liệu';
$lang->doc->customShowLibsList['unclosed'] = "Display Active {$lang->projectCommon} Only";
$lang->doc->orderLib = 'Đánh giá Thiết lập';
$lang->doc->customShowLibs = 'Display Thiết lập';
$lang->doc->customShowLibsList['zero'] = 'Display Empty thư viện';
$lang->doc->customShowLibsList['children'] = 'Display Child-category tài liệu';
$lang->doc->customShowLibsList['unclosed'] = "Display Active {$lang->projectCommon} Only";
$lang->doc->confirmDelete = "Bạn có muốn xóa this document?";
$lang->doc->confirmDeleteLib = "Bạn có muốn xóa this document library?";
$lang->doc->errorEditSystemDoc = "You don't have to change system document library.";
$lang->doc->errorEmptyProduct = "Không có {$lang->productCommon}. It cannot be created.";
$lang->doc->errorEmptyProject = "Không có {$lang->projectCommon}. It cannot be created.";
$lang->doc->errorMainSysLib = "This library không thể xóa.";
$lang->doc->accessDenied = "Access bị từ chối!";
$lang->doc->versionNotFount = 'Nó does not exist in bản dựng này.';
$lang->doc->noDoc = 'Không có documents. ';
$lang->doc->cannotCreateOffice = 'Sorry, %s can only be created in ZenTao Enterprise. Contact us at renee@easysoft.ltd to try ZenTao Enterprise.';
$lang->doc->mail = new stdclass();
$lang->doc->mail->create = new stdclass();
$lang->doc->mail->edit = new stdclass();
$lang->doc->mail->create->title = "%s created document #%s:%s";
$lang->doc->mail->edit->title = "%s edited document #%s:%s";
$lang->doc->confirmDelete = "Bạn có muốn xóa this document?";
$lang->doc->confirmDeleteLib = "Bạn có muốn xóa this document library?";
$lang->doc->errorEditSystemDoc = "You don't have to change system document library.";
$lang->doc->errorEmptyProduct = "Không có {$lang->productCommon}. It cannot be created.";
$lang->doc->errorEmptyProject = "Không có {$lang->projectCommon}. It cannot be created.";
$lang->doc->errorMainSysLib = "This library không thể xóa.";
$lang->doc->accessDenied = "Access bị từ chối!";
$lang->doc->versionNotFount = 'Nó does not exist in bản dựng này.';
$lang->doc->noDoc = 'Không có documents. ';
$lang->doc->cannotCreateOffice = 'Sorry, %s can only be created in ZenTao Enterprise. Contact us at renee@easysoft.ltd to try ZenTao Enterprise.';
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s' target='_parent'>office convert</a>.<p>";
$lang->doc->noSearchedDoc = 'Không có documents found.';
$lang->doc->noEditedDoc = 'Bạn có not edited any documents.';
$lang->doc->noOpenedDoc = 'Bạn chưa tạo any documents.';
$lang->doc->noCollectedDoc = 'Bạn có not favorited any documents.';
$lang->doc->noSearchedDoc = 'Không có documents found.';
$lang->doc->noEditedDoc = 'Bạn có not edited any documents.';
$lang->doc->noOpenedDoc = 'Bạn chưa tạo any documents.';
$lang->doc->noCollectedDoc = 'Bạn có not favorited any documents.';
$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['custom']['open'] = 'Tất cả users có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['custom']['private'] = 'Chỉ the one who created it có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['custom']['open'] = 'Tất cả users có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist có thể truy cập nó.';
$lang->doc->noticeAcl['lib']['custom']['private'] = 'Chỉ the one who created it có thể truy cập nó.';
$lang->doc->noticeAcl['doc']['open'] = 'Users who can access the document library which the document belongs có thể truy cập nó.';
$lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist có thể truy cập nó.';
$lang->doc->noticeAcl['doc']['private'] = 'Chỉ the one who created it có thể truy cập nó.';
$lang->doc->noticeAcl['doc']['open'] = 'Users who can access the document library which the document belongs có thể truy cập nó.';
$lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist có thể truy cập nó.';
$lang->doc->noticeAcl['doc']['private'] = 'Chỉ the one who created it có thể truy cập nó.';
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'URL';
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'URL';
$lang->doclib = new stdclass();
$lang->doclib->name = 'Tên';
+7
View File
@@ -47,6 +47,7 @@ $lang->doc->users = '用户';
$lang->doc->item = '项';
$lang->doc->num = '文档数量';
$lang->doc->searchResult = '搜索结果';
$lang->doc->mailto = '抄送给';
$lang->doc->moduleDoc = '按模块浏览';
$lang->doc->searchDoc = '搜索';
@@ -155,6 +156,12 @@ $lang->doc->customShowLibsList['zero'] = '显示空文档的库';
$lang->doc->customShowLibsList['children'] = '显示子分类的文档';
$lang->doc->customShowLibsList['unclosed'] = '只显示未关闭的项目';
$lang->doc->mail = new stdclass();
$lang->doc->mail->create = new stdclass();
$lang->doc->mail->edit = new stdclass();
$lang->doc->mail->create->title = "%s创建了文档 #%s:%s";
$lang->doc->mail->edit->title = "%s编辑了文档 #%s:%s";
$lang->doc->confirmDelete = "您确定删除该文档吗?";
$lang->doc->confirmDeleteLib = "您确定删除该文档库吗?";
$lang->doc->errorEditSystemDoc = "系统文档库无需修改。";
+100
View File
@@ -618,6 +618,7 @@ class docModel extends model
->cleanInt('product,project,module,lib')
->join('groups', ',')
->join('users', ',')
->join('mailto', ',')
->remove('files,labels,uid')
->get();
@@ -693,6 +694,7 @@ class docModel extends model
->cleanInt('module')
->join('groups', ',')
->join('users', ',')
->join('mailto', ',')
->remove('comment,files,labels,uid')
->get();
if($doc->contentType == 'markdown') $doc->content = $this->post->content;
@@ -1625,4 +1627,102 @@ class docModel extends model
return $actions;
}
/**
* Send mail.
*
* @param int $docID
* @param int $actionID
* @access public
* @return void
*/
public function sendmail($docID, $actionID)
{
$this->loadModel('mail');
$doc = $this->getById($docID);
$users = $this->loadModel('user')->getPairs('noletter');
/* Get action info. */
$action = $this->loadModel('action')->getById($actionID);
$history = $this->action->getHistory($actionID);
$action->history = isset($history[$actionID]) ? $history[$actionID] : array();
/* Get mail content. */
$modulePath = $this->app->getModulePath($appName = '', 'doc');
$oldcwd = getcwd();
$viewFile = $modulePath . 'view/sendmail.html.php';
chdir($modulePath . 'view');
if(file_exists($modulePath . 'ext/view/sendmail.html.php'))
{
$viewFile = $modulePath . 'ext/view/sendmail.html.php';
chdir($modulePath . 'ext/view');
}
ob_start();
include $viewFile;
foreach(glob($modulePath . 'ext/view/sendmail.*.html.hook.php') as $hookFile) include $hookFile;
$mailContent = ob_get_contents();
ob_end_clean();
chdir($oldcwd);
$sendUsers = $this->getToAndCcList($doc);
if(!$sendUsers) return;
list($toList, $ccList) = $sendUsers;
$subject = $this->getSubject($doc, $action->action);
/* Send mail. */
$this->mail->send($toList, $subject, $mailContent, $ccList);
if($this->mail->isError()) trigger_error(join("\n", $this->mail->getError()));
}
/**
* Get mail subject.
*
* @param object $doc
* @param string $actionType created|edited
* @access public
* @return string
*/
public function getSubject($doc, $actionType)
{
/* Set email title. */
if($actionType == 'created')
{
return sprintf($this->lang->doc->mail->create->title, $this->app->user->realname, $doc->id, $doc->title);
}
else
{
return sprintf($this->lang->doc->mail->edit->title, $this->app->user->realname, $doc->id, $doc->title);
}
}
/**
* Get toList and ccList.
*
* @param object $doc
* @access public
* @return bool|array
*/
public function getToAndCcList($doc)
{
/* Set toList and ccList. */
$toList = '';
$ccList = str_replace(' ', '', trim($doc->mailto, ','));
if(empty($toList))
{
if(empty($ccList)) return false;
if(strpos($ccList, ',') === false)
{
$toList = $ccList;
$ccList = '';
}
else
{
$commaPos = strpos($ccList, ',');
$toList = substr($ccList, 0, $commaPos);
$ccList = substr($ccList, $commaPos + 1);
}
}
return array($toList, $ccList);
}
}
+11
View File
@@ -82,6 +82,17 @@
<th><?php echo $lang->doc->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<th><?php echo $lang->doc->mailto;?></th>
<td colspan="2">
<div class="input-group">
<?php
echo html::select('mailto[]', $users, '', "multiple class='form-control chosen'");
echo $this->fetch('my', 'buildContactLists');
?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->doclib->control;?></th>
<td colspan='2'>
+11
View File
@@ -59,6 +59,17 @@
<th><?php echo $lang->doc->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<th><?php echo $lang->doc->mailto;?></th>
<td colspan="2">
<div class="input-group">
<?php
echo html::select('mailto[]', $users, '', "multiple class='form-control chosen'");
echo $this->fetch('my', 'buildContactLists');
?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->doclib->control;?></th>
<td colspan='2'>
+2 -2
View File
@@ -37,7 +37,7 @@
<tbody>
<?php foreach($latestEditedDocs as $doc):?>
<tr data-url="<?php echo $this->createLink('doc', 'view', "docID={$doc->id}");?>">
<td class="c-name"><?php echo $doc->title;?></td>
<td class="c-name" title="<?php echo $doc->title?>"><?php echo $doc->title;?></td>
<td class="c-num text-right"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo $doc->editedDate == '0000-00-00 00:00:00' ? formatTime($doc->addedDate, 'Y-m-d') : formatTime($doc->editedDate, 'Y-m-d');?></td>
@@ -172,7 +172,7 @@
<tbody>
<?php foreach($myDocs as $doc):?>
<tr data-url="<?php echo $this->createLink('doc', 'view', "docID={$doc->id}");?>">
<td class="c-name"><?php echo $doc->title;?></td>
<td class="c-name" title="<?php echo $doc->title;?>"><?php echo $doc->title;?></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo formatTime($doc->editedDate) ? formatTime($doc->editedDate, 'Y-m-d') : formatTime($doc->addedDate, 'y-m-d');?></td>
</tr>
+35
View File
@@ -0,0 +1,35 @@
<?php
/**
* The sendmail file of doc module of ZenTaoPMS.
*
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Shujie Tian <tianshujie@easycorp.ltd>
* @package doc
* @version $Id: sendmail.html.php 3717 2020-11-03 15:35:07Z tianshujie@easycorp.ltd $
* @link https://www.zentao.net
*/
?>
<?php $mailTitle = 'DOCUMENT #' . $doc->id . ' ' . $doc->title;?>
<?php include $this->app->getModuleRoot() . 'common/view/mail.header.html.php';?>
<tr>
<td>
<table cellpadding='0' cellspacing='0' width='600' style='border: none; border-collapse: collapse;'>
<tr>
<td style='padding: 10px; background-color: #F8FAFE; border: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid #e5e5e5;'>
<?php $color = empty($doc->color) ? '#333' : $doc->color;?>
<?php echo html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink('doc', 'view', "docID=$doc->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style='padding: 10px; border: none;'>
<fieldset style='border: 1px solid #e5e5e5'>
<legend style='color: #114f8e'><?php echo $this->lang->doc->content;?></legend>
<div style='padding: 5px;'><?php echo $doc->content;?></div>
</fieldset>
</td>
</tr>
<?php include $this->app->getModuleRoot() . 'common/view/mail.footer.html.php';?>
+3
View File
@@ -26,6 +26,9 @@ class extension extends control
$statusFile = $this->loadModel('common')->checkSafeFile();
if($statusFile)
{
$this->view->title = $this->lang->extension->browse;
$this->view->position[] = $this->lang->extension->browse;
$this->view->error = sprintf($this->lang->extension->noticeOkFile, str_replace('\\', '/', $statusFile));
die($this->display('extension', 'safe'));
}
+3
View File
@@ -9,12 +9,14 @@ $config->message->objectTypes['bug'] = array('opened', 'edited', 'commen
$config->message->objectTypes['case'] = array('opened', 'edited', 'commented', 'reviewed', 'confirmed');
$config->message->objectTypes['testtask'] = array('opened', 'edited', 'started', 'blocked', 'closed', 'activated');
$config->message->objectTypes['todo'] = array('opened', 'edited');
$config->message->objectTypes['doc'] = array('created', 'edited');
$config->message->available = array();
$config->message->available['mail']['story'] = $config->message->objectTypes['story'];
$config->message->available['mail']['task'] = $config->message->objectTypes['task'];
$config->message->available['mail']['bug'] = $config->message->objectTypes['bug'];
$config->message->available['mail']['testtask'] = array('opened', 'edited', 'closed');
$config->message->available['mail']['doc'] = $config->message->objectTypes['doc'];
$config->message->available['webhook'] = $config->message->objectTypes;
@@ -23,6 +25,7 @@ $config->message->available['message']['story'] = $config->message->objectTyp
$config->message->available['message']['task'] = $config->message->objectTypes['task'];
$config->message->available['message']['testtask'] = $config->message->objectTypes['testtask'];
$config->message->available['message']['todo'] = $config->message->objectTypes['todo'];
$config->message->available['message']['doc'] = $config->message->objectTypes['doc'];
$config->message->typeLink = array();
$config->message->typeLink['mail'] = 'mail|index';
+3 -3
View File
@@ -412,7 +412,7 @@ class story extends control
$this->view->type = $type;
$this->view->branch = $branch;
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
$this->view->needReview = ($this->app->user->account == $product->PO || $this->config->story->needReview == 0) ? 0 : 1;
$this->view->needReview = ($this->app->user->account == $product->PO || $project > 0 || $this->config->story->needReview == 0) ? 0 : 1;
$this->display();
}
@@ -1219,10 +1219,10 @@ class story extends control
* @access public
* @return void
*/
public function bugs($storyID)
public function bugs($storyID, $projectID = 0)
{
$this->loadModel('bug');
$this->view->bugs = $this->bug->getStoryBugs($storyID);
$this->view->bugs = $this->bug->getStoryBugs($storyID, $projectID);
$this->view->users = $this->user->getPairs('noletter');
$this->display();
}
+7 -2
View File
@@ -738,11 +738,16 @@ class task extends control
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$users = $this->loadModel('user')->getPairs('noletter');
$members = $this->loadModel('project')->getTeamMemberPairs($task->project, 'nodeleted');
$assignedTo = in_array(zget($this->app->user->account, $users), $members) === TRUE ? $this->app->user->account : '';
$this->view->title = $this->view->project->name . $this->lang->colon .$this->lang->task->start;
$this->view->position[] = $this->lang->task->start;
$this->view->members = $this->loadModel('project')->getTeamMemberPairs($task->project, 'nodeleted');
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->users = $users;
$this->view->members = $members;
$this->view->assignedTo = $task->assignedTo == '' ? $assignedTo : $task->assignedTo;
$this->display();
}
+1 -1
View File
@@ -42,7 +42,7 @@
<tr>
<th class='w-90px'><?php echo $lang->task->assignedTo;?></th>
<td class='w-p25-f'>
<?php echo html::select('assignedTo', $members, $this->app->user->account, "class='form-control chosen'");?>
<?php echo html::select('assignedTo', $members, $assignedTo, "class='form-control chosen'");?>
</td>
<td></td>
</tr>
+2
View File
@@ -47,6 +47,7 @@ $config->testcase->search['fields']['branch'] = '';
$config->testcase->search['fields']['stage'] = $lang->testcase->stage;
$config->testcase->search['fields']['module'] = $lang->testcase->module;
$config->testcase->search['fields']['pri'] = $lang->testcase->pri;
$config->testcase->search['fields']['lib'] = $lang->testcase->lib;
$config->testcase->search['fields']['lastRunner'] = $lang->testcase->lastRunner;
$config->testcase->search['fields']['lastRunResult'] = $lang->testcase->lastRunResult;
@@ -66,6 +67,7 @@ $config->testcase->search['params']['status'] = array('operator' => '=',
$config->testcase->search['params']['product'] = array('operator' => '=', 'control' => 'select', 'values' => '');
$config->testcase->search['params']['branch'] = array('operator' => '=', 'control' => 'select', 'values' => '');
$config->testcase->search['params']['stage'] = array('operator' => 'include', 'control' => 'select', 'values' => $lang->testcase->stageList);
$config->testcase->search['params']['lib'] = array('operator' => '=', 'control' => 'select', 'values' => '');
$config->testcase->search['params']['lastRunner'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->testcase->search['params']['lastRunResult'] = array('operator' => '=', 'control' => 'select', 'values' => array_diff($lang->testcase->resultList, array('n/a' => $lang->testcase->resultList['n/a'])));
+5 -1
View File
@@ -108,9 +108,12 @@ class testcase extends control
/* Build the search form. */
$actionURL = $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID");
$this->config->testcase->search['onMenuBar'] = 'yes';
$libs = $this->loadModel('caselib')->getLibraries();
$this->config->testcase->search['params']['lib']['values'] = $libs;
$this->testcase->buildSearchForm($productID, $this->products, $queryID, $actionURL);
$showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : '';
$showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : '';
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
/* Assign. */
@@ -137,6 +140,7 @@ class testcase extends control
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
$this->view->suiteID = $suiteID;
$this->view->setModule = true;
$this->view->libs = $libs;
$this->display();
}