Changes for page Document Picker

Last modified by slauriere on 2022/02/21 10:20

<
From version < 5.3 >
edited by Marius Dumitru Florea
on 2015/09/16 13:05
To version < 6.1 >
edited by Marius Dumitru Florea
on 2015/09/16 13:21
>
Change comment: There is no comment for this version

Summary

Details

ExtensionCode.ExtensionClass[0]
Description
... ... @@ -2,7 +2,7 @@
2 2  
3 3  Provides a couple of Velocity macros and a widget to select a document from a tree picker and to display the path to the selected document.
4 4  
5 -= Hierarchy Macro (View) =
5 += Hierarchy Macro =
6 6  
7 7  The hierarchy Velocity macro is used to display the selected document. It can actually be used with any type of entity not just documents. The output is the path to the specified entity in the hierarchy. This macro is also used by the page breadcrumbs which are visible at the top of the page, above the page title.
8 8  
... ... @@ -71,3 +71,54 @@
71 71  {{/code}}
72 72  
73 73  = Location Picker Macro =
74 +
75 +The location picker Velocity macro is used to select a document that should be the target of some operation (e.g. copy, rename).
76 +
77 +== Usage ==
78 +
79 +{{code language="none"}}
80 +{{template name="locationPicker_macros.vm" /}}
81 +
82 +{{velocity}}
83 +{{html}}
84 +#set ($documentReference = $services.model.resolveDocument('Books.Franz Kafka.Die Verwandlung'))
85 +#set ($selectedDocument = $xwiki.getDocument($documentReference))
86 +<form class="xform" action="">
87 + #locationPicker({
88 + 'id': 'target',
89 + 'title': {
90 + 'label': 'core.create.title',
91 + 'hint': 'core.create.title.hint',
92 + 'name': 'title',
93 + 'value': $selectedDocument.plainTitle,
94 + 'placeholder': 'core.create.name.placeholder'
95 + },
96 + 'preview': {
97 + 'label': 'core.create.locationPreview.label',
98 + 'hint': 'core.create.locationPreview.hint'
99 + },
100 + 'parent': {
101 + 'label': 'core.create.spaceReference.label',
102 + 'hint': 'core.create.spaceReference.hint',
103 + 'name': 'spaceReference',
104 + 'reference': $documentReference.parent,
105 + 'placeholder': 'core.create.spaceReference.placeholder'
106 + },
107 + 'name': {
108 + 'label': 'core.create.name.label',
109 + 'hint': 'core.create.name.hint',
110 + 'name': 'name',
111 + 'value': $documentReference.name,
112 + 'placeholder': 'core.create.name.placeholder'
113 + }
114 + })
115 +</form>
116 +{{/html}}
117 +{{/velocity}}
118 +{{/code}}
119 +
120 +{{image reference="locationPicker.png" /}}
121 +
122 +{{image reference="locationPickerModal.png" /}}
123 +
124 +{{image reference="locationPickerAdvancedEdit.png" /}}

Get Connected