Show More
@@ -0,0 +1,42 b'' | |||
|
1 | # -*- coding: utf-8 -*- | |
|
2 | ||
|
3 | # Copyright (C) 2016-2017 RhodeCode GmbH | |
|
4 | # | |
|
5 | # This program is free software: you can redistribute it and/or modify | |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
|
7 | # (only), as published by the Free Software Foundation. | |
|
8 | # | |
|
9 | # This program is distributed in the hope that it will be useful, | |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
12 | # GNU General Public License for more details. | |
|
13 | # | |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
|
16 | # | |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
|
20 | from rhodecode.apps._base import ADMIN_PREFIX | |
|
21 | from rhodecode.lib.utils2 import str2bool | |
|
22 | ||
|
23 | ||
|
24 | def debug_style_enabled(info, request): | |
|
25 | return str2bool(request.registry.settings.get('debug_style')) | |
|
26 | ||
|
27 | ||
|
28 | def includeme(config): | |
|
29 | config.add_route( | |
|
30 | name='debug_style_home', | |
|
31 | pattern=ADMIN_PREFIX + '/debug_style', | |
|
32 | custom_predicates=(debug_style_enabled,)) | |
|
33 | config.add_route( | |
|
34 | name='debug_style_template', | |
|
35 | pattern=ADMIN_PREFIX + '/debug_style/t/{t_path}', | |
|
36 | custom_predicates=(debug_style_enabled,)) | |
|
37 | ||
|
38 | # Scan module for configuration decorators. | |
|
39 | config.scan() | |
|
40 | ||
|
41 | ||
|
42 |
@@ -0,0 +1,58 b'' | |||
|
1 | # -*- coding: utf-8 -*- | |
|
2 | ||
|
3 | # Copyright (C) 2016-2017 RhodeCode GmbH | |
|
4 | # | |
|
5 | # This program is free software: you can redistribute it and/or modify | |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
|
7 | # (only), as published by the Free Software Foundation. | |
|
8 | # | |
|
9 | # This program is distributed in the hope that it will be useful, | |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
12 | # GNU General Public License for more details. | |
|
13 | # | |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
|
16 | # | |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
|
20 | ||
|
21 | import os | |
|
22 | import logging | |
|
23 | ||
|
24 | from pyramid.view import view_config | |
|
25 | from pyramid.renderers import render_to_response | |
|
26 | from rhodecode.apps._base import BaseAppView | |
|
27 | ||
|
28 | log = logging.getLogger(__name__) | |
|
29 | ||
|
30 | ||
|
31 | class DebugStyleView(BaseAppView): | |
|
32 | def load_default_context(self): | |
|
33 | c = self._get_local_tmpl_context() | |
|
34 | self._register_global_c(c) | |
|
35 | return c | |
|
36 | ||
|
37 | @view_config( | |
|
38 | route_name='debug_style_home', request_method='GET', | |
|
39 | renderer=None) | |
|
40 | def index(self): | |
|
41 | c = self.load_default_context() | |
|
42 | c.active = 'index' | |
|
43 | ||
|
44 | return render_to_response( | |
|
45 | 'debug_style/index.html', self._get_template_context(c), | |
|
46 | request=self.request) | |
|
47 | ||
|
48 | @view_config( | |
|
49 | route_name='debug_style_template', request_method='GET', | |
|
50 | renderer=None) | |
|
51 | def template(self): | |
|
52 | t_path = self.request.matchdict['t_path'] | |
|
53 | c = self.load_default_context() | |
|
54 | c.active = os.path.splitext(t_path)[0] | |
|
55 | ||
|
56 | return render_to_response( | |
|
57 | 'debug_style/' + t_path, self._get_template_context(c), | |
|
58 | request=self.request) No newline at end of file |
@@ -1,532 +1,533 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | """ |
|
22 | 22 | Pylons middleware initialization |
|
23 | 23 | """ |
|
24 | 24 | import logging |
|
25 | 25 | from collections import OrderedDict |
|
26 | 26 | |
|
27 | 27 | from paste.registry import RegistryManager |
|
28 | 28 | from paste.gzipper import make_gzip_middleware |
|
29 | 29 | from pylons.wsgiapp import PylonsApp |
|
30 | 30 | from pyramid.authorization import ACLAuthorizationPolicy |
|
31 | 31 | from pyramid.config import Configurator |
|
32 | 32 | from pyramid.settings import asbool, aslist |
|
33 | 33 | from pyramid.wsgi import wsgiapp |
|
34 | 34 | from pyramid.httpexceptions import ( |
|
35 | 35 | HTTPException, HTTPError, HTTPInternalServerError, HTTPFound) |
|
36 | 36 | from pyramid.events import ApplicationCreated |
|
37 | 37 | from pyramid.renderers import render_to_response |
|
38 | 38 | from routes.middleware import RoutesMiddleware |
|
39 | 39 | import routes.util |
|
40 | 40 | |
|
41 | 41 | import rhodecode |
|
42 | 42 | |
|
43 | 43 | from rhodecode.model import meta |
|
44 | 44 | from rhodecode.config import patches |
|
45 | 45 | from rhodecode.config.routing import STATIC_FILE_PREFIX |
|
46 | 46 | from rhodecode.config.environment import ( |
|
47 | 47 | load_environment, load_pyramid_environment) |
|
48 | 48 | |
|
49 | 49 | from rhodecode.lib.vcs import VCSCommunicationError |
|
50 | 50 | from rhodecode.lib.exceptions import VCSServerUnavailable |
|
51 | 51 | from rhodecode.lib.middleware import csrf |
|
52 | 52 | from rhodecode.lib.middleware.appenlight import wrap_in_appenlight_if_enabled |
|
53 | 53 | from rhodecode.lib.middleware.error_handling import ( |
|
54 | 54 | PylonsErrorHandlingMiddleware) |
|
55 | 55 | from rhodecode.lib.middleware.https_fixup import HttpsFixup |
|
56 | 56 | from rhodecode.lib.middleware.vcs import VCSMiddleware |
|
57 | 57 | from rhodecode.lib.plugins.utils import register_rhodecode_plugin |
|
58 | 58 | from rhodecode.lib.utils2 import aslist as rhodecode_aslist, AttributeDict |
|
59 | 59 | from rhodecode.subscribers import ( |
|
60 | 60 | scan_repositories_if_enabled, write_js_routes_if_enabled, |
|
61 | 61 | write_metadata_if_needed) |
|
62 | 62 | |
|
63 | 63 | |
|
64 | 64 | log = logging.getLogger(__name__) |
|
65 | 65 | |
|
66 | 66 | |
|
67 | 67 | # this is used to avoid avoid the route lookup overhead in routesmiddleware |
|
68 | 68 | # for certain routes which won't go to pylons to - eg. static files, debugger |
|
69 | 69 | # it is only needed for the pylons migration and can be removed once complete |
|
70 | 70 | class SkippableRoutesMiddleware(RoutesMiddleware): |
|
71 | 71 | """ Routes middleware that allows you to skip prefixes """ |
|
72 | 72 | |
|
73 | 73 | def __init__(self, *args, **kw): |
|
74 | 74 | self.skip_prefixes = kw.pop('skip_prefixes', []) |
|
75 | 75 | super(SkippableRoutesMiddleware, self).__init__(*args, **kw) |
|
76 | 76 | |
|
77 | 77 | def __call__(self, environ, start_response): |
|
78 | 78 | for prefix in self.skip_prefixes: |
|
79 | 79 | if environ['PATH_INFO'].startswith(prefix): |
|
80 | 80 | # added to avoid the case when a missing /_static route falls |
|
81 | 81 | # through to pylons and causes an exception as pylons is |
|
82 | 82 | # expecting wsgiorg.routingargs to be set in the environ |
|
83 | 83 | # by RoutesMiddleware. |
|
84 | 84 | if 'wsgiorg.routing_args' not in environ: |
|
85 | 85 | environ['wsgiorg.routing_args'] = (None, {}) |
|
86 | 86 | return self.app(environ, start_response) |
|
87 | 87 | |
|
88 | 88 | return super(SkippableRoutesMiddleware, self).__call__( |
|
89 | 89 | environ, start_response) |
|
90 | 90 | |
|
91 | 91 | |
|
92 | 92 | def make_app(global_conf, static_files=True, **app_conf): |
|
93 | 93 | """Create a Pylons WSGI application and return it |
|
94 | 94 | |
|
95 | 95 | ``global_conf`` |
|
96 | 96 | The inherited configuration for this application. Normally from |
|
97 | 97 | the [DEFAULT] section of the Paste ini file. |
|
98 | 98 | |
|
99 | 99 | ``app_conf`` |
|
100 | 100 | The application's local configuration. Normally specified in |
|
101 | 101 | the [app:<name>] section of the Paste ini file (where <name> |
|
102 | 102 | defaults to main). |
|
103 | 103 | |
|
104 | 104 | """ |
|
105 | 105 | # Apply compatibility patches |
|
106 | 106 | patches.kombu_1_5_1_python_2_7_11() |
|
107 | 107 | patches.inspect_getargspec() |
|
108 | 108 | |
|
109 | 109 | # Configure the Pylons environment |
|
110 | 110 | config = load_environment(global_conf, app_conf) |
|
111 | 111 | |
|
112 | 112 | # The Pylons WSGI app |
|
113 | 113 | app = PylonsApp(config=config) |
|
114 | 114 | if rhodecode.is_test: |
|
115 | 115 | app = csrf.CSRFDetector(app) |
|
116 | 116 | |
|
117 | 117 | expected_origin = config.get('expected_origin') |
|
118 | 118 | if expected_origin: |
|
119 | 119 | # The API can be accessed from other Origins. |
|
120 | 120 | app = csrf.OriginChecker(app, expected_origin, |
|
121 | 121 | skip_urls=[routes.util.url_for('api')]) |
|
122 | 122 | |
|
123 | 123 | # Establish the Registry for this application |
|
124 | 124 | app = RegistryManager(app) |
|
125 | 125 | |
|
126 | 126 | app.config = config |
|
127 | 127 | |
|
128 | 128 | return app |
|
129 | 129 | |
|
130 | 130 | |
|
131 | 131 | def make_pyramid_app(global_config, **settings): |
|
132 | 132 | """ |
|
133 | 133 | Constructs the WSGI application based on Pyramid and wraps the Pylons based |
|
134 | 134 | application. |
|
135 | 135 | |
|
136 | 136 | Specials: |
|
137 | 137 | |
|
138 | 138 | * We migrate from Pylons to Pyramid. While doing this, we keep both |
|
139 | 139 | frameworks functional. This involves moving some WSGI middlewares around |
|
140 | 140 | and providing access to some data internals, so that the old code is |
|
141 | 141 | still functional. |
|
142 | 142 | |
|
143 | 143 | * The application can also be integrated like a plugin via the call to |
|
144 | 144 | `includeme`. This is accompanied with the other utility functions which |
|
145 | 145 | are called. Changing this should be done with great care to not break |
|
146 | 146 | cases when these fragments are assembled from another place. |
|
147 | 147 | |
|
148 | 148 | """ |
|
149 | 149 | # The edition string should be available in pylons too, so we add it here |
|
150 | 150 | # before copying the settings. |
|
151 | 151 | settings.setdefault('rhodecode.edition', 'Community Edition') |
|
152 | 152 | |
|
153 | 153 | # As long as our Pylons application does expect "unprepared" settings, make |
|
154 | 154 | # sure that we keep an unmodified copy. This avoids unintentional change of |
|
155 | 155 | # behavior in the old application. |
|
156 | 156 | settings_pylons = settings.copy() |
|
157 | 157 | |
|
158 | 158 | sanitize_settings_and_apply_defaults(settings) |
|
159 | 159 | config = Configurator(settings=settings) |
|
160 | 160 | add_pylons_compat_data(config.registry, global_config, settings_pylons) |
|
161 | 161 | |
|
162 | 162 | load_pyramid_environment(global_config, settings) |
|
163 | 163 | |
|
164 | 164 | includeme_first(config) |
|
165 | 165 | includeme(config) |
|
166 | 166 | pyramid_app = config.make_wsgi_app() |
|
167 | 167 | pyramid_app = wrap_app_in_wsgi_middlewares(pyramid_app, config) |
|
168 | 168 | pyramid_app.config = config |
|
169 | 169 | |
|
170 | 170 | # creating the app uses a connection - return it after we are done |
|
171 | 171 | meta.Session.remove() |
|
172 | 172 | |
|
173 | 173 | return pyramid_app |
|
174 | 174 | |
|
175 | 175 | |
|
176 | 176 | def make_not_found_view(config): |
|
177 | 177 | """ |
|
178 | 178 | This creates the view which should be registered as not-found-view to |
|
179 | 179 | pyramid. Basically it contains of the old pylons app, converted to a view. |
|
180 | 180 | Additionally it is wrapped by some other middlewares. |
|
181 | 181 | """ |
|
182 | 182 | settings = config.registry.settings |
|
183 | 183 | vcs_server_enabled = settings['vcs.server.enable'] |
|
184 | 184 | |
|
185 | 185 | # Make pylons app from unprepared settings. |
|
186 | 186 | pylons_app = make_app( |
|
187 | 187 | config.registry._pylons_compat_global_config, |
|
188 | 188 | **config.registry._pylons_compat_settings) |
|
189 | 189 | config.registry._pylons_compat_config = pylons_app.config |
|
190 | 190 | |
|
191 | 191 | # Appenlight monitoring. |
|
192 | 192 | pylons_app, appenlight_client = wrap_in_appenlight_if_enabled( |
|
193 | 193 | pylons_app, settings) |
|
194 | 194 | |
|
195 | 195 | # The pylons app is executed inside of the pyramid 404 exception handler. |
|
196 | 196 | # Exceptions which are raised inside of it are not handled by pyramid |
|
197 | 197 | # again. Therefore we add a middleware that invokes the error handler in |
|
198 | 198 | # case of an exception or error response. This way we return proper error |
|
199 | 199 | # HTML pages in case of an error. |
|
200 | 200 | reraise = (settings.get('debugtoolbar.enabled', False) or |
|
201 | 201 | rhodecode.disable_error_handler) |
|
202 | 202 | pylons_app = PylonsErrorHandlingMiddleware( |
|
203 | 203 | pylons_app, error_handler, reraise) |
|
204 | 204 | |
|
205 | 205 | # The VCSMiddleware shall operate like a fallback if pyramid doesn't find a |
|
206 | 206 | # view to handle the request. Therefore it is wrapped around the pylons |
|
207 | 207 | # app. It has to be outside of the error handling otherwise error responses |
|
208 | 208 | # from the vcsserver are converted to HTML error pages. This confuses the |
|
209 | 209 | # command line tools and the user won't get a meaningful error message. |
|
210 | 210 | if vcs_server_enabled: |
|
211 | 211 | pylons_app = VCSMiddleware( |
|
212 | 212 | pylons_app, settings, appenlight_client, registry=config.registry) |
|
213 | 213 | |
|
214 | 214 | # Convert WSGI app to pyramid view and return it. |
|
215 | 215 | return wsgiapp(pylons_app) |
|
216 | 216 | |
|
217 | 217 | |
|
218 | 218 | def add_pylons_compat_data(registry, global_config, settings): |
|
219 | 219 | """ |
|
220 | 220 | Attach data to the registry to support the Pylons integration. |
|
221 | 221 | """ |
|
222 | 222 | registry._pylons_compat_global_config = global_config |
|
223 | 223 | registry._pylons_compat_settings = settings |
|
224 | 224 | |
|
225 | 225 | |
|
226 | 226 | def error_handler(exception, request): |
|
227 | 227 | import rhodecode |
|
228 | 228 | from rhodecode.lib import helpers |
|
229 | 229 | |
|
230 | 230 | rhodecode_title = rhodecode.CONFIG.get('rhodecode_title') or 'RhodeCode' |
|
231 | 231 | |
|
232 | 232 | base_response = HTTPInternalServerError() |
|
233 | 233 | # prefer original exception for the response since it may have headers set |
|
234 | 234 | if isinstance(exception, HTTPException): |
|
235 | 235 | base_response = exception |
|
236 | 236 | elif isinstance(exception, VCSCommunicationError): |
|
237 | 237 | base_response = VCSServerUnavailable() |
|
238 | 238 | |
|
239 | 239 | def is_http_error(response): |
|
240 | 240 | # error which should have traceback |
|
241 | 241 | return response.status_code > 499 |
|
242 | 242 | |
|
243 | 243 | if is_http_error(base_response): |
|
244 | 244 | log.exception( |
|
245 | 245 | 'error occurred handling this request for path: %s', request.path) |
|
246 | 246 | |
|
247 | 247 | c = AttributeDict() |
|
248 | 248 | c.error_message = base_response.status |
|
249 | 249 | c.error_explanation = base_response.explanation or str(base_response) |
|
250 | 250 | c.visual = AttributeDict() |
|
251 | 251 | |
|
252 | 252 | c.visual.rhodecode_support_url = ( |
|
253 | 253 | request.registry.settings.get('rhodecode_support_url') or |
|
254 | 254 | request.route_url('rhodecode_support') |
|
255 | 255 | ) |
|
256 | 256 | c.redirect_time = 0 |
|
257 | 257 | c.rhodecode_name = rhodecode_title |
|
258 | 258 | if not c.rhodecode_name: |
|
259 | 259 | c.rhodecode_name = 'Rhodecode' |
|
260 | 260 | |
|
261 | 261 | c.causes = [] |
|
262 | 262 | if hasattr(base_response, 'causes'): |
|
263 | 263 | c.causes = base_response.causes |
|
264 | 264 | c.messages = helpers.flash.pop_messages() |
|
265 | 265 | |
|
266 | 266 | response = render_to_response( |
|
267 | 267 | '/errors/error_document.mako', {'c': c, 'h': helpers}, request=request, |
|
268 | 268 | response=base_response) |
|
269 | 269 | |
|
270 | 270 | return response |
|
271 | 271 | |
|
272 | 272 | |
|
273 | 273 | def includeme(config): |
|
274 | 274 | settings = config.registry.settings |
|
275 | 275 | |
|
276 | 276 | # plugin information |
|
277 | 277 | config.registry.rhodecode_plugins = OrderedDict() |
|
278 | 278 | |
|
279 | 279 | config.add_directive( |
|
280 | 280 | 'register_rhodecode_plugin', register_rhodecode_plugin) |
|
281 | 281 | |
|
282 | 282 | if asbool(settings.get('appenlight', 'false')): |
|
283 | 283 | config.include('appenlight_client.ext.pyramid_tween') |
|
284 | 284 | |
|
285 | 285 | # Includes which are required. The application would fail without them. |
|
286 | 286 | config.include('pyramid_mako') |
|
287 | 287 | config.include('pyramid_beaker') |
|
288 | 288 | |
|
289 | 289 | config.include('rhodecode.authentication') |
|
290 | 290 | config.include('rhodecode.integrations') |
|
291 | 291 | |
|
292 | 292 | # apps |
|
293 | 293 | config.include('rhodecode.apps._base') |
|
294 | 294 | config.include('rhodecode.apps.ops') |
|
295 | 295 | |
|
296 | 296 | config.include('rhodecode.apps.admin') |
|
297 | 297 | config.include('rhodecode.apps.channelstream') |
|
298 | 298 | config.include('rhodecode.apps.login') |
|
299 | 299 | config.include('rhodecode.apps.home') |
|
300 | 300 | config.include('rhodecode.apps.repository') |
|
301 | 301 | config.include('rhodecode.apps.repo_group') |
|
302 | 302 | config.include('rhodecode.apps.search') |
|
303 | 303 | config.include('rhodecode.apps.user_profile') |
|
304 | 304 | config.include('rhodecode.apps.my_account') |
|
305 | 305 | config.include('rhodecode.apps.svn_support') |
|
306 | 306 | config.include('rhodecode.apps.gist') |
|
307 | 307 | |
|
308 | config.include('rhodecode.apps.debug_style') | |
|
308 | 309 | config.include('rhodecode.tweens') |
|
309 | 310 | config.include('rhodecode.api') |
|
310 | 311 | |
|
311 | 312 | config.add_route( |
|
312 | 313 | 'rhodecode_support', 'https://rhodecode.com/help/', static=True) |
|
313 | 314 | |
|
314 | 315 | config.add_translation_dirs('rhodecode:i18n/') |
|
315 | 316 | settings['default_locale_name'] = settings.get('lang', 'en') |
|
316 | 317 | |
|
317 | 318 | # Add subscribers. |
|
318 | 319 | config.add_subscriber(scan_repositories_if_enabled, ApplicationCreated) |
|
319 | 320 | config.add_subscriber(write_metadata_if_needed, ApplicationCreated) |
|
320 | 321 | config.add_subscriber(write_js_routes_if_enabled, ApplicationCreated) |
|
321 | 322 | |
|
322 | 323 | config.add_request_method( |
|
323 | 324 | 'rhodecode.lib.partial_renderer.get_partial_renderer', |
|
324 | 325 | 'get_partial_renderer') |
|
325 | 326 | |
|
326 | 327 | # events |
|
327 | 328 | # TODO(marcink): this should be done when pyramid migration is finished |
|
328 | 329 | # config.add_subscriber( |
|
329 | 330 | # 'rhodecode.integrations.integrations_event_handler', |
|
330 | 331 | # 'rhodecode.events.RhodecodeEvent') |
|
331 | 332 | |
|
332 | 333 | # Set the authorization policy. |
|
333 | 334 | authz_policy = ACLAuthorizationPolicy() |
|
334 | 335 | config.set_authorization_policy(authz_policy) |
|
335 | 336 | |
|
336 | 337 | # Set the default renderer for HTML templates to mako. |
|
337 | 338 | config.add_mako_renderer('.html') |
|
338 | 339 | |
|
339 | 340 | config.add_renderer( |
|
340 | 341 | name='json_ext', |
|
341 | 342 | factory='rhodecode.lib.ext_json_renderer.pyramid_ext_json') |
|
342 | 343 | |
|
343 | 344 | # include RhodeCode plugins |
|
344 | 345 | includes = aslist(settings.get('rhodecode.includes', [])) |
|
345 | 346 | for inc in includes: |
|
346 | 347 | config.include(inc) |
|
347 | 348 | |
|
348 | 349 | # This is the glue which allows us to migrate in chunks. By registering the |
|
349 | 350 | # pylons based application as the "Not Found" view in Pyramid, we will |
|
350 | 351 | # fallback to the old application each time the new one does not yet know |
|
351 | 352 | # how to handle a request. |
|
352 | 353 | config.add_notfound_view(make_not_found_view(config)) |
|
353 | 354 | |
|
354 | 355 | if not settings.get('debugtoolbar.enabled', False): |
|
355 | 356 | # if no toolbar, then any exception gets caught and rendered |
|
356 | 357 | config.add_view(error_handler, context=Exception) |
|
357 | 358 | |
|
358 | 359 | config.add_view(error_handler, context=HTTPError) |
|
359 | 360 | |
|
360 | 361 | |
|
361 | 362 | def includeme_first(config): |
|
362 | 363 | # redirect automatic browser favicon.ico requests to correct place |
|
363 | 364 | def favicon_redirect(context, request): |
|
364 | 365 | return HTTPFound( |
|
365 | 366 | request.static_path('rhodecode:public/images/favicon.ico')) |
|
366 | 367 | |
|
367 | 368 | config.add_view(favicon_redirect, route_name='favicon') |
|
368 | 369 | config.add_route('favicon', '/favicon.ico') |
|
369 | 370 | |
|
370 | 371 | def robots_redirect(context, request): |
|
371 | 372 | return HTTPFound( |
|
372 | 373 | request.static_path('rhodecode:public/robots.txt')) |
|
373 | 374 | |
|
374 | 375 | config.add_view(robots_redirect, route_name='robots') |
|
375 | 376 | config.add_route('robots', '/robots.txt') |
|
376 | 377 | |
|
377 | 378 | config.add_static_view( |
|
378 | 379 | '_static/deform', 'deform:static') |
|
379 | 380 | config.add_static_view( |
|
380 | 381 | '_static/rhodecode', path='rhodecode:public', cache_max_age=3600 * 24) |
|
381 | 382 | |
|
382 | 383 | |
|
383 | 384 | def wrap_app_in_wsgi_middlewares(pyramid_app, config): |
|
384 | 385 | """ |
|
385 | 386 | Apply outer WSGI middlewares around the application. |
|
386 | 387 | |
|
387 | 388 | Part of this has been moved up from the Pylons layer, so that the |
|
388 | 389 | data is also available if old Pylons code is hit through an already ported |
|
389 | 390 | view. |
|
390 | 391 | """ |
|
391 | 392 | settings = config.registry.settings |
|
392 | 393 | |
|
393 | 394 | # enable https redirects based on HTTP_X_URL_SCHEME set by proxy |
|
394 | 395 | pyramid_app = HttpsFixup(pyramid_app, settings) |
|
395 | 396 | |
|
396 | 397 | # Add RoutesMiddleware to support the pylons compatibility tween during |
|
397 | 398 | # migration to pyramid. |
|
398 | 399 | pyramid_app = SkippableRoutesMiddleware( |
|
399 | 400 | pyramid_app, config.registry._pylons_compat_config['routes.map'], |
|
400 | 401 | skip_prefixes=(STATIC_FILE_PREFIX, '/_debug_toolbar')) |
|
401 | 402 | |
|
402 | 403 | pyramid_app, _ = wrap_in_appenlight_if_enabled(pyramid_app, settings) |
|
403 | 404 | |
|
404 | 405 | if settings['gzip_responses']: |
|
405 | 406 | pyramid_app = make_gzip_middleware( |
|
406 | 407 | pyramid_app, settings, compress_level=1) |
|
407 | 408 | |
|
408 | 409 | # this should be the outer most middleware in the wsgi stack since |
|
409 | 410 | # middleware like Routes make database calls |
|
410 | 411 | def pyramid_app_with_cleanup(environ, start_response): |
|
411 | 412 | try: |
|
412 | 413 | return pyramid_app(environ, start_response) |
|
413 | 414 | finally: |
|
414 | 415 | # Dispose current database session and rollback uncommitted |
|
415 | 416 | # transactions. |
|
416 | 417 | meta.Session.remove() |
|
417 | 418 | |
|
418 | 419 | # In a single threaded mode server, on non sqlite db we should have |
|
419 | 420 | # '0 Current Checked out connections' at the end of a request, |
|
420 | 421 | # if not, then something, somewhere is leaving a connection open |
|
421 | 422 | pool = meta.Base.metadata.bind.engine.pool |
|
422 | 423 | log.debug('sa pool status: %s', pool.status()) |
|
423 | 424 | |
|
424 | 425 | return pyramid_app_with_cleanup |
|
425 | 426 | |
|
426 | 427 | |
|
427 | 428 | def sanitize_settings_and_apply_defaults(settings): |
|
428 | 429 | """ |
|
429 | 430 | Applies settings defaults and does all type conversion. |
|
430 | 431 | |
|
431 | 432 | We would move all settings parsing and preparation into this place, so that |
|
432 | 433 | we have only one place left which deals with this part. The remaining parts |
|
433 | 434 | of the application would start to rely fully on well prepared settings. |
|
434 | 435 | |
|
435 | 436 | This piece would later be split up per topic to avoid a big fat monster |
|
436 | 437 | function. |
|
437 | 438 | """ |
|
438 | 439 | |
|
439 | 440 | # Pyramid's mako renderer has to search in the templates folder so that the |
|
440 | 441 | # old templates still work. Ported and new templates are expected to use |
|
441 | 442 | # real asset specifications for the includes. |
|
442 | 443 | mako_directories = settings.setdefault('mako.directories', [ |
|
443 | 444 | # Base templates of the original Pylons application |
|
444 | 445 | 'rhodecode:templates', |
|
445 | 446 | ]) |
|
446 | 447 | log.debug( |
|
447 | 448 | "Using the following Mako template directories: %s", |
|
448 | 449 | mako_directories) |
|
449 | 450 | |
|
450 | 451 | # Default includes, possible to change as a user |
|
451 | 452 | pyramid_includes = settings.setdefault('pyramid.includes', [ |
|
452 | 453 | 'rhodecode.lib.middleware.request_wrapper', |
|
453 | 454 | ]) |
|
454 | 455 | log.debug( |
|
455 | 456 | "Using the following pyramid.includes: %s", |
|
456 | 457 | pyramid_includes) |
|
457 | 458 | |
|
458 | 459 | # TODO: johbo: Re-think this, usually the call to config.include |
|
459 | 460 | # should allow to pass in a prefix. |
|
460 | 461 | settings.setdefault('rhodecode.api.url', '/_admin/api') |
|
461 | 462 | |
|
462 | 463 | # Sanitize generic settings. |
|
463 | 464 | _list_setting(settings, 'default_encoding', 'UTF-8') |
|
464 | 465 | _bool_setting(settings, 'is_test', 'false') |
|
465 | 466 | _bool_setting(settings, 'gzip_responses', 'false') |
|
466 | 467 | |
|
467 | 468 | # Call split out functions that sanitize settings for each topic. |
|
468 | 469 | _sanitize_appenlight_settings(settings) |
|
469 | 470 | _sanitize_vcs_settings(settings) |
|
470 | 471 | |
|
471 | 472 | return settings |
|
472 | 473 | |
|
473 | 474 | |
|
474 | 475 | def _sanitize_appenlight_settings(settings): |
|
475 | 476 | _bool_setting(settings, 'appenlight', 'false') |
|
476 | 477 | |
|
477 | 478 | |
|
478 | 479 | def _sanitize_vcs_settings(settings): |
|
479 | 480 | """ |
|
480 | 481 | Applies settings defaults and does type conversion for all VCS related |
|
481 | 482 | settings. |
|
482 | 483 | """ |
|
483 | 484 | _string_setting(settings, 'vcs.svn.compatible_version', '') |
|
484 | 485 | _string_setting(settings, 'git_rev_filter', '--all') |
|
485 | 486 | _string_setting(settings, 'vcs.hooks.protocol', 'http') |
|
486 | 487 | _string_setting(settings, 'vcs.scm_app_implementation', 'http') |
|
487 | 488 | _string_setting(settings, 'vcs.server', '') |
|
488 | 489 | _string_setting(settings, 'vcs.server.log_level', 'debug') |
|
489 | 490 | _string_setting(settings, 'vcs.server.protocol', 'http') |
|
490 | 491 | _bool_setting(settings, 'startup.import_repos', 'false') |
|
491 | 492 | _bool_setting(settings, 'vcs.hooks.direct_calls', 'false') |
|
492 | 493 | _bool_setting(settings, 'vcs.server.enable', 'true') |
|
493 | 494 | _bool_setting(settings, 'vcs.start_server', 'false') |
|
494 | 495 | _list_setting(settings, 'vcs.backends', 'hg, git, svn') |
|
495 | 496 | _int_setting(settings, 'vcs.connection_timeout', 3600) |
|
496 | 497 | |
|
497 | 498 | # Support legacy values of vcs.scm_app_implementation. Legacy |
|
498 | 499 | # configurations may use 'rhodecode.lib.middleware.utils.scm_app_http' |
|
499 | 500 | # which is now mapped to 'http'. |
|
500 | 501 | scm_app_impl = settings['vcs.scm_app_implementation'] |
|
501 | 502 | if scm_app_impl == 'rhodecode.lib.middleware.utils.scm_app_http': |
|
502 | 503 | settings['vcs.scm_app_implementation'] = 'http' |
|
503 | 504 | |
|
504 | 505 | |
|
505 | 506 | def _int_setting(settings, name, default): |
|
506 | 507 | settings[name] = int(settings.get(name, default)) |
|
507 | 508 | |
|
508 | 509 | |
|
509 | 510 | def _bool_setting(settings, name, default): |
|
510 | 511 | input = settings.get(name, default) |
|
511 | 512 | if isinstance(input, unicode): |
|
512 | 513 | input = input.encode('utf8') |
|
513 | 514 | settings[name] = asbool(input) |
|
514 | 515 | |
|
515 | 516 | |
|
516 | 517 | def _list_setting(settings, name, default): |
|
517 | 518 | raw_value = settings.get(name, default) |
|
518 | 519 | |
|
519 | 520 | old_separator = ',' |
|
520 | 521 | if old_separator in raw_value: |
|
521 | 522 | # If we get a comma separated list, pass it to our own function. |
|
522 | 523 | settings[name] = rhodecode_aslist(raw_value, sep=old_separator) |
|
523 | 524 | else: |
|
524 | 525 | # Otherwise we assume it uses pyramids space/newline separation. |
|
525 | 526 | settings[name] = aslist(raw_value) |
|
526 | 527 | |
|
527 | 528 | |
|
528 | 529 | def _string_setting(settings, name, default, lower=True): |
|
529 | 530 | value = settings.get(name, default) |
|
530 | 531 | if lower: |
|
531 | 532 | value = value.lower() |
|
532 | 533 | settings[name] = value |
@@ -1,893 +1,884 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | """ |
|
22 | 22 | Routes configuration |
|
23 | 23 | |
|
24 | 24 | The more specific and detailed routes should be defined first so they |
|
25 | 25 | may take precedent over the more generic routes. For more information |
|
26 | 26 | refer to the routes manual at http://routes.groovie.org/docs/ |
|
27 | 27 | |
|
28 | 28 | IMPORTANT: if you change any routing here, make sure to take a look at lib/base.py |
|
29 | 29 | and _route_name variable which uses some of stored naming here to do redirects. |
|
30 | 30 | """ |
|
31 | 31 | import os |
|
32 | 32 | import re |
|
33 | 33 | from routes import Mapper |
|
34 | 34 | |
|
35 | 35 | # prefix for non repository related links needs to be prefixed with `/` |
|
36 | 36 | ADMIN_PREFIX = '/_admin' |
|
37 | 37 | STATIC_FILE_PREFIX = '/_static' |
|
38 | 38 | |
|
39 | 39 | # Default requirements for URL parts |
|
40 | 40 | URL_NAME_REQUIREMENTS = { |
|
41 | 41 | # group name can have a slash in them, but they must not end with a slash |
|
42 | 42 | 'group_name': r'.*?[^/]', |
|
43 | 43 | 'repo_group_name': r'.*?[^/]', |
|
44 | 44 | # repo names can have a slash in them, but they must not end with a slash |
|
45 | 45 | 'repo_name': r'.*?[^/]', |
|
46 | 46 | # file path eats up everything at the end |
|
47 | 47 | 'f_path': r'.*', |
|
48 | 48 | # reference types |
|
49 | 49 | 'source_ref_type': '(branch|book|tag|rev|\%\(source_ref_type\)s)', |
|
50 | 50 | 'target_ref_type': '(branch|book|tag|rev|\%\(target_ref_type\)s)', |
|
51 | 51 | } |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | def add_route_requirements(route_path, requirements): |
|
55 | 55 | """ |
|
56 | 56 | Adds regex requirements to pyramid routes using a mapping dict |
|
57 | 57 | |
|
58 | 58 | >>> add_route_requirements('/{action}/{id}', {'id': r'\d+'}) |
|
59 | 59 | '/{action}/{id:\d+}' |
|
60 | 60 | |
|
61 | 61 | """ |
|
62 | 62 | for key, regex in requirements.items(): |
|
63 | 63 | route_path = route_path.replace('{%s}' % key, '{%s:%s}' % (key, regex)) |
|
64 | 64 | return route_path |
|
65 | 65 | |
|
66 | 66 | |
|
67 | 67 | class JSRoutesMapper(Mapper): |
|
68 | 68 | """ |
|
69 | 69 | Wrapper for routes.Mapper to make pyroutes compatible url definitions |
|
70 | 70 | """ |
|
71 | 71 | _named_route_regex = re.compile(r'^[a-z-_0-9A-Z]+$') |
|
72 | 72 | _argument_prog = re.compile('\{(.*?)\}|:\((.*)\)') |
|
73 | 73 | def __init__(self, *args, **kw): |
|
74 | 74 | super(JSRoutesMapper, self).__init__(*args, **kw) |
|
75 | 75 | self._jsroutes = [] |
|
76 | 76 | |
|
77 | 77 | def connect(self, *args, **kw): |
|
78 | 78 | """ |
|
79 | 79 | Wrapper for connect to take an extra argument jsroute=True |
|
80 | 80 | |
|
81 | 81 | :param jsroute: boolean, if True will add the route to the pyroutes list |
|
82 | 82 | """ |
|
83 | 83 | if kw.pop('jsroute', False): |
|
84 | 84 | if not self._named_route_regex.match(args[0]): |
|
85 | 85 | raise Exception('only named routes can be added to pyroutes') |
|
86 | 86 | self._jsroutes.append(args[0]) |
|
87 | 87 | |
|
88 | 88 | super(JSRoutesMapper, self).connect(*args, **kw) |
|
89 | 89 | |
|
90 | 90 | def _extract_route_information(self, route): |
|
91 | 91 | """ |
|
92 | 92 | Convert a route into tuple(name, path, args), eg: |
|
93 | 93 | ('show_user', '/profile/%(username)s', ['username']) |
|
94 | 94 | """ |
|
95 | 95 | routepath = route.routepath |
|
96 | 96 | def replace(matchobj): |
|
97 | 97 | if matchobj.group(1): |
|
98 | 98 | return "%%(%s)s" % matchobj.group(1).split(':')[0] |
|
99 | 99 | else: |
|
100 | 100 | return "%%(%s)s" % matchobj.group(2) |
|
101 | 101 | |
|
102 | 102 | routepath = self._argument_prog.sub(replace, routepath) |
|
103 | 103 | return ( |
|
104 | 104 | route.name, |
|
105 | 105 | routepath, |
|
106 | 106 | [(arg[0].split(':')[0] if arg[0] != '' else arg[1]) |
|
107 | 107 | for arg in self._argument_prog.findall(route.routepath)] |
|
108 | 108 | ) |
|
109 | 109 | |
|
110 | 110 | def jsroutes(self): |
|
111 | 111 | """ |
|
112 | 112 | Return a list of pyroutes.js compatible routes |
|
113 | 113 | """ |
|
114 | 114 | for route_name in self._jsroutes: |
|
115 | 115 | yield self._extract_route_information(self._routenames[route_name]) |
|
116 | 116 | |
|
117 | 117 | |
|
118 | 118 | def make_map(config): |
|
119 | 119 | """Create, configure and return the routes Mapper""" |
|
120 | 120 | rmap = JSRoutesMapper( |
|
121 | 121 | directory=config['pylons.paths']['controllers'], |
|
122 | 122 | always_scan=config['debug']) |
|
123 | 123 | rmap.minimization = False |
|
124 | 124 | rmap.explicit = False |
|
125 | 125 | |
|
126 | 126 | from rhodecode.lib.utils2 import str2bool |
|
127 | 127 | from rhodecode.model import repo, repo_group |
|
128 | 128 | |
|
129 | 129 | def check_repo(environ, match_dict): |
|
130 | 130 | """ |
|
131 | 131 | check for valid repository for proper 404 handling |
|
132 | 132 | |
|
133 | 133 | :param environ: |
|
134 | 134 | :param match_dict: |
|
135 | 135 | """ |
|
136 | 136 | repo_name = match_dict.get('repo_name') |
|
137 | 137 | |
|
138 | 138 | if match_dict.get('f_path'): |
|
139 | 139 | # fix for multiple initial slashes that causes errors |
|
140 | 140 | match_dict['f_path'] = match_dict['f_path'].lstrip('/') |
|
141 | 141 | repo_model = repo.RepoModel() |
|
142 | 142 | by_name_match = repo_model.get_by_repo_name(repo_name) |
|
143 | 143 | # if we match quickly from database, short circuit the operation, |
|
144 | 144 | # and validate repo based on the type. |
|
145 | 145 | if by_name_match: |
|
146 | 146 | return True |
|
147 | 147 | |
|
148 | 148 | by_id_match = repo_model.get_repo_by_id(repo_name) |
|
149 | 149 | if by_id_match: |
|
150 | 150 | repo_name = by_id_match.repo_name |
|
151 | 151 | match_dict['repo_name'] = repo_name |
|
152 | 152 | return True |
|
153 | 153 | |
|
154 | 154 | return False |
|
155 | 155 | |
|
156 | 156 | def check_group(environ, match_dict): |
|
157 | 157 | """ |
|
158 | 158 | check for valid repository group path for proper 404 handling |
|
159 | 159 | |
|
160 | 160 | :param environ: |
|
161 | 161 | :param match_dict: |
|
162 | 162 | """ |
|
163 | 163 | repo_group_name = match_dict.get('group_name') |
|
164 | 164 | repo_group_model = repo_group.RepoGroupModel() |
|
165 | 165 | by_name_match = repo_group_model.get_by_group_name(repo_group_name) |
|
166 | 166 | if by_name_match: |
|
167 | 167 | return True |
|
168 | 168 | |
|
169 | 169 | return False |
|
170 | 170 | |
|
171 | 171 | def check_user_group(environ, match_dict): |
|
172 | 172 | """ |
|
173 | 173 | check for valid user group for proper 404 handling |
|
174 | 174 | |
|
175 | 175 | :param environ: |
|
176 | 176 | :param match_dict: |
|
177 | 177 | """ |
|
178 | 178 | return True |
|
179 | 179 | |
|
180 | 180 | def check_int(environ, match_dict): |
|
181 | 181 | return match_dict.get('id').isdigit() |
|
182 | 182 | |
|
183 | 183 | |
|
184 | 184 | #========================================================================== |
|
185 | 185 | # CUSTOM ROUTES HERE |
|
186 | 186 | #========================================================================== |
|
187 | 187 | |
|
188 | 188 | # ping and pylons error test |
|
189 | 189 | rmap.connect('ping', '%s/ping' % (ADMIN_PREFIX,), controller='home', action='ping') |
|
190 | 190 | rmap.connect('error_test', '%s/error_test' % (ADMIN_PREFIX,), controller='home', action='error_test') |
|
191 | 191 | |
|
192 | 192 | # ADMIN REPOSITORY ROUTES |
|
193 | 193 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
|
194 | 194 | controller='admin/repos') as m: |
|
195 | 195 | m.connect('repos', '/repos', |
|
196 | 196 | action='create', conditions={'method': ['POST']}) |
|
197 | 197 | m.connect('repos', '/repos', |
|
198 | 198 | action='index', conditions={'method': ['GET']}) |
|
199 | 199 | m.connect('new_repo', '/create_repository', jsroute=True, |
|
200 | 200 | action='create_repository', conditions={'method': ['GET']}) |
|
201 | 201 | m.connect('delete_repo', '/repos/{repo_name}', |
|
202 | 202 | action='delete', conditions={'method': ['DELETE']}, |
|
203 | 203 | requirements=URL_NAME_REQUIREMENTS) |
|
204 | 204 | m.connect('repo', '/repos/{repo_name}', |
|
205 | 205 | action='show', conditions={'method': ['GET'], |
|
206 | 206 | 'function': check_repo}, |
|
207 | 207 | requirements=URL_NAME_REQUIREMENTS) |
|
208 | 208 | |
|
209 | 209 | # ADMIN REPOSITORY GROUPS ROUTES |
|
210 | 210 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
|
211 | 211 | controller='admin/repo_groups') as m: |
|
212 | 212 | m.connect('repo_groups', '/repo_groups', |
|
213 | 213 | action='create', conditions={'method': ['POST']}) |
|
214 | 214 | m.connect('repo_groups', '/repo_groups', |
|
215 | 215 | action='index', conditions={'method': ['GET']}) |
|
216 | 216 | m.connect('new_repo_group', '/repo_groups/new', |
|
217 | 217 | action='new', conditions={'method': ['GET']}) |
|
218 | 218 | m.connect('update_repo_group', '/repo_groups/{group_name}', |
|
219 | 219 | action='update', conditions={'method': ['PUT'], |
|
220 | 220 | 'function': check_group}, |
|
221 | 221 | requirements=URL_NAME_REQUIREMENTS) |
|
222 | 222 | |
|
223 | 223 | # EXTRAS REPO GROUP ROUTES |
|
224 | 224 | m.connect('edit_repo_group', '/repo_groups/{group_name}/edit', |
|
225 | 225 | action='edit', |
|
226 | 226 | conditions={'method': ['GET'], 'function': check_group}, |
|
227 | 227 | requirements=URL_NAME_REQUIREMENTS) |
|
228 | 228 | m.connect('edit_repo_group', '/repo_groups/{group_name}/edit', |
|
229 | 229 | action='edit', |
|
230 | 230 | conditions={'method': ['PUT'], 'function': check_group}, |
|
231 | 231 | requirements=URL_NAME_REQUIREMENTS) |
|
232 | 232 | |
|
233 | 233 | m.connect('edit_repo_group_advanced', '/repo_groups/{group_name}/edit/advanced', |
|
234 | 234 | action='edit_repo_group_advanced', |
|
235 | 235 | conditions={'method': ['GET'], 'function': check_group}, |
|
236 | 236 | requirements=URL_NAME_REQUIREMENTS) |
|
237 | 237 | m.connect('edit_repo_group_advanced', '/repo_groups/{group_name}/edit/advanced', |
|
238 | 238 | action='edit_repo_group_advanced', |
|
239 | 239 | conditions={'method': ['PUT'], 'function': check_group}, |
|
240 | 240 | requirements=URL_NAME_REQUIREMENTS) |
|
241 | 241 | |
|
242 | 242 | m.connect('edit_repo_group_perms', '/repo_groups/{group_name}/edit/permissions', |
|
243 | 243 | action='edit_repo_group_perms', |
|
244 | 244 | conditions={'method': ['GET'], 'function': check_group}, |
|
245 | 245 | requirements=URL_NAME_REQUIREMENTS) |
|
246 | 246 | m.connect('edit_repo_group_perms', '/repo_groups/{group_name}/edit/permissions', |
|
247 | 247 | action='update_perms', |
|
248 | 248 | conditions={'method': ['PUT'], 'function': check_group}, |
|
249 | 249 | requirements=URL_NAME_REQUIREMENTS) |
|
250 | 250 | |
|
251 | 251 | m.connect('delete_repo_group', '/repo_groups/{group_name}', |
|
252 | 252 | action='delete', conditions={'method': ['DELETE'], |
|
253 | 253 | 'function': check_group}, |
|
254 | 254 | requirements=URL_NAME_REQUIREMENTS) |
|
255 | 255 | |
|
256 | 256 | # ADMIN USER ROUTES |
|
257 | 257 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
|
258 | 258 | controller='admin/users') as m: |
|
259 | 259 | m.connect('users', '/users', |
|
260 | 260 | action='create', conditions={'method': ['POST']}) |
|
261 | 261 | m.connect('new_user', '/users/new', |
|
262 | 262 | action='new', conditions={'method': ['GET']}) |
|
263 | 263 | m.connect('update_user', '/users/{user_id}', |
|
264 | 264 | action='update', conditions={'method': ['PUT']}) |
|
265 | 265 | m.connect('delete_user', '/users/{user_id}', |
|
266 | 266 | action='delete', conditions={'method': ['DELETE']}) |
|
267 | 267 | m.connect('edit_user', '/users/{user_id}/edit', |
|
268 | 268 | action='edit', conditions={'method': ['GET']}, jsroute=True) |
|
269 | 269 | m.connect('user', '/users/{user_id}', |
|
270 | 270 | action='show', conditions={'method': ['GET']}) |
|
271 | 271 | m.connect('force_password_reset_user', '/users/{user_id}/password_reset', |
|
272 | 272 | action='reset_password', conditions={'method': ['POST']}) |
|
273 | 273 | m.connect('create_personal_repo_group', '/users/{user_id}/create_repo_group', |
|
274 | 274 | action='create_personal_repo_group', conditions={'method': ['POST']}) |
|
275 | 275 | |
|
276 | 276 | # EXTRAS USER ROUTES |
|
277 | 277 | m.connect('edit_user_advanced', '/users/{user_id}/edit/advanced', |
|
278 | 278 | action='edit_advanced', conditions={'method': ['GET']}) |
|
279 | 279 | m.connect('edit_user_advanced', '/users/{user_id}/edit/advanced', |
|
280 | 280 | action='update_advanced', conditions={'method': ['PUT']}) |
|
281 | 281 | |
|
282 | 282 | m.connect('edit_user_global_perms', '/users/{user_id}/edit/global_permissions', |
|
283 | 283 | action='edit_global_perms', conditions={'method': ['GET']}) |
|
284 | 284 | m.connect('edit_user_global_perms', '/users/{user_id}/edit/global_permissions', |
|
285 | 285 | action='update_global_perms', conditions={'method': ['PUT']}) |
|
286 | 286 | |
|
287 | 287 | m.connect('edit_user_perms_summary', '/users/{user_id}/edit/permissions_summary', |
|
288 | 288 | action='edit_perms_summary', conditions={'method': ['GET']}) |
|
289 | 289 | |
|
290 | 290 | |
|
291 | 291 | # ADMIN USER GROUPS REST ROUTES |
|
292 | 292 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
|
293 | 293 | controller='admin/user_groups') as m: |
|
294 | 294 | m.connect('users_groups', '/user_groups', |
|
295 | 295 | action='create', conditions={'method': ['POST']}) |
|
296 | 296 | m.connect('users_groups', '/user_groups', |
|
297 | 297 | action='index', conditions={'method': ['GET']}) |
|
298 | 298 | m.connect('new_users_group', '/user_groups/new', |
|
299 | 299 | action='new', conditions={'method': ['GET']}) |
|
300 | 300 | m.connect('update_users_group', '/user_groups/{user_group_id}', |
|
301 | 301 | action='update', conditions={'method': ['PUT']}) |
|
302 | 302 | m.connect('delete_users_group', '/user_groups/{user_group_id}', |
|
303 | 303 | action='delete', conditions={'method': ['DELETE']}) |
|
304 | 304 | m.connect('edit_users_group', '/user_groups/{user_group_id}/edit', |
|
305 | 305 | action='edit', conditions={'method': ['GET']}, |
|
306 | 306 | function=check_user_group) |
|
307 | 307 | |
|
308 | 308 | # EXTRAS USER GROUP ROUTES |
|
309 | 309 | m.connect('edit_user_group_global_perms', |
|
310 | 310 | '/user_groups/{user_group_id}/edit/global_permissions', |
|
311 | 311 | action='edit_global_perms', conditions={'method': ['GET']}) |
|
312 | 312 | m.connect('edit_user_group_global_perms', |
|
313 | 313 | '/user_groups/{user_group_id}/edit/global_permissions', |
|
314 | 314 | action='update_global_perms', conditions={'method': ['PUT']}) |
|
315 | 315 | m.connect('edit_user_group_perms_summary', |
|
316 | 316 | '/user_groups/{user_group_id}/edit/permissions_summary', |
|
317 | 317 | action='edit_perms_summary', conditions={'method': ['GET']}) |
|
318 | 318 | |
|
319 | 319 | m.connect('edit_user_group_perms', |
|
320 | 320 | '/user_groups/{user_group_id}/edit/permissions', |
|
321 | 321 | action='edit_perms', conditions={'method': ['GET']}) |
|
322 | 322 | m.connect('edit_user_group_perms', |
|
323 | 323 | '/user_groups/{user_group_id}/edit/permissions', |
|
324 | 324 | action='update_perms', conditions={'method': ['PUT']}) |
|
325 | 325 | |
|
326 | 326 | m.connect('edit_user_group_advanced', |
|
327 | 327 | '/user_groups/{user_group_id}/edit/advanced', |
|
328 | 328 | action='edit_advanced', conditions={'method': ['GET']}) |
|
329 | 329 | |
|
330 | 330 | m.connect('edit_user_group_advanced_sync', |
|
331 | 331 | '/user_groups/{user_group_id}/edit/advanced/sync', |
|
332 | 332 | action='edit_advanced_set_synchronization', conditions={'method': ['POST']}) |
|
333 | 333 | |
|
334 | 334 | m.connect('edit_user_group_members', |
|
335 | 335 | '/user_groups/{user_group_id}/edit/members', jsroute=True, |
|
336 | 336 | action='user_group_members', conditions={'method': ['GET']}) |
|
337 | 337 | |
|
338 | 338 | # ADMIN PERMISSIONS ROUTES |
|
339 | 339 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
|
340 | 340 | controller='admin/permissions') as m: |
|
341 | 341 | m.connect('admin_permissions_application', '/permissions/application', |
|
342 | 342 | action='permission_application_update', conditions={'method': ['POST']}) |
|
343 | 343 | m.connect('admin_permissions_application', '/permissions/application', |
|
344 | 344 | action='permission_application', conditions={'method': ['GET']}) |
|
345 | 345 | |
|
346 | 346 | m.connect('admin_permissions_global', '/permissions/global', |
|
347 | 347 | action='permission_global_update', conditions={'method': ['POST']}) |
|
348 | 348 | m.connect('admin_permissions_global', '/permissions/global', |
|
349 | 349 | action='permission_global', conditions={'method': ['GET']}) |
|
350 | 350 | |
|
351 | 351 | m.connect('admin_permissions_object', '/permissions/object', |
|
352 | 352 | action='permission_objects_update', conditions={'method': ['POST']}) |
|
353 | 353 | m.connect('admin_permissions_object', '/permissions/object', |
|
354 | 354 | action='permission_objects', conditions={'method': ['GET']}) |
|
355 | 355 | |
|
356 | 356 | m.connect('admin_permissions_ips', '/permissions/ips', |
|
357 | 357 | action='permission_ips', conditions={'method': ['POST']}) |
|
358 | 358 | m.connect('admin_permissions_ips', '/permissions/ips', |
|
359 | 359 | action='permission_ips', conditions={'method': ['GET']}) |
|
360 | 360 | |
|
361 | 361 | m.connect('admin_permissions_overview', '/permissions/overview', |
|
362 | 362 | action='permission_perms', conditions={'method': ['GET']}) |
|
363 | 363 | |
|
364 | 364 | # ADMIN DEFAULTS REST ROUTES |
|
365 | 365 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
|
366 | 366 | controller='admin/defaults') as m: |
|
367 | 367 | m.connect('admin_defaults_repositories', '/defaults/repositories', |
|
368 | 368 | action='update_repository_defaults', conditions={'method': ['POST']}) |
|
369 | 369 | m.connect('admin_defaults_repositories', '/defaults/repositories', |
|
370 | 370 | action='index', conditions={'method': ['GET']}) |
|
371 | 371 | |
|
372 | # ADMIN DEBUG STYLE ROUTES | |
|
373 | if str2bool(config.get('debug_style')): | |
|
374 | with rmap.submapper(path_prefix=ADMIN_PREFIX + '/debug_style', | |
|
375 | controller='debug_style') as m: | |
|
376 | m.connect('debug_style_home', '', | |
|
377 | action='index', conditions={'method': ['GET']}) | |
|
378 | m.connect('debug_style_template', '/t/{t_path}', | |
|
379 | action='template', conditions={'method': ['GET']}) | |
|
380 | ||
|
381 | 372 | # ADMIN SETTINGS ROUTES |
|
382 | 373 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
|
383 | 374 | controller='admin/settings') as m: |
|
384 | 375 | |
|
385 | 376 | # default |
|
386 | 377 | m.connect('admin_settings', '/settings', |
|
387 | 378 | action='settings_global_update', |
|
388 | 379 | conditions={'method': ['POST']}) |
|
389 | 380 | m.connect('admin_settings', '/settings', |
|
390 | 381 | action='settings_global', conditions={'method': ['GET']}) |
|
391 | 382 | |
|
392 | 383 | m.connect('admin_settings_vcs', '/settings/vcs', |
|
393 | 384 | action='settings_vcs_update', |
|
394 | 385 | conditions={'method': ['POST']}) |
|
395 | 386 | m.connect('admin_settings_vcs', '/settings/vcs', |
|
396 | 387 | action='settings_vcs', |
|
397 | 388 | conditions={'method': ['GET']}) |
|
398 | 389 | m.connect('admin_settings_vcs', '/settings/vcs', |
|
399 | 390 | action='delete_svn_pattern', |
|
400 | 391 | conditions={'method': ['DELETE']}) |
|
401 | 392 | |
|
402 | 393 | m.connect('admin_settings_mapping', '/settings/mapping', |
|
403 | 394 | action='settings_mapping_update', |
|
404 | 395 | conditions={'method': ['POST']}) |
|
405 | 396 | m.connect('admin_settings_mapping', '/settings/mapping', |
|
406 | 397 | action='settings_mapping', conditions={'method': ['GET']}) |
|
407 | 398 | |
|
408 | 399 | m.connect('admin_settings_global', '/settings/global', |
|
409 | 400 | action='settings_global_update', |
|
410 | 401 | conditions={'method': ['POST']}) |
|
411 | 402 | m.connect('admin_settings_global', '/settings/global', |
|
412 | 403 | action='settings_global', conditions={'method': ['GET']}) |
|
413 | 404 | |
|
414 | 405 | m.connect('admin_settings_visual', '/settings/visual', |
|
415 | 406 | action='settings_visual_update', |
|
416 | 407 | conditions={'method': ['POST']}) |
|
417 | 408 | m.connect('admin_settings_visual', '/settings/visual', |
|
418 | 409 | action='settings_visual', conditions={'method': ['GET']}) |
|
419 | 410 | |
|
420 | 411 | m.connect('admin_settings_issuetracker', |
|
421 | 412 | '/settings/issue-tracker', action='settings_issuetracker', |
|
422 | 413 | conditions={'method': ['GET']}) |
|
423 | 414 | m.connect('admin_settings_issuetracker_save', |
|
424 | 415 | '/settings/issue-tracker/save', |
|
425 | 416 | action='settings_issuetracker_save', |
|
426 | 417 | conditions={'method': ['POST']}) |
|
427 | 418 | m.connect('admin_issuetracker_test', '/settings/issue-tracker/test', |
|
428 | 419 | action='settings_issuetracker_test', |
|
429 | 420 | conditions={'method': ['POST']}) |
|
430 | 421 | m.connect('admin_issuetracker_delete', |
|
431 | 422 | '/settings/issue-tracker/delete', |
|
432 | 423 | action='settings_issuetracker_delete', |
|
433 | 424 | conditions={'method': ['DELETE']}) |
|
434 | 425 | |
|
435 | 426 | m.connect('admin_settings_email', '/settings/email', |
|
436 | 427 | action='settings_email_update', |
|
437 | 428 | conditions={'method': ['POST']}) |
|
438 | 429 | m.connect('admin_settings_email', '/settings/email', |
|
439 | 430 | action='settings_email', conditions={'method': ['GET']}) |
|
440 | 431 | |
|
441 | 432 | m.connect('admin_settings_hooks', '/settings/hooks', |
|
442 | 433 | action='settings_hooks_update', |
|
443 | 434 | conditions={'method': ['POST', 'DELETE']}) |
|
444 | 435 | m.connect('admin_settings_hooks', '/settings/hooks', |
|
445 | 436 | action='settings_hooks', conditions={'method': ['GET']}) |
|
446 | 437 | |
|
447 | 438 | m.connect('admin_settings_search', '/settings/search', |
|
448 | 439 | action='settings_search', conditions={'method': ['GET']}) |
|
449 | 440 | |
|
450 | 441 | m.connect('admin_settings_supervisor', '/settings/supervisor', |
|
451 | 442 | action='settings_supervisor', conditions={'method': ['GET']}) |
|
452 | 443 | m.connect('admin_settings_supervisor_log', '/settings/supervisor/{procid}/log', |
|
453 | 444 | action='settings_supervisor_log', conditions={'method': ['GET']}) |
|
454 | 445 | |
|
455 | 446 | m.connect('admin_settings_labs', '/settings/labs', |
|
456 | 447 | action='settings_labs_update', |
|
457 | 448 | conditions={'method': ['POST']}) |
|
458 | 449 | m.connect('admin_settings_labs', '/settings/labs', |
|
459 | 450 | action='settings_labs', conditions={'method': ['GET']}) |
|
460 | 451 | |
|
461 | 452 | # ADMIN MY ACCOUNT |
|
462 | 453 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
|
463 | 454 | controller='admin/my_account') as m: |
|
464 | 455 | |
|
465 | 456 | # NOTE(marcink): this needs to be kept for password force flag to be |
|
466 | 457 | # handled in pylons controllers, remove after full migration to pyramid |
|
467 | 458 | m.connect('my_account_password', '/my_account/password', |
|
468 | 459 | action='my_account_password', conditions={'method': ['GET']}) |
|
469 | 460 | |
|
470 | 461 | # NOTIFICATION REST ROUTES |
|
471 | 462 | with rmap.submapper(path_prefix=ADMIN_PREFIX, |
|
472 | 463 | controller='admin/notifications') as m: |
|
473 | 464 | m.connect('notifications', '/notifications', |
|
474 | 465 | action='index', conditions={'method': ['GET']}) |
|
475 | 466 | m.connect('notifications_mark_all_read', '/notifications/mark_all_read', |
|
476 | 467 | action='mark_all_read', conditions={'method': ['POST']}) |
|
477 | 468 | m.connect('/notifications/{notification_id}', |
|
478 | 469 | action='update', conditions={'method': ['PUT']}) |
|
479 | 470 | m.connect('/notifications/{notification_id}', |
|
480 | 471 | action='delete', conditions={'method': ['DELETE']}) |
|
481 | 472 | m.connect('notification', '/notifications/{notification_id}', |
|
482 | 473 | action='show', conditions={'method': ['GET']}) |
|
483 | 474 | |
|
484 | 475 | # USER JOURNAL |
|
485 | 476 | rmap.connect('journal', '%s/journal' % (ADMIN_PREFIX,), |
|
486 | 477 | controller='journal', action='index') |
|
487 | 478 | rmap.connect('journal_rss', '%s/journal/rss' % (ADMIN_PREFIX,), |
|
488 | 479 | controller='journal', action='journal_rss') |
|
489 | 480 | rmap.connect('journal_atom', '%s/journal/atom' % (ADMIN_PREFIX,), |
|
490 | 481 | controller='journal', action='journal_atom') |
|
491 | 482 | |
|
492 | 483 | rmap.connect('public_journal', '%s/public_journal' % (ADMIN_PREFIX,), |
|
493 | 484 | controller='journal', action='public_journal') |
|
494 | 485 | |
|
495 | 486 | rmap.connect('public_journal_rss', '%s/public_journal/rss' % (ADMIN_PREFIX,), |
|
496 | 487 | controller='journal', action='public_journal_rss') |
|
497 | 488 | |
|
498 | 489 | rmap.connect('public_journal_rss_old', '%s/public_journal_rss' % (ADMIN_PREFIX,), |
|
499 | 490 | controller='journal', action='public_journal_rss') |
|
500 | 491 | |
|
501 | 492 | rmap.connect('public_journal_atom', |
|
502 | 493 | '%s/public_journal/atom' % (ADMIN_PREFIX,), controller='journal', |
|
503 | 494 | action='public_journal_atom') |
|
504 | 495 | |
|
505 | 496 | rmap.connect('public_journal_atom_old', |
|
506 | 497 | '%s/public_journal_atom' % (ADMIN_PREFIX,), controller='journal', |
|
507 | 498 | action='public_journal_atom') |
|
508 | 499 | |
|
509 | 500 | rmap.connect('toggle_following', '%s/toggle_following' % (ADMIN_PREFIX,), |
|
510 | 501 | controller='journal', action='toggle_following', jsroute=True, |
|
511 | 502 | conditions={'method': ['POST']}) |
|
512 | 503 | |
|
513 | 504 | #========================================================================== |
|
514 | 505 | # REPOSITORY ROUTES |
|
515 | 506 | #========================================================================== |
|
516 | 507 | |
|
517 | 508 | rmap.connect('repo_creating_home', '/{repo_name}/repo_creating', |
|
518 | 509 | controller='admin/repos', action='repo_creating', |
|
519 | 510 | requirements=URL_NAME_REQUIREMENTS) |
|
520 | 511 | rmap.connect('repo_check_home', '/{repo_name}/crepo_check', |
|
521 | 512 | controller='admin/repos', action='repo_check', |
|
522 | 513 | requirements=URL_NAME_REQUIREMENTS) |
|
523 | 514 | |
|
524 | 515 | rmap.connect('changeset_home', '/{repo_name}/changeset/{revision}', |
|
525 | 516 | controller='changeset', revision='tip', |
|
526 | 517 | conditions={'function': check_repo}, |
|
527 | 518 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
528 | 519 | rmap.connect('changeset_children', '/{repo_name}/changeset_children/{revision}', |
|
529 | 520 | controller='changeset', revision='tip', action='changeset_children', |
|
530 | 521 | conditions={'function': check_repo}, |
|
531 | 522 | requirements=URL_NAME_REQUIREMENTS) |
|
532 | 523 | rmap.connect('changeset_parents', '/{repo_name}/changeset_parents/{revision}', |
|
533 | 524 | controller='changeset', revision='tip', action='changeset_parents', |
|
534 | 525 | conditions={'function': check_repo}, |
|
535 | 526 | requirements=URL_NAME_REQUIREMENTS) |
|
536 | 527 | |
|
537 | 528 | # repo edit options |
|
538 | 529 | rmap.connect('edit_repo_fields', '/{repo_name}/settings/fields', |
|
539 | 530 | controller='admin/repos', action='edit_fields', |
|
540 | 531 | conditions={'method': ['GET'], 'function': check_repo}, |
|
541 | 532 | requirements=URL_NAME_REQUIREMENTS) |
|
542 | 533 | rmap.connect('create_repo_fields', '/{repo_name}/settings/fields/new', |
|
543 | 534 | controller='admin/repos', action='create_repo_field', |
|
544 | 535 | conditions={'method': ['PUT'], 'function': check_repo}, |
|
545 | 536 | requirements=URL_NAME_REQUIREMENTS) |
|
546 | 537 | rmap.connect('delete_repo_fields', '/{repo_name}/settings/fields/{field_id}', |
|
547 | 538 | controller='admin/repos', action='delete_repo_field', |
|
548 | 539 | conditions={'method': ['DELETE'], 'function': check_repo}, |
|
549 | 540 | requirements=URL_NAME_REQUIREMENTS) |
|
550 | 541 | |
|
551 | 542 | rmap.connect('toggle_locking', '/{repo_name}/settings/advanced/locking_toggle', |
|
552 | 543 | controller='admin/repos', action='toggle_locking', |
|
553 | 544 | conditions={'method': ['GET'], 'function': check_repo}, |
|
554 | 545 | requirements=URL_NAME_REQUIREMENTS) |
|
555 | 546 | |
|
556 | 547 | rmap.connect('edit_repo_remote', '/{repo_name}/settings/remote', |
|
557 | 548 | controller='admin/repos', action='edit_remote_form', |
|
558 | 549 | conditions={'method': ['GET'], 'function': check_repo}, |
|
559 | 550 | requirements=URL_NAME_REQUIREMENTS) |
|
560 | 551 | rmap.connect('edit_repo_remote', '/{repo_name}/settings/remote', |
|
561 | 552 | controller='admin/repos', action='edit_remote', |
|
562 | 553 | conditions={'method': ['PUT'], 'function': check_repo}, |
|
563 | 554 | requirements=URL_NAME_REQUIREMENTS) |
|
564 | 555 | |
|
565 | 556 | rmap.connect('edit_repo_statistics', '/{repo_name}/settings/statistics', |
|
566 | 557 | controller='admin/repos', action='edit_statistics_form', |
|
567 | 558 | conditions={'method': ['GET'], 'function': check_repo}, |
|
568 | 559 | requirements=URL_NAME_REQUIREMENTS) |
|
569 | 560 | rmap.connect('edit_repo_statistics', '/{repo_name}/settings/statistics', |
|
570 | 561 | controller='admin/repos', action='edit_statistics', |
|
571 | 562 | conditions={'method': ['PUT'], 'function': check_repo}, |
|
572 | 563 | requirements=URL_NAME_REQUIREMENTS) |
|
573 | 564 | rmap.connect('repo_settings_issuetracker', |
|
574 | 565 | '/{repo_name}/settings/issue-tracker', |
|
575 | 566 | controller='admin/repos', action='repo_issuetracker', |
|
576 | 567 | conditions={'method': ['GET'], 'function': check_repo}, |
|
577 | 568 | requirements=URL_NAME_REQUIREMENTS) |
|
578 | 569 | rmap.connect('repo_issuetracker_test', |
|
579 | 570 | '/{repo_name}/settings/issue-tracker/test', |
|
580 | 571 | controller='admin/repos', action='repo_issuetracker_test', |
|
581 | 572 | conditions={'method': ['POST'], 'function': check_repo}, |
|
582 | 573 | requirements=URL_NAME_REQUIREMENTS) |
|
583 | 574 | rmap.connect('repo_issuetracker_delete', |
|
584 | 575 | '/{repo_name}/settings/issue-tracker/delete', |
|
585 | 576 | controller='admin/repos', action='repo_issuetracker_delete', |
|
586 | 577 | conditions={'method': ['DELETE'], 'function': check_repo}, |
|
587 | 578 | requirements=URL_NAME_REQUIREMENTS) |
|
588 | 579 | rmap.connect('repo_issuetracker_save', |
|
589 | 580 | '/{repo_name}/settings/issue-tracker/save', |
|
590 | 581 | controller='admin/repos', action='repo_issuetracker_save', |
|
591 | 582 | conditions={'method': ['POST'], 'function': check_repo}, |
|
592 | 583 | requirements=URL_NAME_REQUIREMENTS) |
|
593 | 584 | rmap.connect('repo_vcs_settings', '/{repo_name}/settings/vcs', |
|
594 | 585 | controller='admin/repos', action='repo_settings_vcs_update', |
|
595 | 586 | conditions={'method': ['POST'], 'function': check_repo}, |
|
596 | 587 | requirements=URL_NAME_REQUIREMENTS) |
|
597 | 588 | rmap.connect('repo_vcs_settings', '/{repo_name}/settings/vcs', |
|
598 | 589 | controller='admin/repos', action='repo_settings_vcs', |
|
599 | 590 | conditions={'method': ['GET'], 'function': check_repo}, |
|
600 | 591 | requirements=URL_NAME_REQUIREMENTS) |
|
601 | 592 | rmap.connect('repo_vcs_settings', '/{repo_name}/settings/vcs', |
|
602 | 593 | controller='admin/repos', action='repo_delete_svn_pattern', |
|
603 | 594 | conditions={'method': ['DELETE'], 'function': check_repo}, |
|
604 | 595 | requirements=URL_NAME_REQUIREMENTS) |
|
605 | 596 | rmap.connect('repo_pullrequest_settings', '/{repo_name}/settings/pullrequest', |
|
606 | 597 | controller='admin/repos', action='repo_settings_pullrequest', |
|
607 | 598 | conditions={'method': ['GET', 'POST'], 'function': check_repo}, |
|
608 | 599 | requirements=URL_NAME_REQUIREMENTS) |
|
609 | 600 | |
|
610 | 601 | # still working url for backward compat. |
|
611 | 602 | rmap.connect('raw_changeset_home_depraced', |
|
612 | 603 | '/{repo_name}/raw-changeset/{revision}', |
|
613 | 604 | controller='changeset', action='changeset_raw', |
|
614 | 605 | revision='tip', conditions={'function': check_repo}, |
|
615 | 606 | requirements=URL_NAME_REQUIREMENTS) |
|
616 | 607 | |
|
617 | 608 | # new URLs |
|
618 | 609 | rmap.connect('changeset_raw_home', |
|
619 | 610 | '/{repo_name}/changeset-diff/{revision}', |
|
620 | 611 | controller='changeset', action='changeset_raw', |
|
621 | 612 | revision='tip', conditions={'function': check_repo}, |
|
622 | 613 | requirements=URL_NAME_REQUIREMENTS) |
|
623 | 614 | |
|
624 | 615 | rmap.connect('changeset_patch_home', |
|
625 | 616 | '/{repo_name}/changeset-patch/{revision}', |
|
626 | 617 | controller='changeset', action='changeset_patch', |
|
627 | 618 | revision='tip', conditions={'function': check_repo}, |
|
628 | 619 | requirements=URL_NAME_REQUIREMENTS) |
|
629 | 620 | |
|
630 | 621 | rmap.connect('changeset_download_home', |
|
631 | 622 | '/{repo_name}/changeset-download/{revision}', |
|
632 | 623 | controller='changeset', action='changeset_download', |
|
633 | 624 | revision='tip', conditions={'function': check_repo}, |
|
634 | 625 | requirements=URL_NAME_REQUIREMENTS) |
|
635 | 626 | |
|
636 | 627 | rmap.connect('changeset_comment', |
|
637 | 628 | '/{repo_name}/changeset/{revision}/comment', jsroute=True, |
|
638 | 629 | controller='changeset', revision='tip', action='comment', |
|
639 | 630 | conditions={'function': check_repo}, |
|
640 | 631 | requirements=URL_NAME_REQUIREMENTS) |
|
641 | 632 | |
|
642 | 633 | rmap.connect('changeset_comment_preview', |
|
643 | 634 | '/{repo_name}/changeset/comment/preview', jsroute=True, |
|
644 | 635 | controller='changeset', action='preview_comment', |
|
645 | 636 | conditions={'function': check_repo, 'method': ['POST']}, |
|
646 | 637 | requirements=URL_NAME_REQUIREMENTS) |
|
647 | 638 | |
|
648 | 639 | rmap.connect('changeset_comment_delete', |
|
649 | 640 | '/{repo_name}/changeset/comment/{comment_id}/delete', |
|
650 | 641 | controller='changeset', action='delete_comment', |
|
651 | 642 | conditions={'function': check_repo, 'method': ['DELETE']}, |
|
652 | 643 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
653 | 644 | |
|
654 | 645 | rmap.connect('changeset_info', '/{repo_name}/changeset_info/{revision}', |
|
655 | 646 | controller='changeset', action='changeset_info', |
|
656 | 647 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
657 | 648 | |
|
658 | 649 | rmap.connect('compare_home', |
|
659 | 650 | '/{repo_name}/compare', |
|
660 | 651 | controller='compare', action='index', |
|
661 | 652 | conditions={'function': check_repo}, |
|
662 | 653 | requirements=URL_NAME_REQUIREMENTS) |
|
663 | 654 | |
|
664 | 655 | rmap.connect('compare_url', |
|
665 | 656 | '/{repo_name}/compare/{source_ref_type}@{source_ref:.*?}...{target_ref_type}@{target_ref:.*?}', |
|
666 | 657 | controller='compare', action='compare', |
|
667 | 658 | conditions={'function': check_repo}, |
|
668 | 659 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
669 | 660 | |
|
670 | 661 | rmap.connect('pullrequest_home', |
|
671 | 662 | '/{repo_name}/pull-request/new', controller='pullrequests', |
|
672 | 663 | action='index', conditions={'function': check_repo, |
|
673 | 664 | 'method': ['GET']}, |
|
674 | 665 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
675 | 666 | |
|
676 | 667 | rmap.connect('pullrequest', |
|
677 | 668 | '/{repo_name}/pull-request/new', controller='pullrequests', |
|
678 | 669 | action='create', conditions={'function': check_repo, |
|
679 | 670 | 'method': ['POST']}, |
|
680 | 671 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
681 | 672 | |
|
682 | 673 | rmap.connect('pullrequest_repo_refs', |
|
683 | 674 | '/{repo_name}/pull-request/refs/{target_repo_name:.*?[^/]}', |
|
684 | 675 | controller='pullrequests', |
|
685 | 676 | action='get_repo_refs', |
|
686 | 677 | conditions={'function': check_repo, 'method': ['GET']}, |
|
687 | 678 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
688 | 679 | |
|
689 | 680 | rmap.connect('pullrequest_repo_destinations', |
|
690 | 681 | '/{repo_name}/pull-request/repo-destinations', |
|
691 | 682 | controller='pullrequests', |
|
692 | 683 | action='get_repo_destinations', |
|
693 | 684 | conditions={'function': check_repo, 'method': ['GET']}, |
|
694 | 685 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
695 | 686 | |
|
696 | 687 | rmap.connect('pullrequest_show', |
|
697 | 688 | '/{repo_name}/pull-request/{pull_request_id}', |
|
698 | 689 | controller='pullrequests', |
|
699 | 690 | action='show', conditions={'function': check_repo, |
|
700 | 691 | 'method': ['GET']}, |
|
701 | 692 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
702 | 693 | |
|
703 | 694 | rmap.connect('pullrequest_update', |
|
704 | 695 | '/{repo_name}/pull-request/{pull_request_id}', |
|
705 | 696 | controller='pullrequests', |
|
706 | 697 | action='update', conditions={'function': check_repo, |
|
707 | 698 | 'method': ['PUT']}, |
|
708 | 699 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
709 | 700 | |
|
710 | 701 | rmap.connect('pullrequest_merge', |
|
711 | 702 | '/{repo_name}/pull-request/{pull_request_id}', |
|
712 | 703 | controller='pullrequests', |
|
713 | 704 | action='merge', conditions={'function': check_repo, |
|
714 | 705 | 'method': ['POST']}, |
|
715 | 706 | requirements=URL_NAME_REQUIREMENTS) |
|
716 | 707 | |
|
717 | 708 | rmap.connect('pullrequest_delete', |
|
718 | 709 | '/{repo_name}/pull-request/{pull_request_id}', |
|
719 | 710 | controller='pullrequests', |
|
720 | 711 | action='delete', conditions={'function': check_repo, |
|
721 | 712 | 'method': ['DELETE']}, |
|
722 | 713 | requirements=URL_NAME_REQUIREMENTS) |
|
723 | 714 | |
|
724 | 715 | rmap.connect('pullrequest_comment', |
|
725 | 716 | '/{repo_name}/pull-request-comment/{pull_request_id}', |
|
726 | 717 | controller='pullrequests', |
|
727 | 718 | action='comment', conditions={'function': check_repo, |
|
728 | 719 | 'method': ['POST']}, |
|
729 | 720 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
730 | 721 | |
|
731 | 722 | rmap.connect('pullrequest_comment_delete', |
|
732 | 723 | '/{repo_name}/pull-request-comment/{comment_id}/delete', |
|
733 | 724 | controller='pullrequests', action='delete_comment', |
|
734 | 725 | conditions={'function': check_repo, 'method': ['DELETE']}, |
|
735 | 726 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
736 | 727 | |
|
737 | 728 | rmap.connect('changelog_home', '/{repo_name}/changelog', jsroute=True, |
|
738 | 729 | controller='changelog', conditions={'function': check_repo}, |
|
739 | 730 | requirements=URL_NAME_REQUIREMENTS) |
|
740 | 731 | |
|
741 | 732 | rmap.connect('changelog_file_home', |
|
742 | 733 | '/{repo_name}/changelog/{revision}/{f_path}', |
|
743 | 734 | controller='changelog', f_path=None, |
|
744 | 735 | conditions={'function': check_repo}, |
|
745 | 736 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
746 | 737 | |
|
747 | 738 | rmap.connect('changelog_elements', '/{repo_name}/changelog_details', |
|
748 | 739 | controller='changelog', action='changelog_elements', |
|
749 | 740 | conditions={'function': check_repo}, |
|
750 | 741 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
751 | 742 | |
|
752 | 743 | rmap.connect('files_home', '/{repo_name}/files/{revision}/{f_path}', |
|
753 | 744 | controller='files', revision='tip', f_path='', |
|
754 | 745 | conditions={'function': check_repo}, |
|
755 | 746 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
756 | 747 | |
|
757 | 748 | rmap.connect('files_home_simple_catchrev', |
|
758 | 749 | '/{repo_name}/files/{revision}', |
|
759 | 750 | controller='files', revision='tip', f_path='', |
|
760 | 751 | conditions={'function': check_repo}, |
|
761 | 752 | requirements=URL_NAME_REQUIREMENTS) |
|
762 | 753 | |
|
763 | 754 | rmap.connect('files_home_simple_catchall', |
|
764 | 755 | '/{repo_name}/files', |
|
765 | 756 | controller='files', revision='tip', f_path='', |
|
766 | 757 | conditions={'function': check_repo}, |
|
767 | 758 | requirements=URL_NAME_REQUIREMENTS) |
|
768 | 759 | |
|
769 | 760 | rmap.connect('files_history_home', |
|
770 | 761 | '/{repo_name}/history/{revision}/{f_path}', |
|
771 | 762 | controller='files', action='history', revision='tip', f_path='', |
|
772 | 763 | conditions={'function': check_repo}, |
|
773 | 764 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
774 | 765 | |
|
775 | 766 | rmap.connect('files_authors_home', |
|
776 | 767 | '/{repo_name}/authors/{revision}/{f_path}', |
|
777 | 768 | controller='files', action='authors', revision='tip', f_path='', |
|
778 | 769 | conditions={'function': check_repo}, |
|
779 | 770 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
780 | 771 | |
|
781 | 772 | rmap.connect('files_diff_home', '/{repo_name}/diff/{f_path}', |
|
782 | 773 | controller='files', action='diff', f_path='', |
|
783 | 774 | conditions={'function': check_repo}, |
|
784 | 775 | requirements=URL_NAME_REQUIREMENTS) |
|
785 | 776 | |
|
786 | 777 | rmap.connect('files_diff_2way_home', |
|
787 | 778 | '/{repo_name}/diff-2way/{f_path}', |
|
788 | 779 | controller='files', action='diff_2way', f_path='', |
|
789 | 780 | conditions={'function': check_repo}, |
|
790 | 781 | requirements=URL_NAME_REQUIREMENTS) |
|
791 | 782 | |
|
792 | 783 | rmap.connect('files_rawfile_home', |
|
793 | 784 | '/{repo_name}/rawfile/{revision}/{f_path}', |
|
794 | 785 | controller='files', action='rawfile', revision='tip', |
|
795 | 786 | f_path='', conditions={'function': check_repo}, |
|
796 | 787 | requirements=URL_NAME_REQUIREMENTS) |
|
797 | 788 | |
|
798 | 789 | rmap.connect('files_raw_home', |
|
799 | 790 | '/{repo_name}/raw/{revision}/{f_path}', |
|
800 | 791 | controller='files', action='raw', revision='tip', f_path='', |
|
801 | 792 | conditions={'function': check_repo}, |
|
802 | 793 | requirements=URL_NAME_REQUIREMENTS) |
|
803 | 794 | |
|
804 | 795 | rmap.connect('files_render_home', |
|
805 | 796 | '/{repo_name}/render/{revision}/{f_path}', |
|
806 | 797 | controller='files', action='index', revision='tip', f_path='', |
|
807 | 798 | rendered=True, conditions={'function': check_repo}, |
|
808 | 799 | requirements=URL_NAME_REQUIREMENTS) |
|
809 | 800 | |
|
810 | 801 | rmap.connect('files_annotate_home', |
|
811 | 802 | '/{repo_name}/annotate/{revision}/{f_path}', |
|
812 | 803 | controller='files', action='index', revision='tip', |
|
813 | 804 | f_path='', annotate=True, conditions={'function': check_repo}, |
|
814 | 805 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
815 | 806 | |
|
816 | 807 | rmap.connect('files_annotate_previous', |
|
817 | 808 | '/{repo_name}/annotate-previous/{revision}/{f_path}', |
|
818 | 809 | controller='files', action='annotate_previous', revision='tip', |
|
819 | 810 | f_path='', annotate=True, conditions={'function': check_repo}, |
|
820 | 811 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
821 | 812 | |
|
822 | 813 | rmap.connect('files_edit', |
|
823 | 814 | '/{repo_name}/edit/{revision}/{f_path}', |
|
824 | 815 | controller='files', action='edit', revision='tip', |
|
825 | 816 | f_path='', |
|
826 | 817 | conditions={'function': check_repo, 'method': ['POST']}, |
|
827 | 818 | requirements=URL_NAME_REQUIREMENTS) |
|
828 | 819 | |
|
829 | 820 | rmap.connect('files_edit_home', |
|
830 | 821 | '/{repo_name}/edit/{revision}/{f_path}', |
|
831 | 822 | controller='files', action='edit_home', revision='tip', |
|
832 | 823 | f_path='', conditions={'function': check_repo}, |
|
833 | 824 | requirements=URL_NAME_REQUIREMENTS) |
|
834 | 825 | |
|
835 | 826 | rmap.connect('files_add', |
|
836 | 827 | '/{repo_name}/add/{revision}/{f_path}', |
|
837 | 828 | controller='files', action='add', revision='tip', |
|
838 | 829 | f_path='', |
|
839 | 830 | conditions={'function': check_repo, 'method': ['POST']}, |
|
840 | 831 | requirements=URL_NAME_REQUIREMENTS) |
|
841 | 832 | |
|
842 | 833 | rmap.connect('files_add_home', |
|
843 | 834 | '/{repo_name}/add/{revision}/{f_path}', |
|
844 | 835 | controller='files', action='add_home', revision='tip', |
|
845 | 836 | f_path='', conditions={'function': check_repo}, |
|
846 | 837 | requirements=URL_NAME_REQUIREMENTS) |
|
847 | 838 | |
|
848 | 839 | rmap.connect('files_delete', |
|
849 | 840 | '/{repo_name}/delete/{revision}/{f_path}', |
|
850 | 841 | controller='files', action='delete', revision='tip', |
|
851 | 842 | f_path='', |
|
852 | 843 | conditions={'function': check_repo, 'method': ['POST']}, |
|
853 | 844 | requirements=URL_NAME_REQUIREMENTS) |
|
854 | 845 | |
|
855 | 846 | rmap.connect('files_delete_home', |
|
856 | 847 | '/{repo_name}/delete/{revision}/{f_path}', |
|
857 | 848 | controller='files', action='delete_home', revision='tip', |
|
858 | 849 | f_path='', conditions={'function': check_repo}, |
|
859 | 850 | requirements=URL_NAME_REQUIREMENTS) |
|
860 | 851 | |
|
861 | 852 | rmap.connect('files_archive_home', '/{repo_name}/archive/{fname}', |
|
862 | 853 | controller='files', action='archivefile', |
|
863 | 854 | conditions={'function': check_repo}, |
|
864 | 855 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
865 | 856 | |
|
866 | 857 | rmap.connect('files_nodelist_home', |
|
867 | 858 | '/{repo_name}/nodelist/{revision}/{f_path}', |
|
868 | 859 | controller='files', action='nodelist', |
|
869 | 860 | conditions={'function': check_repo}, |
|
870 | 861 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
871 | 862 | |
|
872 | 863 | rmap.connect('files_nodetree_full', |
|
873 | 864 | '/{repo_name}/nodetree_full/{commit_id}/{f_path}', |
|
874 | 865 | controller='files', action='nodetree_full', |
|
875 | 866 | conditions={'function': check_repo}, |
|
876 | 867 | requirements=URL_NAME_REQUIREMENTS, jsroute=True) |
|
877 | 868 | |
|
878 | 869 | rmap.connect('repo_fork_create_home', '/{repo_name}/fork', |
|
879 | 870 | controller='forks', action='fork_create', |
|
880 | 871 | conditions={'function': check_repo, 'method': ['POST']}, |
|
881 | 872 | requirements=URL_NAME_REQUIREMENTS) |
|
882 | 873 | |
|
883 | 874 | rmap.connect('repo_fork_home', '/{repo_name}/fork', |
|
884 | 875 | controller='forks', action='fork', |
|
885 | 876 | conditions={'function': check_repo}, |
|
886 | 877 | requirements=URL_NAME_REQUIREMENTS) |
|
887 | 878 | |
|
888 | 879 | rmap.connect('repo_forks_home', '/{repo_name}/forks', |
|
889 | 880 | controller='forks', action='forks', |
|
890 | 881 | conditions={'function': check_repo}, |
|
891 | 882 | requirements=URL_NAME_REQUIREMENTS) |
|
892 | 883 | |
|
893 | 884 | return rmap |
@@ -1,174 +1,176 b'' | |||
|
1 | 1 | |
|
2 | 2 | /****************************************************************************** |
|
3 | 3 | * * |
|
4 | 4 | * DO NOT CHANGE THIS FILE MANUALLY * |
|
5 | 5 | * * |
|
6 | 6 | * * |
|
7 | 7 | * This file is automatically generated when the app starts up with * |
|
8 | 8 | * generate_js_files = true * |
|
9 | 9 | * * |
|
10 | 10 | * To add a route here pass jsroute=True to the route definition in the app * |
|
11 | 11 | * * |
|
12 | 12 | ******************************************************************************/ |
|
13 | 13 | function registerRCRoutes() { |
|
14 | 14 | // routes registration |
|
15 | 15 | pyroutes.register('new_repo', '/_admin/create_repository', []); |
|
16 | 16 | pyroutes.register('edit_user', '/_admin/users/%(user_id)s/edit', ['user_id']); |
|
17 | 17 | pyroutes.register('edit_user_group_members', '/_admin/user_groups/%(user_group_id)s/edit/members', ['user_group_id']); |
|
18 | 18 | pyroutes.register('toggle_following', '/_admin/toggle_following', []); |
|
19 | 19 | pyroutes.register('changeset_home', '/%(repo_name)s/changeset/%(revision)s', ['repo_name', 'revision']); |
|
20 | 20 | pyroutes.register('changeset_comment', '/%(repo_name)s/changeset/%(revision)s/comment', ['repo_name', 'revision']); |
|
21 | 21 | pyroutes.register('changeset_comment_preview', '/%(repo_name)s/changeset/comment/preview', ['repo_name']); |
|
22 | 22 | pyroutes.register('changeset_comment_delete', '/%(repo_name)s/changeset/comment/%(comment_id)s/delete', ['repo_name', 'comment_id']); |
|
23 | 23 | pyroutes.register('changeset_info', '/%(repo_name)s/changeset_info/%(revision)s', ['repo_name', 'revision']); |
|
24 | 24 | pyroutes.register('compare_url', '/%(repo_name)s/compare/%(source_ref_type)s@%(source_ref)s...%(target_ref_type)s@%(target_ref)s', ['repo_name', 'source_ref_type', 'source_ref', 'target_ref_type', 'target_ref']); |
|
25 | 25 | pyroutes.register('pullrequest_home', '/%(repo_name)s/pull-request/new', ['repo_name']); |
|
26 | 26 | pyroutes.register('pullrequest', '/%(repo_name)s/pull-request/new', ['repo_name']); |
|
27 | 27 | pyroutes.register('pullrequest_repo_refs', '/%(repo_name)s/pull-request/refs/%(target_repo_name)s', ['repo_name', 'target_repo_name']); |
|
28 | 28 | pyroutes.register('pullrequest_repo_destinations', '/%(repo_name)s/pull-request/repo-destinations', ['repo_name']); |
|
29 | 29 | pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); |
|
30 | 30 | pyroutes.register('pullrequest_update', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); |
|
31 | 31 | pyroutes.register('pullrequest_comment', '/%(repo_name)s/pull-request-comment/%(pull_request_id)s', ['repo_name', 'pull_request_id']); |
|
32 | 32 | pyroutes.register('pullrequest_comment_delete', '/%(repo_name)s/pull-request-comment/%(comment_id)s/delete', ['repo_name', 'comment_id']); |
|
33 | 33 | pyroutes.register('changelog_home', '/%(repo_name)s/changelog', ['repo_name']); |
|
34 | 34 | pyroutes.register('changelog_file_home', '/%(repo_name)s/changelog/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
35 | 35 | pyroutes.register('changelog_elements', '/%(repo_name)s/changelog_details', ['repo_name']); |
|
36 | 36 | pyroutes.register('files_home', '/%(repo_name)s/files/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
37 | 37 | pyroutes.register('files_history_home', '/%(repo_name)s/history/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
38 | 38 | pyroutes.register('files_authors_home', '/%(repo_name)s/authors/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
39 | 39 | pyroutes.register('files_annotate_home', '/%(repo_name)s/annotate/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
40 | 40 | pyroutes.register('files_annotate_previous', '/%(repo_name)s/annotate-previous/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
41 | 41 | pyroutes.register('files_archive_home', '/%(repo_name)s/archive/%(fname)s', ['repo_name', 'fname']); |
|
42 | 42 | pyroutes.register('files_nodelist_home', '/%(repo_name)s/nodelist/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
43 | 43 | pyroutes.register('files_nodetree_full', '/%(repo_name)s/nodetree_full/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
44 | 44 | pyroutes.register('favicon', '/favicon.ico', []); |
|
45 | 45 | pyroutes.register('robots', '/robots.txt', []); |
|
46 | 46 | pyroutes.register('auth_home', '/_admin/auth*traverse', []); |
|
47 | 47 | pyroutes.register('global_integrations_new', '/_admin/integrations/new', []); |
|
48 | 48 | pyroutes.register('global_integrations_home', '/_admin/integrations', []); |
|
49 | 49 | pyroutes.register('global_integrations_list', '/_admin/integrations/%(integration)s', ['integration']); |
|
50 | 50 | pyroutes.register('global_integrations_create', '/_admin/integrations/%(integration)s/new', ['integration']); |
|
51 | 51 | pyroutes.register('global_integrations_edit', '/_admin/integrations/%(integration)s/%(integration_id)s', ['integration', 'integration_id']); |
|
52 | 52 | pyroutes.register('repo_group_integrations_home', '/%(repo_group_name)s/settings/integrations', ['repo_group_name']); |
|
53 | 53 | pyroutes.register('repo_group_integrations_list', '/%(repo_group_name)s/settings/integrations/%(integration)s', ['repo_group_name', 'integration']); |
|
54 | 54 | pyroutes.register('repo_group_integrations_new', '/%(repo_group_name)s/settings/integrations/new', ['repo_group_name']); |
|
55 | 55 | pyroutes.register('repo_group_integrations_create', '/%(repo_group_name)s/settings/integrations/%(integration)s/new', ['repo_group_name', 'integration']); |
|
56 | 56 | pyroutes.register('repo_group_integrations_edit', '/%(repo_group_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_group_name', 'integration', 'integration_id']); |
|
57 | 57 | pyroutes.register('repo_integrations_home', '/%(repo_name)s/settings/integrations', ['repo_name']); |
|
58 | 58 | pyroutes.register('repo_integrations_list', '/%(repo_name)s/settings/integrations/%(integration)s', ['repo_name', 'integration']); |
|
59 | 59 | pyroutes.register('repo_integrations_new', '/%(repo_name)s/settings/integrations/new', ['repo_name']); |
|
60 | 60 | pyroutes.register('repo_integrations_create', '/%(repo_name)s/settings/integrations/%(integration)s/new', ['repo_name', 'integration']); |
|
61 | 61 | pyroutes.register('repo_integrations_edit', '/%(repo_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_name', 'integration', 'integration_id']); |
|
62 | 62 | pyroutes.register('ops_ping', '/_admin/ops/ping', []); |
|
63 | 63 | pyroutes.register('admin_home', '/_admin', []); |
|
64 | 64 | pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []); |
|
65 | 65 | pyroutes.register('pull_requests_global_0', '/_admin/pull_requests/%(pull_request_id)s', ['pull_request_id']); |
|
66 | 66 | pyroutes.register('pull_requests_global_1', '/_admin/pull-requests/%(pull_request_id)s', ['pull_request_id']); |
|
67 | 67 | pyroutes.register('pull_requests_global', '/_admin/pull-request/%(pull_request_id)s', ['pull_request_id']); |
|
68 | 68 | pyroutes.register('admin_settings_open_source', '/_admin/settings/open_source', []); |
|
69 | 69 | pyroutes.register('admin_settings_vcs_svn_generate_cfg', '/_admin/settings/vcs/svn_generate_cfg', []); |
|
70 | 70 | pyroutes.register('admin_settings_system', '/_admin/settings/system', []); |
|
71 | 71 | pyroutes.register('admin_settings_system_update', '/_admin/settings/system/updates', []); |
|
72 | 72 | pyroutes.register('admin_settings_sessions', '/_admin/settings/sessions', []); |
|
73 | 73 | pyroutes.register('admin_settings_sessions_cleanup', '/_admin/settings/sessions/cleanup', []); |
|
74 | 74 | pyroutes.register('admin_settings_process_management', '/_admin/settings/process_management', []); |
|
75 | 75 | pyroutes.register('admin_settings_process_management_signal', '/_admin/settings/process_management/signal', []); |
|
76 | 76 | pyroutes.register('admin_permissions_ips', '/_admin/permissions/ips', []); |
|
77 | 77 | pyroutes.register('users', '/_admin/users', []); |
|
78 | 78 | pyroutes.register('users_data', '/_admin/users_data', []); |
|
79 | 79 | pyroutes.register('edit_user_auth_tokens', '/_admin/users/%(user_id)s/edit/auth_tokens', ['user_id']); |
|
80 | 80 | pyroutes.register('edit_user_auth_tokens_add', '/_admin/users/%(user_id)s/edit/auth_tokens/new', ['user_id']); |
|
81 | 81 | pyroutes.register('edit_user_auth_tokens_delete', '/_admin/users/%(user_id)s/edit/auth_tokens/delete', ['user_id']); |
|
82 | 82 | pyroutes.register('edit_user_emails', '/_admin/users/%(user_id)s/edit/emails', ['user_id']); |
|
83 | 83 | pyroutes.register('edit_user_emails_add', '/_admin/users/%(user_id)s/edit/emails/new', ['user_id']); |
|
84 | 84 | pyroutes.register('edit_user_emails_delete', '/_admin/users/%(user_id)s/edit/emails/delete', ['user_id']); |
|
85 | 85 | pyroutes.register('edit_user_ips', '/_admin/users/%(user_id)s/edit/ips', ['user_id']); |
|
86 | 86 | pyroutes.register('edit_user_ips_add', '/_admin/users/%(user_id)s/edit/ips/new', ['user_id']); |
|
87 | 87 | pyroutes.register('edit_user_ips_delete', '/_admin/users/%(user_id)s/edit/ips/delete', ['user_id']); |
|
88 | 88 | pyroutes.register('edit_user_groups_management', '/_admin/users/%(user_id)s/edit/groups_management', ['user_id']); |
|
89 | 89 | pyroutes.register('edit_user_groups_management_updates', '/_admin/users/%(user_id)s/edit/edit_user_groups_management/updates', ['user_id']); |
|
90 | 90 | pyroutes.register('edit_user_audit_logs', '/_admin/users/%(user_id)s/edit/audit', ['user_id']); |
|
91 | 91 | pyroutes.register('channelstream_connect', '/_admin/channelstream/connect', []); |
|
92 | 92 | pyroutes.register('channelstream_subscribe', '/_admin/channelstream/subscribe', []); |
|
93 | 93 | pyroutes.register('channelstream_proxy', '/_channelstream', []); |
|
94 | 94 | pyroutes.register('login', '/_admin/login', []); |
|
95 | 95 | pyroutes.register('logout', '/_admin/logout', []); |
|
96 | 96 | pyroutes.register('register', '/_admin/register', []); |
|
97 | 97 | pyroutes.register('reset_password', '/_admin/password_reset', []); |
|
98 | 98 | pyroutes.register('reset_password_confirmation', '/_admin/password_reset_confirmation', []); |
|
99 | 99 | pyroutes.register('home', '/', []); |
|
100 | 100 | pyroutes.register('user_autocomplete_data', '/_users', []); |
|
101 | 101 | pyroutes.register('user_group_autocomplete_data', '/_user_groups', []); |
|
102 | 102 | pyroutes.register('repo_list_data', '/_repos', []); |
|
103 | 103 | pyroutes.register('goto_switcher_data', '/_goto_data', []); |
|
104 | 104 | pyroutes.register('repo_summary_explicit', '/%(repo_name)s/summary', ['repo_name']); |
|
105 | 105 | pyroutes.register('repo_summary_commits', '/%(repo_name)s/summary-commits', ['repo_name']); |
|
106 | 106 | pyroutes.register('repo_commit', '/%(repo_name)s/changeset/%(commit_id)s', ['repo_name', 'commit_id']); |
|
107 | 107 | pyroutes.register('repo_refs_data', '/%(repo_name)s/refs-data', ['repo_name']); |
|
108 | 108 | pyroutes.register('repo_refs_changelog_data', '/%(repo_name)s/refs-data-changelog', ['repo_name']); |
|
109 | 109 | pyroutes.register('repo_stats', '/%(repo_name)s/repo_stats/%(commit_id)s', ['repo_name', 'commit_id']); |
|
110 | 110 | pyroutes.register('tags_home', '/%(repo_name)s/tags', ['repo_name']); |
|
111 | 111 | pyroutes.register('branches_home', '/%(repo_name)s/branches', ['repo_name']); |
|
112 | 112 | pyroutes.register('bookmarks_home', '/%(repo_name)s/bookmarks', ['repo_name']); |
|
113 | 113 | pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); |
|
114 | 114 | pyroutes.register('pullrequest_show_all', '/%(repo_name)s/pull-request', ['repo_name']); |
|
115 | 115 | pyroutes.register('pullrequest_show_all_data', '/%(repo_name)s/pull-request-data', ['repo_name']); |
|
116 | 116 | pyroutes.register('changeset_home', '/%(repo_name)s/changeset/%(revision)s', ['repo_name', 'revision']); |
|
117 | 117 | pyroutes.register('changeset_children', '/%(repo_name)s/changeset_children/%(revision)s', ['repo_name', 'revision']); |
|
118 | 118 | pyroutes.register('changeset_parents', '/%(repo_name)s/changeset_parents/%(revision)s', ['repo_name', 'revision']); |
|
119 | 119 | pyroutes.register('edit_repo', '/%(repo_name)s/settings', ['repo_name']); |
|
120 | 120 | pyroutes.register('edit_repo_advanced', '/%(repo_name)s/settings/advanced', ['repo_name']); |
|
121 | 121 | pyroutes.register('edit_repo_advanced_delete', '/%(repo_name)s/settings/advanced/delete', ['repo_name']); |
|
122 | 122 | pyroutes.register('edit_repo_advanced_locking', '/%(repo_name)s/settings/advanced/locking', ['repo_name']); |
|
123 | 123 | pyroutes.register('edit_repo_advanced_journal', '/%(repo_name)s/settings/advanced/journal', ['repo_name']); |
|
124 | 124 | pyroutes.register('edit_repo_advanced_fork', '/%(repo_name)s/settings/advanced/fork', ['repo_name']); |
|
125 | 125 | pyroutes.register('edit_repo_caches', '/%(repo_name)s/settings/caches', ['repo_name']); |
|
126 | 126 | pyroutes.register('edit_repo_perms', '/%(repo_name)s/settings/permissions', ['repo_name']); |
|
127 | 127 | pyroutes.register('repo_reviewers', '/%(repo_name)s/settings/review/rules', ['repo_name']); |
|
128 | 128 | pyroutes.register('repo_default_reviewers_data', '/%(repo_name)s/settings/review/default-reviewers', ['repo_name']); |
|
129 | 129 | pyroutes.register('repo_maintenance', '/%(repo_name)s/settings/maintenance', ['repo_name']); |
|
130 | 130 | pyroutes.register('repo_maintenance_execute', '/%(repo_name)s/settings/maintenance/execute', ['repo_name']); |
|
131 | 131 | pyroutes.register('strip', '/%(repo_name)s/settings/strip', ['repo_name']); |
|
132 | 132 | pyroutes.register('strip_check', '/%(repo_name)s/settings/strip_check', ['repo_name']); |
|
133 | 133 | pyroutes.register('strip_execute', '/%(repo_name)s/settings/strip_execute', ['repo_name']); |
|
134 | 134 | pyroutes.register('rss_feed_home', '/%(repo_name)s/feed/rss', ['repo_name']); |
|
135 | 135 | pyroutes.register('atom_feed_home', '/%(repo_name)s/feed/atom', ['repo_name']); |
|
136 | 136 | pyroutes.register('repo_summary', '/%(repo_name)s', ['repo_name']); |
|
137 | 137 | pyroutes.register('repo_summary_slash', '/%(repo_name)s/', ['repo_name']); |
|
138 | 138 | pyroutes.register('repo_group_home', '/%(repo_group_name)s', ['repo_group_name']); |
|
139 | 139 | pyroutes.register('repo_group_home_slash', '/%(repo_group_name)s/', ['repo_group_name']); |
|
140 | 140 | pyroutes.register('search', '/_admin/search', []); |
|
141 | 141 | pyroutes.register('search_repo', '/%(repo_name)s/search', ['repo_name']); |
|
142 | 142 | pyroutes.register('user_profile', '/_profiles/%(username)s', ['username']); |
|
143 | 143 | pyroutes.register('my_account_profile', '/_admin/my_account/profile', []); |
|
144 | 144 | pyroutes.register('my_account_edit', '/_admin/my_account/edit', []); |
|
145 | 145 | pyroutes.register('my_account_update', '/_admin/my_account/update', []); |
|
146 | 146 | pyroutes.register('my_account_password', '/_admin/my_account/password', []); |
|
147 | 147 | pyroutes.register('my_account_password_update', '/_admin/my_account/password', []); |
|
148 | 148 | pyroutes.register('my_account_auth_tokens', '/_admin/my_account/auth_tokens', []); |
|
149 | 149 | pyroutes.register('my_account_auth_tokens_add', '/_admin/my_account/auth_tokens/new', []); |
|
150 | 150 | pyroutes.register('my_account_auth_tokens_delete', '/_admin/my_account/auth_tokens/delete', []); |
|
151 | 151 | pyroutes.register('my_account_emails', '/_admin/my_account/emails', []); |
|
152 | 152 | pyroutes.register('my_account_emails_add', '/_admin/my_account/emails/new', []); |
|
153 | 153 | pyroutes.register('my_account_emails_delete', '/_admin/my_account/emails/delete', []); |
|
154 | 154 | pyroutes.register('my_account_repos', '/_admin/my_account/repos', []); |
|
155 | 155 | pyroutes.register('my_account_watched', '/_admin/my_account/watched', []); |
|
156 | 156 | pyroutes.register('my_account_perms', '/_admin/my_account/perms', []); |
|
157 | 157 | pyroutes.register('my_account_notifications', '/_admin/my_account/notifications', []); |
|
158 | 158 | pyroutes.register('my_account_notifications_toggle_visibility', '/_admin/my_account/toggle_visibility', []); |
|
159 | 159 | pyroutes.register('my_account_pullrequests', '/_admin/my_account/pull_requests', []); |
|
160 | 160 | pyroutes.register('my_account_pullrequests_data', '/_admin/my_account/pull_requests/data', []); |
|
161 | 161 | pyroutes.register('my_account_notifications_test_channelstream', '/_admin/my_account/test_channelstream', []); |
|
162 | 162 | pyroutes.register('gists_show', '/_admin/gists', []); |
|
163 | 163 | pyroutes.register('gists_new', '/_admin/gists/new', []); |
|
164 | 164 | pyroutes.register('gists_create', '/_admin/gists/create', []); |
|
165 | 165 | pyroutes.register('gist_show', '/_admin/gists/%(gist_id)s', ['gist_id']); |
|
166 | 166 | pyroutes.register('gist_delete', '/_admin/gists/%(gist_id)s/delete', ['gist_id']); |
|
167 | 167 | pyroutes.register('gist_edit', '/_admin/gists/%(gist_id)s/edit', ['gist_id']); |
|
168 | 168 | pyroutes.register('gist_edit_check_revision', '/_admin/gists/%(gist_id)s/edit/check_revision', ['gist_id']); |
|
169 | 169 | pyroutes.register('gist_update', '/_admin/gists/%(gist_id)s/update', ['gist_id']); |
|
170 | 170 | pyroutes.register('gist_show_rev', '/_admin/gists/%(gist_id)s/%(revision)s', ['gist_id', 'revision']); |
|
171 | 171 | pyroutes.register('gist_show_formatted', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s', ['gist_id', 'revision', 'format']); |
|
172 | 172 | pyroutes.register('gist_show_formatted_path', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s/%(f_path)s', ['gist_id', 'revision', 'format', 'f_path']); |
|
173 | pyroutes.register('debug_style_home', '/_admin/debug_style', []); | |
|
174 | pyroutes.register('debug_style_template', '/_admin/debug_style/t/%(t_path)s', ['t_path']); | |
|
173 | 175 | pyroutes.register('apiv2', '/_admin/api', []); |
|
174 | 176 | } |
@@ -1,604 +1,604 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="root.mako"/> |
|
3 | 3 | |
|
4 | 4 | <div class="outerwrapper"> |
|
5 | 5 | <!-- HEADER --> |
|
6 | 6 | <div class="header"> |
|
7 | 7 | <div id="header-inner" class="wrapper"> |
|
8 | 8 | <div id="logo"> |
|
9 | 9 | <div class="logo-wrapper"> |
|
10 | 10 | <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a> |
|
11 | 11 | </div> |
|
12 | 12 | %if c.rhodecode_name: |
|
13 | 13 | <div class="branding">- ${h.branding(c.rhodecode_name)}</div> |
|
14 | 14 | %endif |
|
15 | 15 | </div> |
|
16 | 16 | <!-- MENU BAR NAV --> |
|
17 | 17 | ${self.menu_bar_nav()} |
|
18 | 18 | <!-- END MENU BAR NAV --> |
|
19 | 19 | </div> |
|
20 | 20 | </div> |
|
21 | 21 | ${self.menu_bar_subnav()} |
|
22 | 22 | <!-- END HEADER --> |
|
23 | 23 | |
|
24 | 24 | <!-- CONTENT --> |
|
25 | 25 | <div id="content" class="wrapper"> |
|
26 | 26 | |
|
27 | 27 | <rhodecode-toast id="notifications"></rhodecode-toast> |
|
28 | 28 | |
|
29 | 29 | <div class="main"> |
|
30 | 30 | ${next.main()} |
|
31 | 31 | </div> |
|
32 | 32 | </div> |
|
33 | 33 | <!-- END CONTENT --> |
|
34 | 34 | |
|
35 | 35 | </div> |
|
36 | 36 | <!-- FOOTER --> |
|
37 | 37 | <div id="footer"> |
|
38 | 38 | <div id="footer-inner" class="title wrapper"> |
|
39 | 39 | <div> |
|
40 | 40 | <p class="footer-link-right"> |
|
41 | 41 | % if c.visual.show_version: |
|
42 | 42 | RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition} |
|
43 | 43 | % endif |
|
44 | 44 | © 2010-${h.datetime.today().year}, <a href="${h.route_url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved. |
|
45 | 45 | % if c.visual.rhodecode_support_url: |
|
46 | 46 | <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a> |
|
47 | 47 | % endif |
|
48 | 48 | </p> |
|
49 | 49 | <% sid = 'block' if request.GET.get('showrcid') else 'none' %> |
|
50 | 50 | <p class="server-instance" style="display:${sid}"> |
|
51 | 51 | ## display hidden instance ID if specially defined |
|
52 | 52 | % if c.rhodecode_instanceid: |
|
53 | 53 | ${_('RhodeCode instance id: %s') % c.rhodecode_instanceid} |
|
54 | 54 | % endif |
|
55 | 55 | </p> |
|
56 | 56 | </div> |
|
57 | 57 | </div> |
|
58 | 58 | </div> |
|
59 | 59 | |
|
60 | 60 | <!-- END FOOTER --> |
|
61 | 61 | |
|
62 | 62 | ### MAKO DEFS ### |
|
63 | 63 | |
|
64 | 64 | <%def name="menu_bar_subnav()"> |
|
65 | 65 | </%def> |
|
66 | 66 | |
|
67 | 67 | <%def name="breadcrumbs(class_='breadcrumbs')"> |
|
68 | 68 | <div class="${class_}"> |
|
69 | 69 | ${self.breadcrumbs_links()} |
|
70 | 70 | </div> |
|
71 | 71 | </%def> |
|
72 | 72 | |
|
73 | 73 | <%def name="admin_menu()"> |
|
74 | 74 | <ul class="admin_menu submenu"> |
|
75 | 75 | <li><a href="${h.route_path('admin_audit_logs')}">${_('Admin audit logs')}</a></li> |
|
76 | 76 | <li><a href="${h.url('repos')}">${_('Repositories')}</a></li> |
|
77 | 77 | <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li> |
|
78 | 78 | <li><a href="${h.route_path('users')}">${_('Users')}</a></li> |
|
79 | 79 | <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li> |
|
80 | 80 | <li><a href="${h.url('admin_permissions_application')}">${_('Permissions')}</a></li> |
|
81 | 81 | <li><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li> |
|
82 | 82 | <li><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li> |
|
83 | 83 | <li><a href="${h.url('admin_defaults_repositories')}">${_('Defaults')}</a></li> |
|
84 | 84 | <li class="last"><a href="${h.url('admin_settings')}">${_('Settings')}</a></li> |
|
85 | 85 | </ul> |
|
86 | 86 | </%def> |
|
87 | 87 | |
|
88 | 88 | |
|
89 | 89 | <%def name="dt_info_panel(elements)"> |
|
90 | 90 | <dl class="dl-horizontal"> |
|
91 | 91 | %for dt, dd, title, show_items in elements: |
|
92 | 92 | <dt>${dt}:</dt> |
|
93 | 93 | <dd title="${h.tooltip(title)}"> |
|
94 | 94 | %if callable(dd): |
|
95 | 95 | ## allow lazy evaluation of elements |
|
96 | 96 | ${dd()} |
|
97 | 97 | %else: |
|
98 | 98 | ${dd} |
|
99 | 99 | %endif |
|
100 | 100 | %if show_items: |
|
101 | 101 | <span class="btn-collapse" data-toggle="item-${h.md5_safe(dt)[:6]}-details">${_('Show More')} </span> |
|
102 | 102 | %endif |
|
103 | 103 | </dd> |
|
104 | 104 | |
|
105 | 105 | %if show_items: |
|
106 | 106 | <div class="collapsable-content" data-toggle="item-${h.md5_safe(dt)[:6]}-details" style="display: none"> |
|
107 | 107 | %for item in show_items: |
|
108 | 108 | <dt></dt> |
|
109 | 109 | <dd>${item}</dd> |
|
110 | 110 | %endfor |
|
111 | 111 | </div> |
|
112 | 112 | %endif |
|
113 | 113 | |
|
114 | 114 | %endfor |
|
115 | 115 | </dl> |
|
116 | 116 | </%def> |
|
117 | 117 | |
|
118 | 118 | |
|
119 | 119 | <%def name="gravatar(email, size=16)"> |
|
120 | 120 | <% |
|
121 | 121 | if (size > 16): |
|
122 | 122 | gravatar_class = 'gravatar gravatar-large' |
|
123 | 123 | else: |
|
124 | 124 | gravatar_class = 'gravatar' |
|
125 | 125 | %> |
|
126 | 126 | <%doc> |
|
127 | 127 | TODO: johbo: For now we serve double size images to make it smooth |
|
128 | 128 | for retina. This is how it worked until now. Should be replaced |
|
129 | 129 | with a better solution at some point. |
|
130 | 130 | </%doc> |
|
131 | 131 | <img class="${gravatar_class}" src="${h.gravatar_url(email, size * 2)}" height="${size}" width="${size}"> |
|
132 | 132 | </%def> |
|
133 | 133 | |
|
134 | 134 | |
|
135 | 135 | <%def name="gravatar_with_user(contact, size=16, show_disabled=False)"> |
|
136 | 136 | <% email = h.email_or_none(contact) %> |
|
137 | 137 | <div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}"> |
|
138 | 138 | ${self.gravatar(email, size)} |
|
139 | 139 | <span class="${'user user-disabled' if show_disabled else 'user'}"> ${h.link_to_user(contact)}</span> |
|
140 | 140 | </div> |
|
141 | 141 | </%def> |
|
142 | 142 | |
|
143 | 143 | |
|
144 | 144 | ## admin menu used for people that have some admin resources |
|
145 | 145 | <%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)"> |
|
146 | 146 | <ul class="submenu"> |
|
147 | 147 | %if repositories: |
|
148 | 148 | <li class="local-admin-repos"><a href="${h.url('repos')}">${_('Repositories')}</a></li> |
|
149 | 149 | %endif |
|
150 | 150 | %if repository_groups: |
|
151 | 151 | <li class="local-admin-repo-groups"><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li> |
|
152 | 152 | %endif |
|
153 | 153 | %if user_groups: |
|
154 | 154 | <li class="local-admin-user-groups"><a href="${h.url('users_groups')}">${_('User groups')}</a></li> |
|
155 | 155 | %endif |
|
156 | 156 | </ul> |
|
157 | 157 | </%def> |
|
158 | 158 | |
|
159 | 159 | <%def name="repo_page_title(repo_instance)"> |
|
160 | 160 | <div class="title-content"> |
|
161 | 161 | <div class="title-main"> |
|
162 | 162 | ## SVN/HG/GIT icons |
|
163 | 163 | %if h.is_hg(repo_instance): |
|
164 | 164 | <i class="icon-hg"></i> |
|
165 | 165 | %endif |
|
166 | 166 | %if h.is_git(repo_instance): |
|
167 | 167 | <i class="icon-git"></i> |
|
168 | 168 | %endif |
|
169 | 169 | %if h.is_svn(repo_instance): |
|
170 | 170 | <i class="icon-svn"></i> |
|
171 | 171 | %endif |
|
172 | 172 | |
|
173 | 173 | ## public/private |
|
174 | 174 | %if repo_instance.private: |
|
175 | 175 | <i class="icon-repo-private"></i> |
|
176 | 176 | %else: |
|
177 | 177 | <i class="icon-repo-public"></i> |
|
178 | 178 | %endif |
|
179 | 179 | |
|
180 | 180 | ## repo name with group name |
|
181 | 181 | ${h.breadcrumb_repo_link(c.rhodecode_db_repo)} |
|
182 | 182 | |
|
183 | 183 | </div> |
|
184 | 184 | |
|
185 | 185 | ## FORKED |
|
186 | 186 | %if repo_instance.fork: |
|
187 | 187 | <p> |
|
188 | 188 | <i class="icon-code-fork"></i> ${_('Fork of')} |
|
189 | 189 | <a href="${h.route_path('repo_summary',repo_name=repo_instance.fork.repo_name)}">${repo_instance.fork.repo_name}</a> |
|
190 | 190 | </p> |
|
191 | 191 | %endif |
|
192 | 192 | |
|
193 | 193 | ## IMPORTED FROM REMOTE |
|
194 | 194 | %if repo_instance.clone_uri: |
|
195 | 195 | <p> |
|
196 | 196 | <i class="icon-code-fork"></i> ${_('Clone from')} |
|
197 | 197 | <a href="${h.url(h.safe_str(h.hide_credentials(repo_instance.clone_uri)))}">${h.hide_credentials(repo_instance.clone_uri)}</a> |
|
198 | 198 | </p> |
|
199 | 199 | %endif |
|
200 | 200 | |
|
201 | 201 | ## LOCKING STATUS |
|
202 | 202 | %if repo_instance.locked[0]: |
|
203 | 203 | <p class="locking_locked"> |
|
204 | 204 | <i class="icon-repo-lock"></i> |
|
205 | 205 | ${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}} |
|
206 | 206 | </p> |
|
207 | 207 | %elif repo_instance.enable_locking: |
|
208 | 208 | <p class="locking_unlocked"> |
|
209 | 209 | <i class="icon-repo-unlock"></i> |
|
210 | 210 | ${_('Repository not locked. Pull repository to lock it.')} |
|
211 | 211 | </p> |
|
212 | 212 | %endif |
|
213 | 213 | |
|
214 | 214 | </div> |
|
215 | 215 | </%def> |
|
216 | 216 | |
|
217 | 217 | <%def name="repo_menu(active=None)"> |
|
218 | 218 | <% |
|
219 | 219 | def is_active(selected): |
|
220 | 220 | if selected == active: |
|
221 | 221 | return "active" |
|
222 | 222 | %> |
|
223 | 223 | |
|
224 | 224 | <!--- CONTEXT BAR --> |
|
225 | 225 | <div id="context-bar"> |
|
226 | 226 | <div class="wrapper"> |
|
227 | 227 | <ul id="context-pages" class="horizontal-list navigation"> |
|
228 | 228 | <li class="${is_active('summary')}"><a class="menulink" href="${h.route_path('repo_summary', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li> |
|
229 | 229 | <li class="${is_active('changelog')}"><a class="menulink" href="${h.url('changelog_home', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li> |
|
230 | 230 | <li class="${is_active('files')}"><a class="menulink" href="${h.url('files_home', repo_name=c.repo_name, revision=c.rhodecode_db_repo.landing_rev[1])}"><div class="menulabel">${_('Files')}</div></a></li> |
|
231 | 231 | <li class="${is_active('compare')}"> |
|
232 | 232 | <a class="menulink" href="${h.url('compare_home',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a> |
|
233 | 233 | </li> |
|
234 | 234 | ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()" |
|
235 | 235 | %if c.rhodecode_db_repo.repo_type in ['git','hg']: |
|
236 | 236 | <li class="${is_active('showpullrequest')}"> |
|
237 | 237 | <a class="menulink" href="${h.route_path('pullrequest_show_all', repo_name=c.repo_name)}" title="${h.tooltip(_('Show Pull Requests for %s') % c.repo_name)}"> |
|
238 | 238 | %if c.repository_pull_requests: |
|
239 | 239 | <span class="pr_notifications">${c.repository_pull_requests}</span> |
|
240 | 240 | %endif |
|
241 | 241 | <div class="menulabel">${_('Pull Requests')}</div> |
|
242 | 242 | </a> |
|
243 | 243 | </li> |
|
244 | 244 | %endif |
|
245 | 245 | <li class="${is_active('options')}"> |
|
246 | 246 | <a class="menulink dropdown"> |
|
247 | 247 | <div class="menulabel">${_('Options')} <div class="show_more"></div></div> |
|
248 | 248 | </a> |
|
249 | 249 | <ul class="submenu"> |
|
250 | 250 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
251 | 251 | <li><a href="${h.route_path('edit_repo',repo_name=c.repo_name)}">${_('Settings')}</a></li> |
|
252 | 252 | %endif |
|
253 | 253 | %if c.rhodecode_db_repo.fork: |
|
254 | 254 | <li><a href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,source_ref_type=c.rhodecode_db_repo.landing_rev[0],source_ref=c.rhodecode_db_repo.landing_rev[1], target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], merge=1)}"> |
|
255 | 255 | ${_('Compare fork')}</a></li> |
|
256 | 256 | %endif |
|
257 | 257 | |
|
258 | 258 | <li><a href="${h.route_path('search_repo',repo_name=c.repo_name)}">${_('Search')}</a></li> |
|
259 | 259 | |
|
260 | 260 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking: |
|
261 | 261 | %if c.rhodecode_db_repo.locked[0]: |
|
262 | 262 | <li><a class="locking_del" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li> |
|
263 | 263 | %else: |
|
264 | 264 | <li><a class="locking_add" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Lock')}</a></li> |
|
265 | 265 | %endif |
|
266 | 266 | %endif |
|
267 | 267 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
268 | 268 | %if c.rhodecode_db_repo.repo_type in ['git','hg']: |
|
269 | 269 | <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}">${_('Fork')}</a></li> |
|
270 | 270 | <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li> |
|
271 | 271 | %endif |
|
272 | 272 | %endif |
|
273 | 273 | </ul> |
|
274 | 274 | </li> |
|
275 | 275 | </ul> |
|
276 | 276 | </div> |
|
277 | 277 | <div class="clear"></div> |
|
278 | 278 | </div> |
|
279 | 279 | <!--- END CONTEXT BAR --> |
|
280 | 280 | |
|
281 | 281 | </%def> |
|
282 | 282 | |
|
283 | 283 | <%def name="usermenu(active=False)"> |
|
284 | 284 | ## USER MENU |
|
285 | 285 | <li id="quick_login_li" class="${'active' if active else ''}"> |
|
286 | 286 | <a id="quick_login_link" class="menulink childs"> |
|
287 | 287 | ${gravatar(c.rhodecode_user.email, 20)} |
|
288 | 288 | <span class="user"> |
|
289 | 289 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
290 | 290 | <span class="menu_link_user">${c.rhodecode_user.username}</span><div class="show_more"></div> |
|
291 | 291 | %else: |
|
292 | 292 | <span>${_('Sign in')}</span> |
|
293 | 293 | %endif |
|
294 | 294 | </span> |
|
295 | 295 | </a> |
|
296 | 296 | |
|
297 | 297 | <div class="user-menu submenu"> |
|
298 | 298 | <div id="quick_login"> |
|
299 | 299 | %if c.rhodecode_user.username == h.DEFAULT_USER: |
|
300 | 300 | <h4>${_('Sign in to your account')}</h4> |
|
301 | 301 | ${h.form(h.route_path('login', _query={'came_from': h.url.current()}), needs_csrf_token=False)} |
|
302 | 302 | <div class="form form-vertical"> |
|
303 | 303 | <div class="fields"> |
|
304 | 304 | <div class="field"> |
|
305 | 305 | <div class="label"> |
|
306 | 306 | <label for="username">${_('Username')}:</label> |
|
307 | 307 | </div> |
|
308 | 308 | <div class="input"> |
|
309 | 309 | ${h.text('username',class_='focus',tabindex=1)} |
|
310 | 310 | </div> |
|
311 | 311 | |
|
312 | 312 | </div> |
|
313 | 313 | <div class="field"> |
|
314 | 314 | <div class="label"> |
|
315 | 315 | <label for="password">${_('Password')}:</label> |
|
316 | 316 | %if h.HasPermissionAny('hg.password_reset.enabled')(): |
|
317 | 317 | <span class="forgot_password">${h.link_to(_('(Forgot password?)'),h.route_path('reset_password'), class_='pwd_reset')}</span> |
|
318 | 318 | %endif |
|
319 | 319 | </div> |
|
320 | 320 | <div class="input"> |
|
321 | 321 | ${h.password('password',class_='focus',tabindex=2)} |
|
322 | 322 | </div> |
|
323 | 323 | </div> |
|
324 | 324 | <div class="buttons"> |
|
325 | 325 | <div class="register"> |
|
326 | 326 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
327 | 327 | ${h.link_to(_("Don't have an account?"),h.route_path('register'))} <br/> |
|
328 | 328 | %endif |
|
329 | 329 | ${h.link_to(_("Using external auth? Sign In here."),h.route_path('login'))} |
|
330 | 330 | </div> |
|
331 | 331 | <div class="submit"> |
|
332 | 332 | ${h.submit('sign_in',_('Sign In'),class_="btn btn-small",tabindex=3)} |
|
333 | 333 | </div> |
|
334 | 334 | </div> |
|
335 | 335 | </div> |
|
336 | 336 | </div> |
|
337 | 337 | ${h.end_form()} |
|
338 | 338 | %else: |
|
339 | 339 | <div class=""> |
|
340 | 340 | <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div> |
|
341 | 341 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> |
|
342 | 342 | <div class="email">${c.rhodecode_user.email}</div> |
|
343 | 343 | </div> |
|
344 | 344 | <div class=""> |
|
345 | 345 | <ol class="links"> |
|
346 | 346 | <li>${h.link_to(_(u'My account'),h.route_path('my_account_profile'))}</li> |
|
347 | 347 | % if c.rhodecode_user.personal_repo_group: |
|
348 | 348 | <li>${h.link_to(_(u'My personal group'), h.route_path('repo_group_home', repo_group_name=c.rhodecode_user.personal_repo_group.group_name))}</li> |
|
349 | 349 | % endif |
|
350 | 350 | <li class="logout"> |
|
351 | 351 | ${h.secure_form(h.route_path('logout'))} |
|
352 | 352 | ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")} |
|
353 | 353 | ${h.end_form()} |
|
354 | 354 | </li> |
|
355 | 355 | </ol> |
|
356 | 356 | </div> |
|
357 | 357 | %endif |
|
358 | 358 | </div> |
|
359 | 359 | </div> |
|
360 | 360 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
361 | 361 | <div class="pill_container"> |
|
362 | 362 | % if c.unread_notifications == 0: |
|
363 | 363 | <a class="menu_link_notifications empty" href="${h.url('notifications')}">${c.unread_notifications}</a> |
|
364 | 364 | % else: |
|
365 | 365 | <a class="menu_link_notifications" href="${h.url('notifications')}">${c.unread_notifications}</a> |
|
366 | 366 | % endif |
|
367 | 367 | </div> |
|
368 | 368 | % endif |
|
369 | 369 | </li> |
|
370 | 370 | </%def> |
|
371 | 371 | |
|
372 | 372 | <%def name="menu_items(active=None)"> |
|
373 | 373 | <% |
|
374 | 374 | def is_active(selected): |
|
375 | 375 | if selected == active: |
|
376 | 376 | return "active" |
|
377 | 377 | return "" |
|
378 | 378 | %> |
|
379 | 379 | <ul id="quick" class="main_nav navigation horizontal-list"> |
|
380 | 380 | <!-- repo switcher --> |
|
381 | 381 | <li class="${is_active('repositories')} repo_switcher_li has_select2"> |
|
382 | 382 | <input id="repo_switcher" name="repo_switcher" type="hidden"> |
|
383 | 383 | </li> |
|
384 | 384 | |
|
385 | 385 | ## ROOT MENU |
|
386 | 386 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
387 | 387 | <li class="${is_active('journal')}"> |
|
388 | 388 | <a class="menulink" title="${_('Show activity journal')}" href="${h.url('journal')}"> |
|
389 | 389 | <div class="menulabel">${_('Journal')}</div> |
|
390 | 390 | </a> |
|
391 | 391 | </li> |
|
392 | 392 | %else: |
|
393 | 393 | <li class="${is_active('journal')}"> |
|
394 | 394 | <a class="menulink" title="${_('Show Public activity journal')}" href="${h.url('public_journal')}"> |
|
395 | 395 | <div class="menulabel">${_('Public journal')}</div> |
|
396 | 396 | </a> |
|
397 | 397 | </li> |
|
398 | 398 | %endif |
|
399 | 399 | <li class="${is_active('gists')}"> |
|
400 | 400 | <a class="menulink childs" title="${_('Show Gists')}" href="${h.route_path('gists_show')}"> |
|
401 | 401 | <div class="menulabel">${_('Gists')}</div> |
|
402 | 402 | </a> |
|
403 | 403 | </li> |
|
404 | 404 | <li class="${is_active('search')}"> |
|
405 | 405 | <a class="menulink" title="${_('Search in repositories you have access to')}" href="${h.route_path('search')}"> |
|
406 | 406 | <div class="menulabel">${_('Search')}</div> |
|
407 | 407 | </a> |
|
408 | 408 | </li> |
|
409 | 409 | % if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
410 | 410 | <li class="${is_active('admin')}"> |
|
411 | 411 | <a class="menulink childs" title="${_('Admin settings')}" href="#" onclick="return false;"> |
|
412 | 412 | <div class="menulabel">${_('Admin')} <div class="show_more"></div></div> |
|
413 | 413 | </a> |
|
414 | 414 | ${admin_menu()} |
|
415 | 415 | </li> |
|
416 | 416 | % elif c.rhodecode_user.repositories_admin or c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin: |
|
417 | 417 | <li class="${is_active('admin')}"> |
|
418 | 418 | <a class="menulink childs" title="${_('Delegated Admin settings')}"> |
|
419 | 419 | <div class="menulabel">${_('Admin')} <div class="show_more"></div></div> |
|
420 | 420 | </a> |
|
421 | 421 | ${admin_menu_simple(c.rhodecode_user.repositories_admin, |
|
422 | 422 | c.rhodecode_user.repository_groups_admin, |
|
423 | 423 | c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())} |
|
424 | 424 | </li> |
|
425 | 425 | % endif |
|
426 | 426 | % if c.debug_style: |
|
427 | 427 | <li class="${is_active('debug_style')}"> |
|
428 |
<a class="menulink" title="${_('Style')}" href="${h. |
|
|
428 | <a class="menulink" title="${_('Style')}" href="${h.route_path('debug_style_home')}"> | |
|
429 | 429 | <div class="menulabel">${_('Style')}</div> |
|
430 | 430 | </a> |
|
431 | 431 | </li> |
|
432 | 432 | % endif |
|
433 | 433 | ## render extra user menu |
|
434 | 434 | ${usermenu(active=(active=='my_account'))} |
|
435 | 435 | </ul> |
|
436 | 436 | |
|
437 | 437 | <script type="text/javascript"> |
|
438 | 438 | var visual_show_public_icon = "${c.visual.show_public_icon}" == "True"; |
|
439 | 439 | |
|
440 | 440 | /*format the look of items in the list*/ |
|
441 | 441 | var format = function(state, escapeMarkup){ |
|
442 | 442 | if (!state.id){ |
|
443 | 443 | return state.text; // optgroup |
|
444 | 444 | } |
|
445 | 445 | var obj_dict = state.obj; |
|
446 | 446 | var tmpl = ''; |
|
447 | 447 | |
|
448 | 448 | if(obj_dict && state.type == 'repo'){ |
|
449 | 449 | if(obj_dict['repo_type'] === 'hg'){ |
|
450 | 450 | tmpl += '<i class="icon-hg"></i> '; |
|
451 | 451 | } |
|
452 | 452 | else if(obj_dict['repo_type'] === 'git'){ |
|
453 | 453 | tmpl += '<i class="icon-git"></i> '; |
|
454 | 454 | } |
|
455 | 455 | else if(obj_dict['repo_type'] === 'svn'){ |
|
456 | 456 | tmpl += '<i class="icon-svn"></i> '; |
|
457 | 457 | } |
|
458 | 458 | if(obj_dict['private']){ |
|
459 | 459 | tmpl += '<i class="icon-lock" ></i> '; |
|
460 | 460 | } |
|
461 | 461 | else if(visual_show_public_icon){ |
|
462 | 462 | tmpl += '<i class="icon-unlock-alt"></i> '; |
|
463 | 463 | } |
|
464 | 464 | } |
|
465 | 465 | if(obj_dict && state.type == 'commit') { |
|
466 | 466 | tmpl += '<i class="icon-tag"></i>'; |
|
467 | 467 | } |
|
468 | 468 | if(obj_dict && state.type == 'group'){ |
|
469 | 469 | tmpl += '<i class="icon-folder-close"></i> '; |
|
470 | 470 | } |
|
471 | 471 | tmpl += escapeMarkup(state.text); |
|
472 | 472 | return tmpl; |
|
473 | 473 | }; |
|
474 | 474 | |
|
475 | 475 | var formatResult = function(result, container, query, escapeMarkup) { |
|
476 | 476 | return format(result, escapeMarkup); |
|
477 | 477 | }; |
|
478 | 478 | |
|
479 | 479 | var formatSelection = function(data, container, escapeMarkup) { |
|
480 | 480 | return format(data, escapeMarkup); |
|
481 | 481 | }; |
|
482 | 482 | |
|
483 | 483 | $("#repo_switcher").select2({ |
|
484 | 484 | cachedDataSource: {}, |
|
485 | 485 | minimumInputLength: 2, |
|
486 | 486 | placeholder: '<div class="menulabel">${_('Go to')} <div class="show_more"></div></div>', |
|
487 | 487 | dropdownAutoWidth: true, |
|
488 | 488 | formatResult: formatResult, |
|
489 | 489 | formatSelection: formatSelection, |
|
490 | 490 | containerCssClass: "repo-switcher", |
|
491 | 491 | dropdownCssClass: "repo-switcher-dropdown", |
|
492 | 492 | escapeMarkup: function(m){ |
|
493 | 493 | // don't escape our custom placeholder |
|
494 | 494 | if(m.substr(0,23) == '<div class="menulabel">'){ |
|
495 | 495 | return m; |
|
496 | 496 | } |
|
497 | 497 | |
|
498 | 498 | return Select2.util.escapeMarkup(m); |
|
499 | 499 | }, |
|
500 | 500 | query: $.debounce(250, function(query){ |
|
501 | 501 | self = this; |
|
502 | 502 | var cacheKey = query.term; |
|
503 | 503 | var cachedData = self.cachedDataSource[cacheKey]; |
|
504 | 504 | |
|
505 | 505 | if (cachedData) { |
|
506 | 506 | query.callback({results: cachedData.results}); |
|
507 | 507 | } else { |
|
508 | 508 | $.ajax({ |
|
509 | 509 | url: pyroutes.url('goto_switcher_data'), |
|
510 | 510 | data: {'query': query.term}, |
|
511 | 511 | dataType: 'json', |
|
512 | 512 | type: 'GET', |
|
513 | 513 | success: function(data) { |
|
514 | 514 | self.cachedDataSource[cacheKey] = data; |
|
515 | 515 | query.callback({results: data.results}); |
|
516 | 516 | }, |
|
517 | 517 | error: function(data, textStatus, errorThrown) { |
|
518 | 518 | alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText)); |
|
519 | 519 | } |
|
520 | 520 | }) |
|
521 | 521 | } |
|
522 | 522 | }) |
|
523 | 523 | }); |
|
524 | 524 | |
|
525 | 525 | $("#repo_switcher").on('select2-selecting', function(e){ |
|
526 | 526 | e.preventDefault(); |
|
527 | 527 | window.location = e.choice.url; |
|
528 | 528 | }); |
|
529 | 529 | |
|
530 | 530 | </script> |
|
531 | 531 | <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script> |
|
532 | 532 | </%def> |
|
533 | 533 | |
|
534 | 534 | <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|
535 | 535 | <div class="modal-dialog"> |
|
536 | 536 | <div class="modal-content"> |
|
537 | 537 | <div class="modal-header"> |
|
538 | 538 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
539 | 539 | <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4> |
|
540 | 540 | </div> |
|
541 | 541 | <div class="modal-body"> |
|
542 | 542 | <div class="block-left"> |
|
543 | 543 | <table class="keyboard-mappings"> |
|
544 | 544 | <tbody> |
|
545 | 545 | <tr> |
|
546 | 546 | <th></th> |
|
547 | 547 | <th>${_('Site-wide shortcuts')}</th> |
|
548 | 548 | </tr> |
|
549 | 549 | <% |
|
550 | 550 | elems = [ |
|
551 | 551 | ('/', 'Open quick search box'), |
|
552 | 552 | ('g h', 'Goto home page'), |
|
553 | 553 | ('g g', 'Goto my private gists page'), |
|
554 | 554 | ('g G', 'Goto my public gists page'), |
|
555 | 555 | ('n r', 'New repository page'), |
|
556 | 556 | ('n g', 'New gist page'), |
|
557 | 557 | ] |
|
558 | 558 | %> |
|
559 | 559 | %for key, desc in elems: |
|
560 | 560 | <tr> |
|
561 | 561 | <td class="keys"> |
|
562 | 562 | <span class="key tag">${key}</span> |
|
563 | 563 | </td> |
|
564 | 564 | <td>${desc}</td> |
|
565 | 565 | </tr> |
|
566 | 566 | %endfor |
|
567 | 567 | </tbody> |
|
568 | 568 | </table> |
|
569 | 569 | </div> |
|
570 | 570 | <div class="block-left"> |
|
571 | 571 | <table class="keyboard-mappings"> |
|
572 | 572 | <tbody> |
|
573 | 573 | <tr> |
|
574 | 574 | <th></th> |
|
575 | 575 | <th>${_('Repositories')}</th> |
|
576 | 576 | </tr> |
|
577 | 577 | <% |
|
578 | 578 | elems = [ |
|
579 | 579 | ('g s', 'Goto summary page'), |
|
580 | 580 | ('g c', 'Goto changelog page'), |
|
581 | 581 | ('g f', 'Goto files page'), |
|
582 | 582 | ('g F', 'Goto files page with file search activated'), |
|
583 | 583 | ('g p', 'Goto pull requests page'), |
|
584 | 584 | ('g o', 'Goto repository settings'), |
|
585 | 585 | ('g O', 'Goto repository permissions settings'), |
|
586 | 586 | ] |
|
587 | 587 | %> |
|
588 | 588 | %for key, desc in elems: |
|
589 | 589 | <tr> |
|
590 | 590 | <td class="keys"> |
|
591 | 591 | <span class="key tag">${key}</span> |
|
592 | 592 | </td> |
|
593 | 593 | <td>${desc}</td> |
|
594 | 594 | </tr> |
|
595 | 595 | %endfor |
|
596 | 596 | </tbody> |
|
597 | 597 | </table> |
|
598 | 598 | </div> |
|
599 | 599 | </div> |
|
600 | 600 | <div class="modal-footer"> |
|
601 | 601 | </div> |
|
602 | 602 | </div><!-- /.modal-content --> |
|
603 | 603 | </div><!-- /.modal-dialog --> |
|
604 | 604 | </div><!-- /.modal --> |
@@ -1,75 +1,75 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | |
|
19 | 19 | ${self.sidebar()} |
|
20 | 20 | |
|
21 | 21 | <div class="main-content"> |
|
22 | 22 | |
|
23 | 23 | <h3>Alert Messages</h3> |
|
24 | 24 | <p> |
|
25 | 25 | Alert messages are produced using the custom Polymer element |
|
26 | 26 | <code>rhodecode-toast</code> which is passed a message and level. |
|
27 | 27 | </p> |
|
28 | 28 | |
|
29 | 29 | <div class="bs-example"> |
|
30 | 30 | <p> There are four types of alert levels:</p> |
|
31 | 31 | <div class="alert alert-success"> |
|
32 | 32 | "success" is used when an action is completed as expected<br/> |
|
33 | 33 | ex. updated settings, deletion of a repo/user |
|
34 | 34 | </div> |
|
35 | 35 | <div class="alert alert-warning"> |
|
36 | 36 | "warning" is for notification of impending issues<br/> |
|
37 | 37 | ex. a gist which was updated elsewhere during editing, disk out of space |
|
38 | 38 | </div> |
|
39 | 39 | <div class="alert alert-error"> |
|
40 | 40 | "error" should be used for unexpected results and actions which |
|
41 | 41 | are not successful<br/> |
|
42 | 42 | ex. a form not submitted, repo creation failure |
|
43 | 43 | </div> |
|
44 | 44 | <div class="alert alert-info"> |
|
45 | 45 | "info" is used for non-critical information<br/> |
|
46 | 46 | ex. notification of new messages, invitations to chat |
|
47 | 47 | </div> |
|
48 | 48 | </div> |
|
49 | 49 | |
|
50 | 50 | <p><br/> |
|
51 | 51 | Whether singular or multiple, alerts are grouped into a dismissable |
|
52 | 52 | panel with a single "Close" button underneath. |
|
53 | 53 | </p> |
|
54 | 54 | <a class="btn btn-default" id="test-notification">Test Notification</a> |
|
55 | 55 | |
|
56 | 56 | <script type="text/javascript"> |
|
57 | 57 | $('#test-notification').on('click', function(e){ |
|
58 | 58 | var levels = ['info', 'error', 'warning', 'success']; |
|
59 | 59 | var level = levels[Math.floor(Math.random()*levels.length)]; |
|
60 | 60 | var payload = { |
|
61 | 61 | message: { |
|
62 | 62 | message: 'This is a test ' +level+ ' notification.', |
|
63 | 63 | level: level, |
|
64 | 64 | force: true |
|
65 | 65 | } |
|
66 | 66 | }; |
|
67 | 67 | $.Topic('/notifications').publish(payload); |
|
68 | 68 | }); |
|
69 | 69 | </script> |
|
70 | 70 | |
|
71 | 71 | </div> |
|
72 | 72 | </div> <!-- .main-content --> |
|
73 | 73 | </div> |
|
74 | 74 | </div> <!-- .box --> |
|
75 | 75 | </%def> |
@@ -1,197 +1,197 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | ${self.sidebar()} |
|
19 | 19 | |
|
20 | 20 | <div class="main-content"> |
|
21 | 21 | |
|
22 | 22 | <h2>Buttons</h2> |
|
23 | 23 | |
|
24 | 24 | <p> |
|
25 | 25 | Form buttons in various sizes. Buttons are always capitalised. |
|
26 | 26 | Use the following classes: |
|
27 | 27 | </p> |
|
28 | 28 | |
|
29 | 29 | <ul> |
|
30 | 30 | ## TODO: lisa: Are we actually using three sizes of buttons?? |
|
31 | 31 | <li><code>.btn-lg</code> for large buttons</li> |
|
32 | 32 | <li><code>.btn-sm</code> for small buttons</li> |
|
33 | 33 | <li><code>.btn-xs</code> for xtra small buttons</li> |
|
34 | 34 | </ul> |
|
35 | 35 | |
|
36 | 36 | <p>Note that <code>.btn-mini</code> is supported for legacy reasons.</p> |
|
37 | 37 | |
|
38 | 38 | <div class="bs-example"> |
|
39 | 39 | ## TODO: johbo: Should also work without the form element |
|
40 | 40 | <form method='post' action=''> |
|
41 | 41 | <div class='form'> |
|
42 | 42 | |
|
43 | 43 | <div class="buttons"> |
|
44 | 44 | <input type="submit" value="Save .btn-lg" id="example_save" class="btn btn-lg"> |
|
45 | 45 | <input type="reset" value="Reset" id="example_reset" class="btn btn-lg"> |
|
46 | 46 | <button class="btn btn-lg">Large</button> |
|
47 | 47 | <a class="btn btn-lg" href="#">A link as button</a> |
|
48 | 48 | </div> |
|
49 | 49 | |
|
50 | 50 | <div class="buttons"> |
|
51 | 51 | <input type="submit" value="Save" id="example_save" class="btn"> |
|
52 | 52 | <input type="reset" value="Reset" id="example_reset" class="btn"> |
|
53 | 53 | <button class="btn">Normal</button> |
|
54 | 54 | <button class="btn btn-danger">Normal</button> |
|
55 | 55 | <a class="btn" href="#">A link as button</a> |
|
56 | 56 | </div> |
|
57 | 57 | |
|
58 | 58 | <div class="buttons"> |
|
59 | 59 | <input type="submit" value="Save .btn-sm" id="example_save" class="btn btn-sm"> |
|
60 | 60 | <input type="reset" value="Reset" id="example_reset" class="btn btn-sm"> |
|
61 | 61 | <button class="btn btn-sm">Small</button> |
|
62 | 62 | <button class="btn btn-sm btn-danger">Small</button> |
|
63 | 63 | <a class="btn btn-sm" href="#">A link as button</a> |
|
64 | 64 | </div> |
|
65 | 65 | |
|
66 | 66 | <div class="buttons"> |
|
67 | 67 | <input type="submit" value="Save .btn-xs" id="example_save" class="btn btn-xs"> |
|
68 | 68 | <input type="reset" value="Reset" id="example_reset" class="btn btn-xs"> |
|
69 | 69 | <button class="btn btn-xs">XSmall</button> |
|
70 | 70 | <button class="btn btn-xs btn-danger">XSmall</button> |
|
71 | 71 | <a class="btn btn-xs" href="#">A link as button</a> |
|
72 | 72 | </div> |
|
73 | 73 | |
|
74 | 74 | <div class="buttons"> |
|
75 | 75 | <input type="submit" value="Save .btn-mini" id="example_save" class="btn btn-mini"> |
|
76 | 76 | <input type="reset" value="Reset" id="example_reset" class="btn btn-mini"> |
|
77 | 77 | </div> |
|
78 | 78 | |
|
79 | 79 | <div class="buttons"> |
|
80 | 80 | Buttons of style <code>.btn-link</code>: |
|
81 | 81 | <input type="reset" value="Reset" id="example_reset" class="btn btn-link"> |
|
82 | 82 | <button class="btn btn-link">Edit</button> |
|
83 | 83 | <button class="btn btn-danger btn-link">Delete</button> |
|
84 | 84 | </div> |
|
85 | 85 | </div> |
|
86 | 86 | </form> |
|
87 | 87 | </div> |
|
88 | 88 | |
|
89 | 89 | |
|
90 | 90 | <h2>Buttons as Links</h2> |
|
91 | 91 | <p> |
|
92 | 92 | Most of our Edit/Delete buttons come in the following form. |
|
93 | 93 | Inside of a table, these are "action buttons", and while an |
|
94 | 94 | Edit <em>link</em> is a typical blue link, a Delete <em>button</em> |
|
95 | 95 | is red as per the 'btn-danger' styling and use <code>.btn-link</code>. |
|
96 | 96 | </p> |
|
97 | 97 | <p> |
|
98 | 98 | We use "Delete" when the thing being deleted cannot be undone; |
|
99 | 99 | "Reset", and "Revoke" are used where applicable. |
|
100 | 100 | </p> |
|
101 | 101 | <p> |
|
102 | 102 | Note: Should there be a need for a change in the wording, be |
|
103 | 103 | aware that corresponding documentation may also need updating. |
|
104 | 104 | </p> |
|
105 | 105 | <div class="bs-example"> |
|
106 | 106 | <table class="rctable edit_fields"> |
|
107 | 107 | <tr><td></td><td></td></tr> |
|
108 | 108 | <tr> |
|
109 | 109 | <td></td> |
|
110 | 110 | <td class=" td-action"> |
|
111 | 111 | <div class="grid_edit"> |
|
112 | 112 | <a href="/_admin/repo_groups/breads/edit" title="Edit">Edit</a> |
|
113 | 113 | </div> |
|
114 | 114 | <div class="grid_delete"> |
|
115 | 115 | <form action="/_admin/repo_groups/breads" method="post"><div style="display:none"> |
|
116 | 116 | <input name="_method" type="hidden" value="delete"> |
|
117 | 117 | </div> |
|
118 | 118 | <div style="display: none;"><input id="csrf_token" name="csrf_token" type="hidden" value="03d6cc48726b885039b2f7675e85596b7dae6ecf"></div> |
|
119 | 119 | <button class="btn btn-link btn-danger" type="submit" onclick="return confirm('" +ungettext('confirm="" to="" delete="" this="" group:="" %s="" with="" repository','confirm="" repositories',gr_count)="" %="" (repo_group_name,="" gr_count)+"');"=""> |
|
120 | 120 | Delete |
|
121 | 121 | </button> |
|
122 | 122 | </form> |
|
123 | 123 | </div> |
|
124 | 124 | </td> |
|
125 | 125 | </tr> |
|
126 | 126 | </table> |
|
127 | 127 | <div class="highlight-html"><xmp> |
|
128 | 128 | <a href="some-link" title="${_('Edit')}">${_('Edit')}</a> |
|
129 | 129 | |
|
130 | 130 | <button class="btn btn-link btn-danger" type="submit" |
|
131 | 131 | onclick="return confirm('${_('Confirm to remove this field: Field')}');"> |
|
132 | 132 | ${_('Delete')} |
|
133 | 133 | </button> |
|
134 | 134 | </xmp></div> |
|
135 | 135 | </div> |
|
136 | 136 | |
|
137 | 137 | |
|
138 | 138 | <h2>Buttons disabled</h2> |
|
139 | 139 | |
|
140 | 140 | <p>Note that our application still uses the class <code>.disabled</code> |
|
141 | 141 | in some places. Interim we support both but prefer to use the |
|
142 | 142 | attribute <code>disabled</code> where possible.</p> |
|
143 | 143 | |
|
144 | 144 | <div class="bs-example"> |
|
145 | 145 | ## TODO: johbo: Should also work without the form element |
|
146 | 146 | <form method='post' action=''> |
|
147 | 147 | <div class='form'> |
|
148 | 148 | |
|
149 | 149 | <div class="buttons"> |
|
150 | 150 | <input type="submit" value="Save .btn-lg" id="example_save" class="btn btn-lg" disabled> |
|
151 | 151 | <input type="reset" value="Reset" id="example_reset" class="btn btn-lg" disabled> |
|
152 | 152 | <button class="btn btn-lg" disabled>Large</button> |
|
153 | 153 | </div> |
|
154 | 154 | |
|
155 | 155 | <div class="buttons"> |
|
156 | 156 | <input type="submit" value="Save" id="example_save" class="btn" disabled> |
|
157 | 157 | <input type="reset" value="Reset" id="example_reset" class="btn" disabled> |
|
158 | 158 | <button class="btn" disabled>Normal</button> |
|
159 | 159 | <button class="btn btn-danger" disabled>Normal</button> |
|
160 | 160 | </div> |
|
161 | 161 | |
|
162 | 162 | <div class="buttons"> |
|
163 | 163 | <input type="submit" value="Save .btn-sm" id="example_save" class="btn btn-sm" disabled> |
|
164 | 164 | <input type="reset" value="Reset" id="example_reset" class="btn btn-sm" disabled> |
|
165 | 165 | <button class="btn btn-sm" disabled>Small</button> |
|
166 | 166 | <button class="btn btn-sm btn-danger" disabled>Small</button> |
|
167 | 167 | </div> |
|
168 | 168 | |
|
169 | 169 | <div class="buttons"> |
|
170 | 170 | <input type="submit" value="Save .btn-xs" id="example_save" class="btn btn-xs" disabled> |
|
171 | 171 | <input type="reset" value="Reset" id="example_reset" class="btn btn-xs" disabled> |
|
172 | 172 | <button class="btn btn-xs" disabled>XSmall</button> |
|
173 | 173 | <button class="btn btn-xs btn-danger" disabled>XSmall</button> |
|
174 | 174 | </div> |
|
175 | 175 | |
|
176 | 176 | <div class="buttons"> |
|
177 | 177 | <input type="submit" value="Save .btn-mini" id="example_save" class="btn btn-mini" disabled> |
|
178 | 178 | <input type="reset" value="Reset" id="example_reset" class="btn btn-mini" disabled> |
|
179 | 179 | </div> |
|
180 | 180 | |
|
181 | 181 | <div class="buttons"> |
|
182 | 182 | Buttons of style <code>.btn-link</code>: |
|
183 | 183 | <input type="reset" value="Reset" id="example_reset" class="btn btn-link" disabled> |
|
184 | 184 | <button class="btn btn-link" disabled>Edit</button> |
|
185 | 185 | <button class="btn btn-link btn-danger" disabled>Delete</button> |
|
186 | 186 | </div> |
|
187 | 187 | |
|
188 | 188 | </div> |
|
189 | 189 | </form> |
|
190 | 190 | </div> |
|
191 | 191 | |
|
192 | 192 | |
|
193 | 193 | |
|
194 | 194 | </div> |
|
195 | 195 | </div> <!-- .main-content --> |
|
196 | 196 | </div> <!-- .box --> |
|
197 | 197 | </%def> |
@@ -1,1160 +1,1160 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%namespace name="base" file="/base/base.mako"/> |
|
3 | 3 | <%inherit file="/debug_style/index.html"/> |
|
4 | 4 | |
|
5 | 5 | <%def name="breadcrumbs_links()"> |
|
6 |
${h.link_to(_('Style'), h. |
|
|
6 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
7 | 7 | » |
|
8 | 8 | ${c.active} |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | 11 | <%def name="js_extra()"> |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="css_extra()"> |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | |
|
18 | 18 | <%def name="real_main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <div class="title"> |
|
21 | 21 | ${self.breadcrumbs()} |
|
22 | 22 | </div> |
|
23 | 23 | |
|
24 | 24 | ##main |
|
25 | 25 | <div class='sidebar-col-wrapper'> |
|
26 | 26 | ${self.sidebar()} |
|
27 | 27 | |
|
28 | 28 | <div class="main-content"> |
|
29 | 29 | |
|
30 | 30 | |
|
31 | 31 | |
|
32 | 32 | <h2>Code Blocks</h2> |
|
33 | 33 | |
|
34 | 34 | <dl class="dl-horizontal"> |
|
35 | 35 | <dt><code>.codeblock</code></dt> |
|
36 | 36 | <dd>Used as a wrapping element around <code>.code-header</code> and |
|
37 | 37 | <code>.code-body</code>. Used to show the content of a file or a |
|
38 | 38 | Gist.</dd> |
|
39 | 39 | |
|
40 | 40 | <dt><code>.diffblock</code></dt> |
|
41 | 41 | <dd>Used as a wrapping element to show a diff in a Commit or Pull |
|
42 | 42 | Request page. Contains usually <code>.code-header</code>, |
|
43 | 43 | <code>.code-body</code> and in the edit case a <code>.message</code>. |
|
44 | 44 | </dd> |
|
45 | 45 | </dl> |
|
46 | 46 | |
|
47 | 47 | |
|
48 | 48 | <p>Code Blocks are used in the following areas:</p> |
|
49 | 49 | |
|
50 | 50 | <ul> |
|
51 | 51 | <li>Commit: Showing the Diff (still called Changeset in a few |
|
52 | 52 | places).</li> |
|
53 | 53 | <li>File: Display a file, annotations, and edit a file.</li> |
|
54 | 54 | <li>Gist: Show the Gist and edit it.</li> |
|
55 | 55 | <li>Pull Request: Display the Diff of a Pull Request.</li> |
|
56 | 56 | </ul> |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | |
|
60 | 60 | <!-- |
|
61 | 61 | Compare Commits |
|
62 | 62 | --> |
|
63 | 63 | <h2>Compare Commits</h2> |
|
64 | 64 | |
|
65 | 65 | <div id="c-e589e34d6be8-5ab783e6d81b" class="diffblock margined comm"> |
|
66 | 66 | <div class="code-header"> |
|
67 | 67 | <div title="Go back to changed files overview"> |
|
68 | 68 | <a href="#changes_box"> |
|
69 | 69 | <i class="icon-circle-arrow-up"></i> |
|
70 | 70 | </a> |
|
71 | 71 | </div> |
|
72 | 72 | <div class="changeset_header"> |
|
73 | 73 | <div class="changeset_file"> |
|
74 | 74 | <i class="icon-file"></i> |
|
75 | 75 | <a href="/example/files/e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d/rhodecode/public/css/code-block.less">rhodecode/public/css/code-block.less</a> |
|
76 | 76 | </div> |
|
77 | 77 | <div class="diff-actions"> |
|
78 | 78 | <a href="/example/diff/rhodecode/public/css/code-block.less?fulldiff=1&diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&diff=diff&diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Show full diff for this file"> |
|
79 | 79 | <img class="icon" src="/images/icons/page_white_go.png"> |
|
80 | 80 | </a> |
|
81 | 81 | <a href="/example/diff-2way/rhodecode/public/css/code-block.less?fulldiff=1&diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&diff=diff&diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Show full side-by-side diff for this file"> |
|
82 | 82 | <img class="icon" src="/images/icons/application_double.png"> |
|
83 | 83 | </a> |
|
84 | 84 | <a href="/example/diff/rhodecode/public/css/code-block.less?diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&diff=raw&diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Raw diff" tt_title="Raw diff"> |
|
85 | 85 | <img class="icon" src="/images/icons/page_white.png"> |
|
86 | 86 | </a> |
|
87 | 87 | <a href="/example/diff/rhodecode/public/css/code-block.less?diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&diff=download&diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Download diff"> |
|
88 | 88 | <img class="icon" src="/images/icons/page_save.png"> |
|
89 | 89 | </a> |
|
90 | 90 | <a class="tooltip" href="/example/changeset/d12301bafcc0aea15c9283d3af018daee2b04cd9...80ead1899f50a894889e19ffeb49c9cebf5bf045?c-e589e34d6be8-5ab783e6d81b=WS%3A1&c-e589e34d6be8-5ab783e6d81b=C%3A3#c-e589e34d6be8-5ab783e6d81b" title="Ignore white space"><img alt="Ignore white space" class="icon" src="/images/icons/text_strikethrough.png"></a> |
|
91 | 91 | <a class="tooltip" href="/example/changeset/d12301bafcc0aea15c9283d3af018daee2b04cd9...80ead1899f50a894889e19ffeb49c9cebf5bf045?c-e589e34d6be8-5ab783e6d81b=C%3A6#c-e589e34d6be8-5ab783e6d81b" title="increase diff context to 6 lines"><img alt="increase diff context to 6 lines" class="icon" src="/images/icons/table_add.png"></a> |
|
92 | 92 | </div> |
|
93 | 93 | <span> |
|
94 | 94 | <label> |
|
95 | 95 | Show inline comments |
|
96 | 96 | <input checked="checked" class="show-inline-comments" id="" id_for="c-e589e34d6be8-5ab783e6d81b" name="" type="checkbox" value="1"> |
|
97 | 97 | </label> |
|
98 | 98 | </span> |
|
99 | 99 | </div> |
|
100 | 100 | </div> |
|
101 | 101 | <div class="code-body"> |
|
102 | 102 | <div class="full_f_path" path="rhodecode/public/css/code-block.less"></div> |
|
103 | 103 | <table class="code-difftable"> |
|
104 | 104 | <tbody><tr class="line context"> |
|
105 | 105 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td> |
|
106 | 106 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td> |
|
107 | 107 | <td class="code no-comment"> |
|
108 | 108 | <pre>@@ -391,7 +391,7 @@ |
|
109 | 109 | </pre> |
|
110 | 110 | </td> |
|
111 | 111 | </tr> |
|
112 | 112 | <tr class="line unmod"> |
|
113 | 113 | <td id="rhodecodepubliccsscode-blockless_o391" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o391">391</a></td> |
|
114 | 114 | <td id="rhodecodepubliccsscode-blockless_n391" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n391">391</a></td> |
|
115 | 115 | <td class="code no-comment"> |
|
116 | 116 | <pre>} /* Existing line, it might have a quite long content actually and in this case we might need some horizontal scrolling. The remaining text here is just used to make this line very long. |
|
117 | 117 | </pre> |
|
118 | 118 | </td> |
|
119 | 119 | </tr> |
|
120 | 120 | <tr class="line unmod"> |
|
121 | 121 | <td id="rhodecodepubliccsscode-blockless_o392" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o392">392</a></td> |
|
122 | 122 | <td id="rhodecodepubliccsscode-blockless_n392" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n392">392</a></td> |
|
123 | 123 | <td class="code no-comment"> |
|
124 | 124 | <pre></pre> |
|
125 | 125 | </td> |
|
126 | 126 | </tr> |
|
127 | 127 | <tr class="line unmod"> |
|
128 | 128 | <td id="rhodecodepubliccsscode-blockless_o393" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o393">393</a></td> |
|
129 | 129 | <td id="rhodecodepubliccsscode-blockless_n393" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n393">393</a></td> |
|
130 | 130 | <td class="code no-comment"> |
|
131 | 131 | <pre>.code-body.textarea.editor, |
|
132 | 132 | </pre> |
|
133 | 133 | </td> |
|
134 | 134 | </tr> |
|
135 | 135 | <tr class="line del"> |
|
136 | 136 | <td id="rhodecodepubliccsscode-blockless_o394" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o394">394</a></td> |
|
137 | 137 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n"></a></td> |
|
138 | 138 | <td class="code no-comment"> |
|
139 | 139 | <pre>div.code-body{ |
|
140 | 140 | </pre> |
|
141 | 141 | </td> |
|
142 | 142 | </tr> |
|
143 | 143 | <tr class="line add"> |
|
144 | 144 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> |
|
145 | 145 | <td id="rhodecodepubliccsscode-blockless_n394" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n394">394</a></td> |
|
146 | 146 | <td class="code no-comment"> |
|
147 | 147 | <pre>div.code-body<ins> </ins>{ |
|
148 | 148 | </pre> |
|
149 | 149 | </td> |
|
150 | 150 | </tr> |
|
151 | 151 | <tr class="line unmod"> |
|
152 | 152 | <td id="rhodecodepubliccsscode-blockless_o395" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o395">395</a></td> |
|
153 | 153 | <td id="rhodecodepubliccsscode-blockless_n395" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n395">395</a></td> |
|
154 | 154 | <td class="code no-comment"> |
|
155 | 155 | <pre> float: left; |
|
156 | 156 | </pre> |
|
157 | 157 | </td> |
|
158 | 158 | </tr> |
|
159 | 159 | <tr class="line unmod"> |
|
160 | 160 | <td id="rhodecodepubliccsscode-blockless_o396" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o396">396</a></td> |
|
161 | 161 | <td id="rhodecodepubliccsscode-blockless_n396" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n396">396</a></td> |
|
162 | 162 | <td class="code no-comment"> |
|
163 | 163 | <pre> position: relative; |
|
164 | 164 | </pre> |
|
165 | 165 | </td> |
|
166 | 166 | </tr> |
|
167 | 167 | <tr class="line unmod"> |
|
168 | 168 | <td id="rhodecodepubliccsscode-blockless_o397" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o397">397</a></td> |
|
169 | 169 | <td id="rhodecodepubliccsscode-blockless_n397" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n397">397</a></td> |
|
170 | 170 | <td class="code no-comment"> |
|
171 | 171 | <pre> max-width: none; |
|
172 | 172 | </pre> |
|
173 | 173 | </td> |
|
174 | 174 | </tr> |
|
175 | 175 | <tr class="line context"> |
|
176 | 176 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td> |
|
177 | 177 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td> |
|
178 | 178 | <td class="code no-comment"> |
|
179 | 179 | <pre>@@ -399,3 +399,6 @@ |
|
180 | 180 | </pre> |
|
181 | 181 | </td> |
|
182 | 182 | </tr> |
|
183 | 183 | <tr class="line unmod"> |
|
184 | 184 | <td id="rhodecodepubliccsscode-blockless_o399" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o399">399</a></td> |
|
185 | 185 | <td id="rhodecodepubliccsscode-blockless_n399" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n399">399</a></td> |
|
186 | 186 | <td class="code no-comment"> |
|
187 | 187 | <pre> box-sizing: border-box; |
|
188 | 188 | </pre> |
|
189 | 189 | </td> |
|
190 | 190 | </tr> |
|
191 | 191 | <tr class="line unmod"> |
|
192 | 192 | <td id="rhodecodepubliccsscode-blockless_o400" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o400">400</a></td> |
|
193 | 193 | <td id="rhodecodepubliccsscode-blockless_n400" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n400">400</a></td> |
|
194 | 194 | <td class="code no-comment"> |
|
195 | 195 | <pre>} |
|
196 | 196 | </pre> |
|
197 | 197 | </td> |
|
198 | 198 | </tr> |
|
199 | 199 | <tr class="line unmod"> |
|
200 | 200 | <td id="rhodecodepubliccsscode-blockless_o401" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o401">401</a></td> |
|
201 | 201 | <td id="rhodecodepubliccsscode-blockless_n401" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n401">401</a></td> |
|
202 | 202 | <td class="code no-comment"> |
|
203 | 203 | <pre></pre> |
|
204 | 204 | </td> |
|
205 | 205 | </tr> |
|
206 | 206 | <tr class="line add"> |
|
207 | 207 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> |
|
208 | 208 | <td id="rhodecodepubliccsscode-blockless_n402" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n402">402</a></td> |
|
209 | 209 | <td class="code no-comment"> |
|
210 | 210 | <pre>.code-body td{ |
|
211 | 211 | </pre> |
|
212 | 212 | </td> |
|
213 | 213 | </tr> |
|
214 | 214 | <tr class="line add"> |
|
215 | 215 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> |
|
216 | 216 | <td id="rhodecodepubliccsscode-blockless_n403" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n403">403</a></td> |
|
217 | 217 | <td class="code no-comment"> |
|
218 | 218 | <pre> line-height: 1.2em; |
|
219 | 219 | </pre> |
|
220 | 220 | </td> |
|
221 | 221 | </tr> |
|
222 | 222 | <tr class="line add"> |
|
223 | 223 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> |
|
224 | 224 | <td id="rhodecodepubliccsscode-blockless_n404" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n404">404</a></td> |
|
225 | 225 | <td class="code no-comment"> |
|
226 | 226 | <pre>} |
|
227 | 227 | </pre> |
|
228 | 228 | </td> |
|
229 | 229 | </tr> |
|
230 | 230 | <tr class="line context"> |
|
231 | 231 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td> |
|
232 | 232 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td> |
|
233 | 233 | <td class="code no-comment"> |
|
234 | 234 | <pre> No newline at end of file |
|
235 | 235 | </pre> |
|
236 | 236 | </td> |
|
237 | 237 | </tr> |
|
238 | 238 | </tbody></table> |
|
239 | 239 | </div> |
|
240 | 240 | </div> |
|
241 | 241 | |
|
242 | 242 | |
|
243 | 243 | |
|
244 | 244 | |
|
245 | 245 | |
|
246 | 246 | |
|
247 | 247 | <!-- |
|
248 | 248 | Pull Request |
|
249 | 249 | --> |
|
250 | 250 | |
|
251 | 251 | <h2>Pull Request</h2> |
|
252 | 252 | |
|
253 | 253 | <div class="cs_files"> |
|
254 | 254 | <table class="compare_view_files"> |
|
255 | 255 | |
|
256 | 256 | <tbody><tr class="cs_M collapse_file" fid="c--5f1d017cf13b"> |
|
257 | 257 | <td class="cs_icon_td"> |
|
258 | 258 | <span class="collapse_file_icon" fid="c--5f1d017cf13b"></span> |
|
259 | 259 | </td> |
|
260 | 260 | <td class="cs_icon_td"> |
|
261 | 261 | <div class="flag_status not_reviewed hidden"></div> |
|
262 | 262 | </td> |
|
263 | 263 | <td id="a_c--5f1d017cf13b"> |
|
264 | 264 | <a class="compare_view_filepath" href="#a_c--5f1d017cf13b"> |
|
265 | 265 | rhodecode/public/css/main.less |
|
266 | 266 | </a> |
|
267 | 267 | <span id="diff_c--5f1d017cf13b" class="diff_links" style=""> |
|
268 | 268 | <a href="/example/diff/rhodecode/public/css/main.less?fulldiff=1&diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&diff=diff&diff2=27eb56cf467ca849112536d62decb2ed020b3ebc"> |
|
269 | 269 | Unified Diff |
|
270 | 270 | </a> |
|
271 | 271 | | |
|
272 | 272 | <a href="/example/diff-2way/rhodecode/public/css/main.less?fulldiff=1&diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&diff=diff&diff2=27eb56cf467ca849112536d62decb2ed020b3ebc"> |
|
273 | 273 | Side-by-side Diff |
|
274 | 274 | </a> |
|
275 | 275 | </span> |
|
276 | 276 | </td> |
|
277 | 277 | <td> |
|
278 | 278 | <div class="changes pull-right"><div style="width:100px"><div class="added top-left-rounded-corner-mid bottom-left-rounded-corner-mid" style="width:33.3333333333%">1</div><div class="deleted top-right-rounded-corner-mid bottom-right-rounded-corner-mid" style="width:66.6666666667%">2</div></div></div> |
|
279 | 279 | <div class="comment-bubble pull-right" data-path="rhodecode/public/css/main.less"> |
|
280 | 280 | <i class="icon-comment"></i> |
|
281 | 281 | </div> |
|
282 | 282 | </td> |
|
283 | 283 | </tr> |
|
284 | 284 | <tr id="tr_c--5f1d017cf13b"> |
|
285 | 285 | <td></td> |
|
286 | 286 | <td></td> |
|
287 | 287 | <td class="injected_diff" colspan="2"> |
|
288 | 288 | |
|
289 | 289 | <div class="diff-container" id="diff-container-140360026534904"> |
|
290 | 290 | <div id="c--5f1d017cf13b_target"></div> |
|
291 | 291 | <div id="c--5f1d017cf13b" class="diffblock margined comm"> |
|
292 | 292 | <div class="code-body"> |
|
293 | 293 | <div class="full_f_path" path="rhodecode/public/css/main.less" style="display: none;"></div> |
|
294 | 294 | <table class="code-difftable"> |
|
295 | 295 | <tbody><tr class="line context"> |
|
296 | 296 | <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td> |
|
297 | 297 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td> |
|
298 | 298 | <td class="code "> |
|
299 | 299 | <pre>@@ -2110,7 +2110,6 @@ |
|
300 | 300 | </pre> |
|
301 | 301 | </td> |
|
302 | 302 | </tr> |
|
303 | 303 | <tr class="line unmod"> |
|
304 | 304 | <td id="rhodecodepubliccssmainless_o2110" class="lineno old"><a href="#rhodecodepubliccssmainless_o2110">2110</a></td> |
|
305 | 305 | <td id="rhodecodepubliccssmainless_n2110" class="lineno new"><a href="#rhodecodepubliccssmainless_n2110">2110</a></td> |
|
306 | 306 | <td class="code "> |
|
307 | 307 | <pre><span class="tab-escape"> </span>width: auto !important; |
|
308 | 308 | </pre> |
|
309 | 309 | </td> |
|
310 | 310 | </tr> |
|
311 | 311 | <tr class="line unmod"> |
|
312 | 312 | <td id="rhodecodepubliccssmainless_o2111" class="lineno old"><a href="#rhodecodepubliccssmainless_o2111">2111</a></td> |
|
313 | 313 | <td id="rhodecodepubliccssmainless_n2111" class="lineno new"><a href="#rhodecodepubliccssmainless_n2111">2111</a></td> |
|
314 | 314 | <td class="code "> |
|
315 | 315 | <pre><span class="tab-escape"> </span>min-width: 160px; |
|
316 | 316 | </pre> |
|
317 | 317 | </td> |
|
318 | 318 | </tr> |
|
319 | 319 | <tr class="line unmod"> |
|
320 | 320 | <td id="rhodecodepubliccssmainless_o2112" class="lineno old"><a href="#rhodecodepubliccssmainless_o2112">2112</a></td> |
|
321 | 321 | <td id="rhodecodepubliccssmainless_n2112" class="lineno new"><a href="#rhodecodepubliccssmainless_n2112">2112</a></td> |
|
322 | 322 | <td class="code "> |
|
323 | 323 | <pre><span class="tab-escape"> </span>margin: @padding @padding @padding 0; |
|
324 | 324 | </pre> |
|
325 | 325 | </td> |
|
326 | 326 | </tr> |
|
327 | 327 | <tr class="line del"> |
|
328 | 328 | <td id="rhodecodepubliccssmainless_o2113" class="lineno old"><a href="#rhodecodepubliccssmainless_o2113">2113</a></td> |
|
329 | 329 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td> |
|
330 | 330 | <td class="code "> |
|
331 | 331 | <pre><span class="tab-escape"> </span>padding: .9em; /* Old comment which was making this line a very long line so that we might have to deal with it by either adding horizontal scrolling or some smart way of breaking this line. */ |
|
332 | 332 | </pre> |
|
333 | 333 | </td> |
|
334 | 334 | </tr> |
|
335 | 335 | <tr class="line unmod"> |
|
336 | 336 | <td id="rhodecodepubliccssmainless_o2114" class="lineno old"><a href="#rhodecodepubliccssmainless_o2114">2114</a></td> |
|
337 | 337 | <td id="rhodecodepubliccssmainless_n2113" class="lineno new"><a href="#rhodecodepubliccssmainless_n2113">2113</a></td> |
|
338 | 338 | <td class="code "> |
|
339 | 339 | <pre> line-height: 1em; |
|
340 | 340 | </pre> |
|
341 | 341 | </td> |
|
342 | 342 | </tr> |
|
343 | 343 | <tr class="line unmod"> |
|
344 | 344 | <td id="rhodecodepubliccssmainless_o2115" class="lineno old"><a href="#rhodecodepubliccssmainless_o2115">2115</a></td> |
|
345 | 345 | <td id="rhodecodepubliccssmainless_n2114" class="lineno new"><a href="#rhodecodepubliccssmainless_n2114">2114</a></td> |
|
346 | 346 | <td class="code "> |
|
347 | 347 | <pre><span class="tab-escape"> </span>z-index: 100;//js sets the menu below it to 9999 |
|
348 | 348 | </pre> |
|
349 | 349 | </td> |
|
350 | 350 | </tr> |
|
351 | 351 | <tr class="line unmod"> |
|
352 | 352 | <td id="rhodecodepubliccssmainless_o2116" class="lineno old"><a href="#rhodecodepubliccssmainless_o2116">2116</a></td> |
|
353 | 353 | <td id="rhodecodepubliccssmainless_n2115" class="lineno new"><a href="#rhodecodepubliccssmainless_n2115">2115</a></td> |
|
354 | 354 | <td class="code "> |
|
355 | 355 | <pre><span class="tab-escape"> </span>background-color: white; |
|
356 | 356 | </pre> |
|
357 | 357 | </td> |
|
358 | 358 | </tr> |
|
359 | 359 | <tr class="line context"> |
|
360 | 360 | <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td> |
|
361 | 361 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td> |
|
362 | 362 | <td class="code "> |
|
363 | 363 | <pre>@@ -2118,7 +2117,7 @@ |
|
364 | 364 | </pre> |
|
365 | 365 | </td> |
|
366 | 366 | </tr> |
|
367 | 367 | <tr class="line unmod"> |
|
368 | 368 | <td id="rhodecodepubliccssmainless_o2118" class="lineno old"><a href="#rhodecodepubliccssmainless_o2118">2118</a></td> |
|
369 | 369 | <td id="rhodecodepubliccssmainless_n2117" class="lineno new"><a href="#rhodecodepubliccssmainless_n2117">2117</a></td> |
|
370 | 370 | <td class="code "> |
|
371 | 371 | <pre></pre> |
|
372 | 372 | </td> |
|
373 | 373 | </tr> |
|
374 | 374 | <tr class="line unmod"> |
|
375 | 375 | <td id="rhodecodepubliccssmainless_o2119" class="lineno old"><a href="#rhodecodepubliccssmainless_o2119">2119</a></td> |
|
376 | 376 | <td id="rhodecodepubliccssmainless_n2118" class="lineno new"><a href="#rhodecodepubliccssmainless_n2118">2118</a></td> |
|
377 | 377 | <td class="code "> |
|
378 | 378 | <pre><span class="tab-escape"> </span>a { |
|
379 | 379 | </pre> |
|
380 | 380 | </td> |
|
381 | 381 | </tr> |
|
382 | 382 | <tr class="line unmod"> |
|
383 | 383 | <td id="rhodecodepubliccssmainless_o2120" class="lineno old"><a href="#rhodecodepubliccssmainless_o2120">2120</a></td> |
|
384 | 384 | <td id="rhodecodepubliccssmainless_n2119" class="lineno new"><a href="#rhodecodepubliccssmainless_n2119">2119</a></td> |
|
385 | 385 | <td class="code "> |
|
386 | 386 | <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>display:block; |
|
387 | 387 | </pre> |
|
388 | 388 | </td> |
|
389 | 389 | </tr> |
|
390 | 390 | <tr class="line del"> |
|
391 | 391 | <td id="rhodecodepubliccssmainless_o2121" class="lineno old"><a href="#rhodecodepubliccssmainless_o2121">2121</a></td> |
|
392 | 392 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td> |
|
393 | 393 | <td class="code "> |
|
394 | 394 | <pre><span class="tab-escape"> </span><del><span< del=""> <del>class=</del><del>"tab-escape"</del><del>> </del>padding: <del>0</del>; |
|
395 | 395 | </span<></del></pre> |
|
396 | 396 | </td> |
|
397 | 397 | </tr> |
|
398 | 398 | <tr class="line add"> |
|
399 | 399 | <td class="lineno old"><a href="#rhodecodepubliccssmainless_o"></a></td> |
|
400 | 400 | <td id="rhodecodepubliccssmainless_n2120" class="lineno new"><a href="#rhodecodepubliccssmainless_n2120">2120</a></td> |
|
401 | 401 | <td class="code "> |
|
402 | 402 | <pre><span class="tab-escape"> </span><ins> </ins> <ins> </ins><ins> </ins>padding: <ins>.9em</ins>; |
|
403 | 403 | </pre> |
|
404 | 404 | </td> |
|
405 | 405 | </tr> |
|
406 | 406 | <tr class="line unmod"> |
|
407 | 407 | <td id="rhodecodepubliccssmainless_o2122" class="lineno old"><a href="#rhodecodepubliccssmainless_o2122">2122</a></td> |
|
408 | 408 | <td id="rhodecodepubliccssmainless_n2121" class="lineno new"><a href="#rhodecodepubliccssmainless_n2121">2121</a></td> |
|
409 | 409 | <td class="code "> |
|
410 | 410 | <pre></pre> |
|
411 | 411 | </td> |
|
412 | 412 | </tr> |
|
413 | 413 | <tr class="line unmod"> |
|
414 | 414 | <td id="rhodecodepubliccssmainless_o2123" class="lineno old"><a href="#rhodecodepubliccssmainless_o2123">2123</a></td> |
|
415 | 415 | <td id="rhodecodepubliccssmainless_n2122" class="lineno new"><a href="#rhodecodepubliccssmainless_n2122">2122</a></td> |
|
416 | 416 | <td class="code "> |
|
417 | 417 | <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>&:after { |
|
418 | 418 | </pre> |
|
419 | 419 | </td> |
|
420 | 420 | </tr> |
|
421 | 421 | <tr class="line unmod"> |
|
422 | 422 | <td id="rhodecodepubliccssmainless_o2124" class="lineno old"><a href="#rhodecodepubliccssmainless_o2124">2124</a></td> |
|
423 | 423 | <td id="rhodecodepubliccssmainless_n2123" class="lineno new"><a href="#rhodecodepubliccssmainless_n2123">2123</a></td> |
|
424 | 424 | <td class="code "> |
|
425 | 425 | <pre><span class="tab-escape"> </span><span class="tab-escape"> </span><span class="tab-escape"> </span>content: "\00A0\25BE"; |
|
426 | 426 | </pre> |
|
427 | 427 | </td> |
|
428 | 428 | </tr> |
|
429 | 429 | </tbody></table> |
|
430 | 430 | </div> |
|
431 | 431 | </div> |
|
432 | 432 | </div> |
|
433 | 433 | |
|
434 | 434 | </td> |
|
435 | 435 | </tr> |
|
436 | 436 | </tbody></table> |
|
437 | 437 | </div> |
|
438 | 438 | |
|
439 | 439 | |
|
440 | 440 | |
|
441 | 441 | |
|
442 | 442 | |
|
443 | 443 | |
|
444 | 444 | |
|
445 | 445 | |
|
446 | 446 | |
|
447 | 447 | <!-- |
|
448 | 448 | File View |
|
449 | 449 | --> |
|
450 | 450 | |
|
451 | 451 | ##TODO: lisa: I believe this needs to be updated as the layout has changed. |
|
452 | 452 | <h2>File View</h2> |
|
453 | 453 | |
|
454 | 454 | <div class="codeblock"> |
|
455 | 455 | <div class="code-header"> |
|
456 | 456 | <div class="stats"> |
|
457 | 457 | <div class="img"> |
|
458 | 458 | <i class="icon-file"></i> |
|
459 | 459 | <span class="revision_id item"><a href="/example/changeset/fc252256eb0fcb4f2613e66f0126ea27967ae28c">r5487:fc252256eb0f</a></span> |
|
460 | 460 | <span>1.2 KiB</span> |
|
461 | 461 | <span class="item last">text/x-python</span> |
|
462 | 462 | <div class="buttons"> |
|
463 | 463 | |
|
464 | 464 | <a id="file_history_overview" class="btn btn-mini" href="#"> |
|
465 | 465 | <i class="icon-time"></i> history |
|
466 | 466 | </a> |
|
467 | 467 | <a id="file_history_overview_full" class="btn btn-mini" style="display: none" href="/example/changelog/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py"> |
|
468 | 468 | <i class="icon-time"></i> show full history |
|
469 | 469 | </a> |
|
470 | 470 | <a class="btn btn-mini" href="/example/annotate/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">annotation</a> |
|
471 | 471 | <a class="btn btn-mini" href="/example/raw/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">raw</a> |
|
472 | 472 | <a class="btn btn-mini" href="/example/rawfile/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py"> |
|
473 | 473 | <i class="icon-archive"></i> download |
|
474 | 474 | </a> |
|
475 | 475 | |
|
476 | 476 | <a class="btn btn-mini disabled tooltip" href="#" title="Editing files allowed only when on branch head commit">edit</a> |
|
477 | 477 | <a class="btn btn-mini btn-danger disabled tooltip" href="#" title="Deleting files allowed only when on branch head commit">delete</a> |
|
478 | 478 | </div> |
|
479 | 479 | </div> |
|
480 | 480 | </div> |
|
481 | 481 | <div id="file_history_container"></div> |
|
482 | 482 | <div class="author"> |
|
483 | 483 | <div class="gravatar"> |
|
484 | 484 | <img alt="gravatar" src="https://secure.gravatar.com/avatar/99e27b99c64003ca8c9875c9e3843495?d=identicon&s=32" height="16" width="16"> |
|
485 | 485 | </div> |
|
486 | 486 | <div title="Marcin Kuzminski <marcin@python-works.com>" class="user">Marcin Kuzminski - <span class="tooltip" title="Wed, 02 Jul 2014 08:48:15">6m and 12d ago</span></div> |
|
487 | 487 | </div> |
|
488 | 488 | <div id="trimmed_message_box" class="commit">License changes</div> |
|
489 | 489 | <div id="message_expand" style="display: none;"> |
|
490 | 490 | <i class="icon-resize-vertical"></i> |
|
491 | 491 | expand |
|
492 | 492 | <i class="icon-resize-vertical"></i> |
|
493 | 493 | </div> |
|
494 | 494 | </div> |
|
495 | 495 | <div class="code-body"> |
|
496 | 496 | <table class="code-highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L1"> 1</a> |
|
497 | 497 | <a href="#L2"> 2</a> |
|
498 | 498 | <a href="#L3"> 3</a> |
|
499 | 499 | <a href="#L4"> 4</a> |
|
500 | 500 | <a href="#L5"> 5</a> |
|
501 | 501 | <a href="#L6"> 6</a> |
|
502 | 502 | <a href="#L7"> 7</a> |
|
503 | 503 | <a href="#L8"> 8</a> |
|
504 | 504 | <a href="#L9"> 9</a> |
|
505 | 505 | <a href="#L10">10</a> |
|
506 | 506 | <a href="#L11">11</a> |
|
507 | 507 | <a href="#L12">12</a> |
|
508 | 508 | <a href="#L13">13</a> |
|
509 | 509 | <a href="#L14">14</a> |
|
510 | 510 | <a href="#L15">15</a> |
|
511 | 511 | <a href="#L16">16</a> |
|
512 | 512 | <a href="#L17">17</a> |
|
513 | 513 | <a href="#L18">18</a> |
|
514 | 514 | <a href="#L19">19</a> |
|
515 | 515 | <a href="#L20">20</a> |
|
516 | 516 | <a href="#L21">21</a> |
|
517 | 517 | <a href="#L22">22</a> |
|
518 | 518 | <a href="#L23">23</a> |
|
519 | 519 | <a href="#L24">24</a> |
|
520 | 520 | <a href="#L25">25</a> |
|
521 | 521 | <a href="#L26">26</a> |
|
522 | 522 | <a href="#L27">27</a> |
|
523 | 523 | <a href="#L28">28</a> |
|
524 | 524 | <a href="#L29">29</a> |
|
525 | 525 | <a href="#L30">30</a> |
|
526 | 526 | <a href="#L31">31</a> |
|
527 | 527 | <a href="#L32">32</a> |
|
528 | 528 | <a href="#L33">33</a> |
|
529 | 529 | <a href="#L34">34</a> |
|
530 | 530 | <a href="#L35">35</a> |
|
531 | 531 | <a href="#L36">36</a> |
|
532 | 532 | <a href="#L37">37</a> |
|
533 | 533 | <a href="#L38">38</a> |
|
534 | 534 | <a href="#L39">39</a> |
|
535 | 535 | <a href="#L40">40</a> |
|
536 | 536 | <a href="#L41">41</a> |
|
537 | 537 | <a href="#L42">42</a></pre></div></td><td id="hlcode" class="code"><div class="code-highlight"><pre><div id="L1"><a name="L-1"></a><span class="c"># -*- coding: utf-8 -*-</span> |
|
538 | 538 | </div><div id="L2"><a name="L-2"></a> |
|
539 | 539 | </div><div id="L3"><a name="L-3"></a><span class="c"># Published under Business Source License.</span> |
|
540 | 540 | </div><div id="L4"><a name="L-4"></a><span class="c"># Read the full license text at https://rhodecode.com/licenses.</span> |
|
541 | 541 | </div><div id="L5"><a name="L-5"></a><span class="sd">"""</span> |
|
542 | 542 | </div><div id="L6"><a name="L-6"></a><span class="sd">rhodecode.websetup</span> |
|
543 | 543 | </div><div id="L7"><a name="L-7"></a><span class="sd">~~~~~~~~~~~~~~~~~~</span> |
|
544 | 544 | </div><div id="L8"><a name="L-8"></a> |
|
545 | 545 | </div><div id="L9"><a name="L-9"></a><span class="sd">Weboperations and setup for rhodecode. Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.</span> |
|
546 | 546 | </div><div id="L10"><a name="L-10"></a> |
|
547 | 547 | </div><div id="L11"><a name="L-11"></a><span class="sd">:created_on: Dec 11, 2010</span> |
|
548 | 548 | </div><div id="L12"><a name="L-12"></a><span class="sd">:author: marcink</span> |
|
549 | 549 | </div><div id="L13"><a name="L-13"></a><span class="sd">:copyright: (c) 2013-2015 RhodeCode GmbH.</span> |
|
550 | 550 | </div><div id="L14"><a name="L-14"></a><span class="sd">:license: Business Source License, see LICENSE for more details.</span> |
|
551 | 551 | </div><div id="L15"><a name="L-15"></a><span class="sd">"""</span> |
|
552 | 552 | </div><div id="L16"><a name="L-16"></a> |
|
553 | 553 | </div><div id="L17"><a name="L-17"></a><span class="kn">import</span> <span class="nn">logging</span> |
|
554 | 554 | </div><div id="L18"><a name="L-18"></a> |
|
555 | 555 | </div><div id="L19"><a name="L-19"></a><span class="kn">from</span> <span class="nn">rhodecode.config.environment</span> <span class="kn">import</span> <span class="n">load_environment</span> |
|
556 | 556 | </div><div id="L20"><a name="L-20"></a><span class="kn">from</span> <span class="nn">rhodecode.lib.db_manage</span> <span class="kn">import</span> <span class="n">DbManage</span> |
|
557 | 557 | </div><div id="L21"><a name="L-21"></a><span class="kn">from</span> <span class="nn">rhodecode.model.meta</span> <span class="kn">import</span> <span class="n">Session</span> |
|
558 | 558 | </div><div id="L22"><a name="L-22"></a> |
|
559 | 559 | </div><div id="L23"><a name="L-23"></a> |
|
560 | 560 | </div><div id="L24"><a name="L-24"></a><span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="n">__name__</span><span class="p">)</span> |
|
561 | 561 | </div><div id="L25"><a name="L-25"></a> |
|
562 | 562 | </div><div id="L26"><a name="L-26"></a> |
|
563 | 563 | </div><div id="L27"><a name="L-27"></a><span class="k">def</span> <span class="nf">setup_app</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">conf</span><span class="p">,</span> <span class="nb">vars</span><span class="p">):</span> |
|
564 | 564 | </div><div id="L28"><a name="L-28"></a> <span class="sd">"""Place any commands to setup rhodecode here"""</span> |
|
565 | 565 | </div><div id="L29"><a name="L-29"></a> <span class="n">dbconf</span> <span class="o">=</span> <span class="n">conf</span><span class="p">[</span><span class="s">'sqlalchemy.db1.url'</span><span class="p">]</span> |
|
566 | 566 | </div><div id="L30"><a name="L-30"></a> <span class="n">dbmanage</span> <span class="o">=</span> <span class="n">DbManage</span><span class="p">(</span><span class="n">log_sql</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">dbconf</span><span class="o">=</span><span class="n">dbconf</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="n">conf</span><span class="p">[</span><span class="s">'here'</span><span class="p">],</span> |
|
567 | 567 | </div><div id="L31"><a name="L-31"></a> <span class="n">tests</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">cli_args</span><span class="o">=</span><span class="n">command</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">__dict__</span><span class="p">)</span> |
|
568 | 568 | </div><div id="L32"><a name="L-32"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_tables</span><span class="p">(</span><span class="n">override</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> |
|
569 | 569 | </div><div id="L33"><a name="L-33"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">set_db_version</span><span class="p">()</span> |
|
570 | 570 | </div><div id="L34"><a name="L-34"></a> <span class="n">opts</span> <span class="o">=</span> <span class="n">dbmanage</span><span class="o">.</span><span class="n">config_prompt</span><span class="p">(</span><span class="bp">None</span><span class="p">)</span> |
|
571 | 571 | </div><div id="L35"><a name="L-35"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_settings</span><span class="p">(</span><span class="n">opts</span><span class="p">)</span> |
|
572 | 572 | </div><div id="L36"><a name="L-36"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_default_user</span><span class="p">()</span> |
|
573 | 573 | </div><div id="L37"><a name="L-37"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">admin_prompt</span><span class="p">()</span> |
|
574 | 574 | </div><div id="L38"><a name="L-38"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_permissions</span><span class="p">()</span> |
|
575 | 575 | </div><div id="L39"><a name="L-39"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">populate_default_permissions</span><span class="p">()</span> |
|
576 | 576 | </div><div id="L40"><a name="L-40"></a> <span class="n">Session</span><span class="p">()</span><span class="o">.</span><span class="n">commit</span><span class="p">()</span> |
|
577 | 577 | </div><div id="L41"><a name="L-41"></a> <span class="n">load_environment</span><span class="p">(</span><span class="n">conf</span><span class="o">.</span><span class="n">global_conf</span><span class="p">,</span> <span class="n">conf</span><span class="o">.</span><span class="n">local_conf</span><span class="p">,</span> <span class="n">initial</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> |
|
578 | 578 | </div><div id="L42"><a name="L-42"></a> <span class="n">DbManage</span><span class="o">.</span><span class="n">check_waitress</span><span class="p">()</span> |
|
579 | 579 | </div></pre></div> |
|
580 | 580 | </td></tr></tbody></table> |
|
581 | 581 | </div> |
|
582 | 582 | </div> |
|
583 | 583 | |
|
584 | 584 | |
|
585 | 585 | |
|
586 | 586 | |
|
587 | 587 | |
|
588 | 588 | |
|
589 | 589 | |
|
590 | 590 | |
|
591 | 591 | |
|
592 | 592 | <!-- |
|
593 | 593 | Gist Edit |
|
594 | 594 | --> |
|
595 | 595 | |
|
596 | 596 | |
|
597 | 597 | <h2>Gist Edit</h2> |
|
598 | 598 | |
|
599 | 599 | <div class="codeblock"> |
|
600 | 600 | <div class="code-header"> |
|
601 | 601 | <div class="form"> |
|
602 | 602 | <div class="fields"> |
|
603 | 603 | <input id="filename" name="filename" placeholder="name this file..." size="30" type="text"> |
|
604 | 604 | <div class="select2-container drop-menu" id="s2id_mimetype"><a href="javascript:void(0)" class="select2-choice" tabindex="-1"> <span class="select2-chosen" id="select2-chosen-3">Python</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span></a><label for="s2id_autogen3" class="select2-offscreen"></label><input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-3" id="s2id_autogen3"><div class="select2-drop select2-display-none drop-menu-dropdown select2-with-searchbox"> <div class="select2-search"> <label for="s2id_autogen3_search" class="select2-offscreen"></label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-3" id="s2id_autogen3_search" placeholder=""> </div> <ul class="select2-results" role="listbox" id="select2-results-3"> </ul></div></div><select id="mimetype" name="mimetype" tabindex="-1" title="" style="display: none;"> |
|
605 | 605 | <option selected="selected" value="plain">plain</option> |
|
606 | 606 | <option value="text/apl" mode="apl">APL</option><option value="text/x-asterisk" mode="asterisk">Asterisk</option><option value="text/x-csrc" mode="clike">C</option><option value="text/x-c++src" mode="clike">C++</option><option value="text/x-cobol" mode="cobol">Cobol</option><option value="text/x-java" mode="clike">Java</option><option value="text/x-csharp" mode="clike">C#</option><option value="text/x-scala" mode="clike">Scala</option><option value="text/x-clojure" mode="clojure">Clojure</option><option value="text/x-coffeescript" mode="coffeescript">CoffeeScript</option><option value="text/x-common-lisp" mode="commonlisp">Common Lisp</option><option value="text/css" mode="css">CSS</option><option value="text/x-d" mode="d">D</option><option value="text/x-diff" mode="diff">diff</option><option value="application/xml-dtd" mode="dtd">DTD</option><option value="text/x-dylan" mode="dylan">Dylan</option><option value="text/x-ecl" mode="ecl">ECL</option><option value="text/x-eiffel" mode="eiffel">Eiffel</option><option value="text/x-erlang" mode="erlang">Erlang</option><option value="text/x-fortran" mode="fortran">Fortran</option><option value="text/x-fsharp" mode="mllike">F#</option><option value="text/x-gas" mode="gas">Gas</option><option value="text/x-go" mode="go">GO</option><option value="text/x-feature" mode="gherkin">Gherkin</option><option value="text/x-go" mode="go">Go</option><option value="text/x-groovy" mode="groovy">Groovy</option><option value="text/x-haml" mode="haml">HAML</option><option value="text/x-haskell" mode="haskell">Haskell</option><option value="text/x-haxe" mode="haxe">Haxe</option><option value="application/x-aspx" mode="htmlembedded">ASP.NET</option><option value="application/x-ejs" mode="htmlembedded">Embedded Javascript</option><option value="application/x-jsp" mode="htmlembedded">JavaServer Pages</option><option value="text/html" mode="htmlmixed">HTML</option><option value="message/http" mode="http">HTTP</option><option value="text/x-jade" mode="jade">Jade</option><option value="text/javascript" mode="javascript">JavaScript</option><option value="application/json" mode="javascript">JSON</option><option value="application/typescript" mode="javascript">TypeScript</option><option value="jinja2" mode="jinja2">Jinja2</option><option value="text/x-julia" mode="julia">Julia</option><option value="text/x-less" mode="less">LESS</option><option value="text/x-livescript" mode="livescript">LiveScript</option><option value="text/x-lua" mode="lua">Lua</option><option value="text/x-markdown" mode="markdown">Markdown (GitHub-flavour)</option><option value="text/mirc" mode="mirc">mIRC</option><option value="text/x-nginx-conf" mode="nginx">Nginx</option><option value="text/n-triples" mode="ntriples">NTriples</option><option value="text/x-ocaml" mode="ocaml">OCaml</option><option value="text/x-ocaml" mode="mllike">OCaml</option><option value="text/x-octave" mode="octave">Octave</option><option value="text/x-pascal" mode="pascal">Pascal</option><option value="null" mode="pegjs">PEG.js</option><option value="text/x-perl" mode="perl">Perl</option><option value="text/x-php" mode="php">PHP</option><option value="text/x-pig" mode="pig">Pig</option><option value="text/plain" mode="null">Plain Text</option><option value="text/x-properties" mode="properties">Properties files</option><option value="text/x-python" mode="python">Python</option><option value="text/x-puppet" mode="puppet">Puppet</option><option value="text/x-rsrc" mode="r">R</option><option value="text/x-rst" mode="rst">reStructuredText</option><option value="text/x-ruby" mode="ruby">Ruby</option><option value="text/x-rustsrc" mode="rust">Rust</option><option value="text/x-sass" mode="sass">Sass</option><option value="text/x-scheme" mode="scheme">Scheme</option><option value="text/x-scss" mode="css">SCSS</option><option value="text/x-sh" mode="shell">Shell</option><option value="application/sieve" mode="sieve">Sieve</option><option value="text/x-stsrc" mode="smalltalk">Smalltalk</option><option value="text/x-smarty" mode="smarty">Smarty</option><option value="text/x-smarty" mode="smartymixed">SmartyMixed</option><option value="text/x-solr" mode="solr">Solr</option><option value="application/x-sparql-query" mode="sparql">SPARQL</option><option value="text/x-sql" mode="sql">SQL</option><option value="text/x-mariadb" mode="sql">MariaDB</option><option value="text/x-stex" mode="stex">sTeX</option><option value="text/x-latex" mode="stex">LaTeX</option><option value="text/x-systemverilog" mode="verilog">SystemVerilog</option><option value="text/x-tcl" mode="tcl">Tcl</option><option value="text/x-tiddlywiki" mode="tiddlywiki">TiddlyWiki </option><option value="text/tiki" mode="tiki">Tiki wiki</option><option value="text/x-toml" mode="toml">TOML</option><option value="text/turtle" mode="turtle">Turtle</option><option value="text/x-vb" mode="vb">VB.NET</option><option value="text/vbscript" mode="vbscript">VBScript</option><option value="text/velocity" mode="velocity">Velocity</option><option value="text/x-verilog" mode="verilog">Verilog</option><option value="application/xml" mode="xml">XML</option><option value="text/html" mode="xml">HTML</option><option value="application/xquery" mode="xquery">XQuery</option><option value="text/x-yaml" mode="yaml">YAML</option><option value="text/x-z80" mode="z80">Z80</option></select> |
|
607 | 607 | <script> |
|
608 | 608 | $(document).ready(function() { |
|
609 | 609 | $('#mimetype').select2({ |
|
610 | 610 | containerCssClass: 'drop-menu', |
|
611 | 611 | dropdownCssClass: 'drop-menu-dropdown', |
|
612 | 612 | dropdownAutoWidth: true |
|
613 | 613 | }); |
|
614 | 614 | }); |
|
615 | 615 | </script> |
|
616 | 616 | |
|
617 | 617 | </div> |
|
618 | 618 | </div> |
|
619 | 619 | </div> |
|
620 | 620 | <div id="editor_container"> |
|
621 | 621 | <div id="editor_pre"></div> |
|
622 | 622 | <textarea id="editor" name="content" style="display: none;"></textarea><div class="CodeMirror cm-s-default"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 484px; left: 219.4091796875px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" style="position: absolute; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-hscrollbar" style="left: 29px; min-height: 18px;"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-vscrollbar" style="min-width: 18px; display: block; bottom: 0px;"><div style="min-width: 1px; height: 619px;"></div></div><div class="CodeMirror-scrollbar-filler"></div><div class="CodeMirror-gutter-filler"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="min-width: 700.269653320313px; margin-left: 29px; min-height: 619px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines"><div style="position: relative; outline: none;"><div class="CodeMirror-measure"><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>47</div></div></div><div style="position: relative; z-index: 1; display: none;"></div><div class="CodeMirror-code"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">1</div></div><pre><span class="cm-keyword">import</span> <span class="cm-variable">re</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">2</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">3</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">django</span>.<span class="cm-variable">utils</span>.<span class="cm-variable">text</span> <span class="cm-keyword">import</span> <span class="cm-variable">compress_sequence</span>, <span class="cm-variable">compress_string</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">4</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">django</span>.<span class="cm-variable">utils</span>.<span class="cm-variable">cache</span> <span class="cm-keyword">import</span> <span class="cm-variable">patch_vary_headers</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">5</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">6</div></div><pre><span class="cm-variable">re_accepts_gzip</span> = <span class="cm-variable">re</span>.<span class="cm-builtin">compile</span>(<span class="cm-string">r'\bgzip\b'</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">7</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">8</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">9</div></div><pre><span class="cm-keyword">class</span> <span class="cm-def">GZipMiddleware</span>(<span class="cm-builtin">object</span>): # Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">10</div></div><pre> <span class="cm-string">"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">11</div></div><pre><span class="cm-string"> This middleware compresses content if the browser allows gzip compression.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">12</div></div><pre><span class="cm-string"> It sets the Vary header accordingly, so that caches will base their storage</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">13</div></div><pre><span class="cm-string"> on the Accept-Encoding header.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">14</div></div><pre><span class="cm-string"> """</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">15</div></div><pre> <span class="cm-keyword">def</span> <span class="cm-def">process_response</span>(<span class="cm-variable-2">self</span>, <span class="cm-variable">request</span>, <span class="cm-variable">response</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">16</div></div><pre> <span class="cm-comment"># It's not worth attempting to compress really short responses.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">17</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-operator">not</span> <span class="cm-variable">response</span>.<span class="cm-variable">streaming</span> <span class="cm-operator">and</span> <span class="cm-builtin">len</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>) <span class="cm-operator"><</span> <span class="cm-number">200</span>:</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">18</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">19</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">20</div></div><pre> <span class="cm-comment"># Avoid gzipping if we've already got a content-encoding.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">21</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-variable">response</span>.<span class="cm-variable">has_header</span>(<span class="cm-string">'Content-Encoding'</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">22</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">23</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">24</div></div><pre> <span class="cm-variable">patch_vary_headers</span>(<span class="cm-variable">response</span>, (<span class="cm-string">'Accept-Encoding'</span>,))</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">25</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">26</div></div><pre> <span class="cm-variable">ae</span> = <span class="cm-variable">request</span>.<span class="cm-variable">META</span>.<span class="cm-variable">get</span>(<span class="cm-string">'HTTP_ACCEPT_ENCODING'</span>, <span class="cm-string">''</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">27</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-operator">not</span> <span class="cm-variable">re_accepts_gzip</span>.<span class="cm-variable">search</span>(<span class="cm-variable">ae</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">28</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">29</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">30</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-variable">response</span>.<span class="cm-variable">streaming</span>:</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">31</div></div><pre> <span class="cm-comment"># Delete the `Content-Length` header for streaming content, because</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">32</div></div><pre> <span class="cm-comment"># we won't know the compressed size until we stream it.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">33</div></div><pre> <span class="cm-variable">response</span>.<span class="cm-variable">streaming_content</span> = <span class="cm-variable">compress_sequence</span>(<span class="cm-variable">response</span>.<span class="cm-variable">streaming_content</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">34</div></div><pre> <span class="cm-keyword">del</span> <span class="cm-variable">response</span>[<span class="cm-string">'Content-Length'</span>]</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">35</div></div><pre> <span class="cm-keyword">else</span>:</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">36</div></div><pre> <span class="cm-comment"># Return the compressed content only if it's actually shorter.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">37</div></div><pre> <span class="cm-variable">compressed_content</span> = <span class="cm-variable">compress_string</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">38</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-builtin">len</span>(<span class="cm-variable">compressed_content</span>) <span class="cm-operator">>=</span> <span class="cm-builtin">len</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">39</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">40</div></div><pre> <span class="cm-variable">response</span>.<span class="cm-variable">content</span> = <span class="cm-variable">compressed_content</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">41</div></div><pre> <span class="cm-variable">response</span>[<span class="cm-string">'Content-Length'</span>] = <span class="cm-builtin">str</span>(<span class="cm-builtin">len</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>))</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">42</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">43</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-variable">response</span>.<span class="cm-variable">has_header</span>(<span class="cm-string">'ETag'</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">44</div></div><pre> <span class="cm-variable">response</span>[<span class="cm-string">'ETag'</span>] = <span class="cm-variable">re</span>.<span class="cm-variable">sub</span>(<span class="cm-string">'"$'</span>, <span class="cm-string">';gzip"'</span>, <span class="cm-variable">response</span>[<span class="cm-string">'ETag'</span>])</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">45</div></div><pre> <span class="cm-variable">response</span>[<span class="cm-string">'Content-Encoding'</span>] = <span class="cm-string">'gzip'</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">46</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">47</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div></div><div class="CodeMirror-cursor" style="left: 189.4091796875px; top: 598px; height: 13px;"> </div><div class="CodeMirror-cursor CodeMirror-secondarycursor" style="display: none;"> </div></div></div></div></div><div style="position: absolute; height: 30px; width: 1px; top: 619px;"></div><div class="CodeMirror-gutters" style="height: 619px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 28px;"></div></div></div></div> |
|
623 | 623 | </div> |
|
624 | 624 | </div> |
|
625 | 625 | |
|
626 | 626 | |
|
627 | 627 | |
|
628 | 628 | |
|
629 | 629 | |
|
630 | 630 | <!-- |
|
631 | 631 | File Edit |
|
632 | 632 | --> |
|
633 | 633 | |
|
634 | 634 | <h2>File Edit</h2> |
|
635 | 635 | |
|
636 | 636 | <div class="codeblock"> |
|
637 | 637 | <div class="code-header"> |
|
638 | 638 | <div class="stats"> |
|
639 | 639 | <i class="icon-file"></i> |
|
640 | 640 | <span class="item"><a href="/example/changeset/80ead1899f50a894889e19ffeb49c9cebf5bf045">r8248:80ead1899f50</a></span> |
|
641 | 641 | <span class="item">1.2 KiB</span> |
|
642 | 642 | <span class="item last">text/x-python</span> |
|
643 | 643 | <div class="buttons"> |
|
644 | 644 | <a class="btn btn-mini" href="/example/changelog/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py"> |
|
645 | 645 | <i class="icon-time"></i> history |
|
646 | 646 | </a> |
|
647 | 647 | |
|
648 | 648 | <a class="btn btn-mini" href="/example/files/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">source</a> |
|
649 | 649 | <a class="btn btn-mini" href="/example/raw/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">raw</a> |
|
650 | 650 | <a class="btn btn-mini" href="/example/rawfile/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py"> |
|
651 | 651 | <i class="icon-archive"></i> download |
|
652 | 652 | </a> |
|
653 | 653 | </div> |
|
654 | 654 | </div> |
|
655 | 655 | <div class="form"> |
|
656 | 656 | <label for="set_mode">Editing file:</label> |
|
657 | 657 | rhodecode / |
|
658 | 658 | <input type="text" name="filename" value="websetup.py"> |
|
659 | 659 | |
|
660 | 660 | <div class="select2-container drop-menu" id="s2id_set_mode"><a href="javascript:void(0)" class="select2-choice" tabindex="-1"> <span class="select2-chosen" id="select2-chosen-2">plain</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span></a><label for="s2id_autogen2" class="select2-offscreen">Editing file:</label><input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-2" id="s2id_autogen2"><div class="select2-drop select2-display-none drop-menu-dropdown select2-with-searchbox"> <div class="select2-search"> <label for="s2id_autogen2_search" class="select2-offscreen">Editing file:</label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-2" id="s2id_autogen2_search" placeholder=""> </div> <ul class="select2-results" role="listbox" id="select2-results-2"> </ul></div></div><select id="set_mode" name="set_mode" tabindex="-1" title="Editing file:" style="display: none;"> |
|
661 | 661 | <option selected="selected" value="plain">plain</option> |
|
662 | 662 | <option value="apl">APL</option><option value="asterisk">Asterisk</option><option value="clike">C</option><option value="clike">C++</option><option value="cobol">Cobol</option><option value="clike">Java</option><option value="clike">C#</option><option value="clike">Scala</option><option value="clojure">Clojure</option><option value="coffeescript">CoffeeScript</option><option value="commonlisp">Common Lisp</option><option value="css">CSS</option><option value="d">D</option><option value="diff">diff</option><option value="dtd">DTD</option><option value="dylan">Dylan</option><option value="ecl">ECL</option><option value="eiffel">Eiffel</option><option value="erlang">Erlang</option><option value="fortran">Fortran</option><option value="mllike">F#</option><option value="gas">Gas</option><option value="go">GO</option><option value="gherkin">Gherkin</option><option value="go">Go</option><option value="groovy">Groovy</option><option value="haml">HAML</option><option value="haskell">Haskell</option><option value="haxe">Haxe</option><option value="htmlembedded">ASP.NET</option><option value="htmlembedded">Embedded Javascript</option><option value="htmlembedded">JavaServer Pages</option><option value="htmlmixed">HTML</option><option value="http">HTTP</option><option value="jade">Jade</option><option value="javascript">JavaScript</option><option value="javascript">JSON</option><option value="javascript">TypeScript</option><option value="jinja2">Jinja2</option><option value="julia">Julia</option><option value="less">LESS</option><option value="livescript">LiveScript</option><option value="lua">Lua</option><option value="markdown">Markdown (GitHub-flavour)</option><option value="mirc">mIRC</option><option value="nginx">Nginx</option><option value="ntriples">NTriples</option><option value="ocaml">OCaml</option><option value="mllike">OCaml</option><option value="octave">Octave</option><option value="pascal">Pascal</option><option value="pegjs">PEG.js</option><option value="perl">Perl</option><option value="php">PHP</option><option value="pig">Pig</option><option value="null">Plain Text</option><option value="properties">Properties files</option><option value="python" selected="selected">Python</option><option value="puppet">Puppet</option><option value="r">R</option><option value="rst">reStructuredText</option><option value="ruby">Ruby</option><option value="rust">Rust</option><option value="sass">Sass</option><option value="scheme">Scheme</option><option value="css">SCSS</option><option value="shell">Shell</option><option value="sieve">Sieve</option><option value="smalltalk">Smalltalk</option><option value="smarty">Smarty</option><option value="smartymixed">SmartyMixed</option><option value="solr">Solr</option><option value="sparql">SPARQL</option><option value="sql">SQL</option><option value="sql">MariaDB</option><option value="stex">sTeX</option><option value="stex">LaTeX</option><option value="verilog">SystemVerilog</option><option value="tcl">Tcl</option><option value="tiddlywiki">TiddlyWiki </option><option value="tiki">Tiki wiki</option><option value="toml">TOML</option><option value="turtle">Turtle</option><option value="vb">VB.NET</option><option value="vbscript">VBScript</option><option value="velocity">Velocity</option><option value="verilog">Verilog</option><option value="xml">XML</option><option value="xml">HTML</option><option value="xquery">XQuery</option><option value="yaml">YAML</option><option value="z80">Z80</option></select> |
|
663 | 663 | <script> |
|
664 | 664 | $(document).ready(function() { |
|
665 | 665 | $('#set_mode').select2({ |
|
666 | 666 | containerCssClass: 'drop-menu', |
|
667 | 667 | dropdownCssClass: 'drop-menu-dropdown', |
|
668 | 668 | dropdownAutoWidth: true |
|
669 | 669 | }); |
|
670 | 670 | }); |
|
671 | 671 | </script> |
|
672 | 672 | |
|
673 | 673 | <label for="line_wrap">line wraps</label> |
|
674 | 674 | <div class="select2-container drop-menu" id="s2id_line_wrap"><a href="javascript:void(0)" class="select2-choice" tabindex="-1"> <span class="select2-chosen" id="select2-chosen-3">off</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span></a><label for="s2id_autogen3" class="select2-offscreen">line wraps</label><input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-3" id="s2id_autogen3"><div class="select2-drop select2-display-none drop-menu-dropdown"> <div class="select2-search select2-search-hidden select2-offscreen"> <label for="s2id_autogen3_search" class="select2-offscreen">line wraps</label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-3" id="s2id_autogen3_search" placeholder=""> </div> <ul class="select2-results" role="listbox" id="select2-results-3"> </ul></div></div><select id="line_wrap" name="line_wrap" tabindex="-1" title="line wraps" style="display: none;"> |
|
675 | 675 | <option value="on">on</option> |
|
676 | 676 | <option selected="selected" value="off">off</option> |
|
677 | 677 | </select> |
|
678 | 678 | <script> |
|
679 | 679 | $(document).ready(function() { |
|
680 | 680 | $('#line_wrap').select2({ |
|
681 | 681 | containerCssClass: 'drop-menu', |
|
682 | 682 | dropdownCssClass: 'drop-menu-dropdown', |
|
683 | 683 | dropdownAutoWidth: true, |
|
684 | 684 | minimumResultsForSearch: -1 |
|
685 | 685 | |
|
686 | 686 | }); |
|
687 | 687 | }); |
|
688 | 688 | </script> |
|
689 | 689 | |
|
690 | 690 | <div id="render_preview" class="btn btn-mini hidden disabled">Preview</div> |
|
691 | 691 | </div> |
|
692 | 692 | </div> |
|
693 | 693 | <div id="editor_container"> |
|
694 | 694 | <pre id="editor_pre"></pre> |
|
695 | 695 | <textarea id="editor" name="content" style="display: none;"># -*- coding: utf-8 -*- |
|
696 | 696 | |
|
697 | 697 | # Published under Commercial License. |
|
698 | 698 | # Read the full license text at https://rhodecode.com/licenses. |
|
699 | 699 | """ |
|
700 | 700 | rhodecode.websetup |
|
701 | 701 | ~~~~~~~~~~~~~~~~~~ |
|
702 | 702 | |
|
703 | 703 | Weboperations and setup for rhodecode |
|
704 | 704 | |
|
705 | 705 | :created_on: Dec 11, 2010 |
|
706 | 706 | :author: marcink |
|
707 | 707 | :copyright: (c) 2013-2015 RhodeCode GmbH. |
|
708 | 708 | :license: Commercial License, see LICENSE for more details. |
|
709 | 709 | """ |
|
710 | 710 | |
|
711 | 711 | import logging |
|
712 | 712 | |
|
713 | 713 | from rhodecode.config.environment import load_environment |
|
714 | 714 | from rhodecode.lib.db_manage import DbManage |
|
715 | 715 | from rhodecode.model.meta import Session |
|
716 | 716 | |
|
717 | 717 | |
|
718 | 718 | log = logging.getLogger(__name__) |
|
719 | 719 | |
|
720 | 720 | |
|
721 | 721 | def setup_app(command, conf, vars): |
|
722 | 722 | """Place any commands to setup rhodecode here""" |
|
723 | 723 | dbconf = conf['sqlalchemy.db1.url'] |
|
724 | 724 | dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'], |
|
725 | 725 | tests=False, cli_args=command.options.__dict__) |
|
726 | 726 | dbmanage.create_tables(override=True) |
|
727 | 727 | dbmanage.set_db_version() |
|
728 | 728 | opts = dbmanage.config_prompt(None) |
|
729 | 729 | dbmanage.create_settings(opts) |
|
730 | 730 | dbmanage.create_default_user() |
|
731 | 731 | dbmanage.admin_prompt() |
|
732 | 732 | dbmanage.create_permissions() |
|
733 | 733 | dbmanage.populate_default_permissions() |
|
734 | 734 | Session().commit() |
|
735 | 735 | load_environment(conf.global_conf, conf.local_conf, initial=True) |
|
736 | 736 | </textarea><div class="CodeMirror cm-s-default CodeMirror-focused"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" style="position: absolute; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-hscrollbar" style="left: 29px; min-height: 18px;"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-vscrollbar" style="display: block; bottom: 0px; min-width: 18px;"><div style="min-width: 1px; height: 554px;"></div></div><div class="CodeMirror-scrollbar-filler"></div><div class="CodeMirror-gutter-filler"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="min-width: 579.350463867188px; margin-left: 29px; min-height: 554px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines"><div style="position: relative; outline: none;"><div class="CodeMirror-measure"><div style="width: 50px; height: 50px; overflow-x: scroll;"></div></div><div style="position: relative; z-index: 1; display: none;"></div><div class="CodeMirror-code"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">1</div></div><pre><span class="cm-comment"># -*- coding: utf-8 -*-</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">2</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">3</div></div><pre><span class="cm-comment"># Published under Commercial License.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">4</div></div><pre><span class="cm-comment"># Read the full license text at https://rhodecode.com/licenses.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">5</div></div><pre><span class="cm-string">"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">6</div></div><pre><span class="cm-string">rhodecode.websetup</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">7</div></div><pre><span class="cm-string">~~~~~~~~~~~~~~~~~~</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">8</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">9</div></div><pre><span class="cm-string">Weboperations and setup for rhodecode</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">10</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">11</div></div><pre><span class="cm-string">:created_on: Dec 11, 2010</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">12</div></div><pre><span class="cm-string">:author: marcink</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">13</div></div><pre><span class="cm-string">:copyright: (c) 2013-2015 RhodeCode GmbH.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">14</div></div><pre><span class="cm-string">:license: Commercial License, see LICENSE for more details.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">15</div></div><pre><span class="cm-string">"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">16</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">17</div></div><pre><span class="cm-keyword">import</span> <span class="cm-variable">logging</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">18</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">19</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">rhodecode</span>.<span class="cm-variable">config</span>.<span class="cm-variable">environment</span> <span class="cm-keyword">import</span> <span class="cm-variable">load_environment</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">20</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">rhodecode</span>.<span class="cm-variable">lib</span>.<span class="cm-variable">db_manage</span> <span class="cm-keyword">import</span> <span class="cm-variable">DbManage</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">21</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">rhodecode</span>.<span class="cm-variable">model</span>.<span class="cm-variable">meta</span> <span class="cm-keyword">import</span> <span class="cm-variable">Session</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">22</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">23</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">24</div></div><pre><span class="cm-variable">log</span> = <span class="cm-variable">logging</span>.<span class="cm-variable">getLogger</span>(<span class="cm-variable">__name__</span>) # Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">25</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">26</div></div><pre> </pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">27</div></div><pre><span class="cm-keyword">def</span> <span class="cm-def">setup_app</span>(<span class="cm-variable">command</span>, <span class="cm-variable">conf</span>, <span class="cm-builtin">vars</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">28</div></div><pre> <span class="cm-string">"""Place any commands to setup rhodecode here"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">29</div></div><pre> <span class="cm-variable">dbconf</span> = <span class="cm-variable">conf</span>[<span class="cm-string">'sqlalchemy.db1.url'</span>]</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">30</div></div><pre> <span class="cm-variable">dbmanage</span> = <span class="cm-variable">DbManage</span>(<span class="cm-variable">log_sql</span>=<span class="cm-builtin">True</span>, <span class="cm-variable">dbconf</span>=<span class="cm-variable">dbconf</span>, <span class="cm-variable">root</span>=<span class="cm-variable">conf</span>[<span class="cm-string">'here'</span>],</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">31</div></div><pre> <span class="cm-variable">tests</span>=<span class="cm-builtin">False</span>, <span class="cm-variable">cli_args</span>=<span class="cm-variable">command</span>.<span class="cm-variable">options</span>.<span class="cm-variable">__dict__</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">32</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_tables</span>(<span class="cm-variable">override</span>=<span class="cm-builtin">True</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">33</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">set_db_version</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">34</div></div><pre> <span class="cm-variable">opts</span> = <span class="cm-variable">dbmanage</span>.<span class="cm-variable">config_prompt</span>(<span class="cm-builtin">None</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">35</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_settings</span>(<span class="cm-variable">opts</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">36</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_default_user</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">37</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">admin_prompt</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">38</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_permissions</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">39</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">populate_default_permissions</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">40</div></div><pre> <span class="cm-variable">Session</span>().<span class="cm-variable">commit</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">41</div></div><pre> <span class="cm-variable">load_environment</span>(<span class="cm-variable">conf</span>.<span class="cm-variable">global_conf</span>, <span class="cm-variable">conf</span>.<span class="cm-variable">local_conf</span>, <span class="cm-variable">initial</span>=<span class="cm-builtin">True</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">42</div></div><pre> </pre></div></div><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 13px;"> </div><div class="CodeMirror-cursor CodeMirror-secondarycursor" style="display: none;"> </div></div></div></div></div><div style="position: absolute; height: 30px; width: 1px; top: 554px;"></div><div class="CodeMirror-gutters" style="height: 554px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 28px;"></div></div></div></div> |
|
737 | 737 | <div id="editor_preview"></div> |
|
738 | 738 | </div> |
|
739 | 739 | <div class="message"> |
|
740 | 740 | <label class="codeblock-label">Commit Message</label> |
|
741 | 741 | <textarea id="commit" name="message" placeholder="Edited file rhodecode/websetup.py via RhodeCode"></textarea> |
|
742 | 742 | </div> |
|
743 | 743 | </div> |
|
744 | 744 | |
|
745 | 745 | |
|
746 | 746 | |
|
747 | 747 | |
|
748 | 748 | |
|
749 | 749 | |
|
750 | 750 | <!-- |
|
751 | 751 | Commit with comments |
|
752 | 752 | --> |
|
753 | 753 | |
|
754 | 754 | <h2>Commit with comments</h2> |
|
755 | 755 | |
|
756 | 756 | <div class="diff-container" id="diff-container-140360037209920"> |
|
757 | 757 | <div id="c-4e5ee86997c6-7046e4320b26_target"></div> |
|
758 | 758 | <div id="c-4e5ee86997c6-7046e4320b26" class="diffblock margined comm"> |
|
759 | 759 | <div class="code-header"> |
|
760 | 760 | <div title="Go back to changed files overview"> |
|
761 | 761 | <a href="#changes_box"> |
|
762 | 762 | <i class="icon-circle-arrow-up"></i> |
|
763 | 763 | </a> |
|
764 | 764 | </div> |
|
765 | 765 | <div class="changeset_header"> |
|
766 | 766 | <div class="changeset_file"> |
|
767 | 767 | <i class="icon-file"></i> |
|
768 | 768 | <a href="/andersonsantos/rhodecode-dev-fork/files/4e5ee86997c64981d85cf62283af448624e26929/rhodecode/tests/functional/test_compare_local.py">rhodecode/tests/functional/test_compare_local.py</a> |
|
769 | 769 | </div> |
|
770 | 770 | <div class="diff-actions"> |
|
771 | 771 | <a href="/andersonsantos/rhodecode-dev-fork/diff/rhodecode/tests/functional/test_compare_local.py?fulldiff=1&diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&diff=diff&diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Show full diff for this file"> |
|
772 | 772 | <img class="icon" src="/images/icons/page_white_go.png"> |
|
773 | 773 | </a> |
|
774 | 774 | <a href="/andersonsantos/rhodecode-dev-fork/diff-2way/rhodecode/tests/functional/test_compare_local.py?fulldiff=1&diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&diff=diff&diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Show full side-by-side diff for this file"> |
|
775 | 775 | <img class="icon" src="/images/icons/application_double.png"> |
|
776 | 776 | </a> |
|
777 | 777 | <a href="/andersonsantos/rhodecode-dev-fork/diff/rhodecode/tests/functional/test_compare_local.py?diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&diff=raw&diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Raw diff"> |
|
778 | 778 | <img class="icon" src="/images/icons/page_white.png"> |
|
779 | 779 | </a> |
|
780 | 780 | <a href="/andersonsantos/rhodecode-dev-fork/diff/rhodecode/tests/functional/test_compare_local.py?diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&diff=download&diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Download diff"> |
|
781 | 781 | <img class="icon" src="/images/icons/page_save.png"> |
|
782 | 782 | </a> |
|
783 | 783 | <a class="tooltip" href="/andersonsantos/rhodecode-dev-fork/changeset/4e5ee86997c64981d85cf62283af448624e26929?c-4e5ee86997c6-7046e4320b26=WS%3A1&c-4e5ee86997c6-7046e4320b26=C%3A3#c-4e5ee86997c6-7046e4320b26" title="Ignore white space"><img alt="Ignore white space" class="icon" src="/images/icons/text_strikethrough.png"></a> |
|
784 | 784 | <a class="tooltip" href="/andersonsantos/rhodecode-dev-fork/changeset/4e5ee86997c64981d85cf62283af448624e26929?c-4e5ee86997c6-7046e4320b26=C%3A6#c-4e5ee86997c6-7046e4320b26" title="increase diff context to 6 lines"><img alt="increase diff context to 6 lines" class="icon" src="/images/icons/table_add.png"></a> |
|
785 | 785 | </div> |
|
786 | 786 | <span> |
|
787 | 787 | <label> |
|
788 | 788 | Show inline comments |
|
789 | 789 | <input checked="checked" class="show-inline-comments" id="" id_for="c-4e5ee86997c6-7046e4320b26" name="" type="checkbox" value="1"> |
|
790 | 790 | </label> |
|
791 | 791 | </span> |
|
792 | 792 | </div> |
|
793 | 793 | </div> |
|
794 | 794 | <div class="code-body"> |
|
795 | 795 | <div class="full_f_path" path="rhodecode/tests/functional/test_compare_local.py"></div> |
|
796 | 796 | <table class="code-difftable"> |
|
797 | 797 | <tbody><tr class="line context"> |
|
798 | 798 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td> |
|
799 | 799 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td> |
|
800 | 800 | <td class="code "> |
|
801 | 801 | <pre>@@ -59,7 +59,7 @@ |
|
802 | 802 | </pre> |
|
803 | 803 | </td> |
|
804 | 804 | </tr> |
|
805 | 805 | <tr class="line unmod"> |
|
806 | 806 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o59" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o59">59</a></td> |
|
807 | 807 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n59" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n59">59</a></td> |
|
808 | 808 | <td class="code "> |
|
809 | 809 | <pre> 'tag': 'v0.2.0', |
|
810 | 810 | </pre> |
|
811 | 811 | </td> |
|
812 | 812 | </tr> |
|
813 | 813 | <tr class="line unmod"> |
|
814 | 814 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o60" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o60">60</a></td> |
|
815 | 815 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n60" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n60">60</a></td> |
|
816 | 816 | <td class="code "> |
|
817 | 817 | <pre> 'branch': 'default', |
|
818 | 818 | </pre> |
|
819 | 819 | </td> |
|
820 | 820 | </tr> |
|
821 | 821 | <tr class="line unmod"> |
|
822 | 822 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o61" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o61">61</a></td> |
|
823 | 823 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n61" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n61">61</a></td> |
|
824 | 824 | <td class="code "> |
|
825 | 825 | <pre> 'response': # Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it. |
|
826 | 826 | </pre> |
|
827 | 827 | </td> |
|
828 | 828 | </tr> |
|
829 | 829 | <tr class="line del"> |
|
830 | 830 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o62" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o62">62</a></td> |
|
831 | 831 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td> |
|
832 | 832 | <td class="code "> |
|
833 | 833 | <pre> '147 files changed: 5700 inserted, 10176 deleted' |
|
834 | 834 | </pre> |
|
835 | 835 | </td> |
|
836 | 836 | </tr> |
|
837 | 837 | <tr class="line add"> |
|
838 | 838 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
839 | 839 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n62" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n62">62</a></td> |
|
840 | 840 | <td class="code "> |
|
841 | 841 | <pre><ins> </ins> '147 files changed: 5700 inserted, 10176 deleted' |
|
842 | 842 | </pre> |
|
843 | 843 | </td> |
|
844 | 844 | </tr> |
|
845 | 845 | <tr class="line unmod"> |
|
846 | 846 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o63" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o63">63</a></td> |
|
847 | 847 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n63" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n63">63</a></td> |
|
848 | 848 | <td class="code "> |
|
849 | 849 | <pre> }, |
|
850 | 850 | </pre> |
|
851 | 851 | </td> |
|
852 | 852 | </tr> |
|
853 | 853 | <tr class="line unmod"> |
|
854 | 854 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o64" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o64">64</a></td> |
|
855 | 855 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n64" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n64">64</a></td> |
|
856 | 856 | <td class="code "> |
|
857 | 857 | <pre> 'git': { |
|
858 | 858 | </pre> |
|
859 | 859 | </td> |
|
860 | 860 | </tr> |
|
861 | 861 | <tr class="line unmod"> |
|
862 | 862 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o65" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o65">65</a></td> |
|
863 | 863 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n65" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n65">65</a></td> |
|
864 | 864 | <td class="code "> |
|
865 | 865 | <pre> 'tag': 'v0.2.2', |
|
866 | 866 | </pre> |
|
867 | 867 | </td> |
|
868 | 868 | </tr> |
|
869 | 869 | <tr class="line context"> |
|
870 | 870 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td> |
|
871 | 871 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td> |
|
872 | 872 | <td class="code "> |
|
873 | 873 | <pre>@@ -77,9 +77,11 @@ |
|
874 | 874 | </pre> |
|
875 | 875 | </td> |
|
876 | 876 | </tr> |
|
877 | 877 | <tr class="line unmod"> |
|
878 | 878 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o77" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o77">77</a></td> |
|
879 | 879 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n77" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n77">77</a></td> |
|
880 | 880 | <td class="code "> |
|
881 | 881 | <pre> target_ref=revisions[backend.alias]['tag'], |
|
882 | 882 | </pre> |
|
883 | 883 | </td> |
|
884 | 884 | </tr> |
|
885 | 885 | <tr class="line unmod"> |
|
886 | 886 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o78" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o78">78</a></td> |
|
887 | 887 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n78" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n78">78</a></td> |
|
888 | 888 | <td class="code "> |
|
889 | 889 | <pre> )) |
|
890 | 890 | </pre> |
|
891 | 891 | </td> |
|
892 | 892 | </tr><tr id="comment-tr-3754" class="inline-comments"><td></td><td></td><td> |
|
893 | 893 | |
|
894 | 894 | <div class="comment" id="comment-3754" line="n78"> |
|
895 | 895 | <div class="comment-wrapp"> |
|
896 | 896 | <div class="meta"> |
|
897 | 897 | <span class="gravatar"> |
|
898 | 898 | <img src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&s=40" height="20" width="20"> |
|
899 | 899 | </span> |
|
900 | 900 | <span class="user"> |
|
901 | 901 | anderson |
|
902 | 902 | </span> |
|
903 | 903 | <span class="date"> |
|
904 | 904 | just now | |
|
905 | 905 | </span> |
|
906 | 906 | <span class="status-change"> |
|
907 | 907 | Comment on commit |
|
908 | 908 | </span> |
|
909 | 909 | <a class="permalink" href="#comment-3754">¶</a> |
|
910 | 910 | </div> |
|
911 | 911 | <div class="text"> |
|
912 | 912 | <div class="rst-block"><p>commented line |
|
913 | 913 | with multiple lines</p> |
|
914 | 914 | </div> |
|
915 | 915 | </div> |
|
916 | 916 | </div> |
|
917 | 917 | </div><div class="add-comment"><span class="btn btn-default">Add another comment</span></div> |
|
918 | 918 | |
|
919 | 919 | </td></tr> |
|
920 | 920 | <tr class="line unmod"> |
|
921 | 921 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o79" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o79">79</a></td> |
|
922 | 922 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n79" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n79">79</a></td> |
|
923 | 923 | <td class="code "> |
|
924 | 924 | <pre></pre> |
|
925 | 925 | </td> |
|
926 | 926 | </tr> |
|
927 | 927 | <tr class="line del form-open hl-comment"> |
|
928 | 928 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o80" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o80">80</a></td> |
|
929 | 929 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td> |
|
930 | 930 | <td class="code "> |
|
931 | 931 | <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del> |
|
932 | 932 | </pre> |
|
933 | 933 | </td> |
|
934 | 934 | </tr><tr id="comment-tr-undefined" class="comment-form-inline"><td></td><td></td><td> |
|
935 | 935 | <div class="comment-inline-form ac"> |
|
936 | 936 | <div class="overlay"><div class="overlay-text">Submitting...</div></div> |
|
937 | 937 | <form action="#" class="inline-form" method="get"> |
|
938 | 938 | <div id="edit-container_o80" class="clearfix"> |
|
939 | 939 | <div class="comment-title pull-left"> |
|
940 | 940 | Commenting on line o80. |
|
941 | 941 | </div> |
|
942 | 942 | <div class="comment-help pull-right"> |
|
943 | 943 | Comments parsed using <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">RST</a> syntax with <span class="tooltip" title="Use @username inside this text to send notification to this RhodeCode user">@mention</span> support. |
|
944 | 944 | </div> |
|
945 | 945 | <div style="clear: both"></div> |
|
946 | 946 | <textarea id="text_o80" name="text" class="comment-block-ta ac-input" autocomplete="off"></textarea> |
|
947 | 947 | </div> |
|
948 | 948 | <div id="preview-container_o80" class="clearfix" style="display: none;"> |
|
949 | 949 | <div class="comment-help"> |
|
950 | 950 | Comment preview |
|
951 | 951 | </div> |
|
952 | 952 | <div id="preview-box_o80" class="preview-box"></div> |
|
953 | 953 | </div> |
|
954 | 954 | <div class="comment-button pull-right"> |
|
955 | 955 | <input type="hidden" name="f_path" value="rhodecode/tests/functional/test_compare_local.py"> |
|
956 | 956 | <input type="hidden" name="line" value="o80"> |
|
957 | 957 | <div id="preview-btn_o80" class="btn btn-default">Preview</div> |
|
958 | 958 | <div id="edit-btn_o80" class="btn" style="display: none;">Edit</div> |
|
959 | 959 | <input class="btn btn-success save-inline-form" id="save" name="save" type="submit" value="Comment"> |
|
960 | 960 | </div> |
|
961 | 961 | <div class="comment-button hide-inline-form-button"> |
|
962 | 962 | <input class="btn hide-inline-form" id="hide-inline-form" name="hide-inline-form" type="reset" value="Cancel"> |
|
963 | 963 | </div> |
|
964 | 964 | </form> |
|
965 | 965 | </div> |
|
966 | 966 | </td></tr> |
|
967 | 967 | <tr class="line add"> |
|
968 | 968 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
969 | 969 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n80" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n80">80</a></td> |
|
970 | 970 | <td class="code "> |
|
971 | 971 | <pre> response.mustcontain('%s@%s' % ( |
|
972 | 972 | </pre> |
|
973 | 973 | </td> |
|
974 | 974 | </tr> |
|
975 | 975 | <tr class="line add"> |
|
976 | 976 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
977 | 977 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n81" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n81">81</a></td> |
|
978 | 978 | <td class="code "> |
|
979 | 979 | <pre> backend.repo_name, |
|
980 | 980 | </pre> |
|
981 | 981 | </td> |
|
982 | 982 | </tr> |
|
983 | 983 | <tr class="line unmod"> |
|
984 | 984 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o81" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o81">81</a></td> |
|
985 | 985 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n82" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n82">82</a></td> |
|
986 | 986 | <td class="code "> |
|
987 | 987 | <pre> revisions[backend.alias]['branch'])) |
|
988 | 988 | </pre> |
|
989 | 989 | </td> |
|
990 | 990 | </tr> |
|
991 | 991 | <tr class="line del"> |
|
992 | 992 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o82" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o82">82</a></td> |
|
993 | 993 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td> |
|
994 | 994 | <td class="code "> |
|
995 | 995 | <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del> |
|
996 | 996 | </pre> |
|
997 | 997 | </td> |
|
998 | 998 | </tr> |
|
999 | 999 | <tr class="line add"> |
|
1000 | 1000 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
1001 | 1001 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n83" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n83">83</a></td> |
|
1002 | 1002 | <td class="code "> |
|
1003 | 1003 | <pre> response.mustcontain('%s@%s' % ( |
|
1004 | 1004 | </pre> |
|
1005 | 1005 | </td> |
|
1006 | 1006 | </tr> |
|
1007 | 1007 | <tr class="line add"> |
|
1008 | 1008 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
1009 | 1009 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n84" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n84">84</a></td> |
|
1010 | 1010 | <td class="code "> |
|
1011 | 1011 | <pre> backend.repo_name, |
|
1012 | 1012 | </pre> |
|
1013 | 1013 | </td> |
|
1014 | 1014 | </tr> |
|
1015 | 1015 | <tr class="line unmod"> |
|
1016 | 1016 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o83" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o83">83</a></td> |
|
1017 | 1017 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n85" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n85">85</a></td> |
|
1018 | 1018 | <td class="code "> |
|
1019 | 1019 | <pre> revisions[backend.alias]['tag'])) |
|
1020 | 1020 | </pre> |
|
1021 | 1021 | </td> |
|
1022 | 1022 | </tr> |
|
1023 | 1023 | <tr class="line unmod"> |
|
1024 | 1024 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o84" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o84">84</a></td> |
|
1025 | 1025 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n86" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n86">86</a></td> |
|
1026 | 1026 | <td class="code "> |
|
1027 | 1027 | <pre> response.mustcontain(revisions[backend.alias]['response']) |
|
1028 | 1028 | </pre> |
|
1029 | 1029 | </td> |
|
1030 | 1030 | </tr> |
|
1031 | 1031 | <tr class="line unmod"> |
|
1032 | 1032 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o85" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o85">85</a></td> |
|
1033 | 1033 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n87" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n87">87</a></td> |
|
1034 | 1034 | <td class="code "> |
|
1035 | 1035 | <pre></pre> |
|
1036 | 1036 | </td> |
|
1037 | 1037 | </tr> |
|
1038 | 1038 | </tbody></table> |
|
1039 | 1039 | </div> |
|
1040 | 1040 | </div> |
|
1041 | 1041 | </div> |
|
1042 | 1042 | |
|
1043 | 1043 | |
|
1044 | 1044 | |
|
1045 | 1045 | <!-- |
|
1046 | 1046 | Side-by-side diff |
|
1047 | 1047 | --> |
|
1048 | 1048 | |
|
1049 | 1049 | <h2>Side-by-side diff</h2> |
|
1050 | 1050 | |
|
1051 | 1051 | <div class="box"> |
|
1052 | 1052 | <div class="diff-container" style="overflow-x: hidden"> |
|
1053 | 1053 | <div class="diffblock comm" style="margin:3px; padding:1px"> |
|
1054 | 1054 | <div class="code-header"> |
|
1055 | 1055 | <div class="changeset_header"> |
|
1056 | 1056 | <div class="changeset_file"> |
|
1057 | 1057 | <i class="icon-file"></i> |
|
1058 | 1058 | <a href="/pygments/files/ea295cfb622620f5ba13e226ec531e3fe5296399/tests/test_basic_api.py">tests/test_basic_api.py</a> |
|
1059 | 1059 | [mode: <span id="selected_mode">python</span>] |
|
1060 | 1060 | </div> |
|
1061 | 1061 | <div class="diff-actions"> |
|
1062 | 1062 | <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&diff=diff&diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&fulldiff=1" class="tooltip" title="Show full diff for this file"> |
|
1063 | 1063 | <img class="icon" src="/images/icons/page_white_go.png"> |
|
1064 | 1064 | </a> |
|
1065 | 1065 | <a href="/pygments/diff-2way/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&diff=diff&diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&fulldiff=1" class="tooltip" title="Show full side-by-side diff for this file" tt_title="Show full side-by-side diff for this file"> |
|
1066 | 1066 | <img class="icon" src="/images/icons/application_double.png"> |
|
1067 | 1067 | </a> |
|
1068 | 1068 | <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&diff=raw" class="tooltip" title="Raw diff"> |
|
1069 | 1069 | <img class="icon" src="/images/icons/page_white.png"> |
|
1070 | 1070 | </a> |
|
1071 | 1071 | <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&diff=download" class="tooltip" title="Download diff"> |
|
1072 | 1072 | <img class="icon" src="/images/icons/page_save.png"> |
|
1073 | 1073 | </a> |
|
1074 | 1074 | <label><input id="ignorews" name="ignorews" type="checkbox" value="1">ignore white space</label> |
|
1075 | 1075 | <label><input id="edit_mode" name="edit_mode" type="checkbox" value="1">turn on edit mode</label> |
|
1076 | 1076 | |
|
1077 | 1077 | </div> |
|
1078 | 1078 | <div style="float: right; padding: 0px 10px 0px 0px"> |
|
1079 | 1079 | r1538:de45f950b669 ... r1539:ea295cfb6226 |
|
1080 | 1080 | </div> |
|
1081 | 1081 | </div> |
|
1082 | 1082 | </div> |
|
1083 | 1083 | <div id="compare"></div> |
|
1084 | 1084 | </div> |
|
1085 | 1085 | </div> |
|
1086 | 1086 | |
|
1087 | 1087 | <script> |
|
1088 | 1088 | $(document).ready(function () { |
|
1089 | 1089 | var example_lines = '1\n2\n3\n4\n5\n6\n7\n8\n9\n \n'; |
|
1090 | 1090 | |
|
1091 | 1091 | $('#compare').mergely({ |
|
1092 | 1092 | width: 'auto', |
|
1093 | 1093 | height: '600', |
|
1094 | 1094 | fgcolor: {a:'#ddffdd',c:'#cccccc',d:'#ffdddd'}, |
|
1095 | 1095 | bgcolor: '#fff', |
|
1096 | 1096 | viewport: true, |
|
1097 | 1097 | cmsettings: {mode: 'text/plain', readOnly: true, lineWrapping: false, lineNumbers: true}, |
|
1098 | 1098 | lhs: function(setValue) { |
|
1099 | 1099 | if("False" == "True"){ |
|
1100 | 1100 | setValue('Binary file') |
|
1101 | 1101 | } |
|
1102 | 1102 | else if("MercurialCommit" == "EmptyCommit"){ |
|
1103 | 1103 | setValue(''); |
|
1104 | 1104 | } |
|
1105 | 1105 | else{ |
|
1106 | 1106 | var left_value = example_lines.slice(0, 10) + |
|
1107 | 1107 | '123456789 '.repeat(10) + |
|
1108 | 1108 | '\n'+ |
|
1109 | 1109 | example_lines.slice(10, 20); |
|
1110 | 1110 | setValue(left_value + example_lines.repeat(9)); |
|
1111 | 1111 | } |
|
1112 | 1112 | |
|
1113 | 1113 | }, |
|
1114 | 1114 | rhs: function(setValue) { |
|
1115 | 1115 | if("False" == "True"){ |
|
1116 | 1116 | setValue('Binary file') |
|
1117 | 1117 | } |
|
1118 | 1118 | else if("MercurialCommit" == "EmptyCommit"){ |
|
1119 | 1119 | setValue(''); |
|
1120 | 1120 | } |
|
1121 | 1121 | else{ |
|
1122 | 1122 | var right_value = example_lines + |
|
1123 | 1123 | example_lines.slice(0, 8) + |
|
1124 | 1124 | 'abcdefghi '.repeat(10) + |
|
1125 | 1125 | '\n'+ |
|
1126 | 1126 | example_lines.slice(8, 20); |
|
1127 | 1127 | setValue(right_value + example_lines.repeat(9)); |
|
1128 | 1128 | } |
|
1129 | 1129 | }, |
|
1130 | 1130 | }); |
|
1131 | 1131 | |
|
1132 | 1132 | var detected_mode = detectCodeMirrorModeFromExt('test_basic_api.py', true); |
|
1133 | 1133 | if(detected_mode){ |
|
1134 | 1134 | setCodeMirrorMode($('#compare').mergely('cm', 'lhs'), detected_mode); |
|
1135 | 1135 | setCodeMirrorMode($('#compare').mergely('cm', 'rhs'), detected_mode); |
|
1136 | 1136 | $('#selected_mode').html(detected_mode); |
|
1137 | 1137 | } |
|
1138 | 1138 | |
|
1139 | 1139 | $('#ignorews').change(function(e){ |
|
1140 | 1140 | var val = e.currentTarget.checked; |
|
1141 | 1141 | $('#compare').mergely('options', {ignorews: val}); |
|
1142 | 1142 | $('#compare').mergely('update'); |
|
1143 | 1143 | }); |
|
1144 | 1144 | $('#edit_mode').change(function(e){ |
|
1145 | 1145 | var val = !e.currentTarget.checked; |
|
1146 | 1146 | $('#compare').mergely('cm', 'lhs').setOption('readOnly', val); |
|
1147 | 1147 | $('#compare').mergely('cm', 'rhs').setOption('readOnly', val); |
|
1148 | 1148 | $('#compare').mergely('update'); |
|
1149 | 1149 | }) |
|
1150 | 1150 | }); |
|
1151 | 1151 | </script> |
|
1152 | 1152 | |
|
1153 | 1153 | </div> |
|
1154 | 1154 | |
|
1155 | 1155 | <!-- end examples --> |
|
1156 | 1156 | |
|
1157 | 1157 | </div> |
|
1158 | 1158 | </div> |
|
1159 | 1159 | </div> |
|
1160 | 1160 | </%def> |
@@ -1,961 +1,961 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | ${self.sidebar()} |
|
19 | 19 | |
|
20 | 20 | <div class="main-content"> |
|
21 | 21 | |
|
22 | 22 | <h2>Collapsable Content</h2> |
|
23 | 23 | <p>Where a section may have a very long list of information, it can be desirable to use collapsable content. There is a premade function for showing/hiding elements, though its use may or may not be practical, depending on the situation. Use it, or don't, on a case-by-case basis.</p> |
|
24 | 24 | |
|
25 | 25 | <p><strong>To use the collapsable-content function:</strong> Create a toggle button using <code><div class="btn-collapse">Show More</div></code> and a data attribute using <code>data-toggle</code>. Clicking this button will toggle any sibling element(s) containing the class <code>collapsable-content</code> and an identical <code>data-toggle</code> attribute. It will also change the button to read "Show Less"; another click toggles it back to the previous state. Ideally, use pre-existing elements and add the class and attribute; creating a new div around the existing content may lead to unexpected results, as the toggle function will use <code>display:block</code> if no previous display specification was found. |
|
26 | 26 | </p> |
|
27 | 27 | <p>Notes:</p> |
|
28 | 28 | <ul> |
|
29 | 29 | <li>Changes made to the text of the button will require adjustment to the function, but for the sake of consistency and user experience, this is best avoided. </li> |
|
30 | 30 | <li>Collapsable content inside of a pjax loaded container will require <code>collapsableContent();</code> to be called from within the container. No variables are necessary.</li> |
|
31 | 31 | </ul> |
|
32 | 32 | |
|
33 | 33 | </div> <!-- .main-content --> |
|
34 | 34 | </div> <!-- .sidebar-col-wrapper --> |
|
35 | 35 | </div> <!-- .box --> |
|
36 | 36 | |
|
37 | 37 | <!-- CONTENT --> |
|
38 | 38 | <div id="content" class="wrapper"> |
|
39 | 39 | |
|
40 | 40 | <div class="main"> |
|
41 | 41 | |
|
42 | 42 | <div class="box"> |
|
43 | 43 | <div class="title"> |
|
44 | 44 | <h1> |
|
45 | 45 | Diff: enable filename with spaces on diffs |
|
46 | 46 | </h1> |
|
47 | 47 | <h1> |
|
48 | 48 | <i class="icon-hg" ></i> |
|
49 | 49 | |
|
50 | 50 | <i class="icon-lock"></i> |
|
51 | 51 | <span><a href="/rhodecode-momentum">rhodecode-momentum</a></span> |
|
52 | 52 | |
|
53 | 53 | </h1> |
|
54 | 54 | </div> |
|
55 | 55 | |
|
56 | 56 | <div class="box pr-summary"> |
|
57 | 57 | <div class="summary-details block-left"> |
|
58 | 58 | |
|
59 | 59 | <div class="pr-details-title"> |
|
60 | 60 | |
|
61 | 61 | Pull request #720 From Tue, 17 Feb 2015 16:21:38 |
|
62 | 62 | <div class="btn-collapse" data-toggle="description">Show More</div> |
|
63 | 63 | </div> |
|
64 | 64 | <div id="summary" class="fields pr-details-content"> |
|
65 | 65 | <div class="field"> |
|
66 | 66 | <div class="label-summary"> |
|
67 | 67 | <label>Origin:</label> |
|
68 | 68 | </div> |
|
69 | 69 | <div class="input"> |
|
70 | 70 | <div> |
|
71 | 71 | <span class="tag"> |
|
72 | 72 | <a href="/andersonsantos/rhodecode-momentum-fork#fix_574">book: fix_574</a> |
|
73 | 73 | </span> |
|
74 | 74 | <span class="clone-url"> |
|
75 | 75 | <a href="/andersonsantos/rhodecode-momentum-fork">https://code.rhodecode.com/andersonsantos/rhodecode-momentum-fork</a> |
|
76 | 76 | </span> |
|
77 | 77 | </div> |
|
78 | 78 | <div> |
|
79 | 79 | <br> |
|
80 | 80 | <input type="text" value="hg pull -r 46b3d50315f0 https://code.rhodecode.com/andersonsantos/rhodecode-momentum-fork" readonly="readonly"> |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | </div> |
|
84 | 84 | <div class="field"> |
|
85 | 85 | <div class="label-summary"> |
|
86 | 86 | <label>Review:</label> |
|
87 | 87 | </div> |
|
88 | 88 | <div class="input"> |
|
89 | 89 | <div class="flag_status under_review tooltip pull-left" title="Pull request status calculated from votes"></div> |
|
90 | 90 | <span class="changeset-status-lbl tooltip" title="Pull request status calculated from votes"> |
|
91 | 91 | Under Review |
|
92 | 92 | </span> |
|
93 | 93 | |
|
94 | 94 | </div> |
|
95 | 95 | </div> |
|
96 | 96 | <div class="field collapsable-content" data-toggle="description"> |
|
97 | 97 | <div class="label-summary"> |
|
98 | 98 | <label>Description:</label> |
|
99 | 99 | </div> |
|
100 | 100 | <div class="input"> |
|
101 | 101 | <div class="pr-description">Fixing issue <a class="issue- tracker-link" href="http://bugs.rhodecode.com/issues/574"># 574</a>, changing regex for capturing filenames</div> |
|
102 | 102 | </div> |
|
103 | 103 | </div> |
|
104 | 104 | <div class="field collapsable-content" data-toggle="description"> |
|
105 | 105 | <div class="label-summary"> |
|
106 | 106 | <label>Comments:</label> |
|
107 | 107 | </div> |
|
108 | 108 | <div class="input"> |
|
109 | 109 | <div> |
|
110 | 110 | <div class="comments-number"> |
|
111 | 111 | <a href="#inline-comments-container">0 Pull request comments</a>, |
|
112 | 112 | 0 Inline Comments |
|
113 | 113 | </div> |
|
114 | 114 | </div> |
|
115 | 115 | </div> |
|
116 | 116 | </div> |
|
117 | 117 | </div> |
|
118 | 118 | </div> |
|
119 | 119 | <div> |
|
120 | 120 | <div class="reviewers-title block-right"> |
|
121 | 121 | <div class="pr-details-title"> |
|
122 | 122 | Author |
|
123 | 123 | </div> |
|
124 | 124 | </div> |
|
125 | 125 | <div class="block-right pr-details-content reviewers"> |
|
126 | 126 | <ul class="group_members"> |
|
127 | 127 | <li> |
|
128 | 128 | <img class="gravatar" src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&s=32" height="16" width="16"> |
|
129 | 129 | <span class="user"> <a href="/_profiles/lolek">lolek (Lolek Santos)</a></span> |
|
130 | 130 | </li> |
|
131 | 131 | </ul> |
|
132 | 132 | </div> |
|
133 | 133 | <div class="reviewers-title block-right"> |
|
134 | 134 | <div class="pr-details-title"> |
|
135 | 135 | Pull request reviewers |
|
136 | 136 | <span class="btn-collapse" data-toggle="reviewers">Show More</span> |
|
137 | 137 | </div> |
|
138 | 138 | |
|
139 | 139 | </div> |
|
140 | 140 | <div id="reviewers" class="block-right pr-details-content reviewers"> |
|
141 | 141 | |
|
142 | 142 | <ul id="review_members" class="group_members"> |
|
143 | 143 | <li id="reviewer_70"> |
|
144 | 144 | <div class="reviewers_member"> |
|
145 | 145 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
146 | 146 | <div class="flag_status rejected pull-left reviewer_member_status"></div> |
|
147 | 147 | </div> |
|
148 | 148 | <img class="gravatar" src="https://secure.gravatar.com/avatar/153a0fab13160b3e64a2cbc7c0373506?d=identicon&s=32" height="16" width="16"> |
|
149 | 149 | <span class="user"> <a href="/_profiles/jenkins-tests">jenkins-tests</a> (reviewer)</span> |
|
150 | 150 | </div> |
|
151 | 151 | <input id="reviewer_70_input" type="hidden" value="70" name="review_members"> |
|
152 | 152 | <div class="reviewer_member_remove action_button" onclick="removeReviewMember(70, true)" style="visibility: hidden;"> |
|
153 | 153 | <i class="icon-remove-sign"></i> |
|
154 | 154 | </div> |
|
155 | 155 | </li> |
|
156 | 156 | <li id="reviewer_33" class="collapsable-content" data-toggle="reviewers"> |
|
157 | 157 | <div class="reviewers_member"> |
|
158 | 158 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
159 | 159 | <div class="flag_status approved pull-left reviewer_member_status"></div> |
|
160 | 160 | </div> |
|
161 | 161 | <img class="gravatar" src="https://secure.gravatar.com/avatar/ffd6a317ec2b66be880143cd8459d0d9?d=identicon&s=32" height="16" width="16"> |
|
162 | 162 | <span class="user"> <a href="/_profiles/jenkins-tests">garbas (Rok Garbas)</a> (reviewer)</span> |
|
163 | 163 | </div> |
|
164 | 164 | </li> |
|
165 | 165 | <li id="reviewer_2" class="collapsable-content" data-toggle="reviewers"> |
|
166 | 166 | <div class="reviewers_member"> |
|
167 | 167 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
168 | 168 | <div class="flag_status not_reviewed pull-left reviewer_member_status"></div> |
|
169 | 169 | </div> |
|
170 | 170 | <img class="gravatar" src="https://secure.gravatar.com/avatar/aad9d40cac1259ea39b5578554ad9d64?d=identicon&s=32" height="16" width="16"> |
|
171 | 171 | <span class="user"> <a href="/_profiles/jenkins-tests">marcink (Marcin Kuzminski)</a> (reviewer)</span> |
|
172 | 172 | </div> |
|
173 | 173 | </li> |
|
174 | 174 | <li id="reviewer_36" class="collapsable-content" data-toggle="reviewers"> |
|
175 | 175 | <div class="reviewers_member"> |
|
176 | 176 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
177 | 177 | <div class="flag_status approved pull-left reviewer_member_status"></div> |
|
178 | 178 | </div> |
|
179 | 179 | <img class="gravatar" src="https://secure.gravatar.com/avatar/7a4da001a0af0016ed056ab523255db9?d=identicon&s=32" height="16" width="16"> |
|
180 | 180 | <span class="user"> <a href="/_profiles/jenkins-tests">johbo (Johannes Bornhold)</a> (reviewer)</span> |
|
181 | 181 | </div> |
|
182 | 182 | </li> |
|
183 | 183 | <li id="reviewer_47" class="collapsable-content" data-toggle="reviewers"> |
|
184 | 184 | <div class="reviewers_member"> |
|
185 | 185 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
186 | 186 | <div class="flag_status under_review pull-left reviewer_member_status"></div> |
|
187 | 187 | </div> |
|
188 | 188 | <img class="gravatar" src="https://secure.gravatar.com/avatar/8f6dc00dce79d6bd7d415be5cea6a008?d=identicon&s=32" height="16" width="16"> |
|
189 | 189 | <span class="user"> <a href="/_profiles/jenkins-tests">lisaq (Lisa Quatmann)</a> (reviewer)</span> |
|
190 | 190 | </div> |
|
191 | 191 | </li> |
|
192 | 192 | <li id="reviewer_49" class="collapsable-content" data-toggle="reviewers"> |
|
193 | 193 | <div class="reviewers_member"> |
|
194 | 194 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
195 | 195 | <div class="flag_status approved pull-left reviewer_member_status"></div> |
|
196 | 196 | </div> |
|
197 | 197 | <img class="gravatar" src="https://secure.gravatar.com/avatar/89f722927932a8f737a0feafb03a606e?d=identicon&s=32" height="16" width="16"> |
|
198 | 198 | <span class="user"> <a href="/_profiles/jenkins-tests">paris (Paris Kolios)</a> (reviewer)</span> |
|
199 | 199 | </div> |
|
200 | 200 | </li> |
|
201 | 201 | <li id="reviewer_50" class="collapsable-content" data-toggle="reviewers"> |
|
202 | 202 | <div class="reviewers_member"> |
|
203 | 203 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
204 | 204 | <div class="flag_status approved pull-left reviewer_member_status"></div> |
|
205 | 205 | </div> |
|
206 | 206 | <img class="gravatar" src="https://secure.gravatar.com/avatar/081322c975e8545ec269372405fbd016?d=identicon&s=32" height="16" width="16"> |
|
207 | 207 | <span class="user"> <a href="/_profiles/jenkins-tests">ergo (Marcin Lulek)</a> (reviewer)</span> |
|
208 | 208 | </div> |
|
209 | 209 | </li> |
|
210 | 210 | <li id="reviewer_54" class="collapsable-content" data-toggle="reviewers"> |
|
211 | 211 | <div class="reviewers_member"> |
|
212 | 212 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
213 | 213 | <div class="flag_status under_review pull-left reviewer_member_status"></div> |
|
214 | 214 | </div> |
|
215 | 215 | <img class="gravatar" src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&s=32" height="16" width="16"> |
|
216 | 216 | <span class="user"> <a href="/_profiles/jenkins-tests">anderson (Anderson Santos)</a> (reviewer)</span> |
|
217 | 217 | </div> |
|
218 | 218 | </li> |
|
219 | 219 | <li id="reviewer_57" class="collapsable-content" data-toggle="reviewers"> |
|
220 | 220 | <div class="reviewers_member"> |
|
221 | 221 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
222 | 222 | <div class="flag_status approved pull-left reviewer_member_status"></div> |
|
223 | 223 | </div> |
|
224 | 224 | <img class="gravatar" src="https://secure.gravatar.com/avatar/23e2ee8f5fd462cba8129a40cc1e896c?d=identicon&s=32" height="16" width="16"> |
|
225 | 225 | <span class="user"> <a href="/_profiles/jenkins-tests">gmgauthier (Greg Gauthier)</a> (reviewer)</span> |
|
226 | 226 | </div> |
|
227 | 227 | </li> |
|
228 | 228 | <li id="reviewer_31" class="collapsable-content" data-toggle="reviewers"> |
|
229 | 229 | <div class="reviewers_member"> |
|
230 | 230 | <div class="reviewer_status tooltip pull-left" title="Not Reviewed"> |
|
231 | 231 | <div class="flag_status under_review pull-left reviewer_member_status"></div> |
|
232 | 232 | </div> |
|
233 | 233 | <img class="gravatar" src="https://secure.gravatar.com/avatar/0c9a7e6674b6f0b35d98dbe073e3f0ab?d=identicon&s=32" height="16" width="16"> |
|
234 | 234 | <span class="user"> <a href="/_profiles/jenkins-tests">ostrobel (Oliver Strobel)</a> (reviewer)</span> |
|
235 | 235 | </div> |
|
236 | 236 | </li> |
|
237 | 237 | </ul> |
|
238 | 238 | <div id="add_reviewer_input" class="ac" style="display: none;"> |
|
239 | 239 | </div> |
|
240 | 240 | </div> |
|
241 | 241 | </div> |
|
242 | 242 | </div> |
|
243 | 243 | </div> |
|
244 | 244 | <div class="box"> |
|
245 | 245 | <div class="table" > |
|
246 | 246 | <div id="changeset_compare_view_content"> |
|
247 | 247 | <div class="compare_view_commits_title"> |
|
248 | 248 | <h2>Compare View: 6 commits<span class="btn-collapse" data-toggle="commits">Show More</span></h2> |
|
249 | 249 | |
|
250 | 250 | </div> |
|
251 | 251 | <div class="container"> |
|
252 | 252 | |
|
253 | 253 | |
|
254 | 254 | <table class="rctable compare_view_commits"> |
|
255 | 255 | <tr> |
|
256 | 256 | <th>Time</th> |
|
257 | 257 | <th>Author</th> |
|
258 | 258 | <th>Commit</th> |
|
259 | 259 | <th></th> |
|
260 | 260 | <th>Title</th> |
|
261 | 261 | </tr> |
|
262 | 262 | <tr id="row-7e83e5cd7812dd9e055ce30e77c65cdc08154b43" commit_id="7e83e5cd7812dd9e055ce30e77c65cdc08154b43" class="compare_select"> |
|
263 | 263 | <td class="td-time"> |
|
264 | 264 | <span class="tooltip" title="3 hours and 23 minutes ago" tt_title="3 hours and 23 minutes ago">2015-02-18 10:13:34</span> |
|
265 | 265 | </td> |
|
266 | 266 | <td class="td-user"> |
|
267 | 267 | <div class="gravatar_with_user"> |
|
268 | 268 | <img class="gravatar" alt="gravatar" src="https://secure.gravatar.com/avatar/02cc31cea73b88b7209ba302c5967a9d?d=identicon&s=16"> |
|
269 | 269 | <span title="Lolek Santos <lolek@rhodecode.com>" class="user">brian (Brian Butler)</span> |
|
270 | 270 | </div> |
|
271 | 271 | </td> |
|
272 | 272 | <td class="td-hash"> |
|
273 | 273 | <code> |
|
274 | 274 | <a href="/brian/documentation-rep/changeset/7e83e5cd7812dd9e055ce30e77c65cdc08154b43">r395:7e83e5cd7812</a> |
|
275 | 275 | </code> |
|
276 | 276 | </td> |
|
277 | 277 | <td class="expand_commit" data-commit-id="7e83e5cd7812dd9e055ce30e77c65cdc08154b43" title="Expand commit message"> |
|
278 | 278 | <div class="show_more_col"> |
|
279 | 279 | <i class="show_more"></i> |
|
280 | 280 | </div> |
|
281 | 281 | </td> |
|
282 | 282 | <td class="mid td-description"> |
|
283 | 283 | <div class="log-container truncate-wrap"> |
|
284 | 284 | <div id="c-7e83e5cd7812dd9e055ce30e77c65cdc08154b43" class="message truncate">rep: added how we doc to guide</div> |
|
285 | 285 | </div> |
|
286 | 286 | </td> |
|
287 | 287 | </tr> |
|
288 | 288 | <tr id="row-48ce1581bdb3aa7679c246cbdd3fb030623f5c87" commit_id="48ce1581bdb3aa7679c246cbdd3fb030623f5c87" class="compare_select"> |
|
289 | 289 | <td class="td-time"> |
|
290 | 290 | <span class="tooltip" title="4 hours and 18 minutes ago">2015-02-18 09:18:31</span> |
|
291 | 291 | </td> |
|
292 | 292 | <td class="td-user"> |
|
293 | 293 | <div class="gravatar_with_user"> |
|
294 | 294 | <img class="gravatar" alt="gravatar" src="https://secure.gravatar.com/avatar/02cc31cea73b88b7209ba302c5967a9d?d=identicon&s=16"> |
|
295 | 295 | <span title="Lolek Santos <lolek@rhodecode.com>" class="user">brian (Brian Butler)</span> |
|
296 | 296 | </div> |
|
297 | 297 | </td> |
|
298 | 298 | <td class="td-hash"> |
|
299 | 299 | <code> |
|
300 | 300 | <a href="/brian/documentation-rep/changeset/48ce1581bdb3aa7679c246cbdd3fb030623f5c87">r394:48ce1581bdb3</a> |
|
301 | 301 | </code> |
|
302 | 302 | </td> |
|
303 | 303 | <td class="expand_commit" data-commit-id="48ce1581bdb3aa7679c246cbdd3fb030623f5c87" title="Expand commit message"> |
|
304 | 304 | <div class="show_more_col"> |
|
305 | 305 | <i class="show_more"></i> |
|
306 | 306 | </div> |
|
307 | 307 | </td> |
|
308 | 308 | <td class="mid td-description"> |
|
309 | 309 | <div class="log-container truncate-wrap"> |
|
310 | 310 | <div id="c-48ce1581bdb3aa7679c246cbdd3fb030623f5c87" class="message truncate">repo 0004 - typo</div> |
|
311 | 311 | </div> |
|
312 | 312 | </td> |
|
313 | 313 | </tr> |
|
314 | 314 | <tr id="row-982d857aafb4c71e7686e419c32b71c9a837257d" commit_id="982d857aafb4c71e7686e419c32b71c9a837257d" class="compare_select collapsable-content" data-toggle="commits"> |
|
315 | 315 | <td class="td-time"> |
|
316 | 316 | <span class="tooltip" title="4 hours and 22 minutes ago">2015-02-18 09:14:45</span> |
|
317 | 317 | </td> |
|
318 | 318 | <td class="td-user"> |
|
319 | 319 | <span class="gravatar" commit_id="982d857aafb4c71e7686e419c32b71c9a837257d"> |
|
320 | 320 | <img alt="gravatar" src="https://secure.gravatar.com/avatar/02cc31cea73b88b7209ba302c5967a9d?d=identicon&s=28" height="14" width="14"> |
|
321 | 321 | </span> |
|
322 | 322 | <span class="author">brian (Brian Butler)</span> |
|
323 | 323 | </td> |
|
324 | 324 | <td class="td-hash"> |
|
325 | 325 | <code> |
|
326 | 326 | <a href="/brian/documentation-rep/changeset/982d857aafb4c71e7686e419c32b71c9a837257d">r393:982d857aafb4</a> |
|
327 | 327 | </code> |
|
328 | 328 | </td> |
|
329 | 329 | <td class="expand_commit" data-commit-id="982d857aafb4c71e7686e419c32b71c9a837257d" title="Expand commit message"> |
|
330 | 330 | <div class="show_more_col"> |
|
331 | 331 | <i class="show_more"></i> |
|
332 | 332 | </div> |
|
333 | 333 | </td> |
|
334 | 334 | <td class="mid td-description"> |
|
335 | 335 | <div class="log-container truncate-wrap"> |
|
336 | 336 | <div id="c-982d857aafb4c71e7686e419c32b71c9a837257d" class="message truncate">internals: how to doc section added</div> |
|
337 | 337 | </div> |
|
338 | 338 | </td> |
|
339 | 339 | </tr> |
|
340 | 340 | <tr id="row-4c7258ad1af6dae91bbaf87a933e3597e676fab8" commit_id="4c7258ad1af6dae91bbaf87a933e3597e676fab8" class="compare_select collapsable-content" data-toggle="commits"> |
|
341 | 341 | <td class="td-time"> |
|
342 | 342 | <span class="tooltip" title="20 hours and 16 minutes ago">2015-02-17 17:20:44</span> |
|
343 | 343 | </td> |
|
344 | 344 | <td class="td-user"> |
|
345 | 345 | <span class="gravatar" commit_id="4c7258ad1af6dae91bbaf87a933e3597e676fab8"> |
|
346 | 346 | <img alt="gravatar" src="https://secure.gravatar.com/avatar/02cc31cea73b88b7209ba302c5967a9d?d=identicon&s=28" height="14" width="14"> |
|
347 | 347 | </span> |
|
348 | 348 | <span class="author">brian (Brian Butler)</span> |
|
349 | 349 | </td> |
|
350 | 350 | <td class="td-hash"> |
|
351 | 351 | <code> |
|
352 | 352 | <a href="/brian/documentation-rep/changeset/4c7258ad1af6dae91bbaf87a933e3597e676fab8">r392:4c7258ad1af6</a> |
|
353 | 353 | </code> |
|
354 | 354 | </td> |
|
355 | 355 | <td class="expand_commit" data-commit-id="4c7258ad1af6dae91bbaf87a933e3597e676fab8" title="Expand commit message"> |
|
356 | 356 | <div class="show_more_col"> |
|
357 | 357 | <i class="show_more"></i> |
|
358 | 358 | </div> |
|
359 | 359 | </td> |
|
360 | 360 | <td class="mid td-description"> |
|
361 | 361 | <div class="log-container truncate-wrap"> |
|
362 | 362 | <div id="c-4c7258ad1af6dae91bbaf87a933e3597e676fab8" class="message truncate">REP: 0004 Documentation standards</div> |
|
363 | 363 | </div> |
|
364 | 364 | </td> |
|
365 | 365 | </tr> |
|
366 | 366 | <tr id="row-46b3d50315f0f2b1f64485ac95af4f384948f9cb" commit_id="46b3d50315f0f2b1f64485ac95af4f384948f9cb" class="compare_select collapsable-content" data-toggle="commits"> |
|
367 | 367 | <td class="td-time"> |
|
368 | 368 | <span class="tooltip" title="18 hours and 19 minutes ago">2015-02-17 16:18:49</span> |
|
369 | 369 | </td> |
|
370 | 370 | <td class="td-user"> |
|
371 | 371 | <span class="gravatar" commit_id="46b3d50315f0f2b1f64485ac95af4f384948f9cb"> |
|
372 | 372 | <img alt="gravatar" src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&s=28" height="14" width="14"> |
|
373 | 373 | </span> |
|
374 | 374 | <span class="author">anderson (Anderson Santos)</span> |
|
375 | 375 | </td> |
|
376 | 376 | <td class="td-hash"> |
|
377 | 377 | <code> |
|
378 | 378 | <a href="/andersonsantos/rhodecode-momentum-fork/changeset/46b3d50315f0f2b1f64485ac95af4f384948f9cb">r8743:46b3d50315f0</a> |
|
379 | 379 | </code> |
|
380 | 380 | </td> |
|
381 | 381 | <td class="expand_commit" data-commit-id="46b3d50315f0f2b1f64485ac95af4f384948f9cb" title="Expand commit message"> |
|
382 | 382 | <div class="show_more_col"> |
|
383 | 383 | <i class="show_more" ></i> |
|
384 | 384 | </div> |
|
385 | 385 | </td> |
|
386 | 386 | <td class="mid td-description"> |
|
387 | 387 | <div class="log-container truncate-wrap"> |
|
388 | 388 | <div id="c-46b3d50315f0f2b1f64485ac95af4f384948f9cb" class="message truncate">Diff: created tests for the diff with filenames with spaces</div> |
|
389 | 389 | |
|
390 | 390 | </div> |
|
391 | 391 | </td> |
|
392 | 392 | </tr> |
|
393 | 393 | <tr id="row-1e57d2549bd6c34798075bf05ac39f708bb33b90" commit_id="1e57d2549bd6c34798075bf05ac39f708bb33b90" class="compare_select collapsable-content" data-toggle="commits"> |
|
394 | 394 | <td class="td-time"> |
|
395 | 395 | <span class="tooltip" title="2 days ago">2015-02-16 10:06:08</span> |
|
396 | 396 | </td> |
|
397 | 397 | <td class="td-user"> |
|
398 | 398 | <span class="gravatar" commit_id="1e57d2549bd6c34798075bf05ac39f708bb33b90"> |
|
399 | 399 | <img alt="gravatar" src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&s=28" height="14" width="14"> |
|
400 | 400 | </span> |
|
401 | 401 | <span class="author">anderson (Anderson Santos)</span> |
|
402 | 402 | </td> |
|
403 | 403 | <td class="td-hash"> |
|
404 | 404 | <code> |
|
405 | 405 | <a href="/andersonsantos/rhodecode-momentum-fork/changeset/1e57d2549bd6c34798075bf05ac39f708bb33b90">r8742:1e57d2549bd6</a> |
|
406 | 406 | </code> |
|
407 | 407 | </td> |
|
408 | 408 | <td class="expand_commit" data-commit-id="1e57d2549bd6c34798075bf05ac39f708bb33b90" title="Expand commit message"> |
|
409 | 409 | <div class="show_more_col"> |
|
410 | 410 | <i class="show_more" ></i> |
|
411 | 411 | </div> |
|
412 | 412 | </td> |
|
413 | 413 | <td class="mid td-description"> |
|
414 | 414 | <div class="log-container truncate-wrap"> |
|
415 | 415 | <div id="c-1e57d2549bd6c34798075bf05ac39f708bb33b90" class="message truncate">Diff: fix renaming files with spaces <a class="issue-tracker-link" href="http://bugs.rhodecode.com/issues/574">#574</a></div> |
|
416 | 416 | |
|
417 | 417 | </div> |
|
418 | 418 | </td> |
|
419 | 419 | </tr> |
|
420 | 420 | </table> |
|
421 | 421 | </div> |
|
422 | 422 | |
|
423 | 423 | <script> |
|
424 | 424 | $('.expand_commit').on('click',function(e){ |
|
425 | 425 | $(this).children('i').hide(); |
|
426 | 426 | var cid = $(this).data('commitId'); |
|
427 | 427 | $('#c-'+cid).css({'height': 'auto', 'margin': '.65em 1em .65em 0','white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'}) |
|
428 | 428 | $('#t-'+cid).css({'height': 'auto', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'}) |
|
429 | 429 | }); |
|
430 | 430 | $('.compare_select').on('click',function(e){ |
|
431 | 431 | var cid = $(this).attr('commit_id'); |
|
432 | 432 | $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl')); |
|
433 | 433 | }); |
|
434 | 434 | </script> |
|
435 | 435 | <div class="cs_files_title"> |
|
436 | 436 | <span class="cs_files_expand"> |
|
437 | 437 | <span id="expand_all_files">Expand All</span> | <span id="collapse_all_files">Collapse All</span> |
|
438 | 438 | </span> |
|
439 | 439 | <h2> |
|
440 | 440 | 7 files changed: 55 inserted, 9 deleted |
|
441 | 441 | </h2> |
|
442 | 442 | </div> |
|
443 | 443 | <div class="cs_files"> |
|
444 | 444 | <table class="compare_view_files"> |
|
445 | 445 | |
|
446 | 446 | <tr class="cs_A expand_file" fid="c--efbe5b7a3f13"> |
|
447 | 447 | <td class="cs_icon_td"> |
|
448 | 448 | <span class="expand_file_icon" fid="c--efbe5b7a3f13"></span> |
|
449 | 449 | </td> |
|
450 | 450 | <td class="cs_icon_td"> |
|
451 | 451 | <div class="flag_status not_reviewed hidden"></div> |
|
452 | 452 | </td> |
|
453 | 453 | <td id="a_c--efbe5b7a3f13"> |
|
454 | 454 | <a class="compare_view_filepath" href="#a_c--efbe5b7a3f13"> |
|
455 | 455 | rhodecode/tests/fixtures/git_diff_rename_file_with_spaces.diff |
|
456 | 456 | </a> |
|
457 | 457 | <span id="diff_c--efbe5b7a3f13" class="diff_links" style="display: none;"> |
|
458 | 458 | <a href="/andersonsantos/rhodecode-momentum-fork/diff/rhodecode/tests/fixtures/git_diff_rename_file_with_spaces.diff?diff2=46b3d50315f0f2b1f64485ac95af4f384948f9cb&diff1=b78e2376b986b2cf656a2b4390b09f303291c886&fulldiff=1&diff=diff"> |
|
459 | 459 | Unified Diff |
|
460 | 460 | </a> |
|
461 | 461 | | |
|
462 | 462 | <a href="/andersonsantos/rhodecode-momentum-fork/diff-2way/rhodecode/tests/fixtures/git_diff_rename_file_with_spaces.diff?diff2=46b3d50315f0f2b1f64485ac95af4f384948f9cb&diff1=b78e2376b986b2cf656a2b4390b09f303291c886&fulldiff=1&diff=diff"> |
|
463 | 463 | Side-by-side Diff |
|
464 | 464 | </a> |
|
465 | 465 | </span> |
|
466 | 466 | </td> |
|
467 | 467 | <td> |
|
468 | 468 | <div class="changes pull-right"><div style="width:100px"><div class="added top-right-rounded-corner-mid bottom-right-rounded-corner-mid top-left-rounded-corner-mid bottom-left-rounded-corner-mid" style="width:100.0%">4</div><div class="deleted top-right-rounded-corner-mid bottom-right-rounded-corner-mid" style="width:0%"></div></div></div> |
|
469 | 469 | <div class="comment-bubble pull-right" data-path="rhodecode/tests/fixtures/git_diff_rename_file_with_spaces.diff"> |
|
470 | 470 | <i class="icon-comment"></i> |
|
471 | 471 | </div> |
|
472 | 472 | </td> |
|
473 | 473 | </tr> |
|
474 | 474 | <tr id="tr_c--efbe5b7a3f13"> |
|
475 | 475 | <td></td> |
|
476 | 476 | <td></td> |
|
477 | 477 | <td class="injected_diff" colspan="2"> |
|
478 | 478 | |
|
479 | 479 | <div class="diff-container" id="diff-container-140716195039928"> |
|
480 | 480 | <div id="c--efbe5b7a3f13_target" ></div> |
|
481 | 481 | <div id="c--efbe5b7a3f13" class="diffblock margined comm" > |
|
482 | 482 | <div class="code-body"> |
|
483 | 483 | <div class="full_f_path" path="rhodecode/tests/fixtures/git_diff_rename_file_with_spaces.diff" style="display: none;"></div> |
|
484 | 484 | <table class="code-difftable"> |
|
485 | 485 | <tr class="line context"> |
|
486 | 486 | <td class="add-comment-line"><span class="add-comment-content"></span></td> |
|
487 | 487 | <td class="lineno old"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_o"></a></td> |
|
488 | 488 | <td class="lineno new"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n"></a></td> |
|
489 | 489 | <td class="code no-comment"> |
|
490 | 490 | <pre>new file 100644</pre> |
|
491 | 491 | </td> |
|
492 | 492 | </tr> |
|
493 | 493 | <tr class="line add"> |
|
494 | 494 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
495 | 495 | <td class="lineno old"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_o"></a></td> |
|
496 | 496 | <td id="rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n1" class="lineno new"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n1">1</a></td> |
|
497 | 497 | <td class="code"> |
|
498 | 498 | <pre>diff --git a/file_with_ spaces.txt b/file_with_ two spaces.txt |
|
499 | 499 | </pre> |
|
500 | 500 | </td> |
|
501 | 501 | </tr> |
|
502 | 502 | <tr class="line add"> |
|
503 | 503 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
504 | 504 | <td class="lineno old"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_o"></a></td> |
|
505 | 505 | <td id="rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n2" class="lineno new"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n2">2</a></td> |
|
506 | 506 | <td class="code"> |
|
507 | 507 | <pre>similarity index 100% |
|
508 | 508 | </pre> |
|
509 | 509 | </td> |
|
510 | 510 | </tr> |
|
511 | 511 | <tr class="line add"> |
|
512 | 512 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
513 | 513 | <td class="lineno old"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_o"></a></td> |
|
514 | 514 | <td id="rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n3" class="lineno new"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n3">3</a></td> |
|
515 | 515 | <td class="code"> |
|
516 | 516 | <pre>rename from file_with_ spaces.txt |
|
517 | 517 | </pre> |
|
518 | 518 | </td> |
|
519 | 519 | </tr> |
|
520 | 520 | <tr class="line add"> |
|
521 | 521 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
522 | 522 | <td class="lineno old"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_o"></a></td> |
|
523 | 523 | <td id="rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n4" class="lineno new"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n4">4</a></td> |
|
524 | 524 | <td class="code"> |
|
525 | 525 | <pre>rename to file_with_ two spaces.txt |
|
526 | 526 | </pre> |
|
527 | 527 | </td> |
|
528 | 528 | </tr> |
|
529 | 529 | <tr class="line context"> |
|
530 | 530 | <td class="add-comment-line"><span class="add-comment-content"></span></td> |
|
531 | 531 | <td class="lineno old"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_o...">...</a></td> |
|
532 | 532 | <td class="lineno new"><a href="#rhodecodetestsfixturesgit_diff_rename_file_with_spacesdiff_n...">...</a></td> |
|
533 | 533 | <td class="code no-comment"> |
|
534 | 534 | <pre> No newline at end of file</pre> |
|
535 | 535 | </td> |
|
536 | 536 | </tr> |
|
537 | 537 | </table> |
|
538 | 538 | </div> |
|
539 | 539 | </div> |
|
540 | 540 | </div> |
|
541 | 541 | |
|
542 | 542 | </td> |
|
543 | 543 | </tr> |
|
544 | 544 | <tr class="cs_A expand_file" fid="c--c21377f778f9"> |
|
545 | 545 | <td class="cs_icon_td"> |
|
546 | 546 | <span class="expand_file_icon" fid="c--c21377f778f9"></span> |
|
547 | 547 | </td> |
|
548 | 548 | <td class="cs_icon_td"> |
|
549 | 549 | <div class="flag_status not_reviewed hidden"></div> |
|
550 | 550 | </td> |
|
551 | 551 | <td id="a_c--c21377f778f9"> |
|
552 | 552 | <a class="compare_view_filepath" href="#a_c--c21377f778f9"> |
|
553 | 553 | rhodecode/tests/fixtures/hg_diff_copy_file_with_spaces.diff |
|
554 | 554 | </a> |
|
555 | 555 | <span id="diff_c--c21377f778f9" class="diff_links" style="display: none;"> |
|
556 | 556 | <a href="/andersonsantos/rhodecode-momentum-fork/diff/rhodecode/tests/fixtures/hg_diff_copy_file_with_spaces.diff?diff2=46b3d50315f0f2b1f64485ac95af4f384948f9cb&diff1=b78e2376b986b2cf656a2b4390b09f303291c886&fulldiff=1&diff=diff"> |
|
557 | 557 | Unified Diff |
|
558 | 558 | </a> |
|
559 | 559 | | |
|
560 | 560 | <a href="/andersonsantos/rhodecode-momentum-fork/diff-2way/rhodecode/tests/fixtures/hg_diff_copy_file_with_spaces.diff?diff2=46b3d50315f0f2b1f64485ac95af4f384948f9cb&diff1=b78e2376b986b2cf656a2b4390b09f303291c886&fulldiff=1&diff=diff"> |
|
561 | 561 | Side-by-side Diff |
|
562 | 562 | </a> |
|
563 | 563 | </span> |
|
564 | 564 | </td> |
|
565 | 565 | <td> |
|
566 | 566 | <div class="changes pull-right"><div style="width:100px"><div class="added top-right-rounded-corner-mid bottom-right-rounded-corner-mid top-left-rounded-corner-mid bottom-left-rounded-corner-mid" style="width:100.0%">3</div><div class="deleted top-right-rounded-corner-mid bottom-right-rounded-corner-mid" style="width:0%"></div></div></div> |
|
567 | 567 | <div class="comment-bubble pull-right" data-path="rhodecode/tests/fixtures/hg_diff_copy_file_with_spaces.diff"> |
|
568 | 568 | <i class="icon-comment"></i> |
|
569 | 569 | </div> |
|
570 | 570 | </td> |
|
571 | 571 | </tr> |
|
572 | 572 | <tr id="tr_c--c21377f778f9"> |
|
573 | 573 | <td></td> |
|
574 | 574 | <td></td> |
|
575 | 575 | <td class="injected_diff" colspan="2"> |
|
576 | 576 | |
|
577 | 577 | <div class="diff-container" id="diff-container-140716195038344"> |
|
578 | 578 | <div id="c--c21377f778f9_target" ></div> |
|
579 | 579 | <div id="c--c21377f778f9" class="diffblock margined comm" > |
|
580 | 580 | <div class="code-body"> |
|
581 | 581 | <div class="full_f_path" path="rhodecode/tests/fixtures/hg_diff_copy_file_with_spaces.diff" style="display: none;"></div> |
|
582 | 582 | <table class="code-difftable"> |
|
583 | 583 | <tr class="line context"> |
|
584 | 584 | <td class="add-comment-line"><span class="add-comment-content"></span></td> |
|
585 | 585 | <td class="lineno old"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_o"></a></td> |
|
586 | 586 | <td class="lineno new"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_n"></a></td> |
|
587 | 587 | <td class="code no-comment"> |
|
588 | 588 | <pre>new file 100644</pre> |
|
589 | 589 | </td> |
|
590 | 590 | </tr> |
|
591 | 591 | <tr class="line add"> |
|
592 | 592 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
593 | 593 | <td class="lineno old"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_o"></a></td> |
|
594 | 594 | <td id="rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_n1" class="lineno new"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_n1">1</a></td> |
|
595 | 595 | <td class="code"> |
|
596 | 596 | <pre>diff --git a/file_changed_without_spaces.txt b/file_copied_ with spaces.txt |
|
597 | 597 | </pre> |
|
598 | 598 | </td> |
|
599 | 599 | </tr> |
|
600 | 600 | <tr class="line add"> |
|
601 | 601 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
602 | 602 | <td class="lineno old"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_o"></a></td> |
|
603 | 603 | <td id="rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_n2" class="lineno new"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_n2">2</a></td> |
|
604 | 604 | <td class="code"> |
|
605 | 605 | <pre>copy from file_changed_without_spaces.txt |
|
606 | 606 | </pre> |
|
607 | 607 | </td> |
|
608 | 608 | </tr> |
|
609 | 609 | <tr class="line add"> |
|
610 | 610 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
611 | 611 | <td class="lineno old"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_o"></a></td> |
|
612 | 612 | <td id="rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_n3" class="lineno new"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_n3">3</a></td> |
|
613 | 613 | <td class="code"> |
|
614 | 614 | <pre>copy to file_copied_ with spaces.txt |
|
615 | 615 | </pre> |
|
616 | 616 | </td> |
|
617 | 617 | </tr> |
|
618 | 618 | <tr class="line context"> |
|
619 | 619 | <td class="add-comment-line"><span class="add-comment-content"></span></td> |
|
620 | 620 | <td class="lineno old"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_o...">...</a></td> |
|
621 | 621 | <td class="lineno new"><a href="#rhodecodetestsfixtureshg_diff_copy_file_with_spacesdiff_n...">...</a></td> |
|
622 | 622 | <td class="code no-comment"> |
|
623 | 623 | <pre> No newline at end of file</pre> |
|
624 | 624 | </td> |
|
625 | 625 | </tr> |
|
626 | 626 | </table> |
|
627 | 627 | </div> |
|
628 | 628 | </div> |
|
629 | 629 | </div> |
|
630 | 630 | |
|
631 | 631 | </td> |
|
632 | 632 | </tr> |
|
633 | 633 | <tr class="cs_A expand_file" fid="c--ee62085ad7a8"> |
|
634 | 634 | <td class="cs_icon_td"> |
|
635 | 635 | <span class="expand_file_icon" fid="c--ee62085ad7a8"></span> |
|
636 | 636 | </td> |
|
637 | 637 | <td class="cs_icon_td"> |
|
638 | 638 | <div class="flag_status not_reviewed hidden"></div> |
|
639 | 639 | </td> |
|
640 | 640 | <td id="a_c--ee62085ad7a8"> |
|
641 | 641 | <a class="compare_view_filepath" href="#a_c--ee62085ad7a8"> |
|
642 | 642 | rhodecode/tests/fixtures/hg_diff_rename_file_with_spaces.diff |
|
643 | 643 | </a> |
|
644 | 644 | <span id="diff_c--ee62085ad7a8" class="diff_links" style="display: none;"> |
|
645 | 645 | <a href="/andersonsantos/rhodecode-momentum-fork/diff/rhodecode/tests/fixtures/hg_diff_rename_file_with_spaces.diff?diff2=46b3d50315f0f2b1f64485ac95af4f384948f9cb&diff1=b78e2376b986b2cf656a2b4390b09f303291c886&fulldiff=1&diff=diff"> |
|
646 | 646 | Unified Diff |
|
647 | 647 | </a> |
|
648 | 648 | | |
|
649 | 649 | <a href="/andersonsantos/rhodecode-momentum-fork/diff-2way/rhodecode/tests/fixtures/hg_diff_rename_file_with_spaces.diff?diff2=46b3d50315f0f2b1f64485ac95af4f384948f9cb&diff1=b78e2376b986b2cf656a2b4390b09f303291c886&fulldiff=1&diff=diff"> |
|
650 | 650 | Side-by-side Diff |
|
651 | 651 | </a> |
|
652 | 652 | </span> |
|
653 | 653 | </td> |
|
654 | 654 | <td> |
|
655 | 655 | <div class="changes pull-right"><div style="width:100px"><div class="added top-right-rounded-corner-mid bottom-right-rounded-corner-mid top-left-rounded-corner-mid bottom-left-rounded-corner-mid" style="width:100.0%">3</div><div class="deleted top-right-rounded-corner-mid bottom-right-rounded-corner-mid" style="width:0%"></div></div></div> |
|
656 | 656 | <div class="comment-bubble pull-right" data-path="rhodecode/tests/fixtures/hg_diff_rename_file_with_spaces.diff"> |
|
657 | 657 | <i class="icon-comment"></i> |
|
658 | 658 | </div> |
|
659 | 659 | </td> |
|
660 | 660 | </tr> |
|
661 | 661 | <tr id="tr_c--ee62085ad7a8"> |
|
662 | 662 | <td></td> |
|
663 | 663 | <td></td> |
|
664 | 664 | <td class="injected_diff" colspan="2"> |
|
665 | 665 | |
|
666 | 666 | <div class="diff-container" id="diff-container-140716195039496"> |
|
667 | 667 | <div id="c--ee62085ad7a8_target" ></div> |
|
668 | 668 | <div id="c--ee62085ad7a8" class="diffblock margined comm" > |
|
669 | 669 | <div class="code-body"> |
|
670 | 670 | <div class="full_f_path" path="rhodecode/tests/fixtures/hg_diff_rename_file_with_spaces.diff" style="display: none;"></div> |
|
671 | 671 | <table class="code-difftable"> |
|
672 | 672 | <tr class="line context"> |
|
673 | 673 | <td class="add-comment-line"><span class="add-comment-content"></span></td> |
|
674 | 674 | <td class="lineno old"><a href="#rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_o"></a></td> |
|
675 | 675 | <td class="lineno new"><a href="#rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_n"></a></td> |
|
676 | 676 | <td class="code no-comment"> |
|
677 | 677 | <pre>new file 100644</pre> |
|
678 | 678 | </td> |
|
679 | 679 | </tr> |
|
680 | 680 | <tr class="line add"> |
|
681 | 681 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
682 | 682 | <td class="lineno old"><a href="#rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_o"></a></td> |
|
683 | 683 | <td id="rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_n1" class="lineno new"><a href="#rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_n1">1</a></td> |
|
684 | 684 | <td class="code"> |
|
685 | 685 | <pre>diff --git a/file_ with update.txt b/file_changed _.txt |
|
686 | 686 | </pre> |
|
687 | 687 | </td> |
|
688 | 688 | </tr> |
|
689 | 689 | <tr class="line add"> |
|
690 | 690 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
691 | 691 | <td class="lineno old"><a href="#rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_o"></a></td> |
|
692 | 692 | <td id="rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_n2" class="lineno new"><a href="#rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_n2">2</a></td> |
|
693 | 693 | <td class="code"> |
|
694 | 694 | <pre>rename from file_ with update.txt |
|
695 | 695 | </pre> |
|
696 | 696 | </td> |
|
697 | 697 | </tr> |
|
698 | 698 | <tr class="line add"> |
|
699 | 699 | <td class="add-comment-line"><span class="add-comment-content"><a href="#"><span class="icon-comment-add"></span></a></span></td> |
|
700 | 700 | <td class="lineno old"><a href="#rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_o"></a></td> |
|
701 | 701 | <td id="rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_n3" class="lineno new"><a href="#rhodecodetestsfixtureshg_diff_rename_file_with_spacesdiff_n3">3</a></td> |
|
702 | 702 | <td class="code"> |
|
703 | 703 | <pre>rename to file_changed _.txt</pre> |
|
704 | 704 | </td> |
|
705 | 705 | </tr> |
|
706 | 706 | </table> |
|
707 | 707 | </div> |
|
708 | 708 | </div> |
|
709 | 709 | </div> |
|
710 | 710 | |
|
711 | 711 | </td> |
|
712 | 712 | </tr> |
|
713 | 713 | |
|
714 | 714 | </table> |
|
715 | 715 | </div> |
|
716 | 716 | </div> |
|
717 | 717 | </div> |
|
718 | 718 | |
|
719 | 719 | </td> |
|
720 | 720 | </tr> |
|
721 | 721 | </table> |
|
722 | 722 | </div> |
|
723 | 723 | </div> |
|
724 | 724 | </div> |
|
725 | 725 | |
|
726 | 726 | |
|
727 | 727 | |
|
728 | 728 | |
|
729 | 729 | <div id="comment-inline-form-template" style="display: none;"> |
|
730 | 730 | <div class="comment-inline-form ac"> |
|
731 | 731 | <div class="overlay"><div class="overlay-text">Submitting...</div></div> |
|
732 | 732 | <form action="#" class="inline-form" method="get"> |
|
733 | 733 | <div id="edit-container_{1}" class="clearfix"> |
|
734 | 734 | <div class="comment-title pull-left"> |
|
735 | 735 | Commenting on line {1}. |
|
736 | 736 | </div> |
|
737 | 737 | <div class="comment-help pull-right"> |
|
738 | 738 | Comments parsed using <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">RST</a> syntax with <span class="tooltip" title="Use @username inside this text to send notification to this RhodeCode user">@mention</span> support. |
|
739 | 739 | </div> |
|
740 | 740 | <div style="clear: both"></div> |
|
741 | 741 | <textarea id="text_{1}" name="text" class="comment-block-ta ac-input"></textarea> |
|
742 | 742 | </div> |
|
743 | 743 | <div id="preview-container_{1}" class="clearfix" style="display: none;"> |
|
744 | 744 | <div class="comment-help"> |
|
745 | 745 | Comment preview |
|
746 | 746 | </div> |
|
747 | 747 | <div id="preview-box_{1}" class="preview-box"></div> |
|
748 | 748 | </div> |
|
749 | 749 | <div class="comment-button pull-right"> |
|
750 | 750 | <input type="hidden" name="f_path" value="{0}"> |
|
751 | 751 | <input type="hidden" name="line" value="{1}"> |
|
752 | 752 | <div id="preview-btn_{1}" class="btn btn-default">Preview</div> |
|
753 | 753 | <div id="edit-btn_{1}" class="btn" style="display: none;">Edit</div> |
|
754 | 754 | <input class="btn btn-success save-inline-form" id="save" name="save" type="submit" value="Comment" /> |
|
755 | 755 | </div> |
|
756 | 756 | <div class="comment-button hide-inline-form-button"> |
|
757 | 757 | <input class="btn hide-inline-form" id="hide-inline-form" name="hide-inline-form" type="reset" value="Cancel" /> |
|
758 | 758 | </div> |
|
759 | 759 | </form> |
|
760 | 760 | </div> |
|
761 | 761 | </div> |
|
762 | 762 | |
|
763 | 763 | |
|
764 | 764 | |
|
765 | 765 | <div class="comments"> |
|
766 | 766 | <div id="inline-comments-container"> |
|
767 | 767 | |
|
768 | 768 | <h2>0 Pull Request Comments</h2> |
|
769 | 769 | |
|
770 | 770 | |
|
771 | 771 | </div> |
|
772 | 772 | |
|
773 | 773 | </div> |
|
774 | 774 | |
|
775 | 775 | |
|
776 | 776 | |
|
777 | 777 | |
|
778 | 778 | <div class="pull-request-merge"> |
|
779 | 779 | </div> |
|
780 | 780 | <div class="comments"> |
|
781 | 781 | <div class="comment-form ac"> |
|
782 | 782 | <form action="/rhodecode-momentum/pull-request-comment/720" id="comments_form" method="POST"> |
|
783 | 783 | <div style="display: none;"><input id="csrf_token" name="csrf_token" type="hidden" value="6dbc0b19ac65237df65d57202a3e1f2df4153e38" /></div> |
|
784 | 784 | <div id="edit-container" class="clearfix"> |
|
785 | 785 | <div class="comment-title pull-left"> |
|
786 | 786 | Create a comment on this Pull Request. |
|
787 | 787 | </div> |
|
788 | 788 | <div class="comment-help pull-right"> |
|
789 | 789 | Comments parsed using <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">RST</a> syntax with <span class="tooltip" title="Use @username inside this text to send notification to this RhodeCode user">@mention</span> support. |
|
790 | 790 | </div> |
|
791 | 791 | <div style="clear: both"></div> |
|
792 | 792 | <textarea class="comment-block-ta" id="text" name="text"></textarea> |
|
793 | 793 | </div> |
|
794 | 794 | |
|
795 | 795 | <div id="preview-container" class="clearfix" style="display: none;"> |
|
796 | 796 | <div class="comment-title"> |
|
797 | 797 | Comment preview |
|
798 | 798 | </div> |
|
799 | 799 | <div id="preview-box" class="preview-box"></div> |
|
800 | 800 | </div> |
|
801 | 801 | |
|
802 | 802 | <div id="comment_form_extras"> |
|
803 | 803 | </div> |
|
804 | 804 | <div class="action-button pull-right"> |
|
805 | 805 | <div id="preview-btn" class="btn"> |
|
806 | 806 | Preview |
|
807 | 807 | </div> |
|
808 | 808 | <div id="edit-btn" class="btn" style="display: none;"> |
|
809 | 809 | Edit |
|
810 | 810 | </div> |
|
811 | 811 | <div class="comment-button"> |
|
812 | 812 | <input class="btn btn-small btn-success comment-button-input" id="save" name="save" type="submit" value="Comment" /> |
|
813 | 813 | </div> |
|
814 | 814 | </div> |
|
815 | 815 | </form> |
|
816 | 816 | </div> |
|
817 | 817 | </div> |
|
818 | 818 | <script> |
|
819 | 819 | |
|
820 | 820 | $(document).ready(function() { |
|
821 | 821 | |
|
822 | 822 | var cm = initCommentBoxCodeMirror('#text'); |
|
823 | 823 | |
|
824 | 824 | // main form preview |
|
825 | 825 | $('#preview-btn').on('click', function(e) { |
|
826 | 826 | $('#preview-btn').hide(); |
|
827 | 827 | $('#edit-btn').show(); |
|
828 | 828 | var _text = cm.getValue(); |
|
829 | 829 | if (!_text) { |
|
830 | 830 | return; |
|
831 | 831 | } |
|
832 | 832 | var post_data = { |
|
833 | 833 | 'text': _text, |
|
834 | 834 | 'renderer': DEFAULT_RENDERER, |
|
835 | 835 | 'csrf_token': CSRF_TOKEN |
|
836 | 836 | }; |
|
837 | 837 | var previewbox = $('#preview-box'); |
|
838 | 838 | previewbox.addClass('unloaded'); |
|
839 | 839 | previewbox.html(_gettext('Loading ...')); |
|
840 | 840 | $('#edit-container').hide(); |
|
841 | 841 | $('#preview-container').show(); |
|
842 | 842 | |
|
843 | 843 | var url = pyroutes.url('changeset_comment_preview', {'repo_name': 'rhodecode-momentum'}); |
|
844 | 844 | |
|
845 | 845 | ajaxPOST(url, post_data, function(o) { |
|
846 | 846 | previewbox.html(o); |
|
847 | 847 | previewbox.removeClass('unloaded'); |
|
848 | 848 | }); |
|
849 | 849 | }); |
|
850 | 850 | $('#edit-btn').on('click', function(e) { |
|
851 | 851 | $('#preview-btn').show(); |
|
852 | 852 | $('#edit-btn').hide(); |
|
853 | 853 | $('#edit-container').show(); |
|
854 | 854 | $('#preview-container').hide(); |
|
855 | 855 | }); |
|
856 | 856 | |
|
857 | 857 | var formatChangeStatus = function(state, escapeMarkup) { |
|
858 | 858 | var originalOption = state.element; |
|
859 | 859 | return '<div class="flag_status ' + $(originalOption).data('status') + ' pull-left"></div>' + |
|
860 | 860 | '<span>' + escapeMarkup(state.text) + '</span>'; |
|
861 | 861 | }; |
|
862 | 862 | |
|
863 | 863 | var formatResult = function(result, container, query, escapeMarkup) { |
|
864 | 864 | return formatChangeStatus(result, escapeMarkup); |
|
865 | 865 | }; |
|
866 | 866 | |
|
867 | 867 | var formatSelection = function(data, container, escapeMarkup) { |
|
868 | 868 | return formatChangeStatus(data, escapeMarkup); |
|
869 | 869 | }; |
|
870 | 870 | |
|
871 | 871 | $('#change_status_general').select2({ |
|
872 | 872 | placeholder: "Status Review", |
|
873 | 873 | formatResult: formatResult, |
|
874 | 874 | formatSelection: formatSelection, |
|
875 | 875 | containerCssClass: "drop-menu status_box_menu", |
|
876 | 876 | dropdownCssClass: "drop-menu-dropdown", |
|
877 | 877 | dropdownAutoWidth: true, |
|
878 | 878 | minimumResultsForSearch: -1 |
|
879 | 879 | }); |
|
880 | 880 | }); |
|
881 | 881 | </script> |
|
882 | 882 | |
|
883 | 883 | |
|
884 | 884 | <script type="text/javascript"> |
|
885 | 885 | // TODO: switch this to pyroutes |
|
886 | 886 | AJAX_COMMENT_DELETE_URL = "/rhodecode-momentum/pull-request-comment/__COMMENT_ID__/delete"; |
|
887 | 887 | |
|
888 | 888 | $(function(){ |
|
889 | 889 | ReviewerAutoComplete('#user'); |
|
890 | 890 | |
|
891 | 891 | $('#open_edit_reviewers').on('click', function(e){ |
|
892 | 892 | $('#open_edit_reviewers').hide(); |
|
893 | 893 | $('#close_edit_reviewers').show(); |
|
894 | 894 | $('#add_reviewer_input').show(); |
|
895 | 895 | $('.reviewer_member_remove').css('visibility', 'visible'); |
|
896 | 896 | }); |
|
897 | 897 | |
|
898 | 898 | $('#close_edit_reviewers').on('click', function(e){ |
|
899 | 899 | $('#open_edit_reviewers').show(); |
|
900 | 900 | $('#close_edit_reviewers').hide(); |
|
901 | 901 | $('#add_reviewer_input').hide(); |
|
902 | 902 | $('.reviewer_member_remove').css('visibility', 'hidden'); |
|
903 | 903 | }); |
|
904 | 904 | |
|
905 | 905 | $('.show-inline-comments').on('change', function(e){ |
|
906 | 906 | var show = 'none'; |
|
907 | 907 | var target = e.currentTarget; |
|
908 | 908 | if(target.checked){ |
|
909 | 909 | show = '' |
|
910 | 910 | } |
|
911 | 911 | var boxid = $(target).attr('id_for'); |
|
912 | 912 | var comments = $('#{0} .inline-comments'.format(boxid)); |
|
913 | 913 | var fn_display = function(idx){ |
|
914 | 914 | $(this).css('display', show); |
|
915 | 915 | }; |
|
916 | 916 | $(comments).each(fn_display); |
|
917 | 917 | var btns = $('#{0} .inline-comments-button'.format(boxid)); |
|
918 | 918 | $(btns).each(fn_display); |
|
919 | 919 | }); |
|
920 | 920 | |
|
921 | 921 | var commentTotals = {}; |
|
922 | 922 | $.each(file_comments, function(i, comment) { |
|
923 | 923 | var path = $(comment).attr('path'); |
|
924 | 924 | var comms = $(comment).children().length; |
|
925 | 925 | if (path in commentTotals) { |
|
926 | 926 | commentTotals[path] += comms; |
|
927 | 927 | } else { |
|
928 | 928 | commentTotals[path] = comms; |
|
929 | 929 | } |
|
930 | 930 | }); |
|
931 | 931 | $.each(commentTotals, function(path, total) { |
|
932 | 932 | var elem = $('.comment-bubble[data-path="'+ path +'"]') |
|
933 | 933 | elem.css('visibility', 'visible'); |
|
934 | 934 | elem.html(elem.html() + ' ' + total ); |
|
935 | 935 | }); |
|
936 | 936 | |
|
937 | 937 | $('#merge_pull_request_form').submit(function() { |
|
938 | 938 | if (!$('#merge_pull_request').attr('disabled')) { |
|
939 | 939 | $('#merge_pull_request').attr('disabled', 'disabled'); |
|
940 | 940 | } |
|
941 | 941 | return true; |
|
942 | 942 | }); |
|
943 | 943 | |
|
944 | 944 | $('#update_pull_request').on('click', function(e){ |
|
945 | 945 | updateReviewers(undefined, "rhodecode-momentum", "720"); |
|
946 | 946 | }); |
|
947 | 947 | |
|
948 | 948 | $('#update_commits').on('click', function(e){ |
|
949 | 949 | updateCommits("rhodecode-momentum", "720"); |
|
950 | 950 | }); |
|
951 | 951 | |
|
952 | 952 | }) |
|
953 | 953 | </script> |
|
954 | 954 | |
|
955 | 955 | </div> |
|
956 | 956 | </div></div> |
|
957 | 957 | |
|
958 | 958 | </div> |
|
959 | 959 | |
|
960 | 960 | |
|
961 | 961 | </%def> |
@@ -1,295 +1,295 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | ${self.sidebar()} |
|
19 | 19 | |
|
20 | 20 | <div class="main-content"> |
|
21 | 21 | |
|
22 | 22 | <h2>Simple form elements (Depreciated)</h2> |
|
23 | 23 | |
|
24 | 24 | <p>The wrapping <code>.field</code> also gets the class |
|
25 | 25 | <code>.field-sm</code>.</p> |
|
26 | 26 | |
|
27 | 27 | <p>Buttons get additional the class <code>.btn-sm</code>.</p> |
|
28 | 28 | |
|
29 | 29 | |
|
30 | 30 | <div class="bs-example"> |
|
31 | 31 | <form method='post' action='none'> |
|
32 | 32 | <div class='form'> |
|
33 | 33 | <div class='fields'> |
|
34 | 34 | |
|
35 | 35 | <div class='field field-sm'> |
|
36 | 36 | <div class='label'> |
|
37 | 37 | <label for='example_input'>Example input label:</label> |
|
38 | 38 | </div> |
|
39 | 39 | <div class='input'> |
|
40 | 40 | <input id="example_input" type="text" placeholder="Example input"> |
|
41 | 41 | </div> |
|
42 | 42 | </div> |
|
43 | 43 | |
|
44 | 44 | <div class='field field-sm'> |
|
45 | 45 | <div class='label'> |
|
46 | 46 | <label for='example_input_ro'>Example input readonly:</label> |
|
47 | 47 | </div> |
|
48 | 48 | <div class='input'> |
|
49 | 49 | <input id="example_input_ro" type="text" readonly="readonly" placeholder="Example input"> |
|
50 | 50 | </div> |
|
51 | 51 | </div> |
|
52 | 52 | |
|
53 | 53 | <div class='field field-sm'> |
|
54 | 54 | <div class='label'> |
|
55 | 55 | <label for='example_select'>Example select input:</label> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="select"> |
|
58 | 58 | <select id="example_select" > |
|
59 | 59 | <option value="#">${_('Templates...')}</option> |
|
60 | 60 | <option value="ga">Google Analytics</option> |
|
61 | 61 | <option value="clicky">Clicky</option> |
|
62 | 62 | <option value="server_announce">${_('Server Announcement')}</option> |
|
63 | 63 | </select> |
|
64 | 64 | </div> |
|
65 | 65 | </div> |
|
66 | 66 | <script> |
|
67 | 67 | $(document).ready(function() { |
|
68 | 68 | $('#example_select').select2({ |
|
69 | 69 | containerCssClass: 'drop-menu', |
|
70 | 70 | dropdownCssClass: 'drop-menu-dropdown', |
|
71 | 71 | dropdownAutoWidth: true, |
|
72 | 72 | minimumResultsForSearch: -1 |
|
73 | 73 | }); |
|
74 | 74 | }); |
|
75 | 75 | </script> |
|
76 | 76 | |
|
77 | 77 | <div class='field field-sm'> |
|
78 | 78 | <div class='label'> |
|
79 | 79 | <label for='example_checkbox'>Example checkbox:</label> |
|
80 | 80 | </div> |
|
81 | 81 | <div class="checkboxes"> |
|
82 | 82 | <div class="checkbox"> |
|
83 | 83 | <input id="example_checkbox" type="checkbox"> |
|
84 | 84 | <label for="example_checkbox">Label of the checkbox</label> |
|
85 | 85 | </div> |
|
86 | 86 | </div> |
|
87 | 87 | </div> |
|
88 | 88 | |
|
89 | 89 | <div class='field field-sm'> |
|
90 | 90 | <div class='label'> |
|
91 | 91 | <label for='example_checkboxes'>Example multiple checkboxes:</label> |
|
92 | 92 | </div> |
|
93 | 93 | <div class="checkboxes"> |
|
94 | 94 | <div class="checkbox"> |
|
95 | 95 | <input id="example_checkboxes_01" type="checkbox"> |
|
96 | 96 | <label for="example_checkboxes_01">Label of the first checkbox</label> |
|
97 | 97 | </div> |
|
98 | 98 | <div class="checkbox"> |
|
99 | 99 | <input id="example_checkboxes_02" type="checkbox"> |
|
100 | 100 | <label for="example_checkboxes_02">Label of the first checkbox</label> |
|
101 | 101 | </div> |
|
102 | 102 | <div class="checkbox"> |
|
103 | 103 | <input id="example_checkboxes_03" type="checkbox"> |
|
104 | 104 | <label for="example_checkboxes_03">Label of the first checkbox</label> |
|
105 | 105 | </div> |
|
106 | 106 | </div> |
|
107 | 107 | </div> |
|
108 | 108 | |
|
109 | 109 | |
|
110 | 110 | <div class='field field-sm'> |
|
111 | 111 | <div class='label'> |
|
112 | 112 | <label for='example_checkboxes'>Example multiple checkboxes:</label> |
|
113 | 113 | </div> |
|
114 | 114 | ## TODO: johbo: This is off compared to the checkboxes |
|
115 | 115 | <div class="radios"> |
|
116 | 116 | <label><input type="radio" checked="checked" value="hg.create.repository" name="default_repo_create" id="default_repo_create_hgcreaterepository">Enabled</label> |
|
117 | 117 | <label><input type="radio" value="hg.create.none" name="default_repo_create" id="default_repo_create_hgcreatenone">Disabled</label> |
|
118 | 118 | <span class="help-block"> |
|
119 | 119 | Permission to allow repository creation. This includes ability to create |
|
120 | 120 | repositories in root level. If this option is disabled admin of |
|
121 | 121 | repository group can still create repositories inside that |
|
122 | 122 | repository group. |
|
123 | 123 | </span> |
|
124 | 124 | </div> |
|
125 | 125 | </div> |
|
126 | 126 | |
|
127 | 127 | <div class="buttons"> |
|
128 | 128 | <input type="submit" value="Save" id="example_save" class="btn btn-sm"> |
|
129 | 129 | <input type="reset" value="Reset" id="example_reset" class="btn btn-sm"> |
|
130 | 130 | </div> |
|
131 | 131 | |
|
132 | 132 | </div> |
|
133 | 133 | </div> |
|
134 | 134 | </form> |
|
135 | 135 | </div> |
|
136 | 136 | |
|
137 | 137 | |
|
138 | 138 | |
|
139 | 139 | |
|
140 | 140 | <h2>Help text in form elements</h2> |
|
141 | 141 | |
|
142 | 142 | <div class="bs-example"> |
|
143 | 143 | <form method='post' action=''> |
|
144 | 144 | <div class='form'> |
|
145 | 145 | <div class='fields'> |
|
146 | 146 | |
|
147 | 147 | <div class='field field-sm'> |
|
148 | 148 | <div class='label'> |
|
149 | 149 | <label for='02_example_input'>Example input label:</label> |
|
150 | 150 | </div> |
|
151 | 151 | <div class='input'> |
|
152 | 152 | <input id="02_example_input" type="text" placeholder="Placeholder text"> |
|
153 | 153 | <span class="help-block"> |
|
154 | 154 | Example help text for this input element. This help text |
|
155 | 155 | will be shown under the input element itself. It can be |
|
156 | 156 | so long that it will span multiple lines. |
|
157 | 157 | </span> |
|
158 | 158 | </div> |
|
159 | 159 | </div> |
|
160 | 160 | |
|
161 | 161 | <div class='field field-sm'> |
|
162 | 162 | <div class='label'> |
|
163 | 163 | <label for='02_example_checkbox'>Example checkbox with help block:</label> |
|
164 | 164 | </div> |
|
165 | 165 | <div class="checkboxes"> |
|
166 | 166 | <div class="checkbox"> |
|
167 | 167 | <input id="02_example_checkbox" type="checkbox"> |
|
168 | 168 | <label for="02_example_checkbox">Label of the checkbox</label> |
|
169 | 169 | </div> |
|
170 | 170 | <span class="help-block"> |
|
171 | 171 | Example help text for this checkbox element. This help text |
|
172 | 172 | will be shown under the checkbox element itself. It can be |
|
173 | 173 | so long that it will span multiple lines. |
|
174 | 174 | </span> |
|
175 | 175 | </div> |
|
176 | 176 | </div> |
|
177 | 177 | |
|
178 | 178 | |
|
179 | 179 | <div class='field field-sm'> |
|
180 | 180 | <div class='label'> |
|
181 | 181 | <label>Multiple checkboxes:</label> |
|
182 | 182 | </div> |
|
183 | 183 | <div class="checkboxes"> |
|
184 | 184 | <div class="checkbox"> |
|
185 | 185 | <input id="02_example_checkboxes_01" type="checkbox"> |
|
186 | 186 | <label for="02_example_checkboxes_01">Label of the first checkbox</label> |
|
187 | 187 | </div> |
|
188 | 188 | <div class="checkbox"> |
|
189 | 189 | <input id="02_example_checkboxes_02" type="checkbox"> |
|
190 | 190 | <label for="02_example_checkboxes_02">Label of the first checkbox</label> |
|
191 | 191 | </div> |
|
192 | 192 | <div class="checkbox"> |
|
193 | 193 | <input id="02_example_checkboxes_03" type="checkbox"> |
|
194 | 194 | <label for="02_example_checkboxes_03">Label of the first checkbox</label> |
|
195 | 195 | </div> |
|
196 | 196 | <span class="help-block"> |
|
197 | 197 | Example help text for this checkbox element. This help text |
|
198 | 198 | will be shown under the checkbox element itself. It can be |
|
199 | 199 | so long that it will span multiple lines. |
|
200 | 200 | </span> |
|
201 | 201 | </div> |
|
202 | 202 | </div> |
|
203 | 203 | |
|
204 | 204 | |
|
205 | 205 | </div> |
|
206 | 206 | </div> |
|
207 | 207 | </form> |
|
208 | 208 | </div> |
|
209 | 209 | |
|
210 | 210 | |
|
211 | 211 | |
|
212 | 212 | |
|
213 | 213 | <h2>Error messages</h2> |
|
214 | 214 | |
|
215 | 215 | <div class="bs-example"> |
|
216 | 216 | <form method='post' action=''> |
|
217 | 217 | <div class='form'> |
|
218 | 218 | <div class='fields'> |
|
219 | 219 | |
|
220 | 220 | <div class='field field-sm'> |
|
221 | 221 | <div class='label'> |
|
222 | 222 | <label for='04_example_input'>Example input label:</label> |
|
223 | 223 | </div> |
|
224 | 224 | <div class='input'> |
|
225 | 225 | <input id="04_example_input" type="text" placeholder="Example input"/> |
|
226 | 226 | <span class="error-message"> |
|
227 | 227 | If form validation fails, some input fields can show an |
|
228 | 228 | error message close to the field. |
|
229 | 229 | </span> |
|
230 | 230 | </div> |
|
231 | 231 | </div> |
|
232 | 232 | |
|
233 | 233 | </div> |
|
234 | 234 | </div> |
|
235 | 235 | </form> |
|
236 | 236 | </div> |
|
237 | 237 | |
|
238 | 238 | |
|
239 | 239 | <h2>Fields with buttons</h2> |
|
240 | 240 | |
|
241 | 241 | <div class="bs-example"> |
|
242 | 242 | <form method='post' action=''> |
|
243 | 243 | <div class='form'> |
|
244 | 244 | <div class='fields'> |
|
245 | 245 | |
|
246 | 246 | <div class='field field-sm'> |
|
247 | 247 | <div class='label'> |
|
248 | 248 | <label for='05_example_input'>Example input label:</label> |
|
249 | 249 | </div> |
|
250 | 250 | <div class='input'> |
|
251 | 251 | <input id="05_example_input" type="text" readonly="readonly" placeholder="Example input"> |
|
252 | 252 | <span class="btn action_button btn-x"> |
|
253 | 253 | <i class="icon-remove-sign"></i> |
|
254 | 254 | delete |
|
255 | 255 | </span> |
|
256 | 256 | <span class="help-block"> |
|
257 | 257 | Used if there is a list of values and the user can remove |
|
258 | 258 | single entries. |
|
259 | 259 | </span> |
|
260 | 260 | </div> |
|
261 | 261 | </div> |
|
262 | 262 | |
|
263 | 263 | |
|
264 | 264 | <div class='field field-sm'> |
|
265 | 265 | <div class='label'> |
|
266 | 266 | <label for='05_example_input'>Example input label:</label> |
|
267 | 267 | </div> |
|
268 | 268 | <div class='input'> |
|
269 | 269 | <input id="05_example_input" type="text" readonly="readonly" placeholder="Example input"> |
|
270 | 270 | <span title="Click to unlock. You must restart RhodeCode in order to make this setting take effect." |
|
271 | 271 | class="tooltip" id="path_unlock" |
|
272 | 272 | tt_title="Click to unlock. You must restart RhodeCode in order to make this setting take effect."> |
|
273 | 273 | <div class="btn btn-default"> |
|
274 | 274 | <span><i class="icon-lock" id="path_unlock_icon"></i></span> |
|
275 | 275 | </div> |
|
276 | 276 | </span> |
|
277 | 277 | <span class="help-block"> |
|
278 | 278 | Used together with locked fields, the user has to first |
|
279 | 279 | unlock and afterwards it is possible to change the value. |
|
280 | 280 | </span> |
|
281 | 281 | </div> |
|
282 | 282 | </div> |
|
283 | 283 | |
|
284 | 284 | </div> |
|
285 | 285 | </div> |
|
286 | 286 | </form> |
|
287 | 287 | </div> |
|
288 | 288 | |
|
289 | 289 | |
|
290 | 290 | |
|
291 | 291 | |
|
292 | 292 | </div> |
|
293 | 293 | </div> <!-- .main-content --> |
|
294 | 294 | </div> <!-- .box --> |
|
295 | 295 | </%def> |
@@ -1,619 +1,619 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | ${self.sidebar()} |
|
19 | 19 | |
|
20 | 20 | <div class="main-content"> |
|
21 | 21 | |
|
22 | 22 | <h2>Simple form elements (Depreciated)</h2> |
|
23 | 23 | |
|
24 | 24 | <div class="bs-example"> |
|
25 | 25 | <form method='post' action='none'> |
|
26 | 26 | <div class='form'> |
|
27 | 27 | <div class='fields'> |
|
28 | 28 | |
|
29 | 29 | <div class='field'> |
|
30 | 30 | <div class='label'> |
|
31 | 31 | <label for='example_input_ro'>Example input readonly:</label> |
|
32 | 32 | </div> |
|
33 | 33 | <div class='input'> |
|
34 | 34 | <input id="example_input_ro" type="text" readonly="readonly" placeholder="Example input"> |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
|
37 | 37 | |
|
38 | 38 | <div class='field'> |
|
39 | 39 | <div class='label'> |
|
40 | 40 | <label for='example_input'>Example text:</label> |
|
41 | 41 | </div> |
|
42 | 42 | <div class='input'> |
|
43 | 43 | <div class='text-as-placeholder'> |
|
44 | 44 | http://something.example.com |
|
45 | 45 | <span class="link" id="edit_clone_uri"><i class="icon-edit"></i>${_('edit')}</span> |
|
46 | 46 | </div> |
|
47 | 47 | <p class='help-block'>Help text in a paragraph.</p> |
|
48 | 48 | </div> |
|
49 | 49 | </div> |
|
50 | 50 | |
|
51 | 51 | <div class='field'> |
|
52 | 52 | <div class='label'> |
|
53 | 53 | <label for='example_select'>Example select input:</label> |
|
54 | 54 | </div> |
|
55 | 55 | <div class="select"> |
|
56 | 56 | <select id="example_select" > |
|
57 | 57 | <option value="#">${_('Templates...')}</option> |
|
58 | 58 | <option value="ga">Google Analytics</option> |
|
59 | 59 | <option value="clicky">Clicky</option> |
|
60 | 60 | <option value="server_announce">${_('Server Announcement')}</option> |
|
61 | 61 | </select> |
|
62 | 62 | </div> |
|
63 | 63 | </div> |
|
64 | 64 | <script> |
|
65 | 65 | $(document).ready(function() { |
|
66 | 66 | $('#example_select').select2({ |
|
67 | 67 | containerCssClass: 'drop-menu', |
|
68 | 68 | dropdownCssClass: 'drop-menu-dropdown', |
|
69 | 69 | dropdownAutoWidth: true, |
|
70 | 70 | minimumResultsForSearch: -1 |
|
71 | 71 | }); |
|
72 | 72 | }); |
|
73 | 73 | </script> |
|
74 | 74 | |
|
75 | 75 | <div class='field'> |
|
76 | 76 | <div class='label'> |
|
77 | 77 | <label for='example_select'>Example select input:</label> |
|
78 | 78 | </div> |
|
79 | 79 | <div class="select"> |
|
80 | 80 | text before |
|
81 | 81 | <select id="example_select2" > |
|
82 | 82 | <option value="#">${_('Templates...')}</option> |
|
83 | 83 | <option value="ga">Google Analytics</option> |
|
84 | 84 | <option value="clicky">Clicky</option> |
|
85 | 85 | <option value="server_announce">${_('Server Announcement')}</option> |
|
86 | 86 | </select> |
|
87 | 87 | text after |
|
88 | 88 | </div> |
|
89 | 89 | </div> |
|
90 | 90 | <script> |
|
91 | 91 | $(document).ready(function() { |
|
92 | 92 | $('#example_select2').select2({ |
|
93 | 93 | containerCssClass: 'drop-menu', |
|
94 | 94 | dropdownCssClass: 'drop-menu-dropdown', |
|
95 | 95 | dropdownAutoWidth: true, |
|
96 | 96 | minimumResultsForSearch: -1 |
|
97 | 97 | }); |
|
98 | 98 | }); |
|
99 | 99 | </script> |
|
100 | 100 | |
|
101 | 101 | <div class='field'> |
|
102 | 102 | <div class='label'> |
|
103 | 103 | <label for='example_select'>Example select input with submenus:</label> |
|
104 | 104 | </div> |
|
105 | 105 | <div class="select"> |
|
106 | 106 | <select id="example_select_sub" > |
|
107 | 107 | <option value="#">${_('Default')}</option> |
|
108 | 108 | <optgroup label="Group 1"> |
|
109 | 109 | <option>Option 1.1</option> |
|
110 | 110 | </optgroup> |
|
111 | 111 | <optgroup label="Group 2"> |
|
112 | 112 | <option>Option 2.1</option> |
|
113 | 113 | <option>Option 2.2</option> |
|
114 | 114 | </optgroup> |
|
115 | 115 | <optgroup label="Group 3" disabled> |
|
116 | 116 | <option>Option 3.1</option> |
|
117 | 117 | <option>Option 3.2</option> |
|
118 | 118 | <option>Option 3.3</option> |
|
119 | 119 | </optgroup> |
|
120 | 120 | </select> |
|
121 | 121 | </div> |
|
122 | 122 | </div> |
|
123 | 123 | <script> |
|
124 | 124 | $(document).ready(function() { |
|
125 | 125 | $('#example_select_sub').select2({ |
|
126 | 126 | containerCssClass: 'drop-menu', |
|
127 | 127 | dropdownCssClass: 'drop-menu-dropdown', |
|
128 | 128 | dropdownAutoWidth: true, |
|
129 | 129 | minimumResultsForSearch: -1 |
|
130 | 130 | }); |
|
131 | 131 | }); |
|
132 | 132 | </script> |
|
133 | 133 | |
|
134 | 134 | <div class='field'> |
|
135 | 135 | <div class='label'> |
|
136 | 136 | <label for='example_checkbox'>Example checkbox:</label> |
|
137 | 137 | </div> |
|
138 | 138 | <div class="checkboxes"> |
|
139 | 139 | <div class="checkbox"> |
|
140 | 140 | <input id="example_checkbox" type="checkbox"> |
|
141 | 141 | <label for="example_checkbox">Label of the checkbox</label> |
|
142 | 142 | </div> |
|
143 | 143 | </div> |
|
144 | 144 | </div> |
|
145 | 145 | |
|
146 | 146 | <div class='field'> |
|
147 | 147 | <div class='label'> |
|
148 | 148 | <label for='example_checkboxes'>Example multiple checkboxes:</label> |
|
149 | 149 | </div> |
|
150 | 150 | <div class="checkboxes"> |
|
151 | 151 | <div class="checkbox"> |
|
152 | 152 | <input id="example_checkboxes_01" type="checkbox"> |
|
153 | 153 | <label for="example_checkboxes_01">Label of the first checkbox</label> |
|
154 | 154 | </div> |
|
155 | 155 | <div class="checkbox"> |
|
156 | 156 | <input id="example_checkboxes_02" type="checkbox"> |
|
157 | 157 | <label for="example_checkboxes_02">Label of the first checkbox</label> |
|
158 | 158 | </div> |
|
159 | 159 | <div class="checkbox"> |
|
160 | 160 | <input id="example_checkboxes_03" type="checkbox"> |
|
161 | 161 | <label for="example_checkboxes_03">Label of the first checkbox</label> |
|
162 | 162 | </div> |
|
163 | 163 | </div> |
|
164 | 164 | </div> |
|
165 | 165 | |
|
166 | 166 | |
|
167 | 167 | <div class='field'> |
|
168 | 168 | <div class='label'> |
|
169 | 169 | <label for='example_checkboxes'>Example multiple checkboxes:</label> |
|
170 | 170 | </div> |
|
171 | 171 | ## TODO: johbo: This is off compared to the checkboxes |
|
172 | 172 | <div class="radios"> |
|
173 | 173 | <label><input type="radio" checked="checked" value="hg.create.repository" name="default_repo_create" id="default_repo_create_hgcreaterepository">Enabled</label> |
|
174 | 174 | <label><input type="radio" value="hg.create.none" name="default_repo_create" id="default_repo_create_hgcreatenone">Disabled</label> |
|
175 | 175 | <span class="help-block"> |
|
176 | 176 | Permission to allow repository creation. This includes ability to create |
|
177 | 177 | repositories in root level. If this option is disabled admin of |
|
178 | 178 | repository group can still create repositories inside that |
|
179 | 179 | repository group. |
|
180 | 180 | </span> |
|
181 | 181 | </div> |
|
182 | 182 | </div> |
|
183 | 183 | |
|
184 | 184 | <div class="buttons"> |
|
185 | 185 | <input type="submit" value="Save" id="example_save" class="btn"> |
|
186 | 186 | <input type="reset" value="Reset" id="example_reset" class="btn"> |
|
187 | 187 | </div> |
|
188 | 188 | |
|
189 | 189 | </div> |
|
190 | 190 | </div> |
|
191 | 191 | </form> |
|
192 | 192 | </div> |
|
193 | 193 | |
|
194 | 194 | |
|
195 | 195 | |
|
196 | 196 | |
|
197 | 197 | <h2>Help text in form elements</h2> |
|
198 | 198 | |
|
199 | 199 | <div class="bs-example"> |
|
200 | 200 | <form method='post' action=''> |
|
201 | 201 | <div class='form'> |
|
202 | 202 | <div class='fields'> |
|
203 | 203 | |
|
204 | 204 | <div class='field'> |
|
205 | 205 | <div class='label'> |
|
206 | 206 | <label for='02_example_input'>Example input label:</label> |
|
207 | 207 | </div> |
|
208 | 208 | <div class='input'> |
|
209 | 209 | <input id="02_example_input" type="text" placeholder="Placeholder text"> |
|
210 | 210 | <span class="help-block"> |
|
211 | 211 | Example help text for this input element. This help text |
|
212 | 212 | will be shown under the input element itself. It can be |
|
213 | 213 | so long that it will span multiple lines. |
|
214 | 214 | </span> |
|
215 | 215 | |
|
216 | 216 | </div> |
|
217 | 217 | </div> |
|
218 | 218 | |
|
219 | 219 | <div class='field'> |
|
220 | 220 | <div class='label'> |
|
221 | 221 | <label for='example_select_help'>Example select input:</label> |
|
222 | 222 | </div> |
|
223 | 223 | <div class="select"> |
|
224 | 224 | <select id="example_select_help" > |
|
225 | 225 | <option value="#">${_('Templates...')}</option> |
|
226 | 226 | <option value="ga">Google Analytics</option> |
|
227 | 227 | <option value="clicky">Clicky</option> |
|
228 | 228 | <option value="server_announce">${_('Server Announcement')}</option> |
|
229 | 229 | </select> |
|
230 | 230 | <span class="help-block"> |
|
231 | 231 | Example help text for this input element. This help text |
|
232 | 232 | will be shown under the input element itself. It can be |
|
233 | 233 | so long that it will span multiple lines. |
|
234 | 234 | </span> |
|
235 | 235 | </div> |
|
236 | 236 | </div> |
|
237 | 237 | <script> |
|
238 | 238 | $(document).ready(function() { |
|
239 | 239 | $('#example_select_help').select2({ |
|
240 | 240 | containerCssClass: 'drop-menu', |
|
241 | 241 | dropdownCssClass: 'drop-menu-dropdown', |
|
242 | 242 | dropdownAutoWidth: true, |
|
243 | 243 | minimumResultsForSearch: -1 |
|
244 | 244 | }); |
|
245 | 245 | }); |
|
246 | 246 | </script> |
|
247 | 247 | |
|
248 | 248 | <div class='field'> |
|
249 | 249 | <div class='label'> |
|
250 | 250 | <label for='02_example_checkbox'>Example checkbox with help block:</label> |
|
251 | 251 | </div> |
|
252 | 252 | <div class="checkboxes"> |
|
253 | 253 | <div class="checkbox"> |
|
254 | 254 | <input id="02_example_checkbox" type="checkbox"> |
|
255 | 255 | <label for="02_example_checkbox">Label of the checkbox</label> |
|
256 | 256 | </div> |
|
257 | 257 | <span class="help-block"> |
|
258 | 258 | Example help text for this checkbox element. This help text |
|
259 | 259 | will be shown under the checkbox element itself. It can be |
|
260 | 260 | so long that it will span multiple lines. |
|
261 | 261 | </span> |
|
262 | 262 | </div> |
|
263 | 263 | </div> |
|
264 | 264 | |
|
265 | 265 | |
|
266 | 266 | <div class='field'> |
|
267 | 267 | <div class='label'> |
|
268 | 268 | <label>Multiple checkboxes:</label> |
|
269 | 269 | </div> |
|
270 | 270 | <div class="checkboxes"> |
|
271 | 271 | <div class="checkbox"> |
|
272 | 272 | <input id="02_example_checkboxes_01" type="checkbox"> |
|
273 | 273 | <label for="02_example_checkboxes_01">Label of the first checkbox</label> |
|
274 | 274 | </div> |
|
275 | 275 | <div class="checkbox"> |
|
276 | 276 | <input id="02_example_checkboxes_02" type="checkbox"> |
|
277 | 277 | <label for="02_example_checkboxes_02">Label of the first checkbox</label> |
|
278 | 278 | </div> |
|
279 | 279 | <div class="checkbox"> |
|
280 | 280 | <input id="02_example_checkboxes_03" type="checkbox"> |
|
281 | 281 | <label for="02_example_checkboxes_03">Label of the first checkbox</label> |
|
282 | 282 | </div> |
|
283 | 283 | <span class="help-block"> |
|
284 | 284 | Example help text for this checkbox element. This help text |
|
285 | 285 | will be shown under the checkbox element itself. It can be |
|
286 | 286 | so long that it will span multiple lines. |
|
287 | 287 | </span> |
|
288 | 288 | </div> |
|
289 | 289 | </div> |
|
290 | 290 | |
|
291 | 291 | |
|
292 | 292 | </div> |
|
293 | 293 | </div> |
|
294 | 294 | </form> |
|
295 | 295 | </div> |
|
296 | 296 | |
|
297 | 297 | |
|
298 | 298 | |
|
299 | 299 | |
|
300 | 300 | <h2>Error messages</h2> |
|
301 | 301 | |
|
302 | 302 | <div class="bs-example"> |
|
303 | 303 | <form method='post' action=''> |
|
304 | 304 | <div class='form'> |
|
305 | 305 | <div class='fields'> |
|
306 | 306 | |
|
307 | 307 | <div class='field'> |
|
308 | 308 | <div class='label'> |
|
309 | 309 | <label for='04_example_input'>Example input label:</label> |
|
310 | 310 | </div> |
|
311 | 311 | <div class='input'> |
|
312 | 312 | <input id="04_example_input" type="text" placeholder="Example input"/> |
|
313 | 313 | <span class="error-message"> |
|
314 | 314 | If form validation fails, some input fields can show an |
|
315 | 315 | error message close to the field. |
|
316 | 316 | </span> |
|
317 | 317 | </div> |
|
318 | 318 | </div> |
|
319 | 319 | |
|
320 | 320 | </div> |
|
321 | 321 | </div> |
|
322 | 322 | </form> |
|
323 | 323 | </div> |
|
324 | 324 | |
|
325 | 325 | |
|
326 | 326 | |
|
327 | 327 | |
|
328 | 328 | <h2>Fields with buttons</h2> |
|
329 | 329 | |
|
330 | 330 | <div class="bs-example"> |
|
331 | 331 | <form method='post' action=''> |
|
332 | 332 | <div class='form'> |
|
333 | 333 | <div class='fields'> |
|
334 | 334 | |
|
335 | 335 | <div class='field'> |
|
336 | 336 | <div class='label'> |
|
337 | 337 | <label for='05_example_input'>Example input label:</label> |
|
338 | 338 | </div> |
|
339 | 339 | <div class='input'> |
|
340 | 340 | <input id="05_example_input" type="text" readonly="readonly" placeholder="Example input"> |
|
341 | 341 | <span class="btn btn-x"> |
|
342 | 342 | <i class="icon-remove-sign"></i> |
|
343 | 343 | delete |
|
344 | 344 | </span> |
|
345 | 345 | <button class='btn btn-primary'>Action</button> |
|
346 | 346 | <span class="help-block"> |
|
347 | 347 | Used if there is a list of values and the user can remove |
|
348 | 348 | single entries. |
|
349 | 349 | </span> |
|
350 | 350 | </div> |
|
351 | 351 | </div> |
|
352 | 352 | |
|
353 | 353 | |
|
354 | 354 | <div class='field'> |
|
355 | 355 | <div class='label'> |
|
356 | 356 | <label for='05_example_input'>Example input label:</label> |
|
357 | 357 | </div> |
|
358 | 358 | <div class='input'> |
|
359 | 359 | <input id="05_example_input" type="text" readonly="readonly" placeholder="Example input"> |
|
360 | 360 | <span title="Click to unlock. You must restart RhodeCode in order to make this setting take effect." |
|
361 | 361 | class="tooltip" id="path_unlock" |
|
362 | 362 | tt_title="Click to unlock. You must restart RhodeCode in order to make this setting take effect."> |
|
363 | 363 | <div class="btn btn-default"> |
|
364 | 364 | <span><i class="icon-lock" id="path_unlock_icon"></i></span> |
|
365 | 365 | </div> |
|
366 | 366 | <button class='btn btn-primary'>Action</button> |
|
367 | 367 | </span> |
|
368 | 368 | <span class="help-block"> |
|
369 | 369 | Used together with locked fields, the user has to first |
|
370 | 370 | unlock and afterwards it is possible to change the value. |
|
371 | 371 | </span> |
|
372 | 372 | </div> |
|
373 | 373 | </div> |
|
374 | 374 | |
|
375 | 375 | <div class='field'> |
|
376 | 376 | <div class='label'> |
|
377 | 377 | <label for='05_example_select'>Example input label:</label> |
|
378 | 378 | </div> |
|
379 | 379 | <div class="select"> |
|
380 | 380 | <select id="05_example_select" > |
|
381 | 381 | <option value="#">${_('Templates...')}</option> |
|
382 | 382 | <option value="ga">Google Analytics</option> |
|
383 | 383 | <option value="clicky">Clicky</option> |
|
384 | 384 | <option value="server_announce">${_('Server Announcement')}</option> |
|
385 | 385 | </select> |
|
386 | 386 | <button class='btn btn-primary'>Action</button> |
|
387 | 387 | </div> |
|
388 | 388 | </div> |
|
389 | 389 | <script> |
|
390 | 390 | $(document).ready(function() { |
|
391 | 391 | $('#05_example_select').select2({ |
|
392 | 392 | containerCssClass: 'drop-menu', |
|
393 | 393 | dropdownCssClass: 'drop-menu-dropdown', |
|
394 | 394 | dropdownAutoWidth: true |
|
395 | 395 | }); |
|
396 | 396 | }); |
|
397 | 397 | </script> |
|
398 | 398 | |
|
399 | 399 | <div class='field'> |
|
400 | 400 | <div class='label'> |
|
401 | 401 | <label for='05_example_select2'>Example input label:</label> |
|
402 | 402 | </div> |
|
403 | 403 | <div class="select"> |
|
404 | 404 | <span>Some text</span> |
|
405 | 405 | before |
|
406 | 406 | <select id="05_example_select2" > |
|
407 | 407 | <option value="#">${_('Templates...')}</option> |
|
408 | 408 | <option value="ga">Google Analytics</option> |
|
409 | 409 | <option value="clicky">Clicky</option> |
|
410 | 410 | <option value="server_announce">${_('Server Announcement')}</option> |
|
411 | 411 | </select> |
|
412 | 412 | after |
|
413 | 413 | <button class='btn btn-primary'>Action</button> |
|
414 | 414 | Some text |
|
415 | 415 | </div> |
|
416 | 416 | </div> |
|
417 | 417 | <script> |
|
418 | 418 | $(document).ready(function() { |
|
419 | 419 | $('#05_example_select2').select2({ |
|
420 | 420 | containerCssClass: 'drop-menu', |
|
421 | 421 | dropdownCssClass: 'drop-menu-dropdown', |
|
422 | 422 | dropdownAutoWidth: true |
|
423 | 423 | }); |
|
424 | 424 | }); |
|
425 | 425 | </script> |
|
426 | 426 | |
|
427 | 427 | |
|
428 | 428 | </div> |
|
429 | 429 | </div> |
|
430 | 430 | </form> |
|
431 | 431 | </div> |
|
432 | 432 | |
|
433 | 433 | |
|
434 | 434 | |
|
435 | 435 | <h2>Definition lists together with forms</h2> |
|
436 | 436 | |
|
437 | 437 | <p>Some pages list values in a definition list. These lists align |
|
438 | 438 | properly with form elements on the same page.</p> |
|
439 | 439 | |
|
440 | 440 | <div class="bs-example"> |
|
441 | 441 | |
|
442 | 442 | <dl class="dl-horizontal"> |
|
443 | 443 | <dt>RhodeCode version:</dt> |
|
444 | 444 | <dd title="">3.0.0</dd> |
|
445 | 445 | <dt>License token:</dt> |
|
446 | 446 | <dd title=""><pre>abra-cada-bra1-rce3</pre></dd> |
|
447 | 447 | <dt>License issued to:</dt> |
|
448 | 448 | <dd title="">RhodeCode Trial (RhodeCode GmbH)</dd> |
|
449 | 449 | <dt>License issued on:</dt> |
|
450 | 450 | <dd title="">Sun, 07 Dec 2014 16:34:10</dd> |
|
451 | 451 | <dt>License expires on:</dt> |
|
452 | 452 | <dd title="">Fri, 05 Jun 2015 17:34:10</dd> |
|
453 | 453 | <dt>License type:</dt> |
|
454 | 454 | <dd title="">trial</dd> |
|
455 | 455 | <dt>License users limit:</dt> |
|
456 | 456 | <dd title="">20</dd> |
|
457 | 457 | </dl> |
|
458 | 458 | |
|
459 | 459 | <form method='post' action=''> |
|
460 | 460 | <div class='form'> |
|
461 | 461 | <div class='fields'> |
|
462 | 462 | |
|
463 | 463 | <div class='field'> |
|
464 | 464 | <div class='label'> |
|
465 | 465 | <label for='07_example_input'>Example input label:</label> |
|
466 | 466 | </div> |
|
467 | 467 | <div class='input'> |
|
468 | 468 | <input id="07_example_input" type="text" placeholder="Example input"> |
|
469 | 469 | </div> |
|
470 | 470 | </div> |
|
471 | 471 | |
|
472 | 472 | <div class="buttons"> |
|
473 | 473 | <input type="submit" value="Save" id="07_example_save" class="btn"> |
|
474 | 474 | <input type="reset" value="Reset" id="07_example_reset" class="btn"> |
|
475 | 475 | </div> |
|
476 | 476 | </div> |
|
477 | 477 | </div> |
|
478 | 478 | </form> |
|
479 | 479 | |
|
480 | 480 | </div> |
|
481 | 481 | |
|
482 | 482 | |
|
483 | 483 | |
|
484 | 484 | |
|
485 | 485 | |
|
486 | 486 | <h2>Multi select widget</h2> |
|
487 | 487 | |
|
488 | 488 | <p>This example shows two multi select widgets, one having no selects |
|
489 | 489 | currently. It is mixed up with other form elements to show the |
|
490 | 490 | magin effects.</p> |
|
491 | 491 | |
|
492 | 492 | <div class="bs-example"> |
|
493 | 493 | |
|
494 | 494 | <form method='post' action=''> |
|
495 | 495 | <div class='form'> |
|
496 | 496 | <div class='fields'> |
|
497 | 497 | |
|
498 | 498 | <div class='field'> |
|
499 | 499 | <div class='label'> |
|
500 | 500 | <label for='example_input'>Example input label:</label> |
|
501 | 501 | </div> |
|
502 | 502 | <div class='input'> |
|
503 | 503 | <input id="example_input" type="text" placeholder="Example input"> |
|
504 | 504 | </div> |
|
505 | 505 | </div> |
|
506 | 506 | |
|
507 | 507 | <div class="field"> |
|
508 | 508 | <div class="label"> |
|
509 | 509 | <label for="users_group_active">${_('Members')}:</label> |
|
510 | 510 | </div> |
|
511 | 511 | <div class="select side-by-side-selector"> |
|
512 | 512 | <div class="left-group"> |
|
513 | 513 | <label class="text" >${_('Chosen group members')}</label> |
|
514 | 514 | <select id="users_group_members" multiple size='8'> |
|
515 | 515 | <option value="#">${_('Templates...')}</option> |
|
516 | 516 | <option value="ga">Google Analytics</option> |
|
517 | 517 | <option value="clicky">Clicky</option> |
|
518 | 518 | <option value="server_announce">${_('Server Announcement')}</option> |
|
519 | 519 | <option value="#">${_('Templates...')}</option> |
|
520 | 520 | <option value="ga">Google Analytics</option> |
|
521 | 521 | <option value="clicky">Clicky</option> |
|
522 | 522 | <option value="server_announce">${_('Server Announcement')}</option> |
|
523 | 523 | </select> |
|
524 | 524 | <div class="btn" id="remove_all_elements" > |
|
525 | 525 | ${_('Remove all elements')} |
|
526 | 526 | <i class="icon-chevron-right"></i> |
|
527 | 527 | </div> |
|
528 | 528 | </div> |
|
529 | 529 | <div class="middle-group"> |
|
530 | 530 | <i id="add_element" class="icon-chevron-left"></i> |
|
531 | 531 | <br /> |
|
532 | 532 | <i id="remove_element" class="icon-chevron-right"></i> |
|
533 | 533 | </div> |
|
534 | 534 | <div class="right-group"> |
|
535 | 535 | <label class="text" >${_('Available members')}</label> |
|
536 | 536 | <select id="available_members" multiple size='8'> |
|
537 | 537 | <option value="#">${_('Templates...')}</option> |
|
538 | 538 | <option value="ga">Google Analytics</option> |
|
539 | 539 | <option value="clicky">Clicky</option> |
|
540 | 540 | <option value="server_announce">${_('Server Announcement')}</option> |
|
541 | 541 | </select> |
|
542 | 542 | <div class="btn" id="add_all_elements" > |
|
543 | 543 | <i class="icon-chevron-left"></i>${_('Add all elements')} |
|
544 | 544 | </div> |
|
545 | 545 | </div> |
|
546 | 546 | </div> |
|
547 | 547 | |
|
548 | 548 | </div> |
|
549 | 549 | |
|
550 | 550 | <div class='field'> |
|
551 | 551 | <div class='label'> |
|
552 | 552 | <label for='example_input'>Example input label:</label> |
|
553 | 553 | </div> |
|
554 | 554 | <div class='input'> |
|
555 | 555 | <input id="example_input" type="text" placeholder="Example input"> |
|
556 | 556 | </div> |
|
557 | 557 | </div> |
|
558 | 558 | |
|
559 | 559 | <div class="field"> |
|
560 | 560 | <div class="label"> |
|
561 | 561 | <label for="users_group_active2">Members with one side empty:</label> |
|
562 | 562 | </div> |
|
563 | 563 | <div class="select side-by-side-selector"> |
|
564 | 564 | <div class="left-group"> |
|
565 | 565 | <label class="text" >${_('Chosen group members')}</label> |
|
566 | 566 | <select id="users_group_members2" multiple size='8'> |
|
567 | 567 | </select> |
|
568 | 568 | <div class="btn" id="remove_all_elements2" > |
|
569 | 569 | ${_('Remove all elements')} |
|
570 | 570 | <i class="icon-chevron-right"></i> |
|
571 | 571 | </div> |
|
572 | 572 | </div> |
|
573 | 573 | <div class="middle-group"> |
|
574 | 574 | <i id="add_element2" class="icon-chevron-left"></i> |
|
575 | 575 | <br /> |
|
576 | 576 | <i id="remove_element2" class="icon-chevron-right"></i> |
|
577 | 577 | </div> |
|
578 | 578 | <div class="right-group"> |
|
579 | 579 | <label class="text" >${_('Available members')}</label> |
|
580 | 580 | <select id="available_members2" multiple size='8'> |
|
581 | 581 | <option value="#">${_('Templates...')}</option> |
|
582 | 582 | <option value="ga">Google Analytics</option> |
|
583 | 583 | <option value="clicky">Clicky</option> |
|
584 | 584 | <option value="server_announce">${_('Server Announcement')}</option> |
|
585 | 585 | </select> |
|
586 | 586 | <div class="btn" id="add_all_elements2" > |
|
587 | 587 | <i class="icon-chevron-left"></i>${_('Add all elements')} |
|
588 | 588 | </div> |
|
589 | 589 | </div> |
|
590 | 590 | </div> |
|
591 | 591 | |
|
592 | 592 | </div> |
|
593 | 593 | |
|
594 | 594 | <div class='field'> |
|
595 | 595 | <div class='label'> |
|
596 | 596 | <label for='example_input'>Example input label:</label> |
|
597 | 597 | </div> |
|
598 | 598 | <div class='input'> |
|
599 | 599 | <input id="example_input" type="text" placeholder="Example input"> |
|
600 | 600 | </div> |
|
601 | 601 | </div> |
|
602 | 602 | |
|
603 | 603 | <div class="buttons"> |
|
604 | 604 | <input type="submit" value="Save" id="07_example_save" class="btn"> |
|
605 | 605 | <input type="reset" value="Reset" id="07_example_reset" class="btn"> |
|
606 | 606 | </div> |
|
607 | 607 | </div> |
|
608 | 608 | </div> |
|
609 | 609 | </form> |
|
610 | 610 | |
|
611 | 611 | </div> |
|
612 | 612 | |
|
613 | 613 | |
|
614 | 614 | |
|
615 | 615 | |
|
616 | 616 | </div> |
|
617 | 617 | </div> <!-- .main-content --> |
|
618 | 618 | </div> <!-- .box --> |
|
619 | 619 | </%def> |
@@ -1,174 +1,174 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | ${self.sidebar()} |
|
19 | 19 | |
|
20 | 20 | <div class="main-content"> |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | <h2>Inline form elements</h2> |
|
24 | 24 | |
|
25 | 25 | <p>A few places have a button close to an input element or similar.</p> |
|
26 | 26 | |
|
27 | 27 | |
|
28 | 28 | <h3>Submit button after select element</h3> |
|
29 | 29 | |
|
30 | 30 | <div class="bs-example"> |
|
31 | 31 | |
|
32 | 32 | ## TODO: johbo: not sure if we should add a class like .form-inline |
|
33 | 33 | ## here. Seems to work good enough right now. |
|
34 | 34 | <form method="post" action=""> |
|
35 | 35 | <div class="form"> |
|
36 | 36 | <div class="fields"> |
|
37 | 37 | <select id="example_select" > |
|
38 | 38 | <option value="#">${_('Templates...')}</option> |
|
39 | 39 | <option value="ga">Google Analytics</option> |
|
40 | 40 | <option value="clicky">Clicky</option> |
|
41 | 41 | <option value="server_announce">${_('Server Announcement')}</option> |
|
42 | 42 | </select> |
|
43 | 43 | <input type="submit" value="Set" id="example_save" class="btn"> |
|
44 | 44 | </div> |
|
45 | 45 | |
|
46 | 46 | <script> |
|
47 | 47 | $(document).ready(function() { |
|
48 | 48 | $('#example_select').select2({ |
|
49 | 49 | containerCssClass: 'drop-menu', |
|
50 | 50 | dropdownCssClass: 'drop-menu-dropdown', |
|
51 | 51 | dropdownAutoWidth: true, |
|
52 | 52 | minimumResultsForSearch: -1 |
|
53 | 53 | }); |
|
54 | 54 | }); |
|
55 | 55 | </script> |
|
56 | 56 | |
|
57 | 57 | </div> |
|
58 | 58 | </form> |
|
59 | 59 | |
|
60 | 60 | </div> |
|
61 | 61 | |
|
62 | 62 | |
|
63 | 63 | |
|
64 | 64 | <h3>Submit button after input element</h3> |
|
65 | 65 | |
|
66 | 66 | <div class="bs-example"> |
|
67 | 67 | |
|
68 | 68 | ## TODO: johbo: not sure if we should add a class like .form-inline |
|
69 | 69 | ## here. Seems to work good enough right now. |
|
70 | 70 | <form method="post" action=""> |
|
71 | 71 | <div class="form"> |
|
72 | 72 | |
|
73 | 73 | <div class="fields"> |
|
74 | 74 | <input type="text" id="example_input" placeholder="Placeholder..."> |
|
75 | 75 | <input type="submit" value="Set" id="example_save" class="btn"> |
|
76 | 76 | </div> |
|
77 | 77 | |
|
78 | 78 | </div> |
|
79 | 79 | </form> |
|
80 | 80 | |
|
81 | 81 | </div> |
|
82 | 82 | |
|
83 | 83 | |
|
84 | 84 | |
|
85 | 85 | <h3>Submit and Reset button after input element</h3> |
|
86 | 86 | |
|
87 | 87 | <div class="bs-example"> |
|
88 | 88 | |
|
89 | 89 | ## TODO: johbo: not sure if we should add a class like .form-inline |
|
90 | 90 | ## here. Seems to work good enough right now. |
|
91 | 91 | <form method="post" action=""> |
|
92 | 92 | <div class="form"> |
|
93 | 93 | |
|
94 | 94 | <div class="fields"> |
|
95 | 95 | <input type="text" id="example_input" placeholder="Placeholder..."> |
|
96 | 96 | <input type="submit" value="Set" id="example_save" class="btn"> |
|
97 | 97 | <input type="reset" value="Reset" id="example_reset" class="btn"> |
|
98 | 98 | </div> |
|
99 | 99 | |
|
100 | 100 | </div> |
|
101 | 101 | </form> |
|
102 | 102 | |
|
103 | 103 | </div> |
|
104 | 104 | |
|
105 | 105 | |
|
106 | 106 | |
|
107 | 107 | <h3>Checkbox wrapped in the label itself</h3> |
|
108 | 108 | |
|
109 | 109 | <div class="bs-example"> |
|
110 | 110 | |
|
111 | 111 | <div class="field"> |
|
112 | 112 | <label><input id="example_label_checkbox" type="checkbox">Checkbox with label around it</label> |
|
113 | 113 | </div> |
|
114 | 114 | |
|
115 | 115 | <div class="field"> |
|
116 | 116 | <label><input id="example_label_checkbox" type="radio">Radio with label around it</label> |
|
117 | 117 | </div> |
|
118 | 118 | |
|
119 | 119 | </div> |
|
120 | 120 | |
|
121 | 121 | |
|
122 | 122 | <h3>Checkbox wrapped in the label itself</h3> |
|
123 | 123 | |
|
124 | 124 | <div class="bs-example"> |
|
125 | 125 | |
|
126 | 126 | <div class="form"> |
|
127 | 127 | <div class="fields"> |
|
128 | 128 | <label>Label</label> <input type="text"> |
|
129 | 129 | </div> |
|
130 | 130 | </div> |
|
131 | 131 | </div> |
|
132 | 132 | |
|
133 | 133 | |
|
134 | 134 | <div class="bs-example"> |
|
135 | 135 | <div class="form"> |
|
136 | 136 | <div class="fields"> |
|
137 | 137 | <label>Label</label> |
|
138 | 138 | <select id="02_example_select1" > |
|
139 | 139 | <option value="#">${_('Templates...')}</option> |
|
140 | 140 | <option value="ga">Google Analytics</option> |
|
141 | 141 | <option value="clicky">Clicky</option> |
|
142 | 142 | <option value="server_announce">${_('Server Announcement')}</option> |
|
143 | 143 | </select> |
|
144 | 144 | |
|
145 | 145 | <label>Label</label> |
|
146 | 146 | <select id="02_example_select2" > |
|
147 | 147 | <option value="#">${_('Templates...')}</option> |
|
148 | 148 | <option value="ga">Google Analytics</option> |
|
149 | 149 | <option value="clicky">Clicky</option> |
|
150 | 150 | <option value="server_announce">${_('Server Announcement')}</option> |
|
151 | 151 | </select> |
|
152 | 152 | </div> |
|
153 | 153 | </div> |
|
154 | 154 | |
|
155 | 155 | <script> |
|
156 | 156 | $(document).ready(function() { |
|
157 | 157 | $('#02_example_select1').select2({ |
|
158 | 158 | containerCssClass: 'drop-menu', |
|
159 | 159 | dropdownCssClass: 'drop-menu-dropdown', |
|
160 | 160 | dropdownAutoWidth: true, |
|
161 | 161 | minimumResultsForSearch: -1 |
|
162 | 162 | }); |
|
163 | 163 | $('#02_example_select2').select2({ |
|
164 | 164 | containerCssClass: 'drop-menu', |
|
165 | 165 | dropdownCssClass: 'drop-menu-dropdown', |
|
166 | 166 | dropdownAutoWidth: true, |
|
167 | 167 | minimumResultsForSearch: -1 |
|
168 | 168 | }); |
|
169 | 169 | }); |
|
170 | 170 | </script> |
|
171 | 171 | </div> |
|
172 | 172 | </div> |
|
173 | 173 | </div> |
|
174 | 174 | </%def> |
@@ -1,144 +1,144 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | ##main |
|
18 | 18 | <div class='sidebar-col-wrapper'> |
|
19 | 19 | ${self.sidebar()} |
|
20 | 20 | |
|
21 | 21 | <div class="main-content"> |
|
22 | 22 | |
|
23 | 23 | <h2>Vertical forms</h2> |
|
24 | 24 | |
|
25 | 25 | <p>Adding the class <code>.form-vertical</code> will align the form |
|
26 | 26 | elements differently. Otherwise it is the same structure of HTML |
|
27 | 27 | elements.</p> |
|
28 | 28 | |
|
29 | 29 | <h2>Simple form elements</h2> |
|
30 | 30 | |
|
31 | 31 | <div class="bs-example"> |
|
32 | 32 | <form method='post' action='none'> |
|
33 | 33 | <div class='form form-vertical'> |
|
34 | 34 | <div class='fields'> |
|
35 | 35 | |
|
36 | 36 | <div class='field'> |
|
37 | 37 | <div class='label'> |
|
38 | 38 | <label for='example_input'>Example input label:</label> |
|
39 | 39 | </div> |
|
40 | 40 | <div class='input'> |
|
41 | 41 | <input id="example_input" type="text" placeholder="Example input"> |
|
42 | 42 | </div> |
|
43 | 43 | </div> |
|
44 | 44 | |
|
45 | 45 | <div class='field'> |
|
46 | 46 | <div class='label'> |
|
47 | 47 | <label for='example_input_ro'>Example input readonly:</label> |
|
48 | 48 | </div> |
|
49 | 49 | <div class='input'> |
|
50 | 50 | <input id="example_input_ro" type="text" readonly="readonly" placeholder="Example input"> |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | |
|
54 | 54 | <div class='field'> |
|
55 | 55 | <div class='label'> |
|
56 | 56 | <label for='example_select'>Example select input:</label> |
|
57 | 57 | </div> |
|
58 | 58 | <div class="select"> |
|
59 | 59 | <select id="example_select" > |
|
60 | 60 | <option value="#">${_('Templates...')}</option> |
|
61 | 61 | <option value="ga">Google Analytics</option> |
|
62 | 62 | <option value="clicky">Clicky</option> |
|
63 | 63 | <option value="server_announce">${_('Server Announcement')}</option> |
|
64 | 64 | </select> |
|
65 | 65 | </div> |
|
66 | 66 | </div> |
|
67 | 67 | <script> |
|
68 | 68 | $(document).ready(function() { |
|
69 | 69 | $('#example_select').select2({ |
|
70 | 70 | containerCssClass: 'drop-menu', |
|
71 | 71 | dropdownCssClass: 'drop-menu-dropdown', |
|
72 | 72 | dropdownAutoWidth: true, |
|
73 | 73 | minimumResultsForSearch: -1 |
|
74 | 74 | }); |
|
75 | 75 | }); |
|
76 | 76 | </script> |
|
77 | 77 | |
|
78 | 78 | <div class='field'> |
|
79 | 79 | <div class='label'> |
|
80 | 80 | <label for='example_checkbox'>Example checkbox:</label> |
|
81 | 81 | </div> |
|
82 | 82 | <div class="checkboxes"> |
|
83 | 83 | <div class="checkbox"> |
|
84 | 84 | <input id="example_checkbox" type="checkbox"> |
|
85 | 85 | <label for="example_checkbox">Label of the checkbox</label> |
|
86 | 86 | </div> |
|
87 | 87 | </div> |
|
88 | 88 | </div> |
|
89 | 89 | |
|
90 | 90 | <div class='field'> |
|
91 | 91 | <div class='label'> |
|
92 | 92 | <label for='example_checkboxes'>Example multiple checkboxes:</label> |
|
93 | 93 | </div> |
|
94 | 94 | <div class="checkboxes"> |
|
95 | 95 | <div class="checkbox"> |
|
96 | 96 | <input id="example_checkboxes_01" type="checkbox"> |
|
97 | 97 | <label for="example_checkboxes_01">Label of the first checkbox</label> |
|
98 | 98 | </div> |
|
99 | 99 | <div class="checkbox"> |
|
100 | 100 | <input id="example_checkboxes_02" type="checkbox"> |
|
101 | 101 | <label for="example_checkboxes_02">Label of the first checkbox</label> |
|
102 | 102 | </div> |
|
103 | 103 | <div class="checkbox"> |
|
104 | 104 | <input id="example_checkboxes_03" type="checkbox"> |
|
105 | 105 | <label for="example_checkboxes_03">Label of the first checkbox</label> |
|
106 | 106 | </div> |
|
107 | 107 | </div> |
|
108 | 108 | </div> |
|
109 | 109 | |
|
110 | 110 | |
|
111 | 111 | <div class='field'> |
|
112 | 112 | <div class='label'> |
|
113 | 113 | <label for='example_checkboxes'>Example multiple checkboxes:</label> |
|
114 | 114 | </div> |
|
115 | 115 | ## TODO: johbo: This is off compared to the checkboxes |
|
116 | 116 | <div class="radios"> |
|
117 | 117 | <label><input type="radio" checked="checked" value="hg.create.repository" name="default_repo_create" id="default_repo_create_hgcreaterepository">Enabled</label> |
|
118 | 118 | <label><input type="radio" value="hg.create.none" name="default_repo_create" id="default_repo_create_hgcreatenone">Disabled</label> |
|
119 | 119 | <span class="help-block"> |
|
120 | 120 | Permission to allow repository creation. This includes ability |
|
121 | 121 | to create repositories in root level. If this option is |
|
122 | 122 | disabled admin of repository group can still create |
|
123 | 123 | repositories inside that repository group. |
|
124 | 124 | </span> |
|
125 | 125 | </div> |
|
126 | 126 | </div> |
|
127 | 127 | |
|
128 | 128 | <div class="buttons"> |
|
129 | 129 | <input type="submit" value="Save" id="example_save" class="btn"> |
|
130 | 130 | <input type="reset" value="Reset" id="example_reset" class="btn"> |
|
131 | 131 | </div> |
|
132 | 132 | |
|
133 | 133 | </div> |
|
134 | 134 | </div> |
|
135 | 135 | </form> |
|
136 | 136 | |
|
137 | 137 | </div> |
|
138 | 138 | |
|
139 | 139 | |
|
140 | 140 | |
|
141 | 141 | </div> |
|
142 | 142 | </div> |
|
143 | 143 | </div> |
|
144 | 144 | </%def> |
@@ -1,279 +1,279 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | ${self.sidebar()} |
|
19 | 19 | |
|
20 | 20 | <div class="main-content"> |
|
21 | 21 | |
|
22 | 22 | <h2>Simple form elements</h2> |
|
23 | 23 | <p>When working with forms, please upgrade to this new form layout. See the depreciated forms pages for the previous layout.</p> |
|
24 | 24 | <p>These forms are marked by the class <code>rcform</code>. See html for details on formatting. |
|
25 | 25 | </p> |
|
26 | 26 | <p>Some other notes: The customized checkboxes and radio buttons use the label for styling. This has been disabled for lower versions of IE using the <code>:not()</code> selector. Select2 dropdowns need to be redone, but this may be in a later iteration. |
|
27 | 27 | </p> |
|
28 | 28 | |
|
29 | 29 | <h2>Examples</h2> |
|
30 | 30 | |
|
31 | 31 | <form method='post' action='none' class="rcform"> |
|
32 | 32 | |
|
33 | 33 | <fieldset> |
|
34 | 34 | <legend>Dropdown:</legend> |
|
35 | 35 | <div class="fields"> |
|
36 | 36 | <select id="example_select" > |
|
37 | 37 | <option value="#">${_('Templates...')}</option> |
|
38 | 38 | <option value="ga">Google Analytics</option> |
|
39 | 39 | <option value="clicky">Clicky</option> |
|
40 | 40 | <option value="server_announce">${_('Server Announcement')}</ option> |
|
41 | 41 | </select> |
|
42 | 42 | <script> |
|
43 | 43 | $(document).ready(function() { |
|
44 | 44 | $('#example_select').select2({ |
|
45 | 45 | containerCssClass: 'drop-menu', |
|
46 | 46 | dropdownCssClass: 'drop-menu-dropdown', |
|
47 | 47 | dropdownAutoWidth: true, |
|
48 | 48 | minimumResultsForSearch: -1 |
|
49 | 49 | }); |
|
50 | 50 | }); |
|
51 | 51 | </script> |
|
52 | 52 | </fields> |
|
53 | 53 | </fieldset> |
|
54 | 54 | |
|
55 | 55 | <fieldset> |
|
56 | 56 | <legend>Multiple Dropdowns in a list:</legend> |
|
57 | 57 | <ul class="fields formlist"> |
|
58 | 58 | <li> |
|
59 | 59 | <select id="example_select3" > |
|
60 | 60 | <option value="#">${_('Templates...')}</option> |
|
61 | 61 | <option value="ga">Google Analytics</option> |
|
62 | 62 | <option value="clicky">Clicky</option> |
|
63 | 63 | <option value="server_announce">${_('Server Announcement')} </ option> |
|
64 | 64 | </select> |
|
65 | 65 | <script> |
|
66 | 66 | $(document).ready(function() { |
|
67 | 67 | $('#example_select3').select2({ |
|
68 | 68 | containerCssClass: 'drop-menu', |
|
69 | 69 | dropdownCssClass: 'drop-menu-dropdown', |
|
70 | 70 | dropdownAutoWidth: true, |
|
71 | 71 | minimumResultsForSearch: -1 |
|
72 | 72 | }); |
|
73 | 73 | }); |
|
74 | 74 | </script> |
|
75 | 75 | </li> |
|
76 | 76 | <li> |
|
77 | 77 | <select id="example_select4" > |
|
78 | 78 | <option value="#">${_('Templates...')}</option> |
|
79 | 79 | <option value="ga">Google Analytics</option> |
|
80 | 80 | <option value="clicky">Clicky</option> |
|
81 | 81 | <option value="server_announce">${_('Server Announcement')} </ option> |
|
82 | 82 | </select> |
|
83 | 83 | <script> |
|
84 | 84 | $(document).ready(function() { |
|
85 | 85 | $('#example_select4').select2({ |
|
86 | 86 | containerCssClass: 'drop-menu', |
|
87 | 87 | dropdownCssClass: 'drop-menu-dropdown', |
|
88 | 88 | dropdownAutoWidth: true, |
|
89 | 89 | minimumResultsForSearch: -1 |
|
90 | 90 | }); |
|
91 | 91 | }); |
|
92 | 92 | </script> |
|
93 | 93 | </li> |
|
94 | 94 | <li> |
|
95 | 95 | <select id="example_select5" > |
|
96 | 96 | <option value="#">${_('Templates...')}</option> |
|
97 | 97 | <option value="ga">Google Analytics</option> |
|
98 | 98 | <option value="clicky">Clicky</option> |
|
99 | 99 | <option value="server_announce">${_('Server Announcement')} </ option> |
|
100 | 100 | </select> |
|
101 | 101 | <script> |
|
102 | 102 | $(document).ready(function() { |
|
103 | 103 | $('#example_select5').select2({ |
|
104 | 104 | containerCssClass: 'drop-menu', |
|
105 | 105 | dropdownCssClass: 'drop-menu-dropdown', |
|
106 | 106 | dropdownAutoWidth: true, |
|
107 | 107 | minimumResultsForSearch: -1 |
|
108 | 108 | }); |
|
109 | 109 | }); |
|
110 | 110 | </script> |
|
111 | 111 | </li> |
|
112 | 112 | </ul> |
|
113 | 113 | </fieldset> |
|
114 | 114 | |
|
115 | 115 | <fieldset> |
|
116 | 116 | <legend>Dropdown with checkbox:</legend> |
|
117 | 117 | <div class="fields"> |
|
118 | 118 | <select id="example_select2" > |
|
119 | 119 | <option value="#">${_('Some text...')}</option> |
|
120 | 120 | <option value="ga">A really long thing</option> |
|
121 | 121 | <option value="clicky">Repo Name</option> |
|
122 | 122 | <option value="server_announce">${_('Variable Item')}</option> |
|
123 | 123 | </select> |
|
124 | 124 | <input type="checkbox" name="size" id="size_1" value="small"/> |
|
125 | 125 | <label for="size_1">Checkbox for something</label>\ |
|
126 | 126 | <span class="label">Checkbox for something</span> |
|
127 | 127 | <span class="help-block"> |
|
128 | 128 | Note: There is a very specific selector which centers the checkbox on the dropdown; |
|
129 | 129 | it requires that the script NOT be between the two. |
|
130 | 130 | </span> |
|
131 | 131 | </div> |
|
132 | 132 | <script> |
|
133 | 133 | $(document).ready(function() { |
|
134 | 134 | $('#example_select2').select2({ |
|
135 | 135 | containerCssClass: 'drop-menu', |
|
136 | 136 | dropdownCssClass: 'drop-menu-dropdown', |
|
137 | 137 | dropdownAutoWidth: true, |
|
138 | 138 | minimumResultsForSearch: -1 |
|
139 | 139 | }); |
|
140 | 140 | }); |
|
141 | 141 | </script> |
|
142 | 142 | </fieldset> |
|
143 | 143 | |
|
144 | 144 | <fieldset> |
|
145 | 145 | <legend>Radio Buttons:</legend> |
|
146 | 146 | <div class="fields"> |
|
147 | 147 | <input type="radio" name="size" id="size_2" value="small"/> |
|
148 | 148 | <label for="size_2">Radio one</label> |
|
149 | 149 | <span class="label">Radio Button One</span> |
|
150 | 150 | <input type="radio" name="size" id="size_3" value="small"/> |
|
151 | 151 | <label for="size_3">Radio two</label> |
|
152 | 152 | <span class="label">Radio Button Two</span> |
|
153 | 153 | <input type="radio" checked name="size" id="size_4" value="small"/> |
|
154 | 154 | <label for="size_4">Radio three</label> |
|
155 | 155 | <span class="label">Radio Button Three</span> |
|
156 | 156 | </div> |
|
157 | 157 | </fieldset> |
|
158 | 158 | |
|
159 | 159 | <fieldset> |
|
160 | 160 | <legend>Checkboxes with help text:</legend> |
|
161 | 161 | <div class="fields"> |
|
162 | 162 | <input type="checkbox" name="size" id="size_5" value="small"/> |
|
163 | 163 | <label for="size_5">Checkbox one</label> |
|
164 | 164 | <span class="label">Checkbox One</span> |
|
165 | 165 | <input type="checkbox" checked name="size" id="size_6" value="small"/> |
|
166 | 166 | <label for="size_6">Checkbox two</label> |
|
167 | 167 | <span class="label">Checkbox Two</span> |
|
168 | 168 | <input type="checkbox" checked name="size" id="size_7" value="small"/> |
|
169 | 169 | <label for="size_7">Checkbox three</label> |
|
170 | 170 | <span class="label">Checkbox Three</span> |
|
171 | 171 | <span class="help-block"> |
|
172 | 172 | Help text can be put wherever needed. Inside of .fields, it is confined to the width of the input sections. |
|
173 | 173 | </span> |
|
174 | 174 | </div> |
|
175 | 175 | </fieldset> |
|
176 | 176 | |
|
177 | 177 | <fieldset> |
|
178 | 178 | <legend>Checkboxes as a list:</legend> |
|
179 | 179 | <div class="fields"> |
|
180 | 180 | <ul class="formlist"> |
|
181 | 181 | <li> |
|
182 | 182 | <input type="checkbox" name="size" id="size_8" value="small "/> |
|
183 | 183 | <label for="size_8">Checkbox one</label> |
|
184 | 184 | <span class="label">Checkbox One</span> |
|
185 | 185 | </li> |
|
186 | 186 | <li> |
|
187 | 187 | <input type="checkbox" checked name="size" id="size_9" value=" small"/> |
|
188 | 188 | <label for="size_9">Checkbox two</label> |
|
189 | 189 | <span class="label">Checkbox Two</span> |
|
190 | 190 | </li> |
|
191 | 191 | <li> |
|
192 | 192 | <input type="checkbox" checked name="size" id="size_10" value=" small"/> |
|
193 | 193 | <label for="size_10">Checkbox three</label> |
|
194 | 194 | <span class="label">Checkbox Three</span> |
|
195 | 195 | </li> |
|
196 | 196 | </ul> |
|
197 | 197 | <span class="help-block"> |
|
198 | 198 | In some instances, you may wish for dropdowns, checkboxes, or radio buttons to be in a list rather than inline. This is achieved using .formlist. |
|
199 | 199 | </span> |
|
200 | 200 | </div> |
|
201 | 201 | </fieldset> |
|
202 | 202 | |
|
203 | 203 | <fieldset> |
|
204 | 204 | <legend>Text Input:</legend> |
|
205 | 205 | <div class="fields"> |
|
206 | 206 | <input id="example_input" type="text" placeholder="Example input"> |
|
207 | 207 | <input id="example_input" type="text" placeholder="Example input"> |
|
208 | 208 | </div> |
|
209 | 209 | </fieldset> |
|
210 | 210 | |
|
211 | 211 | <fieldset> |
|
212 | 212 | <legend>Textarea:</legend> |
|
213 | 213 | <div class="fields"> |
|
214 | 214 | <textarea placeholder="This is a textarea."></textarea> |
|
215 | 215 | </div> |
|
216 | 216 | </fieldset> |
|
217 | 217 | |
|
218 | 218 | <fieldset> |
|
219 | 219 | <legend>Some Inputs with a button:</legend> |
|
220 | 220 | <div class="fields"> |
|
221 | 221 | <input class="disabled" id="paths_root_path" name="paths_root_path" readonly="readonly" size="59" type="text" value="Disabled input"> |
|
222 | 222 | <span id="path_unlock" class="tooltip" title="Click to unlock. You must restart RhodeCode in order to make this setting take effect."> |
|
223 | 223 | <div class="btn btn-default"> |
|
224 | 224 | <span><i id="path_unlock_icon" class="icon-lock"></i></span> |
|
225 | 225 | </div> |
|
226 | 226 | </span> |
|
227 | 227 | <input id="paths_root_path" name="paths_root_path" size="59" type="text" placeholder="Input"> |
|
228 | 228 | <span class="btn btn-x" onclick="ajaxDeletePattern(11,'id11')"> |
|
229 | 229 | Delete |
|
230 | 230 | </span> |
|
231 | 231 | </div> |
|
232 | 232 | </fieldset> |
|
233 | 233 | |
|
234 | 234 | <fieldset class="select side-by-side-selector"> |
|
235 | 235 | <div class="left-group"> |
|
236 | 236 | <label class="text" >${_('Chosen group members')}</label> |
|
237 | 237 | <select id="users_group_members2" multiple size='8'> |
|
238 | 238 | </select> |
|
239 | 239 | <div class="btn" id="remove_all_elements2" > |
|
240 | 240 | ${_('Remove all elements')} |
|
241 | 241 | <i class="icon-chevron-right"></i> |
|
242 | 242 | </div> |
|
243 | 243 | </div> |
|
244 | 244 | <div class="middle-group"> |
|
245 | 245 | <i id="add_element2" class="icon-chevron-left"></i> |
|
246 | 246 | <br /> |
|
247 | 247 | <i id="remove_element2" class="icon-chevron-right"></i> |
|
248 | 248 | </div> |
|
249 | 249 | <div class="right-group"> |
|
250 | 250 | <label class="text" >${_('Available members')}</label> |
|
251 | 251 | <select id="available_members2" multiple size='8'> |
|
252 | 252 | <option value="#">${_('Some example text...')}</option> |
|
253 | 253 | <option value="ga">A really long thing</option> |
|
254 | 254 | <option value="clicky">Repo Name</option> |
|
255 | 255 | <option value="server_announce">${_('Variable Item')}</option> |
|
256 | 256 | </select> |
|
257 | 257 | <div class="btn" id="add_all_elements2" > |
|
258 | 258 | <i class="icon-chevron-left"></i>${_('Add all elements')} |
|
259 | 259 | </div> |
|
260 | 260 | </div> |
|
261 | 261 | </fieldset> |
|
262 | 262 | |
|
263 | 263 | <script> |
|
264 | 264 | $(document).ready(function(){ |
|
265 | 265 | MultiSelectWidget('users_group_members2','available_members', 'edit_users_group'); |
|
266 | 266 | }) |
|
267 | 267 | </script> |
|
268 | 268 | |
|
269 | 269 | <div class="buttons"> |
|
270 | 270 | <input type="submit" value="Save" id="example_save" class="btn"> |
|
271 | 271 | <input type="reset" value="Reset" id="example_reset" class="btn"> |
|
272 | 272 | </div> |
|
273 | 273 | |
|
274 | 274 | </form> |
|
275 | 275 | |
|
276 | 276 | </div> <!-- .main-content --> |
|
277 | 277 | </div> <!-- .sidebar-col-wrappe --> |
|
278 | 278 | </div> <!-- .box --> |
|
279 | 279 | </%def> |
@@ -1,102 +1,102 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | ${self.sidebar()} |
|
19 | 19 | |
|
20 | 20 | <div class="main-content"> |
|
21 | 21 | |
|
22 | 22 | <h2>Gravatars</h2> |
|
23 | 23 | |
|
24 | 24 | <p>Usernames are always centered on an avatar to the left. |
|
25 | 25 | Avatars are 16px square. |
|
26 | 26 | For user settings/login, some exceptions may use a larger avatar. |
|
27 | 27 | Use base.gravatar for a gravatar only, and base.gravatar_with_user |
|
28 | 28 | for a gravatar with a username. |
|
29 | 29 | Use the format below: |
|
30 | 30 | </p> |
|
31 | 31 | <div class="bs-example template-example"> |
|
32 | 32 | <div class="gravatar_with_user"> |
|
33 | 33 | <img class="gravatar" alt="gravatar" src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&s=16"> |
|
34 | 34 | <span title="Lolek Santos <lolek@rhodecode.com>" class="user">Lolek</span> |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="bs-example template-example"> |
|
38 | 38 | <xmp>$</xmp><xmp>{base.gravatar_with_user(c.rhodecode_user.email, 16)}</xmp> |
|
39 | 39 | </div> |
|
40 | 40 | <div class="bs-example template-example"> |
|
41 | 41 | <div class="gravatar_with_user"> |
|
42 | 42 | <img class="gravatar gravatar-large" alt="gravatar" src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&s=30"> |
|
43 | 43 | <span title="Lolek Santos <lolek@rhodecode.com>" class="user">Lolek</span> |
|
44 | 44 | </div> |
|
45 | 45 | </div> |
|
46 | 46 | <div class="bs-example template-example"> |
|
47 | 47 | <xmp>$</xmp><xmp>{base.gravatar_with_user(c.rhodecode_user.email, 30)}</xmp> |
|
48 | 48 | </div> |
|
49 | 49 | <p class="help-block">Note: Actual template variables may be different.</p> |
|
50 | 50 | |
|
51 | 51 | <h2>Icon List</h2> |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | <table id="icons-list"> |
|
55 | 55 | <tr class="row"> |
|
56 | 56 | <td title="Code: 0xe813" class="the-icons span3"><i class="icon-plus"></i> <span class="i-name">icon-plus</span> <span class="i-code">0xe813</span></td> |
|
57 | 57 | <td title="Code: 0xe814" class="the-icons span3"><i class="icon-minus"></i> <span class="i-name">icon-minus</span> <span class="i-code">0xe814</span></td> |
|
58 | 58 | <td title="Code: 0xe815" class="the-icons span3"><i class="icon-remove"></i> <span class="i-name">icon-remove</span> <span class="i-code">0xe815</span></td> |
|
59 | 59 | <td title="Code: 0xe811" class="the-icons span3"><i class="icon-fork"></i> <span class="i-name">icon-fork</span> <span class="i-code">0xe811</span></td> |
|
60 | 60 | <td title="Code: 0xe803" class="the-icons span3"><i class="icon-bookmark"></i> <span class="i-name">icon-bookmark</span> <span class="i-code">0xe803</span></td> |
|
61 | 61 | </tr> |
|
62 | 62 | <tr class="row"> |
|
63 | 63 | <td title="Code: 0xe804" class="the-icons span3"><i class="icon-branch"></i> <span class="i-name">icon-branch</span> <span class="i-code">0xe804</span></td> |
|
64 | 64 | <td title="Code: 0xe833" class="the-icons span3"><i class="icon-merge"></i> <span class="i-name">icon-merge</span> <span class="i-code">0xe833</span></td> |
|
65 | 65 | <td title="Code: 0xe805" class="the-icons span3"><i class="icon-tag"></i> <span class="i-name">icon-tag</span> <span class="i-code">0xe805</span></td> |
|
66 | 66 | <td title="Code: 0xe806" class="the-icons span3"><i class="icon-lock"></i> <span class="i-name">icon-lock</span> <span class="i-code">0xe806</span></td> |
|
67 | 67 | <td title="Code: 0xe807" class="the-icons span3"><i class="icon-unlock"></i> <span class="i-name">icon-unlock</span> <span class="i-code">0xe807</span></td> |
|
68 | 68 | </tr> |
|
69 | 69 | <tr class="row"> |
|
70 | 70 | <td title="Code: 0xe800" class="the-icons span3"><i class="icon-delete"></i> <span class="i-name">icon-delete</span> <span class="i-code">0xe800</span></td> |
|
71 | 71 | <td title="Code: 0xe800" class="the-icons span3"><i class="icon-false"></i> <span class="i-name">icon-false</span> <span class="i-code">0xe800</span></td> |
|
72 | 72 | <td title="Code: 0xe801" class="the-icons span3"><i class="icon-ok"></i> <span class="i-name">icon-ok</span> <span class="i-code">0xe801</span></td> |
|
73 | 73 | <td title="Code: 0xe801" class="the-icons span3"><i class="icon-true"></i> <span class="i-name">icon-true</span> <span class="i-code">0xe801</span></td> |
|
74 | 74 | <td title="Code: 0xe80f" class="the-icons span3"><i class="icon-group"></i> <span class="i-name">icon-group</span> <span class="i-code">0xe80f</span></td> |
|
75 | 75 | </tr> |
|
76 | 76 | <tr class="row"> |
|
77 | 77 | <td title="Code: 0xe82d" class="the-icons span3"><i class="icon-hg"></i> <span class="i-name">icon-hg</span> <span class="i-code">0xe82d</span></td> |
|
78 | 78 | <td title="Code: 0xe82a" class="the-icons span3"><i class="icon-git"></i> <span class="i-name">icon-git</span> <span class="i-code">0xe82a</span></td> |
|
79 | 79 | <td title="Code: 0xe82e" class="the-icons span3"><i class="icon-svn"></i> <span class="i-name">icon-svn</span> <span class="i-code">0xe82e</span></td> |
|
80 | 80 | <td title="Code: 0xe810" class="the-icons span3"><i class="icon-folder"></i> <span class="i-name">icon-folder</span> <span class="i-code">0xe810</span></td> |
|
81 | 81 | <td title="Code: 0xe831" class="the-icons span3"><i class="icon-rhodecode"></i> <span class="i-name">icon-rhodecode</span> <span class="i-code">0xe831</span></td> |
|
82 | 82 | </tr> |
|
83 | 83 | <tr class="row"> |
|
84 | 84 | <td title="Code: 0xe812" class="the-icons span3"><i class="icon-more"></i> <span class="i-name">icon-more</span> <span class="i-code">0xe812</span></td> |
|
85 | 85 | <td title="Code: 0xe802" class="the-icons span3"><i class="icon-comment"></i> <span class="i-name">icon-comment</span> <span class="i-code">0xe802</span></td> |
|
86 | 86 | <td title="Code: 0xe82f" class="the-icons span3"><i class="icon-comment-add"></i> <span class="i-name">icon-comment-add</span> <span class="i-code">0xe82f</span></td> |
|
87 | 87 | <td title="Code: 0xe830" class="the-icons span3"><i class="icon-comment-toggle"></i> <span class="i-name">icon-comment-toggle</span> <span class="i-code">0xe830</span></td> |
|
88 | 88 | <td title="Code: 0xe808" class="the-icons span3"><i class="icon-feed"></i> <span class="i-name">icon-feed</span> <span class="i-code">0xe808</span></td> |
|
89 | 89 | </tr> |
|
90 | 90 | <tr class="row"> |
|
91 | 91 | <td title="Code: 0xe80a" class="the-icons span3"><i class="icon-right"></i> <span class="i-name">icon-right</span> <span class="i-code">0xe80a</span></td> |
|
92 | 92 | <td title="Code: 0xe809" class="the-icons span3"><i class="icon-left"></i> <span class="i-name">icon-left</span> <span class="i-code">0xe809</span></td> |
|
93 | 93 | <td title="Code: 0xe80b" class="the-icons span3"><i class="icon-arrow_down"></i> <span class="i-name">icon-arrow_down</span> <span class="i-code">0xe80b</span></td> |
|
94 | 94 | <td title="Code: 0xe832" class="the-icons span3"><i class="icon-arrow_up"></i> <span class="i-name">icon-arrow_up</span> <span class="i-code">0xe832</span></td> |
|
95 | 95 | <td></td> |
|
96 | 96 | </tr> |
|
97 | 97 | </div> |
|
98 | 98 | </table> |
|
99 | 99 | </div> |
|
100 | 100 | </div> |
|
101 | 101 | </div> |
|
102 | 102 | </%def> No newline at end of file |
@@ -1,79 +1,79 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.mako"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Debug Style')} |
|
6 | 6 | %if c.rhodecode_name: |
|
7 | 7 | · ${h.branding(c.rhodecode_name)} |
|
8 | 8 | %endif |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | 11 | <%def name="breadcrumbs_links()"> |
|
12 | 12 | ${_('Style')} |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="menu_bar_nav()"> |
|
16 | 16 | ${self.menu_items(active='debug_style')} |
|
17 | 17 | </%def> |
|
18 | 18 | |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div id="style-page"> |
|
22 | 22 | ${self.real_main()} |
|
23 | 23 | </div> |
|
24 | 24 | </%def> |
|
25 | 25 | |
|
26 | 26 | <%def name="real_main()"> |
|
27 | 27 | <div class="box"> |
|
28 | 28 | <div class="title"> |
|
29 | 29 | ${self.breadcrumbs()} |
|
30 | 30 | </div> |
|
31 | 31 | |
|
32 | 32 | <div class='sidebar-col-wrapper'> |
|
33 | 33 | ##main |
|
34 | 34 | ${self.sidebar()} |
|
35 | 35 | |
|
36 | 36 | <div class="main-content"> |
|
37 | 37 | <h2>Examples of styled elements</h2> |
|
38 | 38 | <p>Taken based on the examples from Bootstrap, form elements based |
|
39 | 39 | on our current markup.</p> |
|
40 | 40 | <p> |
|
41 | 41 | The objective of this section is to have a comprehensive style guide which out |
|
42 | 42 | lines any and all elements used throughout the application, as a reference for |
|
43 | 43 | both existing developers and as a training tool for future hires. |
|
44 | 44 | </p> |
|
45 | 45 | </div> |
|
46 | 46 | </div> |
|
47 | 47 | </div> |
|
48 | 48 | </%def> |
|
49 | 49 | |
|
50 | 50 | |
|
51 | 51 | <%def name="sidebar()"> |
|
52 | 52 | <div class="sidebar"> |
|
53 | 53 | <ul class="nav nav-pills nav-stacked"> |
|
54 |
<li class="${'active' if c.active=='index' else ''}"><a href="${h. |
|
|
55 |
<li class="${'active' if c.active=='typography' else ''}"><a href="${h. |
|
|
56 |
<li class="${'active' if c.active=='forms' else ''}"><a href="${h. |
|
|
57 |
<li class="${'active' if c.active=='buttons' else ''}"><a href="${h. |
|
|
58 |
<li class="${'active' if c.active=='labels' else ''}"><a href="${h. |
|
|
59 |
<li class="${'active' if c.active=='alerts' else ''}"><a href="${h. |
|
|
60 |
<li class="${'active' if c.active=='tables' else ''}"><a href="${h. |
|
|
61 |
<li class="${'active' if c.active=='tables-wide' else ''}"><a href="${h. |
|
|
62 |
<li class="${'active' if c.active=='collapsable-content' else ''}"><a href="${h. |
|
|
63 |
<li class="${'active' if c.active=='icons' else ''}"><a href="${h. |
|
|
64 |
<li class="${'active' if c.active=='layout-form-sidebar' else ''}"><a href="${h. |
|
|
65 |
<li class="${'active' if c.active=='login' else ''}"><a href="${h. |
|
|
66 |
<li class="${'active' if c.active=='login2' else ''}"><a href="${h. |
|
|
67 |
<li class="${'active' if c.active=='code-block' else ''}"><a href="${h. |
|
|
54 | <li class="${'active' if c.active=='index' else ''}"><a href="${h.route_path('debug_style_home')}">${_('Index')}</a></li> | |
|
55 | <li class="${'active' if c.active=='typography' else ''}"><a href="${h.route_path('debug_style_template', t_path='typography.html')}">${_('Typography')}</a></li> | |
|
56 | <li class="${'active' if c.active=='forms' else ''}"><a href="${h.route_path('debug_style_template', t_path='forms.html')}">${_('Forms')}</a></li> | |
|
57 | <li class="${'active' if c.active=='buttons' else ''}"><a href="${h.route_path('debug_style_template', t_path='buttons.html')}">${_('Buttons')}</a></li> | |
|
58 | <li class="${'active' if c.active=='labels' else ''}"><a href="${h.route_path('debug_style_template', t_path='labels.html')}">${_('Labels')}</a></li> | |
|
59 | <li class="${'active' if c.active=='alerts' else ''}"><a href="${h.route_path('debug_style_template', t_path='alerts.html')}">${_('Alerts')}</a></li> | |
|
60 | <li class="${'active' if c.active=='tables' else ''}"><a href="${h.route_path('debug_style_template', t_path='tables.html')}">${_('Tables')}</a></li> | |
|
61 | <li class="${'active' if c.active=='tables-wide' else ''}"><a href="${h.route_path('debug_style_template', t_path='tables-wide.html')}">${_('Tables wide')}</a></li> | |
|
62 | <li class="${'active' if c.active=='collapsable-content' else ''}"><a href="${h.route_path('debug_style_template', t_path='collapsable-content.html')}">${_('Collapsable Content')}</a></li> | |
|
63 | <li class="${'active' if c.active=='icons' else ''}"><a href="${h.route_path('debug_style_template', t_path='icons.html')}">${_('Icons')}</a></li> | |
|
64 | <li class="${'active' if c.active=='layout-form-sidebar' else ''}"><a href="${h.route_path('debug_style_template', t_path='layout-form-sidebar.html')}">${_('Layout form with sidebar')}</a></li> | |
|
65 | <li class="${'active' if c.active=='login' else ''}"><a href="${h.route_path('debug_style_template', t_path='login.html')}">${_('Login')}</a></li> | |
|
66 | <li class="${'active' if c.active=='login2' else ''}"><a href="${h.route_path('debug_style_template', t_path='login2.html')}">${_('Login 2')}</a></li> | |
|
67 | <li class="${'active' if c.active=='code-block' else ''}"><a href="${h.route_path('debug_style_template', t_path='code-block.html')}">${_('Code blocks')}</a></li> | |
|
68 | 68 | |
|
69 | 69 | <li class="divider"><strong>Experimental</strong></li> |
|
70 |
<li class="${'active' if c.active=='panels' else ''}"><a href="${h. |
|
|
70 | <li class="${'active' if c.active=='panels' else ''}"><a href="${h.route_path('debug_style_template', t_path='panels.html')}">${_('Panels')}</a></li> | |
|
71 | 71 | |
|
72 | 72 | <li class="divider"><strong>Depreciated</strong></li> |
|
73 |
<li class="${'active' if c.active=='form-elements' else ''}"><a href="${h. |
|
|
74 |
<li class="${'active' if c.active=='form-elements-small' else ''}"><a href="${h. |
|
|
75 |
<li class="${'active' if c.active=='form-inline' else ''}"><a href="${h. |
|
|
76 |
<li class="${'active' if c.active=='form-vertical' else ''}"><a href="${h. |
|
|
73 | <li class="${'active' if c.active=='form-elements' else ''}"><a href="${h.route_path('debug_style_template', t_path='form-elements.html')}">${_('Form elements')}</a></li> | |
|
74 | <li class="${'active' if c.active=='form-elements-small' else ''}"><a href="${h.route_path('debug_style_template', t_path='form-elements-small.html')}">${_('Form elements small')}</a></li> | |
|
75 | <li class="${'active' if c.active=='form-inline' else ''}"><a href="${h.route_path('debug_style_template', t_path='form-inline.html')}">${_('Form inline elements')}</a></li> | |
|
76 | <li class="${'active' if c.active=='form-vertical' else ''}"><a href="${h.route_path('debug_style_template', t_path='form-vertical.html')}">${_('Form vertical')}</a></li> | |
|
77 | 77 | </ul> |
|
78 | 78 | </div> |
|
79 | 79 | </%def> No newline at end of file |
@@ -1,64 +1,64 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | |
|
19 | 19 | ${self.sidebar()} |
|
20 | 20 | |
|
21 | 21 | <div class="main-content"> |
|
22 | 22 | <h2>Labels</h2> |
|
23 | 23 | |
|
24 | 24 | <h3>Labels used for tags, branches and bookmarks</h3> |
|
25 | 25 | |
|
26 | 26 | <div class="bs-example"> |
|
27 | 27 | <ul class="metatag-list"> |
|
28 | 28 | <li> |
|
29 | 29 | <span class="tagtag tag" title="Tag tip"> |
|
30 | 30 | <a href="/fake-link"><i class="icon-tag"></i>tip</a> |
|
31 | 31 | </span> |
|
32 | 32 | </li> |
|
33 | 33 | <li> |
|
34 | 34 | <span class="branchtag tag" title="Branch default"> |
|
35 | 35 | <a href="/fake-link"><i class="icon-code-fork"></i>default</a> |
|
36 | 36 | </span> |
|
37 | 37 | </li> |
|
38 | 38 | <li> |
|
39 | 39 | <span class="bookmarktag tag" title="Bookmark example"> |
|
40 | 40 | <a href="/fake-link"><i class="icon-bookmark"></i>example</a> |
|
41 | 41 | </span> |
|
42 | 42 | </li> |
|
43 | 43 | </ul> |
|
44 | 44 | |
|
45 | 45 | </div> |
|
46 | 46 | |
|
47 | 47 | <h3>Labels used in tables</h3> |
|
48 | 48 | <div class="bs-example"> |
|
49 | 49 | <ul class="metatag-list"> |
|
50 | 50 | <li>[default] <span class="metatag" tag="default">default</span></li> |
|
51 | 51 | <li>[featured] <span class="metatag" tag="featured">featured</span></li> |
|
52 | 52 | <li>[stale] <span class="metatag" tag="stale">stale</span></li> |
|
53 | 53 | <li>[dead] <span class="metatag" tag="dead">dead</span></li> |
|
54 | 54 | <li>[lang => lang] <span class="metatag" tag="lang">lang</span></li> |
|
55 | 55 | <li>[license => License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License">License</a></span></li> |
|
56 | 56 | <li>[requires => Repo] <span class="metatag" tag="requires">requires => <a href="#">Repo</a></span></li> |
|
57 | 57 | <li>[recommends => Repo] <span class="metatag" tag="recommends">recommends => <a href="#">Repo</a></span></li> |
|
58 | 58 | <li>[see => URI] <span class="metatag" tag="see">see => <a href="#">URI</a></span></li> |
|
59 | 59 | </ul> |
|
60 | 60 | </div> |
|
61 | 61 | </div> <!-- .main-content --> |
|
62 | 62 | </div> |
|
63 | 63 | </div> <!-- .box --> |
|
64 | 64 | </%def> |
@@ -1,106 +1,106 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | ${self.sidebar()} |
|
19 | 19 | |
|
20 | 20 | <div class="main-content"> |
|
21 | 21 | |
|
22 | 22 | <h2>Headline comes as a h2 element</h2> |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | <form method='post' action='none'> |
|
26 | 26 | <div class='form'> |
|
27 | 27 | <div class='fields'> |
|
28 | 28 | |
|
29 | 29 | <div class='field'> |
|
30 | 30 | <div class='label'> |
|
31 | 31 | <label for='example_input'>Example input label:</label> |
|
32 | 32 | </div> |
|
33 | 33 | <div class='input'> |
|
34 | 34 | <input id="example_input" type="text" placeholder="Example input"> |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
|
37 | 37 | |
|
38 | 38 | <div class='field'> |
|
39 | 39 | <div class='label'> |
|
40 | 40 | <label for='example_select'>Example select input:</label> |
|
41 | 41 | </div> |
|
42 | 42 | <div class="select"> |
|
43 | 43 | <select id="example_select" > |
|
44 | 44 | <option value="#">${_('Templates...')}</option> |
|
45 | 45 | <option value="ga">Google Analytics</option> |
|
46 | 46 | <option value="clicky">Clicky</option> |
|
47 | 47 | <option value="server_announce">${_('Server Announcement')}</option> |
|
48 | 48 | </select> |
|
49 | 49 | </div> |
|
50 | 50 | </div> |
|
51 | 51 | <script> |
|
52 | 52 | $(document).ready(function() { |
|
53 | 53 | $('#example_select').select2({ |
|
54 | 54 | containerCssClass: 'drop-menu', |
|
55 | 55 | dropdownCssClass: 'drop-menu-dropdown', |
|
56 | 56 | dropdownAutoWidth: true, |
|
57 | 57 | minimumResultsForSearch: -1 |
|
58 | 58 | }); |
|
59 | 59 | }); |
|
60 | 60 | </script> |
|
61 | 61 | |
|
62 | 62 | <div class='field'> |
|
63 | 63 | <div class='label'> |
|
64 | 64 | <label for='example_checkbox'>Example checkbox:</label> |
|
65 | 65 | </div> |
|
66 | 66 | <div class="checkboxes"> |
|
67 | 67 | <div class="checkbox"> |
|
68 | 68 | <input id="example_checkbox" type="checkbox"> |
|
69 | 69 | <label for="example_checkbox">Label of the checkbox</label> |
|
70 | 70 | </div> |
|
71 | 71 | </div> |
|
72 | 72 | </div> |
|
73 | 73 | |
|
74 | 74 | <div class='field'> |
|
75 | 75 | <div class='label'> |
|
76 | 76 | <label for='example_checkboxes'>Example multiple radios:</label> |
|
77 | 77 | </div> |
|
78 | 78 | ## TODO: johbo: This is off compared to the checkboxes |
|
79 | 79 | <div class="radios"> |
|
80 | 80 | <label><input type="radio" checked="checked" value="hg.create.repository" name="default_repo_create" id="default_repo_create_hgcreaterepository">Enabled</label> |
|
81 | 81 | <label><input type="radio" value="hg.create.none" name="default_repo_create" id="default_repo_create_hgcreatenone">Disabled</label> |
|
82 | 82 | <span class="help-block"> |
|
83 | 83 | Permission to allow repository creation. This includes ability |
|
84 | 84 | to create repositories in root level. If this option is disabled |
|
85 | 85 | admin of repository group can still create repositories |
|
86 | 86 | inside that repository group. |
|
87 | 87 | </span> |
|
88 | 88 | </div> |
|
89 | 89 | </div> |
|
90 | 90 | |
|
91 | 91 | <div class="buttons"> |
|
92 | 92 | <input type="submit" value="Save" id="example_save" class="btn"> |
|
93 | 93 | <input type="reset" value="Reset" id="example_reset" class="btn"> |
|
94 | 94 | </div> |
|
95 | 95 | |
|
96 | 96 | </div> |
|
97 | 97 | </div> |
|
98 | 98 | </form> |
|
99 | 99 | |
|
100 | 100 | |
|
101 | 101 | |
|
102 | 102 | |
|
103 | 103 | </div> |
|
104 | 104 | </div> |
|
105 | 105 | </div> |
|
106 | 106 | </%def> |
@@ -1,74 +1,74 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | |
|
5 | 5 | <%def name="breadcrumbs_links()"> |
|
6 |
${h.link_to(_('Style'), h. |
|
|
6 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
7 | 7 | » |
|
8 | 8 | ${c.active} |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | <%def name="real_main()"> |
|
13 | 13 | <div class="box"> |
|
14 | 14 | <div class="title"> |
|
15 | 15 | ${self.breadcrumbs()} |
|
16 | 16 | </div> |
|
17 | 17 | |
|
18 | 18 | ##main |
|
19 | 19 | <div class='sidebar-col-wrapper'> |
|
20 | 20 | ${self.sidebar()} |
|
21 | 21 | |
|
22 | 22 | <div class="main-content"> |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | <div class="bs-example pull-left"> |
|
26 | 26 | |
|
27 | 27 | <div id="quick_login"> |
|
28 | 28 | <h4>${_('Sign in to your account')}</h4> |
|
29 | 29 | |
|
30 | 30 | ${h.form(h.url('login_home',came_from=h.url.current()), needs_csrf_token=False)} |
|
31 | 31 | <div class="form form-vertical"> |
|
32 | 32 | <div class="fields"> |
|
33 | 33 | |
|
34 | 34 | <div class="field"> |
|
35 | 35 | <div class="label"> |
|
36 | 36 | <label for="username">${_('Username')}:</label> |
|
37 | 37 | </div> |
|
38 | 38 | <div class="input"> |
|
39 | 39 | ${h.text('username',class_='focus',tabindex=1)} |
|
40 | 40 | </div> |
|
41 | 41 | </div> |
|
42 | 42 | |
|
43 | 43 | <div class="field"> |
|
44 | 44 | <div class="label"> |
|
45 | 45 | <label for="password">${_('Password')}:</label> |
|
46 | 46 | <span class="forgot_password">${h.link_to(_('(Forgot password?)'),h.url('reset_password'))}</span> |
|
47 | 47 | </div> |
|
48 | 48 | <div class="input"> |
|
49 | 49 | ${h.password('password',class_='focus',tabindex=2)} |
|
50 | 50 | </div> |
|
51 | 51 | </div> |
|
52 | 52 | |
|
53 | 53 | <div class="buttons"> |
|
54 | 54 | <div class="register"> |
|
55 | 55 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
56 | 56 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
57 | 57 | %endif |
|
58 | 58 | </div> |
|
59 | 59 | <div class="submit"> |
|
60 | 60 | ${h.submit('sign_in',_('Sign In'),class_="btn btn-small",tabindex=3)} |
|
61 | 61 | </div> |
|
62 | 62 | </div> |
|
63 | 63 | |
|
64 | 64 | </div> |
|
65 | 65 | </div> |
|
66 | 66 | ${h.end_form()} |
|
67 | 67 | </div> |
|
68 | 68 | |
|
69 | 69 | </div> |
|
70 | 70 | </div> |
|
71 | 71 | </div> |
|
72 | 72 | </div> |
|
73 | 73 | |
|
74 | 74 | </%def> |
@@ -1,152 +1,152 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | <%def name="real_main()"> |
|
11 | 11 | <div class="box"> |
|
12 | 12 | <div class="title"> |
|
13 | 13 | ${self.breadcrumbs()} |
|
14 | 14 | </div> |
|
15 | 15 | |
|
16 | 16 | <div class='sidebar-col-wrapper'> |
|
17 | 17 | ${self.sidebar()} |
|
18 | 18 | |
|
19 | 19 | <div class="main-content"> |
|
20 | 20 | |
|
21 | 21 | <h2>Panels</h2> |
|
22 | 22 | |
|
23 | 23 | <p> |
|
24 | 24 | Panels are based on |
|
25 | 25 | <a href="http://getbootstrap.com/components/#panels"> |
|
26 | 26 | Bootstrap panels</a>, with custom styles added.</p> |
|
27 | 27 | <p> |
|
28 | 28 | Examples how to use it: |
|
29 | 29 | </p> |
|
30 | 30 | |
|
31 | 31 | <div class="panel panel-default"> |
|
32 | 32 | <div class="panel-heading"> |
|
33 | 33 | Panel title |
|
34 | 34 | </div> |
|
35 | 35 | <div class="panel-body"> |
|
36 | 36 | Panel with a plain <code>.panel-heading</code> |
|
37 | 37 | and <code>.panel-footer</code>. |
|
38 | 38 | </div> |
|
39 | 39 | <div class="panel-footer"> |
|
40 | 40 | Panel footer |
|
41 | 41 | </div> |
|
42 | 42 | </div> |
|
43 | 43 | |
|
44 | 44 | <div class="panel panel-default"> |
|
45 | 45 | <div class="panel-heading"> |
|
46 | 46 | Panel title |
|
47 | 47 | </div> |
|
48 | 48 | <div class="panel-body"> |
|
49 | 49 | Footers are optional. |
|
50 | 50 | </div> |
|
51 | 51 | </div> |
|
52 | 52 | |
|
53 | 53 | <div class="panel panel-default"> |
|
54 | 54 | <div class="panel-heading"> |
|
55 | 55 | <div class="panel-title"> |
|
56 | 56 | Panel title |
|
57 | 57 | </div> |
|
58 | 58 | </div> |
|
59 | 59 | <div class="panel-body"> |
|
60 | 60 | A <code>div.panel-title</code> |
|
61 | 61 | </div> |
|
62 | 62 | <div class="panel-footer"> |
|
63 | 63 | Panel footer |
|
64 | 64 | </div> |
|
65 | 65 | </div> |
|
66 | 66 | |
|
67 | 67 | <div class="panel panel-default"> |
|
68 | 68 | <div class="panel-heading"> |
|
69 | 69 | <h3 class="panel-title"> |
|
70 | 70 | Panel title |
|
71 | 71 | </h3> |
|
72 | 72 | </div> |
|
73 | 73 | <div class="panel-body"> |
|
74 | 74 | A <code>h3.panel-title</code> |
|
75 | 75 | </div> |
|
76 | 76 | <div class="panel-footer"> |
|
77 | 77 | Panel footer |
|
78 | 78 | </div> |
|
79 | 79 | </div> |
|
80 | 80 | |
|
81 | 81 | <div class="panel panel-default"> |
|
82 | 82 | <div class="panel-heading"> |
|
83 | 83 | Panel title |
|
84 | 84 | Panel title |
|
85 | 85 | Panel title |
|
86 | 86 | Panel title |
|
87 | 87 | Panel title |
|
88 | 88 | Panel title |
|
89 | 89 | Panel title |
|
90 | 90 | Panel title |
|
91 | 91 | Panel title |
|
92 | 92 | Panel title |
|
93 | 93 | Panel title |
|
94 | 94 | Panel title |
|
95 | 95 | Panel title |
|
96 | 96 | Panel title |
|
97 | 97 | Panel title |
|
98 | 98 | Panel title |
|
99 | 99 | Panel title |
|
100 | 100 | Panel title |
|
101 | 101 | </div> |
|
102 | 102 | <div class="panel-body"> |
|
103 | 103 | Content, title and footer can be of arbritary length. |
|
104 | 104 | Content, title and footer can be of arbritary length. |
|
105 | 105 | Content, title and footer can be of arbritary length. |
|
106 | 106 | Content, title and footer can be of arbritary length. |
|
107 | 107 | Content, title and footer can be of arbritary length. |
|
108 | 108 | Content, title and footer can be of arbritary length. |
|
109 | 109 | Content, title and footer can be of arbritary length. |
|
110 | 110 | Content, title and footer can be of arbritary length. |
|
111 | 111 | Content, title and footer can be of arbritary length. |
|
112 | 112 | </div> |
|
113 | 113 | <div class="panel-footer"> |
|
114 | 114 | Panel footer |
|
115 | 115 | Panel footer |
|
116 | 116 | Panel footer |
|
117 | 117 | Panel footer |
|
118 | 118 | Panel footer |
|
119 | 119 | Panel footer |
|
120 | 120 | Panel footer |
|
121 | 121 | Panel footer |
|
122 | 122 | Panel footer |
|
123 | 123 | Panel footer |
|
124 | 124 | Panel footer |
|
125 | 125 | Panel footer |
|
126 | 126 | Panel footer |
|
127 | 127 | Panel footer |
|
128 | 128 | Panel footer |
|
129 | 129 | Panel footer |
|
130 | 130 | </div> |
|
131 | 131 | </div> |
|
132 | 132 | <p> |
|
133 | 133 | Use the HTML format below: |
|
134 | 134 | </p> |
|
135 | 135 | <div class="bs-example template-example"> |
|
136 | 136 | <xmp><div class="panel panel-default"> |
|
137 | 137 | <div class="panel-heading"> |
|
138 | 138 | <h3 class="panel-title">Panel title</h3> |
|
139 | 139 | </div> |
|
140 | 140 | <div class="panel-body"> |
|
141 | 141 | Panel content |
|
142 | 142 | </div> |
|
143 | 143 | <div class="panel-footer"> |
|
144 | 144 | Panel footer |
|
145 | 145 | </div> |
|
146 | 146 | </div></xmp> |
|
147 | 147 | </div> |
|
148 | 148 | |
|
149 | 149 | </div> |
|
150 | 150 | </div> |
|
151 | 151 | </div> |
|
152 | 152 | </%def> |
@@ -1,130 +1,130 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | ##main |
|
18 | 18 | <div class='sidebar-col-wrapper'> |
|
19 | 19 | ${self.sidebar()} |
|
20 | 20 | |
|
21 | 21 | <div class="main-content"> |
|
22 | 22 | |
|
23 | 23 | <h2>Too wide tables handling</h2> |
|
24 | 24 | |
|
25 | 25 | |
|
26 | 26 | |
|
27 | 27 | <table class="issuetracker"> |
|
28 | 28 | <tbody><tr> |
|
29 | 29 | <th>Description</th> |
|
30 | 30 | <th>Pattern</th> |
|
31 | 31 | <th>Url</th> |
|
32 | 32 | <th>Prefix</th> |
|
33 | 33 | <th></th> |
|
34 | 34 | </tr> |
|
35 | 35 | <tr> |
|
36 | 36 | <td class="issue-tracker-example">Example</td> |
|
37 | 37 | <td class="issue-tracker-example">(?:#)(?P<issue_id>\d+)</td> |
|
38 | 38 | <td class="issue-tracker-example">https://myissueserver.com/repo/issue/issue_id</td> |
|
39 | 39 | <td class="issue-tracker-example">#</td> |
|
40 | 40 | <td class="issue-tracker-example"><a target="_blank" href="https://rhodecode.com/docs">Read more</a></td> |
|
41 | 41 | </tr> |
|
42 | 42 | <tr id="4980baa2985b361e6e91b932f4a897d5"> |
|
43 | 43 | <td class="issuetracker_desc">kjlakjlkjlkj;lkjl;kjl;kjl;kjl;kj;lkj</td> |
|
44 | 44 | <td class="issuetracker_pat">lkjhlkjhlkjhaslkdjfhalkdjsfhalksjdhf</td> |
|
45 | 45 | <td class="issuetracker_url">alsdkjhfalskjdfhalskjdhf</td> |
|
46 | 46 | <td class="issuetracker_pref">alskdjhfalksjdhfalksjdhf</td> |
|
47 | 47 | <td> |
|
48 | 48 | <div class="grid_edit"> |
|
49 | 49 | <a class="edit_issuetracker_entry" uid="4980baa2985b361e6e91b932f4a897d5" title="edit" href="#"> |
|
50 | 50 | <i class="icon-pencil"></i> |
|
51 | 51 | <input type="submit" value="edit" class="btn btn-link"> |
|
52 | 52 | </a> |
|
53 | 53 | </div> |
|
54 | 54 | |
|
55 | 55 | <div class="grid_delete"> |
|
56 | 56 | <form method="post" action="/_admin/settings/issue-tracker/delete"><div style="display:none"> |
|
57 | 57 | <input type="hidden" value="delete" name="_method"> |
|
58 | 58 | </div> |
|
59 | 59 | |
|
60 | 60 | <div style="display: none;"><input type="hidden" value="05adf5bfb9be3766186f25db19b545134c6b0077" name="csrf_token" id="csrf_token"></div> |
|
61 | 61 | <input type="hidden" value="4980baa2985b361e6e91b932f4a897d5" name="del_uid" id="del_uid"> |
|
62 | 62 | <i class="icon-remove-sign"></i> |
|
63 | 63 | <input type="submit" value="delete" onclick="return confirm('Confirm to remove this pattern: kjlakjlkjlkj;lkjl;kjl;kjl;kjl;kj;lkj');" id="remove_user_3" class="btn btn-link btn-danger"> |
|
64 | 64 | </form> |
|
65 | 65 | </div> |
|
66 | 66 | |
|
67 | 67 | </td> |
|
68 | 68 | </tr> |
|
69 | 69 | <tr id="98ac51a4ab43bb36a4feceed15ac5b21"> |
|
70 | 70 | <td class="issuetracker_desc">kajls;kdjfal;skdjflaskdjflksjdlfksjdlfksjdlfkjsldkfjslkdjflskdjflkdsjf</td> |
|
71 | 71 | <td class="issuetracker_pat">lksjdlfkjsldkfjsldkfjlskdjflskjdlfksjdlfksjdlfjslkdfjslkdjf</td> |
|
72 | 72 | <td class="issuetracker_url">lksdjflskdjflskjdf</td> |
|
73 | 73 | <td class="issuetracker_pref">sdlfkjsldkfjslkdjf</td> |
|
74 | 74 | <td> |
|
75 | 75 | <div class="grid_edit"> |
|
76 | 76 | <a class="edit_issuetracker_entry" uid="98ac51a4ab43bb36a4feceed15ac5b21" title="edit" href="#"> |
|
77 | 77 | <i class="icon-pencil"></i> |
|
78 | 78 | <input type="submit" value="edit" class="btn btn-link"> |
|
79 | 79 | </a> |
|
80 | 80 | </div> |
|
81 | 81 | |
|
82 | 82 | <div class="grid_delete"> |
|
83 | 83 | <form method="post" action="/_admin/settings/issue-tracker/delete"><div style="display:none"> |
|
84 | 84 | <input type="hidden" value="delete" name="_method"> |
|
85 | 85 | </div> |
|
86 | 86 | |
|
87 | 87 | <div style="display: none;"><input type="hidden" value="05adf5bfb9be3766186f25db19b545134c6b0077" name="csrf_token" id="csrf_token"></div> |
|
88 | 88 | <input type="hidden" value="98ac51a4ab43bb36a4feceed15ac5b21" name="del_uid" id="del_uid"> |
|
89 | 89 | <i class="icon-remove-sign"></i> |
|
90 | 90 | <input type="submit" value="delete" onclick="return confirm('Confirm to remove this pattern: kajls;kdjfal;skdjflaskdjflksjdlfksjdlfksjdlfkjsldkfjslkdjflskdjflkdsjf');" id="remove_user_3" class="btn btn-link btn-danger"> |
|
91 | 91 | </form> |
|
92 | 92 | </div> |
|
93 | 93 | |
|
94 | 94 | </td> |
|
95 | 95 | </tr> |
|
96 | 96 | <tr id="098f6bcd4621d373cade4e832627b4f6"> |
|
97 | 97 | <td class="issuetracker_desc">test</td> |
|
98 | 98 | <td class="issuetracker_pat">test</td> |
|
99 | 99 | <td class="issuetracker_url">test</td> |
|
100 | 100 | <td class="issuetracker_pref">test</td> |
|
101 | 101 | <td> |
|
102 | 102 | <div class="grid_edit"> |
|
103 | 103 | <a class="edit_issuetracker_entry" uid="098f6bcd4621d373cade4e832627b4f6" title="edit" href="#"> |
|
104 | 104 | <i class="icon-pencil"></i> |
|
105 | 105 | <input type="submit" value="edit" class="btn btn-link"> |
|
106 | 106 | </a> |
|
107 | 107 | </div> |
|
108 | 108 | |
|
109 | 109 | <div class="grid_delete"> |
|
110 | 110 | <form method="post" action="/_admin/settings/issue-tracker/delete"><div style="display:none"> |
|
111 | 111 | <input type="hidden" value="delete" name="_method"> |
|
112 | 112 | </div> |
|
113 | 113 | |
|
114 | 114 | <div style="display: none;"><input type="hidden" value="05adf5bfb9be3766186f25db19b545134c6b0077" name="csrf_token" id="csrf_token"></div> |
|
115 | 115 | <input type="hidden" value="098f6bcd4621d373cade4e832627b4f6" name="del_uid" id="del_uid"> |
|
116 | 116 | <i class="icon-remove-sign"></i> |
|
117 | 117 | <input type="submit" value="delete" onclick="return confirm('Confirm to remove this pattern: test');" id="remove_user_3" class="btn btn-link btn-danger"> |
|
118 | 118 | </form> |
|
119 | 119 | </div> |
|
120 | 120 | |
|
121 | 121 | </td> |
|
122 | 122 | </tr> |
|
123 | 123 | </tbody></table> |
|
124 | 124 | |
|
125 | 125 | |
|
126 | 126 | |
|
127 | 127 | </div> |
|
128 | 128 | </div> |
|
129 | 129 | </div> |
|
130 | 130 | </%def> |
@@ -1,545 +1,545 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | <%def name="real_main()"> |
|
12 | 12 | <div class="box"> |
|
13 | 13 | <div class="title"> |
|
14 | 14 | ${self.breadcrumbs()} |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | <div class='sidebar-col-wrapper'> |
|
18 | 18 | ##main |
|
19 | 19 | ${self.sidebar()} |
|
20 | 20 | |
|
21 | 21 | <div class="main-content"> |
|
22 | 22 | |
|
23 | 23 | <div style="opacity:.5"> |
|
24 | 24 | |
|
25 | 25 | <h2>Simple tables</h2> |
|
26 | 26 | |
|
27 | 27 | <p>These styles will be adjusted later to provide a baseline style |
|
28 | 28 | for all tables without classes added, whether part of the |
|
29 | 29 | application or not. Currently, some of the |
|
30 | 30 | application-specific styles are applied to this table.</p> |
|
31 | 31 | <p>This is a baseline style for all tables, whether part of the |
|
32 | 32 | application or not. It has no class applied for styling. Use |
|
33 | 33 | the "rctable" class as outlined before for tables which are |
|
34 | 34 | part of the RhodeCode application.</p> |
|
35 | 35 | <table> |
|
36 | 36 | <tbody> |
|
37 | 37 | <tr> |
|
38 | 38 | <th>Header A</th> |
|
39 | 39 | <th>Header B</th> |
|
40 | 40 | <th>Header C</th> |
|
41 | 41 | <th>Header D</th> |
|
42 | 42 | </tr> |
|
43 | 43 | <tr> |
|
44 | 44 | <td>Content of col A</td> |
|
45 | 45 | <td>Content of col B</td> |
|
46 | 46 | <td>Content of col C</td> |
|
47 | 47 | <td>Content of col D</td> |
|
48 | 48 | </tr> |
|
49 | 49 | <tr> |
|
50 | 50 | <td>Content of col A</td> |
|
51 | 51 | <td>Content of col B</td> |
|
52 | 52 | <td>Content of col C</td> |
|
53 | 53 | <td>Content of col D</td> |
|
54 | 54 | </tr> |
|
55 | 55 | <tr> |
|
56 | 56 | <td>Content of col A</td> |
|
57 | 57 | <td>Content of col B</td> |
|
58 | 58 | <td>Content of col C</td> |
|
59 | 59 | <td>Content of col D</td> |
|
60 | 60 | </tr> |
|
61 | 61 | <tr> |
|
62 | 62 | <td>Content of col A</td> |
|
63 | 63 | <td>Content of col B</td> |
|
64 | 64 | <td>Content of col C</td> |
|
65 | 65 | <td>Content of col D</td> |
|
66 | 66 | </tr> |
|
67 | 67 | </tbody> |
|
68 | 68 | </table> |
|
69 | 69 | </div> |
|
70 | 70 | |
|
71 | 71 | |
|
72 | 72 | |
|
73 | 73 | |
|
74 | 74 | <h2>RC application table with examples</h2> |
|
75 | 75 | |
|
76 | 76 | <p>This is a standard table which applies the rhodecode-specific styling to be used |
|
77 | 77 | throughout the application; it has <code><table class="rctable"></code>. |
|
78 | 78 | <br/> |
|
79 | 79 | By default, table data is not truncated, and wraps inside of the <code><td> |
|
80 | 80 | ;</code>. To prevent wrapping and contain data on one line, use the <code>< |
|
81 | 81 | class="truncate-wrap"></code> on the <code><td></code>, and <code>span |
|
82 | 82 | class="truncate"</code> around the specific data to be truncated. |
|
83 | 83 | </p> |
|
84 | 84 | <p> |
|
85 | 85 | Ellipsis is added via CSS. Please always add a row of headers using <code><th |
|
86 | 86 | ></code> to the top of a table. |
|
87 | 87 | </p> |
|
88 | 88 | |
|
89 | 89 | ## TODO: johbo: in case we have more tables with examples, we should |
|
90 | 90 | ## create a generic class here. |
|
91 | 91 | <table class="rctable issuetracker"> |
|
92 | 92 | <thead> |
|
93 | 93 | <tr> |
|
94 | 94 | <th>Header A</th> |
|
95 | 95 | <th>Header B</th> |
|
96 | 96 | <th>Header C</th> |
|
97 | 97 | <th>Header D</th> |
|
98 | 98 | </tr> |
|
99 | 99 | </thead> |
|
100 | 100 | <tbody> |
|
101 | 101 | <tr> |
|
102 | 102 | <td class="issue-tracker-example"> |
|
103 | 103 | Example of col A |
|
104 | 104 | </td> |
|
105 | 105 | <td class="issue-tracker-example"> |
|
106 | 106 | Example of col B |
|
107 | 107 | </td> |
|
108 | 108 | <td class="issue-tracker-example"> |
|
109 | 109 | Example of col C |
|
110 | 110 | </td> |
|
111 | 111 | <td class="issue-tracker-example"> |
|
112 | 112 | Example of col D |
|
113 | 113 | </td> |
|
114 | 114 | </tr> |
|
115 | 115 | <tr> |
|
116 | 116 | <td>Content of col A</td> |
|
117 | 117 | <td>Content of col B</td> |
|
118 | 118 | <td>Content of col C which is very long and will not be |
|
119 | 119 | truncated because sometimes people just want to write |
|
120 | 120 | really, really long commit messages which explain what |
|
121 | 121 | they did in excruciating detail and you really, really |
|
122 | 122 | want to read them.</td> |
|
123 | 123 | <td>Content of col D</td> |
|
124 | 124 | </tr> |
|
125 | 125 | <tr> |
|
126 | 126 | <td>Content of col A</td> |
|
127 | 127 | <td>Content of col B</td> |
|
128 | 128 | <td>Content of col C</td> |
|
129 | 129 | <td class="truncate-wrap"><span class="truncate">Truncated |
|
130 | 130 | content of column D truncate truncate truncatetruncate |
|
131 | 131 | truncate truncate</span></td> |
|
132 | 132 | </tr> |
|
133 | 133 | </tbody> |
|
134 | 134 | </table> |
|
135 | 135 | |
|
136 | 136 | <h2>RC application table data classes</h2> |
|
137 | 137 | |
|
138 | 138 | <p>The following tables contain documentation of all existing table data classes. |
|
139 | 139 | Please update when new classes are made. |
|
140 | 140 | </p> |
|
141 | 141 | <table class="rctable examples"> |
|
142 | 142 | <thead> |
|
143 | 143 | <tr> |
|
144 | 144 | <th>Class</th> |
|
145 | 145 | <th>Description</th> |
|
146 | 146 | <th>Example</th> |
|
147 | 147 | </tr> |
|
148 | 148 | </thead> |
|
149 | 149 | <tbody> |
|
150 | 150 | <td>td-user</td> |
|
151 | 151 | <td>Any username/gravatar combination (see also Icons style).</td> |
|
152 | 152 | <td class="td-user author"> |
|
153 | 153 | <img class="gravatar" alt="gravatar" src="https://secure.gravatar.com/avatar/0c9a7e6674b6f0b35d98dbe073e3f0ab?d=identicon&s=32" height="16" width="16"> |
|
154 | 154 | <span title="Oliver Strobel <oliver@rhodecode.com>" class="user">ostrobel (Oliver Strobel)</span> |
|
155 | 155 | </td> |
|
156 | 156 | </tr> |
|
157 | 157 | <tr> |
|
158 | 158 | <td>td-hash</td> |
|
159 | 159 | <td>Any hash; a commit, revision, etc. Use <code><pre></code> and header 'Commit'</td> |
|
160 | 160 | <td class="td-commit"> |
|
161 | 161 | <pre><a href="/anothercpythonforkkkk/files/8d6b27837c6979983b037693fe975cdbb761b500/">r93699:8d6b27837c69</a></pre> |
|
162 | 162 | </td> |
|
163 | 163 | </tr> |
|
164 | 164 | <tr> |
|
165 | 165 | <td>td-rss</td> |
|
166 | 166 | <td>RSS feed link icon</td> |
|
167 | 167 | <td class="td-rss"> |
|
168 | 168 | <a title="Subscribe to rss feed" href="/feed/rss"><i class="icon-rss-sign"></i></a> |
|
169 | 169 | </td> |
|
170 | 170 | </tr> |
|
171 | 171 | <tr> |
|
172 | 172 | <td>td-componentname</td> |
|
173 | 173 | <td>Any group, file, gist, or directory name.</td> |
|
174 | 174 | <td class="td-componentname"> |
|
175 | 175 | <a href="/cpythonfork"> |
|
176 | 176 | <span title="Mercurial repository"><i class="icon-hg"></i></span> |
|
177 | 177 | <i class="icon-unlock-alt" title="Public repository"></i> |
|
178 | 178 | rhodecode-dev-restyle-fork |
|
179 | 179 | </a> |
|
180 | 180 | </td> |
|
181 | 181 | </tr> |
|
182 | 182 | <tr> |
|
183 | 183 | <td>td-tags</td> |
|
184 | 184 | <td>Any cell containing tags, including branches and bookmarks.</td> |
|
185 | 185 | <td class="td-tags"> |
|
186 | 186 | <span class="branchtag tag" title="Branch default"> |
|
187 | 187 | <a href="/rhodecode-dev-restyle- fork/changelog?branch=default"><i class="icon-code-fork"></i>default</a> |
|
188 | 188 | </span> |
|
189 | 189 | </td> |
|
190 | 190 | </tr> |
|
191 | 191 | <tr> |
|
192 | 192 | <td>tags-truncate</td> |
|
193 | 193 | <td>Used to truncate a cell containing tags; avoid if possible.</td> |
|
194 | 194 | <td class="td-tags truncate-wrap"> |
|
195 | 195 | <div class="truncate tags-truncate"> |
|
196 | 196 | <div class="autoexpand"> |
|
197 | 197 | <span class="tagtag tag" title="Tag tip"> |
|
198 | 198 | <a href="/rhodecode-dev-restyle-fork/files/e519d5a0e71466d27257ddff921c4a13c540408e/"><i class="icon-tag"></i>tip</a> |
|
199 | 199 | </span> |
|
200 | 200 | <span class="branchtag tag" title="Branch default"> |
|
201 | 201 | <a href="/rhodecode-dev-restyle-fork/changelog?branch=default"><i class="icon-code-fork"></i>default</a> |
|
202 | 202 | </span> |
|
203 | 203 | <span class="branchtag tag" title="Branch default"> |
|
204 | 204 | <a href="/rhodecode-dev-restyle-fork/changelog?branch=default"><i class="icon-code-fork"></i>default</a> |
|
205 | 205 | </span> |
|
206 | 206 | </div> |
|
207 | 207 | </div> |
|
208 | 208 | </td> |
|
209 | 209 | </tr> |
|
210 | 210 | <tr> |
|
211 | 211 | <td>td-ip</td> |
|
212 | 212 | <td>Any ip address.</td> |
|
213 | 213 | <td class="td-ip"> |
|
214 | 214 | 172.16.115.168 |
|
215 | 215 | </td> |
|
216 | 216 | </tr> |
|
217 | 217 | <tr> |
|
218 | 218 | <td>td-type</td> |
|
219 | 219 | <td>A state or an auth type.</td> |
|
220 | 220 | <td class="td-type"> |
|
221 | 221 | rhodecode |
|
222 | 222 | </td> |
|
223 | 223 | </tr> |
|
224 | 224 | <tr> |
|
225 | 225 | <td>td-authtoken</td> |
|
226 | 226 | <td>For auth tokens. Use truncate classes for hover expand; see html.</td> |
|
227 | 227 | <td class="truncate-wrap td-authtoken"> |
|
228 | 228 | <div class="truncate autoexpand"> |
|
229 | 229 | <code>688df65b87d3ad16ae9f8fc6338a551d40f41c7a</code> |
|
230 | 230 | </div> |
|
231 | 231 | </td> |
|
232 | 232 | </tr> |
|
233 | 233 | <tr> |
|
234 | 234 | <td>td-action</td> |
|
235 | 235 | <td>Buttons which perform an action.</td> |
|
236 | 236 | <td class="td-action"> |
|
237 | 237 | <div class="grid_edit"> |
|
238 | 238 | <a href="/_admin/users/2/edit" title="edit"> |
|
239 | 239 | <i class="icon-pencil"></i>Edit</a> |
|
240 | 240 | </div> |
|
241 | 241 | <div class="grid_delete"> |
|
242 | 242 | <form action="/_admin/users/2" method="post"> |
|
243 | 243 | <i class="icon-remove-sign"></i> |
|
244 | 244 | <input class="btn btn-danger btn-link" id="remove_user_2" name="remove_" type="submit" value="delete"> |
|
245 | 245 | </form> |
|
246 | 246 | </div> |
|
247 | 247 | </td> |
|
248 | 248 | </tr> |
|
249 | 249 | <tr> |
|
250 | 250 | <td>td-radio</td> |
|
251 | 251 | <td>Radio buttons for a form. Centers element.</td> |
|
252 | 252 | <td class="td-radio"> |
|
253 | 253 | <input type="radio" checked="checked" value="" name="1" id="read"></td> |
|
254 | 254 | </tr> |
|
255 | 255 | <tr> |
|
256 | 256 | <td>td-checkbox</td> |
|
257 | 257 | <td>Checkbox for a form. Centers element.</td> |
|
258 | 258 | <td class="td-checkbox"> |
|
259 | 259 | <input type="checkbox" checked="checked" value="" name="1" id="read"></td> |
|
260 | 260 | </tr> |
|
261 | 261 | <tr> |
|
262 | 262 | <tr> |
|
263 | 263 | <td>td-buttons</td> |
|
264 | 264 | <td>Buttons.</td> |
|
265 | 265 | <td class="td-buttons"> |
|
266 | 266 | <span class="btn btn-mini btn-primary">feed access</span> |
|
267 | 267 | </td> |
|
268 | 268 | </tr> |
|
269 | 269 | <tr> |
|
270 | 270 | <td>td-compare</td> |
|
271 | 271 | <td>Radio buttons to compare commits.</td> |
|
272 | 272 | <td class=" td-compare"> |
|
273 | 273 | <input class="compare-radio-button" type="radio" name="compare_source" value="2.0"> |
|
274 | 274 | <input class="compare-radio-button" type="radio" name="compare_target" value="2.0"> |
|
275 | 275 | </td> |
|
276 | 276 | </tr> |
|
277 | 277 | <tr> |
|
278 | 278 | <td>td-comments</td> |
|
279 | 279 | <td>Comments indicator icon.</td> |
|
280 | 280 | <td> |
|
281 | 281 | <i class="icon-comment"></i> 0 |
|
282 | 282 | </td> |
|
283 | 283 | </tr> |
|
284 | 284 | <tr> |
|
285 | 285 | <td>td-status</td> |
|
286 | 286 | <td>Status indicator icon.</td> |
|
287 | 287 | <td class="td-description"> |
|
288 | 288 | <div class="flag_status under_review pull-left"></div> |
|
289 | 289 | </td> |
|
290 | 290 | </tr> |
|
291 | 291 | </tbody> |
|
292 | 292 | </table> |
|
293 | 293 | <table class="dataTable rctable examples"> |
|
294 | 294 | <tbody> |
|
295 | 295 | <tr> |
|
296 | 296 | <td>quick_repo_menu</td> |
|
297 | 297 | <td>Hidden menu generated by dataTable.</td> |
|
298 | 298 | <td class="quick_repo_menu"> |
|
299 | 299 | <i class="pointer icon-more"></i> |
|
300 | 300 | <div class="menu_items_container" style="display: none;"> |
|
301 | 301 | <ul class="menu_items"> |
|
302 | 302 | <li> |
|
303 | 303 | <a title="Summary" href="/anothercpythonforkkkk-fork"> |
|
304 | 304 | <span>Summary</span> |
|
305 | 305 | </a> |
|
306 | 306 | </li> |
|
307 | 307 | <li> |
|
308 | 308 | <a title="Changelog" href="/anothercpythonforkkkk-fork/changelog"> |
|
309 | 309 | <span>Changelog</span> |
|
310 | 310 | </a> |
|
311 | 311 | </li> |
|
312 | 312 | <li> |
|
313 | 313 | <a title="Files" href="/anothercpythonforkkkk-fork/files/tip/"> |
|
314 | 314 | <span>Files</span> |
|
315 | 315 | </a> |
|
316 | 316 | </li> |
|
317 | 317 | <li> |
|
318 | 318 | <a title="Fork" href="/anothercpythonforkkkk-fork/fork"> |
|
319 | 319 | <span>Fork</span> |
|
320 | 320 | </a> |
|
321 | 321 | </li> |
|
322 | 322 | </ul> |
|
323 | 323 | </div> |
|
324 | 324 | </td> |
|
325 | 325 | <td></td> |
|
326 | 326 | </tr> |
|
327 | 327 | </tbody> |
|
328 | 328 | </table> |
|
329 | 329 | <script>quick_repo_menu();</script> |
|
330 | 330 | <table class="rctable examples"> |
|
331 | 331 | <tbody> |
|
332 | 332 | <tr> |
|
333 | 333 | <td>td-description</td> |
|
334 | 334 | <td>Any description. They may be rather long, and using the expand_commit outlined below is recommended.</td> |
|
335 | 335 | <td class="td-description"> |
|
336 | 336 | Ultrices mattis! Enim pellentesque lacus, sit magna natoque risus turpis ut, auctor ultrices facilisis dapibus odio? Parturient! Porta egestas nascetur, quis, elementum dolor, in magna ac dis sit etiam turpis, scelerisque! Integer tristique aliquam. |
|
337 | 337 | </td> |
|
338 | 338 | </tr> |
|
339 | 339 | </tbody> |
|
340 | 340 | </table> |
|
341 | 341 | <table id="changesets" class="rctable examples end"> |
|
342 | 342 | <tbody> |
|
343 | 343 | <tr> |
|
344 | 344 | <td>expand_commit</td> |
|
345 | 345 | <td>Expands a long message; see html+js.</td> |
|
346 | 346 | <td class="expand_commit" data-commit-id="2ffc6faabc7a9c790b1b452943a3f0c047b8b436" title="Expand commit message"> |
|
347 | 347 | <div class="show_more_col"> |
|
348 | 348 | <i class="show_more"></i> |
|
349 | 349 | </div> |
|
350 | 350 | </td> |
|
351 | 351 | <td class="mid td-description"> |
|
352 | 352 | <div class="log-container truncate-wrap"> |
|
353 | 353 | <div id="c-2ffc6faabc7a9c790b1b452943a3f0c047b8b436" class="message truncate" data-message-raw="tests: Test echo method on the server object |
|
354 | 354 | |
|
355 | 355 | This only works for Pyro4 so far, have to extend it still for HTTP to work.">tests: Test echo method on the server object |
|
356 | 356 | |
|
357 | 357 | This only works for Pyro4 so far, have to extend it still for HTTP to work.</div> |
|
358 | 358 | </div> |
|
359 | 359 | </td> |
|
360 | 360 | </tr> |
|
361 | 361 | </tbody> |
|
362 | 362 | </table> |
|
363 | 363 | <script type="text/javascript"> |
|
364 | 364 | var cache = {}; |
|
365 | 365 | $('.expand_commit').on('click',function(e){ |
|
366 | 366 | var target_expand = $(this); |
|
367 | 367 | var cid = target_expand.data('commitId'); |
|
368 | 368 | |
|
369 | 369 | if (target_expand.hasClass('open')){ |
|
370 | 370 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); |
|
371 | 371 | $('#t-'+cid).css({'height': '1.5em', 'max-height': '1.5em', 'text-overflow': 'ellipsis', 'overflow':'hidden', 'white-space':'nowrap'}); |
|
372 | 372 | target_expand.removeClass('open'); |
|
373 | 373 | } |
|
374 | 374 | else { |
|
375 | 375 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'}); |
|
376 | 376 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'}); |
|
377 | 377 | target_expand.addClass('open'); |
|
378 | 378 | } |
|
379 | 379 | }); |
|
380 | 380 | |
|
381 | 381 | </script> |
|
382 | 382 | <p>The following classes currently do not have unique styles applied.</p> |
|
383 | 383 | <table class="rctable examples end"> |
|
384 | 384 | <tbody> |
|
385 | 385 | <tr> |
|
386 | 386 | <td>td-regex</td> |
|
387 | 387 | <td>Regex patterns</td> |
|
388 | 388 | <td class="td-regex">(?:#)(?P<issue_id>\d+)</td> |
|
389 | 389 | </tr> |
|
390 | 390 | <tr> |
|
391 | 391 | <td>td-url</td> |
|
392 | 392 | <td>Any URL.</td> |
|
393 | 393 | <td class="td-url">https://rhodecode.com</td> |
|
394 | 394 | </tr> |
|
395 | 395 | <tr> |
|
396 | 396 | <td>td-journalaction</td> |
|
397 | 397 | <td>Action listed in a journal</td> |
|
398 | 398 | <td class="td-journalaction">started following repository supervisor-fork-4</td> |
|
399 | 399 | </tr> |
|
400 | 400 | <tr> |
|
401 | 401 | <td>td-iprange</td> |
|
402 | 402 | <td>Any ip address.</td> |
|
403 | 403 | <td class="td-ip">127.0.0.1-127.0.0.10</td> |
|
404 | 404 | </tr> |
|
405 | 405 | <tr> |
|
406 | 406 | <td>td-exp</td> |
|
407 | 407 | <td>Expiration time.</td> |
|
408 | 408 | <td class="td-exp">never</td> |
|
409 | 409 | </tr> |
|
410 | 410 | <tr> |
|
411 | 411 | <td>td-prefix</td> |
|
412 | 412 | <td>Prefixes outlined in settings.</td> |
|
413 | 413 | <td class="td-prefix">ubuntu-92539</td> |
|
414 | 414 | </tr> |
|
415 | 415 | <tr> |
|
416 | 416 | <td>td-cachekey</td> |
|
417 | 417 | <td>Cache key value.</td> |
|
418 | 418 | <td class="td-cachekey">ubuntu-92539supervisor</td> |
|
419 | 419 | </tr> |
|
420 | 420 | <tr> |
|
421 | 421 | <td>td-email</td> |
|
422 | 422 | <td>Any email address.</td> |
|
423 | 423 | <td class="td-email">example@rhodecode.com</td> |
|
424 | 424 | </tr> |
|
425 | 425 | <tr> |
|
426 | 426 | <td>td-active</td> |
|
427 | 427 | <td>Shows active state with icon-true/icon-false.</td> |
|
428 | 428 | <td class="td-active"><i class="icon-false"></i></td> |
|
429 | 429 | </tr> |
|
430 | 430 | <tr> |
|
431 | 431 | <td>td-size</td> |
|
432 | 432 | <td>File, repo, or directory size.</td> |
|
433 | 433 | <td class="td-size">89 MB</td> |
|
434 | 434 | </tr> |
|
435 | 435 | <tr> |
|
436 | 436 | <td>td-number</td> |
|
437 | 437 | <td>Any numerical data.</td> |
|
438 | 438 | <td class="td-number">42</td> |
|
439 | 439 | </tr> |
|
440 | 440 | <tr> |
|
441 | 441 | <td>td-message</td> |
|
442 | 442 | <td>Any commit message. Often treated with the truncate class used for descriptions as well.</td> |
|
443 | 443 | <td class="td-message">Updated the files</td> |
|
444 | 444 | </tr> |
|
445 | 445 | </tbody> |
|
446 | 446 | </table> |
|
447 | 447 | |
|
448 | 448 | |
|
449 | 449 | <h2>Permissions table</h2> |
|
450 | 450 | |
|
451 | 451 | <p> |
|
452 | 452 | This is a special-case table; it has |
|
453 | 453 | <code>table class="rctable permissions"</code> |
|
454 | 454 | where "rctable" applies the rhodecode styling as above, and |
|
455 | 455 | "permissions" adds an extra layer of customization specific to |
|
456 | 456 | permissions tables. Other special-case tables may exist or be |
|
457 | 457 | created if necessary. |
|
458 | 458 | </p> |
|
459 | 459 | |
|
460 | 460 | <table class="rctable permissions"> |
|
461 | 461 | <tr> |
|
462 | 462 | <th class="td-radio">none</th> |
|
463 | 463 | <th class="td-radio">read</th> |
|
464 | 464 | <th class="td-radio">write</th> |
|
465 | 465 | <th class="td-radio">admin</th> |
|
466 | 466 | <th>user/user group</th> |
|
467 | 467 | <th></th> |
|
468 | 468 | </tr> |
|
469 | 469 | <tr class="perm_admin_row"> |
|
470 | 470 | <td class="td-radio"><input type="radio" value="repository.none" |
|
471 | 471 | name="admin_perm_2" id="admin_perm_2_repositorynone" |
|
472 | 472 | disabled="disabled"></td> |
|
473 | 473 | <td class="td-radio"><input type="radio" value="repository.read" |
|
474 | 474 | name="admin_perm_2" id="admin_perm_2_repositoryread" |
|
475 | 475 | disabled="disabled"></td> |
|
476 | 476 | <td class="td-radio"><input type="radio" value="repository.write" |
|
477 | 477 | name="admin_perm_2" id="admin_perm_2_repositorywrite" |
|
478 | 478 | disabled="disabled"></td> |
|
479 | 479 | <td class="td-radio"><input type="radio" value="repository.admin" |
|
480 | 480 | name="admin_perm_2" id="admin_perm_2_repositoryadmin" |
|
481 | 481 | disabled="disabled" checked="checked"></td> |
|
482 | 482 | <td> |
|
483 | 483 | <img class="gravatar" src="https://secure.gravatar.com/avatar/be9d18f611892a738e54f2a3a171e2f9?d=identicon&s=32" height="16" width="16"> |
|
484 | 484 | <span class="user">dev (super admin) (owner)</span> |
|
485 | 485 | </td> |
|
486 | 486 | <td></td> |
|
487 | 487 | </tr> |
|
488 | 488 | <tr> |
|
489 | 489 | <td colspan="4"> |
|
490 | 490 | <span class="private_repo_msg"> |
|
491 | 491 | private repository |
|
492 | 492 | </span> |
|
493 | 493 | </td> |
|
494 | 494 | <td class="private_repo_msg"> |
|
495 | 495 | <i class="icon-user"></i> |
|
496 | 496 | default - only people explicitly added here will have access</td> |
|
497 | 497 | <td></td> |
|
498 | 498 | </tr> |
|
499 | 499 | <tr> |
|
500 | 500 | <td class="td-radio"><input type="radio" value="repository.none" |
|
501 | 501 | name="u_perm_1" id="u_perm_1_repositorynone"></td> |
|
502 | 502 | <td class="td-radio"><input type="radio" checked="checked" |
|
503 | 503 | value="repository.read" name="u_perm_1" |
|
504 | 504 | id="u_perm_1_repositoryread"></td> |
|
505 | 505 | <td class="td-radio"><input type="radio" value="repository.write" |
|
506 | 506 | name="u_perm_1" id="u_perm_1_repositorywrite"></td> |
|
507 | 507 | <td class="td-radio"><input type="radio" value="repository.admin" |
|
508 | 508 | name="u_perm_1" id="u_perm_1_repositoryadmin"></td> |
|
509 | 509 | <td> |
|
510 | 510 | <img class="gravatar" src="/_static/rhodecode/images/user30.png" height="16" width="16"> |
|
511 | 511 | <span class="user">default</span> |
|
512 | 512 | </td> |
|
513 | 513 | <td></td> |
|
514 | 514 | </tr> |
|
515 | 515 | <tr> |
|
516 | 516 | <td class="td-radio"><input type="radio" value="repository.none" |
|
517 | 517 | name="u_perm_2" id="u_perm_2_repositorynone"></td> |
|
518 | 518 | <td class="td-radio"><input type="radio" checked="checked" |
|
519 | 519 | value="repository.read" name="u_perm_2" |
|
520 | 520 | id="u_perm_2_repositoryread"></td> |
|
521 | 521 | <td class="td-radio"><input type="radio" value="repository.write" |
|
522 | 522 | name="u_perm_2" id="u_perm_2_repositorywrite"></td> |
|
523 | 523 | <td class="td-radio"><input type="radio" value="repository.admin" |
|
524 | 524 | name="u_perm_2" id="u_perm_2_repositoryadmin"></td> |
|
525 | 525 | <td> |
|
526 | 526 | <img class="gravatar" src="https://secure.gravatar.com/avatar/be9d18f611892a738e54f2a3a171e2f9?d=identicon&s=32" height="16" width="16"> |
|
527 | 527 | <a class="user" href="/_admin/users/2/edit">dev</a> |
|
528 | 528 | </td> |
|
529 | 529 | <td> |
|
530 | 530 | <span member_type="user" member="2" |
|
531 | 531 | class="btn action_button btn-link btn-danger">revoke</span> |
|
532 | 532 | </td> |
|
533 | 533 | </tr> |
|
534 | 534 | </tbody> |
|
535 | 535 | </table> |
|
536 | 536 | <div class="link" id="add_perm"> |
|
537 | 537 | Add new |
|
538 | 538 | </div> |
|
539 | 539 | |
|
540 | 540 | |
|
541 | 541 | |
|
542 | 542 | </div> |
|
543 | 543 | </div> |
|
544 | 544 | </div> |
|
545 | 545 | </%def> |
@@ -1,507 +1,507 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/debug_style/index.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="breadcrumbs_links()"> |
|
5 |
${h.link_to(_('Style'), h. |
|
|
5 | ${h.link_to(_('Style'), h.route_path('debug_style_home'))} | |
|
6 | 6 | » |
|
7 | 7 | ${c.active} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | <%def name="real_main()"> |
|
11 | 11 | <div class="box"> |
|
12 | 12 | <div class="title"> |
|
13 | 13 | ${self.breadcrumbs()} |
|
14 | 14 | </div> |
|
15 | 15 | </div> |
|
16 | 16 | |
|
17 | 17 | ##main |
|
18 | 18 | <div class='sidebar-col-wrapper'> |
|
19 | 19 | ${self.sidebar()} |
|
20 | 20 | |
|
21 | 21 | <div class="main-content"> |
|
22 | 22 | |
|
23 | 23 | <div class="bs-docs-section"> |
|
24 | 24 | <h1 id="type" class="page-header">Typography</h1> |
|
25 | 25 | |
|
26 | 26 | <!-- Headings --> |
|
27 | 27 | <h2 id="type-headings">Headings</h2> |
|
28 | 28 | <p>All HTML headings, <code><h1></code> through <code><h6></code>, are available. <code>.h1</code> through <code>.h6</code> classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline. |
|
29 | 29 | </p> |
|
30 | 30 | <p>All headings have no top/side margins and a bottom margin which corresponds to variable <code>@textmargin</code>, a color corresponding to <code>@text-color</code>, and a line-height of 1.8em. |
|
31 | 31 | <div class="bs-example bs-example-type" data-example-id="simple-headings"> |
|
32 | 32 | <table class="table"> |
|
33 | 33 | <tbody> |
|
34 | 34 | <tr> |
|
35 | 35 | <td><h1>h1. RhodeCode heading</h1></td> |
|
36 | 36 | <td class="type-info">Bold</td> |
|
37 | 37 | <td class="type-info">1.54em</td> |
|
38 | 38 | </tr> |
|
39 | 39 | <tr> |
|
40 | 40 | <td><h2>h2. RhodeCode heading</h2></td> |
|
41 | 41 | <td class="type-info">Semi-Bold</td> |
|
42 | 42 | <td class="type-info">1.23em</td> |
|
43 | 43 | </tr> |
|
44 | 44 | <tr> |
|
45 | 45 | <td><h3>h3. RhodeCode heading</h3></td> |
|
46 | 46 | <td class="type-info">Regular</td> |
|
47 | 47 | <td class="type-info">1.23em</td> |
|
48 | 48 | </tr> |
|
49 | 49 | <tr> |
|
50 | 50 | <td><h4>h4. RhodeCode heading</h4></td> |
|
51 | 51 | <td class="type-info">Bold</td> |
|
52 | 52 | <td class="type-info">1em</td> |
|
53 | 53 | </tr> |
|
54 | 54 | <tr> |
|
55 | 55 | <td><h5>h5. RhodeCode heading</h5></td> |
|
56 | 56 | <td class="type-info">Bold Italic</td> |
|
57 | 57 | <td class="type-info">1em</td> |
|
58 | 58 | </tr> |
|
59 | 59 | <tr> |
|
60 | 60 | <td><h6>h6. RhodeCode heading</h6></td> |
|
61 | 61 | <td class="type-info">Bold Italic</td> |
|
62 | 62 | <td class="type-info">1em</td> |
|
63 | 63 | </tr> |
|
64 | 64 | </tbody> |
|
65 | 65 | </table> |
|
66 | 66 | </div> |
|
67 | 67 | <div class="highlight-html"><xmp> |
|
68 | 68 | <h1>h1. RhodeCode heading</h1> |
|
69 | 69 | <h2>h2. RhodeCode heading</h2> |
|
70 | 70 | <h3>h3. RhodeCode heading</h3> |
|
71 | 71 | <h4>h4. RhodeCode heading</h4> |
|
72 | 72 | <h5>h5. RhodeCode heading</h5> |
|
73 | 73 | <h6>h6. RhodeCode heading</h6> |
|
74 | 74 | </xmp></div> <!-- end highlight --> |
|
75 | 75 | |
|
76 | 76 | <p>Create lighter, secondary text in any heading with a generic <code><small></code> tag or the <code>.small</code> class.</p> |
|
77 | 77 | <div class="bs-example bs-example-type" data-example-id="small- headings"> |
|
78 | 78 | <table class="table"> |
|
79 | 79 | <tbody> |
|
80 | 80 | <tr> |
|
81 | 81 | <td><h1>h1. RhodeCode heading <small>Secondary text</small></h1></td> |
|
82 | 82 | </tr> |
|
83 | 83 | <tr> |
|
84 | 84 | <td><h2>h2. RhodeCode heading <small>Secondary text</small></h2></td> |
|
85 | 85 | </tr> |
|
86 | 86 | <tr> |
|
87 | 87 | <td><h3>h3. RhodeCode heading <small>Secondary text</small></h3></td> |
|
88 | 88 | </tr> |
|
89 | 89 | <tr> |
|
90 | 90 | <td><h4>h4. RhodeCode heading <small>Secondary text</small></h4></td> |
|
91 | 91 | </tr> |
|
92 | 92 | <tr> |
|
93 | 93 | <td><h5>h5. RhodeCode heading <small>Secondary text</small></h5></td> |
|
94 | 94 | </tr> |
|
95 | 95 | <tr> |
|
96 | 96 | <td><h6>h6. RhodeCode heading <small>Secondary text</small></h6></td> |
|
97 | 97 | </tr> |
|
98 | 98 | </tbody> |
|
99 | 99 | </table> |
|
100 | 100 | </div> |
|
101 | 101 | <div class="highlight-html"><xmp> |
|
102 | 102 | <h1>h1. RhodeCode heading <small>Secondary text</small></h1> |
|
103 | 103 | <h2>h2. RhodeCode heading <small>Secondary text</small></h2> |
|
104 | 104 | <h3>h3. RhodeCode heading <small>Secondary text</small></h3> |
|
105 | 105 | <h4>h4. RhodeCode heading <small>Secondary text</small></h4> |
|
106 | 106 | <h5>h5. RhodeCode heading <small>Secondary text</small></h5> |
|
107 | 107 | <h6>h6. RhodeCode heading <small>Secondary text</small></h6> |
|
108 | 108 | </xmp></div> <!-- end highlight --> |
|
109 | 109 | |
|
110 | 110 | |
|
111 | 111 | <!-- Body copy --> |
|
112 | 112 | <h2 id="type-body-copy">Body copy</h2> |
|
113 | 113 | <p>RhodeCode's global default <code>font-size</code> is <strong>13px</strong>, with a <code>line-height</code> of <strong>2em</strong>. This is applied to the <code><body></code> and all paragraphs. In addition, <code><p></code> (paragraphs) receive a bottom margin of designated by @textmargin (20px).</p> |
|
114 | 114 | <div class="bs-example" data-example-id="body-copy"> |
|
115 | 115 | <p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.</p> |
|
116 | 116 | <p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.</p> |
|
117 | 117 | <p>Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p> |
|
118 | 118 | </div> |
|
119 | 119 | <div class="highlight-html"><xmp> |
|
120 | 120 | <p>...</p> |
|
121 | 121 | </xmp></div> <!-- end highlight --> |
|
122 | 122 | |
|
123 | 123 | <!-- Body copy .lead --> |
|
124 | 124 | <h3>Lead body copy</h3> |
|
125 | 125 | <p>Make a paragraph stand out by adding <code>.lead</code>.</p> |
|
126 | 126 | <div class="bs-example" data-example-id="lead-copy"> |
|
127 | 127 | <p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p> |
|
128 | 128 | </div> |
|
129 | 129 | <div class="highlight-html"><xmp> |
|
130 | 130 | <p class="lead">...</p> |
|
131 | 131 | </xmp></div> <!-- end highlight --> |
|
132 | 132 | |
|
133 | 133 | <!-- Using Less --> |
|
134 | 134 | <h3>Built with Less</h3> |
|
135 | 135 | <p>The typographic scale is based on Less variables in <strong>variables.less</strong>. Font sizes are calculated from <code>@basefontsize</code>, line-heights are calculated with em, and font families are handled by: |
|
136 | 136 | <ul class="list-unstyled"> |
|
137 | 137 | <li><code>@text-regular</code></li> |
|
138 | 138 | <li><code>@text-italic</code></li> |
|
139 | 139 | <li><code>@text-bold</code></li> |
|
140 | 140 | <li><code>@text-semibold</code></li> |
|
141 | 141 | <li><code>@text-bold-italic</code></li> |
|
142 | 142 | <li><code>@text-light</code></li> |
|
143 | 143 | <li><code>@text-light-italic</code></li> |
|
144 | 144 | </ul> |
|
145 | 145 | </p> |
|
146 | 146 | |
|
147 | 147 | <!-- Inline text elements --> |
|
148 | 148 | <h2 id="type-inline-text">Inline text elements</h2> |
|
149 | 149 | <h3>Marked text</h3> |
|
150 | 150 | <p>For highlighting a run of text due to its relevance in another context, use the <code><mark></code> tag.</p> |
|
151 | 151 | <div class="bs-example" data-example-id="simple-mark"> |
|
152 | 152 | <p>You can use the mark tag to <mark>highlight</mark> text.</p> |
|
153 | 153 | </div> |
|
154 | 154 | <div class="highlight-html"><xmp> |
|
155 | 155 | You can use the mark tag to <mark>highlight</mark> text. |
|
156 | 156 | </xmp></div> <!-- end highlight --> |
|
157 | 157 | |
|
158 | 158 | |
|
159 | 159 | <h3>Deleted text</h3> |
|
160 | 160 | <p>For indicating blocks of text that have been deleted use the <code><del></code> tag.</p> |
|
161 | 161 | <div class="bs-example" data-example-id="simple-del"> |
|
162 | 162 | <p><del>This line of text is meant to be treated as deleted text.</del></p> |
|
163 | 163 | </div> |
|
164 | 164 | <div class="highlight-html"><xmp> |
|
165 | 165 | <del>This line of text is meant to be treated as deleted text.</del> |
|
166 | 166 | </xmp></div> <!-- end highlight --> |
|
167 | 167 | |
|
168 | 168 | <h3>Strikethrough text</h3> |
|
169 | 169 | <p>For indicating blocks of text that are no longer relevant use the <code><s></code> tag.</p> |
|
170 | 170 | <div class="bs-example" data-example-id="simple-s"> |
|
171 | 171 | <p><s>This line of text is meant to be treated as no longer accurate.</s></p> |
|
172 | 172 | </div> |
|
173 | 173 | <div class="highlight-html"><xmp> |
|
174 | 174 | <s>This line of text is meant to be treated as no longer accurate.</s> |
|
175 | 175 | </xmp></div> <!-- end highlight --> |
|
176 | 176 | |
|
177 | 177 | <h3>Inserted text</h3> |
|
178 | 178 | <p>For indicating additions to the document use the <code><ins></code> tag.</p> |
|
179 | 179 | <div class="bs-example" data-example-id="simple-ins"> |
|
180 | 180 | <p><ins>This line of text is meant to be treated as an addition to the document.</ins></p> |
|
181 | 181 | </div> |
|
182 | 182 | <div class="highlight-html"><xmp> |
|
183 | 183 | <ins>This line of text is meant to be treated as an addition to the document.</ins> |
|
184 | 184 | </xmp></div> <!-- end highlight --> |
|
185 | 185 | |
|
186 | 186 | <h3>Underlined text</h3> |
|
187 | 187 | <p>To underline text use the <code><u></code> tag.</p> |
|
188 | 188 | <div class="bs-example" data-example-id="simple-u"> |
|
189 | 189 | <p><u>This line of text will render as underlined</u></p> |
|
190 | 190 | </div> |
|
191 | 191 | <div class="highlight-html"><xmp> |
|
192 | 192 | <u>This line of text will render as underlined</u> |
|
193 | 193 | </xmp></div> <!-- end highlight --> |
|
194 | 194 | |
|
195 | 195 | <p>Make use of HTML's default emphasis tags with lightweight styles.</p> |
|
196 | 196 | |
|
197 | 197 | <h3>Small text</h3> |
|
198 | 198 | <p>For de-emphasizing inline or blocks of text, use the <code><small></code> tag to set text at 85% the size of the parent. Heading elements receive their own <code>font-size</code> for nested <code><small></code> elements.</p> |
|
199 | 199 | <p>You may alternatively use an inline element with <code>.small</code> in place of any <code><small></code>.</p> |
|
200 | 200 | <div class="bs-example" data-example-id="simple-small"> |
|
201 | 201 | <p><small>This line of text is meant to be treated as fine print.</small></p> |
|
202 | 202 | </div> |
|
203 | 203 | <div class="highlight-html"><xmp> |
|
204 | 204 | <small>This line of text is meant to be treated as fine print.</small> |
|
205 | 205 | </xmp></div> <!-- end highlight --> |
|
206 | 206 | |
|
207 | 207 | |
|
208 | 208 | <h3>Bold</h3> |
|
209 | 209 | <p>For emphasizing a snippet of text with a heavier font-weight.</p> |
|
210 | 210 | <div class="bs-example" data-example-id="simple-strong"> |
|
211 | 211 | <p>The following snippet of text is <strong>rendered as bold text</strong>.</p> |
|
212 | 212 | </div> |
|
213 | 213 | <div class="highlight-html"><xmp> |
|
214 | 214 | <strong>rendered as bold text</strong> |
|
215 | 215 | </xmp></div> <!-- end highlight --> |
|
216 | 216 | |
|
217 | 217 | <h3>Italics</h3> |
|
218 | 218 | <p>For emphasizing a snippet of text with italics.</p> |
|
219 | 219 | <div class="bs-example" data-example-id="simple-em"> |
|
220 | 220 | <p>The following snippet of text is <em>rendered as italicized text</em>.</p> |
|
221 | 221 | </div> |
|
222 | 222 | <div class="highlight-html"><xmp> |
|
223 | 223 | <em>rendered as italicized text</em> |
|
224 | 224 | </xmp></div> <!-- end highlight --> |
|
225 | 225 | |
|
226 | 226 | <div class="bs-callout bs-callout-info" id="callout-type-b-i-elems"> |
|
227 | 227 | <h4>Alternate elements</h4> |
|
228 | 228 | <p>Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p> |
|
229 | 229 | </div> |
|
230 | 230 | |
|
231 | 231 | <h2 id="type-alignment">Alignment classes</h2> |
|
232 | 232 | <p>Easily realign text to components with text alignment classes.</p> |
|
233 | 233 | <div class="bs-example" data-example-id="text-alignment"> |
|
234 | 234 | <p class="text-left">Left aligned text.</p> |
|
235 | 235 | <p class="text-center">Center aligned text.</p> |
|
236 | 236 | <p class="text-right">Right aligned text.</p> |
|
237 | 237 | <p class="text-justify">Justified text.</p> |
|
238 | 238 | <p class="text-nowrap">No wrap text.</p> |
|
239 | 239 | </div> |
|
240 | 240 | <div class="highlight-html"><xmp> |
|
241 | 241 | <p class="text-left">Left aligned text.</p> |
|
242 | 242 | <p class="text-center">Center aligned text.</p> |
|
243 | 243 | <p class="text-right">Right aligned text.</p> |
|
244 | 244 | <p class="text-justify">Justified text.</p> |
|
245 | 245 | <p class="text-nowrap">No wrap text.</p> |
|
246 | 246 | </xmp></div> <!-- end highlight --> |
|
247 | 247 | |
|
248 | 248 | <h2 id="type-transformation">Transformation classes</h2> |
|
249 | 249 | <p>Transform text in components with text capitalization classes.</p> |
|
250 | 250 | <div class="bs-example" data-example-id="text-capitalization"> |
|
251 | 251 | <p class="text-lowercase">Lowercased text.</p> |
|
252 | 252 | <p class="text-uppercase">Uppercased text.</p> |
|
253 | 253 | <p class="text-capitalize">Capitalized text.</p> |
|
254 | 254 | </div> |
|
255 | 255 | <div class="highlight-html"><xmp> |
|
256 | 256 | <p class="text-lowercase">Lowercased text.</p> |
|
257 | 257 | <p class="text-uppercase">Uppercased text.</p> |
|
258 | 258 | <p class="text-capitalize">Capitalized text.</p> |
|
259 | 259 | </xmp></div> <!-- end highlight --> |
|
260 | 260 | |
|
261 | 261 | <!-- Abbreviations --> |
|
262 | 262 | <h2 id="type-abbreviations">Abbreviations</h2> |
|
263 | 263 | <p>Stylized implementation of HTML's <code><abbr></code> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover and to users of assistive technologies.</p> |
|
264 | 264 | |
|
265 | 265 | <h3>Basic abbreviation</h3> |
|
266 | 266 | <div class="bs-example" data-example-id="simple-abbr"> |
|
267 | 267 | <p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p> |
|
268 | 268 | </div> |
|
269 | 269 | <div class="highlight-html"><xmp> |
|
270 | 270 | <abbr title="attribute">attr</abbr> |
|
271 | 271 | </xmp></div> <!-- end highlight --> |
|
272 | 272 | |
|
273 | 273 | <h3>Initialism</h3> |
|
274 | 274 | <p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p> |
|
275 | 275 | <div class="bs-example" data-example-id="simple-initialism"> |
|
276 | 276 | <p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced bread.</p> |
|
277 | 277 | </div> |
|
278 | 278 | <div class="highlight-html"><xmp> |
|
279 | 279 | <abbr title="HyperText Markup Language" class="initialism">HTML</abbr> |
|
280 | 280 | </xmp></div> <!-- end highlight --> |
|
281 | 281 | |
|
282 | 282 | |
|
283 | 283 | <!-- Addresses --> |
|
284 | 284 | <h2 id="type-addresses">Addresses</h2> |
|
285 | 285 | <p>Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with <code><br></code>.</p> |
|
286 | 286 | <div class="bs-example" data-example-id="simple-address"> |
|
287 | 287 | <address> |
|
288 | 288 | <strong>Twitter, Inc.</strong><br> |
|
289 | 289 | 795 Folsom Ave, Suite 600<br> |
|
290 | 290 | San Francisco, CA 94107<br> |
|
291 | 291 | <abbr title="Phone">P:</abbr> (123) 456-7890 |
|
292 | 292 | </address> |
|
293 | 293 | <address> |
|
294 | 294 | <strong>Full Name</strong><br> |
|
295 | 295 | <a href="mailto:#">first.last@example.com</a> |
|
296 | 296 | </address> |
|
297 | 297 | </div> |
|
298 | 298 | <div class="highlight-html"><xmp> |
|
299 | 299 | <address> |
|
300 | 300 | <strong>Twitter, Inc.</strong><br> |
|
301 | 301 | 795 Folsom Ave, Suite 600<br> |
|
302 | 302 | San Francisco, CA 94107<br> |
|
303 | 303 | <abbr title="Phone">P:</abbr> (123) 456-7890 |
|
304 | 304 | </address> |
|
305 | 305 | |
|
306 | 306 | <address> |
|
307 | 307 | <strong>Full Name</strong><br> |
|
308 | 308 | <a href="mailto:#">first.last@example.com</a> |
|
309 | 309 | </address> |
|
310 | 310 | </xmp></div> <!-- end highlight --> |
|
311 | 311 | |
|
312 | 312 | |
|
313 | 313 | <!-- Blockquotes --> |
|
314 | 314 | <h2 id="type-blockquotes">Blockquotes</h2> |
|
315 | 315 | <p>For quoting blocks of content from another source within your document.</p> |
|
316 | 316 | |
|
317 | 317 | <h3>Default blockquote</h3> |
|
318 | 318 | <p>Wrap <code><blockquote></code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes, we recommend a <code><p></code>.</p> |
|
319 | 319 | <div class="bs-example" data-example-id="simple-blockquote"> |
|
320 | 320 | <blockquote> |
|
321 | 321 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> |
|
322 | 322 | </blockquote> |
|
323 | 323 | </div> |
|
324 | 324 | <div class="highlight-html"><xmp> |
|
325 | 325 | <blockquote> |
|
326 | 326 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> |
|
327 | 327 | </blockquote> |
|
328 | 328 | </xmp></div> <!-- end highlight --> |
|
329 | 329 | |
|
330 | 330 | <h3>Blockquote options</h3> |
|
331 | 331 | <p>Style and content changes for simple variations on a standard <code><blockquote></code>.</p> |
|
332 | 332 | |
|
333 | 333 | <h4>Naming a source</h4> |
|
334 | 334 | <p>Add a <code><footer></code> for identifying the source. Wrap the name of the source work in <code><cite></code>.</p> |
|
335 | 335 | <div class="bs-example" data-example-id="blockquote-cite"> |
|
336 | 336 | <blockquote> |
|
337 | 337 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> |
|
338 | 338 | <footer>Someone famous in <cite title="Source Title">Source Title</cite></footer> |
|
339 | 339 | </blockquote> |
|
340 | 340 | </div> |
|
341 | 341 | <div class="highlight-html"><xmp> |
|
342 | 342 | <blockquote> |
|
343 | 343 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> |
|
344 | 344 | <footer>Someone famous in <cite title="Source Title">Source Title</cite></footer> |
|
345 | 345 | </blockquote> |
|
346 | 346 | </xmp></div> <!-- end highlight --> |
|
347 | 347 | |
|
348 | 348 | <h4>Alternate displays</h4> |
|
349 | 349 | <p>Add <code>.blockquote-reverse</code> for a blockquote with right-aligned content.</p> |
|
350 | 350 | <div class="bs-example" style="overflow: hidden;" data-example-id="blockquote-reverse"> |
|
351 | 351 | <blockquote class="blockquote-reverse"> |
|
352 | 352 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> |
|
353 | 353 | <footer>Someone famous in <cite title="Source Title">Source Title</cite></footer> |
|
354 | 354 | </blockquote> |
|
355 | 355 | </div> |
|
356 | 356 | <div class="highlight-html"><xmp> |
|
357 | 357 | <blockquote class="blockquote-reverse"> |
|
358 | 358 | ... |
|
359 | 359 | </blockquote> |
|
360 | 360 | </xmp></div> <!-- end highlight --> |
|
361 | 361 | |
|
362 | 362 | <h2>Tooltip</h2> |
|
363 | 363 | <p>Any element with a class <code>tooltip</code> and a <code>title</code> attribute will replaced with the custom tooltip via Javascript. <br />Tooltips should be used with care as touch devices won't activate them. |
|
364 | 364 | </p> |
|
365 | 365 | <div class="bs-example"> |
|
366 | 366 | <p class="tooltip" title="I am a tooltip in a `p`">Hover me, please!</p> |
|
367 | 367 | </div> |
|
368 | 368 | |
|
369 | 369 | <!-- Lists --> |
|
370 | 370 | <h2 id="type-lists">Lists</h2> |
|
371 | 371 | |
|
372 | 372 | <h3>Unordered</h3> |
|
373 | 373 | <p>A list of items in which the order does <em>not</em> explicitly matter.</p> |
|
374 | 374 | <div class="bs-example" data-example-id="simple-ul"> |
|
375 | 375 | <ul> |
|
376 | 376 | <li>Lorem ipsum dolor sit amet</li> |
|
377 | 377 | <li>Consectetur adipiscing elit</li> |
|
378 | 378 | <li>Integer molestie lorem at massa</li> |
|
379 | 379 | <li>Facilisis in pretium nisl aliquet</li> |
|
380 | 380 | <li>Nulla volutpat aliquam velit |
|
381 | 381 | <ul> |
|
382 | 382 | <li>Phasellus iaculis neque</li> |
|
383 | 383 | <li>Purus sodales ultricies</li> |
|
384 | 384 | <li>Vestibulum laoreet porttitor sem</li> |
|
385 | 385 | <li>Ac tristique libero volutpat at</li> |
|
386 | 386 | </ul> |
|
387 | 387 | </li> |
|
388 | 388 | <li>Faucibus porta lacus fringilla vel</li> |
|
389 | 389 | <li>Aenean sit amet erat nunc</li> |
|
390 | 390 | <li>Eget porttitor lorem</li> |
|
391 | 391 | </ul> |
|
392 | 392 | </div> |
|
393 | 393 | <div class="highlight-html"><xmp> |
|
394 | 394 | <ul> |
|
395 | 395 | <li>...</li> |
|
396 | 396 | </ul> |
|
397 | 397 | </xmp></div> <!-- end highlight --> |
|
398 | 398 | |
|
399 | 399 | <h3>Ordered</h3> |
|
400 | 400 | <p>A list of items in which the order <em>does</em> explicitly matter.</p> |
|
401 | 401 | <div class="bs-example" data-example-id="simple-ol"> |
|
402 | 402 | <ol> |
|
403 | 403 | <li>Lorem ipsum dolor sit amet</li> |
|
404 | 404 | <li>Consectetur adipiscing elit</li> |
|
405 | 405 | <li>Integer molestie lorem at massa</li> |
|
406 | 406 | <li>Facilisis in pretium nisl aliquet</li> |
|
407 | 407 | <li>Nulla volutpat aliquam velit</li> |
|
408 | 408 | <li>Faucibus porta lacus fringilla vel</li> |
|
409 | 409 | <li>Aenean sit amet erat nunc</li> |
|
410 | 410 | <li>Eget porttitor lorem</li> |
|
411 | 411 | </ol> |
|
412 | 412 | </div> |
|
413 | 413 | <div class="highlight-html"><xmp> |
|
414 | 414 | <ol> |
|
415 | 415 | <li>...</li> |
|
416 | 416 | </ol> |
|
417 | 417 | </xmp></div> <!-- end highlight --> |
|
418 | 418 | |
|
419 | 419 | <h3>Unstyled</h3> |
|
420 | 420 | <p>Remove the default <code>list-style</code> and left margin on list items (immediate children only). <strong>This only applies to immediate children list items</strong>, meaning you will need to add the class for any nested lists as well.< /p> |
|
421 | 421 | <div class="bs-example" data-example-id="unstyled-list"> |
|
422 | 422 | <ul class="list-unstyled"> |
|
423 | 423 | <li>Lorem ipsum dolor sit amet</li> |
|
424 | 424 | <li>Consectetur adipiscing elit</li> |
|
425 | 425 | <li>Integer molestie lorem at massa</li> |
|
426 | 426 | <li>Facilisis in pretium nisl aliquet</li> |
|
427 | 427 | <li>Nulla volutpat aliquam velit |
|
428 | 428 | <ul> |
|
429 | 429 | <li>Phasellus iaculis neque</li> |
|
430 | 430 | <li>Purus sodales ultricies</li> |
|
431 | 431 | <li>Vestibulum laoreet porttitor sem</li> |
|
432 | 432 | <li>Ac tristique libero volutpat at</li> |
|
433 | 433 | </ul> |
|
434 | 434 | </li> |
|
435 | 435 | <li>Faucibus porta lacus fringilla vel</li> |
|
436 | 436 | <li>Aenean sit amet erat nunc</li> |
|
437 | 437 | <li>Eget porttitor lorem</li> |
|
438 | 438 | </ul> |
|
439 | 439 | </div> |
|
440 | 440 | <div class="highlight-html"><xmp> |
|
441 | 441 | <ul class="list-unstyled"> |
|
442 | 442 | <li>...</li> |
|
443 | 443 | </ul> |
|
444 | 444 | </xmp></div> <!-- end highlight --> |
|
445 | 445 | |
|
446 | 446 | <h3>Inline</h3> |
|
447 | 447 | <p>Place all list items on a single line with <code>display: inline-block;</code> and some light padding.</p> |
|
448 | 448 | <div class="bs-example" data-example-id="list-inline"> |
|
449 | 449 | <ul class="list-inline"> |
|
450 | 450 | <li>Lorem ipsum</li> |
|
451 | 451 | <li>Phasellus iaculis</li> |
|
452 | 452 | <li>Nulla volutpat</li> |
|
453 | 453 | </ul> |
|
454 | 454 | </div> |
|
455 | 455 | <div class="highlight-html"><xmp> |
|
456 | 456 | <ul class="list-inline"> |
|
457 | 457 | <li>...</li> |
|
458 | 458 | </ul> |
|
459 | 459 | </xmp></div> <!-- end highlight --> |
|
460 | 460 | |
|
461 | 461 | <h3>Description</h3> |
|
462 | 462 | <p>A list of terms with their associated descriptions.</p> |
|
463 | 463 | <div class="bs-example" data-example-id="simple-dl"> |
|
464 | 464 | <dl> |
|
465 | 465 | <dt>Description lists</dt> |
|
466 | 466 | <dd>A description list is perfect for defining terms.</dd> |
|
467 | 467 | <dt>Euismod</dt> |
|
468 | 468 | <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd> |
|
469 | 469 | <dd>Donec id elit non mi porta gravida at eget metus.</dd> |
|
470 | 470 | <dt>Malesuada porta</dt> |
|
471 | 471 | <dd>Etiam porta sem malesuada magna mollis euismod.</dd> |
|
472 | 472 | </dl> |
|
473 | 473 | </div> |
|
474 | 474 | <div class="highlight-html"><xmp> |
|
475 | 475 | <dl> |
|
476 | 476 | <dt>...</dt> |
|
477 | 477 | <dd>...</dd> |
|
478 | 478 | </dl> |
|
479 | 479 | </xmp></div> <!-- end highlight --> |
|
480 | 480 | |
|
481 | 481 | <h4>Horizontal description</h4> |
|
482 | 482 | <p>Make terms and descriptions in <code><dl></code> line up side-by-side. Starts off stacked like default <code><dl></code>s, but when the navbar expands, so do these. This really only looks good if there is one line for the definition and one for the term.</p> |
|
483 | 483 | <div class="bs-example" data-example-id="horizontal-dl"> |
|
484 | 484 | <dl class="dl-horizontal"> |
|
485 | 485 | <dt>Description lists</dt> |
|
486 | 486 | <dd>A description list is perfect for defining terms.</dd> |
|
487 | 487 | <dt>Donec id elit non mi porta gravida at eget metus.</dt> |
|
488 | 488 | <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd> |
|
489 | 489 | <dd>Donec id elit non mi porta gravida at eget metus.</dd> |
|
490 | 490 | <dt>Malesuada porta</dt> |
|
491 | 491 | <dd>Etiam porta sem malesuada magna mollis euismod.</dd> |
|
492 | 492 | <dt>Felis euismod semper eget lacinia</dt> |
|
493 | 493 | <dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd> |
|
494 | 494 | </dl> |
|
495 | 495 | </div> |
|
496 | 496 | <div class="highlight-html"><xmp> |
|
497 | 497 | <dl class="dl-horizontal"> |
|
498 | 498 | <dt>...</dt> |
|
499 | 499 | <dd>...</dd> |
|
500 | 500 | </dl> |
|
501 | 501 | </xmp></div> <!-- end highlight --> |
|
502 | 502 | |
|
503 | 503 | </div> |
|
504 | 504 | |
|
505 | 505 | </div> |
|
506 | 506 | </div> |
|
507 | 507 | </%def> |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now