This commit is contained in:
hufangzhou
2021-07-28 14:34:55 +08:00
11 changed files with 54 additions and 22 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ class pager extends basePager
{
/* 如果设置了请求的原始方法名,则把其赋值给$this->methodName。*/
/* If the original method name of the request is set, assign it to $this->methodName. */
if(isset($this->app->rawMethod) and $this->app->rawModule != 'doc')
if(isset($this->app->rawMethod))
{
$this->methodName = $this->app->rawMethod;
}
+3 -3
View File
@@ -335,9 +335,9 @@ $lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent');
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect');
$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'product');
if($config->systemMode == 'new') $lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'project');
if($config->systemMode == 'classic') $lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'execution');
$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'showfiles,product');
if($config->systemMode == 'new') $lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
if($config->systemMode == 'classic') $lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'showfiles,execution');
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom');
$lang->doc->dividerMenu = ',product,';
+1 -6
View File
@@ -776,8 +776,6 @@ class doc extends control
$libs = $this->doc->getLibsByObject('product', $objectID);
$this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs);
$this->app->rawMethod = 'product';
}
else if($type == 'project')
{
@@ -787,8 +785,6 @@ class doc extends control
$libs = $this->doc->getLibsByObject('project', $objectID);
$this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs);
$this->app->rawMethod = 'project';
}
else if($type == 'execution')
{
@@ -797,8 +793,6 @@ class doc extends control
$libs = $this->doc->getLibsByObject('execution', $objectID);
$this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs);
$this->app->rawMethod = 'execution';
}
$openApp = strpos('doc,product,project,execution', $this->app->openApp) !== false ? $this->app->openApp : 'doc';
@@ -1230,6 +1224,7 @@ class doc extends control
$this->view->title = $title;
$this->view->type = $type;
$this->view->libs = $libs;
$this->view->objectID = $objectID;
$this->view->libID = $libID;
$this->view->moduleTree = $moduleTree;
+5
View File
@@ -39,6 +39,7 @@ $lang->doc->fileTitle = 'Dateiname';
$lang->doc->filePath = 'Dateipfad';
$lang->doc->extension = 'Erweiterung';
$lang->doc->size = 'Größe der Anlage';
$lang->doc->source = 'Source';
$lang->doc->download = 'Download';
$lang->doc->acl = 'Rechte';
$lang->doc->fileName = 'Files';
@@ -212,6 +213,10 @@ $lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can acces
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'Url';
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>";
$lang->doc->ge = ':';
$lang->doc->point = '.';
$lang->doclib = new stdclass();
$lang->doclib->name = 'Name';
$lang->doclib->control = 'Zugriffskontrolle';
+5
View File
@@ -40,6 +40,7 @@ $lang->doc->fileTitle = 'File Name';
$lang->doc->filePath = 'File Path';
$lang->doc->extension = 'Extension';
$lang->doc->size = 'Files Size';
$lang->doc->source = 'Source';
$lang->doc->download = 'Download';
$lang->doc->acl = 'Right';
$lang->doc->fileName = 'Files';
@@ -217,6 +218,10 @@ $lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can acces
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'URL';
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>";
$lang->doc->ge = ':';
$lang->doc->point = '.';
$lang->doclib = new stdclass();
$lang->doclib->name = 'Name';
$lang->doclib->control = 'Access Control';
+5
View File
@@ -39,6 +39,7 @@ $lang->doc->fileTitle = 'Nom du Fichier';
$lang->doc->filePath = 'Chemin Fichier';
$lang->doc->extension = 'Extension';
$lang->doc->size = 'Taille de la pièce jointe';
$lang->doc->source = 'Source';
$lang->doc->download = 'Téléchargement';
$lang->doc->acl = 'Droit';
$lang->doc->fileName = 'Fichiers';
@@ -212,6 +213,10 @@ $lang->doc->noticeAcl['doc']['private'] = 'Seulement celui qui a ajouté le docu
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'URL';
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>";
$lang->doc->ge = ':';
$lang->doc->point = '.';
$lang->doclib = new stdclass();
$lang->doclib->name = 'Nom';
$lang->doclib->control = "Contrôle d'Accès";
+5
View File
@@ -39,6 +39,7 @@ $lang->doc->fileTitle = 'File tên';
$lang->doc->filePath = 'File Path';
$lang->doc->extension = 'Extension';
$lang->doc->size = 'Cỡ miếng';
$lang->doc->source = 'Source';
$lang->doc->download = 'Tải về';
$lang->doc->acl = 'Right';
$lang->doc->fileName = 'Files';
@@ -212,6 +213,10 @@ $lang->doc->noticeAcl['doc']['private'] = 'Chỉ the one who created it có th
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'URL';
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>";
$lang->doc->ge = ':';
$lang->doc->point = '.';
$lang->doclib = new stdclass();
$lang->doclib->name = 'Tên';
$lang->doclib->control = 'Quyền truy cập';
+7 -2
View File
@@ -11,7 +11,7 @@
*/
/* 欄位列表。*/
$lang->doc->common = '文檔';
$lang->doc->id = '文檔編號';
$lang->doc->id = '文檔';
$lang->doc->product = '所屬' . $lang->productCommon;
$lang->doc->project = '所屬項目';
$lang->doc->execution = '所屬' . $lang->executionCommon;
@@ -36,10 +36,11 @@ $lang->doc->fileObject = '所屬對象';
$lang->doc->whiteList = '白名單';
$lang->doc->contentType = '文檔格式';
$lang->doc->separator = "<i class='icon-angle-right'></i>";
$lang->doc->fileTitle = '附件名';
$lang->doc->fileTitle = '附件名';
$lang->doc->filePath = '地址';
$lang->doc->extension = '類型';
$lang->doc->size = '附件大小';
$lang->doc->source = '來源';
$lang->doc->download = '下載';
$lang->doc->acl = '權限';
$lang->doc->fileName = '附件';
@@ -205,6 +206,10 @@ $lang->doc->noticeAcl['doc']['private'] = '只有創建者自己可以訪問。'
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = '相應的連結地址';
$lang->doc->summary = "本頁共 <strong>%s</strong> 個附件,共計 <strong>%s</strong>,其中<strong>%s</strong>。";
$lang->doc->ge = '個';
$lang->doc->point = '、';
$lang->doclib = new stdclass();
$lang->doclib->name = '文檔庫名稱';
$lang->doclib->control = '訪問控制';
+19 -7
View File
@@ -1069,7 +1069,7 @@ class docModel extends model
}
else
{
$objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere($type)->eq($objectID)->orderBy('`order`, id')->fetchAll('id');
$objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere($type)->eq($objectID)->andWhere('type')->eq($type)->orderBy('`order`, id')->fetchAll('id');
}
if($type == 'product')
@@ -1302,7 +1302,6 @@ class docModel extends model
->orWhere("(objectType = 'story' and objectID in ($storyIdList))")
->orWhere("(objectType = 'bug' and objectID in ($bugIdList))")
->orWhere("(objectType = 'release' and objectID in ($releaseIdList))")
->orWhere("(objectType = 'productplan' and objectID in ($planIdList))")
->orWhere("(objectType = 'testreport' and objectID in ($testReportIdList))")
->orWhere("(objectType = 'testcase' and objectID in ($caseIdList))")
->markRight(1)
@@ -1793,6 +1792,12 @@ class docModel extends model
return $html;
}
/**
* Build collect button from document.
*
* @access public
* @return string
*/
public function buildCollectButton4Doc()
{
$allLibs = array_keys($this->getLibs('all'));
@@ -2053,7 +2058,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')
if($type != 'custom' and $type != 'book')
{
$selected = empty($libID) ? 'selected' : '';
$output .= html::a(inlink('showFiles', "type=$type&objectID=$objectID"), $this->lang->doclib->files, '', "class='$selected' data-app='{$this->app->openApp}'");
@@ -2160,7 +2165,7 @@ class docModel extends model
foreach($moduleDocs[$module->id] as $doc)
{
if(!$docID and $currentMethod != 'tablecontents') $docID = $doc->id;
$treeMenu[$module->id] = '<li' . ($doc->id == $docID ? ' class="active"' : '') . '>';
$treeMenu[$module->id] .= '<li' . ($doc->id == $docID ? ' class="active"' : '') . '>';
if($currentMethod == 'tablecontents')
{
@@ -2221,10 +2226,17 @@ class docModel extends model
$extensionNum = count($extensionCount);
foreach($extensionCount as $extension => $count)
{
$extensionSummary .= $extension . ' ' . $count . $this->lang->doc->ge;
if(in_array($this->app->getClientLang(), ['zh-cn','zh-tw']))
{
$extensionSummary .= $extension . ' ' . $count . $this->lang->doc->ge;
$extensionNum--;
if(!empty($extensionNum)) $extensionSummary .= $this->lang->doc->point;
$extensionNum--;
if(!empty($extensionNum)) $extensionSummary .= $this->lang->doc->point;
}
else
{
$extensionSummary .= $extension . ' ' . $this->lang->doc->ge . ' ' . $count . $this->lang->doc->point;
}
}
return sprintf($this->lang->doc->summary, $filesCount, $sizeCount, $extensionSummary);
+2 -2
View File
@@ -42,7 +42,7 @@ if(empty($type)) $type = 'product';
echo "<div class='menu-actions'>";
echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");
echo "<ul class='dropdown-menu pull-left'>";
if($canManageMenu)
if($canManageMenu and !empty($libs))
{
echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=doc", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->doc->manageType, '', "class='iframe'") . '</li>';
echo "<li class='divider'></li>";
@@ -104,7 +104,7 @@ if(empty($type)) $type = 'product';
{
common::printLink('doc', 'manageBook', "bookID=$libID", $lang->doc->manageBook, '', "class='btn btn-info btn-wide'");
}
else
elseif(!empty($libs))
{
common::printLink('tree', 'browse', "rootID=$libID&view=doc", $lang->doc->manageType, '', "class='btn btn-info btn-wide iframe'", '', true);
}
+1 -1
View File
@@ -51,5 +51,5 @@ td.c-actions {overflow: visible;}
#cards .project-actions .menu-actions {padding-right: 20px;}
#cards .project-actions ul {min-width: 35px; padding: 5px 6px;}
#cards .project-actions .dropdown-hover:hover>.dropdown-menu ul, .open>.dropdown-menu ul {display: flex;}
#cards .btn.btn-action, .c-actions .btn {margin-bottom: -3px !important; margin-right: 5px;}
#cards .menu-actions .btn.btn-action {margin-bottom: -3px !important; margin-right: 5px;}
#cards .icon-ellipsis-v {font-size: 13px;}