Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2019-04-04 10:40:16 +08:00
10 changed files with 72 additions and 48 deletions
+4
View File
@@ -332,6 +332,10 @@ class backup extends control
if(strtolower($this->server->request_method) == "post")
{
$data = fixer::input('post')->join('setting', ',')->get();
/*save change*/
if(isset($data->holdDays)) $this->loadModel('setting')->setItem('system.backup.holdDays', $data->holdDays);
$setting = '';
if(isset($data->setting)) $setting = $data->setting;
$this->loadModel('setting')->setItem('system.backup.setting', $setting);
+1 -1
View File
@@ -3,7 +3,7 @@ $lang->backup->common = 'Backup';
$lang->backup->index = 'Home';
$lang->backup->history = 'History';
$lang->backup->delete = 'Delete';
$lang->backup->backup = 'Backup';
$lang->backup->backup = 'Start backup';
$lang->backup->restore = 'Restore';
$lang->backup->change = 'Modify expiration';
$lang->backup->changeAB = 'Modify';
+2 -2
View File
@@ -3,9 +3,9 @@ $lang->backup->common = '备份';
$lang->backup->index = '备份首页';
$lang->backup->history = '备份历史';
$lang->backup->delete = '删除备份';
$lang->backup->backup = '备份';
$lang->backup->backup = '开始备份';
$lang->backup->restore = '还原';
$lang->backup->change = '修改保留时间';
$lang->backup->change = '保留时间';
$lang->backup->changeAB = '修改';
$lang->backup->rmPHPHeader = '去除安全设置';
-33
View File
@@ -1,33 +0,0 @@
<?php
/**
* The change view file of backup module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package backup
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->backup->change;?></h2>
</div>
<form method='post' target='hiddenwin' style='padding:10px 5%'>
<table class='w-p100'>
<tr>
<td>
<div class='input-group'>
<?php echo html::input('holdDays', $config->backup->holdDays, "class='form-control'");?>
<strong class='input-group-addon'><?php echo $lang->day;?></strong>
</div>
</td>
<td><?php echo html::submitButton('', '', 'btn btn-primary');?></td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
+8 -7
View File
@@ -18,21 +18,16 @@
<?php endif;?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('data');?></div>
<div class='btn-toolbar pull-right'>
<?php common::printLink('backup', 'setting', '', "<i class='icon icon-cog'></i>" . $lang->backup->setting, '', "data-width='400' class='iframe btn btn-primary'");?>
<?php common::printLink('backup', 'backup', 'reload=yes', "<i class='icon icon-copy'></i>" . $lang->backup->backup, 'hiddenwin', "class='iframe btn btn-primary backup'");?>
</div>
</div>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<?php echo $lang->backup->history?>
<span class='label label-info'><?php echo $lang->backup->restoreTip;?></span>
</h2>
<div class='pull-right'>
<?php printf($lang->backup->holdDays, $config->backup->holdDays)?>
<?php if(common::hasPriv('backup', 'change')) echo html::a(inlink('change'), $lang->backup->changeAB, '', "class='iframe btn btn-sm btn-info' data-width='300'");?>
<?php common::printLink('backup', 'setting', '', "<i class='icon icon-cog'></i>" . $lang->backup->setting, '', "data-width='400' class='iframe btn btn-primary'");?>
<?php common::printLink('backup', 'backup', 'reload=yes', "<i class='icon icon-copy'></i>" . $lang->backup->backup, 'hiddenwin', "class='iframe btn btn-primary backup'");?>
</div>
</div>
<table class='table table-condensed table-bordered active-disabled table-fixed'>
@@ -76,6 +71,12 @@
<?php endforeach;?>
</tbody>
</table>
<h2>
<span class='label label-info'>
<?php echo $lang->backup->restoreTip;?>
<?php printf($lang->backup->holdDays, $config->backup->holdDays)?>
</span>
</h2>
</div>
<div class="modal fade" id="waitting" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog w-300px">
+11
View File
@@ -32,6 +32,17 @@
</div>
</td>
</tr>
<?php if(common::hasPriv('backup', 'change')):?>
<tr>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->backup->change;?></span>
<?php echo html::input('holdDays', $config->backup->holdDays, "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->day;?></span>
</div>
</td>
</tr>
<?php endif;?>
<tr><td><?php echo html::submitButton('', '', 'btn btn-primary');?></td></tr>
</table>
</form>
@@ -1,4 +1,7 @@
<?php include '../../common/view/header.html.php';?>
<?php if($this->app->getClientLang() == 'en'):?>
<style>#conditions .col-xs { width: 126px; }</style>
<?php endif;?>
<div id='mainContent' class='main-row'>
<div class='side-col col-lg'>
<?php include 'blockreportlist.html.php';?>
+8
View File
@@ -155,6 +155,14 @@ class tree extends control
$title = $this->lang->tree->manageLine;
$position[] = $this->lang->tree->manageLine;
}
elseif($viewType == 'trainskill')
{
$this->lang->set('menugroup.tree', 'train');
$this->lang->tree->menu = $this->lang->trainskill->menu;
$title = $this->lang->tree->manageTrainskill;
$position[] = $this->lang->tree->manageTrainskill;
}
$parentModules = $this->tree->getParents($currentModuleID);
$this->view->title = $title;
+26
View File
@@ -982,6 +982,32 @@ class treeModel extends model
return html::a(helper::createLink('feedback', $this->app->methodName, "type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
}
/**
* Create link of trainskill.
*
* @param string $type
* @param object $module
* @access public
* @return string
*/
public function createTrainSkillLink($type, $module, $extra = '')
{
return html::a(helper::createLink('trainskill', 'browse', "type=byModule&param={$module->id}"), $module->name, '', "id='module{$module->id}'");
}
/**
* Create link of trainskill.
*
* @param string $type
* @param object $module
* @access public
* @return string
*/
public function createTrainCourseLink($type, $module, $extra = '')
{
return html::a(helper::createLink('traincourse', 'browse', "type=byModule&param={$module->id}"), $module->name, '', "id='module{$module->id}'");
}
/**
* Get sons of a module.
*
+9 -5
View File
@@ -15,7 +15,7 @@
<?php $this->app->loadLang('doc');?>
<?php $hasBranch = (strpos('story|bug|case', $viewType) !== false and (!empty($root->type) && $root->type != 'normal')) ? true : false;?>
<?php $name = $viewType == 'line' ? $lang->tree->line : (($viewType == 'doc' or $viewType == 'feedback') ? $lang->tree->cate : $lang->tree->name);?>
<?php $title = $viewType == 'line' ? '' : ((strpos($viewType, 'doc') !== false || strpos($viewType, 'feedback') !== false) ? $lang->doc->childType : $lang->tree->child);?>
<?php $title = $viewType == 'line' or $viewType == 'trainskill' ? '' : ((strpos($viewType, 'doc') !== false || strpos($viewType, 'feedback') !== false) ? $lang->doc->childType : $lang->tree->child);?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php $backLink = $this->session->{$viewType . 'List'} ? $this->session->{$viewType . 'List'} : 'javascript:history.go(-1)';?>
@@ -24,7 +24,7 @@
</a>
<div class="divider"></div>
<div class="page-title">
<?php $rootName = $viewType == 'line' ? '' : $root->name;?>
<?php $rootName = $viewType == 'line' or $viewType == 'trainskill' ? '' : $root->name;?>
<span class="text" title='<?php echo $rootName;?>'>
<?php
if($viewType == 'doc')
@@ -39,6 +39,10 @@
{
echo $lang->tree->manageLine;
}
elseif($viewType == 'trainskill')
{
echo $lang->tree->manageTrainskill;
}
else
{
echo $lang->tree->common . $lang->colon . $root->name;
@@ -64,7 +68,7 @@
<div class="panel-heading">
<div class="panel-title">
<?php $manageChild = 'manage' . ucfirst($viewType) . 'Child';?>
<?php echo strpos($viewType, 'doc') !== false ? $lang->doc->manageType : $lang->tree->$manageChild;?>
<?php if(strpos($viewType, 'trainskill') === false ) echo strpos($viewType, 'doc') !== false ? $lang->doc->manageType : $lang->tree->$manageChild;?>
</div>
<?php if($viewType == 'story' and $allProduct):?>
<div class="panel-actions btn-toolbar"><?php echo html::a('javascript:toggleCopy()', $lang->tree->syncFromProduct, '', "class='btn btn-sm'")?></div>
@@ -74,7 +78,7 @@
<form id='childrenForm' method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'manageChild', "root=$rootID&viewType=$viewType");?>'>
<table class='table table-form table-auto'>
<tr>
<?php if($viewType != 'line'):?>
<?php if($viewType != 'line' && $viewType != 'trainskill'):?>
<td class="text-middle text-right with-padding">
<?php
echo "<span>" . html::a($this->createLink('tree', 'browse', "root=$rootID&viewType=$viewType"), empty($root->name) ? '' : $root->name) . "<i class='icon icon-angle-right muted'></i></span>";
@@ -141,7 +145,7 @@
</td>
</tr>
<tr>
<?php if($viewType != 'line'):?>
<?php if($viewType != 'line' && $viewType != 'trainskill'):?>
<td></td>
<?php endif;?>
<td colspan="2" class="form-actions">