From 7ea182289228c01db6c141e81fd10a9b8a133fdf Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 23 Aug 2021 15:08:09 +0800 Subject: [PATCH] * Finish task #41784. --- module/block/view/welcome.html.php | 28 +++++++++++++++++++++++++++ module/common/lang/en.php | 1 + module/common/lang/menu.php | 5 +++-- module/common/lang/zh-cn.php | 4 +++- module/common/lang/zh-tw.php | 4 +++- module/common/model.php | 1 + module/my/control.php | 31 ++++++++++++++++++++++++++++++ module/my/lang/en.php | 2 ++ module/my/lang/zh-cn.php | 2 ++ module/my/lang/zh-tw.php | 2 ++ 10 files changed, 76 insertions(+), 4 deletions(-) diff --git a/module/block/view/welcome.html.php b/module/block/view/welcome.html.php index ef3936a9e3..bf8ccd42ac 100644 --- a/module/block/view/welcome.html.php +++ b/module/block/view/welcome.html.php @@ -26,6 +26,13 @@ .block-welcome.block-sm .tile-title {font-size: 12px; margin: 0 -10px;} .block-welcome .progress-group{margin-top: 20px;} .block-welcome .progress{margin-top: 10px; width: 85%} + +.block-welcome .tutorial {margin-top: 10px;} +.block-welcome .tutorial a {font-size: 14px; font-weight: 500;} +.block-welcome .tutorial a i.icon-guide {font-size: 20px; color: #16a8f8;} +.block-welcome .tutorial label {margin-bottom: 3px; padding: 3px 3px; border-radius: 50%;} +.block-welcome .tutorial label i {color: #fff;} +.block-welcome .tutorial i.icon-close:before {min-width: 14px;}
@@ -40,6 +47,12 @@ + tutorialHidden) or $config->tutorialHidden == '0'):?> +
+ " . $lang->tutorialAB, '', "class='text-muted'");?> + +
+

block->leftToday?>

@@ -70,3 +83,18 @@
+ diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 4fca53546d..d51fd2fdfe 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -38,6 +38,7 @@ $lang->profile = 'Profile'; $lang->changePassword = 'Password'; $lang->unfoldMenu = 'Unfold'; $lang->collapseMenu = 'Collapse'; +$lang->tutorialAB = 'Tutorial'; $lang->preference = 'Preference'; $lang->runInfo = "
Time %s MS, Memory %s KB, Query %s.
"; $lang->agreement = "I have read and agreed to the terms and conditions of Z PUBLIC LICENSE 1.2 . Without authorization, I should not remove, hide or cover any logos/links of ZenTao."; diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 9a51beb086..7b0a1921e9 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -135,8 +135,9 @@ $lang->program->menu->personnel['subMenu']->whitelist = array('link' => "{$lang /* Product menu. */ $lang->product->homeMenu = new stdclass(); -$lang->product->homeMenu->home = array('link' => "{$lang->dashboard}|product|index|"); -$lang->product->homeMenu->list = array('link' => $lang->product->list . '|product|all|', 'alias' => 'create,batchedit,manageline'); +$lang->product->homeMenu->home = array('link' => "{$lang->dashboard}|product|index|"); +$lang->product->homeMenu->list = array('link' => $lang->product->list . '|product|all|', 'alias' => 'create,batchedit,manageline'); +$lang->product->homeMenu->kanban = array('link' => "{$lang->product->kanban}|product|kanban|"); $lang->product->menu = new stdclass(); $lang->product->menu->dashboard = array('link' => "{$lang->dashboard}|product|dashboard|productID=%s"); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index fe567e17fa..e122278fdd 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -39,6 +39,7 @@ $lang->changePassword = '修改密码'; $lang->unfoldMenu = '展开导航'; $lang->collapseMenu = '收起导航'; $lang->preference = '个性化设置'; +$lang->tutorialAB = '新手引导'; $lang->runInfo = "
时间: %s 毫秒, 内存: %s KB, 查询: %s.
"; $lang->agreement = "已阅读并同意《Z PUBLIC LICENSE授权协议1.2》。未经许可,不得去除、隐藏或遮掩禅道软件的任何标志及链接。"; $lang->designedByAIUX = " 艾体验设计"; @@ -225,7 +226,8 @@ $lang->doc->execution = isset($config->maxVersion) ? "{$lang->execution->common} $lang->doc->custom = '自定义库'; $lang->doc->wiki = 'WIKI'; -$lang->product->list = $lang->productCommon . '列表'; +$lang->product->list = $lang->productCommon . '列表'; +$lang->product->kanban = $lang->productCommon . '看板'; $lang->project->report = '报告'; diff --git a/module/common/lang/zh-tw.php b/module/common/lang/zh-tw.php index 9280ba658d..b558571bd5 100644 --- a/module/common/lang/zh-tw.php +++ b/module/common/lang/zh-tw.php @@ -38,6 +38,7 @@ $lang->profile = '個人檔案'; $lang->changePassword = '修改密碼'; $lang->unfoldMenu = '展開導航'; $lang->collapseMenu = '收起導航'; +$lang->tutorialAB = '新手引導'; $lang->preference = '個性化設置'; $lang->runInfo = "
時間: %s 毫秒, 內存: %s KB, 查詢: %s.
"; $lang->agreement = "已閲讀並同意《Z PUBLIC LICENSE授權協議1.2》。未經許可,不得去除、隱藏或遮掩禪道軟件的任何標誌及連結。"; @@ -225,7 +226,8 @@ $lang->doc->execution = isset($config->maxVersion) ? "{$lang->execution->common} $lang->doc->custom = '自定義庫'; $lang->doc->wiki = 'WIKI'; -$lang->product->list = $lang->productCommon . '列表'; +$lang->product->list = $lang->productCommon . '列表'; +$lang->product->kanban = $lang->productCommon . '看板'; $lang->project->report = '報告'; diff --git a/module/common/model.php b/module/common/model.php index d5361be372..c3e24687e9 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -298,6 +298,7 @@ class commonModel extends model if(isset($lang->user->roleList[$app->user->role])) echo '
' . $lang->user->roleList[$app->user->role] . '
'; echo '
  • '; echo '
  • ' . html::a(helper::createLink('my', 'profile', '', '', true), " " . $lang->profile, '', "class='iframe' data-width='600'") . '
  • '; + echo '
  • ' . html::a(helper::createLink('my', 'tutorial'), " " . $lang->tutorialAB) . '
  • '; echo '
  • ' . html::a(helper::createLink('my', 'preference', '', '', true), " " . $lang->preference, '', "class='iframe' data-width='650'") . '
  • '; echo '
  • ' . html::a(helper::createLink('my', 'changepassword', '', '', true), " " . $lang->changePassword, '', "class='iframe' data-width='600'") . '
  • '; diff --git a/module/my/control.php b/module/my/control.php index 53f016724a..66d268244a 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -991,6 +991,37 @@ class my extends control $this->display(); } + /** + * Tutorial. + * + * @access public + * @return void + */ + public function tutorial() + { + $this->display(); + } + + /** + * Set the tutorial hidden in the welcome block. + * + * @access public + * @return void + */ + public function setTutorialConfig($confirm = 'no') + { + if($confirm == 'no') + { + die(js::confirm($this->lang->my->confirmCloseTutorial, $this->createLink('my', 'setTutorialConfig', 'confirm=yes'))); + } + else + { + $this->loadModel('setting')->setItem("{$this->app->user->account}.common.tutorialHidden", 1); + + die(js::locate($this->inLink('index'), 'parent')); + } + } + /** * User preference setting. * diff --git a/module/my/lang/en.php b/module/my/lang/en.php index 5795a6a935..2a65def134 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -122,3 +122,5 @@ $lang->my->guideChangeTheme = <<Click Avatar-Theme-Young Blue. It is done!

    EOT; + +$lang->my->confirmCloseTutorial = 'Do you want to close the tutorial? You can check it by hovering your avatar once you close it.'; diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index 6fd0e3f26e..a74f55e936 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -122,3 +122,5 @@ $lang->my->guideChangeTheme = <<鼠标经过【头像-主题-青春蓝】,点击青春蓝,设置成功!

    EOT; + +$lang->my->confirmCloseTutorial = '您确认要关闭该区块的新手引导功能吗?关闭后您还可以在个人中心中点击查看。'; diff --git a/module/my/lang/zh-tw.php b/module/my/lang/zh-tw.php index c0b822232a..d5968d6be3 100644 --- a/module/my/lang/zh-tw.php +++ b/module/my/lang/zh-tw.php @@ -122,3 +122,5 @@ $lang->my->guideChangeTheme = <<滑鼠經過【頭像-主題-青春藍】,點擊青春藍,設置成功!

    EOT; + +$lang->my->confirmCloseTutorial = '您確認要關閉該區塊的新手引導功能嗎?關閉後您還可以在個人中心中點擊查看。';