Ticket #2703: reply_to_description_static_buttons.diff
| File reply_to_description_static_buttons.diff, 4.9 KB (added by cboos, 2 years ago) |
|---|
-
htdocs/css/ticket.css
39 39 #ticket table.properties td { width: 30% } 40 40 #ticket table.properties .description { border-top: 1px solid #dd9 } 41 41 42 #ticket .description form { 43 float: right; 44 position: relative; 45 bottom: 1.8em; 46 } 47 42 48 #changelog { border: 1px outset #996; padding: 1em } 43 49 #changelog h3 { 44 50 border-bottom: 1px solid #d7d7d7; … … 47 53 font-weight: normal; 48 54 } 49 55 #changelog .threading { 50 float: right; 56 float: right; 57 position: relative; 58 bottom: 0.3em; 51 59 } 60 #changelog h3 .threading form { 61 display: inline 62 } 52 63 .inlinebuttons input { 53 float: right;54 64 font-size: 70%; 55 65 border-width: 1px; 56 margin: 0 .5em .1em 1.5em;66 margin: 0 0 0 .5em; 57 67 padding: 0.1em; 58 background -color: #f6f6f6;68 background: none; 59 69 } 60 .inlinebuttons > input { /* rule ignored by IE */61 visibility: hidden;62 }63 div.change:hover .inlinebuttons input {64 visibility: visible;65 }66 70 67 71 #changelog .changes { list-style: square; margin-left: 2em; padding: 0 } 68 72 #changelog .comment { margin-left: 2em } -
templates/ticket.cs
73 73 </table> 74 74 <?cs if:ticket.description ?><div class="description"> 75 75 <?cs var:ticket.description.formatted ?> 76 <form method="get" action="<?cs var:ticket.href ?>#comment"><div class="inlinebuttons"> 77 <input type="hidden" name="replyto" value="description" /> 78 <input type="submit" value="Reply" title="Reply, quoting this description" /></div> 79 </form> 76 80 </div><?cs /if ?> 77 81 </div> 78 82 … … 93 97 set:nreplies = len(ticket.replies[change.cnum]) ?><?cs 94 98 if:nreplies || change.replyto ?><span class="threading"> (<?cs 95 99 if:change.replyto ?>in reply to: <?cs 96 call:commentref('↑ ', change.replyto) ?><?cs if nreplies ?>; <?cs /if ?><?cs100 call:commentref('↑ ', change.replyto) ?><?cs if nreplies ?>; <?cs /if ?><?cs 97 101 /if ?><?cs 98 102 if nreplies ?><?cs 99 103 call:plural('follow-up', nreplies) ?>: <?cs 100 104 each:reply = ticket.replies[change.cnum] ?><?cs 101 call:commentref('↓ ', reply) ?><?cs105 call:commentref('↓ ', reply) ?><?cs 102 106 /each ?><?cs 103 107 /if ?>)<?cs 104 /if ?></span><?cs 108 /if ?><form method="get" action="<?cs var:ticket.href ?>#comment"><span class="inlinebuttons"> 109 <input type="hidden" name="replyto" value="<?cs var:change.cnum ?>" /> 110 <input type="submit" value="Reply" title="Reply to comment <?cs var:change.cnum ?>" /></span> 111 </form> 112 </span><?cs 105 113 /if ?><?cs 106 114 var:change.date ?> changed by <?cs var:change.author ?><?cs 107 115 if:change.cnum ?> <a href="#comment:<?cs var:change.cnum ?>" class="anchor" 108 116 title="Permalink to comment:<?cs var:change.cnum ?>">¶</a><?cs 109 117 /if ?> 110 118 </h3><?cs 111 if:change.cnum ?>112 <form method="get" action="<?cs var:ticket.href ?>#comment"><div class="inlinebuttons">113 <input type="hidden" name="replyto" value="<?cs var:change.cnum ?>" />114 <input type="submit" value="Reply" title="Reply to comment <?cs var:change.cnum ?>" /></div>115 </form><?cs116 /if ?><?cs117 119 if:len(change.fields) ?> 118 120 <ul class="changes"><?cs 119 121 each:field = change.fields ?> -
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:
