Contribute Files to Quick Access
This commit is contained in:
@@ -32,6 +32,8 @@ from govoplan_core.core.modules import (
|
||||
ModuleManifest,
|
||||
NavItem,
|
||||
PermissionDefinition,
|
||||
ProductAreaContribution,
|
||||
QuickAccessTool,
|
||||
RoleTemplate,
|
||||
)
|
||||
from govoplan_core.core.operations import OperationalCheckProviderRegistration
|
||||
@@ -530,9 +532,83 @@ manifest = ModuleManifest(
|
||||
label="File spaces widget",
|
||||
order=35,
|
||||
),
|
||||
ViewSurface(
|
||||
id="files.quick_access.files",
|
||||
module_id="files",
|
||||
kind="quick_access",
|
||||
label="Files Quick Access",
|
||||
order=40,
|
||||
),
|
||||
),
|
||||
product_areas=(
|
||||
ProductAreaContribution(
|
||||
id="records-documents",
|
||||
module_id="files",
|
||||
label="i18n:govoplan-core.product_area.records_documents",
|
||||
icon="folder",
|
||||
description="i18n:govoplan-core.product_area.records_documents_description",
|
||||
surface_ids=("files.nav.files", "files.route.files"),
|
||||
order=30,
|
||||
),
|
||||
),
|
||||
quick_access_tools=(
|
||||
QuickAccessTool(
|
||||
id="files.recent",
|
||||
module_id="files",
|
||||
category_id="files",
|
||||
label="i18n:govoplan-files.files.6ce6c512",
|
||||
description="i18n:govoplan-files.quick_access_description",
|
||||
surface_id="files.quick_access.files",
|
||||
icon="folder",
|
||||
full_page_path="/files",
|
||||
required_any=("files:file:read",),
|
||||
order=10,
|
||||
modes=("browse", "select", "upload"),
|
||||
),
|
||||
),
|
||||
),
|
||||
documentation=(
|
||||
DocumentationTopic(
|
||||
id="files.quick-access-and-product-area",
|
||||
title="Files in Records and documents and Quick Access",
|
||||
summary="Use managed files in the Records and documents area and keep a compact file surface beside current work.",
|
||||
body=(
|
||||
"Files contributes its authorized workspace to Records and documents. When Quick Access is enabled, the owner-rendered "
|
||||
"file-space summary appears in Files on the right rail and links back to the complete workspace. View and rail settings "
|
||||
"do not bypass file ownership, shares, connector policy, integrity gates, or purpose-aware access."
|
||||
),
|
||||
layer="configured",
|
||||
documentation_types=("user", "admin"),
|
||||
audience=("file_user", "file_manager", "administrator"),
|
||||
related_modules=("quick_access", "views", "records"),
|
||||
conditions=(
|
||||
DocumentationCondition(
|
||||
required_modules=("files",),
|
||||
any_scopes=("files:file:read", "files:file:admin"),
|
||||
),
|
||||
),
|
||||
links=(
|
||||
DocumentationLink(label="Files", href="/files", kind="runtime"),
|
||||
DocumentationLink(
|
||||
label="Files handbook",
|
||||
href="govoplan-files/docs/FILES_HANDBOOK.md",
|
||||
kind="repository",
|
||||
),
|
||||
),
|
||||
translations={
|
||||
"de": {
|
||||
"title": "Dateien in Akten und Dokumente sowie im Schnellzugriff",
|
||||
"summary": "Verwaltete Dateien im Produktbereich Akten und Dokumente und optional neben der aktuellen Arbeit verwenden.",
|
||||
"body": (
|
||||
"Files ordnet seinen berechtigten Arbeitsbereich Akten und Dokumente zu. Ist der Schnellzugriff aktiviert, erscheint "
|
||||
"die vom Modul gerenderte Übersicht der Dateibereiche rechts neben der aktuellen Seite. Ansichts- und Leistenkonfiguration "
|
||||
"umgehen weder Eigentum, Freigaben, Connector-Richtlinien, Integritätsprüfungen noch zweckgebundenen Zugriff."
|
||||
),
|
||||
}
|
||||
},
|
||||
metadata={"kind": "reference", "help_contexts": ["files.quick_access.files"]},
|
||||
order=39,
|
||||
),
|
||||
DocumentationTopic(
|
||||
id="files.forms-runtime.managed-evidence",
|
||||
title="Capture Form attachments as managed evidence",
|
||||
|
||||
@@ -4,6 +4,7 @@ import unittest
|
||||
|
||||
|
||||
STATIC_TOPIC_IDS = {
|
||||
"files.quick-access-and-product-area",
|
||||
"files.search.managed-content",
|
||||
"files.workflow.organize-managed-files",
|
||||
"files.workflow.find-and-download-files",
|
||||
|
||||
@@ -157,6 +157,7 @@ export const generatedTranslations: PlatformTranslations = {
|
||||
"i18n:govoplan-files.file.2c3cafa4": "File",
|
||||
"i18n:govoplan-files.files_with_the_same_visible_name_already_exist_i.1bb487b0": "Files with the same visible name already exist in this folder.",
|
||||
"i18n:govoplan-files.files.6ce6c512": "Files",
|
||||
"i18n:govoplan-files.quick_access_description": "Recent and contextual files available to you.",
|
||||
"i18n:govoplan-files.finalizing_upload.bcce936d": "Finalizing upload…",
|
||||
"i18n:govoplan-files.find_and_replace.2c6b404b": "Find and replace",
|
||||
"i18n:govoplan-files.find.df251b06": "Find",
|
||||
@@ -512,6 +513,7 @@ export const generatedTranslations: PlatformTranslations = {
|
||||
"i18n:govoplan-files.file.2c3cafa4": "Datei",
|
||||
"i18n:govoplan-files.files_with_the_same_visible_name_already_exist_i.1bb487b0": "Files with the same visible name already exist in this folder.",
|
||||
"i18n:govoplan-files.files.6ce6c512": "Dateien",
|
||||
"i18n:govoplan-files.quick_access_description": "Für Sie verfügbare aktuelle und kontextbezogene Dateien.",
|
||||
"i18n:govoplan-files.finalizing_upload.bcce936d": "Finalizing upload…",
|
||||
"i18n:govoplan-files.find_and_replace.2c6b404b": "Find and replace",
|
||||
"i18n:govoplan-files.find.df251b06": "Find",
|
||||
|
||||
+21
-3
@@ -5,7 +5,8 @@ import {
|
||||
type DashboardWidgetsUiCapability,
|
||||
type FilesConnectorsUiCapability,
|
||||
type FilesFileExplorerUiCapability,
|
||||
type PlatformWebModule
|
||||
type PlatformWebModule,
|
||||
type QuickAccessToolsUiCapability
|
||||
} from "@govoplan/core-webui";
|
||||
import { FolderTree } from "./features/files/components/FileManagerComponents";
|
||||
import FileConnectorSettingsPanel from "./features/files/FileConnectorSettingsPanel";
|
||||
@@ -67,6 +68,21 @@ const fileDashboardWidgets: DashboardWidgetsUiCapability = {
|
||||
}
|
||||
]
|
||||
};
|
||||
const fileQuickAccessTools: QuickAccessToolsUiCapability = {
|
||||
tools: [
|
||||
{
|
||||
id: "files.recent",
|
||||
render: ({ settings }) => createElement(FileSpacesWidget, {
|
||||
settings,
|
||||
refreshKey: 0,
|
||||
configuration: {
|
||||
maxItems: 7,
|
||||
includeConnectors: true
|
||||
}
|
||||
})
|
||||
}
|
||||
]
|
||||
};
|
||||
const fileConnectorAdminSections: AdminSectionsUiCapability = {
|
||||
sections: [
|
||||
{
|
||||
@@ -129,7 +145,8 @@ export const filesModule: PlatformWebModule = {
|
||||
{ id: "files.admin.group-connectors", moduleId: "files", kind: "section", label: "Group file connections", order: 65 },
|
||||
{ id: "files.admin.user-connectors", moduleId: "files", kind: "section", label: "User file connections", order: 65 },
|
||||
{ id: "files.settings.connectors", moduleId: "files", kind: "section", label: "Personal file connections", order: 20 },
|
||||
{ id: "files.widget.spaces", moduleId: "files", kind: "section", label: "File spaces widget", order: 35 }
|
||||
{ id: "files.widget.spaces", moduleId: "files", kind: "section", label: "File spaces widget", order: 35 },
|
||||
{ id: "files.quick_access.files", moduleId: "files", kind: "quick_access", label: "Files Quick Access", order: 40 }
|
||||
],
|
||||
navItems: [{ to: "/files", label: "i18n:govoplan-files.files.6ce6c512", iconName: "folder", anyOf: fileRead, order: 40 }],
|
||||
routes: [
|
||||
@@ -150,7 +167,8 @@ export const filesModule: PlatformWebModule = {
|
||||
FileConnectorScopeManager: FileConnectorSettingsPanel
|
||||
} satisfies FilesConnectorsUiCapability,
|
||||
"admin.sections": fileConnectorAdminSections,
|
||||
"dashboard.widgets": fileDashboardWidgets
|
||||
"dashboard.widgets": fileDashboardWidgets,
|
||||
"quickAccess.tools": fileQuickAccessTools
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user