diff mbox

[v4,8/9] templates: Use buttons for patch download links

Message ID 20170310173807.13407-9-stephen@that.guru
State Accepted
Headers show

Commit Message

Stephen Finucane March 10, 2017, 5:38 p.m. UTC
We'll make use of this to enable downloading of patches with mboxes.

In addition, the 'hide' link for patches and cover letters is removed.
There's no way to enable this by default and the use cases are dubious
at best.

Signed-off-by: Stephen Finucane <stephen@that.guru>
---
 patchwork/templates/patchwork/submission.html | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

Comments

Daniel Axtens April 2, 2017, 9:22 p.m. UTC | #1
Stephen Finucane <stephen@that.guru> writes:

> We'll make use of this to enable downloading of patches with mboxes.
>
> In addition, the 'hide' link for patches and cover letters is removed.
> There's no way to enable this by default and the use cases are dubious
> at best.
>
> Signed-off-by: Stephen Finucane <stephen@that.guru>
> ---
>  patchwork/templates/patchwork/submission.html | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/patchwork/templates/patchwork/submission.html b/patchwork/templates/patchwork/submission.html
> index 21c345f..66c1159 100644
> --- a/patchwork/templates/patchwork/submission.html
> +++ b/patchwork/templates/patchwork/submission.html
> @@ -281,14 +281,16 @@ function toggle_div(link_id, headers_id)
>  {% if submission.diff %}
>  <h2>
>   Patch
> - <a href="javascript:toggle_div('hide-patch', 'patch')" id="hide-patch">hide</a></span>
> - <span>|</span>
> - <a href="{% url 'patch-raw' patch_id=submission.id %}"
> -   >download patch</a>
> - <span>|</span>
> - <a href="{% url 'patch-mbox' patch_id=submission.id %}"
> -   >download mbox</a>
> + <div class="btn-group pull-right">
> +  <a href="{% url 'patch-raw' patch_id=submission.id %}"
> +   class="btn btn-default" role="button" data-toggle="tooltip"
I have grepped and googled and I cannot find anything in this project
that would make use of the data-toggle attribute. I also couldn't
observe any difference in behaviour without it. Am I missing something?

Apart from that:
Reviewed-by: Daniel Axtens <dja@axtens.net>

Regards,
Daniel

> +   title="Download patch diff">diff</a>
> +  <a href="{% url 'patch-mbox' patch_id=submission.id %}"
> +   class="btn btn-default" role="button" data-toggle="tooltip"
> +   title="Download patch mbox">mbox</a>
> + </div>
>  </h2>
> +
>  <div id="patch" class="patch">
>  <pre class="content">
>  {{ submission|patchsyntax }}
> -- 
> 2.9.3
>
> _______________________________________________
> Patchwork mailing list
> Patchwork@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork
diff mbox

Patch

diff --git a/patchwork/templates/patchwork/submission.html b/patchwork/templates/patchwork/submission.html
index 21c345f..66c1159 100644
--- a/patchwork/templates/patchwork/submission.html
+++ b/patchwork/templates/patchwork/submission.html
@@ -281,14 +281,16 @@  function toggle_div(link_id, headers_id)
 {% if submission.diff %}
 <h2>
  Patch
- <a href="javascript:toggle_div('hide-patch', 'patch')" id="hide-patch">hide</a></span>
- <span>|</span>
- <a href="{% url 'patch-raw' patch_id=submission.id %}"
-   >download patch</a>
- <span>|</span>
- <a href="{% url 'patch-mbox' patch_id=submission.id %}"
-   >download mbox</a>
+ <div class="btn-group pull-right">
+  <a href="{% url 'patch-raw' patch_id=submission.id %}"
+   class="btn btn-default" role="button" data-toggle="tooltip"
+   title="Download patch diff">diff</a>
+  <a href="{% url 'patch-mbox' patch_id=submission.id %}"
+   class="btn btn-default" role="button" data-toggle="tooltip"
+   title="Download patch mbox">mbox</a>
+ </div>
 </h2>
+
 <div id="patch" class="patch">
 <pre class="content">
 {{ submission|patchsyntax }}