| @@ -354,8 +354,33 @@ | ||
| 354 | 354 | label: i18n.__("Show pagination", "yatra"), |
| 355 | 355 | checked: attributes2.show_pagination, |
| 356 | 356 | onChange: (value) => setAttributes({ show_pagination: value }) |
| 357 | 357 | } |
| 358 | + ), /* @__PURE__ */ element.createElement( | |
| 359 | + components.SelectControl, | |
| 360 | + { | |
| 361 | + label: i18n.__("Card layout", "yatra"), | |
| 362 | + help: i18n.__( | |
| 363 | + "Override the site-wide Listing Card Layout (Settings → Design) for this block only. Compact shows a denser image + title + price + View Details card.", | |
| 364 | + "yatra" | |
| 365 | + ), | |
| 366 | + value: attributes2.cardLayout || "inherit", | |
| 367 | + options: [ | |
| 368 | + { label: i18n.__("Use site default", "yatra"), value: "inherit" }, | |
| 369 | + { label: i18n.__("Standard", "yatra"), value: "standard" }, | |
| 370 | + { | |
| 371 | + label: i18n.__("Compact (mobile only)", "yatra"), | |
| 372 | + value: "compact_mobile" | |
| 373 | + }, | |
| 374 | + { | |
| 375 | + label: i18n.__("Compact (everywhere)", "yatra"), | |
| 376 | + value: "compact_all" | |
| 377 | + } | |
| 378 | + ], | |
| 379 | + onChange: (value) => setAttributes({ | |
| 380 | + cardLayout: value | |
| 381 | + }) | |
| 382 | + } | |
| 358 | 383 | )), /* @__PURE__ */ element.createElement(components.PanelBody, { title: i18n.__("Filters", "yatra"), initialOpen: false }, /* @__PURE__ */ element.createElement( |
| 359 | 384 | ClassificationMultiSelect, |
| 360 | 385 | { |
| 361 | 386 | taxonomy: "destination", |
| @@ -500,8 +525,18 @@ | ||
| 500 | 525 | }, |
| 501 | 526 | show_pagination: { |
| 502 | 527 | type: "boolean", |
| 503 | 528 | "default": true |
| 529 | + }, | |
| 530 | + cardLayout: { | |
| 531 | + type: "string", | |
| 532 | + "default": "inherit", | |
| 533 | + "enum": [ | |
| 534 | + "inherit", | |
| 535 | + "standard", | |
| 536 | + "compact_mobile", | |
| 537 | + "compact_all" | |
| 538 | + ] | |
| 504 | 539 | }, |
| 505 | 540 | destinationIds: { |
| 506 | 541 | type: "array", |
| 507 | 542 | "default": [] |