From fa574273ac1a1ef32a1db4cb2101012271e445ea Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 2 Apr 2021 15:54:43 +0800 Subject: [PATCH 1/6] * adjust for upgrade. --- module/group/lang/resource.php | 8 -------- module/upgrade/model.php | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 0c8c4367a9..486ea74f4f 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -93,8 +93,6 @@ $lang->resource->my->story = 'story'; $lang->resource->my->task = 'task'; $lang->resource->my->bug = 'bug'; $lang->resource->my->doc = 'doc'; -$lang->resource->my->issue = 'issue'; -$lang->resource->my->risk = 'risk'; $lang->resource->my->testtask = 'testtask'; $lang->resource->my->testcase = 'testcase'; $lang->resource->my->execution = 'execution'; @@ -122,8 +120,6 @@ $lang->my->methodOrder[95] = 'testtask'; $lang->my->methodOrder[100] = 'testcase'; $lang->my->methodOrder[105] = 'execution'; $lang->my->methodOrder[110] = 'doc'; -$lang->my->methodOrder[115] = 'issue'; -$lang->my->methodOrder[120] = 'risk'; /* Todo. */ $lang->resource->todo = new stdclass(); @@ -1199,8 +1195,6 @@ $lang->resource->user->cropAvatar = 'cropAvatar'; $lang->resource->user->profile = 'profile'; $lang->resource->user->batchEdit = 'batchEdit'; $lang->resource->user->unbind = 'unbind'; -$lang->resource->user->issue = 'issue'; -$lang->resource->user->risk = 'risk'; $lang->resource->user->setPublicTemplate = 'setPublicTemplate'; $lang->user->methodOrder[5] = 'create'; @@ -1213,8 +1207,6 @@ $lang->user->methodOrder[30] = 'todo'; $lang->user->methodOrder[35] = 'task'; $lang->user->methodOrder[40] = 'bug'; $lang->user->methodOrder[45] = 'project'; -$lang->user->methodOrder[50] = 'issue'; -$lang->user->methodOrder[55] = 'risk'; $lang->user->methodOrder[60] = 'dynamic'; $lang->user->methodOrder[65] = 'cropAvatar'; $lang->user->methodOrder[70] = 'profile'; diff --git a/module/upgrade/model.php b/module/upgrade/model.php index d75330bdea..a634baef52 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -640,6 +640,7 @@ class upgradeModel extends model $this->execSQL($this->getUpgradeFile('15.0')); $this->adjustWhitelistOfProject(); $this->adjustWhitelistOfProduct(); + $this->adjustPriv15_0(); $this->appendExec('15_0'); } From 0aa9ea65edb13824bcc13f9075f3d93c736b755e Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Fri, 2 Apr 2021 16:05:08 +0800 Subject: [PATCH 2/6] * Ajdust doc view. --- module/doc/control.php | 3 +-- module/doc/css/objectlibs.css | 7 +++++++ module/doc/model.php | 10 ++++++++-- module/doc/view/content.html.php | 24 +++++++++++++++++++++--- module/my/view/todo.html.php | 2 +- 5 files changed, 38 insertions(+), 8 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index df386e6754..9cd806c13f 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -920,8 +920,7 @@ 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', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), " " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe' data-width='70%'") : ''; - $this->lang->TRActions .= common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($type, $objectID, $libID) : ''; + $this->lang->TRActions = common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($type, $objectID, $libID) : ''; $moduleTree = $this->doc->getTreeMenu($type, $objectID, $libID, 0, $docID); diff --git a/module/doc/css/objectlibs.css b/module/doc/css/objectlibs.css index 712e87f486..ff4def431c 100644 --- a/module/doc/css/objectlibs.css +++ b/module/doc/css/objectlibs.css @@ -8,3 +8,10 @@ .main-col .block-files .panel-heading .panel-title {height: 35px; line-height: 30px;} .side-col .action a {margin: 0 auto 3px; display: block; max-width: 200px;} .side-col .tips {padding: 0 10px;} +.main-col .detail-title {display: flex;} +.main-col .detail-title .title {margin-right: 10px;} +.main-col .detail-title .info {flex: 1 1 0;} +.main-col .detail-title .actions i {font-size: 15px; color: #8c8c8c; margin-left: 2px;} +#sidebar {width: 250px;} +#sidebar>.cell {width: 220px;} +#sidebar>.sidebar-toggle {left: 5px; right: auto;} diff --git a/module/doc/model.php b/module/doc/model.php index c7b65b08e1..f55b87bb17 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1683,6 +1683,12 @@ class docModel extends model $html .= "
  • "; $html .= html::a(helper::createLink('doc', 'create', "type=$type&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey"), $typeName, '', "class='$class' data-app='{$this->app->openApp}'"); $html .= "
  • "; + + } + if(common::hasPriv('doc', 'createLib')) + { + $html .= '
  • '; + $html .= '
  • ' . html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), $this->lang->doc->createLib, '', "class='iframe' data-width='70%'") . '
  • '; } $html .= ""; @@ -1928,7 +1934,7 @@ EOF; foreach($moduleDocs[0] as $doc) { if(!$docID) $docID = $doc->id; - $treeMenu[0] .= '
  • ' . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$rootID&docID={$doc->id}"), $doc->title) . '
  • '; + $treeMenu[0] .= 'id == $docID ? ' class="active"' : '') . '>' . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$rootID&docID={$doc->id}"), $doc->title) . ''; } } @@ -1960,7 +1966,7 @@ EOF; foreach($moduleDocs[$module->id] as $doc) { if(!$docID) $docID = $doc->id; - $treeMenu[$module->id] .= '
  • ' . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID={$doc->id}"), $doc->title) . '
  • '; + $treeMenu[$module->id] .= 'id == $docID ? ' class="active"' : '') . '>' . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID={$doc->id}"), $doc->title) . ''; } } diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index 0e1d814cde..bf5c9fc490 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -1,9 +1,27 @@ +doc->confirmDelete);?>
    - title;?> +
    title;?>
    +
    +
    +
    +
    +
    +
    + id"), '', '', "title='{$lang->doc->edit}'"); + if(common::hasPriv('doc', 'delete')) + { + $deleteURL = $this->createLink('doc', 'delete', "docID=$doc->id&confirm=yes"); + echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"docList\", confirmDelete)", '', '', "title='{$lang->doc->delete}'"); + } + ?> + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> + id&objectType=doc");?>" title="doc->collect;?>" class='ajaxCollect'> +
    content ? $doc->content : 'çİş'; } ?> - files as $file):?> extension, $config->file->imageExtensions)):?>
    @@ -67,7 +84,8 @@
    -
    +