* Finish task #42143.

This commit is contained in:
liyuchun
2021-09-09 19:44:03 +08:00
parent b8e19bf4fc
commit 974633de86
13 changed files with 97 additions and 84 deletions
+3
View File
@@ -130,6 +130,7 @@ $config->openMethods[] = 'misc.about';
$config->openMethods[] = 'misc.checkupdate';
$config->openMethods[] = 'misc.ping';
$config->openMethods[] = 'misc.captcha';
$config->openMethods[] = 'misc.features';
$config->openMethods[] = 'sso.login';
$config->openMethods[] = 'sso.logout';
$config->openMethods[] = 'sso.bind';
@@ -260,6 +261,8 @@ $config->objectTables['team'] = TABLE_TEAM;
$config->objectTables['pipeline'] = TABLE_PIPELINE;
$config->objectTables['mr'] = TABLE_MR;
$config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme');
/* Program privs.*/
$config->programPriv = new stdclass();
$config->programPriv->scrum = array('product', 'story', 'productplan', 'release', 'projectrelease', 'project', 'task', 'build', 'qa', 'bug', 'testcase', 'testsuite', 'testreport', 'caselib', 'doc', 'report', 'repo', 'svn', 'git', 'search', 'tree', 'file', 'jenkins', 'gitlab', 'job', 'ci', 'branch');
+27
View File
@@ -250,9 +250,36 @@ class misc extends control
/**
* Features dialog.
*
* @access public
* @return void
*/
public function features()
{
$features = array();
foreach($this->config->newFeatures as $feature)
{
$accounts = zget($this->config->global, 'skip' . ucfirst($feature), '');
if(strpos(",$accounts,", $this->app->user->account) === false) $features[] = $feature;
}
$this->app->loadLang('install');
$this->view->features = $features;
$this->display();
}
/**
* Save viewed feature.
*
* @param string $feature
* @access public
* @return void
*/
public function ajaxSaveViewed($feature)
{
$accounts = zget($this->config->global, 'skip' . ucfirst($feature), '');
if(strpos(",$accounts,", $this->app->user->account) === false) $accounts .= ',' . $this->app->user->account;
$this->loadModel('setting')->setItem('system.common.global.skip' . ucfirst($feature), $accounts);
}
}
+9 -1
View File
@@ -6,6 +6,12 @@ $(function()
$('#featuresCarousel').carousel('next');
});
$('#features').on('click', '.btn-close-modal', function()
{
var feature = features[features.length - 1];
$.post(createLink('misc', 'ajaxSaveViewed', 'feature=' + feature));
});
$('#featuresCarousel').on('slide.zui.carousel', function(e)
{
var $next = $(e.relatedTarget);
@@ -19,9 +25,11 @@ $(function()
$nav.find('li.active').removeClass('active');
$nav.find('a[data-slide-to="' + index + '"]').parent().addClass('active');
$features.toggleClass('is-last-item', isLastItem);
if(isLastItem) $features.addClass('enabled');
var feature = features[index - 1];
if(feature) $.post(createLink('misc', 'ajaxSaveViewed', 'feature=' + feature));
});
$('#features').toggleClass('is-last-item', $('#featuresCarousel>.carousel-inner>.item').length < 2);
+6 -3
View File
@@ -83,11 +83,14 @@ $lang->misc->noticeRepair = "<h5>If you are not Administrator, contact your ZenT
$lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = 'Latest Version';
$lang->misc->feature->detailed = 'Detail';
$lang->misc->feature->introduction = 'New features';
$lang->misc->feature->tutorial = 'Novice tutorial';
$lang->misc->feature->brandBlueTheme = 'Bran new theme "Young Blue"';
$lang->misc->feature->introduction = 'Features';
$lang->misc->feature->tutorial = 'Tutorial';
$lang->misc->feature->youngBlueTheme = 'Young Blue Theme';
$lang->misc->feature->nextStep = 'Next step';
$lang->misc->feature->close = 'Close';
$lang->misc->feature->downloadFile = 'Download introduction';
$lang->misc->feature->tutorialDesc = '<p>ZenTao 15.0 has new functions, and you know how to use it through the "<strong>Tutorial</strong>".</p><p>Click your [<span style="color: #0c60e1">Avatar-Theme-Young Blue</span>] to set it.</p>';
$lang->misc->feature->themeDesc = '<p>ZenTao 15.0+ a new "Youth Blue" theme, the pages are more beautiful and the experience is more friendly.</p><p>Click your [<span style="color: #0c60e1">Avatar-Theme-Young Blue</span>] to set it.</p>';
$lang->misc->releaseDate['15.4'] = '2021-08-23';
$lang->misc->releaseDate['15.3'] = '2021-08-04';
+4 -1
View File
@@ -85,9 +85,12 @@ $lang->misc->feature->lastest = '最新版本';
$lang->misc->feature->detailed = '详情';
$lang->misc->feature->introduction = '新功能介绍';
$lang->misc->feature->tutorial = '新手引导教程';
$lang->misc->feature->brandBlueTheme = '全新青春蓝主题';
$lang->misc->feature->youngBlueTheme = '全新青春蓝主题';
$lang->misc->feature->nextStep = '下一步';
$lang->misc->feature->close = '关闭';
$lang->misc->feature->downloadFile = '下载新版本功能介绍文档';
$lang->misc->feature->tutorialDesc = "<p>禅道15系列新增了多项功能,您可以通过“<strong>新手引导教程</strong>”快速了解禅道的基本使用方法。</p><p>通过鼠标经过 [<span style='color: #0c60e1'>头像-新手引导</span>],点击新手引导,即可进入新手引导教程。</p>";
$lang->misc->feature->themeDesc = "<p>禅道15系列上线了全新的“青春蓝”主题,页面呈现更加美观,体验更加友好。</p><p>通过鼠标经过 [<span style='color: #0c60e1'>头像-主题-青春蓝</span>],点击青春蓝,即可设置成功。</p>";
$lang->misc->releaseDate['15.4'] = '2021-08-23';
$lang->misc->releaseDate['15.3'] = '2021-08-04';
+27 -22
View File
@@ -1,43 +1,48 @@
<?php include '../../common/view/header.lite.html.php';?>
<?php include '../../common/view/carousel.html.php';?>
<?php js::set('features', $features);?>
<main id='features'>
<header>
<ul class='nav nav-simple' id='featuresNav'>
<li class='active'><a class='slide-feature-to' data-slide-to='0' href='#featuresCarousel'><?php echo $lang->misc->feature->introduction; ?></a></li>
<li><a class='slide-feature-to' data-slide-to='1' href='#featuresCarousel'><?php echo $lang->misc->feature->tutorial; ?></a></li>
<li><a class='slide-feature-to' data-slide-to='2' href='#featuresCarousel'><?php echo $lang->misc->feature->brandBlueTheme; ?></a></li>
<?php foreach($features as $key => $feature): ?>
<li <?php echo $key == 0 ? "class='active'" : '';?>><a class='slide-feature-to' data-slide-to='<?php echo $key;?>' href='#featuresCarousel'><?php echo $lang->misc->feature->$feature; ?></a></li>
<?php endforeach;?>
</ul>
</header>
<div id='featuresCarousel' class='carousel slide' data-ride='carousel' data-interval='false'>
<ol class='carousel-indicators'>
<li data-target='#featuresCarousel' data-slide-to='0' class='active'></li>
<li data-target='#featuresCarousel' data-slide-to='1'></li>
<li data-target='#featuresCarousel' data-slide-to='2'></li>
<?php foreach($features as $key => $feature): ?>
<li data-target='#featuresCarousel' data-slide-to='<?php echo $key;?>' <?php echo $key == 0 ? "class='active'" : ''?>></li>
<?php endforeach;?>
</ol>
<div class='carousel-inner'>
<div class='item active' style='height: 400px'>
<div class='article-content'>
<img src='http://openzui.com/docs/img/slide1.jpg'>
<div style='position:relative'>
<p>禅道15系列功能介绍</p>
<div style='position:absolute;right:0;bottom:0'>
<a href="###">下载新版本功能介绍文档</a>
<?php foreach($features as $key => $feature): ?>
<div class='item <?php echo $key == 0 ? 'active' : '';?>' style='height: 400px'>
<?php if($feature == 'introduction'):?>
<div class='article-content text-center'>
<video src="<?php echo $lang->install->guideVideo;?>" height="320px" controls ="controls"></video>
<div class='text-center' style='position:relative'>
<p><?php echo $lang->install->introduction;?></p>
<div style='position: absolute; right: 0; bottom: 0;'>
<a href='https://dl.cnezsoft.com/zentao/zentaoconcept.pdf' target='_blank'><?php echo $lang->misc->feature->downloadFile;?></a>
</div>
</div>
</div>
</div>
<div class='item' style='height: 400px'>
<img src='http://openzui.com/docs/img/slide2.jpg'>
<div class='carousel-caption'>
此页面包含整张图片,文字呈现在图片之上
<?php elseif($feature == 'tutorial'):?>
<div class='text-center'>
<?php echo $lang->misc->feature->tutorialDesc;?>
<img class='text-center' src='<?php echo $config->webRoot . 'theme/default/images/main/tutorial.png';?>' />
</div>
<?php elseif($feature == 'youngBlueTheme'):?>
<div class='text-center'>
<?php echo $lang->misc->feature->themeDesc;?>
<img class='text-center' src='<?php echo $config->webRoot . 'theme/default/images/main/new_theme.png';?>' />
</div>
<?php endif;?>
</div>
<div class='item' style='height: 400px'>
<img alt='Third slide' src='http://openzui.com/docs/img/slide3.jpg'>
<div class='carousel-caption'></div>
</div>
<?php endforeach;?>
</div>
</div>
<footer>
+8 -26
View File
@@ -32,12 +32,15 @@ class my extends control
*/
public function index()
{
$skipThemeGuide = true;
$accounts = zget($this->config->global, 'skipThemeGuide', '');
if(strpos(",$accounts,", $this->app->user->account) === false) $skipThemeGuide = false;
$showFeatures = false;
foreach($this->config->newFeatures as $feature)
{
$accounts = zget($this->config->global, 'skip' . ucfirst($feature), '');
if(strpos(",$accounts,", $this->app->user->account) === false) $showFeatures = true;
}
$this->view->title = $this->lang->my->common;
$this->view->skipThemeGuide = $skipThemeGuide;
$this->view->title = $this->lang->my->common;
$this->view->showFeatures = $showFeatures;
$this->display();
}
@@ -850,27 +853,6 @@ class my extends control
$this->display();
}
/**
* Guide the user to change the theme.
*
* @param string $saveSkipUser
* @access public
* @return void
*/
public function guideChangeTheme($saveSkipUser = false)
{
if($saveSkipUser)
{
$accounts = zget($this->config->global, 'skipThemeGuide', '');
if(strpos(",$accounts,", $this->app->user->account) === false) $accounts .= ',' . $this->app->user->account;
$this->loadModel('setting')->setItem('system.common.global.skipThemeGuide', $accounts);
}
else
{
$this->display();
}
}
/**
* Manage contacts.
*
-8
View File
@@ -1,8 +0,0 @@
$(function()
{
setTimeout(function()
{
var link = createLink('my', 'guideChangeTheme', 'saveSkipUser=true');
$.get(link);
}, 500)
})
+12 -1
View File
@@ -1,6 +1,6 @@
$(function()
{
if(!skipThemeGuide) $('#changeTheme').click();
if(showFeatures) showFeaturesDialog();
/* Set the heights of every block to keep them same height. */
projectBoxHeight = $('#projectbox').height();
@@ -37,3 +37,14 @@ $(function()
$(this).find('.fixedHead').css('top',$(this).scrollTop());
});
});
/**
* Show features dialog.
*
* @access public
* @return void
*/
function showFeaturesDialog()
{
$.zui.modalTrigger.show({url: $.createLink('misc', 'features'), type: 'ajax', width: 900, showHeader: false})
}
-20
View File
@@ -1,20 +0,0 @@
<?php
/**
* The guide change theme of story module of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Liyuchun <liyuchun@cnezsoft.com>
* @package my
* @version $Id: changetheme.html.php 4129 2021-07-26 16:38:14Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div class='main-content'>
<div class="main-body text-center">
<?php echo $lang->my->guideChangeTheme;?>
<img src='<?php echo $config->webRoot . 'theme/default/images/main/new_theme.png';?>' />
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+1 -2
View File
@@ -10,7 +10,6 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('skipThemeGuide', $skipThemeGuide);?>
<?php js::set('showFeatures', $showFeatures);?>
<?php echo $this->fetch('block', 'dashboard', 'module=my');?>
<?php echo html::a($this->createLink('my', 'guidechangeTheme', '', '', true), $lang->theme, '', 'class="iframe hidden" id="changeTheme" data-width="600px"');?>
<?php include '../../common/view/footer.html.php';?>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB