Ticket #2703: reply_to_description_static_buttons.2.diff
| File reply_to_description_static_buttons.2.diff, 6.1 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 } -
trac/ticket/web_ui.py
574 574 575 575 # -- Ticket Change History 576 576 577 def quote_original(author, original, link): 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 [%s %s]:' % (link, author)] + 581 ['> %s' % line for line in original.splitlines()] + ['']) 582 583 if replyto == 'description': 584 quote_original(reporter_id, ticket['description'], 585 'ticket:%d' % ticket.id) 586 577 587 changelog = ticket.get_changelog(db=db) 578 588 autonum = 0 # used for "root" numbers 579 589 replies = {} … … 604 614 else: 605 615 this_num = old 606 616 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()] + ['']) 617 if replyto == this_num: 618 quote_original(author, new, 'comment:%s' % replyto) 613 619 elif field == 'description': 614 620 current['fields'][field] = '' 615 621 else: -
templates/ticket.cs
71 71 /if ?><?cs 72 72 /each ?></tr> 73 73 </table> 74 <?cs if:ticket.description ?><div class="description">74 <?cs if:ticket.description ?><div id="description" 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 … … 89 93 each:change = ticket.changes ?> 90 94 <div class="change"> 91 95 <h3 <?cs if:change.cnum ?>id="comment:<?cs var:change.cnum ?>"<?cs /if ?>><?cs 92 if:change.cnum ?><?cs 93 set:nreplies = len(ticket.replies[change.cnum]) ?><?cs 94 if:nreplies || change.replyto ?><span class="threading"> (<?cs 95 if:change.replyto ?>in reply to: <?cs 96 call:commentref('↑', change.replyto) ?><?cs if nreplies ?>; <?cs /if ?><?cs 97 /if ?><?cs 98 if nreplies ?><?cs 99 call:plural('follow-up', nreplies) ?>: <?cs 100 each:reply = ticket.replies[change.cnum] ?><?cs 101 call:commentref('↓', reply) ?><?cs 102 /each ?><?cs 103 /if ?>)<?cs 104 /if ?></span><?cs 96 if:change.cnum ?> 97 <span class="threading"><?cs 98 set:nreplies = len(ticket.replies[change.cnum]) ?><?cs 99 if:nreplies || change.replyto ?>(<?cs 100 if:change.replyto ?>in reply to: <?cs 101 call:commentref('↑ ', change.replyto) ?><?cs if nreplies ?>; <?cs /if ?><?cs 102 /if ?><?cs 103 if nreplies ?><?cs 104 call:plural('follow-up', nreplies) ?>: <?cs 105 each:reply = ticket.replies[change.cnum] ?><?cs 106 call:commentref('↓ ', reply) ?><?cs 107 /each ?><?cs 108 /if ?>)<?cs 109 /if ?><form method="get" action="<?cs var:ticket.href ?>#comment"><span class="inlinebuttons"> 110 <input type="hidden" name="replyto" value="<?cs var:change.cnum ?>" /> 111 <input type="submit" value="Reply" title="Reply to comment <?cs var:change.cnum ?>" /></span> 112 </form> 113 </span><?cs 105 114 /if ?><?cs 106 115 var:change.date ?> changed by <?cs var:change.author ?><?cs 107 116 if:change.cnum ?> <a href="#comment:<?cs var:change.cnum ?>" class="anchor" 108 117 title="Permalink to comment:<?cs var:change.cnum ?>">¶</a><?cs 109 118 /if ?> 110 119 </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 120 if:len(change.fields) ?> 118 121 <ul class="changes"><?cs 119 122 each:field = change.fields ?> … … 176 179 </tr><?cs 177 180 /if ?><?cs 178 181 if:trac.acl.TICKET_ADMIN ?><tr> 179 <th><label for="description ">Description:</label></th>182 <th><label for="description-editor">Description:</label></th> 180 183 <td class="fullrow" colspan="3"> 181 <textarea id="description " name="description" class="wikitext" rows="10" cols="68"><?cs184 <textarea id="description-editor" name="description" class="wikitext" rows="10" cols="68"><?cs 182 185 var:ticket.description ?></textarea> 183 186 </td> 184 187 </tr><tr>
