Skip to content

Commit

Permalink
add show-places toggle to map block
Browse files Browse the repository at this point in the history
  • Loading branch information
sebousan committed Dec 13, 2023
1 parent 575abad commit cf01aa0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/app/blocks/map.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { heading } from '../fields/heading.js';
import { show_places } from '../fields/show-places.js';
import { map } from '../fields/map.js';
import { zoom } from '../fields/zoom.js';
import { grid } from '../fields/grid.js';
Expand All @@ -13,5 +14,5 @@ export const block_map = {
i18n: true,
collapsed: false,
summary: '{{title}}',
fields: [heading, map, zoom, grid, background]
fields: [heading, show_places, map, zoom, grid, background]
};
11 changes: 11 additions & 0 deletions admin/app/fields/show-places.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { t } from '../i18n/translater.js';

export const show_places = {
name: 'show_places',
label: t.fields.show_places.label,
hint: t.fields.show_places.hint,
widget: 'boolean',
default: false,
required: false,
i18n: 'duplicate'
};
4 changes: 4 additions & 0 deletions admin/app/i18n/en/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ export const fields = {
},
show_gauge: 'Display a progress gauge?',
show_more: 'Display a button to discover more elements?',
show_places: {
label: 'Display all registered places?',
hint: 'Only if you have places already saved (this will disable the marker below)'
},
sold: 'Sold?',
screenshot: {
label: 'Screenshot?',
Expand Down
4 changes: 4 additions & 0 deletions admin/app/i18n/fr/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ export const fields = {
},
show_gauge: 'Afficher une jaune de progression ?',
show_more: 'Afficher un bouton pour découvrir plus d’éléments ?',
show_places: {
label: 'Afficher tous les lieux enregistrés ?',
hint: 'Seulement si vous avez des lieux déjà enregistrés (ceci désactivera le repère ci-dessous)'
},
sold: 'Vendu ?',
screenshot: {
label: 'Capture d’écran ?',
Expand Down

0 comments on commit cf01aa0

Please sign in to comment.