Repository: plone.app.contenttypes
Branch: refs/heads/master
Date: 2014-12-30T11:08:40+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.app.contenttypes/commit/199a19e96528231e7fd770a1edc64ad720f7e8e3

use folder_full_view_item and allow overriding

Files changed:
M plone/app/contenttypes/browser/configure.zcml
M plone/app/contenttypes/browser/templates/folder_full_view.pt
M plone/app/contenttypes/browser/templates/folder_full_view_item.pt

diff --git a/plone/app/contenttypes/browser/configure.zcml b/plone/app/contenttypes/browser/configure.zcml
index 13730b4..44c0d62 100644
--- a/plone/app/contenttypes/browser/configure.zcml
+++ b/plone/app/contenttypes/browser/configure.zcml
@@ -154,6 +154,14 @@
     />
 
   <browser:page
+    name="folder_full_view_item"
+    for="Products.CMFCore.interfaces._content.IContentish"
+    layer="plone.app.contenttypes.interfaces.IPloneAppContenttypesLayer"
+    template="templates/folder_full_view_item.pt"
+    permission="zope2.View"
+    />
+
+  <browser:page
     name="folder_summary_view"
     for="plone.dexterity.interfaces.IDexterityContainer"
     layer="plone.app.contenttypes.interfaces.IPloneAppContenttypesLayer"
diff --git a/plone/app/contenttypes/browser/templates/folder_full_view.pt b/plone/app/contenttypes/browser/templates/folder_full_view.pt
index 3971b0f..cb2671b 100644
--- a/plone/app/contenttypes/browser/templates/folder_full_view.pt
+++ b/plone/app/contenttypes/browser/templates/folder_full_view.pt
@@ -14,7 +14,8 @@
             <metal:entries fill-slot="entries">
                 <metal:block use-macro="context/folder_listing/macros/entries">
                     <metal:entry fill-slot="entry">
-                        <div tal:replace="structure python:item.getObject().folder_full_view_item()" />
+                        <div tal:define="obj_view python:item.getObject().restrictedTraverse('folder_full_view_item')"
+                             tal:replace="structure python:obj_view()" />
                     </metal:entry>
                 </metal:block>
             </metal:entries>
diff --git a/plone/app/contenttypes/browser/templates/folder_full_view_item.pt b/plone/app/contenttypes/browser/templates/folder_full_view_item.pt
index 6268a68..55e3477 100644
--- a/plone/app/contenttypes/browser/templates/folder_full_view_item.pt
+++ b/plone/app/contenttypes/browser/templates/folder_full_view_item.pt
@@ -12,9 +12,10 @@
          tal:define="portal_state context/@@plone_portal_state;
                      context_state context/@@plone_context_state;
                      plone_view context/@@plone;
+                     plone_layout context/@@plone_layout;
                      lang portal_state/language;
                      view nocall:view | nocall: plone_view;
-                     dummy python: plone_view.mark_view(view);
+                     dummy python: plone_layout.mark_view(view);
                      portal_url portal_state/portal_url;
                      checkPermission nocall: context/portal_membership/checkPermission;
                      site_properties context/portal_properties/site_properties;
@@ -34,7 +35,7 @@
 
         <h2 class="headline">
             <a href="#" class="summary url" tal:content="context/Title"
-               tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url);">
+               tal:attributes="href python:item_url+'/view' if item_type in use_view_action else item_url;">
                Title or id
              </a>
         </h2>
@@ -65,7 +66,7 @@
 
         <p class="more" tal:condition="python:not(item_macro) or rendering_error">
             <a href=""
-               tal:attributes="href python: item_type in use_view_action and  item_url+'/view' or item_url;"
+               tal:attributes="href python: item_url+'/view' if item_type in use_view_action else item_url;"
                i18n:translate="read_more">
                 Read More&hellip;
             </a>