summaryrefslogtreecommitdiffstats
path: root/templates/packages/details.html
blob: 78209d833813cd88b1dda2160f9607ec0950bb7a (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
{% extends "base.html" %}
{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }} - Package Details{% endblock %}
{% block content %}
    <div class="box">
        <h2 class="title">{{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h2>
        <div style="float:right" class="listing">
            <ul class="small">
                <li><a href="{{ pkg.get_arch_svn_link }}">SVN Entries ({{pkg.repo|lower}}-{{pkg.arch}})</a></li>
                <li><a href="{{ pkg.get_trunk_svn_link }}">SVN Entries (trunk)</a></li>
                <li><a href="{{ pkg.get_bugs_link }}">Bug Reports</a></li>
                <li>
            {% if pkg.needupdate %}
                <span style="font-size:x-small"><em>This package has been flagged out-of-date</em></span>
                {% if user.is_authenticated %}
                <br />&nbsp; &nbsp; <a href="/packages/unflag/{{ pkg.id }}/">Click here to unflag</a>
                {% endif %}
            {% else %}
                <a href="/packages/flag/{{ pkg.id }}/">Flag Package Out-of-Date</a>
                <a href="/packages/flaghelp/" onclick="return !window.open('/packages/flaghelp','FlagHelp','height=350,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');"><span style="font-size:x-small">(?)</span></a>
            {% endif %}
                </li>
                {% if user.is_authenticated %}
                  <li>&nbsp;</li>
                  <li>
                  <form name="devaction" method="post" action="/packages/update/">
                      <input type="hidden" name="pkgid" value="{{ pkg.id }}" />
                      <input type="submit" style="background: #e1e3e6;" name="adopt" value="Adopt Package" />
                      <input type="submit" style="background: #e1e3e6;" name="disown" value="Disown Package" />
                  </form>
                  </li>
                {% endif %}
            </ul>
        </div>
        <table class="listing">
            <tr>
                <th>Architecture:</th>
                <td>{{ pkg.arch.name }}</td>
            </tr><tr>
                <th>Repository:</th>
                <td>{{ pkg.repo.name|capfirst }}</td>
            </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>Maintainer:</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>
        <br />
        <table width="100%">
            <tr>
                <td valign="top" width="50%">
                    {% with pkg.get_depends as deps %}
                    <div class="listing">
                        <h4>Dependencies ({{deps|length}}):</h4>
                        {% if deps %}
                        <ul style="font-size:small;list-style:none">
                        {% for depend in deps %}
                          {% ifequal depend.pkg None %}
                            <li>{{ depend.dep.depname }} (virtual)</li>
                          {% else %}
                            <li><a href="{{ depend.pkg.get_absolute_url }}">{{ depend.dep.depname }}</a>{{ depend.dep.depvcmp }}{% if depend.pkg.repo.testing %} (testing){% endif %}</li>
                          {% endifequal %}
                        {% endfor %}
                        </ul>
                        {% endif %}
                    </div>
                    {% endwith %}
                </td>
                <td valign="top">
                    {% with pkg.get_requiredby as rqdby %}
                    <div class="listing">
                        <h4>Required By ({{rqdby|length}}):</h4>
                        {% if rqdby %}
                        <ul style="font-size:small;list-style:none">
                        {% for req in rqdby %}
                        <li><a href="{{req.get_absolute_url}}">{{ req.pkgname }}</a>{% if req.repo.testing %} (testing){% endif %}</li>
                        {% endfor %}
                        </ul>
                        {% endif %}
                    </div>
                    {% endwith %}
                </td>
            </tr>
        </table>
        <div class="listing" id="filelist">
            <h4>Files:</h4>
            <p style="padding: 10px 20px;">
                <a id="filelink" href="files/">View File List</a>
            </p>
        </div>
    </div>
{% load cdn %}{% jquery %}
<script type="text/javascript">
function ajaxifyFiles() {
    $('#filelink').click(function(event) {
        event.preventDefault();
        $.get(this.href, function(data) {
            $('#filelist').html(data);
        });
    });
}
$(document).ready(ajaxifyFiles);
</script>
{% endblock %}