mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 17:45:02 +02:00
UBERF-8063 Unarchive action for wiki and drive (#6522)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
@@ -47,7 +47,7 @@ import { generateClassNotificationTypes } from '@hcengineering/model-notificatio
|
||||
import preference, { TPreference } from '@hcengineering/model-preference'
|
||||
import presentation from '@hcengineering/model-presentation'
|
||||
import tracker from '@hcengineering/model-tracker'
|
||||
import view, { actionTemplates, createAction } from '@hcengineering/model-view'
|
||||
import view, { actionTemplates, createAction, type ViewAction } from '@hcengineering/model-view'
|
||||
import workbench from '@hcengineering/model-workbench'
|
||||
import notification from '@hcengineering/notification'
|
||||
import { getEmbeddedLabel, type Asset } from '@hcengineering/platform'
|
||||
@@ -233,6 +233,30 @@ function defineTeamspace (builder: Builder): void {
|
||||
actions: [tracker.action.EditRelatedTargets, tracker.action.NewRelatedIssue]
|
||||
})
|
||||
|
||||
createAction(builder, {
|
||||
label: view.string.UnArchive,
|
||||
icon: view.icon.Archive,
|
||||
action: view.actionImpl.UpdateDocument as ViewAction,
|
||||
actionProps: {
|
||||
key: 'archived',
|
||||
ask: true,
|
||||
value: false,
|
||||
label: view.string.UnArchive,
|
||||
message: document.string.UnarchiveConfirm
|
||||
},
|
||||
input: 'any',
|
||||
category: view.category.General,
|
||||
target: document.class.Teamspace,
|
||||
visibilityTester: view.function.CanArchiveSpace,
|
||||
query: {
|
||||
archived: true
|
||||
},
|
||||
context: {
|
||||
mode: ['context', 'browser'],
|
||||
group: 'tools'
|
||||
}
|
||||
})
|
||||
|
||||
createAction(
|
||||
builder,
|
||||
{
|
||||
|
||||
@@ -64,6 +64,7 @@ export default mergeIds(documentId, document, {
|
||||
ConfigDescription: '' as IntlString,
|
||||
ParentDocument: '' as IntlString,
|
||||
ChildDocument: '' as IntlString,
|
||||
LockedBy: '' as IntlString
|
||||
LockedBy: '' as IntlString,
|
||||
UnarchiveConfirm: '' as IntlString
|
||||
}
|
||||
})
|
||||
|
||||
@@ -58,7 +58,13 @@ import { TAttachedDoc, TDoc, TType, TTypedSpace } from '@hcengineering/model-cor
|
||||
import presentation from '@hcengineering/model-presentation'
|
||||
import print from '@hcengineering/model-print'
|
||||
import tracker from '@hcengineering/model-tracker'
|
||||
import view, { type Viewlet, actionTemplates, classPresenter, createAction } from '@hcengineering/model-view'
|
||||
import view, {
|
||||
type ViewAction,
|
||||
type Viewlet,
|
||||
actionTemplates,
|
||||
classPresenter,
|
||||
createAction
|
||||
} from '@hcengineering/model-view'
|
||||
import workbench from '@hcengineering/model-workbench'
|
||||
import { getEmbeddedLabel } from '@hcengineering/platform'
|
||||
|
||||
@@ -279,6 +285,30 @@ function defineDrive (builder: Builder): void {
|
||||
actions: [tracker.action.EditRelatedTargets, print.action.Print, tracker.action.NewRelatedIssue]
|
||||
})
|
||||
|
||||
createAction(builder, {
|
||||
label: view.string.UnArchive,
|
||||
icon: view.icon.Archive,
|
||||
action: view.actionImpl.UpdateDocument as ViewAction,
|
||||
actionProps: {
|
||||
key: 'archived',
|
||||
ask: true,
|
||||
value: false,
|
||||
label: view.string.UnArchive,
|
||||
message: drive.string.UnarchiveConfirm
|
||||
},
|
||||
input: 'any',
|
||||
category: view.category.General,
|
||||
target: drive.class.Drive,
|
||||
visibilityTester: view.function.CanArchiveSpace,
|
||||
query: {
|
||||
archived: true
|
||||
},
|
||||
context: {
|
||||
mode: ['context', 'browser'],
|
||||
group: 'tools'
|
||||
}
|
||||
})
|
||||
|
||||
createAction(
|
||||
builder,
|
||||
{
|
||||
|
||||
@@ -103,6 +103,7 @@ export default mergeIds(driveId, drive, {
|
||||
Files: '' as IntlString,
|
||||
Folders: '' as IntlString,
|
||||
Version: '' as IntlString,
|
||||
Restore: '' as IntlString
|
||||
Restore: '' as IntlString,
|
||||
UnarchiveConfirm: '' as IntlString
|
||||
}
|
||||
})
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"Icon": "Icon",
|
||||
"Color": "Color",
|
||||
"RoleLabel": "Role: {role}",
|
||||
"Embeddings": "Embeddings"
|
||||
"Embeddings": "Embeddings",
|
||||
"UnarchiveConfirm": "Do you want to unarchive teamspace?"
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@
|
||||
"Icon": "Icono",
|
||||
"Color": "Color",
|
||||
"RoleLabel": "Role: {role}",
|
||||
"Embeddings": "Incrustaciones"
|
||||
"Embeddings": "Incrustaciones",
|
||||
"UnarchiveConfirm": "¿Quieres desarchivar el trabajo?"
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@
|
||||
"Icon": "Icône",
|
||||
"Color": "Couleur",
|
||||
"RoleLabel": "Rôle : {role}",
|
||||
"Embeddings": "Intégrations"
|
||||
"Embeddings": "Intégrations",
|
||||
"UnarchiveConfirm": "Voulez-vous désarchiver le l'espace d'équipe ?"
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@
|
||||
"Icon": "Ícone",
|
||||
"Color": "Cor",
|
||||
"RoleLabel": "Papel: {role}",
|
||||
"Embeddings": "Incorporações"
|
||||
"Embeddings": "Incorporações",
|
||||
"UnarchiveConfirm": "Você deseja desarquivar o trabalho?"
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,7 @@
|
||||
"Icon": "Иконка",
|
||||
"Color": "Цвет",
|
||||
"RoleLabel": "Роль: {role}",
|
||||
"Embeddings": "Вложения"
|
||||
"Embeddings": "Вложения",
|
||||
"UnarchiveConfirm": "Вы уверены, что хотите разархивировать пространство?"
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@
|
||||
"Icon": "图标",
|
||||
"Color": "颜色",
|
||||
"RoleLabel": "角色:{role}",
|
||||
"Embeddings": "嵌入"
|
||||
"Embeddings": "嵌入",
|
||||
"UnarchiveConfirm": "您确定要取消存档吗?"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Rename": "Rename",
|
||||
"Restore": "Restore",
|
||||
"RoleLabel": "Role",
|
||||
"Root": "/"
|
||||
"Root": "/",
|
||||
"UnarchiveConfirm": "Are you sure you want to unarchive the drive?"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Rename": "Renombrar",
|
||||
"Restore": "Restaurar",
|
||||
"RoleLabel": "Rol",
|
||||
"Root": "/"
|
||||
"Root": "/",
|
||||
"UnarchiveConfirm": "¿Estás seguro de que deseas desarchivar la unidad?"
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@
|
||||
"Rename": "Renommer",
|
||||
"Restore": "Restaurer",
|
||||
"RoleLabel": "Rôle",
|
||||
"Root": "/"
|
||||
"Root": "/",
|
||||
"UnarchiveConfirm": "Êtes-vous sûr de vouloir désarchiver le disque?"
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@
|
||||
"Rename": "Renomear",
|
||||
"Restore": "Restaurar",
|
||||
"RoleLabel": "Papel",
|
||||
"Root": "/"
|
||||
"Root": "/",
|
||||
"UnarchiveConfirm": "Tem a certeza de que deseja desarquivar a unidade?"
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@
|
||||
"Rename": "Переименовать",
|
||||
"Restore": "Восстановить",
|
||||
"RoleLabel": "Роль",
|
||||
"Root": "/"
|
||||
"Root": "/",
|
||||
"UnarchiveConfirm": "Вы уверены, что хотите разархивировать диск?"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Rename": "重命名",
|
||||
"Restore": "恢复",
|
||||
"RoleLabel": "角色",
|
||||
"Root": "/"
|
||||
"Root": "/",
|
||||
"UnarchiveConfirm": "您确定要取消存档磁盘吗?"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user