-{% extends "patchwork/base.html" %}
+{% extends "base.html" %}
{% load syntax %}
{% load person %}
{% load patch %}
-{% block title %}{{patch.name}} - Patchwork{% endblock %}
+{% block title %}{{patch.name}}{% endblock %}
{% block heading %}{{patch.name}}{%endblock%}
{% block body %}
<table class="patchmeta">
<tr>
<th>Submitter</th>
- <td>{{ patch.submitter|personify }}</td></tr>
+ <td>{{ patch.submitter|personify:project }}</td>
</tr>
<tr>
<th>Date</th>
<tr>
<th>Download</th>
<td>
- <a href="{% url patchwork.views.patch.mbox patch_id=patch.id %}"
- >mbox</a> |
- <a href="{% url patchwork.views.patch.content patch_id=patch.id %}"
+ <a href="{% url 'patchwork.views.patch.mbox' patch_id=patch.id %}"
+ >mbox</a>
+{% if patch.content %}|
+ <a href="{% url 'patchwork.views.patch.content' patch_id=patch.id %}"
>patch</a>
+{% endif %}
</td>
</tr>
<tr>
<td><a href="{{ patch.get_absolute_url }}">{{ patch.get_absolute_url }}</a>
</tr>
<tr>
- <th>State</td>
+ <th>State</th>
<td>{{ patch.state.name }}{% if patch.archived %}, archived{% endif %}</td>
</tr>
+{% if patch.commit_ref %}
+ <tr>
+ <th>Commit</th>
+ <td>{{ patch.commit_ref }}</td>
+ </tr>
+{% endif %}
{% if patch.delegate %}
<tr>
- <th>Delegated to:</td>
- <td>{{ patch.delegate.get_profile.name }}</td>
+ <th>Delegated to:</th>
+ <td>{{ patch.delegate.profile.name }}</td>
</tr>
{% endif %}
<tr>
<div class="patchform patchform-properties">
<h3>Patch Properties</h3>
<form method="post">
+ {% csrf_token %}
<table class="form">
<tr>
<th>Change state:</th>
</td>
</tr>
<tr>
- <th>Delegate to:</td>
+ <th>Delegate to:</th>
<td>
{{ patchform.delegate }}
{{ patchform.delegate.errors }}
</td>
</tr>
<tr>
- <th>Archived:</td>
+ <th>Archived:</th>
<td>
{{ patchform.archived }}
{{ patchform.archived.errors }}
<div class="patchform patchform-bundle">
<h3>Bundling</h3>
<table class="form">
- <!--
- <tr>
- <td>Ack:</td>
- <td>
- <form action="{% url patchwork.views.patch patch=patch.id %}"
- method="post">
- <input type="hidden" name="action" value="act"/>
- <input type="submit" value="Ack"/>
- </form>
- </td>
- </tr>
- -->
<tr>
<td>Create bundle:</td>
<td>
<dd class="errors">{{createbundleform.non_field_errors}}</dd>
{% endif %}
<form method="post">
+ {% csrf_token %}
<input type="hidden" name="action" value="createbundle"/>
{% if createbundleform.name.errors %}
<dd class="errors">{{createbundleform.name.errors}}</dd>
<td>Add to bundle:</td>
<td>
<form method="post">
+ {% csrf_token %}
<input type="hidden" name="action" value="addtobundle"/>
<select name="bundle_id"/>
{% for bundle in bundles %}
</tr>
{% endif %}
</table>
- </form>
</div>
{% endif %}
-{% if actionsform %}
- <div class="patchform patchform-actions">
- <h3>Actions</h3>
- <table class="form">
- <tr>
- <td>Ack:</td>
- <td>
- <form action="{% url patchwork.views.patch patch=patch.id %}"
- method="post">
- <input type="hidden" name="action" value="act"/>
- <input type="submit" value="Ack"/>
- </form>
- </td>
- </tr>
- </table>
- </form>
- </div>
-
-{% endif %}
<div style="clear: both;">
</div>
</div>
-
-
+{% if patch.pull_url %}
+<h2>Pull-request</h2>
+<a class="patch-pull-url" href="{{patch.pull_url}}"
+ >{{ patch.pull_url }}</a>
+{% endif %}
<h2>Comments</h2>
{% for comment in patch.comments %}
<div class="comment">
-<div class="meta">{{ comment.submitter|personify }} - {{comment.date}}</div>
+<div class="meta">{{ comment.submitter|personify:project }} - {{comment.date}}</div>
<pre class="content">
{{ comment|commentsyntax }}
</pre>
</div>
{% endfor %}
+{% if patch.content %}
<h2>Patch</h2>
<div class="patch">
<pre class="content">
{{ patch|patchsyntax }}
</pre>
</div>
+{% endif %}
+
{% endblock %}