root.html
123 lines
| 5.6 KiB
| text/html
|
HtmlLexer
r1157 | ## -*- coding: utf-8 -*- | |||
r2163 | <!DOCTYPE html> | |||
r3950 | ||||
r1157 | <html xmlns="http://www.w3.org/1999/xhtml"> | |||
<head> | ||||
<title>${self.title()}</title> | ||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | ||||
<meta name="robots" content="index, nofollow"/> | ||||
r3954 | <link rel="icon" href="${h.url('/images/favicon.ico')}" type="image/png" /> | |||
r1421 | ||||
## CSS ### | ||||
<%def name="css()"> | ||||
r2850 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/> | |||
<link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/> | ||||
Leonardo
|
r3527 | <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.rhodecode_version)}"/> | ||
r1421 | ## EXTRA FOR CSS | |||
${self.css_extra()} | ||||
</%def> | ||||
r3950 | ||||
<%def name="css_extra()"></%def> | ||||
r1888 | ||||
r1157 | ${self.css()} | |||
r1888 | ||||
r1157 | %if c.ga_code: | |||
<!-- Analytics --> | ||||
Mads Kiilerich
|
r3198 | <script type="text/javascript"> | ||
var _gaq = _gaq || []; | ||||
_gaq.push(['_setAccount', '${c.ga_code}']); | ||||
_gaq.push(['_trackPageview']); | ||||
r1888 | ||||
Mads Kiilerich
|
r3198 | (function() { | ||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||||
})(); | ||||
</script> | ||||
Mads Kiilerich
|
r3197 | %endif | ||
r1888 | ||||
r1421 | ## JAVASCRIPT ## | |||
<%def name="js()"> | ||||
r2369 | <script type="text/javascript"> | |||
//JS translations map | ||||
var TRANSLATION_MAP = { | ||||
Mads Kiilerich
|
r3516 | 'Add another comment':'${_("Add another comment")}', | ||
r2369 | 'Stop following this repository':"${_('Stop following this repository')}", | |||
'Start following this repository':"${_('Start following this repository')}", | ||||
'Group':"${_('Group')}", | ||||
r2428 | 'members':"${_('members')}", | |||
Mads Kiilerich
|
r3516 | 'Loading ...':"${_('Loading ...')}", | ||
r3966 | 'loading ...':"${_('loading ...')}", | |||
Mads Kiilerich
|
r3516 | 'Search truncated': "${_('Search truncated')}", | ||
'No matching files': "${_('No matching files')}", | ||||
r2927 | 'Open new pull request': "${_('Open new pull request')}", | |||
'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}", | ||||
Mads Kiilerich
|
r3592 | 'Show selected changesets __S -> __E': "${_('Show selected changesets __S -> __E')}", | ||
'Show selected changeset __S': "${_('Show selected changeset __S')}", | ||||
r3001 | 'Selection link': "${_('Selection link')}", | |||
Mads Kiilerich
|
r3516 | 'Collapse diff': "${_('Collapse diff')}", | ||
r3714 | 'Expand diff': "${_('Expand diff')}", | |||
r3950 | 'Failed to revoke permission': "${_('Failed to revoke permission')}" | |||
r2369 | }; | |||
var _TM = TRANSLATION_MAP; | ||||
r3388 | ||||
r3066 | var TOGGLE_FOLLOW_URL = "${h.url('toggle_following')}"; | |||
r3246 | ||||
r3695 | var REPO_NAME = ""; | |||
%if hasattr(c, 'repo_name'): | ||||
var REPO_NAME = "${c.repo_name}"; | ||||
%endif | ||||
r2369 | </script> | |||
r2850 | <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script> | |||
r2141 | <!--[if lt IE 9]> | |||
r1421 | <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script> | |||
<![endif]--> | ||||
r2850 | <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script> | |||
<script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script> | ||||
r3388 | <script type="text/javascript" src="${h.url('/js/pyroutes_map.js', ver=c.rhodecode_version)}"></script> | |||
r2850 | <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script> | |||
r1421 | ## EXTRA FOR JS | |||
${self.js_extra()} | ||||
<script type="text/javascript"> | ||||
r2686 | (function(window,undefined){ | |||
// Prepare | ||||
var History = window.History; // Note: We are using a capital H instead of a lower h | ||||
if ( !History.enabled ) { | ||||
// History.js is disabled for this browser. | ||||
// This is because we can optionally choose to support HTML4 browsers or not. | ||||
return false; | ||||
} | ||||
})(window); | ||||
r3149 | ||||
r3066 | YUE.onDOMReady(function(){ | |||
tooltip_activate(); | ||||
show_more_event(); | ||||
show_changeset_tooltip(); | ||||
r3388 | // routes registration | |||
pyroutes.register('toggle_following', "${h.url('toggle_following')}"); | ||||
pyroutes.register('changeset_info', "${h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']); | ||||
r3394 | pyroutes.register('repo_size', "${h.url('repo_size', repo_name='%(repo_name)s')}", ['repo_name']); | |||
r3695 | pyroutes.register('changeset_comment_preview', "${h.url('changeset_comment_preview', repo_name='%(repo_name)s')}", ['repo_name']); | |||
r1888 | }) | |||
r1421 | </script> | |||
</%def> | ||||
r1700 | <%def name="js_extra()"></%def> | |||
r1157 | ${self.js()} | |||
r2413 | <%def name="head_extra()"></%def> | |||
${self.head_extra()} | ||||
r1157 | </head> | |||
<body id="body"> | ||||
r2163 | ## IE hacks | |||
<!--[if IE 7]> | ||||
<script>YUD.addClass(document.body,'ie7')</script> | ||||
r2174 | <![endif]--> | |||
r2163 | <!--[if IE 8]> | |||
<script>YUD.addClass(document.body,'ie8')</script> | ||||
<![endif]--> | ||||
<!--[if IE 9]> | ||||
<script>YUD.addClass(document.body,'ie9')</script> | ||||
r2174 | <![endif]--> | |||
r2163 | ||||
${next.body()} | ||||
r1157 | </body> | |||
r1888 | </html> | |||