mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-19 16:20:50 +08:00
add-trans
This commit is contained in:
@@ -11,7 +11,7 @@ class CommentController extends Controller
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return array
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,9 @@ class ExamController extends Controller
|
||||
{
|
||||
$result = $this->repository->getList($request->all());
|
||||
$resource = ExamResource::collection($result);
|
||||
$resource->additional([
|
||||
'page_title' => nexus_trans('exam.admin.list.page_title'),
|
||||
]);
|
||||
return $this->success($resource);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ class ExamUserController extends Controller
|
||||
{
|
||||
$result = $this->repository->listUser($request->all());
|
||||
$resource = ExamUserResource::collection($result);
|
||||
$resource->additional([
|
||||
'page_title' => nexus_trans('exam-user.admin.list.page_title'),
|
||||
]);
|
||||
return $this->success($resource);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
# IMPORTANT: Do not edit below unless you know what you are doing!
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
if(!defined('IN_TRACKER'))
|
||||
die('Hacking attempt!');
|
||||
|
||||
@@ -207,7 +209,11 @@ function delete_user(\Illuminate\Database\Eloquent\Builder $query, $reasonKey)
|
||||
'reason' => nexus_trans($reasonKey, [], $user->locale),
|
||||
];
|
||||
}
|
||||
\App\Models\User::query()->whereIn('id', $uidArr)->delete();
|
||||
$update = [
|
||||
'enabled' => \App\Models\User::ENABLED_NO,
|
||||
'modcomment' => DB::raw("concat_ws('\n', '[CLEANUP] $reasonKey', modcomment)"),
|
||||
];
|
||||
\App\Models\User::query()->whereIn('id', $uidArr)->update($update);
|
||||
\App\Models\UserBanLog::query()->insert($userBanLogData);
|
||||
do_log("delete user($reasonKey): " . implode(', ', $uidArr));
|
||||
return $uidArr;
|
||||
|
||||
9
resources/lang/zh_CN/exam-user.php
Normal file
9
resources/lang/zh_CN/exam-user.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'admin' => [
|
||||
'list' => [
|
||||
'page_title' => '考核用户列表'
|
||||
]
|
||||
]
|
||||
];
|
||||
@@ -19,4 +19,9 @@ return [
|
||||
'checkout_not_pass_message_content' => '你在规定时间内(:begin ~ :end)未完成考核::exam_name,账号已被禁用。',
|
||||
'ban_log_reason' => '未完成考核::exam_name(:begin ~ :end)',
|
||||
'ban_user_modcomment' => '未完成考核: :exam_name(:begin ~ :end), 被系统禁用.',
|
||||
'admin' => [
|
||||
'list' => [
|
||||
'page_title' => '考核列表'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
@@ -2,4 +2,9 @@
|
||||
|
||||
return [
|
||||
'edit_ban_reason' => '被管理人员禁用',
|
||||
'admin' => [
|
||||
'list' => [
|
||||
'page_title' => '用户列表'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user