Skip to content

Commit e4a14c3

Browse files
committed
default value
1 parent aa319c5 commit e4a14c3

File tree

2 files changed

+18
-33
lines changed

2 files changed

+18
-33
lines changed

src/cs_dynamicpages/behaviors/row_vertical_spacing.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,29 @@ class IRowVerticalSpacing(model.Schema):
1919
title=_("Row padding top"),
2020
description=_("Select the padding top that this row will have"),
2121
vocabulary="cs_dynamicpages.RowPaddingTop",
22-
required=True,
23-
default="pt-0",
22+
required=False,
23+
default="",
2424
)
2525
padding_bottom = schema.Choice(
2626
title=_("Row padding bottom"),
2727
description=_("Select the padding bottom that this row will have"),
2828
vocabulary="cs_dynamicpages.RowPaddingBottom",
29-
required=True,
30-
default="pb-0",
29+
required=False,
30+
default="",
3131
)
3232
margin_top = schema.Choice(
3333
title=_("Row margin top"),
3434
description=_("Select the margin top that this row will have"),
3535
vocabulary="cs_dynamicpages.RowMarginTop",
36-
required=True,
37-
default="mt-0",
36+
required=False,
37+
default="",
3838
)
3939
margin_bottom = schema.Choice(
4040
title=_("Row margin bottom"),
4141
description=_("Select the margin bottom that this row will have"),
4242
vocabulary="cs_dynamicpages.RowMarginBottom",
43-
required=True,
44-
default="mb-0",
43+
required=False,
44+
default="",
4545
)
4646

4747
model.fieldset(

src/cs_dynamicpages/views/query_columns_view.pt

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,32 @@
1313
<div class="card">
1414
<tal:image tal:define="
1515
image element/image;
16-
"
17-
tal:condition="image"
18-
tal:on-error="nothing"
19-
>
16+
" tal:condition="image" tal:on-error="nothing">
2017
<img tal:define="
2118
images element/@@images;
22-
"
23-
tal:replace="structure python:images.srcset(fieldname='image',
19+
" tal:replace="structure python:images.srcset(fieldname='image',
2420
scale_in_src='huge',
2521
sizes='(min-width: 1400px) 400px, 100vw',
2622
alt=element.Title() ,
2723
title=element.Title(),
2824
fetchpriority=fetchpriority_image_value,
29-
loading=loading_image_value)"
30-
/>
25+
loading=loading_image_value)" />
3126
</tal:image>
3227
<div class="card-body">
33-
<a class="h5 card-title stretched-link"
34-
href="${element/absolute_url}"
35-
>${element/Title}</a>
36-
<p class="mb-3"
37-
tal:condition="python:element.portal_type != 'Event'"
38-
tal:content="python:element.toLocalizedTime(element.EffectiveDate())"
39-
></p>
40-
<p class="mb-3"
41-
tal:condition="python:element.portal_type == 'Event'"
42-
tal:content="python:element.toLocalizedTime(element.start)"
43-
></p>
28+
<a class="h5 card-title stretched-link" href="${element/absolute_url}">${element/Title}</a>
29+
<p class="mb-3" tal:condition="python:element.portal_type != 'Event'"
30+
tal:content="python:element.toLocalizedTime(element.EffectiveDate())"></p>
31+
<p class="mb-3" tal:condition="python:element.portal_type == 'Event'"
32+
tal:content="python:element.toLocalizedTime(element.start)"></p>
4433

4534
<p class="card-text">${element/Description}</p>
4635
</div>
4736
</div>
4837
</div>
49-
5038
</tal:define>
5139
</tal:repeat>
5240
</div>
5341
<div class="d-flex justify-content-end">
54-
<a href="${context/link_url}"
55-
tal:condition="context/link_url"
56-
>${context/link_text}</a>
42+
<a href="${context/link_url}" tal:condition="context/link_url">${context/link_text}</a>
5743
</div>
58-
59-
</tal:define>
44+
</tal:define>

0 commit comments

Comments
 (0)