##// END OF EJS Templates
templates: remove ie hacks
marcink -
r3178:07ca10f8 default
parent child Browse files
Show More
@@ -1,160 +1,150 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html>
3 3
4 4 <%
5 5 c.template_context['repo_name'] = getattr(c, 'repo_name', '')
6 6 go_import_header = ''
7 7 if hasattr(c, 'rhodecode_db_repo'):
8 8 c.template_context['repo_type'] = c.rhodecode_db_repo.repo_type
9 9 c.template_context['repo_landing_commit'] = c.rhodecode_db_repo.landing_rev[1]
10 10
11 11 if getattr(c, 'repo_group', None):
12 12 c.template_context['repo_group_id'] = c.repo_group.group_id
13 13
14 14 if getattr(c, 'rhodecode_user', None) and c.rhodecode_user.user_id:
15 15 c.template_context['rhodecode_user']['username'] = c.rhodecode_user.username
16 16 c.template_context['rhodecode_user']['email'] = c.rhodecode_user.email
17 17 c.template_context['rhodecode_user']['notification_status'] = c.rhodecode_user.get_instance().user_data.get('notification_status', True)
18 18 c.template_context['rhodecode_user']['first_name'] = c.rhodecode_user.first_name
19 19 c.template_context['rhodecode_user']['last_name'] = c.rhodecode_user.last_name
20 20
21 21 c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default_renderer')
22 22 c.template_context['default_user'] = {
23 23 'username': h.DEFAULT_USER,
24 24 'user_id': 1
25 25 }
26 26
27 27 %>
28 28 <html xmlns="http://www.w3.org/1999/xhtml">
29 29 <head>
30 30
31 31 <script src="${h.asset('js/vendors/webcomponentsjs/custom-elements-es5-adapter.js', ver=c.rhodecode_version_hash)}"></script>
32 32 <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-bundle.js', ver=c.rhodecode_version_hash)}"></script>
33 33 <title>${self.title()}</title>
34 34 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
35 35
36 36 ${h.go_import_header(request, getattr(c, 'rhodecode_db_repo', None))}
37 37
38 38 % if 'safari' in (request.user_agent or '').lower():
39 39 <meta name="referrer" content="origin">
40 40 % else:
41 41 <meta name="referrer" content="origin-when-cross-origin">
42 42 % endif
43 43
44 44 <%def name="robots()">
45 45 <meta name="robots" content="index, nofollow"/>
46 46 </%def>
47 47 ${self.robots()}
48 48 <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" />
49 49
50 50 ## CSS definitions
51 51 <%def name="css()">
52 52 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
53 53 ## EXTRA FOR CSS
54 54 ${self.css_extra()}
55 55 </%def>
56 56 ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites
57 57 <%def name="css_extra()">
58 58 </%def>
59 59
60 60 ${self.css()}
61 61
62 62 ## JAVASCRIPT
63 63 <%def name="js()">
64 64
65 65 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
66 66 <script type="text/javascript">
67 67 // register templateContext to pass template variables to JS
68 68 var templateContext = ${h.json.dumps(c.template_context)|n};
69 69
70 70 var APPLICATION_URL = "${h.route_path('home').rstrip('/')}";
71 71 var APPLICATION_PLUGINS = [];
72 72 var ASSET_URL = "${h.asset('')}";
73 73 var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}";
74 74 var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}";
75 75
76 76 var APPENLIGHT = {
77 77 enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'},
78 78 key: '${getattr(c, "appenlight_api_public_key", "")}',
79 79 % if getattr(c, 'appenlight_server_url', None):
80 80 serverUrl: '${getattr(c, "appenlight_server_url", "")}',
81 81 % endif
82 82 requestInfo: {
83 83 % if getattr(c, 'rhodecode_user', None):
84 84 ip: '${c.rhodecode_user.ip_addr}',
85 85 username: '${c.rhodecode_user.username}'
86 86 % endif
87 87 },
88 88 tags: {
89 89 rhodecode_version: '${c.rhodecode_version}',
90 90 rhodecode_edition: '${c.rhodecode_edition}'
91 91 }
92 92 };
93 93
94 94 </script>
95 95 <%include file="/base/plugins_base.mako"/>
96 96 <!--[if lt IE 9]>
97 97 <script language="javascript" type="text/javascript" src="${h.asset('js/src/excanvas.min.js')}"></script>
98 98 <![endif]-->
99 99 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script>
100 100 <script> var alertMessagePayloads = ${h.flash.json_alerts(request=request)|n}; </script>
101 101 ## avoide escaping the %N
102 102 <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script>
103 103 <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script>
104 104
105 105
106 106 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
107 107 ${self.js_extra()}
108 108
109 109 <script type="text/javascript">
110 110 Rhodecode = (function() {
111 111 function _Rhodecode() {
112 112 this.comments = new CommentsController();
113 113 }
114 114 return new _Rhodecode();
115 115 })();
116 116
117 117 $(document).ready(function(){
118 118 show_more_event();
119 119 timeagoActivate();
120 120 clipboardActivate();
121 121 })
122 122 </script>
123 123
124 124 </%def>
125 125
126 126 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
127 127 <%def name="js_extra()"></%def>
128 128 ${self.js()}
129 129
130 130 <%def name="head_extra()"></%def>
131 131 ${self.head_extra()}
132 132 ## extra stuff
133 133 %if c.pre_code:
134 134 ${c.pre_code|n}
135 135 %endif
136 136 </head>
137 137 <body id="body">
138 138 <noscript>
139 139 <div class="noscript-error">
140 140 ${_('Please enable JavaScript to use RhodeCode Enterprise')}
141 141 </div>
142 142 </noscript>
143 ## IE hacks
144 <!--[if IE 7]>
145 <script>$(document.body).addClass('ie7')</script>
146 <![endif]-->
147 <!--[if IE 8]>
148 <script>$(document.body).addClass('ie8')</script>
149 <![endif]-->
150 <!--[if IE 9]>
151 <script>$(document.body).addClass('ie9')</script>
152 <![endif]-->
153 143
154 144 ${next.body()}
155 145 %if c.post_code:
156 146 ${c.post_code|n}
157 147 %endif
158 148 <rhodecode-app></rhodecode-app>
159 149 </body>
160 150 </html>
General Comments 0
You need to be logged in to leave comments. Login now