home » zplus/clif.git
ID: fd47d13c995c4e244c13d2e7694ff562c7bb2b2d
32 lines — 932B — View raw


{% extends "repository/repository.html" %}

{% block page_title %}Tree: {{ repository }}/{{ revision }}{{ '/' + tree_path if tree_path }}{% endblock %}

{% block menu_tree_class %}selected{% endblock %}

{% block content %}
    
    <div>
        <b>ID:</b> {{ blob.id }}
        <br />
        {% if not blob.is_binary %}
            {# 10 is the ASCII integer value of \n
               Use 10 instead of \n because blob.data is a byte array, not a string.
             #}
            {{ blob.data.count(10) }} lines
        {% else %}
            binary
        {% endif %}        {{ blob.size|human_size(B=True) }}        <a href="{{ url('raw', repository=repository[:-4], revision=revision, tree_path=tree_path) }}">View raw</a>
    </div>
    
    <br /><br />

    {% if blob.is_binary %}
        <i>Cannot display binary object.</i>
    {% else %}
        {{ blob_formatted|safe }}
    {% endif %}

{% endblock %}