Fixes to make this work on not-data.gov.uk
[ckanext-ga-report.git] / ckanext / ga_report / templates / ga_report / site / layout_base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--[if IE 8 ]>    <html class="no-js ie8" lang="en"> <![endif]-->
  <!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:i18n="http://genshi.edgewall.org/i18n"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      > <!--<![endif]-->
<xi:include href="../../_util.html" />
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
 
  <title>${page_title()} - ${g.site_title}</title>
  <meta name="description" content="" />
  <meta name="author" content="" />
 
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="shortcut icon" href="${h.url_for_static(g.favicon)}" />
 
  <py:choose>
  <py:when test="defined('optional_feed')">
    ${optional_feed()}
  </py:when>
  <py:otherwise>
  <link rel="alternate" type="application/atom+xml" title="${g.site_title} - Recent Revision History" href="${h.url_for(controller='revision', action='list', format='atom', days=1)}" />
  </py:otherwise>
  </py:choose>
  <link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet' type='text/css' />
 
  <link rel="stylesheet" href="${h.url_for_static('/scripts/vendor/jqueryui/1.8.14/css/jquery-ui.custom.css')}" type="text/css" media="screen, print" />
  <link rel="stylesheet" href="${h.url_for_static('/css/bootstrap.min.css')}" type="text/css" media="screen, projection" />
  <link rel="stylesheet" href="${h.url_for_static('/css/chosen.css')}" type="text/css" />
  <link rel="stylesheet" href="${h.url_for_static('/css/style.css?v=2')}" />
  ${jsConditionalForIe(9, '&lt;script type="text/javascript" src="' + h.url_for_static('/scripts/vendor/html5shiv/html5.js') + '"&gt;&lt;/script&gt;')}
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/scripts/vendor/rickshaw.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/ga_report.css?1"/>
    <script type="text/javascript" src="/scripts/modernizr-2.6.2.custom.js"></script>
    <script type="text/javascript" src="/scripts/vendor/jquery.sparkline.modified.js"></script>
    <script type="text/javascript" src="/scripts/ckanext_ga_reports.js?1"></script>
    <script type="text/javascript" src="/scripts/rickshaw_ie7_shim.js"></script>
    <script type="text/javascript" src="/scripts/vendor/d3.v2.js"></script>
    <script type="text/javascript" src="/scripts/vendor/d3.layout.min.js"></script>
    <script type="text/javascript" src="/scripts/vendor/rickshaw.min.js"></script>
<style>
#pre-content #breadcrumbs {
    padding-left: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 0;
    list-style-type: none;
    color: #ccc
}
 
#pre-content #breadcrumbs li {
    color: #999;
    display: inline-block;
    zoom: 1;
    *display: inline;
    margin-right: 8px
}
 
#pre-content #breadcrumbs li:after {
    content: '/';
    display: inline-block;
    zoom: 1;
    *display: inline;
    margin-left: 12px
}
 
#pre-content #breadcrumbs li:last-child:after {
    display: none
}
 
#pre-content #breadcrumbs a {
    color: #999
}
 
#pre-content #breadcrumbs a:hover {
    color: #000;
    text-decoration: none
}
 
#pre-content #breadcrumbs .spacer {
    color: #ccc
}
</style>
  <py:if test="defined('optional_head')">
    ${optional_head()}
  </py:if>
 
  ${h.literal(getattr(g, 'template_head_end', ''))}
</head>
 
<body class="${request.environ.get('pylons.routes_dict', {}).get('action')}
             ${request.environ.get('pylons.routes_dict', {}).get('controller').split(':')[-1]}
             ${defined('body_class') and body_class()}
  ">
 
  <div id="wrap">
    <div class="header outer">
      <header class="container">
        <div class="menu account">
          <span class="ckan-logged-in" style="display: none;">
            <a href="${h.url_for(controller='user',action='me')}">${h.gravatar((c.userobj.email_hash if c and c.userobj else ''),size=20)}${c.user}</a>
            <a href="${h.url_for('/user/_logout')}">Logout</a>
          </span>
          <span class="ckan-logged-out">
            <a href="${h.url_for(controller='user',action='login')}">Login</a>
            <a href="${h.url_for(controller='user',action='register')}">Register</a>
          </span>
        </div>
        <a href="${h.url('home')}">
          <img width="64" src="${h.url_for_static(g.site_logo)}" alt="${g.site_title} Logo" title="${g.site_title} Logo" id="logo" />
        </a>
        <div id="site-name">
<!--          <a href="${h.url('home')}">${g.site_title} &mdash; ${g.site_description}</a>-->
        </div>
        <div class="menu">
<!--          <span id="menusearch">
            <form action="${h.url(controller='package', action='search')}" method="GET">
              <input name="q" value="${c.q if hasattr(c, 'q') else ''}" class="search" placeholder="${_('Find datasets')}" />
            </form>
          </span>
          <div id="mainmenu">
            <span py:if="h.check_access('package_create')">${h.nav_link(_('Add a dataset'), controller='package', action='new')}</span>
            ${h.nav_link(_('Search'), controller='package', action='search', highlight_actions = 'new index')}
            ${h.nav_link(_('Groups'), named_route='%s_index' % h.default_group_type())}
            ${h.nav_link(_('About'), controller='home', action='about')}
          </div>-->
        </div>
      </header>
    </div>
 <div id="pre-content">
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <ul id="breadcrumbs">
            <li><a href="/"><i class="icon-home"></i></a></li>
            <breadcrumbs>
            </breadcrumbs>
          </ul>
        </div>
      </div>
    </div>
  </div>
 
    <py:with vars="messages = list(h.flash.pop_messages())">
    <div class="flash-messages container">
      <div class="alert ${m.category}" py:for="m in messages">
        ${h.literal(m)}
      </div>
    </div>
    </py:with>
 
    <div id="main" class="container" role="main">
      <h1 py:if="defined('page_heading')" class="page_heading">
        <img py:if="defined('page_logo')" id="page-logo" src="${page_logo()}" alt="Page Logo" />
<!--        ${page_heading()} -->
      </h1>
      <div class="row">
        <div class="span12">
          <div id="minornavigation">
              <minornavigation></minornavigation>
          </div>
        </div>
      </div>
 
      <div class="row">
        <div class="span9 content-outer">
          <div id="content">
            <py:if test="defined('content')">
              ${content()}
            </py:if>
            <content>
              <p>Master content template placeholder &hellip; please replace me.</p>
            </content>
          </div> <!-- /content -->
        </div>
        <div class="span3 sidebar-outer">
          <div id="sidebar">
      <div class="col-md-4">
        <div class="whitebox">
          <strong>Graph Legend</strong>
          <div id="graph-legend-container">
            <div style="display: none;" id="legend_none">(No graph is loaded)</div>
          </div>
        </div>
      </div>
 
            <ul class="widget-list">
              <py:if test="defined('primary_sidebar_extras')">
                ${primary_sidebar_extras()}
              </py:if>
              <primarysidebar>
                <!-- Primary Side Bar Goes Here -->
              </primarysidebar>
            </ul>
          </div>
        </div>
      </div>
    </div>
    <br/><br/>
  </div>
  <div class="clearfix"></div>
  <div class="footer outer">
    <footer class="container">
      <div class="row">
<!--        <div class="span3">
          <h3 class="widget-title">About ${g.site_title}</h3>
          <div class="textwidget">
            <ul>
                <li>${h.link_to(_('About'), h.url_for(controller='home', action='about'))}</li>
              <li>
                <a href="http://twitter.com/ckanproject">Twitter @ckanproject</a>
              </li>
                <li>${h.link_to(_('API'), h.url_for(controller='api', action='get_api', ver=1))}</li>
                <li>${h.link_to(_('API Docs'), 'http://docs.ckan.org/en/latest/api.html')}</li>
              <li>
                <a href="http://ckan.org/contact/">Contact Us</a>
              </li>
              <li>
                <a href="http://okfn.org/privacy-policy/">Privacy Policy</a>
              </li>
            </ul>
          </div>
        </div>
        <div class="span3">
          <h3 class="widget-title">Sections</h3>
          <div class="textwidget">
            <ul>
              <li>
                <a href="${h.url(controller='user', action='index')}">
                  Users
                </a>
              </li>
              <li>
                <a href="${h.url(controller='tag', action='index')}">
                  Tags
                </a>
              </li>
              <li py:if="'stats' in config.get('ckan.plugins','').split(' ')">
                <a href="${h.url('stats')}">
                  Statistics
                </a>
              </li>
              <li>
                <a href="${h.url(controller='revision', action='index')}">
                  Revisions
                </a>
              </li>
              <li>
                <a href="${h.url_for('ckanadmin_index')}">
                  Site Admin
                </a>
              </li>
            </ul>
          </div>
        </div>
        <div class="span3">
          <h3 class="widget-title">Languages</h3>
          <div class="textwidget">
            <ul>
<?python
  current_url = request.environ['CKAN_CURRENT_URL']
?>
              <li py:for="locale in h.get_available_locales()">
              <a href="${h.url(current_url, locale=str(locale))}">
                  ${locale.display_name or locale.english_name}
                </a>
              </li>
            </ul>
          </div>
        </div>-->
        <div class="span12">
          <p id="credits">
            &copy; 2012-2014
            <img src="//assets.okfn.org/images/logo/okf_logo_white_and_green_tiny.png" id="footer-okf-logo" />
            <a href="http://okfn.org/">Open Knowledge Foundation</a>
            Licensed under the <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open Database License</a>
            <a href="http://opendefinition.org/"><img alt="This Content and Data is Open" src="//assets.okfn.org/images/ok_buttons/od_80x15_blue.png" style="border: none;"/></a>
 
            <br/><br/>
            Powered by <a href="http://ckan.org">CKAN</a> v${c.__version__}.<br/>
          </p>
        </div>
      </div>
    </footer>
  </div> <!-- eo #container -->
  
  <div style="display:none;" id="scripts">
  <!--<script src="${h.url_for_static('/scripts/vendor/jquery/1.7.1/jquery.js')}"></script>-->
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/json2.js')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/jquery.tmpl/beta1/jquery.tmpl.js')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/jquery.cookie/jquery.cookie.min.js')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/jquery.chosen/0.9.7/chosen.js')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/jquery.placeholder/jquery.placeholder.js')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/jqueryui/1.8.14/jquery-ui.min.js')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/bootstrap/2.0.3/bootstrap.min.js')}"></script>
 
  <!-- for application.js -->
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/underscore/1.1.6/underscore.js')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/backbone/0.5.1/backbone.js')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/jquery.fileupload/20110801/jquery.iframe-transport.js')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/vendor/jquery.fileupload/20110801/jquery.fileupload.js')}"></script>
 
  <!-- Translated js strings live inside an html template. -->
  <xi:include href="../../js_strings.html" />
  <!-- finally our application js that sets everything up-->
  <script type="text/javascript" src="${h.url_for_static('/scripts/application.js?lang=${c.locale}')}"></script>
  <script type="text/javascript" src="${h.url_for_static('/scripts/templates.js')}"></script>
 
  <script type="text/javascript">
    CKAN.plugins = [
      // Declare js array from Python string
      ${['\'%s\', '%s  for s in config.get('ckan.plugins','').split(' ')]}
    ];
    <py:if test="config.get('ckan.storage.bucket', '')">
    CKAN.plugins.push('storage');
    </py:if>
    CKAN.SITE_URL = '${h.url('/')}';
    CKAN.SITE_URL_NO_LOCALE = '${h.url('/', locale='default')}';
    CKAN.LANG = '${h.lang()}';
    // later use will add offsets with leading '/' so ensure no trailing slash
    CKAN.SITE_URL = CKAN.SITE_URL.replace(/\/$/, '');
    CKAN.SITE_URL_NO_LOCALE = CKAN.SITE_URL_NO_LOCALE.replace(/\/$/, '');
    $(document).ready(function() {
        var ckan_user = '${c.user}';
        if (ckan_user) {
            $(".ckan-logged-out").hide();
            $(".ckan-logged-in").show();
        }
        $('input[placeholder], textarea[placeholder]').placeholder();
 
                $(".chzn-select").chosen();
    });
  </script>
 
  <py:if test="h.asbool(config.get('ckan.tracking_enabled', 'false'))">
        ${ h.snippet('snippets/internal-tracking.html') }
  </py:if>
  </div> <!-- #scripts -->
 
  <py:if test="defined('optional_footer')">
    ${optional_footer()}
  </py:if>
 
${h.literal(getattr(g, 'template_footer_end', ''))}
</body>
</html>