stable
Clone or download
This introduce a new type of document. This type of document is managed by another plugin than docman/document, so we need to introduce a new generic type "other" that plugins can use for their will. To test, you can create an empty document, and in the database change its `item_type` to `7` and its `item_type` to `artidoc`. The document should still be displayed in the document tree, and you can search against it. For now the icon is the one for trackers, but a tailored icon will be contributed later. This is just an introduction of the new document, so it is expected that not all actions work on it (e.g copy/paste). This will be handled in dedicated contributions to not clutter this review. It is considered ok since users have to hack the database to have artidoc documents for now. Other implementation strategies were envisaged for this: * transform the `item_type` to a varchar instead of int => issues with bisecting if database does not contains the same type in the present than in the past. * use only `item_type` to handle the other type (e.g `7` === 'artidoc', `8` === …). The issue is that their is a higher chance of conflicts if two different plugins share by mystake the same number for their respective types (less chance to have conflicts with 'artidoc'). Part of story #37542: display a read only Document Change-Id: Id630908dc887c6af4302c9bec5c4555c6032f89a
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/artidoc/include/Artidoc/Document/ArtidocDocument.php | +35 | −0 | Go to diff View file |
M | plugins/artidoc/include/artidocPlugin.php | +39 | −0 | Go to diff View file |
M | plugins/docman/bin/DocmanExport/Docman_XMLExportVisitor.class.php | +5 | −0 | Go to diff View file |
M | plugins/docman/db/install.sql | +1 | −0 | Go to diff View file |
A | plugins/docman/db/mysql/updates/2024/202404021416_add_other_type_column.php | +39 | −0 | Go to diff View file |
M | plugins/docman/include/Docman_ActionsDeleteVisitor.class.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/Docman_CloneItemsVisitor.class.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/Docman_Controller.class.php | +5 | −1 | Go to diff View file |
M | plugins/docman/include/Docman_Item.class.php | +1 | −0 | Go to diff View file |
M | plugins/docman/include/Docman_ItemFactory.class.php | +4 | −0 | Go to diff View file |
M | plugins/docman/include/Docman_SubItemsWritableVisitor.class.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/Docman_Widget_Embedded.class.php | +6 | −0 | Go to diff View file |
A | plugins/docman/include/Item/GetDocmanItemOtherTypeEvent.php | +45 | −0 | Go to diff View file |
M | plugins/docman/include/Item/ItemVisitor.php | +5 | −0 | Go to diff View file |
A | plugins/docman/include/Item/OtherDocument.php | +44 | −0 | Go to diff View file |
M | plugins/docman/include/Item/SubItemsDeletableVisitor.php | +5 | −0 | Go to diff View file |
M | plugins/docman/include/ItemType/DoesItemHasExpectedTypeVisitor.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/AfterItemCreationVisitor.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/CopyItem/BeforeCopyVisitor.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocumentBeforeModificationValidatorVisitor.php | +7 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocumentBeforeVersionCreationValidatorVisitor.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/Folders/ComputeFolderSizeVisitor.php | +5 | −0 | Go to diff View file |
A | plugins/docman/include/REST/v1/GetOtherDocumentItemRepresentationWrapper.php | +47 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/ItemCanHaveSubitemsCheckerVisitor.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/ItemRepresentationVisitor.php | +14 | −1 | Go to diff View file |
M | plugins/docman/include/REST/v1/MoveItem/BeforeMoveVisitor.php | +9 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/Search/FilePropertiesVisitor.php | +6 | −0 | Go to diff View file |
A | plugins/docman/include/REST/v1/Search/SearchRepresentationOtherType.php | +45 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/Search/SearchRepresentationTypeVisitor.php | +14 | −1 | Go to diff View file |
M | plugins/docman/include/REST/v1/SearchResource.php | +1 | −1 | Go to diff View file |
M | plugins/docman/include/XML/Export/XMLExportVisitor.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_GetActionOnIconVisitor.class.php | +42 | −13 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_GetClassForLinkVisitor.class.php | +43 | −14 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_GetFieldsVisitor.class.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_GetMenuItemsVisitor.class.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_GetShowViewVisitor.class.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_GetSpecificFieldsVisitor.php | +7 | −0 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_ItemDetailsSectionActions.class.php | +23 | −9 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_ItemDetailsSectionNewVersion.class.php | +6 | −16 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_ItemDetailsSectionNotifications.class.php | +22 | −8 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_ItemDetailsSectionPaste.class.php | +12 | −7 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_ItemDetailsSectionUpdate.class.php | +7 | −7 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_ItemTreeUlVisitor.class.php | +6 | −0 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_ToolbarNewDocumentVisitor.class.php | +44 | −14 | Go to diff View file |
M | plugins/docman/include/view/ItemActionURLVisitor.php | +6 | −0 | Go to diff View file |
M | plugins/docman/tests/unit/REST/v1/Folders/BuildSearchedItemRepresentationsFromSearchReportTest.php | +1 | −1 | Go to diff View file |
M | plugins/document/include/DownloadFolderAsZip/ZipStreamFolderFilesVisitor.php | +5 | −0 | Go to diff View file |
M | plugins/document/include/Reference/ReferenceURLBuilder.php | +6 | −0 | Go to diff View file |
M | plugins/document/include/Tree/DocumentTreeController.php | +1 | −0 | Go to diff View file |
M | plugins/document/include/Tree/DocumentTreePresenter.php | +4 | −0 | Go to diff View file |
A | plugins/document/include/Tree/OtherItemTypeDefinition.php | +30 | −0 | Go to diff View file |
A | plugins/document/include/Tree/OtherItemTypes.php | +46 | −0 | Go to diff View file |
M | plugins/document/scripts/document/components/AdvancedSearch/SearchResult/Cells/CellTitle.test.ts | +70 | −0 | Go to diff View file |
M | plugins/document/scripts/document/components/AdvancedSearch/SearchResult/Cells/CellTitle.vue | +8 | −1 | Go to diff View file |
M | plugins/document/scripts/document/components/Folder/ItemTitle/DocumentCellTitle.vue | +11 | −2 | Go to diff View file |
M | plugins/document/scripts/document/index.ts | +3 | −0 | Go to diff View file |
M | plugins/document/scripts/document/injection-keys.ts | +4 | −1 | Go to diff View file |
M | plugins/document/scripts/document/type.ts | +6 | −0 | Go to diff View file |
M | plugins/document/templates/document-tree.mustache | +1 | −0 | Go to diff View file |