Edgewall Software

Ticket #5506: timeline_links_in_attachments.diff

File timeline_links_in_attachments.diff, 944 bytes (added by anonymous, 5 years ago)
  • trac/attachment.py

     
    464464            if 'ATTACHMENT_VIEW' not in req.perm(ctx): 
    465465                continue 
    466466            title = tag(tag.em(os.path.basename(filename)), ' attached to ', 
    467                         tag.em(ctx.parent.name(), title=ctx.parent.summary())) 
     467                        tag.em(ctx.parent.name(), title=ctx.parent.summary(),  
     468                            onclick="parent.location='%s/%s'; return false" % (realm, id), 
     469                            onmouseover="window.status='view %s %s'; return true" % (realm, id), 
     470                            onmouseout="window.status=''" 
     471                            )) 
    468472            event = TimelineEvent(self, 'attachment') 
    469473            event.set_changeinfo(time, author) 
    470474            event.add_markup(title=title)