[Zope] Feature I would like to see in next ReplaceSupport

Peter Bengtsson mail@peterbe.com
Thu, 12 Sep 2002 17:50:59 +0100


--=======4ECB7224=======
Content-Type: text/plain; x-avg-checked=avg-ok-2A4D2402; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

Stefan,

When you get a search result using the ReplaceSupport product I think it 
would be great if next to every link there's a little ExternalEditor pen 
for the ExternalEditor product for those who have that installed.

I tried quickly and it works but I'm not sure how good it is.
What I tried was this,  around line 80 in dtml/replaceResults.dtml

    <!-- Peter addition -->
   <dtml-let explicit="_.getitem('sequence-item').aq_explicit"
         parent_url="explicit.aq_parent.absolute_url()">
     <dtml-if expr="_.hasattr(explicit, 'manage_FTPget')
                    or _.hasattr(explicit, 'read')
                    or _.hasattr(explicit, 'document_src')">
       <a href="&dtml-parent_url;/externalEdit_/<dtml-var "explicit.getId()">"
          title="Edit using external editor"
       ><img src="&dtml-BASEPATH1;/misc_/ExternalEditor/edit_icon"
             align="middle" hspace="2" border="0" alt="External Editor" /></a>
     </dtml-if>
   </dtml-let>
   <dtml-if locked_in_version>
     <dtml-if modified_in_version>
       <img src="&dtml-BASEPATH1;/p_/locked"
        alt="This item has been modified in this version" />
     <dtml-else>
       <img src="&dtml-BASEPATH1;/p_/lockedo"
        alt="This item has been modified in another version" />
        (<em>&dtml-locked_in_version;</em>)
     </dtml-if>
   </dtml-if>
    <!-- / Peter addition -->


In my product QuickLinks (http://www.zope.org/Members/peterbe/QuickLinks) I 
override the same stuff as ExternalEditor does if you wanna see how I made 
the distinction between having and not having ExternalEditor installed

--=======4ECB7224=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-2A4D2402
Content-Disposition: inline


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 2002-08-02

--=======4ECB7224=======--