Commit 3e2e4d4e authored by Dan McGee's avatar Dan McGee
Browse files

Convert STATIC_URL usage to {% static %} template tag



This is a lot more flexible and will allow more than just simple
prefixing of the static file resources.

Signed-off-by: default avatarDan McGee <dan@archlinux.org>
parent 024fd1b2
{% extends "base.html" %}
{% load static from staticfiles %}
{% load tz %}
{% block title %}Arch Linux - Developer World Clocks{% endblock %}
......@@ -40,8 +41,8 @@ <h2>Developer World Clocks</h2>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#clocks-table:has(tbody tr)").tablesorter(
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load cache %}
{% load package_extras %}
......@@ -293,8 +294,8 @@ <h2>Stats by Developer</h2>
{% endcache %}
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#dash-myflagged:not(:has(tbody tr.empty))").tablesorter(
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load attributes %}
{% load package_extras %}
......@@ -52,8 +53,8 @@ <h2>{{ title }}{% if maintainer %},
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra']});
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load mirror_status %}
{% block title %}Arch Linux - {{ mirror.name }} - Mirror Details{% endblock %}
......@@ -105,8 +106,8 @@ <h3>Available URLs</h3>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#available_urls:has(tbody tr)").tablesorter(
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% block title %}Arch Linux - Mirror Overview{% endblock %}
{% block content %}
......@@ -41,8 +42,8 @@ <h2>Mirror Overview</h2>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra'], sortList: [[1,0], [2,0]]});
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load mirror_status %}
{% block title %}Arch Linux - Mirror Status{% endblock %}
......@@ -102,8 +103,8 @@ <h3>Mirror Syncing Error Log</h3>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
var headers = { 5: { sorter: 'duration' }, 6: { sorter: 'mostlydigit' }, 7: { sorter: 'mostlydigit' }, 8: { sorter: 'mostlydigit' } };
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% block title %}Arch Linux - News: {% if form.instance.id %}Edit{% else %}Add{% endif %} Article{% endblock %}
{% block content %}
......@@ -33,7 +34,7 @@ <h2>News Preview: <span id="news-preview-title"></span></h2>
<div id="news-preview-data" class="article-content"></div>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(enablePreview);
</script>
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load package_extras %}
{% load pgp %}
......@@ -205,7 +206,7 @@ <h3 title="Complete list of files contained within this package">
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(ajaxifyFiles);
</script>
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% block title %}Arch Linux - Package Differences Reports{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
......@@ -94,8 +96,8 @@ <h2>Multilib Differences to Main Packages</h2>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#table_differences').tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]});
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% block title %}Arch Linux - Package Groups{% if arch %} - {{ arch }}{% endif %}{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
......@@ -28,8 +30,8 @@ <h2>Package Groups Overview{% if arch %} - {{ arch }}{% endif %}</h2>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]});
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load package_extras %}
{% block title %}Arch Linux - {{ name }} ({{ arch.name }}) - {{ list_title }}{% endblock %}
......@@ -40,8 +41,8 @@ <h2>{{ list_title }} - {{ name }} ({{ arch.name }})</h2>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra'], sortList: [[2,0]]});
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load package_extras %}
{% block title %}Arch Linux - Package Signoffs{% endblock %}
......@@ -79,8 +80,8 @@ <h3>Filter Displayed Signoffs</h3>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a.signoff-link').click(signoff_package);
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% block title %}Arch Linux - Stale Package Relations{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
......@@ -106,8 +108,8 @@ <h3>Maintainers with Wrong Permissions ({{ wrong_permissions|length }})</h3>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#inactive-user:not(:has(tbody tr.empty))').tablesorter({widgets: ['zebra'], headers: { 0: { sorter: false } }, sortList: [[3,0]]});
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load url from future %}
{% block content %}
......@@ -31,8 +32,8 @@ <h2>Failures and Successes for Testing ISOs</h2>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results:not(:has(tbody tr.empty))").tablesorter({widgets: ['zebra']});
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load url from future %}
{% block content %}
......@@ -34,8 +35,8 @@ <h2>Results for:
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results:not(:has(tbody tr.empty))").tablesorter({widgets: ['zebra']});
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% block title %}Arch Linux - Todo Lists{% endblock %}
......@@ -43,8 +44,8 @@ <h2>Package Todo Lists</h2>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
// I'm not sure why it didn't autodetect digit, but it has to be explicit
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load package_extras %}
{% block title %}Arch Linux - Todo Lists{% endblock %}
......@@ -65,8 +66,8 @@ <h4>{{ list.name }}</h4>
</div>
{% endif %}
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra'], sortList: [[0,0], [1,0]]});
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load package_extras %}
{% block title %}Arch Linux - Todo: {{ list.name }}{% endblock %}
......@@ -70,8 +71,8 @@ <h2>Todo List: {{ list.name }}</h2>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a.status-link').click(todolist_flag);
......
{% extends "base.html" %}
{% load static from staticfiles %}
{% load url from future %}
{% block title %}Arch Linux - Visualizations{% endblock %}
......@@ -29,9 +30,9 @@ <h2>Visualization of PGP Master and Signing Keys</h2>
<div id="visualize-keys" class="visualize-chart"></div>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="{{ STATIC_URL }}d3.v2.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}visualize.js"></script>
<script type="text/javascript" src="{% static "d3.v2.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript" src="{% static "visualize.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
var orderings = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment