]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
views: Use bundle-detail for public URLs
authorStephen Finucane <stephen@that.guru>
Thu, 23 Mar 2017 13:25:00 +0000 (13:25 +0000)
committerStephen Finucane <stephen@that.guru>
Wed, 5 Apr 2017 10:10:30 +0000 (11:10 +0100)
In 'd1c605f', we reworked the 'bundle-list' view to use the new
'Bundle.get_mbox_url' function instead of the 'Bundle.public_url'.
However, these are not the same thing. The latter referred to the
'bundle-detail' view, while the former referred to the 'bundle-mbox'
view.

The easiest fix would be to simply revert that patch. However, it turns
out that 'public_url' isn't actually needed. Commit '5d0140ef' removed a
divide between public and non-public URLs for bundles, meaning we can
actually use an existing function - 'get_absolute_url' - instead.

This also presents the opportunity to clean up the 'bundle-list' page,
favouring a simple public/is-not-public marker and only a single URL.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: d1c605f9 ("views: Stop using Bundle.public_url")
Closes-bug: #92

patchwork/templates/patchwork/bundles.html

index 9e225ea0cd1b24754073cb9ca30f74b83e189d26..61a13ea4c4ef33f935e2717de31008f02a074cde 100644 (file)
@@ -11,9 +11,9 @@
 {% if bundles %}
 <table class="bundlelist">
  <tr>
-  <th>Name</th>
+  <th>Bundle</th>
   <th>Project</th>
-  <th>Public Link</th>
+  <th>Public</th>
   <th>Patches</td>
   <th>Download</th>
   <th>Delete</th>
  <tr>
   <td><a href="{{ bundle.get_absolute_url }}">{{ bundle.name }}</a></td>
   <td>{{ bundle.project.linkname }}</td>
-  <td>
+  <td style="text-align: center;">
    {% if bundle.public %}
-    <a href="{{ bundle.get_mbox_url }}">{{ bundle.get_mbox_url }}</a>
+    <span class="glyphicon glyphicon-ok"></span>
+   {% else %}
+    <span class="glyphicon glyphicon-remove"></span>
    {% endif %}
   </td>
   <td style="text-align: right">{{ bundle.patches.count }}</td>