summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-03-24 00:23:17 +0100
committerDan McGee <dan@archlinux.org>2012-03-24 01:54:40 +0100
commit0545e3e0ec864eaed4facc94158e3ed9da1dfb2b (patch)
treed00c14ff93127330911d242332f2666d0ccf6614 /templates
parent95520ae26485e5c62ea1431ca82a7b42d01b923a (diff)
downloadarchweb-0545e3e0ec864eaed4facc94158e3ed9da1dfb2b.tar.gz
archweb-0545e3e0ec864eaed4facc94158e3ed9da1dfb2b.tar.xz
Django 1.4 admin and admin media changes
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/index.html10
-rw-r--r--templates/devel/admin_log.html4
-rw-r--r--templates/packages/search.html12
3 files changed, 15 insertions, 11 deletions
diff --git a/templates/admin/index.html b/templates/admin/index.html
index 1755d86..203206d 100644
--- a/templates/admin/index.html
+++ b/templates/admin/index.html
@@ -1,7 +1,7 @@
{% extends "admin/base_site.html" %}
-{% load i18n %}
+{% load i18n admin_static %}
-{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css" />{% endblock %}
+{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />{% endblock %}
{% block coltype %}colMS{% endblock %}
@@ -36,19 +36,19 @@
<caption><a href="{{ app.app_url }}" class="section">{% blocktrans with name=app.name %}{{ name }}{% endblocktrans %}</a></caption>
{% for model in app.models %}
<tr>
- {% if model.perms.change %}
+ {% if model.admin_url %}
<th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
{% else %}
<th scope="row">{{ model.name }}</th>
{% endif %}
- {% if model.perms.add %}
+ {% if model.add_url %}
<td><a href="{{ model.add_url }}" class="addlink">{% trans 'Add' %}</a></td>
{% else %}
<td>&nbsp;</td>
{% endif %}
- {% if model.perms.change %}
+ {% if model.admin_url %}
<td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
{% else %}
<td>&nbsp;</td>
diff --git a/templates/devel/admin_log.html b/templates/devel/admin_log.html
index 0f22ba2..1629c10 100644
--- a/templates/devel/admin_log.html
+++ b/templates/devel/admin_log.html
@@ -1,7 +1,7 @@
{% extends "admin/base_site.html" %}
-{% load i18n %}
+{% load i18n admin_static %}
-{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css" />{% endblock %}
+{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="/admin/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>{% endblock %}
diff --git a/templates/packages/search.html b/templates/packages/search.html
index ae67b18..030f267 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -1,13 +1,13 @@
{% extends "base.html" %}
{% load package_extras %}
-{% load adminmedia %}
+{% load admin_static %}
{% block title %}Arch Linux - Package Database{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
{% block head %}
{% if is_paginated and page_obj.number > 1 %}<meta name="robots" content="noindex, nofollow"/>{% endif %}
-<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/widgets.css" />
+<link rel="stylesheet" type="text/css" href="{% static "admin/css/widgets.css" %}" />
{% endblock %}
{% block content %}
@@ -126,8 +126,12 @@
title="AUR package database">Arch User Repository (AUR).</a></p>
</div>
+{% load cdn %}{% jquery %}
<script type="text/javascript" src="/jsi18n/"></script>
-<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";</script>
-<script type="text/javascript" src="{% admin_media_prefix %}js/core.js"></script>
+<script type="text/javascript">
+ window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}";
+ var django = {"jQuery": jQuery};
+</script>
+<script type="text/javascript" src="{% static "admin/js/core.js" %}"></script>
{{search_form.media}}
{% endblock %}