vagrant/test/buildbot/master/templates/macros/change.html

81 lines
1.6 KiB
HTML
Raw Normal View History

2011-11-19 20:55:04 +00:00
{% macro change(c) %}
2011-11-19 21:30:10 +00:00
<table class="zebra-striped">
<tbody>
<tr>
2011-11-19 20:55:04 +00:00
<td class="left">Changed by</td>
<td><b>{{ c.who|email }}</b></td>
</tr>
2011-11-19 21:30:10 +00:00
<tr>
2011-11-19 20:55:04 +00:00
<td class="left">Changed at</td>
<td><b>{{ c.at }}</b></td>
</tr>
{% if c.repository %}
2011-11-19 21:30:10 +00:00
<tr>
2011-11-19 20:55:04 +00:00
<td class="left">Repository</td>
<td><b>{{ c.repository|repolink }}</b></td>
</tr>
2011-11-19 21:30:10 +00:00
{% endif %}
{% if c.project %}
<tr>
2011-11-19 20:55:04 +00:00
<td class="left">Project</td>
<td><b>{{ c.project|projectlink }}</b></td>
</tr>
2011-11-19 21:30:10 +00:00
{% endif %}
{% if c.branch %}
<tr>
2011-11-19 20:55:04 +00:00
<td class="left">Branch</td>
<td><b>{{ c.branch|e }}</b></td>
</tr>
2011-11-19 21:30:10 +00:00
{% endif %}
{% if c.rev %}
<tr>
2011-11-19 20:55:04 +00:00
<td class="left">Revision</td>
<td>{%- if c.revlink -%}<a href="{{ c.revlink }}">{{ c.rev|e }}</a>
{%- else -%}{{ c.rev|revlink(c.repository) }} {%- endif -%}</td>
</tr>
{% endif %}
2011-11-19 21:30:10 +00:00
</tbody>
2011-11-19 20:55:04 +00:00
</table>
{% if c.comments %}
<h3>Comments</h3>
2011-11-19 21:30:10 +00:00
<pre>{{ c.comments|changecomment(c.project) }}</pre>
2011-11-19 20:55:04 +00:00
{% endif %}
2011-11-19 21:30:10 +00:00
<h3>Changed files</h3>
2011-11-19 20:55:04 +00:00
<ul>
{% for f in c.files -%}
<li class="{{ loop.cycle('alt', '') }}">{%- if f.url %}<a
href="{{ f.url }}"><b>{{ f.name|e }}</b></a></li>
{%- else %}
<b>{{ f.name|e }}</b>
{%- endif -%}
</li>
{% else %}
<li>no files</li>
{% endfor %}
</ul>
{% if c.properties %}
<h3>Properties</h3>
2011-11-19 21:30:10 +00:00
<table class="zebra-striped">
2011-11-19 20:55:04 +00:00
{% for p in c.properties %}
2011-11-19 21:30:10 +00:00
<tr>
2011-11-19 20:55:04 +00:00
<td class="left">{{ p[0]|capitalize|e }}</td>
<td>{{ p[1]|e }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{%- endmacro %}
{% macro box_contents(who, url, pageTitle) -%}
<a href="{{ url }}" title="{{ pageTitle|e }}">{{ who|user }}</a>
{%- endmacro %}