Browse Source

removed base_dashboard.html and re-organised layout.html(s) to include page specific css and js, neater and more flexible

master
Jon Price 14 years ago
parent
commit
bc3f6d9cce

+ 2
- 21
oscar/templates/base.html View File

@@ -15,16 +15,10 @@
15 15
         <!--[if lt IE 8]>
16 16
         	<script src="{{ STATIC_URL }}js/snowcone/snowcone.js"></script>
17 17
         <![endif]-->
18
-        
18
+    
19 19
         <link rel="shortcut icon" href="{{ STATIC_URL }}favicon.ico" />
20 20
         <!-- Main styles - will need to be minified -->
21 21
         <link rel="stylesheet" href="{{ STATIC_URL }}css/styles.css" />
22
-        {% if product %}
23
-        <!-- Colorbox for image galleries -->
24
-        <link rel="stylesheet" href="{{ STATIC_URL }}js/colorbox/colorbox.css" type="text/css" media="screen" charset="utf-8"/>
25
-        {% endif %}
26
-        <!-- Responsive - will need to be minified -->
27
-        <link rel="stylesheet" href="{{ STATIC_URL }}css/responsive.css" />
28 22
         {% block extrahead %}{% endblock %}
29 23
     </head>
30 24
     <body id="{% block body_id %}default{% endblock %}" class="{% block body_class %}default{% endblock %}">
@@ -40,25 +34,12 @@
40 34
         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
41 35
         <script>window.jQuery || document.write('<script src="{{ STATIC_URL }}js/jquery/jquery-1.7.1.min.js"><\/script>')</script>
42 36
         <script src="{{ STATIC_URL }}js/jquery/jquery.easing.1.3.js" type="text/javascript" charset="utf-8"></script>
43
-        <script src="{{ STATIC_URL }}js/scrollto/jquery.scrollTo-min.js" type="text/javascript" charset="utf-8"></script>
44 37
         <!-- Bootstrap -->
45 38
 		<script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap/bootstrap.min.js"></script>
46
-		{% block extra_foot %}{% endblock %}
47
-		<!-- Elastislide carousel js -->
48
-        <script src="{{ STATIC_URL }}js/elastislide/jquery.elastislide.js" type="text/javascript" charset="utf-8"></script>    
49
-
50
-        <!-- Responsive carousel js -->
51
-        {% if product %}
52
-        <script src="{{ STATIC_URL }}js/colorbox/jquery.colorbox-min.js" type="text/javascript" charset="utf-8"></script> 
53
-        <script src="{{ STATIC_URL }}js/responsivegallery/jquery.tmpl.min.js" type="text/javascript" charset="utf-8"></script>
54
-        <script src="{{ STATIC_URL }}js/responsivegallery/gallery.js" type="text/javascript" charset="utf-8"></script>
55
-        {% endif %}
56
-
39
+		
57 40
 		{# Block for additional scripts #}
58 41
 		{% block extrascripts %}{% endblock %}
59 42
 
60
-        <!-- Front end js -->
61
-        <script src="{{ STATIC_URL }}js/oscar/ui.js" type="text/javascript" charset="utf-8"></script>
62 43
         <script type="text/javascript">
63 44
 			$(function(){
64 45
 				{% block onbodyload %}

+ 0
- 55
oscar/templates/base_dashboard.html View File

@@ -1,55 +0,0 @@
1
-<!DOCTYPE html> 
2
-<html lang="{% block language %}en-gb{% endblock %}">
3
-    <head>
4
-        <title>{% block title %}Oscar :: Dashboard{% endblock %}</title>
5
-        <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
6
-        <meta name="created" content='{% now "jS M Y h:i" %}' />
7
-        <meta name="description" content="{% block description %}{% endblock %}" />
8
-        <meta name="keywords" content="{% block keywords %}{% endblock %}" />
9
-        
10
-        <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
11
-        <!--[if lt IE 9]>
12
-        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
13
-        <![endif]-->
14
-        
15
-        <!--[if lt IE 8]>
16
-        	<script src="{{ STATIC_URL }}js/snowcone/snowcone.js"></script>
17
-        <![endif]-->
18
-        
19
-        <link rel="shortcut icon" href="{{ STATIC_URL }}favicon.ico" />
20
-        <!-- Main styles - will need to be minified -->
21
-        <link rel="stylesheet" href="{{ STATIC_URL }}css/styles.css" />
22
-        <link rel="stylesheet" href="{{ STATIC_URL }}css/dashboard.css" />
23
-        {% block extrahead %}{% endblock %}
24
-    </head>
25
-    <body id="{% block body_id %}default{% endblock %}" class="{% block body_class %}default{% endblock %}">
26
-        {% block layout %}{% endblock %}
27
-		
28
-        {% block tracking %}
29
-            {% if not debug and not request.user.is_staff %}
30
-                <!-- Tracking to go here. -->
31
-            {% endif %}
32
-        {% endblock %}
33
-
34
-        <!-- Jquery -->
35
-        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
36
-        <script>window.jQuery || document.write('<script src="{{ STATIC_URL }}js/jquery/jquery-1.7.1.min.js"><\/script>')</script>
37
-        <script src="{{ STATIC_URL }}js/jquery/jquery.easing.1.3.js" type="text/javascript" charset="utf-8"></script>
38
-        <!-- Bootstrap -->
39
-		<script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap/bootstrap.min.js"></script>    
40
-        <!-- Front end js -->
41
-        <script src="{{ STATIC_URL }}js/oscar/dashboard.js" type="text/javascript" charset="utf-8"></script>
42
-
43
-		{# Block for additional scripts #}
44
-		{% block extrascripts %}{% endblock %}
45
-
46
-		{# Block to allow pages to define which js functions get loaded #}
47
-        <script type="text/javascript">
48
-			$(function(){
49
-				{% block onbodyload %}
50
-
51
-				{% endblock %}
52
-			});
53
-		</script>
54
-    </body>
55
-</html>

+ 9
- 0
oscar/templates/checkout/layout.html View File

@@ -4,6 +4,11 @@
4 4
 {% load promotion_tags %}
5 5
 {% load category_tags %}
6 6
 
7
+{% block extrahead %}
8
+    <!-- Responsive - will need to be minified -->
9
+    <link rel="stylesheet" href="{{ STATIC_URL }}css/responsive.css" />
10
+{% endblock %}
11
+
7 12
 {% block layout %}
8 13
     <div class="navbar accounts">
9 14
         <div class="navbar-inner">
@@ -106,4 +111,8 @@
106 111
         </div><!-- /page_inner -->
107 112
     </div>
108 113
     {% include "partials/footer.html" %}
114
+{% endblock %}
115
+
116
+{# Block for additional scripts #}
117
+{% block extrascripts %}
109 118
 {% endblock %}

+ 11
- 1
oscar/templates/dashboard/layout.html View File

@@ -1,9 +1,13 @@
1
-{% extends "base_dashboard.html" %}
1
+{% extends "base.html" %}
2 2
 
3 3
 {% load currency_filters %}
4 4
 {% load promotion_tags %}
5 5
 {% load category_tags %}
6 6
 
7
+{% block extrahead %}
8
+    <link rel="stylesheet" href="{{ STATIC_URL }}css/dashboard.css" />
9
+{% endblock %}
10
+
7 11
 {% block layout %}
8 12
     <div class="navbar accounts">
9 13
         <div class="navbar-inner">
@@ -52,3 +56,9 @@
52 56
         </div><!-- /row-fluid -->        
53 57
     </div><!-- /container -->       
54 58
 {% endblock %}
59
+
60
+{# Block for additional scripts #}
61
+{% block extrascripts %}
62
+    <!-- dashboard js -->
63
+    <script src="{{ STATIC_URL }}js/oscar/dashboard.js" type="text/javascript" charset="utf-8"></script>
64
+{% endblock %}

+ 24
- 0
oscar/templates/layout.html View File

@@ -4,6 +4,15 @@
4 4
 {% load promotion_tags %}
5 5
 {% load category_tags %}
6 6
 
7
+{% block extrahead %}
8
+    {% if product %}
9
+    <!-- Colorbox for image galleries -->
10
+    <link rel="stylesheet" href="{{ STATIC_URL }}js/colorbox/colorbox.css" type="text/css" media="screen" charset="utf-8"/>
11
+    {% endif %}
12
+    <!-- Responsive - will need to be minified -->
13
+    <link rel="stylesheet" href="{{ STATIC_URL }}css/responsive.css" />
14
+{% endblock %}
15
+
7 16
 {% block layout %}
8 17
     <div class="navbar accounts">
9 18
     	<div class="navbar-inner">
@@ -129,3 +138,18 @@
129 138
     </div><!-- /container-fluid -->
130 139
     {% include "partials/footer.html" %}
131 140
 {% endblock %}
141
+
142
+{# Block for additional scripts #}
143
+{% block extrascripts %}
144
+    <script src="{{ STATIC_URL }}js/scrollto/jquery.scrollTo-min.js" type="text/javascript" charset="utf-8"></script>
145
+    <!-- Elastislide carousel js -->
146
+    <script src="{{ STATIC_URL }}js/elastislide/jquery.elastislide.js" type="text/javascript" charset="utf-8"></script>    
147
+    <!-- Responsive gallery js -->
148
+    {% if product %}
149
+    <script src="{{ STATIC_URL }}js/colorbox/jquery.colorbox-min.js" type="text/javascript" charset="utf-8"></script> 
150
+    <script src="{{ STATIC_URL }}js/responsivegallery/jquery.tmpl.min.js" type="text/javascript" charset="utf-8"></script>
151
+    <script src="{{ STATIC_URL }}js/responsivegallery/gallery.js" type="text/javascript" charset="utf-8"></script>
152
+    {% endif %}
153
+    <!-- Front end js -->
154
+    <script src="{{ STATIC_URL }}js/oscar/ui.js" type="text/javascript" charset="utf-8"></script>
155
+{% endblock %}

Loading…
Cancel
Save