summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2008-04-11 21:36:18 -0700
committereliott <eliott@cactuswax.net>2008-04-11 21:36:18 -0700
commitf9e173eb95db1785947872af9cc43bb5b5579678 (patch)
treedcf50329d9e926cb58a244aa2f08c523fc56c964
parent13eae464f1d23e5a89afd5356dedd9f919802b6b (diff)
fixes for changes in the model dealing with the urlize -> get_* refactor
-rw-r--r--templates/packages/details.html143
-rw-r--r--templates/packages/search.html192
2 files changed, 167 insertions, 168 deletions
diff --git a/templates/packages/details.html b/templates/packages/details.html
index 1784ab79..6d1f5066 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -1,77 +1,82 @@
{% load package_extras %}
{% extends "base.html" %}
+{% block title %}Pkg: {{ pkg.pkgname }} - Arch Linux 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="/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>
- {% if not user.is_anonymous %}
+ <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="/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>
<br />&nbsp; &nbsp; <a href="/packages/unflag/{{ pkg.id }}/">Click here to unflag</a>
- {% endif %}
- {% else %}
- <a href="/packages/flag/{{ pkg.id }}/" onclick="return !window.open('/packages/flag/{{ pkg.id }}/','FlagHelp','height=250,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');">Flag Package Out-of-Date</a>
- <a href="/packages/flaghelp" onclick="return !window.open('/packages/flaghelp','FlagHelp','height=250,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');"><span style="font-size:x-small">(?)</span></a>
- {% endif %}
- </li>
- {% if not user.is_anonymous %}
- <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><tr>
- <th>Description:</th>
- <td>{{ pkg.pkgdesc }}</td>
- </tr><tr>
- <th>URL:</th>
- <td><a href="{{ pkg.url }}">{{ pkg.url }}</a></td>
- </tr><tr>
- <th>Maintainer:</th>
- <td>{% if pkg.maintainer %}{{ pkg.maintainer.get_full_name }}{% else %}None{% endif %}</td>
- </tr><tr>
- <th>LastUpdated:</th>
+ {% else %}
+ <a href="/packages/flag/{{ pkg.id }}/" onclick="return !window.open('/packages/flag/{{ pkg.id }}/','FlagHelp','height=250,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');">Flag Package Out-of-Date</a>
+ <a href="/packages/flaghelp" onclick="return !window.open('/packages/flaghelp','FlagHelp','height=250,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');"><span style="font-size:x-small">(?)</span></a>
+ {% endif %}
+ </li>
+ <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>
+ </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><tr>
+ <th>Description:</th>
+ <td>{{ pkg.pkgdesc }}</td>
+ </tr><tr>
+ <th>Upstream URL:</th>
+ <td><a href="{{ pkg.url }}">{{ pkg.url }}</a></td>
+ </tr><tr>
+ <th>Maintainer:</th>
+ <td>{% if pkg.maintainer %}{{ pkg.maintainer.get_full_name }}{% else %}None{% endif %}</td>
+ </tr><tr>
+ <th>LastUpdated:</th>
<td>{{ pkg.last_update|date:"Y-m-d" }}</td>
- </tr>
- </table>
- <br />
- <table width="100%">
- <tr>
- <td valign="top" width="50%">
- <div class="listing">
- <h4>Dependencies:</h4>
- <ul style="font-size:small;list-style:none">
- {{ pkg.depends_urlize }}
- </ul>
- </div>
- </td>
- <td valign="top">
- <div class="listing">
- <h4>Required By:</h4>
- <ul style="font-size:small;list-style:none">
- {{ pkg.required_by_urlize }}
- </ul>
- </div>
- </td>
- </tr>
- </table>
- </div>
+ </tr>
+ </table>
+ <br />
+ <table width="100%">
+ <tr>
+ <td valign="top" width="50%">
+ <div class="listing">
+ <h4>Dependencies:</h4>
+ <ul style="font-size:small;list-style:none">
+ {% for dep in pkg.get_depends %}
+ {% ifequal dep.0 None %}
+ <li>{{ dep.1 }}</li>
+ {% else %}
+ <li><a href="/packages/{{ dep.0 }}/">{{ dep.1 }}</a>{{ dep.2 }}</li>
+ {% endifequal %}
+ {% endfor %}
+ </ul>
+ </div>
+ </td>
+ <td valign="top">
+ <div class="listing">
+ <h4>Required By:</h4>
+ <ul style="font-size:small;list-style:none">
+ {% for req in pkg.get_requiredby %}
+ <li><a href="/packages/{{ req.0 }}/">{{ req.1 }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
{% endblock %}
diff --git a/templates/packages/search.html b/templates/packages/search.html
index b58ad07a..7e13a45c 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -1,47 +1,47 @@
{% load validation %}
{% load package_extras %}
{% extends "base.html" %}
-
+{% block title %}Arch Linux - Package Search{% endblock %}
{% block head %}
<script type="text/JavaScript" src="/media/calendar.js"></script>
<link href="/media/calendar.css" rel="stylesheet" type="text/css" />
{% endblock %}
{% block content %}
- <div class="greybox">
- <h4 style="text-align: right">Search Criteria</h4>
- {% if errors %}
- {% print_errors errors %}
- {% endif %}
- <hr />
- <form method="get" action="/packages/search/">
- <table width="100%">
- <tr>
- <td><span class="smalltext">Arch</span></td>
- <td><span class="smalltext">Repository</span></td>
- <td><span class="smalltext">Keywords</span></td>
- <td><span class="smalltext">Last Update</span></td>
- <td><span class="smalltext">Per Page</span></td>
- </tr><tr>
- <td>
- <select name="arch">
- <option value="all">All</option>
- {% for a in arches %}
- <option value="{{ a }}"{% ifequal arch a %} selected{% endifequal %}>{{ a }}</option>
- {% endfor %}
- </select>
- </td><td>
- <select name="repo">
- <option value="all">All</option>
- {% for r in repos %}
- <option value="{{ r }}"{% ifequal repo r %} selected{% endifequal %}>{{ r|capfirst }}</option>
- {% endfor %}
- </select>
- </td><td>
- <input type="text" name="q" value="{{ query|escape }}" size="30" maxlength="200" />
- </td><td>
- <input type="text" name="lastupdate" value="{{ lastupdate|escape }}" size="10" maxlength="10" id="f_lastupdate" /> <button type="reset" id="f_trigger">...</button>
- <script type="text/javascript">
+ <div class="greybox">
+ <h4 style="text-align: right">Search Criteria</h4>
+ {% if errors %}
+ {% print_errors errors %}
+ {% endif %}
+ <hr />
+ <form method="get" action="/packages/search/">
+ <table width="100%">
+ <tr>
+ <td><span class="smalltext">Arch</span></td>
+ <td><span class="smalltext">Repository</span></td>
+ <td><span class="smalltext">Keywords</span></td>
+ <td><span class="smalltext">Last Update</span></td>
+ <td><span class="smalltext">Per Page</span></td>
+ </tr><tr>
+ <td>
+ <select name="arch">
+ <option value="all">All</option>
+ {% for a in arches %}
+ <option value="{{ a.name }}"{% ifequal arch a.name %} selected{% endifequal %}>{{ a.name }}</option>
+ {% endfor %}
+ </select>
+ </td><td>
+ <select name="repo">
+ <option value="all">All</option>
+ {% for r in repos %}
+ <option value="{{ r.name }}"{% ifequal repo r.name %} selected{% endifequal %}>{{ r.name|capfirst }}</option>
+ {% endfor %}
+ </select>
+ </td><td>
+ <input type="text" name="q" value="{{ query|escape }}" size="30" maxlength="200" />
+ </td><td>
+ <input type="text" name="lastupdate" value="{{ lastupdate|escape }}" size="10" maxlength="10" id="f_lastupdate" /> <button type="reset" id="f_trigger">...</button>
+ <script type="text/javascript">
Calendar.setup({
inputField : "f_lastupdate", // id of the input field
ifFormat : "%Y-%m-%d", // format of the input field
@@ -50,71 +50,65 @@
singleClick : true, // double-click mode
step : 1 // show all years in drop-down boxes (instead of every other year as default)
});
- </script>
- </td><td>
- <select name="limit">
- <option value="50"{% ifequal limit 50 %} selected{% endifequal %}>50</option>
- <option value="100"{% ifequal limit 100 %} selected{% endifequal %}>100</option>
- <option value="250"{% ifequal limit 250 %} selected{% endifequal %}>250</option>
- <option value="0"{% ifequal limit 0 %} selected{% endifequal %}>All</option>
- </select>
- </td><td>
- <input type="submit" value=" Search " />
- </td>
- </tr>
- </table>
- </form>
- </div>
- <br /><br />
+ </script>
+ </td><td>
+ <select name="limit">
+ <option value="50"{% ifequal limit 50 %} selected{% endifequal %}>50</option>
+ <option value="100"{% ifequal limit 100 %} selected{% endifequal %}>100</option>
+ <option value="250"{% ifequal limit 250 %} selected{% endifequal %}>250</option>
+ <option value="0"{% ifequal limit 0 %} selected{% endifequal %}>All</option>
+ </select>
+ </td><td>
+ <input type="submit" value=" Search " />
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+ <br /><br />
- {% if results %}
- <div class="greybox">
- <table class="results" width="100%">
- <tr>
- {% if not user.is_anonymous %}
- <form method="post" action="/packages/update/">
- <th>&nbsp;</th>
- {% endif %}
- <th><a href="{% buildsortqs "arch" %}">Arch</a></th>
- <th><a href="{% buildsortqs "repo" %}">Repo</a></th>
- <th><a href="{% buildsortqs "pkgname" %}">Name</a></th>
- <th>Version</th>
- <th>Description</th>
- <th><a href="{% buildsortqs "last_update" %}">Last Updated</a></th>
- </tr>
- {% for pkg in results %}
+ {% if results %}
+ <div class="greybox">
+ <table class="results" width="100%">
+ <tr>
+ <form method="post" action="/packages/update/">
+ <th>&nbsp;</th>
+ <th><a href="{% buildsortqs "arch" %}">Arch</a></th>
+ <th><a href="{% buildsortqs "repo" %}">Repo</a></th>
+ <th><a href="{% buildsortqs "pkgname" %}">Name</a></th>
+ <th>Version</th>
+ <th>Description</th>
+ <th><a href="{% buildsortqs "last_update" %}">Last Updated</a></th>
+ </tr>
+ {% for pkg in results %}
<tr class="{% cycle pkgr2,pkgr1 %}">
- {% if not user.is_anonymous %}
- <td><input type="checkbox" name="pkgid" value="{{ pkg.id }}" /></td>
- {% endif %}
- <td>{{ pkg.arch.name }}</td>
- <td>{{ pkg.repo.name|capfirst }}</td>
- <td><a href="{{ pkg.get_absolute_url }}">{{ pkg.pkgname }}</a></td>
- {% if pkg.needupdate %}
- <td><span style="color:red">{{ pkg.pkgver }}-{{ pkg.pkgrel }}</span></td>
- {% else %}
- <td>{{ pkg.pkgver }}-{{ pkg.pkgrel }}</td>
- {% endif %}
- <td>{{ pkg.pkgdesc }}</td>
- <td>{{ pkg.last_update|date:"Y-m-d" }}</td>
- </tr>
- {% endfor %}
- <tr>
- <td colspan="2" style="font-size:x-small">{% if prevpage %}<br /><a href="{{ prevpage }}">&lt;&lt;&lt; Prev</a>{% endif %}</td>
- <td colspan="2">&nbsp;</td>
- <td colspan="2" style="font-size:x-small;text-align:right">{% if nextpage %}<br /><a href="{{ nextpage }}">Next &gt;&gt;&gt;</a>{% endif %}</td>
- </tr>
- {% if not user.is_anonymous %}
- <tr>
- <td colspan="3">&nbsp;</td>
- <td colspan="2" style="text-align:center"><input type="submit" name="adopt" value="Adopt Packages"></td>
- <td colspan="1" style="text-align:center"><input type="submit" name="disown" value="Disown Packages"></td>
- <td colspan="1">&nbsp;</td>
- </tr>
- </form>
- {% endif %}
- </table>
- </div>
- {% endif %}
+ <td><input type="checkbox" name="pkgid" value="{{ pkg.id }}" /></td>
+ <td>{{ pkg.arch.name }}</td>
+ <td>{{ pkg.repo.name|capfirst }}</td>
+ <td><a href="{{ pkg.get_absolute_url }}">{{ pkg.pkgname }}</a></td>
+ {% if pkg.needupdate %}
+ <td><span style="color:red">{{ pkg.pkgver }}-{{ pkg.pkgrel }}</span></td>
+ {% else %}
+ <td>{{ pkg.pkgver }}-{{ pkg.pkgrel }}</td>
+ {% endif %}
+ <td>{{ pkg.pkgdesc }}</td>
+ <td>{{ pkg.last_update|date:"Y-m-d" }}</td>
+ </tr>
+ {% endfor %}
+ <tr>
+ <td colspan="2" style="font-size:x-small">{% if prevpage %}<br /><a href="{{ prevpage }}">&lt;&lt;&lt; Prev</a>{% endif %}</td>
+ <td colspan="2">&nbsp;</td>
+ <td colspan="2" style="font-size:x-small;text-align:right">{% if nextpage %}<br /><a href="{{ nextpage }}">Next &gt;&gt;&gt;</a>{% endif %}</td>
+ </tr>
+ <tr>
+ <td colspan="3">&nbsp;</td>
+ <td colspan="2" style="text-align:center"><input type="submit" name="adopt" value="Adopt Packages"></td>
+ <td colspan="1" style="text-align:center"><input type="submit" name="disown" value="Disown Packages"></td>
+ <td colspan="1">&nbsp;</td>
+ </tr>
+ </form>
+ </table>
+ </div>
+ {% endif %}
{% endblock %}