Modifications to base.html to support graphs - from mtuity
[plstackapi.git] / planetstack / templates / admin / base.html
1 {% load admin_static %}{% load suit_tags %}{% load url from future %}<!DOCTYPE html>
2 <html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
3 <head>
4   <title>{% block title %}  {%if title %} {{ title }} | {% endif %} {{ 'ADMIN_NAME'|suit_conf }}{% endblock %}</title>
5   <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% endblock %}"/>
6   <link rel="stylesheet" type="text/css" href="{% static 'suit/bootstrap/css/bootstrap.min.css' %}" media="all"/>
7   <link rel="stylesheet" type="text/css" href="{% static 'suit/css/suit.css' %}" media="all">
8   <link rel="stylesheet" type="text/css" href="{% static 'planetstack.css' %}" media="all">
9   {% block extrastyle %}{% endblock %}
10   {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}"/>{% endif %}
11   <script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}";</script>
12   <script src="{% static 'suit/js/jquery-1.8.3.min.js' %}"></script>
13   <script type="text/javascript">var Suit = { $: $.noConflict() }; if (!$) $ = Suit.$; </script>
14   {% if 'SHOW_REQUIRED_ASTERISK'|suit_conf %}
15   <style type="text/css">.required:after { content: '*'; margin: 0 0 0 5px; position: absolute; color: #ccc;}</style>
16   {% endif %}
17   {% block extrahead %}{% endblock %}
18   {% block blockbots %}
19     <meta name="robots" content="NONE,NOARCHIVE"/>{% endblock %}
20   <link rel="shortcut icon" href="{% static 'favicon.png' %}">
21 </head>
22 {% load i18n %}
23
24 <body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
25
26 <!-- Sticky footer wrap -->
27 <div id="wrap">
28
29   <!-- Container -->
30   {% block container %}
31     <div id="container">
32
33       {% block header %}
34         {% if not is_popup %}
35           <!-- Header -->
36           <div id="header" class="header">
37             
38             <div id="branding">
39               <table width="100%">
40                 <tr>
41                   <td width="70%">
42              <!-- <a href="{% url 'admin:index' %}"><h1 id="site-name">{% block branding %}{{ 'ADMIN_NAME'|suit_conf }}{% endblock %}</h1></a>-->
43              <a href="{% url 'admin:index' %}"><h1 id="site-name"><img src="{% static 'open-cloud-themed.png' %}"/></h1></a>
44              </td>
45               <td width="30%">
46                   {% block quick-search %}
47                 {% with 'SEARCH_URL'|suit_conf as search_url %}
48                   {% if search_url %}
49                     <form class="form-search nav-quick-search" autocomplete="off" action="{% if '/' in search_url %}{{ search_url }}{% else %}{% url search_url %}{% endif %}" method="GET">
50                       <i class="input-icon icon-search"></i>
51                       <input type="text" name="q" class="input-medium search-query" id="quick-search">
52                       <input type="submit" class="submit" value="">
53                     </form>
54                   {% endif %}
55                 {% endwith %}
56               {% endblock %}
57                  </td>
58                </tr>
59              </table>
60             </div>
61           
62             {% block header_time %}
63             <div id="branding2">
64             <!--<div class="header-content header-content-first">
65               <div class="header-column icon">
66                 <i class="icon-time"></i>
67               </div>
68               <div class="header-column">
69                 <span class="date"> {% suit_date %}</span><br>
70                 <span class="time" id="clock">{% suit_time %}</span>
71               </div>
72             </div>-->
73           
74             {% endblock %}
75
76             {% block header_content %}
77               <!--<div class="header-content">
78                 <div class="header-column icon">
79                   <i class="icon-comment"></i>
80                 </div>
81                 <div class="header-column">
82                   <a href="" class="grey"><b>2</b> new messages</a>
83                 </div>
84               </div>-->
85             {% endblock %}
86
87             {% if user.is_active and user.is_staff %}
88               <div id="user-tools">
89                 {% trans 'Welcome,' %}
90                 <strong>
91                   {% filter force_escape %}
92                     {% firstof user.first_name user.username %}{% endfilter %}</strong>.
93                 <span class="user-links">
94                 {% block userlinks %}
95                   {% url 'django-admindocs-docroot' as docsroot %}
96                   {% if docsroot %}
97                     <a href="{{ docsroot }}">{% trans 'Documentation' %}</a>
98                    <span class="separator">|</span>
99                   {% endif %}
100                   <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a>
101                   <span class="separator">|</span>
102                   <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
103                   </span>
104                 {% endblock %}
105               </div>
106             {% endif %}
107
108             {% block nav-global %}{% endblock %}
109
110           </div>
111            </div>
112         {% endif %}
113         <!-- END Header -->
114       {% endblock %}
115
116
117       <div class="suit-columns {{ is_popup|yesno:'one-column,two-columns' }}">
118
119         {% block content-center %}
120           <div id="suit-center" class="suit-column">
121
122             {% if not is_popup %}
123               {% block breadcrumbs %}
124                 <ul class="breadcrumb"> 
125                   <li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
126                     {% if title %}
127                       <span class="divider">&raquo;</span>
128                       </li>
129                       <li class="active">
130                       {{ title }}
131                     {% endif %}
132                     </li>
133                 </ul>
134               {% endblock %}
135                 <div class="hide">{{ app_label|capfirst|escape }}</div>
136                 <div class="hide selectedMainNav">{{ opts.verbose_name_plural|capfirst }}</div>
137                 <div class="hide currentOriginalNode">{{ original|truncatewords:"18" }}</div>  
138                   
139
140                <label class="nodetextbox nodesLabel" style="display: none;" > </label>
141               <label class="nodelabel nodesValue" style="display: none;" ></label>
142                 <span class="nodesCnt hide"></span>
143               <label class="nodetextbox cpuLabel" style="display: none;" ></label>
144               <label class="nodelabel cpuValue" style="display: none;" ></label>
145                 <span class="cpuCnt hide"></span>
146             <label class="nodetextbox bandwidthLabel" style="display: none;" ></label>    
147               <label class="nodelabel bandwidthValue" style="width:60px;display: none;"></label>
148                 <span class="bandUsage hide"></span>
149             {% endif %}
150
151             {% block messages %}
152               {% if messages %}
153
154                 {% for message in messages %}
155                   <div class="alert alert-{% firstof message.tags 'info' %}">
156                     <button class="close" data-dismiss="alert">×</button>
157                     <strong>
158                       {% if message.tags %}{{ message.tags|capfirst }}{% else %}
159                         Message{% endif %}!</strong>
160                     {{ message }}
161                   </div>
162                 {% endfor %}
163               {% endif %}
164             {% endblock messages %}
165
166             <!-- Content -->
167             <div id="content" class="{% block coltype %}colM{% endblock %} row-fluid">
168               {% block pretitle %}{% endblock %}
169               {% block content_title %}{% if title %}
170                 <h2 class="content-title">{{ title }}</h2>
171               {% endif %}{% endblock %}
172               {% block content %}
173                 {% block object-tools %}{% endblock %}
174                 {{ content }}
175               {% endblock %}
176               {% block sidebar_content %}
177                 {% block sidebar %}{% endblock %}
178               {% endblock %}
179             </div>
180             <!-- END Content -->
181           </div>
182         {% endblock %}
183
184
185         {% block content-left %}
186           {% if not is_popup %}
187             <div id="suit-left" class="suit-column">
188          
189
190               {% include 'suit/menu.html' %}
191
192             </div>
193           {% endif %}
194         {% endblock %}
195
196       </div>
197     </div>
198   {% endblock %}
199
200   {% if not is_popup %}
201   <!-- Sticky footer push -->
202   <div id="push"></div>
203   {% endif %}
204
205 </div>
206
207 {% block footer %}
208   {% if not is_popup %}
209   <div id="footer" class="footer">
210     <div class="content">
211       <div class="tools">
212         {% block footer_links %}
213           <a href="http://djangosuit.com/support/" target="_blank" class="icon"><i class="icon-question-sign"></i>Support</a>
214           <a href="http://djangosuit.com/pricing/" target="_blank" class="icon"><i class="icon-bookmark"></i>Licence</a>
215           <a href="http://github.com/darklow/django-suit/issues" target="_blank" class="icon"><i class="icon-comment"></i>Report a bug</a>
216         {% endblock %}
217       </div>
218
219       <div class="copyright">
220         {% block copyright %}
221           Copyright &copy; 2013 DjangoSuit.com<br>Developed by <a href="http://djangosuit.com" target="_blank">DjangoSuit.com</a>
222         {% endblock %}
223       </div>
224
225       <div class="branding">{% block footer_branding %}
226         {% with 'ADMIN_NAME'|suit_conf as admin_name %}
227           {{ admin_name }}
228           {% if admin_name == 'Django Suit' %}
229             v{{ 'VERSION'|suit_conf }}
230           {% endif %}
231         {% endwith %}
232       {% endblock %}</div>
233     </div>
234   </div>
235   {% endif %}
236 {% endblock %}
237
238   <script src="{% static 'suit/bootstrap/js/bootstrap.min.js' %}"></script>
239   <script src="{% static 'suit/js/suit.js' %}"></script>
240   <script src="{% static 'main.js' %}"></script>
241   {% block extrajs %}{% endblock %}
242 <script src="http://d3js.org/d3.v3.js"></script>
243
244         <div class="modal fade hide" id="chartsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
245           <div class="modal-dialog">
246             <div class="modal-content">
247               <!--<div class="modal-header">
248                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
249                 <h4 class="modal-title" id="myModalLabel">OpenCloud</h4>
250               </div>-->
251               <div class="modal-body">
252                 <div class="chartContainer">
253                         <div class="row">
254                                 <div class=" padding">
255                                 </div>
256                         </div>
257
258                         <div class="row">
259                                 <div class=" heading">
260                                         <p id="chartHeading" class="heading">OpenCloud</p>      
261                                 </div>
262                         </div>
263                         <div class="row">
264                                 <div class="padding"></div>
265                                 <div class="padding"></div>
266                         </div>
267                         <div class="row">
268                                 <div id="graph" class="graph">
269                                 </div>
270                         </div>
271                 </div>
272               </div>
273               <!--<div class="modal-footer">
274                 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
275               </div>-->
276             </div><!-- /.modal-content -->
277           </div><!-- /.modal-dialog -->
278         </div><!-- /.modal -->
279
280
281 <script>
282
283
284
285
286 </script>
287 </body>
288 </html>