src/server/http/templates/patch_detail.html
Ref: Size: 2.9 KiB
{% extends "repo_base.html" %}
{% block title %}{{ patch.title }} — {{ repo_name }} — {{ site_title }}{% endblock %}
{% block content %}
<h2>{{ patch.title }}</h2>
<p>
<span class="status-{{ patch.status }}">{{ patch.status }}</span>
by <strong>{{ patch.author }}</strong>
<span class="mono" style="color: #666;">{{ patch.branch }} → {{ patch.base_ref }}</span>
</p>
{% if !patch.body.is_empty() %}
<pre style="background: #f8f8f8; padding: 12px; border-radius: 4px; white-space: pre-wrap;">{{ patch.body }}</pre>
{% endif %}
<h3>Revisions</h3>
{% if patch.revisions.is_empty() %}
<p style="color: #666;">No revisions.</p>
{% else %}
<table>
<thead>
<tr>
<th>#</th>
<th>Commit</th>
<th>Date</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
{% for rev in patch.revisions %}
<tr>
<td>{{ rev.number }}</td>
<td class="mono"><a href="/{{ repo_name }}/diff/{{ rev.commit }}">{{ rev.commit[..8] }}</a></td>
<td class="mono" style="color: #666;">{{ rev.timestamp }}</td>
<td>{% if let Some(body) = rev.body %}{{ body }}{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if !patch.reviews.is_empty() %}
<h3>Reviews</h3>
{% for review in patch.reviews %}
<div style="border: 1px solid #ddd; border-radius: 4px; padding: 12px; margin-bottom: 12px;">
<p style="margin: 0 0 8px 0;">
<strong>{{ review.author }}</strong>
<span class="status-{{ review.verdict }}">{{ review.verdict }}</span>
<span class="mono" style="color: #666; font-size: 0.85em;">{{ review.timestamp }}</span>
{% if let Some(rev) = review.revision %} rev {{ rev }}{% endif %}
</p>
{% if !review.body.is_empty() %}
<pre style="margin: 0; white-space: pre-wrap;">{{ review.body }}</pre>
{% endif %}
</div>
{% endfor %}
{% endif %}
{% if !patch.inline_comments.is_empty() %}
<h3>Inline Comments</h3>
{% for ic in patch.inline_comments %}
<div style="border: 1px solid #ddd; border-radius: 4px; padding: 12px; margin-bottom: 12px;">
<p style="margin: 0 0 8px 0;">
<strong>{{ ic.author }}</strong>
<span class="mono" style="color: #666;">{{ ic.file }}:{{ ic.line }}</span>
<span class="mono" style="color: #666; font-size: 0.85em;">{{ ic.timestamp }}</span>
{% if let Some(rev) = ic.revision %} rev {{ rev }}{% endif %}
</p>
<pre style="margin: 0; white-space: pre-wrap;">{{ ic.body }}</pre>
</div>
{% endfor %}
{% endif %}
{% if !patch.comments.is_empty() %}
<h3>Comments</h3>
{% for comment in patch.comments %}
<div style="border: 1px solid #ddd; border-radius: 4px; padding: 12px; margin-bottom: 12px;">
<p style="margin: 0 0 8px 0;">
<strong>{{ comment.author }}</strong>
<span class="mono" style="color: #666; font-size: 0.85em;">{{ comment.timestamp }}</span>
</p>
<pre style="margin: 0; white-space: pre-wrap;">{{ comment.body }}</pre>
</div>
{% endfor %}
{% endif %}
{% endblock %}