Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bdk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hebotek
bdk
Commits
4b0c55e9
Commit
4b0c55e9
authored
Dec 18, 2023
by
Michael Apfelthaler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Facts Filter Translation
parent
8fae208f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
79 deletions
+83
-79
index.twig
templates/facts/index.twig
+77
-74
site.php
translations/en/site.php
+6
-5
No files found.
templates/facts/index.twig
View file @
4b0c55e9
{%
extends
"index"
%}
{%
set
baseurl
=
craft.app.sites.primarySite.baseUrl
%}
{%
block
content
%}
<div
class=
"maxWidthLimit"
>
{%
set
category
=
craft.app.request.param
(
'category'
)
%}
{%
set
factsQuery
=
craft.entries
()
.
section
(
'facts'
)
.
kategorien
(
category
|
t
)
%}
<div
class=
"maxWidthLimit"
>
{%
set
category
=
craft.app.request.param
(
'category'
)
%}
{%
set
factsQuery
=
craft.entries
()
.
section
(
'facts'
)
.
kategorien
(
category
|
t
(
language
=
"de"
)
)
%}
<h1
class=
"mt32"
>
{{
"Facts"
|
t
}}
</h1>
<form
class=
"fact-filters wm-nav-tag__list"
>
{%
set
allFilterEnabled
=
true
%}
{%
for
thema
in
craft.entries.section
(
'themen'
)
%}
{%
if
category
==
thema.slug
%}
<button
id=
"
{{
thema.slug
}}
"
type=
"submit"
class=
"wm-nav-tag__link"
name=
"category"
value=
"
{{
thema.slug
}}
"
disabled
>
{{
thema.title
}}
</button>
{%
set
allFilterEnabled
=
false
%}
{%
else
%}
<button
id=
"
{{
thema.slug
}}
"
type=
"submit"
class=
"wm-nav-tag__link"
name=
"category"
value=
"
{{
thema.slug
}}
"
>
{{
thema.title
}}
</button>
{%
endif
%}
{%
endfor
%}
<button
id=
"alle"
type=
"submit"
class=
"wm-nav-tag__link filter-all"
{%
if
allFilterEnabled
==
true
%}
disabled
{%
endif
%}
value=
""
>
{{
"Alle"
|
t
}}
</button>
</form>
<h1
class=
"mt32"
>
{{
"Facts"
|
t
}}
</h1>
<form
class=
"fact-filters wm-nav-tag__list"
>
{%
set
allFilterEnabled
=
true
%}
{%
for
thema
in
craft.entries.section
(
'themen'
)
%}
{%
if
(
category
==
thema.slug
)
or
(
category
|
t
==
thema.slug
)
%}
<button
id=
"
{{
thema.slug
}}
"
type=
"submit"
class=
"wm-nav-tag__link"
name=
"category"
value=
"
{{
thema.slug
}}
"
disabled
>
{{
thema.title
}}
</button>
{%
set
allFilterEnabled
=
false
%}
{%
else
%}
<button
id=
"
{{
thema.slug
}}
"
type=
"submit"
class=
"wm-nav-tag__link"
name=
"category"
value=
"
{{
thema.slug
}}
"
>
{{
thema.title
}}
</button>
{%
endif
%}
{%
endfor
%}
<button
id=
"alle"
type=
"submit"
class=
"wm-nav-tag__link filter-all"
{%
if
allFilterEnabled
==
true
%}
disabled
{%
endif
%}
value=
""
>
{{
"Alle"
|
t
}}
</button>
</form>
{%
paginate
factsQuery.limit
(
12
)
as
entries
%}
<div
class=
"news mt16"
>
{%
for
entry
in
entries
%}
{%
set
image
=
entry.images.one
()
%}
<div
class=
"wm-card wm-card--m wm-card--linked"
data-wm-card
>
{%
for
ket
in
entry.kategorien
%}
<span
class=
"wm-badge wm-card__badge"
>
{{
ket.label
|
t
}}
</span>
{%
endfor
%}
<h3
class=
"wm-card__heading "
>
<a
href=
"
{{
entry.url
}}
"
class=
"wm-card__link wm-link--unstyled "
>
{{
entry.title
}}
</a>
</h3>
<div
class=
"wm-card__media "
>
<img
class=
"wm-image wm-card__image"
loading=
"lazy"
src=
"
{{
baseurl
}}
/
{{
image.url
}}
"
width=
"350"
height=
"197"
data-src=
""
alt=
"Bildbeschreibung"
>
</div>
<div
class=
"wm-card__content wm-rich-text "
>
<p>
{{
entry.teaser
}}
</p>
</div>
<div>
<a
href=
"
{{
entry.url
}}
"
class=
"wm-em-link"
>
<span
class=
"wm-em-link__content"
>
{{
"Mehr lesen"
|
t
}}
</span>
</a>
</div>
</div>
{%
endfor
%}
{%
paginate
factsQuery.limit
(
12
)
as
entries
%}
<div
class=
"news mt16"
>
{%
for
entry
in
entries
%}
{%
set
image
=
entry.images.one
()
%}
<div
class=
"wm-card wm-card--m wm-card--linked"
data-wm-card
>
{%
for
ket
in
entry.kategorien
%}
<span
class=
"wm-badge wm-card__badge"
>
{{
ket.label
|
t
}}
</span>
{%
endfor
%}
<h3
class=
"wm-card__heading "
>
<a
href=
"
{{
entry.url
}}
"
class=
"wm-card__link wm-link--unstyled "
>
{{
entry.title
}}
</a>
</h3>
<div
class=
"wm-card__media "
>
<img
class=
"wm-image wm-card__image"
loading=
"lazy"
src=
"
{{
baseurl
}}
/
{{
image.url
}}
"
width=
"350"
height=
"197"
data-src=
""
alt=
"Bildbeschreibung"
>
</div>
<nav
class=
"wm-pagination mt32"
aria-labelledby=
""
>
<ol
class=
"wm-pagination__items"
>
<li
class=
"wm-pagination__item"
>
{%
if
paginate.prevUrl
%}
<a
class=
"wm-pagination__link button-prev"
href=
"
{{
paginate.prevUrl
}}
"
></a>
{%
endif
%}
</li>
<div
class=
"wm-card__content wm-rich-text "
>
<p>
{{
entry.teaser
}}
</p>
</div>
<div>
<a
href=
"
{{
entry.url
}}
"
class=
"wm-em-link"
>
<span
class=
"wm-em-link__content"
>
{{
"Mehr lesen"
|
t
}}
</span>
</a>
</div>
</div>
{%
endfor
%}
</div>
<nav
class=
"wm-pagination mt32"
aria-labelledby=
""
>
<ol
class=
"wm-pagination__items"
>
<li
class=
"wm-pagination__item"
>
{%
if
paginate.prevUrl
%}
<a
class=
"wm-pagination__link button-prev"
href=
"
{{
paginate.prevUrl
}}
"
></a>
{%
endif
%}
</li>
{%
for
page
,
url
in
paginate.getPrevUrls
(
5
)
%}
<li
class=
"wm-pagination__item"
>
<a
class=
"wm-pagination__link"
href=
"
{{
url
}}
"
>
{{
page
}}
</a>
</li>
{%
endfor
%}
<li
class=
"wm-pagination__item"
>
<span
class=
"current wm-pagination__link "
aria-current=
"page"
>
{{
paginate.currentPage
}}
</span>
</li>
{%
for
page
,
url
in
paginate.getPrevUrls
(
5
)
%}
<li
class=
"wm-pagination__item"
>
<a
class=
"wm-pagination__link"
href=
"
{{
url
}}
"
>
{{
page
}}
</a>
</li>
{%
endfor
%}
<li
class=
"wm-pagination__item"
>
<span
class=
"current wm-pagination__link "
aria-current=
"page"
>
{{
paginate.currentPage
}}
</span>
</li>
{%
for
page
,
url
in
paginate.getNextUrls
(
5
)
%}
<li
class=
"wm-pagination__item"
>
<a
class=
"wm-pagination__link"
href=
"
{{
url
}}
"
>
{{
page
}}
</a>
</li>
{%
endfor
%}
{%
for
page
,
url
in
paginate.getNextUrls
(
5
)
%}
<li
class=
"wm-pagination__item"
>
<a
class=
"wm-pagination__link"
href=
"
{{
url
}}
"
>
{{
page
}}
</a>
</li>
{%
endfor
%}
{%
if
paginate.nextUrl
%}
<li
class=
"wm-pagination__item"
></li>
<a
class=
"wm-pagination__link button-next"
href=
"
{{
paginate.nextUrl
}}
"
></a>
</li>
{%
endif
%}
</ol>
</nav>
{%
if
paginate.nextUrl
%}
<li
class=
"wm-pagination__item"
></li>
<a
class=
"wm-pagination__link button-next"
href=
"
{{
paginate.nextUrl
}}
"
></a>
</li>
{%
endif
%}
</ol>
</nav>
<!--<a href="
{{
paginate.firstUrl
}}
">First Page</a>
<!--<a href="
{{
paginate.firstUrl
}}
">First Page</a>
{%
if
paginate.prevUrl
%}
<a href="
{{
paginate.prevUrl
}}
">Previous Page</a>
{%
endif
%}
{%
for
page
,
url
in
paginate.getPrevUrls
(
5
)
%}
...
...
@@ -93,5 +96,5 @@
{%
if
paginate.nextUrl
%}
<a href="
{{
paginate.nextUrl
}}
">Next Page</a>
{%
endif
%}
-->
</div>
{%
endblock
%}
</div>
{%
endblock
%}
\ No newline at end of file
translations/en/site.php
View file @
4b0c55e9
...
...
@@ -4,12 +4,13 @@ return [
'field.kategorien.option.abfallwirtschaftundentsorgung.label'
=>
'Wastemanagement- and Disposal'
,
'field.kategorien.option.bildung.label'
=>
'Education'
,
'field.kategorien.option.digitalisierung.label'
=>
'Digitalization'
,
'wastemanagementanddisposal'
=>
'abfallwirtschaftundentsorgung'
,
'digitalization'
=>
'digitalisierung'
,
'education'
=>
'bildung'
,
'abfallwirtschaftundentsorgung'
=>
'wastemanagementanddisposal'
,
'digitalisierung'
=>
'digitalization'
,
'bildung'
=>
'education'
,
'abfallwirtschaftundentsorgung'
=>
'wastemanagementanddisposal'
,
'Abfall'
=>
'Waste'
,
'Digitalisierung'
=>
'
d
igitalization'
,
'Bildung'
=>
'
e
ducation'
,
'Digitalisierung'
=>
'
D
igitalization'
,
'Bildung'
=>
'
E
ducation'
,
'Impressum'
=>
'Legal notice'
,
'Datenschutz'
=>
'Privacy'
,
'Barrierefreiheit'
=>
'Accessiblity'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment