diff options
author | Dan McGee <dan@archlinux.org> | 2012-03-24 18:37:19 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-03-24 18:37:19 +0100 |
commit | 3e2e4d4ef8910351910d633d17f8b4e9c0ea4c74 (patch) | |
tree | c86627fe731dfff5177386d126d3bb7da2ce0444 /templates | |
parent | 024fd1b2843d2abd0094faedfbc49e1d1a21edd0 (diff) | |
download | archweb-3e2e4d4ef8910351910d633d17f8b4e9c0ea4c74.tar.gz archweb-3e2e4d4ef8910351910d633d17f8b4e9c0ea4c74.tar.xz |
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: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/devel/clock.html | 5 | ||||
-rw-r--r-- | templates/devel/index.html | 5 | ||||
-rw-r--r-- | templates/devel/packages.html | 5 | ||||
-rw-r--r-- | templates/mirrors/mirror_details.html | 5 | ||||
-rw-r--r-- | templates/mirrors/mirrors.html | 5 | ||||
-rw-r--r-- | templates/mirrors/status.html | 5 | ||||
-rw-r--r-- | templates/news/add.html | 3 | ||||
-rw-r--r-- | templates/packages/details.html | 3 | ||||
-rw-r--r-- | templates/packages/differences.html | 6 | ||||
-rw-r--r-- | templates/packages/groups.html | 6 | ||||
-rw-r--r-- | templates/packages/packages_list.html | 5 | ||||
-rw-r--r-- | templates/packages/signoffs.html | 5 | ||||
-rw-r--r-- | templates/packages/stale_relations.html | 6 | ||||
-rw-r--r-- | templates/releng/iso_overview.html | 5 | ||||
-rw-r--r-- | templates/releng/result_list.html | 5 | ||||
-rw-r--r-- | templates/todolists/list.html | 5 | ||||
-rw-r--r-- | templates/todolists/public_list.html | 5 | ||||
-rw-r--r-- | templates/todolists/view.html | 5 | ||||
-rw-r--r-- | templates/visualize/index.html | 7 |
19 files changed, 59 insertions, 37 deletions
diff --git a/templates/devel/clock.html b/templates/devel/clock.html index 3b00075..5bb092f 100644 --- a/templates/devel/clock.html +++ b/templates/devel/clock.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load tz %} {% block title %}Arch Linux - Developer World Clocks{% endblock %} @@ -40,8 +41,8 @@ </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( diff --git a/templates/devel/index.html b/templates/devel/index.html index 04fc5e5..0201936 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load cache %} {% load package_extras %} @@ -293,8 +294,8 @@ {% 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( diff --git a/templates/devel/packages.html b/templates/devel/packages.html index ed4123b..6b9df21 100644 --- a/templates/devel/packages.html +++ b/templates/devel/packages.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load attributes %} {% load package_extras %} @@ -52,8 +53,8 @@ </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']}); diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html index 02aa5ae..249b36f 100644 --- a/templates/mirrors/mirror_details.html +++ b/templates/mirrors/mirror_details.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load mirror_status %} {% block title %}Arch Linux - {{ mirror.name }} - Mirror Details{% endblock %} @@ -105,8 +106,8 @@ </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( diff --git a/templates/mirrors/mirrors.html b/templates/mirrors/mirrors.html index 1207e81..3aff8ea 100644 --- a/templates/mirrors/mirrors.html +++ b/templates/mirrors/mirrors.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% block title %}Arch Linux - Mirror Overview{% endblock %} {% block content %} @@ -41,8 +42,8 @@ </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]]}); diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html index 54c5941..4f09be8 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load mirror_status %} {% block title %}Arch Linux - Mirror Status{% endblock %} @@ -102,8 +103,8 @@ </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' } }; diff --git a/templates/news/add.html b/templates/news/add.html index dca8fe8..5109465 100644 --- a/templates/news/add.html +++ b/templates/news/add.html @@ -1,4 +1,5 @@ {% 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 @@ <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> diff --git a/templates/packages/details.html b/templates/packages/details.html index bbbef2e..a066969 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load package_extras %} {% load pgp %} @@ -205,7 +206,7 @@ </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> diff --git a/templates/packages/differences.html b/templates/packages/differences.html index e2deedc..01e1f85 100644 --- a/templates/packages/differences.html +++ b/templates/packages/differences.html @@ -1,4 +1,6 @@ {% extends "base.html" %} +{% load static from staticfiles %} + {% block title %}Arch Linux - Package Differences Reports{% endblock %} {% block navbarclass %}anb-packages{% endblock %} @@ -94,8 +96,8 @@ </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]]}); diff --git a/templates/packages/groups.html b/templates/packages/groups.html index dad8665..2786244 100644 --- a/templates/packages/groups.html +++ b/templates/packages/groups.html @@ -1,4 +1,6 @@ {% 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 @@ </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]]}); diff --git a/templates/packages/packages_list.html b/templates/packages/packages_list.html index 599ddcb..ee2d208 100644 --- a/templates/packages/packages_list.html +++ b/templates/packages/packages_list.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load package_extras %} {% block title %}Arch Linux - {{ name }} ({{ arch.name }}) - {{ list_title }}{% endblock %} @@ -40,8 +41,8 @@ </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]]}); diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html index 26fd88d..3a2c350 100644 --- a/templates/packages/signoffs.html +++ b/templates/packages/signoffs.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load package_extras %} {% block title %}Arch Linux - Package Signoffs{% endblock %} @@ -79,8 +80,8 @@ </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); diff --git a/templates/packages/stale_relations.html b/templates/packages/stale_relations.html index 80e912c..df469e7 100644 --- a/templates/packages/stale_relations.html +++ b/templates/packages/stale_relations.html @@ -1,4 +1,6 @@ {% extends "base.html" %} +{% load static from staticfiles %} + {% block title %}Arch Linux - Stale Package Relations{% endblock %} {% block navbarclass %}anb-packages{% endblock %} @@ -106,8 +108,8 @@ </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]]}); diff --git a/templates/releng/iso_overview.html b/templates/releng/iso_overview.html index 76479c5..ca5a8c0 100644 --- a/templates/releng/iso_overview.html +++ b/templates/releng/iso_overview.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load url from future %} {% block content %} @@ -31,8 +32,8 @@ </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']}); diff --git a/templates/releng/result_list.html b/templates/releng/result_list.html index 6226421..207a8ba 100644 --- a/templates/releng/result_list.html +++ b/templates/releng/result_list.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load url from future %} {% block content %} @@ -34,8 +35,8 @@ </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']}); diff --git a/templates/todolists/list.html b/templates/todolists/list.html index b829a12..88df4c8 100644 --- a/templates/todolists/list.html +++ b/templates/todolists/list.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% block title %}Arch Linux - Todo Lists{% endblock %} @@ -43,8 +44,8 @@ </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 diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html index b1d0453..c3142da 100644 --- a/templates/todolists/public_list.html +++ b/templates/todolists/public_list.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load package_extras %} {% block title %}Arch Linux - Todo Lists{% endblock %} @@ -65,8 +66,8 @@ </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]]}); diff --git a/templates/todolists/view.html b/templates/todolists/view.html index 2ed7b78..02bbfd4 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load package_extras %} {% block title %}Arch Linux - Todo: {{ list.name }}{% endblock %} @@ -70,8 +71,8 @@ </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); diff --git a/templates/visualize/index.html b/templates/visualize/index.html index a7855eb..95cf6c1 100644 --- a/templates/visualize/index.html +++ b/templates/visualize/index.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static from staticfiles %} {% load url from future %} {% block title %}Arch Linux - Visualizations{% endblock %} @@ -29,9 +30,9 @@ <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 = { |