euscanwww: big ugly commit, sorry

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
Corentin Chary
2011-04-15 19:28:37 +02:00
parent 2dee08dfb7
commit c8d0e5a789
28 changed files with 428 additions and 99 deletions

View File

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<title>{% block title %}euscan{% endblock %}</title>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8" />
{% block css %}
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}img/style.css" media="screen" title="Normal" />
{% endblock %}
{% block javascript %}
{% endblock %}
</head>
<body>
<div id="header">
{% block header %}<h1>euscan</h1>{% endblock %}
</div>
<div id="content">
{% block content %}
{% endblock %}
</div>
<div id="menus">
{% block menus %}
<div id="menu">
<ul>
{% block menu %}
<li><a href="categories/">Categories</a></li>
<li><a href="herds/">Herds</a></li>
<li><a href="maintainers/">Maintainers</a></li>
{% endblock %}
</ul>
</div>
{% endblock %}
</div>
<div id="footer">
Powered by:
<a href="http://kernel.org" titke="Linux Kernel">
<img src="{{MEDIA_URL}}img/linux.png" alt="Linux" />
</a>
<a href="http://gentoo.org" title="Gentoo">
<img src="{{MEDIA_URL}}img/gentoo.png" alt="Gentoo Linux" />
</a>
-
Copyright (C) 2011 <strong>Corentin Chary</strong>
</div>
</body>
</html>

View File

@ -0,0 +1,29 @@
{% load sub %}
{% load mul %}
<table id="table" class="display">
<thead>
<th>Package</th>
<th>Ebuilds</th>
<th>Unpackaged</th>
</thead>
<tbody>
{% for package in packages %}
{% if package.n_versions == package.n_packaged %}
<tr class="gradeA">
{% else %}{% if package.n_versions < package.n_packaged|mul:2 %}
<tr class="gradeC">
{% else %}
<tr class="gradeX">
{% endif %}{% endif %}
<td>
<a href="{% url euscan.views.package package.category package.name %}">
{{ package.category }}/{{ package.name }}
</a>
</td>
<td>{{ package.n_packaged }}</td>
<td>{{ package.n_versions|sub:package.n_packaged }}</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@ -1,38 +1,12 @@
{% extends "euscan/_datatable.html" %}
{% load sub %}
{% load mul %}
{% load packages %}
{% block title %}
{{ block.super }} - {{ category }}
{{ block.super }} - Category: {{ category }}
{% endblock %}
{% block content %}
<h2>Category: {{ category }}</h2>
<table id="table" class="display">
<thead>
<th>Package</th>
<th>Ebuilds</th>
<th>Unpackaged</th>
</thead>
<tbody>
{% for package in packages %}
{% if package.n_versions == package.n_packaged %}
<tr class="gradeA">
{% else %}{% if package.n_versions < package.n_packaged|mul:2 %}
<tr class="gradeC">
{% else %}
<tr class="gradeX">
{% endif %}{% endif %}
<td>
<a href="{% url euscan.views.package package.category package.name %}">
{{ package.category }}/{{ package.name }}
</a>
</td>
<td>{{ package.n_packaged }}</td>
<td>{{ package.n_versions|sub:package.n_packaged }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% packages packages %}
{% endblock %}

View File

@ -0,0 +1,12 @@
{% extends "euscan/_datatable.html" %}
{% load packages %}
{% block title %}
{{ block.super }} - Herd: {{ herd.herd }}
{% endblock %}
{% block content %}
<h2>Herd: {{ herd.herd }}</h2>
{% packages packages %}
{% endblock %}

View File

@ -0,0 +1,38 @@
{% extends "euscan/_datatable.html" %}
{% load sub %}
{% load mul %}
{% block title %}
{{ block.super }} - herds
{% endblock %}
{% block content %}
<h2>Herds</h2>
<table id="table" class="display">
<thead>
<th>Herd</th>
<th>Ebuilds</th>
<th>Unpackaged</th>
</thead>
<tbody>
{% for herd in herds %}
{% if herd.n_versions == herd.n_packaged %}
<tr class="gradeA">
{% else %}{% if herd.n_versions < herd.n_packaged|mul:2 %}
<tr class="gradeC">
{% else %}
<tr class="gradeX">
{% endif %}{% endif %}
<td>
<a href="{% url euscan.views.herd herd.herds__herd %}">
{{ herd.herds__herd }}
</a>
</td>
<td>{{ herd.n_packaged }}</td>
<td>{{ herd.n_versions|sub:herd.n_packaged }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View File

@ -0,0 +1,12 @@
{% extends "euscan/_datatable.html" %}
{% load packages %}
{% block title %}
{{ block.super }} - Maintainer: {{ maintainer.name }}
{% endblock %}
{% block content %}
<h2>Maintainer: {{ maintainer.name }} &lt{{ maintainer.email }}&gt</h2>
{% packages packages %}
{% endblock %}

View File

@ -0,0 +1,38 @@
{% extends "euscan/_datatable.html" %}
{% load sub %}
{% load mul %}
{% block title %}
{{ block.super }} - maintainers
{% endblock %}
{% block content %}
<h2>Maintainers</h2>
<table id="table" class="display">
<thead>
<th>Maintainer</th>
<th>Ebuilds</th>
<th>Unpackaged</th>
</thead>
<tbody>
{% for maintainer in maintainers %}
{% if maintainer.n_versions == maintainer.n_packaged %}
<tr class="gradeA">
{% else %}{% if maintainer.n_versions < maintainer.n_packaged|mul:2 %}
<tr class="gradeC">
{% else %}
<tr class="gradeX">
{% endif %}{% endif %}
<td>
<a href="{% url euscan.views.maintainer maintainer.maintainers__id %}">
{{ maintainer.maintainers__name }}
</a>
</td>
<td>{{ maintainer.n_packaged }}</td>
<td>{{ maintainer.n_versions|sub:maintainer.n_packaged }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View File

@ -63,7 +63,7 @@
<ul>
{% for version in upstream %}
<li>
{{ version.version }} - {{ version.url }}
{{ version.version }} - {{ version.urls }}
</li>
{% endfor %}
</ul>

View File

@ -0,0 +1,28 @@
{% extends "_base.html" %}
{% block title %}
{{ block.super }} - World scan
{% endblock %}
{% block content %}
<h2>Scan your packages</h2>
<hr />
<p>Import your /var/lib/portage/world file</p>
<form action="{% url euscan.views.world_scan %}" method="post" enctype="multipart/form-data">{% csrf_token %}
{{ file_form.as_p }}
<input type="submit" value="Submit" />
</form>
<hr />
<p>Or just list some packages</p>
<form action="{% url euscan.views.world_scan %}" method="post">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit" />
</form>
{% endblock %}

View File

@ -0,0 +1,12 @@
{% extends "euscan/_datatable.html" %}
{% load packages %}
{% block title %}
{{ block.super }} - World Scan
{% endblock %}
{% block content %}
<h2>World scan:</h2>
{% packages packages %}
{% endblock %}