Show More
@@ -1,15 +1,15 b'' | |||||
1 | var gruntConfig = require('./grunt_config.json'); |
|
1 | var gruntConfig = require('./grunt_config.json'); | |
2 |
|
2 | |||
3 | module.exports = function(grunt) { |
|
3 | module.exports = function(grunt) { | |
4 | grunt.initConfig(gruntConfig); |
|
4 | grunt.initConfig(gruntConfig); | |
5 |
|
5 | |||
6 | grunt.loadNpmTasks('grunt-contrib-less'); |
|
6 | grunt.loadNpmTasks('grunt-contrib-less'); | |
7 | grunt.loadNpmTasks('grunt-contrib-concat'); |
|
7 | grunt.loadNpmTasks('grunt-contrib-concat'); | |
8 | grunt.loadNpmTasks('grunt-contrib-watch'); |
|
8 | grunt.loadNpmTasks('grunt-contrib-watch'); | |
9 | grunt.loadNpmTasks('grunt-contrib-jshint'); |
|
9 | grunt.loadNpmTasks('grunt-contrib-jshint'); | |
10 | grunt.loadNpmTasks('grunt-vulcanize'); |
|
10 | grunt.loadNpmTasks('grunt-vulcanize'); | |
11 | grunt.loadNpmTasks('grunt-crisper'); |
|
11 | grunt.loadNpmTasks('grunt-crisper'); | |
12 | grunt.loadNpmTasks('grunt-contrib-copy'); |
|
12 | grunt.loadNpmTasks('grunt-contrib-copy'); | |
13 |
|
13 | |||
14 |
grunt.registerTask('default', ['less:production', 'less:components', 'concat:polymercss', 'copy', 'concat:dist', 'vulcanize' |
|
14 | grunt.registerTask('default', ['less:production', 'less:components', 'concat:polymercss', 'copy', 'concat:dist', 'vulcanize']); | |
15 | }; |
|
15 | }; |
@@ -1,200 +1,200 b'' | |||||
1 | { |
|
1 | { | |
2 | "dirs": { |
|
2 | "dirs": { | |
3 | "css": { |
|
3 | "css": { | |
4 | "src":"rhodecode/public/css", |
|
4 | "src":"rhodecode/public/css", | |
5 | "dest":"rhodecode/public/css" |
|
5 | "dest":"rhodecode/public/css" | |
6 | }, |
|
6 | }, | |
7 | "js": { |
|
7 | "js": { | |
8 | "src": "rhodecode/public/js/src", |
|
8 | "src": "rhodecode/public/js/src", | |
9 | "src_rc": "rhodecode/public/js/rhodecode", |
|
9 | "src_rc": "rhodecode/public/js/rhodecode", | |
10 | "dest": "rhodecode/public/js", |
|
10 | "dest": "rhodecode/public/js", | |
11 | "bower": "bower_components", |
|
11 | "bower": "bower_components", | |
12 | "node_modules": "node_modules" |
|
12 | "node_modules": "node_modules" | |
13 | } |
|
13 | } | |
14 | }, |
|
14 | }, | |
15 | "copy": { |
|
15 | "copy": { | |
16 | "main": { |
|
16 | "main": { | |
17 | "expand": true, |
|
17 | "expand": true, | |
18 | "cwd": "bower_components", |
|
18 | "cwd": "bower_components", | |
19 |
"src": "webcomponentsjs/webcomponents |
|
19 | "src": "webcomponentsjs/webcomponents*.*", | |
20 | "dest": "<%= dirs.js.dest %>/vendors" |
|
20 | "dest": "<%= dirs.js.dest %>/vendors" | |
21 | } |
|
21 | } | |
22 | }, |
|
22 | }, | |
23 | "concat": { |
|
23 | "concat": { | |
24 | "polymercss": { |
|
24 | "polymercss": { | |
25 | "src": [ |
|
25 | "src": [ | |
26 | "<%= dirs.js.src %>/components/root-styles-prefix.html", |
|
26 | "<%= dirs.js.src %>/components/root-styles-prefix.html", | |
27 | "<%= dirs.css.src %>/style-polymer.css", |
|
27 | "<%= dirs.css.src %>/style-polymer.css", | |
28 | "<%= dirs.js.src %>/components/root-styles-suffix.html" |
|
28 | "<%= dirs.js.src %>/components/root-styles-suffix.html" | |
29 | ], |
|
29 | ], | |
30 | "dest": "<%= dirs.js.dest %>/src/components/root-styles.gen.html", |
|
30 | "dest": "<%= dirs.js.dest %>/src/components/root-styles.gen.html", | |
31 | "nonull": true |
|
31 | "nonull": true | |
32 | }, |
|
32 | }, | |
33 | "dist": { |
|
33 | "dist": { | |
34 | "src": [ |
|
34 | "src": [ | |
35 | "<%= dirs.js.node_modules %>/jquery/dist/jquery.min.js", |
|
35 | "<%= dirs.js.node_modules %>/jquery/dist/jquery.min.js", | |
36 | "<%= dirs.js.node_modules %>/mousetrap/mousetrap.min.js", |
|
36 | "<%= dirs.js.node_modules %>/mousetrap/mousetrap.min.js", | |
37 | "<%= dirs.js.node_modules %>/moment/min/moment.min.js", |
|
37 | "<%= dirs.js.node_modules %>/moment/min/moment.min.js", | |
38 | "<%= dirs.js.node_modules %>/clipboard/dist/clipboard.min.js", |
|
38 | "<%= dirs.js.node_modules %>/clipboard/dist/clipboard.min.js", | |
39 | "<%= dirs.js.node_modules %>/favico.js/favico-0.3.10.min.js", |
|
39 | "<%= dirs.js.node_modules %>/favico.js/favico-0.3.10.min.js", | |
40 | "<%= dirs.js.node_modules %>/sticky-sidebar/dist/sticky-sidebar.min.js", |
|
40 | "<%= dirs.js.node_modules %>/sticky-sidebar/dist/sticky-sidebar.min.js", | |
41 | "<%= dirs.js.node_modules %>/sticky-sidebar/dist/jquery.sticky-sidebar.min.js", |
|
41 | "<%= dirs.js.node_modules %>/sticky-sidebar/dist/jquery.sticky-sidebar.min.js", | |
42 | "<%= dirs.js.node_modules %>/waypoints/lib/noframework.waypoints.min.js", |
|
42 | "<%= dirs.js.node_modules %>/waypoints/lib/noframework.waypoints.min.js", | |
43 | "<%= dirs.js.node_modules %>/waypoints/lib/jquery.waypoints.min.js", |
|
43 | "<%= dirs.js.node_modules %>/waypoints/lib/jquery.waypoints.min.js", | |
44 | "<%= dirs.js.node_modules %>/appenlight-client/appenlight-client.min.js", |
|
44 | "<%= dirs.js.node_modules %>/appenlight-client/appenlight-client.min.js", | |
45 | "<%= dirs.js.src %>/logging.js", |
|
45 | "<%= dirs.js.src %>/logging.js", | |
46 | "<%= dirs.js.src %>/bootstrap.js", |
|
46 | "<%= dirs.js.src %>/bootstrap.js", | |
47 | "<%= dirs.js.src %>/i18n_utils.js", |
|
47 | "<%= dirs.js.src %>/i18n_utils.js", | |
48 | "<%= dirs.js.src %>/deform.js", |
|
48 | "<%= dirs.js.src %>/deform.js", | |
49 | "<%= dirs.js.src %>/ejs.js", |
|
49 | "<%= dirs.js.src %>/ejs.js", | |
50 | "<%= dirs.js.src %>/ejs_templates/utils.js", |
|
50 | "<%= dirs.js.src %>/ejs_templates/utils.js", | |
51 | "<%= dirs.js.src %>/plugins/jquery.pjax.js", |
|
51 | "<%= dirs.js.src %>/plugins/jquery.pjax.js", | |
52 | "<%= dirs.js.src %>/plugins/jquery.dataTables.js", |
|
52 | "<%= dirs.js.src %>/plugins/jquery.dataTables.js", | |
53 | "<%= dirs.js.src %>/plugins/flavoured_checkbox.js", |
|
53 | "<%= dirs.js.src %>/plugins/flavoured_checkbox.js", | |
54 | "<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js", |
|
54 | "<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js", | |
55 | "<%= dirs.js.src %>/plugins/jquery.autocomplete.js", |
|
55 | "<%= dirs.js.src %>/plugins/jquery.autocomplete.js", | |
56 | "<%= dirs.js.src %>/plugins/jquery.debounce.js", |
|
56 | "<%= dirs.js.src %>/plugins/jquery.debounce.js", | |
57 | "<%= dirs.js.src %>/plugins/jquery.mark.js", |
|
57 | "<%= dirs.js.src %>/plugins/jquery.mark.js", | |
58 | "<%= dirs.js.src %>/plugins/jquery.timeago.js", |
|
58 | "<%= dirs.js.src %>/plugins/jquery.timeago.js", | |
59 | "<%= dirs.js.src %>/plugins/jquery.timeago-extension.js", |
|
59 | "<%= dirs.js.src %>/plugins/jquery.timeago-extension.js", | |
60 | "<%= dirs.js.src %>/select2/select2.js", |
|
60 | "<%= dirs.js.src %>/select2/select2.js", | |
61 | "<%= dirs.js.src %>/codemirror/codemirror.js", |
|
61 | "<%= dirs.js.src %>/codemirror/codemirror.js", | |
62 | "<%= dirs.js.src %>/codemirror/codemirror_loadmode.js", |
|
62 | "<%= dirs.js.src %>/codemirror/codemirror_loadmode.js", | |
63 | "<%= dirs.js.src %>/codemirror/codemirror_hint.js", |
|
63 | "<%= dirs.js.src %>/codemirror/codemirror_hint.js", | |
64 | "<%= dirs.js.src %>/codemirror/codemirror_overlay.js", |
|
64 | "<%= dirs.js.src %>/codemirror/codemirror_overlay.js", | |
65 | "<%= dirs.js.src %>/codemirror/codemirror_placeholder.js", |
|
65 | "<%= dirs.js.src %>/codemirror/codemirror_placeholder.js", | |
66 | "<%= dirs.js.src %>/codemirror/codemirror_simplemode.js", |
|
66 | "<%= dirs.js.src %>/codemirror/codemirror_simplemode.js", | |
67 | "<%= dirs.js.dest %>/mode/meta.js", |
|
67 | "<%= dirs.js.dest %>/mode/meta.js", | |
68 | "<%= dirs.js.dest %>/mode/meta_ext.js", |
|
68 | "<%= dirs.js.dest %>/mode/meta_ext.js", | |
69 | "<%= dirs.js.src_rc %>/i18n/select2/translations.js", |
|
69 | "<%= dirs.js.src_rc %>/i18n/select2/translations.js", | |
70 | "<%= dirs.js.src %>/rhodecode/utils/array.js", |
|
70 | "<%= dirs.js.src %>/rhodecode/utils/array.js", | |
71 | "<%= dirs.js.src %>/rhodecode/utils/string.js", |
|
71 | "<%= dirs.js.src %>/rhodecode/utils/string.js", | |
72 | "<%= dirs.js.src %>/rhodecode/utils/pyroutes.js", |
|
72 | "<%= dirs.js.src %>/rhodecode/utils/pyroutes.js", | |
73 | "<%= dirs.js.src %>/rhodecode/utils/ajax.js", |
|
73 | "<%= dirs.js.src %>/rhodecode/utils/ajax.js", | |
74 | "<%= dirs.js.src %>/rhodecode/utils/autocomplete.js", |
|
74 | "<%= dirs.js.src %>/rhodecode/utils/autocomplete.js", | |
75 | "<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js", |
|
75 | "<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js", | |
76 | "<%= dirs.js.src %>/rhodecode/utils/ie.js", |
|
76 | "<%= dirs.js.src %>/rhodecode/utils/ie.js", | |
77 | "<%= dirs.js.src %>/rhodecode/utils/os.js", |
|
77 | "<%= dirs.js.src %>/rhodecode/utils/os.js", | |
78 | "<%= dirs.js.src %>/rhodecode/utils/topics.js", |
|
78 | "<%= dirs.js.src %>/rhodecode/utils/topics.js", | |
79 | "<%= dirs.js.src %>/rhodecode/init.js", |
|
79 | "<%= dirs.js.src %>/rhodecode/init.js", | |
80 | "<%= dirs.js.src %>/rhodecode/changelog.js", |
|
80 | "<%= dirs.js.src %>/rhodecode/changelog.js", | |
81 | "<%= dirs.js.src %>/rhodecode/codemirror.js", |
|
81 | "<%= dirs.js.src %>/rhodecode/codemirror.js", | |
82 | "<%= dirs.js.src %>/rhodecode/comments.js", |
|
82 | "<%= dirs.js.src %>/rhodecode/comments.js", | |
83 | "<%= dirs.js.src %>/rhodecode/constants.js", |
|
83 | "<%= dirs.js.src %>/rhodecode/constants.js", | |
84 | "<%= dirs.js.src %>/rhodecode/files.js", |
|
84 | "<%= dirs.js.src %>/rhodecode/files.js", | |
85 | "<%= dirs.js.src %>/rhodecode/followers.js", |
|
85 | "<%= dirs.js.src %>/rhodecode/followers.js", | |
86 | "<%= dirs.js.src %>/rhodecode/menus.js", |
|
86 | "<%= dirs.js.src %>/rhodecode/menus.js", | |
87 | "<%= dirs.js.src %>/rhodecode/notifications.js", |
|
87 | "<%= dirs.js.src %>/rhodecode/notifications.js", | |
88 | "<%= dirs.js.src %>/rhodecode/permissions.js", |
|
88 | "<%= dirs.js.src %>/rhodecode/permissions.js", | |
89 | "<%= dirs.js.src %>/rhodecode/pjax.js", |
|
89 | "<%= dirs.js.src %>/rhodecode/pjax.js", | |
90 | "<%= dirs.js.src %>/rhodecode/pullrequests.js", |
|
90 | "<%= dirs.js.src %>/rhodecode/pullrequests.js", | |
91 | "<%= dirs.js.src %>/rhodecode/settings.js", |
|
91 | "<%= dirs.js.src %>/rhodecode/settings.js", | |
92 | "<%= dirs.js.src %>/rhodecode/select2_widgets.js", |
|
92 | "<%= dirs.js.src %>/rhodecode/select2_widgets.js", | |
93 | "<%= dirs.js.src %>/rhodecode/tooltips.js", |
|
93 | "<%= dirs.js.src %>/rhodecode/tooltips.js", | |
94 | "<%= dirs.js.src %>/rhodecode/users.js", |
|
94 | "<%= dirs.js.src %>/rhodecode/users.js", | |
95 | "<%= dirs.js.src %>/rhodecode/appenlight.js", |
|
95 | "<%= dirs.js.src %>/rhodecode/appenlight.js", | |
96 | "<%= dirs.js.src %>/rhodecode.js" |
|
96 | "<%= dirs.js.src %>/rhodecode.js" | |
97 | ], |
|
97 | ], | |
98 | "dest": "<%= dirs.js.dest %>/scripts.js", |
|
98 | "dest": "<%= dirs.js.dest %>/scripts.js", | |
99 | "nonull": true |
|
99 | "nonull": true | |
100 | } |
|
100 | } | |
101 | }, |
|
101 | }, | |
102 | "crisper": { |
|
102 | "crisper": { | |
103 | "dist": { |
|
103 | "dist": { | |
104 | "options": { |
|
104 | "options": { | |
105 | "cleanup": false, |
|
105 | "cleanup": false, | |
106 | "onlySplit": true |
|
106 | "onlySplit": true | |
107 | }, |
|
107 | }, | |
108 | "src": "<%= dirs.js.dest %>/rhodecode-components.html", |
|
108 | "src": "<%= dirs.js.dest %>/rhodecode-components.html", | |
109 | "dest": "<%= dirs.js.dest %>/rhodecode-components.js" |
|
109 | "dest": "<%= dirs.js.dest %>/rhodecode-components.js" | |
110 | } |
|
110 | } | |
111 | }, |
|
111 | }, | |
112 | "less": { |
|
112 | "less": { | |
113 | "development": { |
|
113 | "development": { | |
114 | "options": { |
|
114 | "options": { | |
115 | "compress": false, |
|
115 | "compress": false, | |
116 | "yuicompress": false, |
|
116 | "yuicompress": false, | |
117 | "optimization": 0 |
|
117 | "optimization": 0 | |
118 | }, |
|
118 | }, | |
119 | "files": { |
|
119 | "files": { | |
120 | "<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less", |
|
120 | "<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less", | |
121 | "<%= dirs.css.dest %>/style-polymer.css": "<%= dirs.css.src %>/polymer.less" |
|
121 | "<%= dirs.css.dest %>/style-polymer.css": "<%= dirs.css.src %>/polymer.less" | |
122 | } |
|
122 | } | |
123 | }, |
|
123 | }, | |
124 | "production": { |
|
124 | "production": { | |
125 | "options": { |
|
125 | "options": { | |
126 | "compress": true, |
|
126 | "compress": true, | |
127 | "yuicompress": true, |
|
127 | "yuicompress": true, | |
128 | "optimization": 2 |
|
128 | "optimization": 2 | |
129 | }, |
|
129 | }, | |
130 | "files": { |
|
130 | "files": { | |
131 | "<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less", |
|
131 | "<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less", | |
132 | "<%= dirs.css.dest %>/style-polymer.css": "<%= dirs.css.src %>/polymer.less" |
|
132 | "<%= dirs.css.dest %>/style-polymer.css": "<%= dirs.css.src %>/polymer.less" | |
133 | } |
|
133 | } | |
134 | }, |
|
134 | }, | |
135 | "components": { |
|
135 | "components": { | |
136 | "files": [ |
|
136 | "files": [ | |
137 | { |
|
137 | { | |
138 | "cwd": "<%= dirs.js.src %>/components/", |
|
138 | "cwd": "<%= dirs.js.src %>/components/", | |
139 | "dest": "<%= dirs.js.src %>/components/", |
|
139 | "dest": "<%= dirs.js.src %>/components/", | |
140 | "src": [ |
|
140 | "src": [ | |
141 | "**/*.less" |
|
141 | "**/*.less" | |
142 | ], |
|
142 | ], | |
143 | "expand": true, |
|
143 | "expand": true, | |
144 | "ext": ".css" |
|
144 | "ext": ".css" | |
145 | } |
|
145 | } | |
146 | ] |
|
146 | ] | |
147 | } |
|
147 | } | |
148 | }, |
|
148 | }, | |
149 | "watch": { |
|
149 | "watch": { | |
150 | "less": { |
|
150 | "less": { | |
151 | "files": [ |
|
151 | "files": [ | |
152 | "<%= dirs.css.src %>/**/*.less", |
|
152 | "<%= dirs.css.src %>/**/*.less", | |
153 | "<%= dirs.js.src %>/components/**/*.less" |
|
153 | "<%= dirs.js.src %>/components/**/*.less" | |
154 | ], |
|
154 | ], | |
155 | "tasks": [ |
|
155 | "tasks": [ | |
156 | "less:development", |
|
156 | "less:development", | |
157 | "less:components", |
|
157 | "less:components", | |
158 | "concat:polymercss", |
|
158 | "concat:polymercss", | |
159 | "vulcanize", |
|
159 | "vulcanize", | |
160 | "crisper", |
|
160 | "crisper", | |
161 | "concat:dist" |
|
161 | "concat:dist" | |
162 | ] |
|
162 | ] | |
163 | }, |
|
163 | }, | |
164 | "js": { |
|
164 | "js": { | |
165 | "files": [ |
|
165 | "files": [ | |
166 | "!<%= dirs.js.src %>/components/root-styles.gen.html", |
|
166 | "!<%= dirs.js.src %>/components/root-styles.gen.html", | |
167 | "<%= dirs.js.src %>/**/*.js", |
|
167 | "<%= dirs.js.src %>/**/*.js", | |
168 | "<%= dirs.js.src %>/components/**/*.html" |
|
168 | "<%= dirs.js.src %>/components/**/*.html" | |
169 | ], |
|
169 | ], | |
170 | "tasks": [ |
|
170 | "tasks": [ | |
171 | "less:components", |
|
171 | "less:components", | |
172 | "concat:polymercss", |
|
172 | "concat:polymercss", | |
173 | "vulcanize", |
|
173 | "vulcanize", | |
174 | "crisper", |
|
174 | "crisper", | |
175 | "concat:dist" |
|
175 | "concat:dist" | |
176 | ] |
|
176 | ] | |
177 | } |
|
177 | } | |
178 | }, |
|
178 | }, | |
179 | "jshint": { |
|
179 | "jshint": { | |
180 | "rhodecode": { |
|
180 | "rhodecode": { | |
181 | "src": "<%= dirs.js.src %>/rhodecode/**/*.js", |
|
181 | "src": "<%= dirs.js.src %>/rhodecode/**/*.js", | |
182 | "options": { |
|
182 | "options": { | |
183 | "jshintrc": ".jshintrc" |
|
183 | "jshintrc": ".jshintrc" | |
184 | } |
|
184 | } | |
185 | } |
|
185 | } | |
186 | }, |
|
186 | }, | |
187 | "vulcanize": { |
|
187 | "vulcanize": { | |
188 | "default": { |
|
188 | "default": { | |
189 | "options": { |
|
189 | "options": { | |
190 | "abspath": "", |
|
190 | "abspath": "", | |
191 | "inlineScripts": true, |
|
191 | "inlineScripts": true, | |
192 | "inlineCss": true, |
|
192 | "inlineCss": true, | |
193 | "stripComments": true |
|
193 | "stripComments": true | |
194 | }, |
|
194 | }, | |
195 | "files": { |
|
195 | "files": { | |
196 | "<%= dirs.js.dest %>/rhodecode-components.html": "<%= dirs.js.src %>/components/shared-components.html" |
|
196 | "<%= dirs.js.dest %>/rhodecode-components.html": "<%= dirs.js.src %>/components/shared-components.html" | |
197 | } |
|
197 | } | |
198 | } |
|
198 | } | |
199 | } |
|
199 | } | |
200 | } |
|
200 | } |
@@ -1,9 +1,8 b'' | |||||
1 | <!-- required for stamped out templates that might use common elements --> |
|
1 | <!-- required for stamped out templates that might use common elements --> | |
2 | <link rel="import" href="rhodecode-legacy-js/rhodecode-legacy-js.html"> |
|
|||
3 | <link rel="import" href="../../../../../bower_components/iron-ajax/iron-ajax.html"> |
|
2 | <link rel="import" href="../../../../../bower_components/iron-ajax/iron-ajax.html"> | |
4 | <link rel="import" href="shared-styles.html"> |
|
3 | <link rel="import" href="shared-styles.html"> | |
5 | <link rel="import" href="channelstream-connection/channelstream-connection.html"> |
|
4 | <link rel="import" href="channelstream-connection/channelstream-connection.html"> | |
6 | <link rel="import" href="rhodecode-toast/rhodecode-toast.html"> |
|
5 | <link rel="import" href="rhodecode-toast/rhodecode-toast.html"> | |
7 | <link rel="import" href="rhodecode-toggle/rhodecode-toggle.html"> |
|
6 | <link rel="import" href="rhodecode-toggle/rhodecode-toggle.html"> | |
8 | <link rel="import" href="rhodecode-unsafe-html/rhodecode-unsafe-html.html"> |
|
7 | <link rel="import" href="rhodecode-unsafe-html/rhodecode-unsafe-html.html"> | |
9 | <link rel="import" href="rhodecode-app/rhodecode-app.html"> |
|
8 | <link rel="import" href="rhodecode-app/rhodecode-app.html"> |
@@ -1,162 +1,162 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 | <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.js', ver=c.rhodecode_version_hash)}"></script> |
|
30 | <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.js', ver=c.rhodecode_version_hash)}"></script> | |
31 | <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}"> |
|
|||
32 | <title>${self.title()}</title> |
|
31 | <title>${self.title()}</title> | |
33 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
32 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
34 |
|
33 | |||
35 | ${h.go_import_header(request, getattr(c, 'rhodecode_db_repo', None))} |
|
34 | ${h.go_import_header(request, getattr(c, 'rhodecode_db_repo', None))} | |
36 |
|
35 | |||
37 | % if 'safari' in (request.user_agent or '').lower(): |
|
36 | % if 'safari' in (request.user_agent or '').lower(): | |
38 | <meta name="referrer" content="origin"> |
|
37 | <meta name="referrer" content="origin"> | |
39 | % else: |
|
38 | % else: | |
40 | <meta name="referrer" content="origin-when-cross-origin"> |
|
39 | <meta name="referrer" content="origin-when-cross-origin"> | |
41 | % endif |
|
40 | % endif | |
42 |
|
41 | |||
43 | <%def name="robots()"> |
|
42 | <%def name="robots()"> | |
44 | <meta name="robots" content="index, nofollow"/> |
|
43 | <meta name="robots" content="index, nofollow"/> | |
45 | </%def> |
|
44 | </%def> | |
46 | ${self.robots()} |
|
45 | ${self.robots()} | |
47 | <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" /> |
|
46 | <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" /> | |
48 |
|
47 | |||
49 | ## CSS definitions |
|
48 | ## CSS definitions | |
50 | <%def name="css()"> |
|
49 | <%def name="css()"> | |
51 | <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/> |
|
50 | <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/> | |
52 | <!--[if lt IE 9]> |
|
51 | <!--[if lt IE 9]> | |
53 | <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css', ver=c.rhodecode_version_hash)}" media="screen"/> |
|
52 | <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css', ver=c.rhodecode_version_hash)}" media="screen"/> | |
54 | <![endif]--> |
|
53 | <![endif]--> | |
55 | ## EXTRA FOR CSS |
|
54 | ## EXTRA FOR CSS | |
56 | ${self.css_extra()} |
|
55 | ${self.css_extra()} | |
57 | </%def> |
|
56 | </%def> | |
58 | ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites |
|
57 | ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites | |
59 | <%def name="css_extra()"> |
|
58 | <%def name="css_extra()"> | |
60 | </%def> |
|
59 | </%def> | |
61 |
|
60 | |||
62 | ${self.css()} |
|
61 | ${self.css()} | |
63 |
|
62 | |||
64 | ## JAVASCRIPT |
|
63 | ## JAVASCRIPT | |
65 | <%def name="js()"> |
|
64 | <%def name="js()"> | |
66 |
|
65 | |||
67 | <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script> |
|
66 | <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script> | |
68 | <script type="text/javascript"> |
|
67 | <script type="text/javascript"> | |
69 | // register templateContext to pass template variables to JS |
|
68 | // register templateContext to pass template variables to JS | |
70 | var templateContext = ${h.json.dumps(c.template_context)|n}; |
|
69 | var templateContext = ${h.json.dumps(c.template_context)|n}; | |
71 |
|
70 | |||
72 | var APPLICATION_URL = "${h.route_path('home').rstrip('/')}"; |
|
71 | var APPLICATION_URL = "${h.route_path('home').rstrip('/')}"; | |
73 | var APPLICATION_PLUGINS = []; |
|
72 | var APPLICATION_PLUGINS = []; | |
74 | var ASSET_URL = "${h.asset('')}"; |
|
73 | var ASSET_URL = "${h.asset('')}"; | |
75 | var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}"; |
|
74 | var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}"; | |
76 | var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}"; |
|
75 | var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}"; | |
77 |
|
76 | |||
78 | var APPENLIGHT = { |
|
77 | var APPENLIGHT = { | |
79 | enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'}, |
|
78 | enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'}, | |
80 | key: '${getattr(c, "appenlight_api_public_key", "")}', |
|
79 | key: '${getattr(c, "appenlight_api_public_key", "")}', | |
81 | % if getattr(c, 'appenlight_server_url', None): |
|
80 | % if getattr(c, 'appenlight_server_url', None): | |
82 | serverUrl: '${getattr(c, "appenlight_server_url", "")}', |
|
81 | serverUrl: '${getattr(c, "appenlight_server_url", "")}', | |
83 | % endif |
|
82 | % endif | |
84 | requestInfo: { |
|
83 | requestInfo: { | |
85 | % if getattr(c, 'rhodecode_user', None): |
|
84 | % if getattr(c, 'rhodecode_user', None): | |
86 | ip: '${c.rhodecode_user.ip_addr}', |
|
85 | ip: '${c.rhodecode_user.ip_addr}', | |
87 | username: '${c.rhodecode_user.username}' |
|
86 | username: '${c.rhodecode_user.username}' | |
88 | % endif |
|
87 | % endif | |
89 | }, |
|
88 | }, | |
90 | tags: { |
|
89 | tags: { | |
91 | rhodecode_version: '${c.rhodecode_version}', |
|
90 | rhodecode_version: '${c.rhodecode_version}', | |
92 | rhodecode_edition: '${c.rhodecode_edition}' |
|
91 | rhodecode_edition: '${c.rhodecode_edition}' | |
93 | } |
|
92 | } | |
94 | }; |
|
93 | }; | |
95 |
|
94 | |||
96 | </script> |
|
95 | </script> | |
97 | <%include file="/base/plugins_base.mako"/> |
|
96 | <%include file="/base/plugins_base.mako"/> | |
98 | <!--[if lt IE 9]> |
|
97 | <!--[if lt IE 9]> | |
99 | <script language="javascript" type="text/javascript" src="${h.asset('js/src/excanvas.min.js')}"></script> |
|
98 | <script language="javascript" type="text/javascript" src="${h.asset('js/src/excanvas.min.js')}"></script> | |
100 | <![endif]--> |
|
99 | <![endif]--> | |
101 | <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script> |
|
100 | <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script> | |
102 | <script> var alertMessagePayloads = ${h.flash.json_alerts(request=request)|n}; </script> |
|
101 | <script> var alertMessagePayloads = ${h.flash.json_alerts(request=request)|n}; </script> | |
103 | ## avoide escaping the %N |
|
102 | ## avoide escaping the %N | |
104 |
<script language="javascript" type="text/javascript" src="${h.asset('js/ |
|
103 | <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script> | |
|
104 | <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}"> | |||
105 | <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script> |
|
105 | <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script> | |
106 |
|
106 | |||
107 |
|
107 | |||
108 | ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates |
|
108 | ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates | |
109 | ${self.js_extra()} |
|
109 | ${self.js_extra()} | |
110 |
|
110 | |||
111 | <script type="text/javascript"> |
|
111 | <script type="text/javascript"> | |
112 | Rhodecode = (function() { |
|
112 | Rhodecode = (function() { | |
113 | function _Rhodecode() { |
|
113 | function _Rhodecode() { | |
114 | this.comments = new CommentsController(); |
|
114 | this.comments = new CommentsController(); | |
115 | } |
|
115 | } | |
116 | return new _Rhodecode(); |
|
116 | return new _Rhodecode(); | |
117 | })(); |
|
117 | })(); | |
118 |
|
118 | |||
119 | $(document).ready(function(){ |
|
119 | $(document).ready(function(){ | |
120 | show_more_event(); |
|
120 | show_more_event(); | |
121 | timeagoActivate(); |
|
121 | timeagoActivate(); | |
122 | clipboardActivate(); |
|
122 | clipboardActivate(); | |
123 | }) |
|
123 | }) | |
124 | </script> |
|
124 | </script> | |
125 |
|
125 | |||
126 | </%def> |
|
126 | </%def> | |
127 |
|
127 | |||
128 | ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates |
|
128 | ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates | |
129 | <%def name="js_extra()"></%def> |
|
129 | <%def name="js_extra()"></%def> | |
130 | ${self.js()} |
|
130 | ${self.js()} | |
131 |
|
131 | |||
132 | <%def name="head_extra()"></%def> |
|
132 | <%def name="head_extra()"></%def> | |
133 | ${self.head_extra()} |
|
133 | ${self.head_extra()} | |
134 | ## extra stuff |
|
134 | ## extra stuff | |
135 | %if c.pre_code: |
|
135 | %if c.pre_code: | |
136 | ${c.pre_code|n} |
|
136 | ${c.pre_code|n} | |
137 | %endif |
|
137 | %endif | |
138 | </head> |
|
138 | </head> | |
139 | <body id="body"> |
|
139 | <body id="body"> | |
140 | <noscript> |
|
140 | <noscript> | |
141 | <div class="noscript-error"> |
|
141 | <div class="noscript-error"> | |
142 | ${_('Please enable JavaScript to use RhodeCode Enterprise')} |
|
142 | ${_('Please enable JavaScript to use RhodeCode Enterprise')} | |
143 | </div> |
|
143 | </div> | |
144 | </noscript> |
|
144 | </noscript> | |
145 | ## IE hacks |
|
145 | ## IE hacks | |
146 | <!--[if IE 7]> |
|
146 | <!--[if IE 7]> | |
147 | <script>$(document.body).addClass('ie7')</script> |
|
147 | <script>$(document.body).addClass('ie7')</script> | |
148 | <![endif]--> |
|
148 | <![endif]--> | |
149 | <!--[if IE 8]> |
|
149 | <!--[if IE 8]> | |
150 | <script>$(document.body).addClass('ie8')</script> |
|
150 | <script>$(document.body).addClass('ie8')</script> | |
151 | <![endif]--> |
|
151 | <![endif]--> | |
152 | <!--[if IE 9]> |
|
152 | <!--[if IE 9]> | |
153 | <script>$(document.body).addClass('ie9')</script> |
|
153 | <script>$(document.body).addClass('ie9')</script> | |
154 | <![endif]--> |
|
154 | <![endif]--> | |
155 |
|
155 | |||
156 | ${next.body()} |
|
156 | ${next.body()} | |
157 | %if c.post_code: |
|
157 | %if c.post_code: | |
158 | ${c.post_code|n} |
|
158 | ${c.post_code|n} | |
159 | %endif |
|
159 | %endif | |
160 | <rhodecode-app></rhodecode-app> |
|
160 | <rhodecode-app></rhodecode-app> | |
161 | </body> |
|
161 | </body> | |
162 | </html> |
|
162 | </html> |
General Comments 0
You need to be logged in to leave comments.
Login now