* task#980, add more roles.

This commit is contained in:
wangchunsheng
2012-12-16 03:11:14 +00:00
parent cae5417f18
commit 4129e897d4
3 changed files with 32 additions and 14 deletions

View File

@@ -80,11 +80,16 @@ $lang->user->loginFailed = "Login failed, please check your account and password
$lang->user->lockWarning = "You only have %s times to try.";
$lang->user->loginLocked = "You try the password too many times, please contact the administrator or try again after %s minutes.";
$lang->user->roleList[''] = '';
$lang->user->roleList['dev'] = 'Dev';
$lang->user->roleList['qa'] = 'QA';
$lang->user->roleList['pm'] = 'PM';
$lang->user->roleList['po'] = 'PO';
$lang->user->roleList[''] = '';
$lang->user->roleList['dev'] = 'Developer';
$lang->user->roleList['qa'] = 'Tester';
$lang->user->roleList['pm'] = 'Project manager';
$lang->user->roleList['po'] = 'Product owner';
$lang->user->roleList['td'] = 'Technical directory';
$lang->user->roleList['pd'] = 'Product director';
$lang->user->roleList['qd'] = 'Quality Director';
$lang->user->roleList['top'] = 'Top manager';
$lang->user->roleList['others'] = 'Others';
$lang->user->genderList['m'] = 'Male';
$lang->user->genderList['f'] = 'Female';

View File

@@ -80,11 +80,16 @@ $lang->user->loginFailed = "登录失败,请检查您的用户名或密码是
$lang->user->lockWarning = "您还有%s次尝试机会。";
$lang->user->loginLocked = "密码尝试次数太多,请联系管理员解锁,或%s分钟后重试。";
$lang->user->roleList[''] = '';
$lang->user->roleList['dev'] = '研发';
$lang->user->roleList['qa'] = '测试';
$lang->user->roleList['pm'] = '项目经理';
$lang->user->roleList['po'] = '产品经理';
$lang->user->roleList[''] = '';
$lang->user->roleList['dev'] = '研发';
$lang->user->roleList['qa'] = '测试';
$lang->user->roleList['pm'] = '项目经理';
$lang->user->roleList['po'] = '产品经理';
$lang->user->roleList['td'] = '研发主管';
$lang->user->roleList['pd'] = '产品主管';
$lang->user->roleList['qd'] = '测试主管';
$lang->user->roleList['top'] = '高层管理';
$lang->user->roleList['others'] = '其他';
$lang->user->genderList['m'] = '男';
$lang->user->genderList['f'] = '女';
@@ -107,3 +112,11 @@ $lang->user->error->accountDupl = "ID %s该用户名已经存在";
$lang->user->error->realname = "ID %s必须填写真实姓名";
$lang->user->error->password = "ID %s密码必须六位以上";
$lang->user->error->mail = "ID %s请填写正确的邮箱地址";
$lang->user->contacts = new stdclass();
$lang->user->contacts->common = '联系人';
$lang->user->contacts->id = '编号';
$lang->user->contacts->company = '所属公司';
$lang->user->contacts->account = '所有人';
$lang->user->contacts->group = '列表名称';
$lang->user->contacts->contacts= '联系人列表';

View File

@@ -71,10 +71,10 @@ class userModel extends model
* thus to make sure users of this role at first.
*/
$fields = 'account, realname';
if(strpos($params, 'pofirst') !== false) $fields .= ", INSTR(',po,', role) AS roleOrder";
if(strpos($params, 'devfirst')!== false) $fields .= ", INSTR(',dev,', role) AS roleOrder";
if(strpos($params, 'qafirst') !== false) $fields .= ", INSTR(',qa,', role) AS roleOrder";
if(strpos($params, 'pmfirst') !== false) $fields .= ", INSTR(',pm,', role) AS roleOrder";
if(strpos($params, 'pofirst') !== false) $fields .= ", INSTR(',pd,po,', role) AS roleOrder";
if(strpos($params, 'devfirst')!== false) $fields .= ", INSTR(',td,pm,dev,', role) AS roleOrder";
if(strpos($params, 'qafirst') !== false) $fields .= ", INSTR(',qd,qa,', role) AS roleOrder";
if(strpos($params, 'pmfirst') !== false) $fields .= ", INSTR(',td,pm,', role) AS roleOrder";
$orderBy = strpos($params, 'first') !== false ? 'roleOrder DESC, account' : 'account';
/* Get raw records. */