Ticket #2703: reply_to_description.diff
| File reply_to_description.diff, 2.7 KB (added by cboos, 2 years ago) |
|---|
-
htdocs/css/ticket.css
60 60 .inlinebuttons > input { /* rule ignored by IE */ 61 61 visibility: hidden; 62 62 } 63 div.change:hover .inlinebuttons input { 64 visibility: visible; 65 } 63 div.change:hover .inlinebuttons input { visibility: visible; } 64 div.description:hover .inlinebuttons input { visibility: visible; } 66 65 67 66 #changelog .changes { list-style: square; margin-left: 2em; padding: 0 } 68 67 #changelog .comment { margin-left: 2em } -
templates/ticket.cs
72 72 /each ?></tr> 73 73 </table> 74 74 <?cs if:ticket.description ?><div class="description"> 75 <form method="get" action="<?cs var:ticket.href ?>#comment"><div class="inlinebuttons"> 76 <input type="hidden" name="replyto" value="description" /> 77 <input type="submit" value="Reply" title="Reply, quoting this description" /></div> 78 </form> 75 79 <?cs var:ticket.description.formatted ?> 76 80 </div><?cs /if ?> 77 81 </div> -
trac/ticket/web_ui.py
574 574 575 575 # -- Ticket Change History 576 576 577 def quote_original(author, original): 578 if not 'comment' in req.args: # i.e. the comment was not yet edited 579 req.hdf['ticket.comment'] = '\n'.join( 580 ['Replying to [comment:%s %s]:' % (replyto, author)] + 581 ['> %s' % line for line in original.splitlines()] + ['']) 582 583 if replyto == 'description': 584 quote_original(reporter_id, ticket['description']) 585 577 586 changelog = ticket.get_changelog(db=db) 578 587 autonum = 0 # used for "root" numbers 579 588 replies = {} … … 604 613 else: 605 614 this_num = old 606 615 assert this_num == str(autonum) 607 # if we replied to this comment, quote it (with '>' prefix) 608 if replyto == this_num and not 'comment' in req.args: 609 req.hdf['ticket.comment'] = '\n'.join( 610 ['Replying to [comment:%s %s]:' % \ 611 (replyto, author)] + 612 ['> %s' % line for line in new.splitlines()] + ['']) 616 if replyto == this_num: 617 quote_original(author, new) 613 618 elif field == 'description': 614 619 current['fields'][field] = '' 615 620 else:
