mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
torrent operation log type add edit&delete
This commit is contained in:
@@ -56,7 +56,12 @@ class NexusModel extends Model
|
||||
$result = $dataSource;
|
||||
$keyValue = [];
|
||||
foreach ($result as $key => &$info) {
|
||||
$text = $textTransPrefix ? nexus_trans("$textTransPrefix.$key") : $info['text'];
|
||||
if (str_contains($textTransPrefix, '%s')) {
|
||||
$transKey = sprintf($textTransPrefix, $key);
|
||||
} else {
|
||||
$transKey = "$textTransPrefix.$key";
|
||||
}
|
||||
$text = $textTransPrefix ? nexus_trans($transKey) : $info['text'];
|
||||
$info['text'] = $text;
|
||||
$keyValue[$key] = $info[$valueField];
|
||||
}
|
||||
|
||||
@@ -15,11 +15,15 @@ class TorrentOperationLog extends NexusModel
|
||||
const ACTION_TYPE_APPROVAL_NONE = 'approval_none';
|
||||
const ACTION_TYPE_APPROVAL_ALLOW = 'approval_allow';
|
||||
const ACTION_TYPE_APPROVAL_DENY = 'approval_deny';
|
||||
const ACTION_TYPE_EDIT = 'edit';
|
||||
const ACTION_TYPE_DELETE = 'delete';
|
||||
|
||||
public static array $actionTypes = [
|
||||
self::ACTION_TYPE_APPROVAL_NONE => ['text' => 'Approval none'],
|
||||
self::ACTION_TYPE_APPROVAL_ALLOW => ['text' => 'Approval allow'],
|
||||
self::ACTION_TYPE_APPROVAL_DENY => ['text' => 'Approval deny'],
|
||||
self::ACTION_TYPE_EDIT => ['text' => 'Edit'],
|
||||
self::ACTION_TYPE_DELETE => ['text' => 'Delete'],
|
||||
];
|
||||
|
||||
public function getActionTypeTextAttribute()
|
||||
|
||||
Reference in New Issue
Block a user