+ add score switch of custom

This commit is contained in:
滔哥
2017-10-25 10:49:05 +08:00
parent deb8adaec6
commit 39b46a01cf
6 changed files with 67 additions and 1 deletions
+18
View File
@@ -275,6 +275,24 @@ class custom extends control
$this->display();
}
/**
* Set score display switch
*
* @access public
* @return void
*/
public function score()
{
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.global.score', $this->post->score);
die(js::reload('parent'));
}
$this->view->title = $this->lang->custom->score;
$this->display();
}
/**
* Ajax save custom fields.
*
+4
View File
@@ -15,6 +15,7 @@ $lang->custom->section = 'Section';
$lang->custom->lang = 'Language';
$lang->custom->setPublic = 'Set Public';
$lang->custom->required = 'Required';
$lang->custom->score = 'Score';
$lang->custom->object['story'] = 'Story';
$lang->custom->object['task'] = 'Task';
@@ -121,3 +122,6 @@ $lang->custom->workingList['onlyTask'] = 'Task';
$lang->custom->menuTip = 'Click to show/hide navigation bar. Drag to swtich display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->scoreList['off'] = 'Off';
$lang->custom->scoreList['on'] = 'On';
+4
View File
@@ -15,6 +15,7 @@ $lang->custom->section = '附加部分';
$lang->custom->lang = '所属语言';
$lang->custom->setPublic = '设为公共';
$lang->custom->required = '必填项';
$lang->custom->score = '积分';
$lang->custom->object['story'] = '需求';
$lang->custom->object['task'] = '任务';
@@ -121,3 +122,6 @@ $lang->custom->workingList['onlyTask'] = '任务管理工具';
$lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。';
$lang->custom->saveFail = '保存失败!';
$lang->custom->scoreList['off'] = '关闭';
$lang->custom->scoreList['on'] = '开启';
+4
View File
@@ -13,6 +13,7 @@ $lang->custom->owner = '所有者';
$lang->custom->module = '模組';
$lang->custom->section = '附加部分';
$lang->custom->lang = '所屬語言';
$lang->custom->score = '積分';
$lang->custom->object['story'] = '需求';
$lang->custom->object['task'] = '任務';
@@ -119,3 +120,6 @@ $lang->custom->workingList['onlyTask'] = '任務管理工具';
$lang->custom->menuTip = '點擊顯示或隱藏導航條目,拖拽來更改顯示順序。';
$lang->custom->saveFail = '保存失敗!';
$lang->custom->scoreList['off'] = '關閉';
$lang->custom->scoreList['on'] = '開啓';
+3 -1
View File
@@ -13,7 +13,9 @@
echo "</li><li id='workingTab'>";
common::printLink('custom', 'working', '', $lang->custom->working);
echo "</li><li id='requiredTab'>";
common::printLink('custom', 'required', '', $lang->custom->required);
common::printLink('custom', 'required', '', $lang->custom->required);
echo "</li><li id='scoreTab'>";
common::printLink('custom', 'score', '', $lang->custom->score);
echo '</li>';
?>
</ul>
+34
View File
@@ -0,0 +1,34 @@
<?php
/**
* The score view file of custom 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 Memory <lvtao@cnezsoft.com>
* @package custom
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include 'header.html.php'; ?>
<div class='main'>
<form method='post' class='form-condensed' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='w-100px text-top'><?php echo $lang->custom->score; ?></th>
<td><?php echo html::radio('score', $lang->custom->scoreList, isset($config->global->score) ? $config->global->score : 'off', '', 'block'); ?></td>
</tr>
<tr>
<td></td>
<td><?php echo html::submitButton() ?></td>
</tr>
</table>
</form>
</div>
<script>
$(function()
{
$('#featurebar #scoreTab').addClass('active');
$('.side #<?php echo $moduleName?>Tab').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php'; ?>