diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/packages/details.html | 22 | ||||
-rw-r--r-- | templates/packages/files-list.html | 12 | ||||
-rw-r--r-- | templates/packages/files.html | 8 |
3 files changed, 34 insertions, 8 deletions
diff --git a/templates/packages/details.html b/templates/packages/details.html index 5c3c9497..94e9f161 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -1,6 +1,5 @@ {% extends "base.html" %} -{% load package_extras %} -{% block title %}Pkg: {{ pkg.pkgname }} - Arch Linux Package Details{% endblock %} +{% block title %}Arch Linux - Package Details - {{ pkg.pkgname }}{% endblock %} {% block content %} <div class="box"> <h2 class="title">{{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h2> @@ -9,7 +8,6 @@ <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><a href="/packages/files/{{ pkg.id }}/">View File List</a></li> --> <li> {% if pkg.needupdate %} <span style="font-size:x-small"><em>This package has been flagged out-of-date</em></span> @@ -103,6 +101,24 @@ </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> +<script type="text/javascript" src="/media/jquery-1.4.1.min.js"></script> +<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 %} diff --git a/templates/packages/files-list.html b/templates/packages/files-list.html new file mode 100644 index 00000000..d26a11e9 --- /dev/null +++ b/templates/packages/files-list.html @@ -0,0 +1,12 @@ +<div class="listing" id="filelist"> + <h4>Files:</h4> + {% if files.count %} + <ul style="font-size:small;list-style:none"> + {% for file in files %} + <li>{{ file.path }}</li> + {% endfor %} + </ul> + {% else %} + <p style="padding: 10px 20px;">No filelist available.</p> + {% endif %} +</div> diff --git a/templates/packages/files.html b/templates/packages/files.html index 145bcf24..1d87246c 100644 --- a/templates/packages/files.html +++ b/templates/packages/files.html @@ -1,11 +1,9 @@ {% extends "base.html" %} -{% block title %}Pkg: {{ pkg.pkgname }} - Arch Linux Package File List{% endblock %} +{% block title %}Arch Linux - Package File List - {{ pkg.pkgname }}{% endblock %} {% block content %} <div class="box"> - <h3>Viewing Files: {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h3> - {% for file in files %} - {{ file.path }}<br /> - {% endfor %} + <h2 class="title">{{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h2> + {% include "packages/files-list.html" %} </div> {% endblock %} |