summaryrefslogtreecommitdiffstats
path: root/templates/packages/details.html
blob: c7945b250f066cbcc92c635812d57f3a0987b492 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
{% extends "base.html" %}
{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }} - Package Details{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}

{% block content %}
<div id="pkgdetails" class="box">

    <h2>Package Details: {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h2>

    <div id="actionlist" class="listing">

        <ul class="small">
            <li><a href="{{ pkg.get_arch_svn_link }}" title="View SVN entries in the {{pkg.repo|lower}}-{{pkg.arch}} branch">SVN Entries ({{pkg.repo|lower}}-{{pkg.arch}})</a></li>
            <li><a href="{{ pkg.get_trunk_svn_link }}" title="View SVN entries on trunk">SVN Entries (trunk)</a></li>
            <li><a href="{{ pkg.get_bugs_link }}" title="View existing bug tickets for {{ pkg.pkgname }}">Bug Reports</a></li>
            <li>
            {% if pkg.needupdate %}
                <span class="flagged">This package has been flagged out-of-date</span>
                {% if user.is_authenticated %}
                <br />&nbsp; &nbsp; <a href="unflag/"
                    title="Unflag this package">Click here to unflag</a>
                {% endif %}
            {% else %}
            <a href="flag/" title="Flag {{ pkg.pkgname }} as out-of-date">Flag Package Out-of-Date</a>
            <a href="/packages/flaghelp/"
                title="Get help on package flagging"
                onclick="return !window.open('/packages/flaghelp','FlagHelp',
                'height=350,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');">(?)</a>
            {% endif %}
            </li>
        </ul>

        {% if user.is_authenticated %}
        <form id="pkg-action" method="post" action="/packages/update/">
            <div><input type="hidden" name="pkgid" value="{{ pkg.id }}" /></div>
            <p><input title="Adopt this package" type="submit" class="adopt" name="adopt" value="Adopt" />
            &nbsp;&nbsp;<input title="Orphan this package" type="submit" class="disown" name="disown" value="Disown" /></p>
        </form>
        {% endif %}

    </div><!-- #actionlist -->

    <table id="pkginfo">
        <tr>
            <th>Architecture:</th>
            <td><a href="/packages/?arch={{ pkg.arch.name }}"
                    title="Browse packages for {{ pkg.arch.name }} architecture">{{ pkg.arch.name }}</a></td>
        </tr><tr>
            <th>Repository:</th>
            <td><a href="/packages/?repo={{ pkg.repo.name|capfirst }}"
                    title="Browse the {{ pkg.repo.name|capfirst }} repository">{{ pkg.repo.name|capfirst }}</a></td>
        </tr><tr>
        </tr>{% ifnotequal pkg.pkgname pkg.pkgbase %}<tr>
            <th>Base Package Name:</th>
            <td>{{ pkg.pkgbase }}</td>
        </tr>{% endifnotequal %}<tr>
            <th>Description:</th>
            <td>{% if pkg.pkgdesc %}{{ pkg.pkgdesc }}{% endif %}</td>
        </tr><tr>
            <th>Upstream URL:</th>
            <td>{% if pkg.url %}<a href="{{ pkg.url }}">{{ pkg.url }}</a>{% endif %}</td>
        </tr><tr>
            <th>License:</th>
            <td>{{ pkg.license }}</td>
        </tr><tr>
            <th>Maintainers:</th>
            {% with pkg.maintainers as maints %}
            <td>{% if maints %}
                {% for m in maints %}
                {{ m.get_full_name }}<br/>
                {% endfor %}
                {% else %}Orphan{% endif %}
            </td>
            {% endwith %}
        </tr><tr>
            <th>Package Size:</th>
            <td>{{ pkg.compressed_size|filesizeformat }}</td>
        </tr><tr>
            <th>Installed Size:</th>
            <td>{{ pkg.installed_size|filesizeformat }}</td>
        </tr><tr>
            <th>Build Date:</th>
            <td>{{ pkg.build_date }} UTC</td>
        </tr><tr>
            <th>Last Updated:</th>
            <td>{{ pkg.last_update|date:"Y-m-d" }}</td>
        </tr>
    </table>

    <div id="metadata">

        {% with pkg.get_depends as deps %}
        <div id="pkgdeps" class="listing">

            <h3 title="{{ pkg.pkgname }} has the following dependencies">
                Dependencies ({{deps|length}})</h3>

            {% if deps %}
            <ul>
            {% for depend in deps %}
            {% ifequal depend.pkg None %}
                <li>{{ depend.dep.depname }} (virtual)</li>
            {% else %}
                <li><a href="{{ depend.pkg.get_absolute_url }}"
                    title="View package details for {{ depend.dep.depname }}">{{ depend.dep.depname }}</a>
                    {{ depend.dep.depvcmp }}{% if depend.pkg.repo.testing %}
                    <span class="testing-dep">(testing)</span>{% endif %}</li>
            {% endifequal %}
            {% endfor %}
            </ul>
            {% endif %}

        </div><!-- #pkgdeps -->
        {% endwith %}

        {% with pkg.get_requiredby as rqdby %}
        <div id="pkgreqs" class="listing">

            <h3 title="Packages that require {{ pkg.pkgname }}">
                Required By ({{rqdby|length}})</h3>

            {% if rqdby %}
            <ul>
                {% for req in rqdby %}
                <li><a href="{{req.get_absolute_url}}"
                    title="View package details for {{ req.pkgname }}">{{ req.pkgname }}</a>
                    {% if req.repo.testing %} (testing){% endif %}</li>
                {% endfor %}
            </ul>
            {% endif %}

        </div><!-- #pkgreqs -->
        {% endwith %}

        <div id="pkgfiles" class="listing">

            <h3 title="Complete list of files contained within this package">
                Package Contents</h3>

            <div id="pkgfilelist">
                <p><a id="filelink" href="files/"
                    title="Click to view the complete file list for {{ pkg.pkgname }}">
                    View the file list for {{ pkg.pkgname }}</a></p>
            </div>

        </div><!-- #pkgfiles -->

    </div><!-- #metadata -->
</div><!-- #pkgdetails -->

{% load cdn %}{% jquery %}
<script type="text/javascript">
function ajaxifyFiles() {
    $('#filelink').click(function(event) {
        event.preventDefault();
        $.get(this.href, function(data) {
            $('#pkgfilelist').html(data);
        });
    });
}
$(document).ready(ajaxifyFiles);
</script>
{% endblock %}