Making WordPress.org


Ignore:
Timestamp:
10/31/2022 07:08:18 AM (3 years ago)
Author:
dd32
Message:

Trac: Allow editing PR bot comments.

Closes https://github.com/WordPress/wordpress.org/pull/105.
Fixes #6555.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/trac.wordpress.org/templates/ticket_change.html

    r11795 r12168  
    6969      <br /><span class="time-ago">${dateinfo(change.date)} ago</span>
    7070    </span>
     71    <span class="threading">
     72      <span py:if="'cnum' in change" id="comment:$cnum" class="cnum">${commentref('#', cnum)}</span>
     73    </span>
     74    <div py:if="show_buttons" class="trac-ticket-buttons">
     75      <form py:if="'cnum' in change and can_edit_comment" method="get" action="#comment:${cnum}">
     76        <div class="inlinebuttons">
     77        <input type="hidden" name="cnum_edit" value="${cnum}"/>
     78        <input type="submit" value="${captioned_button('✎', _('Edit'))}" title="${_('Edit comment %(cnum)s', cnum=cnum)}" />
     79        </div>
     80      </form>
     81    </div>
    7182  </h3>
    7283  <ul py:if="change.fields" class="changes">
     
    8899    </li>
    89100  </ul>
    90   <div py:if="pr_comment" class="comment searchable" xml:space="preserve">
     101  <div py:if="pr_comment and not show_editor" class="comment searchable" xml:space="preserve">
    91102    ${wiki_to_html(context, pr_comment, escape_newlines=preserve_newlines)}
    92103  </div>
     104  <form py:if="show_editor" id="trac-comment-editor" method="post" action="${href.ticket(ticket.id) + '#comment:%d' % cnum}">
     105    <div>
     106      <textarea name="edited_comment" class="wikitext trac-resizable" rows="10" cols="78">
     107${edited_comment if edited_comment is not None else change.comment}</textarea>
     108      <input type="hidden" name="cnum_edit" value="${cnum}"/>
     109    </div>
     110    <div class="buttons">
     111      <input type="submit" name="edit_comment" value="${_('Submit changes')}" title="${_('Submit changes to comment %(cnum)s', cnum=cnum)}"/>
     112      <input type="submit" name="cancel_comment" value="${_('Cancel')}" title="Cancel comment edit"/>
     113    </div>
     114  </form>
    93115</py:when>
    94116<py:otherwise>
Note: See TracChangeset for help on using the changeset viewer.