Changeset 1999 for sites/trunk/trac.wordpress.org/templates/site.html
- Timestamp:
- 10/18/2015 10:23:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/trac.wordpress.org/templates/site.html
r1997 r1999 20 20 support_link = '//wordpress.org/support/' 21 21 22 profile_link = '//profiles.wordpress.org/'23 22 profile_to_edit = '//wordpress.org/support/profile/' 24 23 … … 32 31 except (IndexError, KeyError): 33 32 pass 34 35 field_types = [ 'milestone', 'priority', 'type', 'severity', 'version', 'component', 'keywords', 'focuses', ]36 37 # Sorting function38 def sort_nicely(field1, field2):39 try:40 idx1 = field_types.index(field1['name'])41 except ValueError:42 idx1 = 1000 # no match, push to the end43 44 try:45 idx2 = field_types.index(field2['name'])46 except ValueError:47 idx2 = 1000 # no match, push to the end48 49 return cmp(idx1, idx2)50 51 if ticket and 'fields' in locals():52 # Sort the fields53 fields.sort(cmp=sort_nicely)54 55 # Re-generate fields_map for use within the ticket template56 fields_map = {}57 for i in xrange(0, len(fields)):58 fields_map[ fields[i]['name'] ] = i59 33 ?> 60 34 … … 221 195 <input type="submit" value="Agree and Upload" /> 222 196 </py:match> 223 224 <!--! Gravatars for the ticket reporter -->225 <td py:match="td[@headers='h_reporter']" py:attrs="select('@*')">226 <a href="${profile_link + ticket.reporter}">227 <img class="avatar" src="//wordpress.org/grav-redirect.php?user=${ticket.reporter}&s=48" srcset="//wordpress.org/grav-redirect.php?user=${ticket.reporter}&s=96 2x" height="48" width="48" />228 </a>229 ${select('*|comment()|text()')}230 </td>231 232 <!--! Gravatars for the ticket owner -->233 <td py:match="td[@headers='h_owner']" py:attrs="select('@*')">234 <a href="${profile_link + ticket.owner}" py:if="ticket.owner">235 <img class="avatar" src="//wordpress.org/grav-redirect.php?user=${ticket.owner}&s=48" srcset="//wordpress.org/grav-redirect.php?user=${ticket.owner}&s=96 2x" height="48" width="48" />236 </a>237 ${select('*|comment()|text()')}238 </td>239 197 240 198 <!--! Show number of Query results even when they fit on one page --> … … 369 327 </body> 370 328 329 <xi:include href="site-ticket.html" /> 371 330 <xi:include href="site-specific.html"><xi:fallback /></xi:include> 372 331 </html>
Note: See TracChangeset
for help on using the changeset viewer.