From 217a39a0d769d4d8c2b896718d6890ea43a6a4fc Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 18 2014 17:26:21 +0000 Subject: Fix the link to forks or projects according to where the user comes from --- diff --git a/progit/templates/commit.html b/progit/templates/commit.html index aad4ae5..970123e 100644 --- a/progit/templates/commit.html +++ b/progit/templates/commit.html @@ -7,13 +7,24 @@ {% block content %}

+ {% if '/fork/' in request.url %} + + {% else %} + {% endif %} {{ repo.split('.git')[0] }} + {% if '/fork/' in request.url %} + (tree) + {% else %} (tree) + {% endif %} +

Commit: {{ commitid }}

@@ -37,8 +48,14 @@ Parent {% for parent in commit.parents %} - + {% else %} + + {% endif %} + {{ parent.oid.hex }}
{% endfor %} diff --git a/progit/templates/file.html b/progit/templates/file.html index 94017d0..15c2466 100644 --- a/progit/templates/file.html +++ b/progit/templates/file.html @@ -7,12 +7,21 @@ {% block content %}

- + {% if '/fork/' in request.url %} + + {% else %} + + {% endif %} {{ repo.split('.git')[0] }} - : + {% else %} + + {% endif %} {{ branchname }}/{% for file in filename.split('/') %} {% if loop.first %} @@ -21,10 +30,16 @@ {% set path = path + '/' + file %} {% endif %} {% if loop.index != loop.length %} -{{ file }}/{% + >{{ file }}/ +{% +else %}{{ file }}/{% endif %}{% else %} {{ file }} {% endif %} @@ -44,10 +59,16 @@ {% if entry.filemode == 16384 %} [ ] {% endif %} + {% if '/fork/' in request.url %} + + {% else %} + {% endif %} {{ entry.name }} {{ entry.hex }} diff --git a/progit/templates/repo_info.html b/progit/templates/repo_info.html index 2f947a7..cf109a6 100644 --- a/progit/templates/repo_info.html +++ b/progit/templates/repo_info.html @@ -6,7 +6,11 @@ {% block content %}

+ {% if '/fork/' in request.url %} + + {% else %} + {% endif %} {{ repo.split('.git')[0] }} {% if branchname %} ({{ branchname }}) {% endif %} @@ -18,13 +22,23 @@ @@ -67,8 +81,14 @@