Integrated Murano into Gilbert.
[philo.git] / contrib / gilbert / templates / gilbert / index.html
1 {% load staticmedia %}<?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <head>{% block head %}
5         <title>{% block title %}{{ gilbert.title }}{% endblock %}</title>
6         
7         {% block css %}
8         <link rel="stylesheet" type="text/css" href="{% mediaurl 'gilbert/extjs/resources/css/ext-all-notheme.css' %}" />
9         <link rel="stylesheet" type="text/css" href="{% mediaurl 'gilbert/murano/murano.css' %}" />
10         <link rel="stylesheet" type="text/css" href="{% url gilbert:css %}" />
11         {% for plugin in gilbert.plugin_registry.values %}{% for css in plugin.css %}
12         <link rel="stylesheet" type="text/css" href="{{ css }}" />
13         {% endfor %}{% endfor %}
14         {% endblock %}
15         
16         {% block js %}
17         <script type="text/javascript" src="{% mediaurl 'gilbert/extjs/adapter/ext/ext-base.js' %}"></script>
18         <script type="text/javascript" src="{% mediaurl 'gilbert/extjs/ext-all.js' %}"></script>
19         <script type="text/javascript">
20                 Ext.BLANK_IMAGE_URL = '{% mediaurl "gilbert/extjs/resources/images/default/s.gif" %}';
21         </script>
22         <script type="text/javascript" src="{% mediaurl 'gilbert/Gilbert.lib.js' %}"></script>
23         <script type="text/javascript" src="{% url gilbert:api %}"></script>
24         <script type="text/javascript">
25                 GILBERT_LOGGED_IN = {% if logged_in %}true{% else %}false{% endif %};
26                 GILBERT_PLUGINS = [];
27         </script>
28         {% for plugin in gilbert.plugin_registry.values %}{% for js in plugin.js %}
29         <script type="text/javascript" src="{{ js }}"></script>
30         {% endfor %}{% endfor %}
31         <script type="text/javascript">
32                 Ext.onReady(function() {
33                         GILBERT_APPLICATION = new Gilbert.lib.Application({
34                                 user: '{% filter force_escape %}{% firstof user.get_full_name user.username %}{% endfilter %}',
35                                 plugins: [new (function() {
36                                         return {
37                                                 init: function(application) {
38                                                         var plugin = this;
39                                                         application.mainmenu.insert(0, {
40                                                                 xtype: 'button',
41                                                                 text: '<span style="font-weight: bolder; text-transform: uppercase;">Gilbert</span>',
42                                                                 handler: function(button, event) {
43                                                                         plugin.showAbout(button);
44                                                                 },
45                                                         });
46                                                         application.mainmenu.insert(1, {
47                                                                 xtype: 'tbseparator',
48                                                         });
49                                                 },
50                                                 showAbout: function(sender) {
51                                                         if (!this.about_window) {
52                                                                 var about_window = this.about_window = new Ext.Window({
53                                                                         height: 176,
54                                                                         width: 284,
55                                                                         header: false,
56                                                                         html: '<h1>{{ gilbert.title }}</h1><h2>Version {{ gilbert.version }}</h2>',
57                                                                         bodyStyle: 'background: none; font-size: larger; line-height: 1.4em; text-align: center;',
58                                                                         modal: true,
59                                                                         closeAction: 'hide',
60                                                                         renderTo: Ext.getBody(),
61                                                                         closable: false,
62                                                                         resizable: false,
63                                                                         draggable: false,
64                                                                         fbar: [{
65                                                                                 text: 'OK',
66                                                                                 handler: function(button, event) {
67                                                                                         about_window.hide();
68                                                                                 }
69                                                                         }],
70                                                                         defaultButton: 0,
71                                                                 });
72                                                         }
73                                                         this.about_window.render(Ext.getBody());
74                                                         this.about_window.center();
75                                                         this.about_window.show();
76                                                 },
77                                         }
78                                 })()].concat(GILBERT_PLUGINS),
79                         });
80                 });
81         </script>
82         {% endblock %}
83         
84 {% endblock %}</head>
85 <body style="background-image: url({% mediaurl 'gilbert/wallpaper.jpg' %});">{% block body %}{% endblock %}</body>
86 </html>