Epoz/epoz/epoz_plone epoz_toolbox.pt,1.1,1.2

Maik Jablonski <[email protected]>
Newsgroups gmane.comp.web.zope.epoz
Message-ID <[email protected]>
Update of /cvsroot/epoz/Epoz/epoz/epoz_plone
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21168/epoz/epoz_plone

Modified Files:
	epoz_toolbox.pt 
Log Message:
fixed bug in epoz-toolbox/breadcrumbs

Index: epoz_toolbox.pt
===================================================================
RCS file: /cvsroot/epoz/Epoz/epoz/epoz_plone/epoz_toolbox.pt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** epoz_toolbox.pt	19 Jan 2005 22:54:00 -0000	1.1
--- epoz_toolbox.pt	19 Feb 2005 14:02:21 -0000	1.2
***************
*** 18,24 ****
  </head>
  
! <body onload="focus();" 
        style="margin: 4px;padding:0.5em;"
!       tal:define="checkPermission python: here.portal_membership.checkPermission;">
  
    <form
--- 18,25 ----
  </head>
  
! <body onload="focus();"
        style="margin: 4px;padding:0.5em;"
!       tal:define="portal_url nocall:here/portal_url;
!                   checkPermission python: here.portal_membership.checkPermission;">
  
    <form
***************
*** 56,72 ****
          tal:condition="not: query_results"
          tal:define="parents request/PARENTS;
                      nil python: parents.reverse();
!                     portal here/portal_url/getPortalObject;">
        <tal:block tal:repeat="parent parents">
          <tal:block tal:condition="python:checkPermission('View', parent) and checkPermission('List folder contents', parent)">
!            <img tal:condition="repeat/parent/start" tal:attributes="src string:${here/portal_url}/logoIcon.gif"/>
!            <tal:block tal:condition="not: repeat/parent/start">
!                <a tal:attributes="href string: ${parent/absolute_url}/${template/getId};">
!                   <span tal:content="string: ${parent/title_or_id}"
!                         tal:condition="python: parent.absolute_url()!=portal.absolute_url()"/>
!                   <span tal:content="string:Home" tal:condition="python: parent.absolute_url()==portal.absolute_url()"/>
!                   <span tal:condition="not: repeat/parent/end" class="breadcrumbSeparator">&raquo;</span>
!                 </a>
!            </tal:block>
          </tal:block>
        </tal:block>
--- 57,77 ----
          tal:condition="not: query_results"
          tal:define="parents request/PARENTS;
+                     path portal_url/getPortalPath;
+                     path_len python:len(path.split('/'));
                      nil python: parents.reverse();
!                     parents python:parents[(path_len - 1):]">
        <tal:block tal:repeat="parent parents">
+         <img tal:condition="repeat/parent/start"
+              tal:attributes="src string:${portal_url}/logoIcon.gif"/>
          <tal:block tal:condition="python:checkPermission('View', parent) and checkPermission('List folder contents', parent)">
!           <a tal:attributes="href string: ${parent/absolute_url}/${template/getId};">
!             <span tal:content="string: ${parent/title_or_id}"
!                   tal:condition="not: repeat/parent/start" />
!             <span tal:content="string:Home"
!                   i18n:translate=""
!                   tal:condition="repeat/parent/start"/>
!             <span tal:condition="not: repeat/parent/end"
!                   class="breadcrumbSeparator">&raquo;</span>
!           </a>
          </tal:block>
        </tal:block>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.