From 724de9adeae0a081d1094d23436ae7b7ecf6f306 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 14 2014 17:46:37 +0000 Subject: Render the complete path as link so that we can easily go up by one or more levels --- diff --git a/progit/templates/file.html b/progit/templates/file.html index 45cee0e..df69b08 100644 --- a/progit/templates/file.html +++ b/progit/templates/file.html @@ -10,7 +10,22 @@ {{ repo.split('.git')[0] }} - : {{ branchname }}/{{filename}} + : + {{ branchname }}/{% + for file in filename.split('/') %} + {% if loop.first %} + {% set path = file %} + {% else %} + {% set path = path + '/' + file %} + {% endif %} + {% if loop.index != loop.length %} +{{ file }}/{% + else %} +{{ file }} + {% endif %} + {% endfor %}

Tree