package_metadata.html 2.92 KB
Newer Older
1
<div id="pkgdeps" class="listing">
2
    <h3>{{ "Dependencies" | tr }} ({{ depends_count }})</h3>
3
    <ul id="pkgdepslist">
4
        {% for dep in dependencies %}
5
6
            {# Collect provides for `dep`. #}
            {% set provides = dep.provides() %}
7
8
9
            <li>
                {% set broken = not dep.is_package() %}
                {% if broken %}
10
11
12
                    {% if not provides %}
                        <span class="broken">
                    {% endif %}
13
14
15
16
17
                {% else %}
                    <a href="{{ dep.DepName | pkgname_link }}">
                {% endif %}
                    {{ dep.DepName }}
                {% if broken %}
18
19
20
                    {% if not provides %}
                        </span>
                    {% endif %}
21
22
23
                {% else %}
                    </a>
                {% endif %}
24
25
26
27
28

                {% if provides %}
                    <em>({{ provides | provides_markup | safe }})</em>
                {% endif %}

29
                {% if dep.DepTypeID == 4 %}
30
                    {# If this dependency type is an optdepends (id: 4). #}
31
                    <em>{{ dep | dep_extra_desc }}</em>
32
33
                {% else %}
                    <em>{{ dep | dep_extra }}</em>
34
35
36
                {% endif %}
            </li>
        {% endfor %}
37
38
39
40
41
42
43
        {% if not all_deps and depends_count > max_listing %}
            <li>
                <a href="/packages/{{ package.Name }}?{{ q | extend_query(['all_deps', '1']) | urlencode }}#pkgdeps">
                    {{ "Show %d more" | tr | format(depends_count - (dependencies | length)) }} {{ "dependencies" | tr }}...
                </a>
            </li>
        {% endif %}
44
45
46
47
    </ul>
</div>

<div id="pkgreqs" class="listing">
48
    <h3>{{ "Required by" | tr }} ({{ reqs_count }})</h3>
49
    <ul id="pkgreqslist">
50
        {% for dep in required_by %}
51
            <li>
52
53
                <a href="{{ dep.Package | package_link }}">
                    {{ dep.Package.Name }}
54
                </a>
55
56
57
58
59
60
61
62

                {% if dep.DepName != package.Name %}
                    <span class="virtual-dep">
                        ({{ "requires %s" | tr | format(dep.DepName) }})
                    </span>
                {% endif %}

                <em>{{ dep | dep_extra }}</em>
63
64
            </li>
        {% endfor %}
65
66
67
68
69
        {% if not all_reqs and (required_by | length) > max_listing %}
            <a href="/packages/{{ name }}?{{ q | extend_query(['all_reqs', '1']) | urlencode }}#pkgreqs">
                {{ "Show %d more" | tr | format(reqs_count - (required_by | length)) }}...
            </a>
        {% endif %}
70
71
72
73
    </ul>
</div>

<div id="pkgfiles" class="listing">
74
    <h3>{{ "Sources" | tr }} ({{ sources | length }})</h3>
75
76
77
78
</div>

<div>
    <ul id="pkgsrcslist">
79
        {% for src in sources %}
80
            {% set file, uri = (src | source_uri) %}
81
            <li>
82
                <a href="{{ uri }}">{{ file }}</a>
83
84
85
86
            </li>
        {% endfor %}
    </ul>
</div>