Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Commit bed3507

Browse files
committed
Add keyfeatures and district in realestates
1 parent 000bb90 commit bed3507

File tree

8 files changed

+63
-18
lines changed

8 files changed

+63
-18
lines changed

admin/app.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,21 @@ div[id^=documents-field] {
299299
width: 49%;
300300
}
301301

302+
/* Keyfeatures */
303+
[id^=keyfeatures-field] {
304+
background-color: var(--lightgrey) !important;
305+
}
306+
[id^=keyfeatures-field] [class*=-ControlContainer]:has(> [id^=title-field]) {
307+
clear: none;
308+
float: left;
309+
width: 49%;
310+
}
311+
[id^=keyfeatures-field] [class*=-ControlContainer]:has(> [id^=icon-field]) {
312+
float: right;
313+
width: 49%;
314+
}
315+
316+
302317
/* TAXONOMIES */
303318
[class*=-ControlContainer]:has([id^=reference]) {
304319
float: left;

admin/app/blocks/informations.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { heading } from '../fields/heading.js'
2-
import { icons } from '../fields/icons.js'
2+
import { icon } from '../fields/icon.js'
33
import { image_src } from '../fields/image-src.js'
44
import { image_alt } from '../fields/image-alt.js'
55
import { title } from '../fields/title.js'
@@ -30,7 +30,7 @@ export const block_informations = {
3030
collapsed: true,
3131
summary: '{{title}}',
3232
fields: [
33-
icons,
33+
icon,
3434
{
3535
name: 'image',
3636
label: t.blocks.informations.fields.items.fields.image.label,

admin/app/content/realestates.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { realestates_types } from '../fields/realestates_types.js'
99
import { offer } from '../fields/offer.js'
1010
import { informations } from '../fields/realestates-informations.js'
1111
import { address } from '../fields/address.js'
12+
import { keyfeatures } from '../fields/keyfeatures.js'
1213
import { documents } from '../fields/documents.js'
1314
import { featured_image } from '../fields/featured-image.js'
1415
import { gallery } from '../fields/gallery.js'
@@ -44,6 +45,7 @@ const realestates = {
4445
realestates_persons,
4546
offer,
4647
informations,
48+
keyfeatures,
4749
address,
4850
// documents,
4951
featured_image,

admin/app/fields/icons.js renamed to admin/app/fields/icon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {t} from "../i18n/translater.js";
22

3-
export const icons = {
3+
export const icon = {
44
name: 'icon',
55
label: t.fields.icon.label,
66
widget: 'string',

admin/app/fields/keyfeatures.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { icon } from './icon.js'
2+
import { title } from './title.js'
3+
import { text } from './text.js'
4+
import {t} from "../i18n/translater.js";
5+
6+
export const keyfeatures = {
7+
name: 'keyfeatures',
8+
label: t.fields.keyfeatures.label,
9+
hint: t.fields.keyfeatures.hint,
10+
widget: 'list',
11+
required: false,
12+
i18n: true,
13+
collapsed: false,
14+
fields: [
15+
icon,
16+
title,
17+
text,
18+
]
19+
}
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { sold } from './sold.js'
2-
import { price } from './price.js'
31
import {t} from "../i18n/translater.js";
42

53
export const informations = {
@@ -10,14 +8,15 @@ export const informations = {
108
i18n: true,
119
collapsed: false,
1210
fields: [
13-
{ name: 'year', label: t.fields.informations.fields.year, widget: 'datetime', required: false, date_format: "YYYY", time_format: false },
14-
{ name: 'area', label: t.fields.informations.fields.area.label, hint: t.fields.informations.fields.area.hint, widget: 'number', required: false, min: 0 },
15-
{ name: 'field', label: t.fields.informations.fields.field.label, hint: t.fields.informations.fields.field.hint, widget: 'number', required: false, min: 0 },
16-
{ name: 'levels', label: t.fields.informations.fields.levels, widget: 'number', required: false, min: 0 },
17-
{ name: 'floor', label: t.fields.informations.fields.floor, widget: 'number', required: false },
18-
{ name: 'rooms', label: t.fields.informations.fields.rooms, widget: 'number', required: false, min: 0 },
19-
{ name: 'bedrooms', label: t.fields.informations.fields.bedrooms, widget: 'number', required: false, min: 0 },
20-
{ name: 'bathrooms', label: t.fields.informations.fields.bathrooms, widget: 'number', required: false, min: 0 },
21-
{ name: 'showerrooms', label: t.fields.informations.fields.showerrooms, widget: 'number', required: false, min: 0 },
11+
{ name: 'year', label: t.fields.informations.fields.year, widget: 'datetime', required: false, i18n: 'duplicate', date_format: "YYYY", time_format: false },
12+
{ name: 'district', label: t.fields.informations.fields.district, widget: 'string', required: false, i18n: true },
13+
{ name: 'area', label: t.fields.informations.fields.area.label, hint: t.fields.informations.fields.area.hint, widget: 'number', required: false, i18n: 'duplicate', min: 0 },
14+
{ name: 'field', label: t.fields.informations.fields.field.label, hint: t.fields.informations.fields.field.hint, widget: 'number', required: false, i18n: 'duplicate', min: 0 },
15+
{ name: 'levels', label: t.fields.informations.fields.levels, widget: 'number', required: false, i18n: 'duplicate', min: 0 },
16+
{ name: 'floor', label: t.fields.informations.fields.floor, widget: 'number', required: false, i18n: 'duplicate' },
17+
{ name: 'rooms', label: t.fields.informations.fields.rooms, widget: 'number', required: false, i18n: 'duplicate', min: 0 },
18+
{ name: 'bedrooms', label: t.fields.informations.fields.bedrooms, widget: 'number', required: false, i18n: 'duplicate', min: 0 },
19+
{ name: 'bathrooms', label: t.fields.informations.fields.bathrooms, widget: 'number', required: false, i18n: 'duplicate', min: 0 },
20+
{ name: 'showerrooms', label: t.fields.informations.fields.showerrooms, widget: 'number', required: false, i18n: 'duplicate', min: 0 },
2221
]
2322
}

admin/app/i18n/en/fields.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const fields = {
111111
},
112112
icon: {
113113
label: "Icon",
114-
hint: "Name of the icon, doc : https://icons.getbootstrap.com/font/",
114+
hint: "Name of the icon, doc : https://icons.getbootstrap.com/#icons",
115115
},
116116
image: "Image",
117117
image_alt: {
@@ -132,6 +132,7 @@ export const fields = {
132132
},
133133
bathrooms: "Number of bathrooms",
134134
bedrooms: "Number of bedrooms",
135+
district: "District",
135136
field: {
136137
label: "Exterior area",
137138
hint: "Expressed in m2",
@@ -150,6 +151,10 @@ export const fields = {
150151
is_index: "Is index?",
151152
is_not_index: "Is not index?",
152153
is_page: "Is page?",
154+
keyfeatures: {
155+
label: "Key features",
156+
hint: "e.g.: Location, light…",
157+
},
153158
layout: "Layout",
154159
layout_blocks: "Layout",
155160
legend: "Legend",
@@ -196,7 +201,7 @@ export const fields = {
196201
price: {
197202
hide: "Hide price",
198203
label: "Price",
199-
hint: "ex: 300000 (for 300 000 €)"
204+
hint: "e.g.: 300000 (for 300 000 €)"
200205
},
201206
projects: "Projects",
202207
projects_tags: "Tags",
@@ -215,7 +220,7 @@ export const fields = {
215220
realestates_types: "Type of property",
216221
realestates_status: {
217222
label: "Status",
218-
hint: "ex: Consult us",
223+
hint: "e.g.: Consult us",
219224
},
220225
reference: "Reference",
221226
section: "Type of section",

admin/app/i18n/fr/fields.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const fields = {
110110
},
111111
icon: {
112112
label: "Icône",
113-
hint: "Le nom de l’icône, doc : https://icons.getbootstrap.com/font/",
113+
hint: "Le nom de l’icône, doc : https://icons.getbootstrap.com/#icons",
114114
},
115115
image: "Image",
116116
image_alt: {
@@ -131,6 +131,7 @@ export const fields = {
131131
},
132132
bathrooms: "Nombre de salles de bain",
133133
bedrooms: "Nombre de chambres",
134+
district: "Quartier",
134135
field: {
135136
label: "Surface extérieur",
136137
hint: "Exprimé en m2",
@@ -149,6 +150,10 @@ export const fields = {
149150
is_index: "Est un index ?",
150151
is_not_index: "N'est pas un index ?",
151152
is_page: "Est une page ?",
153+
keyfeatures: {
154+
label: "Caractéristiques principales",
155+
hint: "ex: Emplacement, lumière…",
156+
},
152157
layout: "Layout",
153158
layout_blocks: "Layout",
154159
legend: "Légende",

0 commit comments

Comments
 (0)