##// END OF EJS Templates
polymer: introduce webcomponents to rhodecode
ergo -
r689:5d204bce default
parent child
Show More
@@ -0,0 +1,4
1 <link rel="import" href="../../../../../bower_components/paper-toggle-button/paper-toggle-button.html">
2 <link rel="import" href="../../../../../bower_components/paper-toast/paper-toast.html">
3 <link rel="import" href="../../../../../bower_components/paper-tooltip/paper-tooltip.html">
4 <link rel="import" href="../../../../../bower_components/paper-button/paper-button.html">
@@ -1,59 +1,60
1 syntax: glob
1 syntax: glob
2 *.egg
2 *.egg
3 *.egg-info
3 *.egg-info
4 *.idea
4 *.idea
5 *.orig
5 *.orig
6 *.pyc
6 *.pyc
7 *.sqlite-journal
7 *.sqlite-journal
8 *.swp
8 *.swp
9 *.tox
9 *.tox
10 *.DS_Store*
10 *.DS_Store*
11
11
12 syntax: regexp
12 syntax: regexp
13
13
14 #.filename
14 #.filename
15 ^\.settings$
15 ^\.settings$
16 ^\.project$
16 ^\.project$
17 ^\.pydevproject$
17 ^\.pydevproject$
18 ^\.coverage$
18 ^\.coverage$
19 ^\.cache.*$
19 ^\.cache.*$
20 ^\.rhodecode$
20 ^\.rhodecode$
21
21
22 ^rcextensions
22 ^rcextensions
23 ^_dev
23 ^_dev
24 ^._dev
24 ^._dev
25 ^build/
25 ^build/
26 ^bower_components/
26 ^coverage\.xml$
27 ^coverage\.xml$
27 ^data$
28 ^data$
28 ^\.eggs/
29 ^\.eggs/
29 ^configs/data$
30 ^configs/data$
30 ^dev.ini$
31 ^dev.ini$
31 ^acceptance_tests/dev.*\.ini$
32 ^acceptance_tests/dev.*\.ini$
32 ^dist/
33 ^dist/
33 ^fabfile.py
34 ^fabfile.py
34 ^htmlcov
35 ^htmlcov
35 ^junit\.xml$
36 ^junit\.xml$
36 ^node_modules/
37 ^node_modules/
37 ^pylint.log$
38 ^pylint.log$
38 ^rcextensions/
39 ^rcextensions/
39 ^result$
40 ^result$
40 ^rhodecode/public/css/style.css$
41 ^rhodecode/public/css/style.css$
41 ^rhodecode/public/js/scripts.js$
42 ^rhodecode/public/js/scripts.js$
42 ^rhodecode\.db$
43 ^rhodecode\.db$
43 ^rhodecode\.log$
44 ^rhodecode\.log$
44 ^rhodecode_dev\.log$
45 ^rhodecode_dev\.log$
45 ^test\.db$
46 ^test\.db$
46
47
47 # ac-tests
48 # ac-tests
48 ^acceptance_tests/\.cache.*$
49 ^acceptance_tests/\.cache.*$
49 ^acceptance_tests/externals
50 ^acceptance_tests/externals
50 ^acceptance_tests/ghostdriver.log$
51 ^acceptance_tests/ghostdriver.log$
51 ^acceptance_tests/local(_.+)?\.ini$
52 ^acceptance_tests/local(_.+)?\.ini$
52
53
53 # docs
54 # docs
54 ^docs/_build$
55 ^docs/_build$
55 ^docs/result$
56 ^docs/result$
56 ^docs-internal/_build$
57 ^docs-internal/_build$
57
58
58 # Cythonized things
59 # Cythonized things
59 ^rhodecode/.*\.(c|so)$
60 ^rhodecode/.*\.(c|so)$
@@ -1,144 +1,167
1 module.exports = function(grunt) {
1 module.exports = function(grunt) {
2 grunt.initConfig({
2 grunt.initConfig({
3
3
4 dirs: {
4 dirs: {
5 css: "rhodecode/public/css",
5 css: "rhodecode/public/css",
6 js: {
6 js: {
7 "src": "rhodecode/public/js/src",
7 "src": "rhodecode/public/js/src",
8 "dest": "rhodecode/public/js"
8 "dest": "rhodecode/public/js"
9 }
9 }
10 },
10 },
11
11 copy: {
12 main: {
13 expand: true,
14 cwd: 'bower_components',
15 src: 'webcomponentsjs/**',
16 dest: '<%= dirs.js.dest %>/vendors',
17 },
18 },
12 concat: {
19 concat: {
13 dist: {
20 dist: {
14 src: [
21 src: [
15 // Base libraries
22 // Base libraries
16 '<%= dirs.js.src %>/jquery-1.11.1.min.js',
23 '<%= dirs.js.src %>/jquery-1.11.1.min.js',
17 '<%= dirs.js.src %>/logging.js',
24 '<%= dirs.js.src %>/logging.js',
18 '<%= dirs.js.src %>/bootstrap.js',
25 '<%= dirs.js.src %>/bootstrap.js',
19 '<%= dirs.js.src %>/mousetrap.js',
26 '<%= dirs.js.src %>/mousetrap.js',
20 '<%= dirs.js.src %>/moment.js',
27 '<%= dirs.js.src %>/moment.js',
21 '<%= dirs.js.src %>/appenlight-client-0.4.1.min.js',
28 '<%= dirs.js.src %>/appenlight-client-0.4.1.min.js',
22 '<%= dirs.js.src %>/i18n_utils.js',
29 '<%= dirs.js.src %>/i18n_utils.js',
23 '<%= dirs.js.src %>/deform.js',
30 '<%= dirs.js.src %>/deform.js',
24
31
25 // Plugins
32 // Plugins
26 '<%= dirs.js.src %>/plugins/jquery.pjax.js',
33 '<%= dirs.js.src %>/plugins/jquery.pjax.js',
27 '<%= dirs.js.src %>/plugins/jquery.dataTables.js',
34 '<%= dirs.js.src %>/plugins/jquery.dataTables.js',
28 '<%= dirs.js.src %>/plugins/flavoured_checkbox.js',
35 '<%= dirs.js.src %>/plugins/flavoured_checkbox.js',
29 '<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js',
36 '<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js',
30 '<%= dirs.js.src %>/plugins/jquery.autocomplete.js',
37 '<%= dirs.js.src %>/plugins/jquery.autocomplete.js',
31 '<%= dirs.js.src %>/plugins/jquery.debounce.js',
38 '<%= dirs.js.src %>/plugins/jquery.debounce.js',
32 '<%= dirs.js.src %>/plugins/jquery.mark.js',
39 '<%= dirs.js.src %>/plugins/jquery.mark.js',
33 '<%= dirs.js.src %>/plugins/jquery.timeago.js',
40 '<%= dirs.js.src %>/plugins/jquery.timeago.js',
34 '<%= dirs.js.src %>/plugins/jquery.timeago-extension.js',
41 '<%= dirs.js.src %>/plugins/jquery.timeago-extension.js',
35 '<%= dirs.js.src %>/plugins/toastr.js',
42 '<%= dirs.js.src %>/plugins/toastr.js',
36
43
37 // Select2
44 // Select2
38 '<%= dirs.js.src %>/select2/select2.js',
45 '<%= dirs.js.src %>/select2/select2.js',
39
46
40 // Code-mirror
47 // Code-mirror
41 '<%= dirs.js.src %>/codemirror/codemirror.js',
48 '<%= dirs.js.src %>/codemirror/codemirror.js',
42 '<%= dirs.js.src %>/codemirror/codemirror_loadmode.js',
49 '<%= dirs.js.src %>/codemirror/codemirror_loadmode.js',
43 '<%= dirs.js.src %>/codemirror/codemirror_hint.js',
50 '<%= dirs.js.src %>/codemirror/codemirror_hint.js',
44 '<%= dirs.js.src %>/codemirror/codemirror_overlay.js',
51 '<%= dirs.js.src %>/codemirror/codemirror_overlay.js',
45 '<%= dirs.js.src %>/codemirror/codemirror_placeholder.js',
52 '<%= dirs.js.src %>/codemirror/codemirror_placeholder.js',
46 // TODO: mikhail: this is an exception. Since the code mirror modes
53 // TODO: mikhail: this is an exception. Since the code mirror modes
47 // are loaded "on the fly", we need to keep them in a public folder
54 // are loaded "on the fly", we need to keep them in a public folder
48 '<%= dirs.js.dest %>/mode/meta.js',
55 '<%= dirs.js.dest %>/mode/meta.js',
49 '<%= dirs.js.dest %>/mode/meta_ext.js',
56 '<%= dirs.js.dest %>/mode/meta_ext.js',
50 '<%= dirs.js.dest %>/rhodecode/i18n/select2/translations.js',
57 '<%= dirs.js.dest %>/rhodecode/i18n/select2/translations.js',
51
58
52 // Rhodecode utilities
59 // Rhodecode utilities
53 '<%= dirs.js.src %>/rhodecode/utils/array.js',
60 '<%= dirs.js.src %>/rhodecode/utils/array.js',
54 '<%= dirs.js.src %>/rhodecode/utils/string.js',
61 '<%= dirs.js.src %>/rhodecode/utils/string.js',
55 '<%= dirs.js.src %>/rhodecode/utils/pyroutes.js',
62 '<%= dirs.js.src %>/rhodecode/utils/pyroutes.js',
56 '<%= dirs.js.src %>/rhodecode/utils/ajax.js',
63 '<%= dirs.js.src %>/rhodecode/utils/ajax.js',
57 '<%= dirs.js.src %>/rhodecode/utils/autocomplete.js',
64 '<%= dirs.js.src %>/rhodecode/utils/autocomplete.js',
58 '<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js',
65 '<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js',
59 '<%= dirs.js.src %>/rhodecode/utils/ie.js',
66 '<%= dirs.js.src %>/rhodecode/utils/ie.js',
60 '<%= dirs.js.src %>/rhodecode/utils/os.js',
67 '<%= dirs.js.src %>/rhodecode/utils/os.js',
61 '<%= dirs.js.src %>/rhodecode/utils/topics.js',
68 '<%= dirs.js.src %>/rhodecode/utils/topics.js',
62
69
63 // Rhodecode widgets
70 // Rhodecode widgets
64 '<%= dirs.js.src %>/rhodecode/widgets/multiselect.js',
71 '<%= dirs.js.src %>/rhodecode/widgets/multiselect.js',
65
72
66 // Rhodecode components
73 // Rhodecode components
67 '<%= dirs.js.src %>/rhodecode/init.js',
74 '<%= dirs.js.src %>/rhodecode/init.js',
68 '<%= dirs.js.src %>/rhodecode/connection_controller.js',
75 '<%= dirs.js.src %>/rhodecode/connection_controller.js',
69 '<%= dirs.js.src %>/rhodecode/codemirror.js',
76 '<%= dirs.js.src %>/rhodecode/codemirror.js',
70 '<%= dirs.js.src %>/rhodecode/comments.js',
77 '<%= dirs.js.src %>/rhodecode/comments.js',
71 '<%= dirs.js.src %>/rhodecode/constants.js',
78 '<%= dirs.js.src %>/rhodecode/constants.js',
72 '<%= dirs.js.src %>/rhodecode/files.js',
79 '<%= dirs.js.src %>/rhodecode/files.js',
73 '<%= dirs.js.src %>/rhodecode/followers.js',
80 '<%= dirs.js.src %>/rhodecode/followers.js',
74 '<%= dirs.js.src %>/rhodecode/menus.js',
81 '<%= dirs.js.src %>/rhodecode/menus.js',
75 '<%= dirs.js.src %>/rhodecode/notifications.js',
82 '<%= dirs.js.src %>/rhodecode/notifications.js',
76 '<%= dirs.js.src %>/rhodecode/permissions.js',
83 '<%= dirs.js.src %>/rhodecode/permissions.js',
77 '<%= dirs.js.src %>/rhodecode/pjax.js',
84 '<%= dirs.js.src %>/rhodecode/pjax.js',
78 '<%= dirs.js.src %>/rhodecode/pullrequests.js',
85 '<%= dirs.js.src %>/rhodecode/pullrequests.js',
79 '<%= dirs.js.src %>/rhodecode/settings.js',
86 '<%= dirs.js.src %>/rhodecode/settings.js',
80 '<%= dirs.js.src %>/rhodecode/select2_widgets.js',
87 '<%= dirs.js.src %>/rhodecode/select2_widgets.js',
81 '<%= dirs.js.src %>/rhodecode/tooltips.js',
88 '<%= dirs.js.src %>/rhodecode/tooltips.js',
82 '<%= dirs.js.src %>/rhodecode/users.js',
89 '<%= dirs.js.src %>/rhodecode/users.js',
83 '<%= dirs.js.src %>/rhodecode/utils/notifications.js',
90 '<%= dirs.js.src %>/rhodecode/utils/notifications.js',
84 '<%= dirs.js.src %>/rhodecode/appenlight.js',
91 '<%= dirs.js.src %>/rhodecode/appenlight.js',
85
92
86 // Rhodecode main module
93 // Rhodecode main module
87 '<%= dirs.js.src %>/rhodecode.js'
94 '<%= dirs.js.src %>/rhodecode.js'
88 ],
95 ],
89 dest: '<%= dirs.js.dest %>/scripts.js',
96 dest: '<%= dirs.js.dest %>/scripts.js',
90 nonull: true
97 nonull: true
91 }
98 }
92 },
99 },
93
100
94 less: {
101 less: {
95 development: {
102 development: {
96 options: {
103 options: {
97 compress: false,
104 compress: false,
98 yuicompress: false,
105 yuicompress: false,
99 optimization: 0
106 optimization: 0
100 },
107 },
101 files: {
108 files: {
102 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
109 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
103 }
110 }
104 },
111 },
105 production: {
112 production: {
106 options: {
113 options: {
107 compress: true,
114 compress: true,
108 yuicompress: true,
115 yuicompress: true,
109 optimization: 2
116 optimization: 2
110 },
117 },
111 files: {
118 files: {
112 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
119 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
113 }
120 }
114 }
121 }
115 },
122 },
116
123
117 watch: {
124 watch: {
118 less: {
125 less: {
119 files: ["<%= dirs.css %>/*.less"],
126 files: ["<%= dirs.css %>/*.less"],
120 tasks: ["less:production"]
127 tasks: ["less:production"]
121 },
128 },
122 js: {
129 js: {
123 files: ["<%= dirs.js.src %>/**/*.js"],
130 files: ["<%= dirs.js.src %>/**/*.js", "<%= dirs.js.src %>/components/*.*"],
124 tasks: ["concat:dist"]
131 tasks: ["concat:dist"]
125 }
132 }
126 },
133 },
127
134
128 jshint: {
135 jshint: {
129 rhodecode: {
136 rhodecode: {
130 src: '<%= dirs.js.src %>/rhodecode/**/*.js',
137 src: '<%= dirs.js.src %>/rhodecode/**/*.js',
131 options: {
138 options: {
132 jshintrc: '.jshintrc'
139 jshintrc: '.jshintrc'
133 }
140 }
134 }
141 }
142 },
143 vulcanize: {
144 default: {
145 options: {
146 abspath: '',
147 inlineScripts: true,
148 inlineCss: true,
149 stripComments: true
150 },
151 files: {
152 '<%= dirs.js.dest %>/rhodecode-components.html': '<%= dirs.js.src %>/components/shared-components.html'
153 }
154 }
135 }
155 }
136 });
156 });
137
157
138 grunt.loadNpmTasks('grunt-contrib-less');
158 grunt.loadNpmTasks('grunt-contrib-less');
139 grunt.loadNpmTasks('grunt-contrib-concat');
159 grunt.loadNpmTasks('grunt-contrib-concat');
140 grunt.loadNpmTasks('grunt-contrib-watch');
160 grunt.loadNpmTasks('grunt-contrib-watch');
141 grunt.loadNpmTasks('grunt-contrib-jshint');
161 grunt.loadNpmTasks('grunt-contrib-jshint');
162 grunt.loadNpmTasks('grunt-vulcanize');
163 grunt.loadNpmTasks('grunt-crisper');
164 grunt.loadNpmTasks('grunt-contrib-copy');
142
165
143 grunt.registerTask('default', ['less:production', 'concat:dist']);
166 grunt.registerTask('default', ['copy','vulcanize', 'less:production', 'concat:dist']);
144 };
167 };
@@ -1,12 +1,17
1 {
1 {
2 "name": "rhodecode-enterprise",
2 "name": "rhodecode-enterprise",
3 "version": "0.0.1",
3 "version": "0.0.1",
4 "devDependencies": {
4 "devDependencies": {
5 "grunt": "^0.4.5",
5 "grunt": "^0.4.5",
6 "grunt-contrib-copy": "^1.0.0",
6 "grunt-contrib-concat": "^0.5.1",
7 "grunt-contrib-concat": "^0.5.1",
7 "grunt-contrib-jshint": "^0.12.0",
8 "grunt-contrib-jshint": "^0.12.0",
8 "grunt-contrib-less": "^1.1.0",
9 "grunt-contrib-less": "^1.1.0",
9 "grunt-contrib-watch": "^0.6.1",
10 "grunt-contrib-watch": "^0.6.1",
11 "crisper": "^2.0.2",
12 "vulcanize": "^1.14.8",
13 "grunt-crisper": "^1.0.1",
14 "grunt-vulcanize": "^1.0.0",
10 "jshint": "^2.9.1-rc3"
15 "jshint": "^2.9.1-rc3"
11 }
16 }
12 }
17 }
@@ -1,138 +1,157
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
6
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, 'rhodecode_user', None) and c.rhodecode_user.user_id:
11 if getattr(c, 'rhodecode_user', None) and c.rhodecode_user.user_id:
12 c.template_context['rhodecode_user']['username'] = c.rhodecode_user.username
12 c.template_context['rhodecode_user']['username'] = c.rhodecode_user.username
13 c.template_context['rhodecode_user']['email'] = c.rhodecode_user.email
13 c.template_context['rhodecode_user']['email'] = c.rhodecode_user.email
14 c.template_context['rhodecode_user']['notification_status'] = c.rhodecode_user.get_instance().user_data.get('notification_status', True)
14 c.template_context['rhodecode_user']['notification_status'] = c.rhodecode_user.get_instance().user_data.get('notification_status', True)
15
15
16 c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default_renderer')
16 c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default_renderer')
17 %>
17 %>
18 <html xmlns="http://www.w3.org/1999/xhtml">
18 <html xmlns="http://www.w3.org/1999/xhtml">
19 <head>
19 <head>
20 <title>${self.title()}</title>
20 <title>${self.title()}</title>
21 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
21 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
22 <%def name="robots()">
22 <%def name="robots()">
23 <meta name="robots" content="index, nofollow"/>
23 <meta name="robots" content="index, nofollow"/>
24 </%def>
24 </%def>
25 ${self.robots()}
25 ${self.robots()}
26 <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" />
26 <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" />
27
27
28 ## CSS definitions
28 ## CSS definitions
29 <%def name="css()">
29 <%def name="css()">
30 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
30 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
31 <!--[if lt IE 9]>
31 <!--[if lt IE 9]>
32 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css', ver=c.rhodecode_version_hash)}" media="screen"/>
32 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css', ver=c.rhodecode_version_hash)}" media="screen"/>
33 <![endif]-->
33 <![endif]-->
34 ## EXTRA FOR CSS
34 ## EXTRA FOR CSS
35 ${self.css_extra()}
35 ${self.css_extra()}
36 </%def>
36 </%def>
37 ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites
37 ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites
38 <%def name="css_extra()">
38 <%def name="css_extra()">
39 </%def>
39 </%def>
40
40
41 ${self.css()}
41 ${self.css()}
42
42
43 ## JAVASCRIPT
43 ## JAVASCRIPT
44 <%def name="js()">
44 <%def name="js()">
45 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
45 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
46 <script type="text/javascript">
46 <script type="text/javascript">
47 // register templateContext to pass template variables to JS
47 // register templateContext to pass template variables to JS
48 var templateContext = ${h.json.dumps(c.template_context)|n};
48 var templateContext = ${h.json.dumps(c.template_context)|n};
49
49
50 var REPO_NAME = "${getattr(c, 'repo_name', '')}";
50 var REPO_NAME = "${getattr(c, 'repo_name', '')}";
51 %if hasattr(c, 'rhodecode_db_repo'):
51 %if hasattr(c, 'rhodecode_db_repo'):
52 var REPO_LANDING_REV = '${c.rhodecode_db_repo.landing_rev[1]}';
52 var REPO_LANDING_REV = '${c.rhodecode_db_repo.landing_rev[1]}';
53 var REPO_TYPE = '${c.rhodecode_db_repo.repo_type}';
53 var REPO_TYPE = '${c.rhodecode_db_repo.repo_type}';
54 %else:
54 %else:
55 var REPO_LANDING_REV = '';
55 var REPO_LANDING_REV = '';
56 var REPO_TYPE = '';
56 var REPO_TYPE = '';
57 %endif
57 %endif
58 var APPLICATION_URL = "${h.url('home').rstrip('/')}";
58 var APPLICATION_URL = "${h.url('home').rstrip('/')}";
59 var ASSET_URL = "${h.asset('')}";
59 var ASSET_URL = "${h.asset('')}";
60 var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}";
60 var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}";
61 var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}";
61 var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}";
62 % if getattr(c, 'rhodecode_user', None):
62 % if getattr(c, 'rhodecode_user', None):
63 var USER = {name:'${c.rhodecode_user.username}'};
63 var USER = {name:'${c.rhodecode_user.username}'};
64 % else:
64 % else:
65 var USER = {name:null};
65 var USER = {name:null};
66 % endif
66 % endif
67
67
68 var APPENLIGHT = {
68 var APPENLIGHT = {
69 enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'},
69 enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'},
70 key: '${getattr(c, "appenlight_api_public_key", "")}',
70 key: '${getattr(c, "appenlight_api_public_key", "")}',
71 % if getattr(c, 'appenlight_server_url', None):
71 % if getattr(c, 'appenlight_server_url', None):
72 serverUrl: '${getattr(c, "appenlight_server_url", "")}',
72 serverUrl: '${getattr(c, "appenlight_server_url", "")}',
73 % endif
73 % endif
74 requestInfo: {
74 requestInfo: {
75 % if getattr(c, 'rhodecode_user', None):
75 % if getattr(c, 'rhodecode_user', None):
76 ip: '${c.rhodecode_user.ip_addr}',
76 ip: '${c.rhodecode_user.ip_addr}',
77 username: '${c.rhodecode_user.username}'
77 username: '${c.rhodecode_user.username}'
78 % endif
78 % endif
79 }
79 }
80 };
80 };
81 </script>
81 </script>
82 <!--[if lt IE 9]>
82 <!--[if lt IE 9]>
83 <script language="javascript" type="text/javascript" src="${h.asset('js/excanvas.min.js')}"></script>
83 <script language="javascript" type="text/javascript" src="${h.asset('js/excanvas.min.js')}"></script>
84 <![endif]-->
84 <![endif]-->
85 <script>
86 // setup Polymer options
87 window.Polymer = {lazyRegister: true, dom: 'shadow'};
88
89 // load webcomponents polyfills
90 (function() {
91 if ('registerElement' in document
92 && 'import' in document.createElement('link')
93 && 'content' in document.createElement('template')) {
94 // browser has web components
95 } else {
96 // polyfill web components
97 var e = document.createElement('script');
98 e.src = '${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.min.js', ver=c.rhodecode_version_hash)}';
99 document.head.appendChild(e);
100 }
101 })();
102 </script>
103 <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}">
85 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script>
104 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script>
86 <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script>
105 <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script>
87 ## avoide escaping the %N
106 ## avoide escaping the %N
88 <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script>
107 <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script>
89
108
90
109
91 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
110 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
92 ${self.js_extra()}
111 ${self.js_extra()}
93
112
94 <script type="text/javascript">
113 <script type="text/javascript">
95 $(document).ready(function(){
114 $(document).ready(function(){
96 show_more_event();
115 show_more_event();
97 timeagoActivate();
116 timeagoActivate();
98 })
117 })
99 </script>
118 </script>
100
119
101 </%def>
120 </%def>
102
121
103 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
122 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
104 <%def name="js_extra()"></%def>
123 <%def name="js_extra()"></%def>
105 ${self.js()}
124 ${self.js()}
106
125
107 <%def name="head_extra()"></%def>
126 <%def name="head_extra()"></%def>
108 ${self.head_extra()}
127 ${self.head_extra()}
109 <%include file="/base/plugins_base.html"/>
128 <%include file="/base/plugins_base.html"/>
110
129
111 ## extra stuff
130 ## extra stuff
112 %if c.pre_code:
131 %if c.pre_code:
113 ${c.pre_code|n}
132 ${c.pre_code|n}
114 %endif
133 %endif
115 </head>
134 </head>
116 <body id="body">
135 <body id="body">
117 <noscript>
136 <noscript>
118 <div class="noscript-error">
137 <div class="noscript-error">
119 ${_('Please enable JavaScript to use RhodeCode Enterprise')}
138 ${_('Please enable JavaScript to use RhodeCode Enterprise')}
120 </div>
139 </div>
121 </noscript>
140 </noscript>
122 ## IE hacks
141 ## IE hacks
123 <!--[if IE 7]>
142 <!--[if IE 7]>
124 <script>$(document.body).addClass('ie7')</script>
143 <script>$(document.body).addClass('ie7')</script>
125 <![endif]-->
144 <![endif]-->
126 <!--[if IE 8]>
145 <!--[if IE 8]>
127 <script>$(document.body).addClass('ie8')</script>
146 <script>$(document.body).addClass('ie8')</script>
128 <![endif]-->
147 <![endif]-->
129 <!--[if IE 9]>
148 <!--[if IE 9]>
130 <script>$(document.body).addClass('ie9')</script>
149 <script>$(document.body).addClass('ie9')</script>
131 <![endif]-->
150 <![endif]-->
132
151
133 ${next.body()}
152 ${next.body()}
134 %if c.post_code:
153 %if c.post_code:
135 ${c.post_code|n}
154 ${c.post_code|n}
136 %endif
155 %endif
137 </body>
156 </body>
138 </html>
157 </html>
General Comments 0
You need to be logged in to leave comments. Login now