Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 {% extends "base.html" %} | 1 {% extends "base.html" %} |
| 2 | 2 |
| 3 {% block content %} | 3 {% block content %} |
| 4 <script type="text/javascript"> | 4 <script type="text/javascript"> |
| 5 window.onload=function() { | 5 window.onload=function() { |
| 6 document.add_new_message.message.focus(); | 6 document.add_new_message.message.focus(); |
| 7 } | 7 } |
| 8 </script> | 8 </script> |
| 9 <center> | 9 <center> |
| 10 {% if write_access %} | 10 {% if write_access %} |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 <br> | 24 <br> |
| 25 <h2>Last <a href="?limit={{ limit }}">{{ limit }}</a> {{ title }}</h2> | 25 <h2>Last <a href="?limit={{ limit }}">{{ limit }}</a> {{ title }}</h2> |
| 26 <table border="1" cellpadding="5"> | 26 <table border="1" cellpadding="5"> |
| 27 <tr bgcolor="#CCCCFF"> | 27 <tr bgcolor="#CCCCFF"> |
| 28 <td><b>Who</b></td> | 28 <td><b>Who</b></td> |
| 29 <td><b>When (UTC)</b></td> | 29 <td><b>When (UTC)</b></td> |
| 30 <td><b>Message</b></td> | 30 <td><b>Message</b></td> |
| 31 </tr> | 31 </tr> |
| 32 {% for a_status in status %} | 32 {% for a_status in status %} |
| 33 <tr class="{{ a_status.general_state }}"> | 33 <tr class="{{ a_status.general_state }}"> |
| 34 <td class="username">{{ a_status.username }}</td> | 34 <td class="username"> |
| 35 {% for a_link in a_status.username_links.links %} | |
|
Vadim Sh.
2013/12/03 20:06:36
This can be converted to jinja2 macro, to reduce c
vapier
2013/12/04 07:54:33
thanks, i've never done templating code before, so
| |
| 36 {% if a_link.target %} | |
| 37 <a href="{% if a_link.is_email %}mailto:{% endif %}{{ a_link.target }}">{{ a_link.text }}</a> | |
| 38 {% else %} | |
| 39 {{ a_link.text }} | |
| 40 {% endif %} | |
| 41 {% endfor %} | |
| 42 </td> | |
| 35 <td class="date">{{ a_status.date|date:"D, d M H:i" }}</td> | 43 <td class="date">{{ a_status.date|date:"D, d M H:i" }}</td> |
| 36 <td class="message">{{ a_status.message }}</td> | 44 <td class="message"> |
| 45 {% for a_link in a_status.message_links.links %} | |
| 46 {% if a_link.target %} | |
| 47 <a href="{% if a_link.is_email %}mailto:{% endif %}{{ a_link.target }}">{{ a_link.text }}</a> | |
| 48 {% else %} | |
| 49 {{ a_link.text }} | |
| 50 {% endif %} | |
| 51 {% endfor %} | |
| 52 </td> | |
| 37 </tr> | 53 </tr> |
| 38 {% endfor %} | 54 {% endfor %} |
| 39 | 55 |
| 40 </table> | 56 </table> |
| 41 </center> | 57 </center> |
| 42 {% endblock %} | 58 {% endblock %} |
| OLD | NEW |