Edgewall Software

Ticket #1459: 1459.diff

File 1459.diff, 1.3 KB (added by eblot, 5 years ago)

Patch for 0.11 to improve presentation of changes in CC: field

  • 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([x for x in newcc if x and x not in oldcc]); 
     202                                       removed=", ".join([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>