| @@ -19,8 +19,9 @@ | ||
| 19 | 19 | per_page: number; |
| 20 | 20 | columns: number; |
| 21 | 21 | title: string; |
| 22 | 22 | show_pagination: boolean; |
| 23 | + cardLayout: "inherit" | "standard" | "compact_mobile" | "compact_all"; | |
| 23 | 24 | destinationIds: number[]; |
| 24 | 25 | activityIds: number[]; |
| 25 | 26 | categoryIds: number[]; |
| 26 | 27 | difficultyIds: number[]; |
| @@ -205,8 +206,33 @@ | ||
| 205 | 206 | <ToggleControl |
| 206 | 207 | label={__("Show pagination", "yatra")} |
| 207 | 208 | checked={attributes.show_pagination} |
| 208 | 209 | onChange={(value) => setAttributes({ show_pagination: value })} |
| 210 | + /> | |
| 211 | + <SelectControl | |
| 212 | + label={__("Card layout", "yatra")} | |
| 213 | + help={__( | |
| 214 | + "Override the site-wide Listing Card Layout (Settings → Design) for this block only. Compact shows a denser image + title + price + View Details card.", | |
| 215 | + "yatra", | |
| 216 | + )} | |
| 217 | + value={attributes.cardLayout || "inherit"} | |
| 218 | + options={[ | |
| 219 | + { label: __("Use site default", "yatra"), value: "inherit" }, | |
| 220 | + { label: __("Standard", "yatra"), value: "standard" }, | |
| 221 | + { | |
| 222 | + label: __("Compact (mobile only)", "yatra"), | |
| 223 | + value: "compact_mobile", | |
| 224 | + }, | |
| 225 | + { | |
| 226 | + label: __("Compact (everywhere)", "yatra"), | |
| 227 | + value: "compact_all", | |
| 228 | + }, | |
| 229 | + ]} | |
| 230 | + onChange={(value: string) => | |
| 231 | + setAttributes({ | |
| 232 | + cardLayout: value as TourBlockAttributes["cardLayout"], | |
| 233 | + }) | |
| 234 | + } | |
| 209 | 235 | /> |
| 210 | 236 | </PanelBody> |
| 211 | 237 | <PanelBody title={__("Filters", "yatra")} initialOpen={false}> |
| 212 | 238 | <ClassificationMultiSelect |