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