* [misc] adjust actions render for repo list.

This commit is contained in:
caoyanyi
2025-01-13 09:18:40 +08:00
committed by 田淑杰
parent 1cabcd8d12
commit 0d0fee7d9b
6 changed files with 25 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
window.renderActions = function(item, info)
{
if(item.url)
{
if(typeof item.url == 'string') item.url = zui.formatString(item.url, info.row.data);
else item.url.params = zui.formatString(item.url.params, info.row.data);
}
if(defaultServer && info.row.data.serviceHost == defaultServer)
{
item['data-confirm']['message'] = deleteConfirm;
Object.assign(item, item);
return item;
}
return item;
}
+1
View File
@@ -219,6 +219,7 @@ $lang->repo->notice->syncComplete = 'Synchronized. Now redirecting ...';
$lang->repo->notice->syncFailed = 'Synchronized failed.';
$lang->repo->notice->syncedCount = 'The number of records synchronized is ';
$lang->repo->notice->delete = 'Do you want to unlink the code library?';
$lang->repo->notice->deleteConfirm = 'Do you want to delete the library? This operation will permanently remove the library and all content and history records, and cannot be recovered.';
$lang->repo->notice->successDelete = 'Successfully disassociated code repository.';
$lang->repo->notice->commentContent = 'Comment';
$lang->repo->notice->deleteReview = 'Do you want to delete this review?';
+1
View File
@@ -219,6 +219,7 @@ $lang->repo->notice->syncComplete = 'Synchronized. Now redirecting ...';
$lang->repo->notice->syncFailed = 'Synchronized failed.';
$lang->repo->notice->syncedCount = 'The number of records synchronized is ';
$lang->repo->notice->delete = 'Do you want to unlink the code library?';
$lang->repo->notice->deleteConfirm = 'Do you want to delete the library? This operation will permanently remove the library and all content and history records, and cannot be recovered.';
$lang->repo->notice->successDelete = 'Successfully disassociated code repository.';
$lang->repo->notice->commentContent = 'Comment';
$lang->repo->notice->deleteReview = 'Do you want to delete this review?';
+1
View File
@@ -219,6 +219,7 @@ $lang->repo->notice->syncComplete = 'Synchronisé. Vous allez être redirigé
$lang->repo->notice->syncFailed = 'Synchronized failed.';
$lang->repo->notice->syncedCount = "Le nombre d'enregistrements synchronisés est ";
$lang->repo->notice->delete = 'La base de code est - elle désassociée?';
$lang->repo->notice->deleteConfirm = 'Do you want to delete the library? This operation will permanently remove the library and all content and history records, and cannot be recovered.';
$lang->repo->notice->successDelete = 'La base de code a été levée avec succès.';
$lang->repo->notice->commentContent = 'Commentaire';
$lang->repo->notice->deleteReview = 'Do you want to delete this review?';
+1
View File
@@ -219,6 +219,7 @@ $lang->repo->notice->syncComplete = '同步完成,正在跳转...';
$lang->repo->notice->syncFailed = '同步失败';
$lang->repo->notice->syncedCount = '已经同步记录条数';
$lang->repo->notice->delete = '是否解除关联代码库?';
$lang->repo->notice->deleteConfirm = '是否删除代码库?此操作将永久移除该仓库及其所有内容和历史记录,且无法恢复。';
$lang->repo->notice->successDelete = '已经成功解除代码库。';
$lang->repo->notice->commentContent = '输入评论内容';
$lang->repo->notice->deleteReview = '确认删除该评审?';
+5 -1
View File
@@ -10,6 +10,9 @@ declare(strict_types=1);
*/
namespace zin;
jsVar('deleteConfirm', $lang->repo->notice->deleteConfirm);
jsVar('defaultServer', empty($defaultServer) ? 0 : $defaultServer->id);
$createItem = array('text' => $lang->repo->createAction, 'url' => createLink('repo', 'create'));
$createRepoItem = array('text' => $lang->repo->createRepoAction, 'url' => createLink('repo', 'createRepo'));
$batchCreateItem = array('text' => $lang->repo->batchCreate, 'url' => createLink('repo', 'import'));
@@ -126,5 +129,6 @@ dtable
set::data($repos),
set::sortLink(createLink('repo', 'maintain', "objectID=$objectID&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&pageID={$pager->pageID}")),
set::orderBy($orderBy),
set::footPager(usePager())
set::footPager(usePager()),
set::actionItemCreator(jsRaw('window.renderActions'))
);