diff mbox

[3/3] Add web scm link to the list and patch view

Message ID 1351291904-16251-4-git-send-email-idra@samba.org
State Changes Requested
Headers show

Commit Message

Simo Sorce Oct. 26, 2012, 10:51 p.m. UTC
This makes it easier to go to the code directly from patchwork in
case you need more context when looking at patches.

Signed-off-by: Simo Sorce <idra@samba.org>
---
 templates/base.html            | 4 ++++
 templates/patchwork/patch.html | 3 +++
 2 files changed, 7 insertions(+)

Comments

Jeremy Kerr Nov. 5, 2012, 1:28 p.m. UTC | #1
Hi Simo,

> diff --git a/templates/base.html b/templates/base.html
> index 787433f15e13d8ac2960756fee1a9f820516acb5..a15c8274faa254f3de40a9dc58d9d135e9023439 100644
> --- a/templates/base.html
> +++ b/templates/base.html
> @@ -47,6 +47,10 @@
>        :
>        <a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
>         >patches</a>
> +    {% if project.webscm %}
> +      :
> +     <a href="{{project.webscm}}">tree</a>
> +    {% endif %}
>        :
>        <a href="{% url patchwork.views.project.project project_id=project.linkname %}"
>         >project info</a>

Looks good.

> diff --git a/templates/patchwork/patch.html b/templates/patchwork/patch.html
> index 25c9962838dff6c34cfd313f43ba1c455fdd7c51..131cafae3e037ef8f16a7fd62ccd64623b6e9001 100644
> --- a/templates/patchwork/patch.html
> +++ b/templates/patchwork/patch.html
> @@ -196,5 +196,8 @@ function toggle_headers(link_id, headers_id)
>   </div>
>   {% endif %}
>
> +{% if project.webscm %}
> +<a href="{{project.webscm}}">Source Tree</a>
> +{% endif %}
>
>   {% endblock %}

I'm not entirely sure about this one though; it's kind of on it's own 
down the bottom there. What was your intention with this link?

Cheers,


Jeremy
Simo Sorce Nov. 5, 2012, 2:38 p.m. UTC | #2
On Mon, 2012-11-05 at 21:28 +0800, Jeremy Kerr wrote:
> Hi Simo,
> 
> > diff --git a/templates/base.html b/templates/base.html
> > index 787433f15e13d8ac2960756fee1a9f820516acb5..a15c8274faa254f3de40a9dc58d9d135e9023439 100644
> > --- a/templates/base.html
> > +++ b/templates/base.html
> > @@ -47,6 +47,10 @@
> >        :
> >        <a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
> >         >patches</a>
> > +    {% if project.webscm %}
> > +      :
> > +     <a href="{{project.webscm}}">tree</a>
> > +    {% endif %}
> >        :
> >        <a href="{% url patchwork.views.project.project project_id=project.linkname %}"
> >         >project info</a>
> 
> Looks good.
> 
> > diff --git a/templates/patchwork/patch.html b/templates/patchwork/patch.html
> > index 25c9962838dff6c34cfd313f43ba1c455fdd7c51..131cafae3e037ef8f16a7fd62ccd64623b6e9001 100644
> > --- a/templates/patchwork/patch.html
> > +++ b/templates/patchwork/patch.html
> > @@ -196,5 +196,8 @@ function toggle_headers(link_id, headers_id)
> >   </div>
> >   {% endif %}
> >
> > +{% if project.webscm %}
> > +<a href="{{project.webscm}}">Source Tree</a>
> > +{% endif %}
> >
> >   {% endblock %}
> 
> I'm not entirely sure about this one though; it's kind of on it's own 
> down the bottom there. What was your intention with this link?

Yeah I thought someone may want to see the source after reading the
patch, but it's not really important, may or may not be useful.

Simo.
diff mbox

Patch

diff --git a/templates/base.html b/templates/base.html
index 787433f15e13d8ac2960756fee1a9f820516acb5..a15c8274faa254f3de40a9dc58d9d135e9023439 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -47,6 +47,10 @@ 
      :
      <a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
       >patches</a>
+    {% if project.webscm %}
+      :
+     <a href="{{project.webscm}}">tree</a>
+    {% endif %}
      :
      <a href="{% url patchwork.views.project.project project_id=project.linkname %}"
       >project info</a>
diff --git a/templates/patchwork/patch.html b/templates/patchwork/patch.html
index 25c9962838dff6c34cfd313f43ba1c455fdd7c51..131cafae3e037ef8f16a7fd62ccd64623b6e9001 100644
--- a/templates/patchwork/patch.html
+++ b/templates/patchwork/patch.html
@@ -196,5 +196,8 @@  function toggle_headers(link_id, headers_id)
 </div>
 {% endif %}
 
+{% if project.webscm %}
+<a href="{{project.webscm}}">Source Tree</a>
+{% endif %}
 
 {% endblock %}