@plone/volto 17.0.0-alpha.7 → 17.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +82 -0
- package/locales/ca/LC_MESSAGES/volto.po +146 -0
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +146 -0
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +146 -0
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +146 -0
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +146 -0
- package/locales/eu.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +4762 -0
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +146 -0
- package/locales/fr.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +146 -0
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +146 -0
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +801 -643
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +146 -0
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +146 -0
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +146 -0
- package/locales/ro.json +1 -1
- package/locales/volto.pot +147 -1
- package/locales/zh_CN/LC_MESSAGES/volto.po +146 -0
- package/locales/zh_CN.json +1 -1
- package/package.json +1 -1
- package/packages/volto-slate/build/messages/src/blocks/Table/TableBlockEdit.json +1 -1
- package/packages/volto-slate/build/messages/src/blocks/Text/DefaultTextBlockEditor.json +1 -1
- package/packages/volto-slate/build/messages/src/blocks/Text/DetachedTextBlockEditor.json +1 -1
- package/packages/volto-slate/build/messages/src/blocks/Text/SlashMenu.json +1 -1
- package/packages/volto-slate/build/messages/src/editor/plugins/AdvancedLink/index.json +1 -1
- package/packages/volto-slate/build/messages/src/editor/plugins/Link/index.json +1 -1
- package/packages/volto-slate/build/messages/src/editor/plugins/Table/index.json +1 -1
- package/packages/volto-slate/build/messages/src/elementEditor/messages.json +1 -1
- package/packages/volto-slate/build/messages/src/widgets/HtmlSlateWidget.json +1 -1
- package/packages/volto-slate/build/messages/src/widgets/RichTextWidgetView.json +1 -1
- package/packages/volto-slate/package.json +1 -1
- package/packages/volto-slate/src/blocks/Text/SlashMenu.jsx +4 -3
- package/packages/volto-slate/src/editor/deserialize.js +0 -1
- package/razzle.config.js +5 -0
- package/src/actions/index.js +6 -0
- package/src/actions/relations/rebuild.js +25 -0
- package/src/actions/relations/relations.js +86 -0
- package/src/actions/relations/relations.test.js +15 -0
- package/src/components/index.js +1 -0
- package/src/components/manage/BlockChooser/BlockChooser.jsx +8 -3
- package/src/components/manage/BlockChooser/BlockChooser.test.jsx +5 -0
- package/src/components/manage/Contents/Contents.jsx +5 -1
- package/src/components/manage/Contents/ContentsItem.jsx +6 -0
- package/src/components/manage/Controlpanels/Controlpanels.jsx +9 -0
- package/src/components/manage/Controlpanels/Relations/BrokenRelations.jsx +66 -0
- package/src/components/manage/Controlpanels/Relations/Relations.jsx +114 -0
- package/src/components/manage/Controlpanels/Relations/RelationsListing.jsx +479 -0
- package/src/components/manage/Controlpanels/Relations/RelationsMatrix.jsx +531 -0
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx +3 -3
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipListing.jsx +51 -82
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipMatrix.jsx +79 -75
- package/src/components/manage/Toast/Toast.jsx +1 -1
- package/src/components/theme/NotFound/NotFound.jsx +55 -41
- package/src/components/theme/View/RenderBlocks.jsx +7 -1
- package/src/components/theme/Widgets/RelationsWidget.jsx +13 -11
- package/src/config/ControlPanels.js +2 -0
- package/src/constants/ActionTypes.js +4 -0
- package/src/constants/Languages.js +8 -4
- package/src/helpers/Api/Api.js +1 -1
- package/src/helpers/Html/Html.jsx +3 -1
- package/src/helpers/Html/Html.test.jsx +5 -0
- package/src/helpers/MessageLabels/MessageLabels.js +72 -0
- package/src/reducers/actions/actions.js +1 -1
- package/src/reducers/breadcrumbs/breadcrumbs.js +1 -1
- package/src/reducers/index.js +2 -0
- package/src/reducers/navigation/navigation.js +1 -1
- package/src/reducers/relations/relations.js +173 -0
- package/src/reducers/types/types.js +1 -1
- package/src/routes.js +5 -0
- package/theme/themes/pastanaga/extras/userscontrolpanel.less +99 -76
|
@@ -9,8 +9,6 @@ import { listGroups } from '@plone/volto/actions';
|
|
|
9
9
|
import { Icon, Toast } from '@plone/volto/components';
|
|
10
10
|
import { updateGroup, listUsers } from '@plone/volto/actions';
|
|
11
11
|
|
|
12
|
-
import add from '@plone/volto/icons/add.svg';
|
|
13
|
-
import remove from '@plone/volto/icons/remove.svg';
|
|
14
12
|
import down_key from '@plone/volto/icons/down-key.svg';
|
|
15
13
|
|
|
16
14
|
const ListingTemplate = ({
|
|
@@ -116,7 +114,7 @@ const ListingTemplate = ({
|
|
|
116
114
|
}
|
|
117
115
|
}, [dispatch, query_group, show_matrix_options, groups_filter]);
|
|
118
116
|
|
|
119
|
-
const onSelectOptionHandler = (
|
|
117
|
+
const onSelectOptionHandler = (selectedvalue, checked, singleClick) => {
|
|
120
118
|
singleClick = singleClick ?? false;
|
|
121
119
|
let group = selectedvalue.y;
|
|
122
120
|
let username = selectedvalue.x;
|
|
@@ -150,17 +148,14 @@ const ListingTemplate = ({
|
|
|
150
148
|
});
|
|
151
149
|
};
|
|
152
150
|
|
|
153
|
-
const onSelectAllHandler = (
|
|
154
|
-
let elements = document.querySelectorAll(`div.checkbox_${mtxoption} input`);
|
|
155
|
-
let identifier;
|
|
151
|
+
const onSelectAllHandler = (group, items_ids, checked) => {
|
|
156
152
|
let usersgroupmapping = {};
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
usersgroupmapping[identifier[1]] = checked ? true : false;
|
|
153
|
+
items_ids.forEach((el) => {
|
|
154
|
+
usersgroupmapping[el] = checked ? true : false;
|
|
160
155
|
});
|
|
161
156
|
|
|
162
157
|
dispatch(
|
|
163
|
-
updateGroup(
|
|
158
|
+
updateGroup(group, {
|
|
164
159
|
users: usersgroupmapping,
|
|
165
160
|
}),
|
|
166
161
|
)
|
|
@@ -188,93 +183,68 @@ const ListingTemplate = ({
|
|
|
188
183
|
<div className="administration_matrix">
|
|
189
184
|
{matrix_options && matrix_options?.length > 0 && (
|
|
190
185
|
<div className="label-options">
|
|
191
|
-
|
|
192
|
-
<div
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
>
|
|
196
|
-
|
|
197
|
-
<
|
|
186
|
+
<div className="target-labels">
|
|
187
|
+
<div>
|
|
188
|
+
<h3>{items.length} users</h3>
|
|
189
|
+
</div>
|
|
190
|
+
<div>
|
|
191
|
+
{matrix_options?.map((matrix_option) => (
|
|
192
|
+
<div
|
|
193
|
+
className="label-options-label inclined"
|
|
194
|
+
key={matrix_option.value}
|
|
195
|
+
>
|
|
196
|
+
<div>
|
|
197
|
+
<span className="label">{matrix_option.label}</span>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
))}
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
<div className="listing-row selectall" key="selectall">
|
|
204
|
+
<div className="listing-item">
|
|
205
|
+
<div />
|
|
206
|
+
<div className="matrix_options">
|
|
207
|
+
{matrix_options?.map((matrix_option) => (
|
|
208
|
+
<div key={matrix_option.value}>
|
|
209
|
+
<Checkbox
|
|
210
|
+
className="toggle-target"
|
|
211
|
+
defaultChecked={false}
|
|
212
|
+
onChange={(event, { checked }) =>
|
|
213
|
+
onSelectAllHandler(
|
|
214
|
+
matrix_option.value,
|
|
215
|
+
items.map((el) => el.id),
|
|
216
|
+
checked,
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
/>
|
|
220
|
+
</div>
|
|
221
|
+
))}
|
|
198
222
|
</div>
|
|
199
223
|
</div>
|
|
200
|
-
|
|
224
|
+
</div>
|
|
201
225
|
</div>
|
|
202
226
|
)}
|
|
203
227
|
|
|
204
228
|
<div className="items">
|
|
205
229
|
{items.length > 0 ? (
|
|
206
230
|
<>
|
|
207
|
-
<div className="listing-row selectall" key="selectall">
|
|
208
|
-
<div className="listing-item">
|
|
209
|
-
<div />
|
|
210
|
-
<div className="matrix_options">
|
|
211
|
-
{matrix_options?.map((matrix_option) => (
|
|
212
|
-
<div key={matrix_option.value}>
|
|
213
|
-
<Button
|
|
214
|
-
icon
|
|
215
|
-
basic
|
|
216
|
-
onClick={() =>
|
|
217
|
-
onSelectAllHandler(matrix_option.value, true)
|
|
218
|
-
}
|
|
219
|
-
className="add-button"
|
|
220
|
-
aria-label={
|
|
221
|
-
intl.formatMessage(messages.addUsersToGroup) +
|
|
222
|
-
` ${matrix_option.label}`
|
|
223
|
-
}
|
|
224
|
-
title={
|
|
225
|
-
intl.formatMessage(messages.addUsersToGroup) +
|
|
226
|
-
` ${matrix_option.label}`
|
|
227
|
-
}
|
|
228
|
-
>
|
|
229
|
-
<Icon
|
|
230
|
-
name={add}
|
|
231
|
-
size="10px"
|
|
232
|
-
className="circled"
|
|
233
|
-
color="unset"
|
|
234
|
-
/>
|
|
235
|
-
</Button>
|
|
236
|
-
<Button
|
|
237
|
-
icon
|
|
238
|
-
basic
|
|
239
|
-
onClick={() =>
|
|
240
|
-
onSelectAllHandler(matrix_option.value, false)
|
|
241
|
-
}
|
|
242
|
-
className="remove-button"
|
|
243
|
-
aria-label={
|
|
244
|
-
intl.formatMessage(messages.removeUsersFromGroup) +
|
|
245
|
-
` ${matrix_option.label}`
|
|
246
|
-
}
|
|
247
|
-
title={
|
|
248
|
-
intl.formatMessage(messages.removeUsersFromGroup) +
|
|
249
|
-
` ${matrix_option.label}`
|
|
250
|
-
}
|
|
251
|
-
>
|
|
252
|
-
<Icon
|
|
253
|
-
name={remove}
|
|
254
|
-
size="10px"
|
|
255
|
-
className="circled"
|
|
256
|
-
color="unset"
|
|
257
|
-
/>
|
|
258
|
-
</Button>
|
|
259
|
-
</div>
|
|
260
|
-
))}
|
|
261
|
-
</div>
|
|
262
|
-
</div>
|
|
263
|
-
</div>
|
|
264
|
-
|
|
265
|
-
<h3>{items.length} users </h3>
|
|
266
231
|
{items.map((item) => (
|
|
267
|
-
<div
|
|
232
|
+
<div
|
|
233
|
+
className="listing-row"
|
|
234
|
+
key={item.id}
|
|
235
|
+
id={`source-row-${item.id}`}
|
|
236
|
+
>
|
|
268
237
|
<div className="listing-item" key={item['@id']}>
|
|
269
238
|
<div>
|
|
270
|
-
<h4>
|
|
271
|
-
{item.fullname
|
|
239
|
+
<h4 title={`${item.fullname} ${item.id}`}>
|
|
240
|
+
{item.fullname?.length > 25
|
|
241
|
+
? item.fullname.slice(0, 22) + '...'
|
|
242
|
+
: item.fullname || item.id}
|
|
272
243
|
</h4>
|
|
273
244
|
</div>
|
|
274
245
|
<div className="matrix_options">
|
|
275
246
|
{matrix_options?.map((matrix_option) => (
|
|
276
247
|
<Checkbox
|
|
277
|
-
name={`member_-_${item.id}_-_${matrix_option.value}`}
|
|
278
248
|
className={`checkbox_${matrix_option.value}`}
|
|
279
249
|
key={matrix_option.value}
|
|
280
250
|
title={matrix_option.title}
|
|
@@ -283,7 +253,6 @@ const ListingTemplate = ({
|
|
|
283
253
|
.includes(matrix_option.value)}
|
|
284
254
|
onChange={(event, { checked }) => {
|
|
285
255
|
onSelectOptionHandler(
|
|
286
|
-
item,
|
|
287
256
|
{ y: matrix_option.value, x: item.id },
|
|
288
257
|
checked,
|
|
289
258
|
true,
|
|
@@ -122,83 +122,87 @@ const UserGroupMembershipMatrix = ({ many_users, many_groups }) => {
|
|
|
122
122
|
|
|
123
123
|
return (
|
|
124
124
|
<div className="controlpanel_matrix">
|
|
125
|
-
<div className="
|
|
126
|
-
<
|
|
127
|
-
<Form
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
125
|
+
<div className="controlpanel_search_wrapper">
|
|
126
|
+
<div className="controlpanel_search_y">
|
|
127
|
+
<Form className="search_users" onSubmit={onReset}>
|
|
128
|
+
<Form.Field>
|
|
129
|
+
<Input
|
|
130
|
+
name="SearchUser"
|
|
131
|
+
action={{ icon: 'delete' }}
|
|
132
|
+
placeholder={intl.formatMessage(messages.searchUsers)}
|
|
133
|
+
onChange={onChangeSearchUsers}
|
|
134
|
+
onKeyDown={onChangeSearchUsers}
|
|
135
|
+
id="user-search-input"
|
|
136
|
+
/>
|
|
137
|
+
</Form.Field>
|
|
138
|
+
</Form>
|
|
139
|
+
</div>
|
|
140
|
+
<div className="controlpanel_search_x">
|
|
141
|
+
<Form className="search_groups" onSubmit={onReset}>
|
|
142
|
+
<Form.Field>
|
|
143
|
+
<Input
|
|
144
|
+
name="SearchGroup"
|
|
145
|
+
action={{ icon: 'delete' }}
|
|
146
|
+
placeholder={intl.formatMessage(messages.searchGroups)}
|
|
147
|
+
onChange={onChangeSearchGroups}
|
|
148
|
+
onKeyDown={onChangeSearchGroups}
|
|
149
|
+
id="group-search-input"
|
|
150
|
+
/>
|
|
151
|
+
</Form.Field>
|
|
152
|
+
<Form.Field>
|
|
153
|
+
<Checkbox
|
|
154
|
+
name="addJoinedGroups"
|
|
155
|
+
label={intl.formatMessage(messages.addJoinedGroups)}
|
|
156
|
+
title={intl.formatMessage(messages.addJoinedGroups)}
|
|
157
|
+
defaultChecked={false}
|
|
158
|
+
onChange={(event, { checked }) => {
|
|
159
|
+
onToggleJoinedGroups(checked);
|
|
160
|
+
}}
|
|
161
|
+
/>
|
|
162
|
+
</Form.Field>
|
|
163
|
+
</Form>
|
|
164
|
+
</div>
|
|
138
165
|
</div>
|
|
139
|
-
<div className="
|
|
140
|
-
<
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
<div className="controlpanel_listing_wrapper">
|
|
167
|
+
<div className="controlpanel_filter">
|
|
168
|
+
<h3>{intl.formatMessage(messages.filterByGroups)}</h3>
|
|
169
|
+
<Form className="search_filter_groups" onSubmit={onReset}>
|
|
170
|
+
<Form.Field>
|
|
171
|
+
<Input
|
|
172
|
+
name="SearchGroupFilter"
|
|
173
|
+
action={{ icon: 'delete' }}
|
|
174
|
+
placeholder={intl.formatMessage(messages.searchGroups)}
|
|
175
|
+
onChange={onChangeSearchGroupsFilter}
|
|
176
|
+
onKeyDown={onChangeSearchGroupsFilter}
|
|
177
|
+
id="groupfilter-search-input"
|
|
178
|
+
/>
|
|
179
|
+
</Form.Field>
|
|
180
|
+
</Form>
|
|
181
|
+
{(!many_groups || query_group_filter.length > 1) &&
|
|
182
|
+
filter_options?.map((filter_option) => (
|
|
183
|
+
<Form.Field>
|
|
184
|
+
<Checkbox
|
|
185
|
+
name={`filter_option_${filter_option.value}`}
|
|
186
|
+
key={filter_option.value}
|
|
187
|
+
title={filter_option.label}
|
|
188
|
+
label={filter_option.label}
|
|
189
|
+
defaultChecked={false}
|
|
190
|
+
onChange={(event, { checked }) => {
|
|
191
|
+
onSelectOptionHandler(filter_option, checked);
|
|
192
|
+
}}
|
|
193
|
+
/>
|
|
194
|
+
</Form.Field>
|
|
195
|
+
))}
|
|
196
|
+
</div>
|
|
197
|
+
<UserGroupMembershipListing
|
|
198
|
+
query_user={query_user}
|
|
199
|
+
query_group={query_group}
|
|
200
|
+
groups_filter={groups_filter}
|
|
201
|
+
add_joined_groups={add_joined_groups}
|
|
202
|
+
many_users={many_users}
|
|
203
|
+
many_groups={many_groups}
|
|
204
|
+
/>
|
|
163
205
|
</div>
|
|
164
|
-
<div className="controlpanel_filter">
|
|
165
|
-
<h3>{intl.formatMessage(messages.filterByGroups)}</h3>
|
|
166
|
-
|
|
167
|
-
<Form className="search_filter_groups" onSubmit={onReset}>
|
|
168
|
-
<Form.Field>
|
|
169
|
-
<Input
|
|
170
|
-
name="SearchGroupFilter"
|
|
171
|
-
action={{ icon: 'delete' }}
|
|
172
|
-
placeholder={intl.formatMessage(messages.searchGroups)}
|
|
173
|
-
onChange={onChangeSearchGroupsFilter}
|
|
174
|
-
onKeyDown={onChangeSearchGroupsFilter}
|
|
175
|
-
id="groupfilter-search-input"
|
|
176
|
-
/>
|
|
177
|
-
</Form.Field>
|
|
178
|
-
</Form>
|
|
179
|
-
|
|
180
|
-
{(!many_groups || query_group_filter.length > 1) &&
|
|
181
|
-
filter_options?.map((filter_option) => (
|
|
182
|
-
<Checkbox
|
|
183
|
-
name={`filter_option_${filter_option.value}`}
|
|
184
|
-
key={filter_option.value}
|
|
185
|
-
title={filter_option.label}
|
|
186
|
-
label={filter_option.label}
|
|
187
|
-
defaultChecked={false}
|
|
188
|
-
onChange={(event, { checked }) => {
|
|
189
|
-
onSelectOptionHandler(filter_option, checked);
|
|
190
|
-
}}
|
|
191
|
-
/>
|
|
192
|
-
))}
|
|
193
|
-
</div>
|
|
194
|
-
<UserGroupMembershipListing
|
|
195
|
-
query_user={query_user}
|
|
196
|
-
query_group={query_group}
|
|
197
|
-
groups_filter={groups_filter}
|
|
198
|
-
add_joined_groups={add_joined_groups}
|
|
199
|
-
many_users={many_users}
|
|
200
|
-
many_groups={many_groups}
|
|
201
|
-
/>
|
|
202
206
|
</div>
|
|
203
207
|
);
|
|
204
208
|
};
|
|
@@ -1,53 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @module components/theme/NotFound/NotFound
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from 'react';
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { BodyClass, toBackendLang } from '@plone/volto/helpers';
|
|
7
3
|
import { FormattedMessage } from 'react-intl';
|
|
8
4
|
import { Link } from 'react-router-dom';
|
|
9
5
|
import { Container } from 'semantic-ui-react';
|
|
10
6
|
import { withServerErrorCode } from '@plone/volto/helpers/Utils/Utils';
|
|
7
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
8
|
+
import { getNavigation } from '@plone/volto/actions';
|
|
9
|
+
import config from '@plone/volto/registry';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Not found function.
|
|
14
13
|
* @function NotFound
|
|
15
14
|
* @returns {string} Markup of the not found page.
|
|
16
15
|
*/
|
|
17
|
-
const NotFound = () =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
16
|
+
const NotFound = () => {
|
|
17
|
+
const dispatch = useDispatch();
|
|
18
|
+
const lang = useSelector((state) => state.intl.locale);
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
dispatch(
|
|
22
|
+
getNavigation(
|
|
23
|
+
config.settings.isMultilingual ? `/${toBackendLang(lang)}` : '/',
|
|
24
|
+
config.settings.navDepth,
|
|
25
|
+
),
|
|
26
|
+
);
|
|
27
|
+
}, [dispatch, lang]);
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Container className="view-wrapper">
|
|
31
|
+
<BodyClass className="page-not-found" />
|
|
32
|
+
<h1>
|
|
33
|
+
<FormattedMessage
|
|
34
|
+
id="This page does not seem to exist…"
|
|
35
|
+
defaultMessage="This page does not seem to exist…"
|
|
36
|
+
/>
|
|
37
|
+
</h1>
|
|
38
|
+
<p className="description">
|
|
39
|
+
<FormattedMessage
|
|
40
|
+
id="We apologize for the inconvenience, but the page you were trying to access is not at this address. You can use the links below to help you find what you are looking for."
|
|
41
|
+
defaultMessage="We apologize for the inconvenience, but the page you were trying to access is not at this address. You can use the links below to help you find what you are looking for."
|
|
42
|
+
/>
|
|
43
|
+
</p>
|
|
44
|
+
<p>
|
|
45
|
+
<FormattedMessage
|
|
46
|
+
id="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
|
|
47
|
+
defaultMessage="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
|
|
48
|
+
values={{
|
|
49
|
+
site_admin: (
|
|
50
|
+
<Link to="/contact-form">
|
|
51
|
+
<FormattedMessage
|
|
52
|
+
id="Site Administration"
|
|
53
|
+
defaultMessage="Site Administration"
|
|
54
|
+
/>
|
|
55
|
+
</Link>
|
|
56
|
+
),
|
|
57
|
+
}}
|
|
58
|
+
/>
|
|
59
|
+
</p>
|
|
60
|
+
<p>
|
|
61
|
+
<FormattedMessage id="Thank you." defaultMessage="Thank you." />
|
|
62
|
+
</p>
|
|
63
|
+
</Container>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
52
66
|
|
|
53
67
|
export default withServerErrorCode(404)(NotFound);
|
|
@@ -44,7 +44,13 @@ const RenderBlocks = (props) => {
|
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
return Block ? (
|
|
47
|
-
<StyleWrapper
|
|
47
|
+
<StyleWrapper
|
|
48
|
+
key={block}
|
|
49
|
+
{...props}
|
|
50
|
+
id={block}
|
|
51
|
+
block={block}
|
|
52
|
+
data={blockData}
|
|
53
|
+
>
|
|
48
54
|
<Block
|
|
49
55
|
id={block}
|
|
50
56
|
metadata={metadata}
|
|
@@ -5,17 +5,19 @@ import RelationWidget from './RelationWidget';
|
|
|
5
5
|
const RelationsWidget = ({ value, children, className }) =>
|
|
6
6
|
value ? (
|
|
7
7
|
<ul className={cx(className, 'relations', 'widget')}>
|
|
8
|
-
{value.map((item, key) =>
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
{value.map((item, key) => {
|
|
9
|
+
return item ? (
|
|
10
|
+
<li key={key}>
|
|
11
|
+
<RelationWidget
|
|
12
|
+
value={item || `relation target not found '${key}'`}
|
|
13
|
+
className={className}
|
|
14
|
+
key={item.token || item.title || item}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</RelationWidget>
|
|
18
|
+
</li>
|
|
19
|
+
) : null;
|
|
20
|
+
})}
|
|
19
21
|
</ul>
|
|
20
22
|
) : (
|
|
21
23
|
''
|
|
@@ -18,6 +18,7 @@ import settingsSVG from '@plone/volto/icons/settings.svg';
|
|
|
18
18
|
import rulesSVG from '@plone/volto/icons/content-existing.svg';
|
|
19
19
|
import undoControlPanelSVG from '@plone/volto/icons/undo-control-panel.svg';
|
|
20
20
|
import linkSVG from '@plone/volto/icons/link.svg';
|
|
21
|
+
import relationsSVG from '@plone/volto/icons/ahead.svg';
|
|
21
22
|
|
|
22
23
|
export const controlPanelsIcons = {
|
|
23
24
|
default: settingsSVG,
|
|
@@ -40,6 +41,7 @@ export const controlPanelsIcons = {
|
|
|
40
41
|
rules: rulesSVG,
|
|
41
42
|
undo: undoControlPanelSVG,
|
|
42
43
|
aliases: linkSVG,
|
|
44
|
+
relations: relationsSVG,
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
export const filterControlPanels = (controlpanels) => {
|
|
@@ -36,6 +36,10 @@ export const GET_NAVIGATION = 'GET_NAVIGATION';
|
|
|
36
36
|
export const GET_PRINCIPALS = 'GET_PRINCIPALS';
|
|
37
37
|
export const GET_QUERYSTRING = 'GET_QUERYSTRING';
|
|
38
38
|
export const GET_QUERYSTRING_RESULTS = 'GET_QUERYSTRING_RESULTS';
|
|
39
|
+
export const CREATE_RELATIONS = 'CREATE_RELATIONS';
|
|
40
|
+
export const DELETE_RELATIONS = 'DELETE_RELATIONS';
|
|
41
|
+
export const LIST_RELATIONS = 'LIST_RELATIONS';
|
|
42
|
+
export const REBUILD_RELATIONS = 'REBUILD_RELATIONS';
|
|
39
43
|
export const GET_SCHEMA = 'GET_SCHEMA';
|
|
40
44
|
export const POST_SCHEMA = 'POST_SCHEMA';
|
|
41
45
|
export const PUT_SCHEMA = 'PUT_SCHEMA';
|
|
@@ -4,14 +4,18 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
|
-
|
|
7
|
+
ca: 'Català',
|
|
8
8
|
de: 'Deutsch',
|
|
9
|
+
en: 'English',
|
|
10
|
+
es: 'Español',
|
|
11
|
+
eu: 'Euskara',
|
|
12
|
+
fi: 'Suomi',
|
|
13
|
+
fr: 'Français',
|
|
14
|
+
it: 'Italiano',
|
|
9
15
|
nl: 'Nederlands',
|
|
10
16
|
ro: 'Română',
|
|
11
17
|
ja: '日本語',
|
|
12
18
|
pt: 'Português',
|
|
13
19
|
pt_BR: 'Português (Brasil)',
|
|
14
|
-
|
|
15
|
-
it: 'Italian',
|
|
16
|
-
eu: 'Euskara',
|
|
20
|
+
zh_CN: '中文',
|
|
17
21
|
};
|
package/src/helpers/Api/Api.js
CHANGED
|
@@ -97,8 +97,10 @@ class Html extends Component {
|
|
|
97
97
|
} = this.props;
|
|
98
98
|
const head = Helmet.rewind();
|
|
99
99
|
const bodyClass = join(BodyClass.rewind(), ' ');
|
|
100
|
+
const htmlAttributes = head.htmlAttributes.toComponent();
|
|
101
|
+
|
|
100
102
|
return (
|
|
101
|
-
<html lang=
|
|
103
|
+
<html lang={htmlAttributes.lang}>
|
|
102
104
|
<head>
|
|
103
105
|
<meta charSet="utf-8" />
|
|
104
106
|
{head.base.toComponent()}
|