Skip to content
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7021408
Rating
Tishasoumya-02 Aug 25, 2025
f05de8d
changelog
Tishasoumya-02 Aug 25, 2025
d5d8eab
recheck imports
Tishasoumya-02 Aug 25, 2025
0de6780
merge
Tishasoumya-02 Aug 25, 2025
a667875
update
Tishasoumya-02 Aug 25, 2025
095bf8f
add comments to customized components
Tishasoumya-02 Aug 25, 2025
d9a310b
add comments
Tishasoumya-02 Aug 25, 2025
9ac7038
fix
Tishasoumya-02 Aug 25, 2025
0691805
add other engagement icons
Tishasoumya-02 Aug 26, 2025
6f7908a
merge
Tishasoumya-02 Aug 26, 2025
e965b7f
fix
Tishasoumya-02 Aug 26, 2025
35cada5
Merge branch 'main' into add-likes
Tishasoumya-02 Aug 27, 2025
6a2bab5
comment out calling apis and fix tests failing
Tishasoumya-02 Aug 28, 2025
b304fa3
Merge branch 'add-likes' of github.com:kitconcept/kitconcept.intranet…
Tishasoumya-02 Aug 28, 2025
08e0114
fix lint
Tishasoumya-02 Aug 28, 2025
57a6bc0
fix lint and rename component
Tishasoumya-02 Aug 28, 2025
d786e51
rename stylesheet
Tishasoumya-02 Aug 28, 2025
63e9d5d
merge
Tishasoumya-02 Aug 28, 2025
9982a6e
comment out things which would not work without proper data
Tishasoumya-02 Aug 28, 2025
fb64a51
fix lint
Tishasoumya-02 Aug 28, 2025
e73eedb
fix: add aria-label to button
Tishasoumya-02 Aug 28, 2025
5a264aa
Merge branch 'main' into add-likes
Tishasoumya-02 Aug 29, 2025
400270c
fix
Tishasoumya-02 Aug 29, 2025
5637154
initial commit
iFlameing Sep 3, 2025
2e4a353
backend for likes and comment
iFlameing Sep 5, 2025
4e91a0a
Install plone.app.discussion
davisagli Sep 5, 2025
e64b0b3
90% done
iFlameing Sep 9, 2025
4794efe
minor fix
iFlameing Sep 9, 2025
98182b0
fix after review
iFlameing Sep 11, 2025
ce658ba
Merge branch 'main' into add-likes
iFlameing Sep 11, 2025
15f6127
backend german translation
iFlameing Sep 12, 2025
c4dd90c
add cypress test
iFlameing Sep 12, 2025
6384914
update pnpm
iFlameing Sep 12, 2025
39ecab6
add backend changelog
iFlameing Sep 12, 2025
6e26dfe
add upgreade steps and update backend test
iFlameing Sep 12, 2025
a62f7d0
minor fix
iFlameing Sep 12, 2025
bbf6f13
add enable_likes behaviour and polish code
iFlameing Sep 15, 2025
0ad93f2
Merge branch 'main' into add-likes
iFlameing Sep 15, 2025
2f518b8
polish css code
iFlameing Sep 15, 2025
f0d149c
fix test and format
iFlameing Sep 15, 2025
53f8c27
final polish code
iFlameing Sep 15, 2025
540d6d6
Add upgrade step to install plone.app.discussion
davisagli Sep 16, 2025
3925c9b
refactor code based on review
iFlameing Sep 17, 2025
1d4f89f
Merge branch 'main' into add-likes
iFlameing Sep 17, 2025
2fd411b
fix cypress test
iFlameing Sep 18, 2025
285fa6c
fix backend-test
iFlameing Sep 26, 2025
0eac3dc
fix format
iFlameing Sep 26, 2025
dce49d8
Merge branch 'main' into add-likes
iFlameing Oct 23, 2025
2f564ad
fix format
iFlameing Oct 23, 2025
215796a
fix ci and cypress test
iFlameing Oct 23, 2025
bf356f4
fix the text of sharing content
iFlameing Oct 23, 2025
3f19fa8
minor typo
iFlameing Oct 24, 2025
71c923e
add docs and improve global settings for like
iFlameing Oct 24, 2025
63ce35e
add documentation and changelog
iFlameing Oct 24, 2025
6e9862e
rename changelog file
iFlameing Oct 24, 2025
f95ce25
Fix the bug when navigating to different pages and saving pages
iFlameing Oct 29, 2025
6a5bfde
Hide enable_likes field if enable_content_rating registry setting is …
davisagli Oct 30, 2025
2a39162
final fix
iFlameing Oct 30, 2025
b254aff
Merge branch 'main' into add-likes
iFlameing Oct 30, 2025
473831a
There's no reason to reindex votes, since there is no votes index
davisagli Oct 30, 2025
a8a8ad4
Rename docs page to Content Interactions
davisagli Oct 30, 2025
63c7738
Use proper i18n mechanism for translating share email subject
davisagli Oct 30, 2025
bad5a78
Edit changelog
davisagli Oct 30, 2025
6400814
Enable content rating for new sites, disable for upgraded sites
davisagli Oct 30, 2025
c6739d7
Fix cypress test, ratings are enabled by default now
davisagli Oct 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions backend/news/185.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add backend for content ratings, and enable discussion and ratings for the Page content type. @iFlameing
1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ classifiers = [
dependencies = [
"kitconcept.core==1.0.0b5",
"plone.api",
"plone.app.discussion",
"plone.distribution",
"plone.restapi",
"plone.volto>=5.1.0",
Expand Down
9 changes: 9 additions & 0 deletions backend/src/kitconcept/intranet/behaviors/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
file="meta.zcml"
/>


<plone:behavior
name="kitconcept.intranet.votes"
title="Saves userID who liked an item"
description="Adds votes field"
provides=".votes.IVotes"
/>
Comment thread
iFlameing marked this conversation as resolved.


<plone:behavior
name="kitconcept.intranet.location"
title="Location"
Expand Down
27 changes: 27 additions & 0 deletions backend/src/kitconcept/intranet/behaviors/votes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from kitconcept.intranet import _
from plone.autoform.interfaces import IFormFieldProvider
from plone.supermodel import model
from zope import schema
from zope.interface import provider


@provider(IFormFieldProvider)
class IVotes(model.Schema):
model.fieldset("likes", label=_("Likes"), fields=["votes", "enable_likes"])

votes = schema.List(
title=_("Votes"),
description=_("List of user IDs"),
value_type=schema.TextLine(
title=_("Votes"),
),
required=False,
readonly=True,
)
Comment thread
davisagli marked this conversation as resolved.

enable_likes = schema.Bool(
title=_("Enable Likes"),
description=_("Enable Likes for this Content Object"),
required=False,
default=False,
)
11 changes: 11 additions & 0 deletions backend/src/kitconcept/intranet/controlpanels/intranet.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ class IIntranetSettings(Interface):
]),
)

enable_content_rating = schema.Bool(
title=_("Enable Content Rating"),
description=_("Enable content rating globally for the Intranet"),
required=False,
default=True,
)

iframe_allowed_domains = schema.List(
title=_("Allowed Iframe Domains"),
description="A list of allowed domains for iframes. Example: ['example.com']",
Expand Down Expand Up @@ -102,3 +109,7 @@ def __call__(self, data):
data["kitconcept.intranet.iframe_allowed_domains"] = (
settings.iframe_allowed_domains
)

data["kitconcept.intranet.enable_content_rating"] = (
settings.enable_content_rating
)
1 change: 1 addition & 0 deletions backend/src/kitconcept/intranet/dependencies.zcml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<configure xmlns="http://namespaces.zope.org/zope">

<!-- List all packages you depend here -->
<include package="plone.app.discussion" />
<include package="plone.restapi" />
<include package="plone.distribution" />
<include package="plone.volto" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-09-15 23:05+0000\n"
"POT-Creation-Date: 2025-10-30 20:45+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -22,52 +22,48 @@ msgstr "- Workflow für Intranets. Öffentlicher Zugriff auf veröffentlichte In
msgid "- Workflow for Intranets. Requires authentication."
msgstr "- Workflow für Intranets. Authentifizierung erforderlich."

#: kitconcept/intranet/controlpanels/intranet.py:49
#: kitconcept/intranet/controlpanels/intranet.py:43
msgid "1:1 round picture"
msgstr "1:1 kreisförmiges Bild"

#: kitconcept/intranet/controlpanels/intranet.py:50
#: kitconcept/intranet/controlpanels/intranet.py:44
msgid "4:5 square picture"
msgstr "4:5 quadratisches Bild"

#: kitconcept/intranet/distributions.zcml:17
msgid "A Plone distribution for Intranets with Plone. Created by kitconcept."
msgstr "Eine Plone-Distribution für Intranets mit Plone. Erstellt von kitconcept."

#: kitconcept/intranet/behaviors/person.py:15
#: kitconcept/intranet/behaviors/person.py:17
msgid "Academic Title"
msgstr "Akademischer Titel"

#: kitconcept/intranet/behaviors/configure.zcml:47
#: kitconcept/intranet/behaviors/person.py:37
msgid "Academic Title, First and Last Name"
msgstr ""

#: kitconcept/intranet/behaviors/configure.zcml:49
msgid "Add the intranet-specific person fields"
msgstr "Fügen Sie die intranet-spezifischen Personenfelder hinzu"

#: kitconcept/intranet/behaviors/configure.zcml:40
#: kitconcept/intranet/behaviors/configure.zcml:42
msgid "Add the lifecycle management fields"
msgstr ""
msgstr "Fügen Sie die Felder für das Lebenszyklusmanagement hinzu."

#: kitconcept/intranet/behaviors/configure.zcml:19
msgid "Allows to set configuration that will be injected into the blocks default configuration."
msgstr "Ermöglicht die Festlegung einer Konfiguration, die in die Standardkonfiguration der Blöcke eingefügt wird."
#: kitconcept/intranet/behaviors/configure.zcml:20
msgid "Adds votes field"
msgstr "Feld „Stimmen“ hinzufügen"

#: kitconcept/intranet/behaviors/blocks_settings.py:24
msgid "Blocks configuration"
msgstr "Blocks Konfiguration"
#: kitconcept/intranet/controlpanels/intranet.py:56
msgid "Allowed Iframe Domains"
msgstr ""

#: kitconcept/intranet/profiles/default/workflows/simple_intranet_workflow/definition.xml
#: kitconcept/intranet/profiles/restricted/workflows/simple_intranet_workflow/definition.xml
msgid "Can only be seen and edited by the owner."
msgstr "Kann nur vom Eigentümer angesehen und bearbeitet werden."

#: kitconcept/intranet/controlpanels/intranet.py:33
msgid "Custom CSS"
msgstr "Benutzerdefiniertes CSS"

#: kitconcept/intranet/controlpanels/intranet.py:34
msgid "Custom CSS for the intranet."
msgstr "Benutzerdefiniertes CSS für das Intranet."

#: kitconcept/intranet/behaviors/person.py:26
#: kitconcept/intranet/behaviors/person.py:28
msgid "Department"
msgstr "Abteilung"

Expand All @@ -80,15 +76,31 @@ msgstr "Dr."
msgid "Edit"
msgstr "Bearbeiten"

#: kitconcept/intranet/controlpanels/intranet.py:49
msgid "Enable Content Rating"
msgstr ""

#: kitconcept/intranet/behaviors/votes.py:23
msgid "Enable Likes"
msgstr "Likes aktivieren"

#: kitconcept/intranet/behaviors/votes.py:24
msgid "Enable Likes for this Content Object"
msgstr "Likes für dieses Inhaltsobjekt aktivieren"

#: kitconcept/intranet/controlpanels/intranet.py:50
msgid "Enable content rating globally for the Intranet"
msgstr ""

#: kitconcept/intranet/controlpanels/intranet.py:21
msgid "External Search URL"
msgstr "Externe Such-URL"

#: kitconcept/intranet/behaviors/configure.zcml:26
#: kitconcept/intranet/behaviors/configure.zcml:28
msgid "Fields for Location"
msgstr "Felder für Standort"

#: kitconcept/intranet/behaviors/configure.zcml:33
#: kitconcept/intranet/behaviors/configure.zcml:35
msgid "Fields for Organisational Unit"
msgstr "Felder für Organisationseinheit"

Expand All @@ -105,23 +117,31 @@ msgstr "Öffentlicher Intranet-Workflow"
msgid "Intranet Restricted Workflow"
msgstr "Intranet-beschränkter Workflow"

#: kitconcept/intranet/controlpanels/intranet.py:57
#: kitconcept/intranet/controlpanels/intranet.py:68
msgid "Intranet Settings"
msgstr "Intranet-Einstellungen"

#: kitconcept/intranet/behaviors/configure.zcml:47
#: kitconcept/intranet/behaviors/configure.zcml:49
msgid "Intranet-specific Person fields"
msgstr "Intranet-spezifische Personenfelder"

#: kitconcept/intranet/behaviors/person.py:21
#: kitconcept/intranet/behaviors/person.py:23
msgid "Job Title"
msgstr "Funktion"

#: kitconcept/intranet/behaviors/configure.zcml:40
#: kitconcept/intranet/behaviors/configure.zcml:42
msgid "Lifecycle Management fields"
msgstr "Lebenszyklusmanagement-Felder"

#: kitconcept/intranet/behaviors/votes.py:10
msgid "Likes"
msgstr ""

#: kitconcept/intranet/behaviors/configure.zcml:26
#: kitconcept/intranet/behaviors/votes.py:14
msgid "List of user IDs"
msgstr "Liste der Benutzer-IDs"

#: kitconcept/intranet/behaviors/configure.zcml:28
#: kitconcept/intranet/behaviors/location.py:16
#: kitconcept/intranet/profiles/default/types/Location.xml
msgid "Location"
Expand All @@ -137,7 +157,7 @@ msgstr "Mitglied zieht Einreichung zurück"
msgid "Member submits content for publication"
msgstr "Mitglied reicht Inhalte zur Veröffentlichung ein"

#: kitconcept/intranet/behaviors/configure.zcml:33
#: kitconcept/intranet/behaviors/configure.zcml:35
#: kitconcept/intranet/behaviors/organisational_unit.py:16
#: kitconcept/intranet/profiles/default/types/Organisational_Unit.xml
msgid "Organisational Unit"
Expand All @@ -148,9 +168,9 @@ msgstr "Organisationseinheit"
msgid "Pending review"
msgstr "In Bearbeitung"

#: kitconcept/intranet/controlpanels/intranet.py:39
#: kitconcept/intranet/controlpanels/intranet.py:33
msgid "Person Picture Aspect Ratio"
msgstr ""
msgstr "Bildformat der Person"

#: kitconcept/intranet/controlpanels/intranet.py:28
msgid "Placeholder text for the search field."
Expand Down Expand Up @@ -208,6 +228,10 @@ msgstr "Der Prüfer veröffentlicht Inhalte."
msgid "Reviewer sends content back for re-drafting"
msgstr "Der Prüfer sendet den Inhalt zur Überarbeitung zurück."

#: kitconcept/intranet/behaviors/configure.zcml:20
msgid "Saves userID who liked an item"
msgstr "Speichert die Benutzer-ID, die einen Artikel geliked hat."

#: kitconcept/intranet/controlpanels/intranet.py:27
msgid "Search Field Placeholder"
msgstr "Suchfeld-Platzhalter"
Expand Down Expand Up @@ -239,10 +263,6 @@ msgstr "Zur Veröffentlichung einreichen"
msgid "Taxonomy"
msgstr "Taxonomie"

#: kitconcept/intranet/behaviors/configure.zcml:19
msgid "Through The Web blocks configuration"
msgstr "Blockkonfiguration durch die Weboberfläche"

#: kitconcept/intranet/controlpanels/intranet.py:22
msgid "Used in the intranet header seach bar."
msgstr "Verwendet in der Suchleiste der Intranet-Kopfzeile."
Expand All @@ -260,25 +280,24 @@ msgstr "Für anonyme Benutzer sichtbar, für Redakteure und Prüfer editierbar."
msgid "Visible to authenticated users, editable by editors and reviewers."
msgstr "Für authentifizierte Benutzer sichtbar, für Redakteure und Prüfer editierbar."

#: kitconcept/intranet/behaviors/votes.py:13
msgid "Votes"
msgstr "Stimmen"

#: kitconcept/intranet/profiles/default/workflows/simple_intranet_workflow/definition.xml
#: kitconcept/intranet/profiles/restricted/workflows/simple_intranet_workflow/definition.xml
msgid "Waiting to be reviewed, not editable by the owner."
msgstr "Wartet auf Überprüfung, kann vom Eigentümer nicht bearbeitet werden."

#. Default: "Configure some aspects of the default blocks configuration."
#: kitconcept/intranet/behaviors/blocks_settings.py:41
msgid "help_blocks_config_mutator"
msgstr "Blocks Konfiguration anpassen"

#. Default: "Filter by Organisational Unit"
#: kitconcept/intranet/profiles/default/registry/querystring.xml
msgid "help_organisational_unit"
msgstr "Nach Organisationseinheit filtern"

#. Default: "Image aspect ratio of the person's picture. This setting is used for the person picture on the person profile page, on teasers that point to a person profile page and on listings where persons are displayed."
#: kitconcept/intranet/controlpanels/intranet.py:40
#: kitconcept/intranet/controlpanels/intranet.py:34
msgid "help_person_picture_aspect_ratio"
msgstr ""
msgstr "Seitenverhältnis des Bildes der Person. Diese Einstellung wird für das Bild der Person auf der Profilseite der Person, in Teasern, die auf eine Profilseite der Person verweisen, und in Listen, in denen Personen angezeigt werden, verwendet."

#. Default: "Filter by location"
#: kitconcept/intranet/profiles/default/registry/querystring.xml
Expand All @@ -304,12 +323,12 @@ msgstr ""
#. Default: "Authors"
#: kitconcept/intranet/behaviors/lcm.py:53
msgid "label_authors"
msgstr ""
msgstr "Autoren"

#. Default: "Feedback to"
#: kitconcept/intranet/behaviors/lcm.py:40
msgid "label_feedback_person"
msgstr ""
msgstr "Feedback an"

#. Default: "Organisational Unit"
#: kitconcept/intranet/profiles/default/registry/querystring.xml
Expand All @@ -324,4 +343,4 @@ msgstr "Ort"
#. Default: "Content Owner:"
#: kitconcept/intranet/behaviors/lcm.py:27
msgid "label_responsible"
msgstr ""
msgstr "Inhaltseigentümer:"
Loading
Loading