Skip to content

Commit

Permalink
Merge pull request #34 from plone/plip-13770-portal-tools-removal
Browse files Browse the repository at this point in the history
PLIP 13770 Use plone_interface_info instead of portal_interface
  • Loading branch information
jaroel committed Nov 12, 2013
2 parents 2be94b2 + d255302 commit 4c24564
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,9 @@ Changelog
1.10.0 (unreleased)
-------------------

- Do not use portal_interface tool but @@plone_interface_info (PLIP #13770).
[ale-rt]

- Internationalized file size and content type on file widget.
[thomasdesvenain]

Expand Down
10 changes: 6 additions & 4 deletions Products/Archetypes/skins/archetypes/widgets/reference.pt
Expand Up @@ -15,7 +15,8 @@

<tal:block tal:condition="not:field/multiValued"
tal:define="ref python:refs[0];
obj ref/getTargetObject">
obj ref/getTargetObject;
ref_interface_info nocall:ref/@@plone_interface_info">

<a href="#"
tal:attributes="href obj/absolute_url;
Expand All @@ -25,7 +26,7 @@
</a>

<a href="#"
tal:condition="python:portal.portal_interface.objectImplements(ref,'Products.Archetypes.interfaces.referenceengine.IContentReference')"
tal:condition="python:ref_interface_info.provides('Products.Archetypes.interfaces.referenceengine.IContentReference')"
tal:attributes="href python:ref.getContentObject().absolute_url()"
tal:content="field/relationship">
reference object link
Expand All @@ -35,7 +36,8 @@

<ul tal:condition="field/multiValued">
<li tal:repeat="ref refs">
<tal:block tal:define="obj ref/getTargetObject">
<tal:block tal:define="obj ref/getTargetObject;
ref_interface_info nocall:ref/@@plone_interface_info">
<a href="#"
tal:attributes="href obj/absolute_url;
class python:obj.portal_type.replace(' ', '_')"
Expand All @@ -44,7 +46,7 @@
</a>

<a href="#"
tal:condition="python:portal.portal_interface.objectImplements(ref,'Products.Archetypes.interfaces.referenceengine.IContentReference')"
tal:condition="python:ref_interface_info.provides('Products.Archetypes.interfaces.referenceengine.IContentReference')"
tal:attributes="href python:ref.getContentObject().absolute_url()"
tal:content="field/relationship">
reference object link
Expand Down

1 comment on commit 4c24564

@mister-roboto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TESTS FAILED
Mr.roboto url : http://jenkins.plone.org/roboto/get_info?push=001aa17b4a164f57aaa9214524fec8d4
kgs-Products.Archetypes-plone-5.0-python-2.7 kgs [FAILURE]

Please sign in to comment.