Skip to content

Commit 0ccda82

Browse files
committed
Implement review comments
1 parent ce26c9b commit 0ccda82

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

docs/content_management/images/add_image_asset_from_dam.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -148,46 +148,43 @@ For this to happen, register the variations generator as a service:
148148
[[= include_file('code_samples/back_office/images/config/services.yaml', 17, 21) =]]
149149
```
150150

151-
### Set tab for "Select from DAM" modal
151+
### Configure tab for "Select from DAM" modal
152152

153-
To select an image from the DAM, a modal window pop in with tabs & panels for different search sub-interfaces.
153+
To enable selecting an image from the DAM system, a modal window pops up with tabs and panels that contain different search interfaces.
154154

155-
In this example, the search only use the main text input.
156-
Its tab and its corresponding panel are a service created by combining existing components (as many [back office tabs](back_office_tabs.md)).
155+
In this example, the search only uses the main text input.
156+
The tab and its corresponding panel are a service created by combining existing components, like in the case of other [back office tabs](back_office_tabs.md).
157+
158+
The `commons_search_tab` service uses the `GenericSearchTab` class as a base, and the `GenericSearchType` form for search input.
159+
It is linked to the `commons` DAM source and uses the identifier `commons`.
160+
The DAM search tab is registered in the `connector-dam-search` [tab group](back_office_tabs.md#tab-groups) using the `ibexa.admin_ui.tab` tag.
157161

158-
The tab service uses directly the dedicated base tab `GenericSearchTab`,
159-
passes it the dedicated base form `GenericSearchType`,
160-
links it to `commons` DAM source,
161-
is identified as `commons`,
162-
is tagged with `ibexa.admin_ui.tab` tag,
163-
and set in the `connector-dam-search` [tab group](back_office_tabs.md#tab-groups).
164162

165163
```yaml
166164
[[= include_file('code_samples/back_office/images/config/services.yaml', 22, 33) =]]
167165
```
168166

169167
### Create Twig template
170168

171-
The template defines how images that come from Wikimedia Commons appear.
169+
The template defines how images that come from Wikimedia Commons are displayed.
172170

173171
In `templates/themes/standard/`, add the `commons_asset_view.html.twig` file that resembles the following example:
174172

175173
```html+twig
176174
[[= include_file('code_samples/back_office/images/templates/themes/standard/commons_asset_view.html.twig') =]]
177175
```
178176

179-
Then, register the template and a fallback template in configuration files
180-
(replace `<scope>` with [appropriate value](siteaccess_aware_configuration.md) like `default` so it's used everywhere including the back office):
177+
Then, register the template and a fallback template in configuration files.
178+
Replace `<scope>` with an [appropriate value](siteaccess_aware_configuration.md) that designates the SiteAccess or SiteAccess group, for example, `default` to use the template everywhere, including the back office:
181179

182180
```yaml
183181
[[= include_file('code_samples/back_office/images/config/packages/views.yaml') =]]
184182
```
185183

186184
### Provide back office translation
187185

188-
In the back office, an image asset field is displayed followed by a table of metadata.
189-
190-
As some new specific ones are used in this example, some new translations are needed.
186+
When the image asset field is displayed in the back office, a table of metadata follows.
187+
This example uses new fields, so you need to provide translations for their labels.
191188

192189
```yaml
193190
[[= include_file('code_samples/back_office/images/translations/ibexa_fieldtypes_preview.en.yaml') =]]

0 commit comments

Comments
 (0)