* Finish task #41784.

This commit is contained in:
hufangzhou
2021-08-23 15:08:09 +08:00
parent 15f32acefe
commit 7ea1822892
10 changed files with 76 additions and 4 deletions
+28
View File
@@ -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;}
</style>
<?php $progress = $tasks == 0 ? 0 : round($doneTasks / $tasks, 3) * 100;?>
<div class='panel-move-handler'></div>
@@ -40,6 +47,12 @@
</div>
</div>
</div>
<?php if(!isset($config->tutorialHidden) or $config->tutorialHidden == '0'):?>
<div class="tutorial">
<?php echo html::a(helper::createLink('my', 'tutorial'), "<i class='icon icon-guide'></i> " . $lang->tutorialAB, '', "class='text-muted'");?>
<label class="label label-light label-badge hidden"><i class="icon icon-close"></i></label>
</div>
<?php endif;?>
</div>
<div class="col col-right">
<h4><small class="text-muted"><?php echo date(DT_DATE3)?></small> <?php echo $lang->block->leftToday?></h4>
@@ -70,3 +83,18 @@
</div>
</div>
</div>
<script>
$('.tutorial').hover(function()
{
$('.tutorial label').removeClass('hidden');
}, function()
{
$('.tutorial label').addClass('hidden');
});
$(document).on('click', '.tutorial label', function()
{
hiddenwin.location.href = createLink('my', 'setTutorialConfig');
})
</script>
+1
View File
@@ -38,6 +38,7 @@ $lang->profile = 'Profile';
$lang->changePassword = 'Password';
$lang->unfoldMenu = 'Unfold';
$lang->collapseMenu = 'Collapse';
$lang->tutorialAB = 'Tutorial';
$lang->preference = 'Preference';
$lang->runInfo = "<div class='row'><div class='u-1 a-center' id='debugbar'>Time %s MS, Memory %s KB, Query %s. </div></div>";
$lang->agreement = "I have read and agreed to the terms and conditions of <a href='http://zpl.pub/page/zplv12.html' target='_blank'> Z PUBLIC LICENSE 1.2 </a>. <span class='text-danger'>Without authorization, I should not remove, hide or cover any logos/links of ZenTao.</span>";
+3 -2
View File
@@ -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");
+3 -1
View File
@@ -39,6 +39,7 @@ $lang->changePassword = '修改密码';
$lang->unfoldMenu = '展开导航';
$lang->collapseMenu = '收起导航';
$lang->preference = '个性化设置';
$lang->tutorialAB = '新手引导';
$lang->runInfo = "<div class='row'><div class='u-1 a-center' id='debugbar'>时间: %s 毫秒, 内存: %s KB, 查询: %s. </div></div>";
$lang->agreement = "已阅读并同意<a href='http://zpl.pub/page/zplv12.html' target='_blank'>《Z PUBLIC LICENSE授权协议1.2》</a>。<span class='text-danger'>未经许可,不得去除、隐藏或遮掩禅道软件的任何标志及链接。</span>";
$lang->designedByAIUX = "<a href='https://api.zentao.net/goto.php?item=aiux' class='link-aiux' target='_blank'><i class='icon icon-aiux'></i> 艾体验设计</a>";
@@ -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 = '报告';
+3 -1
View File
@@ -38,6 +38,7 @@ $lang->profile = '個人檔案';
$lang->changePassword = '修改密碼';
$lang->unfoldMenu = '展開導航';
$lang->collapseMenu = '收起導航';
$lang->tutorialAB = '新手引導';
$lang->preference = '個性化設置';
$lang->runInfo = "<div class='row'><div class='u-1 a-center' id='debugbar'>時間: %s 毫秒, 內存: %s KB, 查詢: %s. </div></div>";
$lang->agreement = "已閲讀並同意<a href='http://zpl.pub/page/zplv12.html' target='_blank'>《Z PUBLIC LICENSE授權協議1.2》</a>。<span class='text-danger'>未經許可,不得去除、隱藏或遮掩禪道軟件的任何標誌及連結。</span>";
@@ -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 = '報告';
+1
View File
@@ -298,6 +298,7 @@ class commonModel extends model
if(isset($lang->user->roleList[$app->user->role])) echo '<div class="user-profile-role">' . $lang->user->roleList[$app->user->role] . '</div>';
echo '</a></li><li class="divider"></li>';
echo '<li>' . html::a(helper::createLink('my', 'profile', '', '', true), "<i class='icon icon-account'></i> " . $lang->profile, '', "class='iframe' data-width='600'") . '</li>';
echo '<li>' . html::a(helper::createLink('my', 'tutorial'), "<i class='icon icon-guide'></i> " . $lang->tutorialAB) . '</li>';
echo '<li>' . html::a(helper::createLink('my', 'preference', '', '', true), "<i class='icon icon-controls'></i> " . $lang->preference, '', "class='iframe' data-width='650'") . '</li>';
echo '<li>' . html::a(helper::createLink('my', 'changepassword', '', '', true), "<i class='icon icon-cog-outline'></i> " . $lang->changePassword, '', "class='iframe' data-width='600'") . '</li>';
+31
View File
@@ -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.
*
+2
View File
@@ -122,3 +122,5 @@ $lang->my->guideChangeTheme = <<<EOT
<p>Click <span style='color: #0c60e1'>Avatar-Theme-Young Blue</span>. It is done!</p>
</div>
EOT;
$lang->my->confirmCloseTutorial = 'Do you want to close the tutorial? You can check it by hovering your avatar once you close it.';
+2
View File
@@ -122,3 +122,5 @@ $lang->my->guideChangeTheme = <<<EOT
<p>鼠标经过<span style='color: #0c60e1'>【头像-主题-青春蓝】</span>,点击青春蓝,设置成功!</p>
</div>
EOT;
$lang->my->confirmCloseTutorial = '您确认要关闭该区块的新手引导功能吗?关闭后您还可以在个人中心中点击查看。';
+2
View File
@@ -122,3 +122,5 @@ $lang->my->guideChangeTheme = <<<EOT
<p>滑鼠經過<span style='color: #0c60e1'>【頭像-主題-青春藍】</span>,點擊青春藍,設置成功!</p>
</div>
EOT;
$lang->my->confirmCloseTutorial = '您確認要關閉該區塊的新手引導功能嗎?關閉後您還可以在個人中心中點擊查看。';