Skip to content

Commit

Permalink
use BS class on li
Browse files Browse the repository at this point in the history
  • Loading branch information
petschki committed Aug 30, 2024
1 parent 93d363d commit c854b34
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 39 deletions.
38 changes: 18 additions & 20 deletions src/collective/collectionfilter/portlets/collectionfilter.pt
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,25 @@
<tal:if condition="python:input_type in ('checkbox', 'radio')">
<ul>
<tal:items repeat="item results">
<li class="${item/css_class} ${input_type}">
<div class="form-check">
<input class="form-check-input"
id="${view/filterClassName}-${item/value}"
checked="${python:'checked' if item['selected'] else None}"
name="${view/filter_id}"
type="${input_type}"
value="${item/value}"
data-url="${item/url}"
/>
<li class="${item/css_class} ${input_type} form-check">
<input class="form-check-input"
id="${view/filterClassName}-${item/value}"
checked="${python:'checked' if item['selected'] else None}"
name="${view/filter_id}"
type="${input_type}"
value="${item/value}"
data-url="${item/url}"
/>

<label class="form-check-label"
for="${view/filterClassName}-${item/value}"
>
<span class="indicator"></span>
<span class="filterLabel">
<span tal:replace="python:item['title'].replace('/', u'/\u00AD')">Item</span>
<tal:show_count condition="view/settings/show_count">(<span tal:replace="item/count"></span>)</tal:show_count>
</span>
</label>
</div>
<label class="form-check-label"
for="${view/filterClassName}-${item/value}"
>
<span class="indicator"></span>
<span class="filterLabel">
<span tal:replace="python:item['title'].replace('/', u'/\u00AD')">Item</span>
<tal:show_count condition="view/settings/show_count">(<span tal:replace="item/count"></span>)</tal:show_count>
</span>
</label>
</li>
</tal:items>
</ul>
Expand Down
36 changes: 17 additions & 19 deletions src/collective/collectionfilter/tiles/filter.pt
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,23 @@
<tal:if condition="python:input_type in ('checkbox', 'radio')">
<ul>
<tal:items repeat="item results">
<li class="${item/css_class}">
<div class="form-check">
<input class="form-check-input"
id="${view/filterClassName}-${item/value}"
checked="${python:'checked' if item['selected'] else None}"
name="${view/filter_id}"
type="${input_type}"
value="${item/value}"
data-url="${item/url}"
/>
<label class="form-check-label"
for="${view/filterClassName}-${item/value}"
>
<span class="filterLabel">
<span tal:replace="python:item['title'].replace('/', u'/\u00AD')">Item</span>
<tal:show_count condition="view/settings/show_count">(<span tal:replace="item/count"></span>)</tal:show_count>
</span>
</label>
</div>
<li class="${item/css_class} form-check">
<input class="form-check-input"
id="${view/filterClassName}-${item/value}"
checked="${python:'checked' if item['selected'] else None}"
name="${view/filter_id}"
type="${input_type}"
value="${item/value}"
data-url="${item/url}"
/>
<label class="form-check-label"
for="${view/filterClassName}-${item/value}"
>
<span class="filterLabel">
<span tal:replace="python:item['title'].replace('/', u'/\u00AD')">Item</span>
<tal:show_count condition="view/settings/show_count">(<span tal:replace="item/count"></span>)</tal:show_count>
</span>
</label>
</li>
</tal:items>
</ul>
Expand Down

0 comments on commit c854b34

Please sign in to comment.