diff options
Diffstat (limited to 'bn_django/git_browse/templates')
-rw-r--r-- | bn_django/git_browse/templates/git_browse/blob.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bn_django/git_browse/templates/git_browse/blob.html b/bn_django/git_browse/templates/git_browse/blob.html index 4a0304c..853c034 100644 --- a/bn_django/git_browse/templates/git_browse/blob.html +++ b/bn_django/git_browse/templates/git_browse/blob.html @@ -6,7 +6,13 @@ <h3>Size</h3> {{ size|filesizeformat }}<br /> <h3>Raw contents</h3> - <pre class="large">{{ contents|escape|wordwrap:80 }}</pre> + {% if pretty_contents %} + <pre class="large">{{ pretty_diff }}</pre> + {% else %} + {% if contents %} + <pre class="large">{{ contents|escape|wordwrap:80 }}</pre> + {% else %}No contents{% endif %} + {% endif %} {% else %} <h3>No such object: {{ hash }}</h3> {% endif %} {% endblock %} |