summaryrefslogtreecommitdiff
path: root/lib/grappelli/templates/admin_tools/dashboard/dashboard.html
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2010-10-23 19:46:20 -0400
committerluxagraf <sng@luxagraf.net>2010-10-23 19:46:20 -0400
commitc59a2a69fb38b92b6c45bcf7431d2b1a3c5dce3c (patch)
tree2fc44ca867839d5e591e21467b6e4526f7a9f080 /lib/grappelli/templates/admin_tools/dashboard/dashboard.html
parented77da873e675f02f12cbab9be27f342f825444b (diff)
added grappelli, filebrowser, chunks and tagging to lcal repo
Diffstat (limited to 'lib/grappelli/templates/admin_tools/dashboard/dashboard.html')
-rw-r--r--lib/grappelli/templates/admin_tools/dashboard/dashboard.html79
1 files changed, 79 insertions, 0 deletions
diff --git a/lib/grappelli/templates/admin_tools/dashboard/dashboard.html b/lib/grappelli/templates/admin_tools/dashboard/dashboard.html
new file mode 100644
index 0000000..76aaa1e
--- /dev/null
+++ b/lib/grappelli/templates/admin_tools/dashboard/dashboard.html
@@ -0,0 +1,79 @@
+{% load i18n admin_tools_dashboard_tags %}
+
+<script type="text/javascript" src="{{ media_url }}/admin_tools/js/utils.js"></script>
+
+<script type="text/javascript" charset="utf-8">
+ // Load js files syncronously and conditionally
+
+ var js_files = [
+ {
+ src : '{{ media_url }}/admin_tools/js/jquery/jquery.min.js',
+ test: function() { return typeof(jQuery) == 'undefined'; }
+ },
+ {
+ src : '{{ media_url }}/admin_tools/js/jquery/jquery-ui.min.js',
+ test: function() { return typeof(jQuery.ui) == 'undefined'; }
+ },
+ {
+ src : '{{ media_url }}/admin_tools/js/json.min.js',
+ test: function() { return typeof(JSON.stringify) == 'undefined'; }
+ },
+ {
+ src : '{{ media_url }}/admin_tools/js/jquery/jquery.cookie.min.js',
+ test: function() { return typeof(jQuery.cookie) == 'undefined'; }
+ },
+ {
+ src : '{{ media_url }}/admin_tools/js/jquery/jquery.dashboard.js',
+ test: function() { return true; }
+ },
+ {
+ src : '{{ media_url }}/admin_tools/js/dashboard.js',
+ test: function() { return true; }
+ }{% for js in dashboard.Media.js %},
+ {
+ src : '{{ media_url }}/{{ js }}',
+ test: function() { return true; }
+ }{% endfor %}
+ ];
+
+ loadScripts(js_files, function(){
+ jQuery(function($) {
+ init_dashboard(
+ '{{ dashboard.get_id }}',
+ {{ dashboard.columns }},
+ {% autoescape off %}{{ dashboard_preferences }}{% endautoescape %},
+ '{% url admin-tools-dashboard-set-preferences %}'
+ );
+ });
+ });
+</script>
+
+{% if dashboard.Media.js %}
+ {% for js in dashboard.Media.js %}
+ <script type="text/javascript" src="{{ media_url }}/{{ js }}"></script>
+ {% endfor %}
+{% endif %}
+
+<div class="container-grid">
+ <div class="column span-12">
+ {% for module in dashboard.children %}
+ {% if "column_1" in module.css_classes %}
+ {% admin_tools_render_dashboard_module module forloop.counter %}
+ {% endif %}
+ {% endfor %}
+ </div>
+ <div class="column span-6">
+ {% for module in dashboard.children %}
+ {% if "column_2" in module.css_classes %}
+ {% admin_tools_render_dashboard_module module forloop.counter %}
+ {% endif %}
+ {% endfor %}
+ </div>
+ <div class="column span-6 last">
+ {% for module in dashboard.children %}
+ {% if "column_3" in module.css_classes %}
+ {% admin_tools_render_dashboard_module module forloop.counter %}
+ {% endif %}
+ {% endfor %}
+ </div>
+</div>