Show More
@@ -0,0 +1,14 b'' | |||
|
1 | <% | |
|
2 | from pyramid.renderers import render as pyramid_render | |
|
3 | from pyramid.threadlocal import get_current_registry, get_current_request | |
|
4 | pyramid_registry = get_current_registry() | |
|
5 | %> | |
|
6 | % for plugin, config in pyramid_registry.rhodecode_plugins.items(): | |
|
7 | % if config['template_hooks'].get('plugin_init_template'): | |
|
8 | ${pyramid_render(config['template_hooks'].get('plugin_init_template'), | |
|
9 | {'config':config}, request=get_current_request(), package='rc_ae')|n} | |
|
10 | % endif | |
|
11 | % endfor | |
|
12 | <script> | |
|
13 | $.Topic('/plugins/__REGISTER__').publish({}); | |
|
14 | </script> |
@@ -23,8 +23,6 b' def get_plugin_settings(prefix, settings' | |||
|
23 | 23 | """ |
|
24 | 24 | Returns plugin settings. Use:: |
|
25 | 25 | |
|
26 | ||
|
27 | ||
|
28 | 26 | :param prefix: |
|
29 | 27 | :param settings: |
|
30 | 28 | :return: |
@@ -45,21 +43,15 b' def register_rhodecode_plugin(config, pl' | |||
|
45 | 43 | 'javascript': None, |
|
46 | 44 | 'static': None, |
|
47 | 45 | 'css': None, |
|
48 |
' |
|
|
46 | 'nav': None, | |
|
49 | 47 | 'fulltext_indexer': None, |
|
50 | 48 | 'sqlalchemy_migrations': None, |
|
51 | 49 | 'default_values_setter': None, |
|
52 |
' |
|
|
53 |
' |
|
|
50 | 'url_gen': None, | |
|
51 | 'template_hooks': {} | |
|
54 | 52 | } |
|
55 | 53 | config.registry.rhodecode_plugins[plugin_name].update( |
|
56 | 54 | plugin_config) |
|
57 | # inform RC what kind of resource types we have available | |
|
58 | # so we can avoid failing when a plugin is removed but data | |
|
59 | # is still present in the db | |
|
60 | if plugin_config.get('resource_types'): | |
|
61 | config.registry.resource_types.extend( | |
|
62 | plugin_config['resource_types']) | |
|
63 | 55 | |
|
64 | 56 | config.action( |
|
65 | 57 | 'register_rhodecode_plugin={}'.format(plugin_name), register) |
General Comments 0
You need to be logged in to leave comments.
Login now