Fix for cmp items
[auf_rh_dae.git] / src / qbe / django_qbe / templates / qbe_results.html
CommitLineData
5cf90361
PP
1{% extends "qbe.html" %}
2{% load i18n qbe_tags %}
3
4{% block extrahead %}
5<script type="text/javascript" src="{% firstof STATIC_URL MEDIA_URL %}django_qbe/js/jquery.js"></script>
6<link rel="stylesheet" type="text/css" href="{% firstof STATIC_URL MEDIA_URL %}django_qbe/css/qbe.css" />
7{% endblock %}
8
9{% block breadcrumbs %}<div class="breadcrumbs"><a href="{% url admin:index %}">{% trans 'Home' %}</a>{% if title %} &rsaquo; <a href="{% url qbe_form %}">{{ title }}</a> &rsaquo; {% trans "Results" %}{% endif %}</div>
10{% endblock %}
11
12{% block content_title %}{% if title %}
13<h1>
14 {{ title }}: {{ count|floatformat:0 }} {% trans "result" %}{{ count|floatformat:0|pluralize }}
15</h1>
16{% endif %}{% endblock %}
17
18{% block content %}
19{% block object-tools %}
20 {% ifequal limit count %}
21 {% trans "Showing all" %} {{ count|floatformat:0 }} {% trans "result" %}{{ results|length|pluralize }}
22 {% else %}
23 {% trans "Showing from" %} {{ offset|floatformat:0 }} {% trans "to" %} {{ offset_limit|floatformat:0 }} {% trans "of" %} {{ count|floatformat:0 }} {% trans "result" %}{{ results|length|pluralize }}
24 {% endifequal %}
25<span id="qbeResultsOptions">
26 {% ifequal limit count %}
27 (<a href="{% url qbe_results query_hash %}">{% trans "show first ones" %}</a>
28 {% else %}
29 (<a href="{% url qbe_results query_hash %}?show=all">{% trans "show all" %}</a>
30 {% endifequal %}
31 | <a href="{% url qbe_form %}?hash={{ query_hash }}">{% trans "edit query" %}</a>
32 | <a href="#" onclick="jQuery('#qbeSQL').toggle();return false;">{% trans "view query" %}</a>)
33</span>
34<ul class="object-tools">
35 <li id="qbeSaveQueryLi">
36 {% trans "Save query as" %}
37 </li>
38 <li>
39 <a href="{% url admin:django_qbe_savedquery_add %}?query_hash={{ query_hash }}">{% trans "permanent" %}</a>
40 </li>
41 <li>
42 <a href="{% url qbe_bookmark %}?data={{ pickled }}" title="{% trans "Drag this yo your bookmarks bar to save this query" %}" id="qbeBookmarkQuery">{% trans "bookmark" %}</a>
43 </li>
44 {% for format in formats %}
45 <li>
46 <a href="{% url qbe_export format %}?hash={{ query_hash }}" title="{% trans "Export to" %} .{{ format }}" id="qbeExport{{ format }}">.{{ format }}</a>
47 </li>
48 {% endfor %}
49</ul>
50{% endblock %}
51<code id="qbeSQL" style="display: none;">
52{{ query }}
53</code>
54<div id="changelist" class="module">
55<table cellspacing="0">
56 <thead>
57 <tr>
58 {% for label in labels %}
59 <th>{{ label }}</th>
60 {% endfor %}
61 </tr>
62 </thead>
63 <tbody>
64 {% for result_tuple in results %}
65 <tr class="{% cycle 'row1' 'row2' %}">
66 {% if admin_urls %}
67 {% for result, url in result_tuple %}
68 {% if url %}
69 <td><a href={{ url }}>{{ result }}</a></td>
70 {% else %}
71 <td>{{ result }}</td>
72 {% endif %}
73 {% endfor %}
74 {% else %}
75 {% for result in result_tuple %}
76 <td>{{ result }}</a></td>
77 {% endfor %}
78 {% endif %}
79 </tr>
80 {% endfor %}
81 </tbody>
82</table>
83<p class="paginator">
84{% qbe_paginator count limit page %}
85{{ count|floatformat:0 }} {% trans "result" %}{{ count|floatformat:0|pluralize }}
86</p>
87</div>
88{% endblock %}