From 4966d8388e7d10e768ee7d5037cf19dcb06bfb93 Mon Sep 17 00:00:00 2001 From: Philip Bauer Date: Thu, 27 Jun 2019 19:43:27 +0200 Subject: [PATCH] add plone.resource dependency and change to plone:static --- .../howto_override_comments_viewlet.txt | 34 +------------------ plone/app/discussion/browser/configure.zcml | 5 +-- plone/app/discussion/browser/controlpanel.pt | 2 +- plone/app/discussion/browser/moderation.pt | 2 +- .../discussion/profiles/default/metadata.xml | 1 + .../discussion/profiles/default/registry.xml | 2 +- 6 files changed, 8 insertions(+), 38 deletions(-) diff --git a/docs/source/howtos/howto_override_comments_viewlet.txt b/docs/source/howtos/howto_override_comments_viewlet.txt index 11c0248..b45aba4 100644 --- a/docs/source/howtos/howto_override_comments_viewlet.txt +++ b/docs/source/howtos/howto_override_comments_viewlet.txt @@ -135,36 +135,4 @@ comments.py file with our custom version of the comments viewlet:: return "%s/memberhome/%s" % (self.context.portal_url(), username) To override the comments viewlet template, we create a comment.pt file in the -same directory and copy the contents from:: - - ... - - -Override the comments viewlet Javascript ----------------------------------------- - -Overriding the comments viewlet javascript works just like overriding the -comments viewlet. We register the javascript file for our custom browser -layer and remove the existing javascript file in -profiles/default/jsregistry.xml:: - - - - - - - - - -browser/configure.zcml:: - - - +same directory and copy the contents from the original. diff --git a/plone/app/discussion/browser/configure.zcml b/plone/app/discussion/browser/configure.zcml index 6a0efa2..7bb5aac 100644 --- a/plone/app/discussion/browser/configure.zcml +++ b/plone/app/discussion/browser/configure.zcml @@ -1,6 +1,7 @@ @@ -129,10 +130,10 @@ /> - diff --git a/plone/app/discussion/browser/controlpanel.pt b/plone/app/discussion/browser/controlpanel.pt index b62a447..d525fcb 100644 --- a/plone/app/discussion/browser/controlpanel.pt +++ b/plone/app/discussion/browser/controlpanel.pt @@ -70,7 +70,7 @@ diff --git a/plone/app/discussion/browser/moderation.pt b/plone/app/discussion/browser/moderation.pt index 797c18a..073d4d2 100644 --- a/plone/app/discussion/browser/moderation.pt +++ b/plone/app/discussion/browser/moderation.pt @@ -18,7 +18,7 @@ b_start request/b_start | b_start; moderation_enabled view/moderation_enabled;">

diff --git a/plone/app/discussion/profiles/default/metadata.xml b/plone/app/discussion/profiles/default/metadata.xml index f14a707..6557251 100644 --- a/plone/app/discussion/profiles/default/metadata.xml +++ b/plone/app/discussion/profiles/default/metadata.xml @@ -1,6 +1,7 @@ 1000 + profile-plone.resource:default profile-plone.app.registry:default diff --git a/plone/app/discussion/profiles/default/registry.xml b/plone/app/discussion/profiles/default/registry.xml index 5c046f4..ba7fe98 100644 --- a/plone/app/discussion/profiles/default/registry.xml +++ b/plone/app/discussion/profiles/default/registry.xml @@ -7,7 +7,7 @@ - ++resource++plone.app.discussion.javascripts/comments.js + ++plone++plone.app.discussion.javascripts/comments.js