This commit is contained in:
hufangzhou
2021-07-26 11:45:02 +08:00
42 changed files with 484 additions and 211 deletions
+2
View File
@@ -28,6 +28,8 @@ $config->doc->editor->view = array('id' => 'comment,lastComment', 'tools' => '
$config->doc->markdown = new stdclass();
$config->doc->markdown->create = array('id' => 'contentMarkdown', 'tools' => 'withchange');
$config->doc->defaultShowNumber = 10;
$config->doc->search['module'] = 'doc';
$config->doc->search['fields']['title'] = $lang->doc->title;
$config->doc->search['fields']['id'] = $lang->doc->id;
+3 -2
View File
@@ -911,7 +911,8 @@ class doc extends control
$actionURL = $this->createLink('doc', 'browse', "lib=0&browseType=bySearch&queryID=myQueryID");
$this->doc->buildSearchForm(0, array(), 0, $actionURL, 'objectLibs');
$this->lang->TRActions = common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($type, $objectID, $libID) : '';
$this->lang->TRActions = $this->doc->buildCollectButton4Doc();
$this->lang->TRActions .= common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($type, $objectID, $libID) : '';
$moduleTree = $type == 'book' ? $this->doc->getBookStructure($libID) : $this->doc->getTreeMenu($type, $objectID, $libID, 0, $docID);
@@ -923,7 +924,7 @@ class doc extends control
if($doc->keywords)
{
$doc->keywords = preg_replace("/(\n)|(\s)|(\t)|(\')|(')|()/", ',', $doc->keywords);
$doc->keywords = preg_replace("/()/", ',', $doc->keywords);
$doc->keywords = explode(',', $doc->keywords);
}
+15 -14
View File
@@ -89,20 +89,21 @@ $lang->doc->cancelCollection = 'Favorit entfernen';
$lang->doc->deleteFile = 'Delete File';
$lang->doc->menuTitle = 'Menu';
$lang->doc->libName = 'Name';
$lang->doc->libType = 'Kategorie';
$lang->doc->custom = 'Eigene Dok Bibliothek';
$lang->doc->customAB = 'Eigene Bibliothek';
$lang->doc->createlib = 'Bibliothek erstellen';
$lang->doc->allLibs = 'Bibliothek';
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothek Liste";
$lang->doc->showFiles = 'Dok Bibliothek';
$lang->doc->editlib = 'Bibliothek bearbeiten';
$lang->doc->deleteLib = 'Bibliothek löschen';
$lang->doc->fixedMenu = 'Im Menü fixieren';
$lang->doc->removeMenu = 'Vom Menü entfernen';
$lang->doc->search = 'Suche';
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
$lang->doc->libName = 'Name';
$lang->doc->libType = 'Kategorie';
$lang->doc->custom = 'Eigene Dok Bibliothek';
$lang->doc->customAB = 'Eigene Bibliothek';
$lang->doc->createlib = 'Bibliothek erstellen';
$lang->doc->allLibs = 'Bibliothek';
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothek Liste";
$lang->doc->showFiles = 'Dok Bibliothek';
$lang->doc->editlib = 'Bibliothek bearbeiten';
$lang->doc->deleteLib = 'Bibliothek löschen';
$lang->doc->fixedMenu = 'Im Menü fixieren';
$lang->doc->removeMenu = 'Vom Menü entfernen';
$lang->doc->search = 'Suche';
$lang->doc->allCollections = 'All Collections';
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
/* 查询条件列表 */
$lang->doc->allProduct = 'Alle' . $lang->productCommon;
+15 -14
View File
@@ -92,20 +92,21 @@ $lang->doc->menuTitle = 'Menu';
$lang->doc->collectAction = 'Add Favorite';
$lang->doc->libName = 'Document Library';
$lang->doc->libType = 'Category';
$lang->doc->custom = 'Custom Document Library';
$lang->doc->customAB = 'Custom Doc Lib';
$lang->doc->createLib = 'Create Document Library';
$lang->doc->allLibs = 'Library List';
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Libraries";
$lang->doc->showFiles = 'Attachments';
$lang->doc->editLib = 'Edit Document Library';
$lang->doc->deleteLib = 'Delete Document Library';
$lang->doc->fixedMenu = 'Fix to Menu';
$lang->doc->removeMenu = 'Remove from Menu';
$lang->doc->search = 'Search';
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
$lang->doc->libName = 'Document Library';
$lang->doc->libType = 'Category';
$lang->doc->custom = 'Custom Document Library';
$lang->doc->customAB = 'Custom Doc Lib';
$lang->doc->createLib = 'Create Document Library';
$lang->doc->allLibs = 'Library List';
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Libraries";
$lang->doc->showFiles = 'Attachments';
$lang->doc->editLib = 'Edit Document Library';
$lang->doc->deleteLib = 'Delete Document Library';
$lang->doc->fixedMenu = 'Fix to Menu';
$lang->doc->removeMenu = 'Remove from Menu';
$lang->doc->search = 'Search';
$lang->doc->allCollections = 'All Collections';
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
global $config;
/* Query condition list. */
+15 -14
View File
@@ -89,20 +89,21 @@ $lang->doc->cancelCollection = 'Retirer des Favoris';
$lang->doc->deleteFile = 'Supprimer Fichier';
$lang->doc->menuTitle = 'Menu';
$lang->doc->libName = 'Bibliothèque de Documents';
$lang->doc->libType = 'Catégorie';
$lang->doc->custom = 'Personnaliser Bibliothèque de Documents';
$lang->doc->customAB = 'Person. Bib Doc';
$lang->doc->createlib = 'Créer une Bibliothèque';
$lang->doc->allLibs = 'Liste des Bibliothèque';
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothèque";
$lang->doc->showFiles = 'Pièces Jointes';
$lang->doc->editlib = 'Editer Bibliothèque';
$lang->doc->deleteLib = 'Supprimer Bibliothèque';
$lang->doc->fixedMenu = 'Coller au Menu';
$lang->doc->removeMenu = 'Décoller du Menu';
$lang->doc->search = 'Rechercher';
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
$lang->doc->libName = 'Bibliothèque de Documents';
$lang->doc->libType = 'Catégorie';
$lang->doc->custom = 'Personnaliser Bibliothèque de Documents';
$lang->doc->customAB = 'Person. Bib Doc';
$lang->doc->createlib = 'Créer une Bibliothèque';
$lang->doc->allLibs = 'Liste des Bibliothèque';
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothèque";
$lang->doc->showFiles = 'Pièces Jointes';
$lang->doc->editlib = 'Editer Bibliothèque';
$lang->doc->deleteLib = 'Supprimer Bibliothèque';
$lang->doc->fixedMenu = 'Coller au Menu';
$lang->doc->removeMenu = 'Décoller du Menu';
$lang->doc->search = 'Rechercher';
$lang->doc->allCollections = 'All Collections';
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
/* 查询条件列表 */
$lang->doc->allProduct = 'Tous les' . $lang->productCommon . 's';
+15 -14
View File
@@ -89,20 +89,21 @@ $lang->doc->cancelCollection = 'Remove Favorite';
$lang->doc->deleteFile = 'Xóa File';
$lang->doc->menuTitle = 'Menu';
$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->executionCommon} 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->keywordsTips = 'Please use commas to separate multiple keywords.';
$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->executionCommon} 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->allCollections = 'All Collections';
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
/* Query condition list. */
$lang->doc->allProduct = 'All' . $lang->productCommon;
+1
View File
@@ -105,6 +105,7 @@ $lang->doc->deleteLib = '删除文档库';
$lang->doc->fixedMenu = '固定到菜单栏';
$lang->doc->removeMenu = '从菜单栏移除';
$lang->doc->search = '搜索';
$lang->doc->allCollections = '全部收藏文档';
$lang->doc->keywordsTips = '多个关键字请用逗号分隔。';
global $config;
+42
View File
@@ -1676,6 +1676,47 @@ class docModel extends model
return $html;
}
public function buildCollectButton4Doc()
{
$allLibs = array_keys($this->getLibs('all'));
$docs = $this->dao->select('t1.id,t1.title,t1.lib,t2.type,t2.product,t2.project,t2.execution')->from(TABLE_DOC)->alias('t1')
->leftJoin(TABLE_DOCLIB)->alias('t2')->on('t1.lib=t2.id')
->where('t1.deleted')->eq(0)
->andWhere('t1.lib')->in($allLibs)
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
->andWhere('t1.collector')->like("%,{$this->app->user->account},%")
->orderBy('t1.id_desc')
->limit($this->config->doc->defaultShowNumber)
->fetchAll();
$html = "<div class='btn-group dropdown-hover'>";
$html .= "<a href='javascript:;' class='btn btn-link' data-toggle='dropdown'>{$this->lang->doc->myCollection}</a>";
$html .= "<ul class='dropdown-menu'>";
if(empty($docs)) $html .= "<li>{$this->lang->noData}</li>";
foreach($docs as $doc)
{
$objectID = 0;
if($doc->type == 'product') $objectID = $doc->product;
if($doc->type == 'project') $objectID = $doc->project;
if($doc->type == 'execution') $objectID = $doc->execution;
$html .= '<li>' . html::a(inlink('objectLibs', "type={$doc->type}&objectID=$objectID&libID={$doc->lib}&docID={$doc->id}"), "<i class='icon icon-file-text'></i>" . $doc->title, '', "data-app='{$this->app->openApp}'") . '</li>';
}
$collectionCount = $this->dao->select('count(id) as count')->from(TABLE_DOC)
->where('deleted')->eq(0)
->andWhere('lib')->in($allLibs)
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
->andWhere('collector')->like("%,{$this->app->user->account},%")
->fetch('count');
if($collectionCount > 10) $html .= '<li>' . html::a(inlink('browse', "type=collectedByMe"), $this->lang->doc->allCollections) . '</li>';
$html .= '</ul></div>';
return $html;
}
/**
* Set past menu.
*
@@ -1875,6 +1916,7 @@ class docModel extends model
$selected = $key == $libID ? 'selected' : '';
$output .= html::a(inlink($methodName, "type=$type&objectID=$objectID&libID=$key"), $lib->name, '', "class='$selected' data-app='{$this->app->openApp}'");
}
if($type != 'custom') $output .= html::a(inlink('showFiles', "type=$type&objectID=$objectID"), $this->lang->doclib->files, '', "data-app='{$this->app->openApp}'");
$output .= "</div></div></div></div></div>";
}