* Task #5423
This commit is contained in:
yfl
2019-05-06 16:33:10 +08:00
13 changed files with 538 additions and 454 deletions
-28
View File
@@ -323,34 +323,6 @@ class custom extends control
$this->display();
}
/**
*Set dynamic recode what action
*
* @access public
* @return void
*/
public function setDynamic()
{
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$actions = $this->post->actions;
$actions = json_encode($actions);
$this->loadModel('setting')->setItem('system.common.global.setdynamic', $actions);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->app->loadLang('action');
$this->app->loadLang('group');
$this->view->title = $this->lang->custom->setDynamic;
$this->view->position[] = $this->lang->custom->common;
$this->view->position[] = $this->view->title;
$this->view->objectTypes = $this->lang->action->objectTypes;
$this->view->dynamicAction = $this->lang->action->dynamicAction;
$this->view->actions = $this->lang->action->search->label;
$this->view->setActions = json_decode($this->loadModel('setting')->getItem("owner=system&module=common&section=global&key=setdynamic"), true);
$this->display();
}
/**
* Timezone.
*
+1 -3
View File
@@ -18,8 +18,6 @@ $lang->custom->required = '必填项';
$lang->custom->score = '积分';
$lang->custom->timezone = '时区';
$lang->custom->scoreReset = '重置积分';
$lang->custom->setDynamic = '动态设置';
$lang->custom->setAction = '设置动作';
$lang->custom->object['story'] = '需求';
$lang->custom->object['task'] = '任务';
@@ -79,7 +77,7 @@ $lang->custom->user->fields['statusList'] = '状态';
$lang->custom->user->fields['contactField'] = '可用联系方式';
$lang->custom->user->fields['deleted'] = '列出已删除用户';
$lang->custom->system = array('flow', 'working', 'required', 'score', 'setDynamic');
$lang->custom->system = array('flow', 'working', 'required', 'score');
$lang->custom->block->fields['closed'] = '关闭的区块';
-61
View File
@@ -1,61 +0,0 @@
<?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';?>
<style>
.checkbox-primary{float:left;margin-left:5px;}
</style>
<div id='mainContent' class='main-content'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->setDynamic?></strong>
</div>
</div>
<table class='table table-hover table-striped table-bordered'>
<thead>
<tr class='text-center'>
<th class='w-150px'><?php echo $lang->group->module;?></th>
<th><?php echo $lang->action->action;?></th>
</tr>
</thead>
<?php foreach($objectTypes as $objectKey => $objectTypeName):?>
<tr>
<th class='text-middle w-150px'>
<div class="text-center check-all">
<?php echo $objectTypeName?>
</div>
</th>
<td class='pv-10px'>
<?php if(isset($dynamicAction->$objectKey)):?>
<div class='group-item'>
<?php echo html::checkbox("actions[{$objectKey}]", $dynamicAction->$objectKey, isset($setActions[$objectKey]) ? $setActions[$objectKey] : '', '');?>
</div>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
<tr>
<th></th>
<td class='form-actions'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
<script>
$(function()
{
$('#mainMenu #setDynamicTab').addClass('btn-active-text');
})
</script>
<?php include '../../common/view/footer.html.php';?>