From 3da2a97b489a8122ca75ffdb55a2b66e0b8751db Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 17 Nov 2017 11:54:19 +0800 Subject: [PATCH] * change for 9.6.2 version. --- VERSION | 2 +- config/config.php | 2 +- db/zentao.sql | 4 ++- module/group/js/managepriv.js | 14 +------- module/group/lang/resource.php | 2 -- module/group/model.php | 20 +++++++++++ module/group/view/browse.html.php | 18 ++++++---- module/group/view/privbygroup.html.php | 32 +++++++++++++++++- module/project/view/burn.html.php | 1 + module/upgrade/lang/en.php | 1 + module/upgrade/lang/zh-cn.php | 1 + module/upgrade/lang/zh-tw.php | 1 + module/upgrade/model.php | 47 ++++++++++++++++++++++++++ 13 files changed, 119 insertions(+), 26 deletions(-) diff --git a/VERSION b/VERSION index bdaf50850f..c266afa36d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.6.1 +9.6.2 diff --git a/config/config.php b/config/config.php index 7d581f6279..cbc3fec152 100644 --- a/config/config.php +++ b/config/config.php @@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}} if(!function_exists('getWebRoot')){function getWebRoot(){}} /* 基本设置。Basic settings. */ -$config->version = '9.6.1'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. +$config->version = '9.6.2'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. $config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP. $config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time. $config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php. diff --git a/db/zentao.sql b/db/zentao.sql index ac1f0cf221..fbbb06241e 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -916,6 +916,7 @@ INSERT INTO `zt_group` (`id`, `name`, `role`, `desc`) VALUES (9, 'TOP', 'top', 'for top manager.'), (10, 'OTHERS', '', 'for others.'), (11, 'guest', 'guest', 'For guest'); +(12, 'limited', 'limited', 'For limited user'); INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1, 'action', 'editComment'), @@ -3289,4 +3290,5 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (11, 'user', 'testCase'), (11, 'user', 'testTask'), (11, 'user', 'todo'), -(11, 'user', 'view'); +(11, 'user', 'view'), +(12, 'my', 'limited'); diff --git a/module/group/js/managepriv.js b/module/group/js/managepriv.js index e09acad56d..deca0b5f43 100644 --- a/module/group/js/managepriv.js +++ b/module/group/js/managepriv.js @@ -21,19 +21,7 @@ function setNoChecked() { var noCheckValue = ''; $(':checkbox').each(function(){ - if(!$(this).attr('checked') && $(this).next('span').attr('id') != undefined) noCheckValue = noCheckValue + ',' + $(this).next('span').attr('id'); + if(!$(this).prop('checked') && $(this).next('span').attr('id') != undefined) noCheckValue = noCheckValue + ',' + $(this).next('span').attr('id'); }) $('#noChecked').val(noCheckValue); } - -$(function() -{ - $("[name^='allchecker']").change(function() - { - var click = $(this).attr('onclick'); - if(click.indexOf('""') >= 0 || click.indexOf('"my"') >= 0) - { - $('#my-limited').closest('.group-item').find('input').prop("checked", false); - } - }) -}) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index c28883a448..b075352107 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -84,7 +84,6 @@ $lang->resource->my->changePassword = 'changePassword'; $lang->resource->my->unbind = 'unbind'; $lang->resource->my->manageContacts = 'manageContacts'; $lang->resource->my->deleteContacts = 'deleteContacts'; -$lang->resource->my->limited = 'limited'; $lang->resource->my->score = 'score'; $lang->my->methodOrder[0] = 'index'; @@ -103,7 +102,6 @@ $lang->my->methodOrder[60] = 'unbind'; $lang->my->methodOrder[65] = 'manageContacts'; $lang->my->methodOrder[75] = 'deleteContacts'; $lang->my->methodOrder[80] = 'score'; -$lang->my->methodOrder[85] = 'limited'; /* Todo. */ $lang->resource->todo = new stdclass(); diff --git a/module/group/model.php b/module/group/model.php index ab53cfafb2..3565b60128 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -407,4 +407,24 @@ class groupModel extends model } return $modules; } + + /** + * Judge an action is clickable or not. + * + * @param object $group + * @param string $action + * @static + * @access public + * @return bool + */ + public static function isClickable($group, $action) + { + $action = strtolower($action); + + if($action == 'manageview' and $group->role == 'limited') return false; + if($action == 'edit' and $group->role == 'limited') return false; + if($action == 'copy' and $group->role == 'limited') return false; + + return true; + } } diff --git a/module/group/view/browse.html.php b/module/group/view/browse.html.php index b889dc78c9..e59dd4f05d 100644 --- a/module/group/view/browse.html.php +++ b/module/group/view/browse.html.php @@ -42,17 +42,21 @@ group->managepriv = $lang->group->managePrivByGroup;?> - id", '', 'list', 'eye-open');?> - id", '', 'list', 'lock');?> + id", $group, 'list', 'eye-open');?> + id", $group, 'list', 'lock');?> group->managemember = $lang->group->manageMember;?> - id", '', 'list', 'group', '', 'iframe', 'yes');?> - id", '', 'list', '', '', 'iframe', 'yes', "data-width='550'");?> - id", '', 'list', '', '', 'iframe', 'yes', "data-width='550'");?> + id", $group, 'list', 'group', '', 'iframe', 'yes');?> + id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?> + id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?> role != 'limited') { $deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes"); - echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"groupList\",confirmDelete)", '', '', "title='{$lang->group->delete}' class='btn-icon'"); + echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '', '', "title='{$lang->group->delete}' class='btn-icon'"); + } + else + { + echo ""; } ?> diff --git a/module/group/view/privbygroup.html.php b/module/group/view/privbygroup.html.php index fd1b618c26..2bdf3ff20f 100644 --- a/module/group/view/privbygroup.html.php +++ b/module/group/view/privbygroup.html.php @@ -11,6 +11,36 @@ */ ?>
+ role == 'limited'):?> +
+
name;?>
+
+ + + + + + + + '> + + + + + + + +
group->module;?>group->method;?>
my->common;?> + /> + my->limited;?> +
+ save, "onclick='setNoChecked()'"); + echo html::linkButton($lang->goback, $this->createLink('group', 'browse')); + echo html::hidden('noChecked'); // Save the value of no checked. + ?> +
+
name;?>