Edgewall Software

Ticket #5126: 1459.diff

File 1459.diff, 1.3 KB (added by cboos, 21 months ago)

Updated the CC: rendering patch that eblot posted on #1459, which adds e-mail obfuscation (#153 style)

  • trac/ticket/templates/ticket.html

     
    195195                      <py:when test="field_name == 'attachment'"> 
    196196                        <a href="${href.attachment('ticket', ticket.id, field.new)}"><em>${field.new}</em></a> added 
    197197                      </py:when> 
     198                      <py:when test="field_name == 'cc'"> 
     199                        <py:with vars='newcc=map(lambda s: s.strip(), field.new.split(",")); 
     200                                       oldcc=map(lambda s: s.strip(), field.old.split(",")); 
     201                                       added=", ".join([format_author(x) for x in newcc if x and x not in oldcc]); 
     202                                       removed=", ".join([format_author(x) for x in oldcc if x and x not in newcc])'> 
     203                          <py:if test='added'>added: <em>${added}</em></py:if><py:if test='added and removed'>;</py:if> 
     204                          <py:if test='removed'>removed: <em>${removed}</em></py:if> 
     205                        </py:with> 
     206                      </py:when> 
    198207                      <py:when test="field.old and field.new"> 
    199208                        changed 
    200209                        <py:choose>