pkgbase.html 3.12 KB
Newer Older
Leonidas Spyropoulos's avatar
WIP2  
Leonidas Spyropoulos committed
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
<div id="pkgdetails" class="box">
    <h2>Package Base Details: {{ pkgbase.Name }}</h2>

    {% set pkgname = "result.Name" %}
    {% include "partials/packages/package_actions.html" %}

    <table id="pkginfo">
        <tr>
            <th>Git Clone URL: </th>
            <td>
                <a class="copy" href="https://localhost:8443/cgit/aur.git -b {{ pkgbase.Name }}">https://localhost:8443/cgit/aur.git -b {{ pkgbase.Name }}</a> (read-only, click to copy)
                {% if request.user.is_authenticated() and pkgbase.Maintainer.Username == request.user.Username %}
                <br /> <a class="copy" href="ssh://aur@localhost:2222/{{ pkgbase.Name }}.git">ssh://aur@localhost:2222/{{ pkgbase.Name }}.git</a> (click to copy)
                {% endif %}
            </td>
        </tr>
        <tr>
            <th>Keywords: </th>
            {% if request.user.is_authenticated() and pkgbase.Maintainer.Username == request.user.Username %}
            <td>
                <form method="post" action="/pkgbase/{{ pkgbase.Name }}/">
                    <div>
                        <input type="hidden" name="action" value="do_SetKeywords" />
                        <input type="text" name="keywords" value="{{ pkgbase.keywords | join(' ', attribute='Keyword') }}"/>
                        <input type="submit" value="Update"/>
                    </div>
                </form>
            </td>
            {% else %}
            <td>
                {% for item in pkgbase.keywords %}
                <a class="keyword" href="/packages/?K={{ item.Keyword }}&amp;SB=p">{{ item.Keyword }}</a>
                {% endfor %}
            </td>
            {% endif %}
        </tr>
        <tr>
            <th>Submitter: </th>
            <td>{{ pkgbase.Submitter.Username | default("None") }}</td>
        </tr>
        <tr>
            <th>Maintainer: </th>
            <td>{{ pkgbase.Maintainer.Username | default("None") }}</td>
        </tr>
        <tr>
            <th>Last Packager: </th>
            <td>{{ pkgbase.Packager.Username | default("None") }}</td>
        </tr>
        <tr>
            <th>Votes: </th>
            <td>{{ pkgbase.NumVotes }}</td>
        </tr>
        <tr>
            <th>Popularity: </th>
            <td>{{ '%0.2f' % pkgbase.Popularity | float }}</td>
        </tr>
        <tr>
            {% set submitted = pkgbase.SubmittedTS | dt | as_timezone(timezone) %}
            <th>First Submitted: </th>
            <td>{{ "%s" | tr | format(submitted.strftime("%Y-%m-%d %H:%M")) }}</td>
        </tr>
        <tr>
            <th>Last Updated: </th>
            {% set updated = pkgbase.ModifiedTS | dt | as_timezone(timezone) %}
            <td>{{ "%s" | tr | format(updated.strftime("%Y-%m-%d %H:%M")) }}</td>
        </tr>
    </table>

    <div id="metadata">
        <div id="pkgs" class="listing">
            <h3>Packages ({{ packages_count }})</h3>
            <ul>
                {% for result in packages %}
                <li><a href="/packages/{{ result.Name }}/" title="View packages details for {{ result.Name }}">{{ result.Name }}</a></li>
                {% endfor %}
            </ul>
        </div>
    </div>
</div>