Skip to content

Commit ac22312

Browse files
authored
Added a control panel setting for disabling the link for Person content types in teasers and listings. (#95)
1 parent 711a779 commit ac22312

File tree

10 files changed

+62
-8
lines changed

10 files changed

+62
-8
lines changed

backend/news/+personlink.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a control panel setting for disabling the link for Person content types in teasers and listings. @iFlameing

backend/src/kitconcept/core/controlpanel/kitconcept.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ class IKitconceptSettings(Interface):
2121
required=False,
2222
)
2323

24+
disable_profile_links = schema.Bool(
25+
title=_("Non-clickable Profiles"),
26+
description=_(
27+
"Person profiles are not clickable in teasers, grids, listings, and search"
28+
),
29+
required=False,
30+
default=False,
31+
)
32+
2433

2534
class KitconceptSettingsEditForm(RegistryEditForm):
2635
schema = IKitconceptSettings
@@ -59,3 +68,4 @@ def __call__(self, data):
5968
IKitconceptSettings, prefix="kitconcept.core.settings"
6069
)
6170
data["kitconcept.custom_css"] = settings.custom_css
71+
data["kitconcept.disable_profile_links"] = settings.disable_profile_links

backend/src/kitconcept/core/locales/de/LC_MESSAGES/kitconcept.core.po

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: PACKAGE VERSION\n"
4-
"POT-Creation-Date: 2025-12-09 17:11+0000\n"
4+
"POT-Creation-Date: 2026-01-22 13:13+0000\n"
55
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
66
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
77
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -50,10 +50,18 @@ msgstr "Generisches Setup-Profil mit Kernabhängigkeiten, die von CMF benötigt
5050
msgid "Generic setup profile with dependencies used by kitconcept projects."
5151
msgstr "Generisches Setup-Profil mit Abhängigkeiten, die von kitconcept-Projekten verwendet werden."
5252

53+
#: kitconcept/core/controlpanel/kitconcept.py:25
54+
msgid "Non-clickable Profiles"
55+
msgstr "Nicht anklickbare Profile"
56+
5357
#: kitconcept/core/profiles/dependencies/registry/querystring.xml
5458
msgid "Path"
5559
msgstr "Pfad"
5660

61+
#: kitconcept/core/controlpanel/kitconcept.py:26
62+
msgid "Person profiles are not clickable in teasers, grids, listings, and search"
63+
msgstr "Personenprofile sind in Teasern, Rastern, Listen und Suchergebnissen nicht anklickbar."
64+
5765
#: kitconcept/core/behaviors/configure.zcml:27
5866
msgid "Person: Additional contact information"
5967
msgstr "Person: Zusätzliche Kontaktinformationen"
@@ -93,7 +101,7 @@ msgstr "Kurzbiographie der Person."
93101
msgid "help_person_image"
94102
msgstr "Laden Sie ein normales Portraitbild mit Ihrem Kopf in der Mitte hoch."
95103

96-
#: kitconcept/core/controlpanel/kitconcept.py:27
104+
#: kitconcept/core/controlpanel/kitconcept.py:36
97105
msgid "kitconcept Settings"
98106
msgstr ""
99107

backend/src/kitconcept/core/locales/en/LC_MESSAGES/kitconcept.core.po

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: PACKAGE VERSION\n"
4-
"POT-Creation-Date: 2025-12-09 17:11+0000\n"
4+
"POT-Creation-Date: 2026-01-22 13:13+0000\n"
55
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
66
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
77
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -50,10 +50,18 @@ msgstr ""
5050
msgid "Generic setup profile with dependencies used by kitconcept projects."
5151
msgstr ""
5252

53+
#: kitconcept/core/controlpanel/kitconcept.py:25
54+
msgid "Non-clickable Profiles"
55+
msgstr ""
56+
5357
#: kitconcept/core/profiles/dependencies/registry/querystring.xml
5458
msgid "Path"
5559
msgstr ""
5660

61+
#: kitconcept/core/controlpanel/kitconcept.py:26
62+
msgid "Person profiles are not clickable in teasers, grids, listings, and search"
63+
msgstr ""
64+
5765
#: kitconcept/core/behaviors/configure.zcml:27
5866
msgid "Person: Additional contact information"
5967
msgstr ""
@@ -93,7 +101,7 @@ msgstr ""
93101
msgid "help_person_image"
94102
msgstr ""
95103

96-
#: kitconcept/core/controlpanel/kitconcept.py:27
104+
#: kitconcept/core/controlpanel/kitconcept.py:36
97105
msgid "kitconcept Settings"
98106
msgstr ""
99107

backend/src/kitconcept/core/locales/kitconcept.core.pot

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
msgid ""
55
msgstr ""
66
"Project-Id-Version: PACKAGE VERSION\n"
7-
"POT-Creation-Date: 2025-12-09 17:11+0000\n"
7+
"POT-Creation-Date: 2026-01-22 13:13+0000\n"
88
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
99
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1010
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -53,10 +53,18 @@ msgstr ""
5353
msgid "Generic setup profile with dependencies used by kitconcept projects."
5454
msgstr ""
5555

56+
#: kitconcept/core/controlpanel/kitconcept.py:25
57+
msgid "Non-clickable Profiles"
58+
msgstr ""
59+
5660
#: kitconcept/core/profiles/dependencies/registry/querystring.xml
5761
msgid "Path"
5862
msgstr ""
5963

64+
#: kitconcept/core/controlpanel/kitconcept.py:26
65+
msgid "Person profiles are not clickable in teasers, grids, listings, and search"
66+
msgstr ""
67+
6068
#: kitconcept/core/behaviors/configure.zcml:27
6169
msgid "Person: Additional contact information"
6270
msgstr ""
@@ -96,7 +104,7 @@ msgstr ""
96104
msgid "help_person_image"
97105
msgstr ""
98106

99-
#: kitconcept/core/controlpanel/kitconcept.py:27
107+
#: kitconcept/core/controlpanel/kitconcept.py:36
100108
msgid "kitconcept Settings"
101109
msgstr ""
102110

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<metadata>
3-
<version>20251209001</version>
3+
<version>20260122001</version>
44
</metadata>

backend/src/kitconcept/core/upgrades/configure.zcml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
<include package=".v20250916001" />
1010
<include package=".v20250917001" />
1111
<include package=".v20251209001" />
12+
<include package=".v20260122001" />
1213

1314
</configure>

backend/src/kitconcept/core/upgrades/v20260122001/__init__.py

Whitespace-only changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<configure
2+
xmlns="http://namespaces.zope.org/zope"
3+
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
4+
>
5+
6+
<genericsetup:upgradeSteps
7+
profile="kitconcept.core:base"
8+
source="20251209001"
9+
destination="20260122001"
10+
>
11+
<genericsetup:upgradeDepends
12+
title="Adds disable_profile_links setting to kitconcept settings"
13+
import_profile="kitconcept.core:dependencies"
14+
import_steps="plone.app.registry"
15+
/>
16+
</genericsetup:upgradeSteps>
17+
18+
</configure>

backend/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def current_versions() -> CurrentVersions:
3232
from kitconcept.core import __version__
3333

3434
return CurrentVersions(
35-
base="20251209001",
35+
base="20260122001",
3636
dependencies="1000",
3737
package=__version__,
3838
)

0 commit comments

Comments
 (0)