Making WordPress.org


Ignore:
Timestamp:
05/22/2020 05:52:27 AM (4 years ago)
Author:
dd32
Message:

Trac: When a PR is added to a ticket, toggle the has-patch/needs-patch/needs-refresh and needs-unit-tests/has-unit-tests if it touches a tests-looking directory.

Fixes #5080.

File:
1 edited

Legend:

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

    r9531 r9900  
    5959           pr_byline   = change.comment.partition('\n')[0];
    6060           pr_comment  = ''.join(change.comment.partition('\n')[1:]) or False;
    61            prbot_class = 'prbot with-context' if pr_comment else 'prbot without-context';
     61           prbot_class = 'prbot with-context' if pr_comment or change.fields else 'prbot without-context';
    6262         ">
    6363  <h3 class="change chat-bot ${prbot_class}">
     
    7070    </span>
    7171  </h3>
     72  <ul py:if="change.fields" class="changes">
     73    <li py:for="field_name, field in sorted(change.fields.iteritems(), key=lambda item: item[1].label.lower())"
     74        class="trac-field-${field_name}">
     75      <strong class="trac-field-${field_name}">${field.label}</strong>
     76      <py:choose>
     77        <py:when test="'rendered' in field">${field.rendered}</py:when>
     78        <py:when test="field.old and field.new"><i18n:msg params="old, new">
     79          changed from <em>${field.old}</em> to <em>${field.new}</em>
     80        </i18n:msg></py:when>
     81        <py:when test="not field.old and field.new"><i18n:msg params="value">
     82          set to <em>${field.new}</em>
     83        </i18n:msg></py:when>
     84        <py:otherwise><i18n:msg params="value">
     85          <em>${field.old}</em> deleted
     86        </i18n:msg></py:otherwise>
     87      </py:choose>
     88    </li>
     89  </ul>
    7290  <div py:if="pr_comment" class="comment searchable" xml:space="preserve">
    7391    ${wiki_to_html(context, pr_comment, escape_newlines=preserve_newlines)}
Note: See TracChangeset for help on using the changeset viewer.