Luke Plant avatar Luke Plant committed 051d23b

Fixed missing icons on 'Manage CRBs' page.

Also removed all other uses of STATIC_URL in templates in favour of 'static'
template tag.

Comments (0)

Files changed (9)

templates/admin/base_site.html

 {% extends "admin/base.html" %}
 {% load i18n %}
+{% load static %}
 {% block title %}{{ title }} | CCIW site admin{% endblock %}
 {% block extrastyle %}{{ block.super }}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/adminextra.css" />
-<script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery.min.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/cciwutils.js"></script>
+<link rel="stylesheet" type="text/css" href="{% static "css/adminextra.css" %}" />
+<script type="text/javascript" src="{% static "admin/js/jquery.min.js" %}"></script>
+<script type="text/javascript" src="{% static "js/cciwutils.js" %}"></script>
 <script type="text/javascript">
 (function($) {
    $(document).ready(cciw.externalLinks);

templates/cciw/base.html

-<!DOCTYPE html>
+{% load static %}<!DOCTYPE html>
 <html lang="en-gb">
 <head>
 <title>{% block title %}{{ title }} | CCIW{% endblock %}</title>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <link href="https://fonts.googleapis.com/css?family=Amaranth" rel="stylesheet" type="text/css" />
-<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" type="text/css" />
+<link rel="stylesheet" href="{% static "css/style.css" %}" type="text/css" />
 {% block extraheader %}{% endblock %}
 {% if GOOGLE_ANALYTICS_ACCOUNT %}
 <script type="text/javascript">

templates/cciw/forums/thread.html

 {% extends "cciw/standard.html" %}
+{% load static %}
 {% load standardpage %}
 {% load view_extras %}
 {% load forums %}
 							<br/><span class="postHiddenMsg">HIDDEN</span> (awaiting moderator approval)
 						{% endif %}
 					{% endif %}
-					{% if moderator %}&nbsp;<span class="editPost"><a href="{% url 'admin:forums_post_change' post.id %}" title="Edit this post" ><img width="16" height="16" src="{{ STATIC_URL }}images/edit.png" alt="Edit this post" /></a></span>
+					{% if moderator %}&nbsp;<span class="editPost"><a href="{% url 'admin:forums_post_change' post.id %}" title="Edit this post" ><img width="16" height="16" src="{% static "images/edit.png" %}" alt="Edit this post" /></a></span>
 					{% endif %}
 				</td>
 				<td class="postMessage" id="id{{ post.id }}">

templates/cciw/forums/topicindex.html

 {% extends "cciw/standard.html" %}
+{% load static %}
 {% load standardpage %}
 {% load view_extras %}
 {% load forums %}
 					{% poll_vote_box request topic topic.poll 2 %}
 				{% endif %}
 				{{ topic.get_link }}
-				{% if moderator %}&nbsp;<span class="editTopic"><a href="/admin/cciwmain/topic/{{ topic.id }}/" title="Edit this topic" ><img width="16" height="16" src="{{ STATIC_URL }}images/edit.png" alt="Edit this topic" /></a></span>
+				{% if moderator %}&nbsp;<span class="editTopic"><a href="/admin/cciwmain/topic/{{ topic.id }}/" title="Edit this topic" ><img width="16" height="16" src="{% static "images/edit.png" %}" alt="Edit this topic" /></a></span>
 				{% endif %}
 				{% if topic.hidden %}
 					{% if moderator %}

templates/cciw/message.html

+{% load static %}
 <script type="text/javascript">
 <!--
 var cciw = (function(pub, $) {
 <div>
 <textarea name="message" rows="12" cols="60" id="message">{% if message_text %}{{ message_text }}{% endif %}</textarea>
 <div class="messageiconrow">
-<a class="button" href="javascript: void cciw.messageInsert(':-)');"><img src="{{ STATIC_URL }}images/emoticons/smile.gif" alt=":-)" title="Add emoticon" /></a>
-<a class="button" href="javascript: void cciw.messageInsert(':-(');"><img src="{{ STATIC_URL }}images/emoticons/sad.gif" alt=":-(" title="Add emoticon" /></a>
-<a class="button" href="javascript: void cciw.messageInsert(':-/');"><img src="{{ STATIC_URL }}images/emoticons/unsure.gif" alt=":-/" title="Add emoticon" /></a>
-<a class="button" href="javascript: void cciw.messageInsert(';-)');"><img src="{{ STATIC_URL }}images/emoticons/wink.gif" alt=";-)" title="Add emoticon" /></a>
-<a class="button" href="javascript: void cciw.messageInsert(':eyebrow:');"><img src="{{ STATIC_URL }}images/emoticons/eyebrow.gif" alt=":eyebrow:" title="Add emoticon" /></a>
+<a class="button" href="javascript: void cciw.messageInsert(':-)');"><img src="{% static "images/emoticons/smile.gif" %}" alt=":-)" title="Add emoticon" /></a>
+<a class="button" href="javascript: void cciw.messageInsert(':-(');"><img src="{% static "images/emoticons/sad.gif" %}" alt=":-(" title="Add emoticon" /></a>
+<a class="button" href="javascript: void cciw.messageInsert(':-/');"><img src="{% static "images/emoticons/unsure.gif" %}" alt=":-/" title="Add emoticon" /></a>
+<a class="button" href="javascript: void cciw.messageInsert(';-)');"><img src="{% static "images/emoticons/wink.gif" %}" alt=";-)" title="Add emoticon" /></a>
+<a class="button" href="javascript: void cciw.messageInsert(':eyebrow:');"><img src="{% static "images/emoticons/eyebrow.gif" %}" alt=":eyebrow:" title="Add emoticon" /></a>
  |
 <a class="button" href="javascript: void cciw.messageWrap('[b]', '[/b]');" title="Add bold text tags"><b>B</b></a>
 <a class="button" href="javascript: void cciw.messageWrap('[i]','[/i]');" title="Add italic text tags"><b><i>I</i></b></a>
 <a class="button" href="javascript: void cciw.messageWrap('[quote]', '[/quote]');" title="Add tags for quoting someone"><b>Q</b></a>
 
- | Bible: <input name="passageinput" id="passageinput" type="text" title="Enter Bible passage and click the icon to do a lookup in a popup window" /><a title="Enter Bible passage and click the icon to do a lookup in a popup window" class="button" href="javascript:void cciw.bibleWindow();"><img src="{{ STATIC_URL }}images/book.png" alt="bible icon" /></a>
+ | Bible: <input name="passageinput" id="passageinput" type="text" title="Enter Bible passage and click the icon to do a lookup in a popup window" /><a title="Enter Bible passage and click the icon to do a lookup in a popup window" class="button" href="javascript:void cciw.bibleWindow();"><img src="{% static "images/book.png" %}" alt="bible icon" /></a>
  |
 <a title="More details about creating messages." rel="external" href="/website/bbcode/" >Help</a>
 </div>

templates/cciw/officers/manage_crbs.html

 {% extends "cciw/officers/base.html" %}
 {% load url from future %}
+{% load static %}
 {% block title %}Manage CRBs {{ year }} | CCIW Officers{% endblock %}
 {% block content %}
 <script type="text/javascript">
               <a href="{% url 'cciw.officers.views.officer_list' year=camp.year number=camp.number %}" rel="external">{{ camp.number }}</a>{% if not forloop.last %}, {% endif %}
             {% endfor %}
         </td>
-        <td>{% if officer.temp.has_application_form %}<img src="{{ STATIC_URL }}admin/img/admin/icon-yes.gif">
+        <td>{% if officer.temp.has_application_form %}<img src="{% static "admin/img/icon-yes.gif" %}">
           <a href="{% url 'admin:officers_application_change' officer.temp.application_id %}" rel="external">View/edit</a>{% endif %}</td>
-        <td>{% if not officer.temp.has_crb %}<img src="{{ STATIC_URL }}admin/img/admin/icon_error.gif"> Never
-            {% else %}{% if officer.temp.has_valid_crb %}<img src="{{ STATIC_URL }}admin/img/admin/icon_success.gif"> Recent
-                     {% else %}<img src="{{ STATIC_URL }}admin/img/admin/icon_alert.gif"> Out of date
+        <td>{% if not officer.temp.has_crb %}<img src="{% static "admin/img/icon_error.gif" %}"> Never
+            {% else %}{% if officer.temp.has_valid_crb %}<img src="{% static "admin/img/icon_success.gif" %}"> Recent
+                     {% else %}<img src="{% static "admin/img/icon_alert.gif" %}"> Out of date
                      {% endif %}
             {% endif %}</td>
         <td id="id_last_crb_form_sent_{{ officer.id }}">

templates/cciw/officers/officer_list.html

 }
 
 table.tablesorter thead .header {
-    background-image: url({{ STATIC_URL }}images/ascdesc.gif);
+    background-image: url({% static "images/ascdesc.gif" %});
     background-repeat: no-repeat;
     background-position: center right;
     cursor: pointer;
 }
 
 table.tablesorter thead .header.headerSortDown {
-    background-image: url({{ STATIC_URL }}images/desc.gif);
+    background-image: url({% static "images/desc.gif" %});
 }
 
 table.tablesorter thead .header.headerSortUp {
-    background-image: url({{ STATIC_URL }}images/asc.gif);
+    background-image: url({% static "images/asc.gif" %});
 }
 
 #id_officer_list_div table thead th:nth-child(3),
 
 <div class="selector-filter">
  <a href="#" id="id_add_officer_btn">Add  <img style="vertical-align: middle"
- alt="Add" src="{{ STATIC_URL }}images/officer-list-add.gif" /></a>
+ alt="Add" src="{% static "images/officer-list-add.gif" %}" /></a>
  &nbsp;&nbsp;&nbsp;
  <input type="text" id="id_available_officers_filter" />
  <img style="vertical-align: middle" alt="search" src="{% static "admin/img/selector-search.gif" %}" />
 <div class="inlinepopup_background" id="id_popup_background"></div>
 
 <div id="loading" style="text-align: center; background-color: white; border: 1px solid #888; position: fixed; bottom: 0px; right: 0px; width: 224px; height: 40px; display: none;">
-<img src="{{ STATIC_URL }}images/loading.gif" alt="" />
+<img src="{% static "images/loading.gif" %}" alt="" />
 <br/>Loading...
 </div>
 {% endblock %}

templates/cciw/services/esv_passage.html

 {% extends "cciw/base.html" %}
+{% load static %}
 {% block content %}
-<script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery.min.js"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}js/cciwutils.js"></script>
+<script type="text/javascript" src="{% static "admin/js/jquery.min.js" %}" </script>
+<script type="text/javascript" src="{% static "js/cciwutils.js" %}" </script>
 <script type="text/javascript">
 <!--
 

templates/cciw/standard.html

 {% extends "cciw/base.html" %}
+{% load static %}
 {% load standardpage %}
 
 {% block extraheader %}
 	{% block atomfeed %}
 		{% atomfeedlink %}
 	{% endblock %}
-        <script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery.min.js"></script>
-        <script type="text/javascript" src="{{ STATIC_URL }}js/cciwutils.js"></script>
+        <script type="text/javascript" src="{% static "admin/js/jquery.min.js" %}"></script>
+        <script type="text/javascript" src="{% static "js/cciwutils.js" %}"></script>
         <script type="text/javascript">
 <!--
 (function($) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.