From: Stephen Finucane Date: Thu, 23 Mar 2017 13:25:00 +0000 (+0000) Subject: views: Use bundle-detail for public URLs X-Git-Tag: v2.0.0-rc1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=972c0bbc25391bec4e55149b5dd7ccc4ca6495aa;p=thirdparty%2Fpatchwork.git views: Use bundle-detail for public URLs 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 Fixes: d1c605f9 ("views: Stop using Bundle.public_url") Closes-bug: #92 --- diff --git a/patchwork/templates/patchwork/bundles.html b/patchwork/templates/patchwork/bundles.html index 9e225ea0..61a13ea4 100644 --- a/patchwork/templates/patchwork/bundles.html +++ b/patchwork/templates/patchwork/bundles.html @@ -11,9 +11,9 @@ {% if bundles %} - + - + @@ -22,9 +22,11 @@ -
NameBundle ProjectPublic LinkPublic Patches Download Delete
{{ bundle.name }} {{ bundle.project.linkname }} + {% if bundle.public %} - {{ bundle.get_mbox_url }} + + {% else %} + {% endif %} {{ bundle.patches.count }}