Show More
@@ -1,116 +1,116 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.mako"/> |
|
2 | <%inherit file="/base/base.mako"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Authentication Settings')} |
|
5 | ${_('Authentication Settings')} | |
6 | %if c.rhodecode_name: |
|
6 | %if c.rhodecode_name: | |
7 | · ${h.branding(c.rhodecode_name)}} |
|
7 | · ${h.branding(c.rhodecode_name)}} | |
8 | %endif |
|
8 | %endif | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="breadcrumbs_links()"> |
|
11 | <%def name="breadcrumbs_links()"> | |
12 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
12 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
13 | » |
|
13 | » | |
14 | ${_('Authentication Plugins')} |
|
14 | ${_('Authentication Plugins')} | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="menu_bar_nav()"> |
|
17 | <%def name="menu_bar_nav()"> | |
18 | ${self.menu_items(active='admin')} |
|
18 | ${self.menu_items(active='admin')} | |
19 | </%def> |
|
19 | </%def> | |
20 |
|
20 | |||
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 |
|
22 | |||
23 | <div class="box"> |
|
23 | <div class="box"> | |
24 | <div class="title"> |
|
24 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
25 | ${self.breadcrumbs()} | |
26 | </div> |
|
26 | </div> | |
27 |
|
27 | |||
28 | <div class='sidebar-col-wrapper'> |
|
28 | <div class='sidebar-col-wrapper'> | |
29 |
|
29 | |||
30 | <div class="sidebar"> |
|
30 | <div class="sidebar"> | |
31 | <ul class="nav nav-pills nav-stacked"> |
|
31 | <ul class="nav nav-pills nav-stacked"> | |
32 | % for item in resource.get_root().get_nav_list(): |
|
32 | % for item in resource.get_root().get_nav_list(): | |
33 | <li ${'class=active' if item == resource else ''}> |
|
33 | <li ${'class=active' if item == resource else ''}> | |
34 | <a href="${request.resource_path(item, route_name='auth_home')}">${item.display_name}</a> |
|
34 | <a href="${request.resource_path(item, route_name='auth_home')}">${item.display_name}</a> | |
35 | </li> |
|
35 | </li> | |
36 | % endfor |
|
36 | % endfor | |
37 | </ul> |
|
37 | </ul> | |
38 | </div> |
|
38 | </div> | |
39 |
|
39 | |||
40 | <div class="main-content-full-width"> |
|
40 | <div class="main-content-full-width"> | |
41 | ${h.secure_form(request.resource_path(resource, route_name='auth_home'))} |
|
41 | ${h.secure_form(request.resource_path(resource, route_name='auth_home'))} | |
42 | <div class="form"> |
|
42 | <div class="form"> | |
43 |
|
43 | |||
44 | <div class="panel panel-default"> |
|
44 | <div class="panel panel-default"> | |
45 |
|
45 | |||
46 | <div class="panel-heading"> |
|
46 | <div class="panel-heading"> | |
47 | <h3 class="panel-title">${_("Enabled and Available Plugins")}</h3> |
|
47 | <h3 class="panel-title">${_("Enabled and Available Plugins")}</h3> | |
48 | </div> |
|
48 | </div> | |
49 |
|
49 | |||
50 | <div class="fields panel-body"> |
|
50 | <div class="fields panel-body"> | |
51 |
|
51 | |||
52 | <div class="field"> |
|
52 | <div class="field"> | |
53 | <div class="label">${_("Enabled Plugins")}</div> |
|
53 | <div class="label">${_("Enabled Plugins")}</div> | |
54 | <div class="textarea text-area editor"> |
|
54 | <div class="textarea text-area editor"> | |
55 | ${h.textarea('auth_plugins',cols=23,rows=5,class_="medium")} |
|
55 | ${h.textarea('auth_plugins',cols=23,rows=5,class_="medium")} | |
56 | </div> |
|
56 | </div> | |
57 | <p class="help-block"> |
|
57 | <p class="help-block"> | |
58 | ${_('Add a list of plugins, separated by commas. ' |
|
58 | ${_('Add a list of plugins, separated by commas. ' | |
59 | 'The order of the plugins is also the order in which ' |
|
59 | 'The order of the plugins is also the order in which ' | |
60 | 'RhodeCode Enterprise will try to authenticate a user.')} |
|
60 | 'RhodeCode Enterprise will try to authenticate a user.')} | |
61 | </p> |
|
61 | </p> | |
62 | </div> |
|
62 | </div> | |
63 |
|
63 | |||
64 | <div class="field"> |
|
64 | <div class="field"> | |
65 | <div class="label">${_('Available Built-in Plugins')}</div> |
|
65 | <div class="label">${_('Available Built-in Plugins')}</div> | |
66 | <ul class="auth_plugins"> |
|
66 | <ul class="auth_plugins"> | |
67 | %for plugin in available_plugins: |
|
67 | %for plugin in available_plugins: | |
68 | <li> |
|
68 | <li> | |
69 | <div class="auth_buttons"> |
|
69 | <div class="auth_buttons"> | |
70 | <span plugin_id="${plugin.get_id()}" class="toggle-plugin btn ${'btn-success' if plugin.get_id() in enabled_plugins else ''}"> |
|
70 | <span plugin_id="${plugin.get_id()}" class="toggle-plugin btn ${'btn-success' if plugin.get_id() in enabled_plugins else ''}"> | |
71 | ${_('enabled') if plugin.get_id() in enabled_plugins else _('disabled')} |
|
71 | ${_('enabled') if plugin.get_id() in enabled_plugins else _('disabled')} | |
72 | </span> |
|
72 | </span> | |
73 | ${plugin.get_display_name()} (${plugin.get_id()}) |
|
73 | ${plugin.get_display_name()} (${plugin.get_id()}) | |
74 | </div> |
|
74 | </div> | |
75 | </li> |
|
75 | </li> | |
76 | %endfor |
|
76 | %endfor | |
77 | </ul> |
|
77 | </ul> | |
78 | </div> |
|
78 | </div> | |
79 |
|
79 | |||
80 | <div class="buttons"> |
|
80 | <div class="buttons"> | |
81 | ${h.submit('save',_('Save'),class_="btn")} |
|
81 | ${h.submit('save',_('Save'),class_="btn")} | |
82 | </div> |
|
82 | </div> | |
83 | </div> |
|
83 | </div> | |
84 | </div> |
|
84 | </div> | |
85 | </div> |
|
85 | </div> | |
86 | ${h.end_form()} |
|
86 | ${h.end_form()} | |
87 | </div> |
|
87 | </div> | |
88 | </div> |
|
88 | </div> | |
89 | </div> |
|
89 | </div> | |
90 |
|
90 | |||
91 | <script> |
|
91 | <script> | |
92 | $('.toggle-plugin').click(function(e){ |
|
92 | $('.toggle-plugin').click(function(e){ | |
93 | var auth_plugins_input = $('#auth_plugins'); |
|
93 | var auth_plugins_input = $('#auth_plugins'); | |
94 | var notEmpty = function(element, index, array) { |
|
94 | var notEmpty = function(element, index, array) { | |
95 | return (element != ""); |
|
95 | return (element != ""); | |
96 | } |
|
96 | }; | |
97 | var elems = auth_plugins_input.val().split(',').filter(notEmpty); |
|
97 | var elems = auth_plugins_input.val().split(',').filter(notEmpty); | |
98 | var cur_button = e.currentTarget; |
|
98 | var cur_button = e.currentTarget; | |
99 | var plugin_id = $(cur_button).attr('plugin_id'); |
|
99 | var plugin_id = $(cur_button).attr('plugin_id'); | |
100 | if($(cur_button).hasClass('btn-success')){ |
|
100 | if($(cur_button).hasClass('btn-success')){ | |
101 | elems.splice(elems.indexOf(plugin_id), 1); |
|
101 | elems.splice(elems.indexOf(plugin_id), 1); | |
102 | auth_plugins_input.val(elems.join(',')); |
|
102 | auth_plugins_input.val(elems.join(',')); | |
103 | $(cur_button).removeClass('btn-success'); |
|
103 | $(cur_button).removeClass('btn-success'); | |
104 | cur_button.innerHTML = _gettext('disabled'); |
|
104 | cur_button.innerHTML = _gettext('disabled'); | |
105 | } |
|
105 | } | |
106 | else{ |
|
106 | else{ | |
107 | if(elems.indexOf(plugin_id) == -1){ |
|
107 | if(elems.indexOf(plugin_id) == -1){ | |
108 | elems.push(plugin_id); |
|
108 | elems.push(plugin_id); | |
109 | } |
|
109 | } | |
110 | auth_plugins_input.val(elems.join(',')); |
|
110 | auth_plugins_input.val(elems.join(',')); | |
111 | $(cur_button).addClass('btn-success'); |
|
111 | $(cur_button).addClass('btn-success'); | |
112 | cur_button.innerHTML = _gettext('enabled'); |
|
112 | cur_button.innerHTML = _gettext('enabled'); | |
113 | } |
|
113 | } | |
114 | }); |
|
114 | }); | |
115 | </script> |
|
115 | </script> | |
116 | </%def> |
|
116 | </%def> |
@@ -1,252 +1,252 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base.mako"/> |
|
2 | <%inherit file="base.mako"/> | |
3 |
|
3 | |||
4 | <%def name="breadcrumbs_links()"> |
|
4 | <%def name="breadcrumbs_links()"> | |
5 | %if c.repo: |
|
5 | %if c.repo: | |
6 | ${h.link_to('Settings',h.url('edit_repo', repo_name=c.repo.repo_name))} |
|
6 | ${h.link_to('Settings',h.url('edit_repo', repo_name=c.repo.repo_name))} | |
7 | %elif c.repo_group: |
|
7 | %elif c.repo_group: | |
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(_('Repository Groups'),h.url('repo_groups'))} |
|
10 | ${h.link_to(_('Repository Groups'),h.url('repo_groups'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_group.group_name,h.url('edit_repo_group', group_name=c.repo_group.group_name))} |
|
12 | ${h.link_to(c.repo_group.group_name,h.url('edit_repo_group', group_name=c.repo_group.group_name))} | |
13 | %else: |
|
13 | %else: | |
14 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
14 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
15 | » |
|
15 | » | |
16 | ${h.link_to(_('Settings'),h.url('admin_settings'))} |
|
16 | ${h.link_to(_('Settings'),h.url('admin_settings'))} | |
17 | %endif |
|
17 | %endif | |
18 | %if current_IntegrationType: |
|
18 | %if current_IntegrationType: | |
19 | » |
|
19 | » | |
20 | %if c.repo: |
|
20 | %if c.repo: | |
21 | ${h.link_to(_('Integrations'), |
|
21 | ${h.link_to(_('Integrations'), | |
22 | request.route_url(route_name='repo_integrations_home', |
|
22 | request.route_url(route_name='repo_integrations_home', | |
23 | repo_name=c.repo.repo_name))} |
|
23 | repo_name=c.repo.repo_name))} | |
24 | %elif c.repo_group: |
|
24 | %elif c.repo_group: | |
25 | ${h.link_to(_('Integrations'), |
|
25 | ${h.link_to(_('Integrations'), | |
26 | request.route_url(route_name='repo_group_integrations_home', |
|
26 | request.route_url(route_name='repo_group_integrations_home', | |
27 | repo_group_name=c.repo_group.group_name))} |
|
27 | repo_group_name=c.repo_group.group_name))} | |
28 | %else: |
|
28 | %else: | |
29 | ${h.link_to(_('Integrations'), |
|
29 | ${h.link_to(_('Integrations'), | |
30 | request.route_url(route_name='global_integrations_home'))} |
|
30 | request.route_url(route_name='global_integrations_home'))} | |
31 | %endif |
|
31 | %endif | |
32 | » |
|
32 | » | |
33 | ${current_IntegrationType.display_name} |
|
33 | ${current_IntegrationType.display_name} | |
34 | %else: |
|
34 | %else: | |
35 | » |
|
35 | » | |
36 | ${_('Integrations')} |
|
36 | ${_('Integrations')} | |
37 | %endif |
|
37 | %endif | |
38 | </%def> |
|
38 | </%def> | |
39 |
|
39 | |||
40 | <div class="panel panel-default"> |
|
40 | <div class="panel panel-default"> | |
41 | <div class="panel-heading"> |
|
41 | <div class="panel-heading"> | |
42 | <h3 class="panel-title"> |
|
42 | <h3 class="panel-title"> | |
43 | %if c.repo: |
|
43 | %if c.repo: | |
44 | ${_('Current Integrations for Repository: {repo_name}').format(repo_name=c.repo.repo_name)} |
|
44 | ${_('Current Integrations for Repository: {repo_name}').format(repo_name=c.repo.repo_name)} | |
45 | %elif c.repo_group: |
|
45 | %elif c.repo_group: | |
46 | ${_('Current Integrations for repository group: {repo_group_name}').format(repo_group_name=c.repo_group.group_name)} |
|
46 | ${_('Current Integrations for repository group: {repo_group_name}').format(repo_group_name=c.repo_group.group_name)} | |
47 | %else: |
|
47 | %else: | |
48 | ${_('Current Integrations')} |
|
48 | ${_('Current Integrations')} | |
49 | %endif |
|
49 | %endif | |
50 | </h3> |
|
50 | </h3> | |
51 | </div> |
|
51 | </div> | |
52 | <div class="panel-body"> |
|
52 | <div class="panel-body"> | |
53 | <% |
|
53 | <% | |
54 | if c.repo: |
|
54 | if c.repo: | |
55 | home_url = request.route_path('repo_integrations_home', |
|
55 | home_url = request.route_path('repo_integrations_home', | |
56 | repo_name=c.repo.repo_name) |
|
56 | repo_name=c.repo.repo_name) | |
57 | elif c.repo_group: |
|
57 | elif c.repo_group: | |
58 | home_url = request.route_path('repo_group_integrations_home', |
|
58 | home_url = request.route_path('repo_group_integrations_home', | |
59 | repo_group_name=c.repo_group.group_name) |
|
59 | repo_group_name=c.repo_group.group_name) | |
60 | else: |
|
60 | else: | |
61 | home_url = request.route_path('global_integrations_home') |
|
61 | home_url = request.route_path('global_integrations_home') | |
62 | %> |
|
62 | %> | |
63 |
|
63 | |||
64 | <a href="${home_url}" class="btn ${not current_IntegrationType and 'btn-primary' or ''}">${_('All')}</a> |
|
64 | <a href="${home_url}" class="btn ${not current_IntegrationType and 'btn-primary' or ''}">${_('All')}</a> | |
65 |
|
65 | |||
66 | %for integration_key, IntegrationType in available_integrations.items(): |
|
66 | %for integration_key, IntegrationType in available_integrations.items(): | |
67 | <% |
|
67 | <% | |
68 | if c.repo: |
|
68 | if c.repo: | |
69 | list_url = request.route_path('repo_integrations_list', |
|
69 | list_url = request.route_path('repo_integrations_list', | |
70 | repo_name=c.repo.repo_name, |
|
70 | repo_name=c.repo.repo_name, | |
71 | integration=integration_key) |
|
71 | integration=integration_key) | |
72 | elif c.repo_group: |
|
72 | elif c.repo_group: | |
73 | list_url = request.route_path('repo_group_integrations_list', |
|
73 | list_url = request.route_path('repo_group_integrations_list', | |
74 | repo_group_name=c.repo_group.group_name, |
|
74 | repo_group_name=c.repo_group.group_name, | |
75 | integration=integration_key) |
|
75 | integration=integration_key) | |
76 | else: |
|
76 | else: | |
77 | list_url = request.route_path('global_integrations_list', |
|
77 | list_url = request.route_path('global_integrations_list', | |
78 | integration=integration_key) |
|
78 | integration=integration_key) | |
79 | %> |
|
79 | %> | |
80 | <a href="${list_url}" |
|
80 | <a href="${list_url}" | |
81 | class="btn ${current_IntegrationType and integration_key == current_IntegrationType.key and 'btn-primary' or ''}"> |
|
81 | class="btn ${current_IntegrationType and integration_key == current_IntegrationType.key and 'btn-primary' or ''}"> | |
82 | ${IntegrationType.display_name} |
|
82 | ${IntegrationType.display_name} | |
83 | </a> |
|
83 | </a> | |
84 | %endfor |
|
84 | %endfor | |
85 |
|
85 | |||
86 | <% |
|
86 | <% | |
87 | if c.repo: |
|
87 | if c.repo: | |
88 | create_url = h.route_path('repo_integrations_new', repo_name=c.repo.repo_name) |
|
88 | create_url = h.route_path('repo_integrations_new', repo_name=c.repo.repo_name) | |
89 | elif c.repo_group: |
|
89 | elif c.repo_group: | |
90 | create_url = h.route_path('repo_group_integrations_new', repo_group_name=c.repo_group.group_name) |
|
90 | create_url = h.route_path('repo_group_integrations_new', repo_group_name=c.repo_group.group_name) | |
91 | else: |
|
91 | else: | |
92 | create_url = h.route_path('global_integrations_new') |
|
92 | create_url = h.route_path('global_integrations_new') | |
93 | %> |
|
93 | %> | |
94 | <p class="pull-right"> |
|
94 | <p class="pull-right"> | |
95 | <a href="${create_url}" class="btn btn-small btn-success">${_(u'Create new integration')}</a> |
|
95 | <a href="${create_url}" class="btn btn-small btn-success">${_(u'Create new integration')}</a> | |
96 | </p> |
|
96 | </p> | |
97 |
|
97 | |||
98 | <table class="rctable integrations"> |
|
98 | <table class="rctable integrations"> | |
99 | <thead> |
|
99 | <thead> | |
100 | <tr> |
|
100 | <tr> | |
101 | <th><a href="?sort=enabled:${rev_sort_dir}">${_('Enabled')}</a></th> |
|
101 | <th><a href="?sort=enabled:${rev_sort_dir}">${_('Enabled')}</a></th> | |
102 | <th><a href="?sort=name:${rev_sort_dir}">${_('Name')}</a></th> |
|
102 | <th><a href="?sort=name:${rev_sort_dir}">${_('Name')}</a></th> | |
103 | <th colspan="2"><a href="?sort=integration_type:${rev_sort_dir}">${_('Type')}</a></th> |
|
103 | <th colspan="2"><a href="?sort=integration_type:${rev_sort_dir}">${_('Type')}</a></th> | |
104 | <th><a href="?sort=scope:${rev_sort_dir}">${_('Scope')}</a></th> |
|
104 | <th><a href="?sort=scope:${rev_sort_dir}">${_('Scope')}</a></th> | |
105 | <th>${_('Actions')}</th> |
|
105 | <th>${_('Actions')}</th> | |
106 | <th></th> |
|
106 | <th></th> | |
107 | </tr> |
|
107 | </tr> | |
108 | </thead> |
|
108 | </thead> | |
109 | <tbody> |
|
109 | <tbody> | |
110 | %if not integrations_list: |
|
110 | %if not integrations_list: | |
111 | <tr> |
|
111 | <tr> | |
112 | <td colspan="7"> |
|
112 | <td colspan="7"> | |
113 | <% integration_type = current_IntegrationType and current_IntegrationType.display_name or '' %> |
|
113 | <% integration_type = current_IntegrationType and current_IntegrationType.display_name or '' %> | |
114 | %if c.repo: |
|
114 | %if c.repo: | |
115 | ${_('No {type} integrations for repo {repo} exist yet.').format(type=integration_type, repo=c.repo.repo_name)} |
|
115 | ${_('No {type} integrations for repo {repo} exist yet.').format(type=integration_type, repo=c.repo.repo_name)} | |
116 | %elif c.repo_group: |
|
116 | %elif c.repo_group: | |
117 | ${_('No {type} integrations for repogroup {repogroup} exist yet.').format(type=integration_type, repogroup=c.repo_group.group_name)} |
|
117 | ${_('No {type} integrations for repogroup {repogroup} exist yet.').format(type=integration_type, repogroup=c.repo_group.group_name)} | |
118 | %else: |
|
118 | %else: | |
119 | ${_('No {type} integrations exist yet.').format(type=integration_type)} |
|
119 | ${_('No {type} integrations exist yet.').format(type=integration_type)} | |
120 | %endif |
|
120 | %endif | |
121 |
|
121 | |||
122 | %if current_IntegrationType: |
|
122 | %if current_IntegrationType: | |
123 | <% |
|
123 | <% | |
124 | if c.repo: |
|
124 | if c.repo: | |
125 | create_url = h.route_path('repo_integrations_create', repo_name=c.repo.repo_name, integration=current_IntegrationType.key) |
|
125 | create_url = h.route_path('repo_integrations_create', repo_name=c.repo.repo_name, integration=current_IntegrationType.key) | |
126 | elif c.repo_group: |
|
126 | elif c.repo_group: | |
127 | create_url = h.route_path('repo_group_integrations_create', repo_group_name=c.repo_group.group_name, integration=current_IntegrationType.key) |
|
127 | create_url = h.route_path('repo_group_integrations_create', repo_group_name=c.repo_group.group_name, integration=current_IntegrationType.key) | |
128 | else: |
|
128 | else: | |
129 | create_url = h.route_path('global_integrations_create', integration=current_IntegrationType.key) |
|
129 | create_url = h.route_path('global_integrations_create', integration=current_IntegrationType.key) | |
130 | %> |
|
130 | %> | |
131 | %endif |
|
131 | %endif | |
132 |
|
132 | |||
133 | <a href="${create_url}">${_(u'Create one')}</a> |
|
133 | <a href="${create_url}">${_(u'Create one')}</a> | |
134 | </td> |
|
134 | </td> | |
135 | </tr> |
|
135 | </tr> | |
136 | %endif |
|
136 | %endif | |
137 | %for IntegrationType, integration in integrations_list: |
|
137 | %for IntegrationType, integration in integrations_list: | |
138 | <tr id="integration_${integration.integration_id}"> |
|
138 | <tr id="integration_${integration.integration_id}"> | |
139 | <td class="td-enabled"> |
|
139 | <td class="td-enabled"> | |
140 | %if integration.enabled: |
|
140 | %if integration.enabled: | |
141 | <div class="flag_status approved pull-left"></div> |
|
141 | <div class="flag_status approved pull-left"></div> | |
142 | %else: |
|
142 | %else: | |
143 | <div class="flag_status rejected pull-left"></div> |
|
143 | <div class="flag_status rejected pull-left"></div> | |
144 | %endif |
|
144 | %endif | |
145 | </td> |
|
145 | </td> | |
146 | <td class="td-description"> |
|
146 | <td class="td-description"> | |
147 | ${integration.name} |
|
147 | ${integration.name} | |
148 | </td> |
|
148 | </td> | |
149 | <td class="td-icon"> |
|
149 | <td class="td-icon"> | |
150 | %if integration.integration_type in available_integrations: |
|
150 | %if integration.integration_type in available_integrations: | |
151 | <div class="integration-icon"> |
|
151 | <div class="integration-icon"> | |
152 | ${available_integrations[integration.integration_type].icon|n} |
|
152 | ${available_integrations[integration.integration_type].icon|n} | |
153 | </div> |
|
153 | </div> | |
154 | %else: |
|
154 | %else: | |
155 | ? |
|
155 | ? | |
156 | %endif |
|
156 | %endif | |
157 | </td> |
|
157 | </td> | |
158 | <td class="td-type"> |
|
158 | <td class="td-type"> | |
159 | ${integration.integration_type} |
|
159 | ${integration.integration_type} | |
160 | </td> |
|
160 | </td> | |
161 | <td class="td-scope"> |
|
161 | <td class="td-scope"> | |
162 | %if integration.repo: |
|
162 | %if integration.repo: | |
163 | <a href="${h.url('summary_home', repo_name=integration.repo.repo_name)}"> |
|
163 | <a href="${h.url('summary_home', repo_name=integration.repo.repo_name)}"> | |
164 | ${_('repo')}:${integration.repo.repo_name} |
|
164 | ${_('repo')}:${integration.repo.repo_name} | |
165 | </a> |
|
165 | </a> | |
166 | %elif integration.repo_group: |
|
166 | %elif integration.repo_group: | |
167 | <a href="${h.url('repo_group_home', group_name=integration.repo_group.group_name)}"> |
|
167 | <a href="${h.url('repo_group_home', group_name=integration.repo_group.group_name)}"> | |
168 | ${_('repogroup')}:${integration.repo_group.group_name} |
|
168 | ${_('repogroup')}:${integration.repo_group.group_name} | |
169 | %if integration.child_repos_only: |
|
169 | %if integration.child_repos_only: | |
170 | ${_('child repos only')} |
|
170 | ${_('child repos only')} | |
171 | %else: |
|
171 | %else: | |
172 | ${_('cascade to all')} |
|
172 | ${_('cascade to all')} | |
173 | %endif |
|
173 | %endif | |
174 | </a> |
|
174 | </a> | |
175 | %else: |
|
175 | %else: | |
176 | %if integration.child_repos_only: |
|
176 | %if integration.child_repos_only: | |
177 | ${_('top level repos only')} |
|
177 | ${_('top level repos only')} | |
178 | %else: |
|
178 | %else: | |
179 | ${_('global')} |
|
179 | ${_('global')} | |
180 | %endif |
|
180 | %endif | |
181 | </td> |
|
181 | </td> | |
182 | %endif |
|
182 | %endif | |
183 | <td class="td-action"> |
|
183 | <td class="td-action"> | |
184 | %if not IntegrationType: |
|
184 | %if not IntegrationType: | |
185 | ${_('unknown integration')} |
|
185 | ${_('unknown integration')} | |
186 | %else: |
|
186 | %else: | |
187 | <% |
|
187 | <% | |
188 | if c.repo: |
|
188 | if c.repo: | |
189 | edit_url = request.route_path('repo_integrations_edit', |
|
189 | edit_url = request.route_path('repo_integrations_edit', | |
190 | repo_name=c.repo.repo_name, |
|
190 | repo_name=c.repo.repo_name, | |
191 | integration=integration.integration_type, |
|
191 | integration=integration.integration_type, | |
192 | integration_id=integration.integration_id) |
|
192 | integration_id=integration.integration_id) | |
193 | elif c.repo_group: |
|
193 | elif c.repo_group: | |
194 | edit_url = request.route_path('repo_group_integrations_edit', |
|
194 | edit_url = request.route_path('repo_group_integrations_edit', | |
195 | repo_group_name=c.repo_group.group_name, |
|
195 | repo_group_name=c.repo_group.group_name, | |
196 | integration=integration.integration_type, |
|
196 | integration=integration.integration_type, | |
197 | integration_id=integration.integration_id) |
|
197 | integration_id=integration.integration_id) | |
198 | else: |
|
198 | else: | |
199 | edit_url = request.route_path('global_integrations_edit', |
|
199 | edit_url = request.route_path('global_integrations_edit', | |
200 | integration=integration.integration_type, |
|
200 | integration=integration.integration_type, | |
201 | integration_id=integration.integration_id) |
|
201 | integration_id=integration.integration_id) | |
202 | %> |
|
202 | %> | |
203 | <div class="grid_edit"> |
|
203 | <div class="grid_edit"> | |
204 | <a href="${edit_url}">${_('Edit')}</a> |
|
204 | <a href="${edit_url}">${_('Edit')}</a> | |
205 | </div> |
|
205 | </div> | |
206 | <div class="grid_delete"> |
|
206 | <div class="grid_delete"> | |
207 | <a href="${edit_url}" |
|
207 | <a href="${edit_url}" | |
208 | class="btn btn-link btn-danger delete_integration_entry" |
|
208 | class="btn btn-link btn-danger delete_integration_entry" | |
209 | data-desc="${integration.name}" |
|
209 | data-desc="${integration.name}" | |
210 | data-uid="${integration.integration_id}"> |
|
210 | data-uid="${integration.integration_id}"> | |
211 | ${_('Delete')} |
|
211 | ${_('Delete')} | |
212 | </a> |
|
212 | </a> | |
213 | </div> |
|
213 | </div> | |
214 | %endif |
|
214 | %endif | |
215 | </td> |
|
215 | </td> | |
216 | </tr> |
|
216 | </tr> | |
217 | %endfor |
|
217 | %endfor | |
218 | <tr id="last-row"></tr> |
|
218 | <tr id="last-row"></tr> | |
219 | </tbody> |
|
219 | </tbody> | |
220 | </table> |
|
220 | </table> | |
221 | <div class="integrations-paginator"> |
|
221 | <div class="integrations-paginator"> | |
222 | <div class="pagination-wh pagination-left"> |
|
222 | <div class="pagination-wh pagination-left"> | |
223 | ${integrations_list.pager('$link_previous ~2~ $link_next')} |
|
223 | ${integrations_list.pager('$link_previous ~2~ $link_next')} | |
224 | </div> |
|
224 | </div> | |
225 | </div> |
|
225 | </div> | |
226 | </div> |
|
226 | </div> | |
227 | </div> |
|
227 | </div> | |
228 | <script type="text/javascript"> |
|
228 | <script type="text/javascript"> | |
229 | var delete_integration = function(entry) { |
|
229 | var delete_integration = function(entry) { | |
230 | if (confirm("Confirm to remove this integration: "+$(entry).data('desc'))) { |
|
230 | if (confirm("Confirm to remove this integration: "+$(entry).data('desc'))) { | |
231 | var request = $.ajax({ |
|
231 | var request = $.ajax({ | |
232 | type: "POST", |
|
232 | type: "POST", | |
233 | url: $(entry).attr('href'), |
|
233 | url: $(entry).attr('href'), | |
234 | data: { |
|
234 | data: { | |
235 | 'delete': 'delete', |
|
235 | 'delete': 'delete', | |
236 | 'csrf_token': CSRF_TOKEN |
|
236 | 'csrf_token': CSRF_TOKEN | |
237 | }, |
|
237 | }, | |
238 | success: function(){ |
|
238 | success: function(){ | |
239 | location.reload(); |
|
239 | location.reload(); | |
240 | }, |
|
240 | }, | |
241 | error: function(data, textStatus, errorThrown){ |
|
241 | error: function(data, textStatus, errorThrown){ | |
242 | alert("Error while deleting entry.\nError code {0} ({1}). URL: {2}".format(data.status,data.statusText,$(entry)[0].url)); |
|
242 | alert("Error while deleting entry.\nError code {0} ({1}). URL: {2}".format(data.status,data.statusText,$(entry)[0].url)); | |
243 | } |
|
243 | } | |
244 | }); |
|
244 | }); | |
245 | }; |
|
245 | }; | |
246 | } |
|
246 | }; | |
247 |
|
247 | |||
248 | $('.delete_integration_entry').on('click', function(e){ |
|
248 | $('.delete_integration_entry').on('click', function(e){ | |
249 | e.preventDefault(); |
|
249 | e.preventDefault(); | |
250 | delete_integration(this); |
|
250 | delete_integration(this); | |
251 | }); |
|
251 | }); | |
252 | </script> No newline at end of file |
|
252 | </script> |
@@ -1,78 +1,78 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.mako"/> |
|
2 | <%inherit file="/base/base.mako"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('My Notifications')} ${c.rhodecode_user.username} |
|
5 | ${_('My Notifications')} ${c.rhodecode_user.username} | |
6 | %if c.rhodecode_name: |
|
6 | %if c.rhodecode_name: | |
7 | · ${h.branding(c.rhodecode_name)} |
|
7 | · ${h.branding(c.rhodecode_name)} | |
8 | %endif |
|
8 | %endif | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="breadcrumbs_links()"> |
|
11 | <%def name="breadcrumbs_links()"> | |
12 | ${_('My Notifications')} |
|
12 | ${_('My Notifications')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="menu_bar_nav()"> |
|
15 | <%def name="menu_bar_nav()"> | |
16 | ${self.menu_items(active='admin')} |
|
16 | ${self.menu_items(active='admin')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
24 | ##<ul class="links"> |
|
24 | ##<ul class="links"> | |
25 | ## <li> |
|
25 | ## <li> | |
26 | ## <span ><a href="#">${_('Compose message')}</a></span> |
|
26 | ## <span ><a href="#">${_('Compose message')}</a></span> | |
27 | ## </li> |
|
27 | ## </li> | |
28 | ##</ul> |
|
28 | ##</ul> | |
29 |
|
29 | |||
30 | <div class="notifications_buttons"> |
|
30 | <div class="notifications_buttons"> | |
31 | <span id='all' class="action-link first ${'active' if c.current_filter=='all' else ''}"><a href="${h.url.current()}">${_('All')}</a></span> |
|
31 | <span id='all' class="action-link first ${'active' if c.current_filter=='all' else ''}"><a href="${h.url.current()}">${_('All')}</a></span> | |
32 | <span id='comment' class="action-link ${'active' if c.current_filter=='comment' else ''}"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> |
|
32 | <span id='comment' class="action-link ${'active' if c.current_filter=='comment' else ''}"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> | |
33 | <span id='pull_request' class="action-link last ${'active' if c.current_filter=='pull_request' else ''}"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull Requests')}</a></span> |
|
33 | <span id='pull_request' class="action-link last ${'active' if c.current_filter=='pull_request' else ''}"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull Requests')}</a></span> | |
34 |
|
34 | |||
35 | %if c.notifications: |
|
35 | %if c.notifications: | |
36 |
|
36 | |||
37 | <span id='mark_all_read' class="btn btn-default">${_('Mark all as read')}</span> |
|
37 | <span id='mark_all_read' class="btn btn-default">${_('Mark all as read')}</span> | |
38 |
|
38 | |||
39 | %endif |
|
39 | %endif | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 | <div id='notification_data' class='main-content-full'> |
|
42 | <div id='notification_data' class='main-content-full'> | |
43 | <%include file='notifications_data.mako'/> |
|
43 | <%include file='notifications_data.mako'/> | |
44 | </div> |
|
44 | </div> | |
45 | </div> |
|
45 | </div> | |
46 | <script type="text/javascript"> |
|
46 | <script type="text/javascript"> | |
47 | var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; |
|
47 | var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; | |
48 | var run = function(){ |
|
48 | var run = function(){ | |
49 | $('#notification_data').on('click','.delete-notification',function(e){ |
|
49 | $('#notification_data').on('click','.delete-notification',function(e){ | |
50 | var notification_id = e.currentTarget.id; |
|
50 | var notification_id = e.currentTarget.id; | |
51 | deleteNotification(url_action,notification_id) |
|
51 | deleteNotification(url_action,notification_id) | |
52 | }) |
|
52 | }); | |
53 | $('#notification_data').on('click','.read-notification',function(e){ |
|
53 | $('#notification_data').on('click','.read-notification',function(e){ | |
54 | var notification_id = e.currentTarget.id; |
|
54 | var notification_id = e.currentTarget.id; | |
55 | readNotification(url_action,notification_id) |
|
55 | readNotification(url_action,notification_id) | |
56 | }) |
|
56 | }) | |
57 | } |
|
57 | }; | |
58 | run(); |
|
58 | run(); | |
59 | $('#mark_all_read').on('click',function(e){ |
|
59 | $('#mark_all_read').on('click',function(e){ | |
60 | //set notifications as read |
|
60 | //set notifications as read | |
61 | var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}"; |
|
61 | var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}"; | |
62 | $.post(url, {'csrf_token': CSRF_TOKEN}). |
|
62 | $.post(url, {'csrf_token': CSRF_TOKEN}). | |
63 | done(function(data){ |
|
63 | done(function(data){ | |
64 | // hide notifications counter |
|
64 | // hide notifications counter | |
65 | $('#quick_login_link > .menu_link_notifications').hide(); |
|
65 | $('#quick_login_link > .menu_link_notifications').hide(); | |
66 | $('#notification_data').html(data); |
|
66 | $('#notification_data').html(data); | |
67 | }) |
|
67 | }) | |
68 | .fail(function(data, textStatus, errorThrown){ |
|
68 | .fail(function(data, textStatus, errorThrown){ | |
69 | alert("Error while saving notifications.\nError code {0} ({1}). URL: {2}".format(data.status,data.statusText,$(this)[0].url)); |
|
69 | alert("Error while saving notifications.\nError code {0} ({1}). URL: {2}".format(data.status,data.statusText,$(this)[0].url)); | |
70 | }); |
|
70 | }); | |
71 | }) |
|
71 | }); | |
72 |
|
72 | |||
73 | var current_filter = $("${c.current_filter}"); |
|
73 | var current_filter = $("${c.current_filter}"); | |
74 | if (current_filter.length){ |
|
74 | if (current_filter.length){ | |
75 | current_filter.addClass('active'); |
|
75 | current_filter.addClass('active'); | |
76 | } |
|
76 | } | |
77 | </script> |
|
77 | </script> | |
78 | </%def> |
|
78 | </%def> |
@@ -1,296 +1,295 b'' | |||||
1 | ${h.secure_form(url('admin_settings_global'), method='post')} |
|
1 | ${h.secure_form(url('admin_settings_global'), method='post')} | |
2 |
|
2 | |||
3 | <div class="panel panel-default"> |
|
3 | <div class="panel panel-default"> | |
4 | <div class="panel-heading" id="branding-options"> |
|
4 | <div class="panel-heading" id="branding-options"> | |
5 | <h3 class="panel-title">${_('Branding')} <a class="permalink" href="#branding-options"> ΒΆ</a></h3> |
|
5 | <h3 class="panel-title">${_('Branding')} <a class="permalink" href="#branding-options"> ΒΆ</a></h3> | |
6 | </div> |
|
6 | </div> | |
7 | <div class="panel-body"> |
|
7 | <div class="panel-body"> | |
8 | <div class="label"> |
|
8 | <div class="label"> | |
9 | <label for="rhodecode_title">${_('Title')}</label> |
|
9 | <label for="rhodecode_title">${_('Title')}</label> | |
10 | </div> |
|
10 | </div> | |
11 | <div class="field input"> |
|
11 | <div class="field input"> | |
12 | ${h.text('rhodecode_title',size=60)} |
|
12 | ${h.text('rhodecode_title',size=60)} | |
13 | </div> |
|
13 | </div> | |
14 | <div class="field"> |
|
14 | <div class="field"> | |
15 | <span class="help-block"> |
|
15 | <span class="help-block"> | |
16 | ${_('Set a custom title for your RhodeCode instance (limited to 40 characters).')} |
|
16 | ${_('Set a custom title for your RhodeCode instance (limited to 40 characters).')} | |
17 | </span> |
|
17 | </span> | |
18 | </div> |
|
18 | </div> | |
19 | <div class="label"> |
|
19 | <div class="label"> | |
20 | <label for="rhodecode_realm">${_('HTTP[S] authentication realm')}</label> |
|
20 | <label for="rhodecode_realm">${_('HTTP[S] authentication realm')}</label> | |
21 | </div> |
|
21 | </div> | |
22 | <div class="field input"> |
|
22 | <div class="field input"> | |
23 | ${h.text('rhodecode_realm',size=60)} |
|
23 | ${h.text('rhodecode_realm',size=60)} | |
24 | </div> |
|
24 | </div> | |
25 | <div class="field"> |
|
25 | <div class="field"> | |
26 | <span class="help-block"> |
|
26 | <span class="help-block"> | |
27 | ${_('Set a custom text that is shown as authentication message to clients trying to connect.')} |
|
27 | ${_('Set a custom text that is shown as authentication message to clients trying to connect.')} | |
28 | </span> |
|
28 | </span> | |
29 | </div> |
|
29 | </div> | |
30 | </div> |
|
30 | </div> | |
31 | </div> |
|
31 | </div> | |
32 |
|
32 | |||
33 |
|
33 | |||
34 | <div class="panel panel-default"> |
|
34 | <div class="panel panel-default"> | |
35 | <div class="panel-heading" id="personal-group-options"> |
|
35 | <div class="panel-heading" id="personal-group-options"> | |
36 | <h3 class="panel-title">${_('Personal Repository Group')} <a class="permalink" href="#personal-group-options"> ΒΆ</a></h3> |
|
36 | <h3 class="panel-title">${_('Personal Repository Group')} <a class="permalink" href="#personal-group-options"> ΒΆ</a></h3> | |
37 | </div> |
|
37 | </div> | |
38 | <div class="panel-body"> |
|
38 | <div class="panel-body"> | |
39 | <div class="checkbox"> |
|
39 | <div class="checkbox"> | |
40 | ${h.checkbox('rhodecode_create_personal_repo_group','True')} |
|
40 | ${h.checkbox('rhodecode_create_personal_repo_group','True')} | |
41 | <label for="rhodecode_create_personal_repo_group">${_('Create Personal Repository Group')}</label> |
|
41 | <label for="rhodecode_create_personal_repo_group">${_('Create Personal Repository Group')}</label> | |
42 | </div> |
|
42 | </div> | |
43 | <span class="help-block"> |
|
43 | <span class="help-block"> | |
44 | ${_('Always create Personal Repository Groups for new users.')} <br/> |
|
44 | ${_('Always create Personal Repository Groups for new users.')} <br/> | |
45 | ${_('When creating new users from add user form or API you can still turn this off via a checkbox or flag')} |
|
45 | ${_('When creating new users from add user form or API you can still turn this off via a checkbox or flag')} | |
46 | </span> |
|
46 | </span> | |
47 |
|
47 | |||
48 | <div class="label"> |
|
48 | <div class="label"> | |
49 | <label for="rhodecode_personal_repo_group_pattern">${_('Personal Repo Group Pattern')}</label> |
|
49 | <label for="rhodecode_personal_repo_group_pattern">${_('Personal Repo Group Pattern')}</label> | |
50 | </div> |
|
50 | </div> | |
51 | <div class="field input"> |
|
51 | <div class="field input"> | |
52 | ${h.text('rhodecode_personal_repo_group_pattern',size=60, placeholder=c.personal_repo_group_default_pattern)} |
|
52 | ${h.text('rhodecode_personal_repo_group_pattern',size=60, placeholder=c.personal_repo_group_default_pattern)} | |
53 | </div> |
|
53 | </div> | |
54 | <span class="help-block"> |
|
54 | <span class="help-block"> | |
55 | ${_('Pattern used to create Personal Repository Groups. Prefix can be other existing repository group path[s], eg. /u/${username}')} <br/> |
|
55 | ${_('Pattern used to create Personal Repository Groups. Prefix can be other existing repository group path[s], eg. /u/${username}')} <br/> | |
56 | ${_('Available variables are currently ${username} and ${user_id}')} |
|
56 | ${_('Available variables are currently ${username} and ${user_id}')} | |
57 | </span> |
|
57 | </span> | |
58 | </div> |
|
58 | </div> | |
59 | </div> |
|
59 | </div> | |
60 |
|
60 | |||
61 |
|
61 | |||
62 | <div class="panel panel-default"> |
|
62 | <div class="panel panel-default"> | |
63 | <div class="panel-heading" id="captcha-options"> |
|
63 | <div class="panel-heading" id="captcha-options"> | |
64 | <h3 class="panel-title">${_('Registration Captcha')} <a class="permalink" href="#captcha-options"> ΒΆ</a></h3> |
|
64 | <h3 class="panel-title">${_('Registration Captcha')} <a class="permalink" href="#captcha-options"> ΒΆ</a></h3> | |
65 | </div> |
|
65 | </div> | |
66 | <div class="panel-body"> |
|
66 | <div class="panel-body"> | |
67 | <div class="label"> |
|
67 | <div class="label"> | |
68 | <label for="rhodecode_captcha_public_key">${_('Google ReCaptcha public key')}</label> |
|
68 | <label for="rhodecode_captcha_public_key">${_('Google ReCaptcha public key')}</label> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="field input"> |
|
70 | <div class="field input"> | |
71 | ${h.text('rhodecode_captcha_public_key',size=60)} |
|
71 | ${h.text('rhodecode_captcha_public_key',size=60)} | |
72 | </div> |
|
72 | </div> | |
73 | <div class="field"> |
|
73 | <div class="field"> | |
74 | <span class="help-block"> |
|
74 | <span class="help-block"> | |
75 | ${_('Public key for reCaptcha system.')} |
|
75 | ${_('Public key for reCaptcha system.')} | |
76 | </span> |
|
76 | </span> | |
77 | </div> |
|
77 | </div> | |
78 |
|
78 | |||
79 | <div class="label"> |
|
79 | <div class="label"> | |
80 | <label for="rhodecode_captcha_private_key">${_('Google ReCaptcha private key')}</label> |
|
80 | <label for="rhodecode_captcha_private_key">${_('Google ReCaptcha private key')}</label> | |
81 | </div> |
|
81 | </div> | |
82 | <div class="field input"> |
|
82 | <div class="field input"> | |
83 | ${h.text('rhodecode_captcha_private_key',size=60)} |
|
83 | ${h.text('rhodecode_captcha_private_key',size=60)} | |
84 | </div> |
|
84 | </div> | |
85 | <div class="field"> |
|
85 | <div class="field"> | |
86 | <span class="help-block"> |
|
86 | <span class="help-block"> | |
87 | ${_('Private key for reCaptcha system. Setting this value will enable captcha on registration')} |
|
87 | ${_('Private key for reCaptcha system. Setting this value will enable captcha on registration')} | |
88 | </span> |
|
88 | </span> | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 |
|
92 | |||
93 | <div class="panel panel-default"> |
|
93 | <div class="panel panel-default"> | |
94 | <div class="panel-heading" id="header-code-options"> |
|
94 | <div class="panel-heading" id="header-code-options"> | |
95 | <h3 class="panel-title">${_('Custom Header Code')} <a class="permalink" href="#header-code-options"> ΒΆ</a></h3> |
|
95 | <h3 class="panel-title">${_('Custom Header Code')} <a class="permalink" href="#header-code-options"> ΒΆ</a></h3> | |
96 | </div> |
|
96 | </div> | |
97 | <div class="panel-body"> |
|
97 | <div class="panel-body"> | |
98 | <div class="select"> |
|
98 | <div class="select"> | |
99 | <select id="pre_template" > |
|
99 | <select id="pre_template" > | |
100 | <option value="#">${_('Templates...')}</option> |
|
100 | <option value="#">${_('Templates...')}</option> | |
101 | <option value="ga">Google Analytics</option> |
|
101 | <option value="ga">Google Analytics</option> | |
102 | <option value="clicky">Clicky</option> |
|
102 | <option value="clicky">Clicky</option> | |
103 | <option value="server_announce">${_('Server Announcement')}</option> |
|
103 | <option value="server_announce">${_('Server Announcement')}</option> | |
104 | <option value="flash_filtering">${_('Flash message filtering')}</option> |
|
104 | <option value="flash_filtering">${_('Flash message filtering')}</option> | |
105 | </select> |
|
105 | </select> | |
106 | </div> |
|
106 | </div> | |
107 | <div style="padding: 10px 0px"></div> |
|
107 | <div style="padding: 10px 0px"></div> | |
108 | <div class="textarea text-area"> |
|
108 | <div class="textarea text-area"> | |
109 | ${h.textarea('rhodecode_pre_code',cols=23,rows=5,class_="medium")} |
|
109 | ${h.textarea('rhodecode_pre_code',cols=23,rows=5,class_="medium")} | |
110 | <span class="help-block">${_('Custom js/css code added at the end of the <header/> tag.')} |
|
110 | <span class="help-block">${_('Custom js/css code added at the end of the <header/> tag.')} | |
111 | ${_('Use <script/> or <css/> tags to define custom styling or scripting')}</span> |
|
111 | ${_('Use <script/> or <css/> tags to define custom styling or scripting')}</span> | |
112 | </div> |
|
112 | </div> | |
113 | </div> |
|
113 | </div> | |
114 | </div> |
|
114 | </div> | |
115 |
|
115 | |||
116 | <div class="panel panel-default"> |
|
116 | <div class="panel panel-default"> | |
117 | <div class="panel-heading" id="footer-code-options"> |
|
117 | <div class="panel-heading" id="footer-code-options"> | |
118 | <h3 class="panel-title">${_('Custom Footer Code')} <a class="permalink" href="#footer-code-options"> ΒΆ</a></h3> |
|
118 | <h3 class="panel-title">${_('Custom Footer Code')} <a class="permalink" href="#footer-code-options"> ΒΆ</a></h3> | |
119 | </div> |
|
119 | </div> | |
120 | <div class="panel-body"> |
|
120 | <div class="panel-body"> | |
121 | <div class="select"> |
|
121 | <div class="select"> | |
122 | <select id="post_template" > |
|
122 | <select id="post_template" > | |
123 | <option value="#">${_('Templates...')}</option> |
|
123 | <option value="#">${_('Templates...')}</option> | |
124 | <option value="ga">Google Analytics</option> |
|
124 | <option value="ga">Google Analytics</option> | |
125 | <option value="clicky">Clicky</option> |
|
125 | <option value="clicky">Clicky</option> | |
126 | <option value="server_announce">${_('Server Announcement')}</option> |
|
126 | <option value="server_announce">${_('Server Announcement')}</option> | |
127 | </select> |
|
127 | </select> | |
128 | </div> |
|
128 | </div> | |
129 | <div style="padding: 10px 0px"></div> |
|
129 | <div style="padding: 10px 0px"></div> | |
130 | <div class="textarea text-area"> |
|
130 | <div class="textarea text-area"> | |
131 | ${h.textarea('rhodecode_post_code',cols=23,rows=5, class_="medium")} |
|
131 | ${h.textarea('rhodecode_post_code',cols=23,rows=5, class_="medium")} | |
132 | <span class="help-block">${_('Custom js/css code added at the end of the <body> tag.')} |
|
132 | <span class="help-block">${_('Custom js/css code added at the end of the <body> tag.')} | |
133 | ${_('Use <script> or <css> tags to define custom styling or scripting')}</span> |
|
133 | ${_('Use <script> or <css> tags to define custom styling or scripting')}</span> | |
134 | </div> |
|
134 | </div> | |
135 | </div> |
|
135 | </div> | |
136 | </div> |
|
136 | </div> | |
137 |
|
137 | |||
138 | <div class="buttons"> |
|
138 | <div class="buttons"> | |
139 | ${h.submit('save',_('Save settings'),class_="btn")} |
|
139 | ${h.submit('save',_('Save settings'),class_="btn")} | |
140 | ${h.reset('reset',_('Reset'),class_="btn")} |
|
140 | ${h.reset('reset',_('Reset'),class_="btn")} | |
141 | </div> |
|
141 | </div> | |
142 | ${h.end_form()} |
|
142 | ${h.end_form()} | |
143 |
|
143 | |||
144 |
|
144 | |||
145 |
|
145 | |||
146 | ## TEMPLATES ## |
|
146 | ## TEMPLATES ## | |
147 | ############### |
|
147 | ############### | |
148 |
|
148 | |||
149 | <script id="ga_tmpl" type="text/x-template"> |
|
149 | <script id="ga_tmpl" type="text/x-template"> | |
150 | <%text filter="h"> |
|
150 | <%text filter="h"> | |
151 | <script> |
|
151 | <script> | |
152 | // Google Analytics |
|
152 | // Google Analytics | |
153 | // Put your Google Analytics code instead of _GACODE_ |
|
153 | // Put your Google Analytics code instead of _GACODE_ | |
154 | var _gaq_code = '_GACODE_'; |
|
154 | var _gaq_code = '_GACODE_'; | |
155 | var _gaq = _gaq || []; |
|
155 | var _gaq = _gaq || []; | |
156 | _gaq.push(['_setAccount', _gaq_code]); |
|
156 | _gaq.push(['_setAccount', _gaq_code]); | |
157 | _gaq.push(['_trackPageview']); |
|
157 | _gaq.push(['_trackPageview']); | |
158 |
|
158 | |||
159 | (function() { |
|
159 | (function() { | |
160 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
|
160 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
161 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
|
161 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
162 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
|
162 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
163 | })(); |
|
163 | })(); | |
164 |
|
164 | |||
165 | rhodecode_statechange_callback = function(url, data){ |
|
165 | rhodecode_statechange_callback = function(url, data){ | |
166 | // ANALYTICS callback on html5 history state changed |
|
166 | // ANALYTICS callback on html5 history state changed | |
167 | // triggered by file browser, url is the new url, |
|
167 | // triggered by file browser, url is the new url, | |
168 | // data is extra info passed from the State object |
|
168 | // data is extra info passed from the State object | |
169 | if (typeof window._gaq !== 'undefined') { |
|
169 | if (typeof window._gaq !== 'undefined') { | |
170 | _gaq.push(['_trackPageview', url]); |
|
170 | _gaq.push(['_trackPageview', url]); | |
171 | } |
|
171 | } | |
172 | }; |
|
172 | }; | |
173 | </script> |
|
173 | </script> | |
174 | </%text> |
|
174 | </%text> | |
175 | </script> |
|
175 | </script> | |
176 |
|
176 | |||
177 |
|
177 | |||
178 |
|
178 | |||
179 | <script id="clicky_tmpl" type="text/x-template"> |
|
179 | <script id="clicky_tmpl" type="text/x-template"> | |
180 | <%text filter="h"> |
|
180 | <%text filter="h"> | |
181 | <script src="//static.getclicky.com/js" type="text/javascript"></script> |
|
181 | <script src="//static.getclicky.com/js" type="text/javascript"></script> | |
182 | <script type="text/javascript"> |
|
182 | <script type="text/javascript"> | |
183 | // Clicky Analytics - should be used in the footer code section. |
|
183 | // Clicky Analytics - should be used in the footer code section. | |
184 | // Put your Clicky code instead of _CLICKYCODE_ here, |
|
184 | // Put your Clicky code instead of _CLICKYCODE_ here, | |
185 | // and below in the <img> tag. |
|
185 | // and below in the <img> tag. | |
186 | var _cl_code = _CLICKYCODE_; |
|
186 | var _cl_code = _CLICKYCODE_; | |
187 | try{clicky.init(_cl_code);}catch(e){} |
|
187 | try{clicky.init(_cl_code);}catch(e){} | |
188 |
|
188 | |||
189 | rhodecode_statechange_callback = function(url, data){ |
|
189 | rhodecode_statechange_callback = function(url, data){ | |
190 | // ANALYTICS callback on html5 history state changed |
|
190 | // ANALYTICS callback on html5 history state changed | |
191 | // triggered by file browser, url is the new url, |
|
191 | // triggered by file browser, url is the new url, | |
192 | // data is extra info passed from the State object |
|
192 | // data is extra info passed from the State object | |
193 | if (typeof window.clicky !== 'undefined') { |
|
193 | if (typeof window.clicky !== 'undefined') { | |
194 | clicky.log(url); |
|
194 | clicky.log(url); | |
195 | } |
|
195 | } | |
196 | } |
|
196 | } | |
197 | </script> |
|
197 | </script> | |
198 | <noscript> |
|
198 | <noscript> | |
199 | // Put your clicky code in the src file. |
|
199 | // Put your clicky code in the src file. | |
200 | <p><img alt="Clicky" width="1" height="1" |
|
200 | <p><img alt="Clicky" width="1" height="1" | |
201 | src="//in.getclicky.com/_CLICKYCODE_ns.gif" /></p> |
|
201 | src="//in.getclicky.com/_CLICKYCODE_ns.gif" /></p> | |
202 | </noscript> |
|
202 | </noscript> | |
203 | </%text> |
|
203 | </%text> | |
204 | </script> |
|
204 | </script> | |
205 |
|
205 | |||
206 |
|
206 | |||
207 |
|
207 | |||
208 | <script id="server_announce_tmpl" type='text/x-template'> |
|
208 | <script id="server_announce_tmpl" type='text/x-template'> | |
209 | <%text filter="h"> |
|
209 | <%text filter="h"> | |
210 | <script> |
|
210 | <script> | |
211 | // Server announcement displayed on the top of the page. |
|
211 | // Server announcement displayed on the top of the page. | |
212 | // This can be used to send a global maintainance messages or other |
|
212 | // This can be used to send a global maintainance messages or other | |
213 | // important messages to all users of the RhodeCode Enterprise system. |
|
213 | // important messages to all users of the RhodeCode Enterprise system. | |
214 |
|
214 | |||
215 | $(document).ready(function(e){ |
|
215 | $(document).ready(function(e){ | |
216 |
|
216 | |||
217 | // EDIT - put your message below |
|
217 | // EDIT - put your message below | |
218 | var message = "TYPE YOUR MESSAGE HERE"; |
|
218 | var message = "TYPE YOUR MESSAGE HERE"; | |
219 |
|
219 | |||
220 | // EDIT - choose "info"/"warning"/"error"/"success"/"neutral" as appropriate |
|
220 | // EDIT - choose "info"/"warning"/"error"/"success"/"neutral" as appropriate | |
221 | var alert_level = "info"; |
|
221 | var alert_level = "info"; | |
222 |
|
222 | |||
223 | $("#body").prepend( |
|
223 | $("#body").prepend( | |
224 | ("<div id='server-announcement' class='"+alert_level+"'>_MSG_"+"</div>").replace("_MSG_", message) |
|
224 | ("<div id='server-announcement' class='"+alert_level+"'>_MSG_"+"</div>").replace("_MSG_", message) | |
225 | ) |
|
225 | ) | |
226 | }) |
|
226 | }) | |
227 | </script> |
|
227 | </script> | |
228 | </%text> |
|
228 | </%text> | |
229 | </script> |
|
229 | </script> | |
230 |
|
230 | |||
231 | <script id="flash_filtering_tmpl" type='text/x-template'> |
|
231 | <script id="flash_filtering_tmpl" type='text/x-template'> | |
232 | <%text filter="h"> |
|
232 | <%text filter="h"> | |
233 | <script> |
|
233 | <script> | |
234 | // This filters out some flash messages before they are presented to user |
|
234 | // This filters out some flash messages before they are presented to user | |
235 | // based on their contents. Could be used to filter out warnings/errors |
|
235 | // based on their contents. Could be used to filter out warnings/errors | |
236 | // of license messages |
|
236 | // of license messages | |
237 |
|
237 | |||
238 | var filteredMessages = []; |
|
238 | var filteredMessages = []; | |
239 | for(var i =0; i< alertMessagePayloads.length; i++){ |
|
239 | for(var i =0; i< alertMessagePayloads.length; i++){ | |
240 | if (typeof alertMessagePayloads[i].message.subdata.subtype !== 'undefined' && |
|
240 | if (typeof alertMessagePayloads[i].message.subdata.subtype !== 'undefined' && | |
241 | alertMessagePayloads[i].message.subdata.subtype.indexOf('rc_license') !== -1){ |
|
241 | alertMessagePayloads[i].message.subdata.subtype.indexOf('rc_license') !== -1){ | |
242 | continue |
|
242 | continue | |
243 | } |
|
243 | } | |
244 | filteredMessages.push(alertMessagePayloads[i]); |
|
244 | filteredMessages.push(alertMessagePayloads[i]); | |
245 | } |
|
245 | } | |
246 | alertMessagePayloads = filteredMessages; |
|
246 | alertMessagePayloads = filteredMessages; | |
247 | </script> |
|
247 | </script> | |
248 | </%text> |
|
248 | </%text> | |
249 | </script> |
|
249 | </script> | |
250 |
|
250 | |||
251 | <script> |
|
251 | <script> | |
252 | var pre_cm = initCodeMirror('rhodecode_pre_code', '', false); |
|
252 | var pre_cm = initCodeMirror('rhodecode_pre_code', '', false); | |
253 | var pre_old = pre_cm.getValue(); |
|
253 | var pre_old = pre_cm.getValue(); | |
254 |
|
254 | |||
255 | var post_cm = initCodeMirror('rhodecode_post_code', '', false); |
|
255 | var post_cm = initCodeMirror('rhodecode_post_code', '', false); | |
256 | var post_old = post_cm.getValue(); |
|
256 | var post_old = post_cm.getValue(); | |
257 |
|
257 | |||
258 | var get_data = function(type, old){ |
|
258 | var get_data = function(type, old){ | |
259 | var get_tmpl = function(tmpl_name){ |
|
259 | var get_tmpl = function(tmpl_name){ | |
260 | // unescape some stuff |
|
260 | // unescape some stuff | |
261 |
|
|
261 | return htmlEnDeCode.htmlDecode($('#'+tmpl_name+'_tmpl').html()); | |
262 | return html; |
|
|||
263 | }; |
|
262 | }; | |
264 | return { |
|
263 | return { | |
265 | '#': old, |
|
264 | '#': old, | |
266 | 'ga': get_tmpl('ga'), |
|
265 | 'ga': get_tmpl('ga'), | |
267 | 'clicky': get_tmpl('clicky'), |
|
266 | 'clicky': get_tmpl('clicky'), | |
268 | 'server_announce': get_tmpl('server_announce'), |
|
267 | 'server_announce': get_tmpl('server_announce'), | |
269 | 'flash_filtering': get_tmpl('flash_filtering') |
|
268 | 'flash_filtering': get_tmpl('flash_filtering') | |
270 | }[type] |
|
269 | }[type] | |
271 | }; |
|
270 | }; | |
272 |
|
271 | |||
273 | $('#pre_template').select2({ |
|
272 | $('#pre_template').select2({ | |
274 | containerCssClass: 'drop-menu', |
|
273 | containerCssClass: 'drop-menu', | |
275 | dropdownCssClass: 'drop-menu-dropdown', |
|
274 | dropdownCssClass: 'drop-menu-dropdown', | |
276 | dropdownAutoWidth: true, |
|
275 | dropdownAutoWidth: true, | |
277 | minimumResultsForSearch: -1 |
|
276 | minimumResultsForSearch: -1 | |
278 | }); |
|
277 | }); | |
279 |
|
278 | |||
280 | $('#post_template').select2({ |
|
279 | $('#post_template').select2({ | |
281 | containerCssClass: 'drop-menu', |
|
280 | containerCssClass: 'drop-menu', | |
282 | dropdownCssClass: 'drop-menu-dropdown', |
|
281 | dropdownCssClass: 'drop-menu-dropdown', | |
283 | dropdownAutoWidth: true, |
|
282 | dropdownAutoWidth: true, | |
284 | minimumResultsForSearch: -1 |
|
283 | minimumResultsForSearch: -1 | |
285 | }); |
|
284 | }); | |
286 |
|
285 | |||
287 | $('#post_template').on('change', function(e){ |
|
286 | $('#post_template').on('change', function(e){ | |
288 | var sel = this.value; |
|
287 | var sel = this.value; | |
289 | post_cm.setValue(get_data(sel, post_old)) |
|
288 | post_cm.setValue(get_data(sel, post_old)) | |
290 | }); |
|
289 | }); | |
291 |
|
290 | |||
292 | $('#pre_template').on('change', function(e){ |
|
291 | $('#pre_template').on('change', function(e){ | |
293 | var sel = this.value; |
|
292 | var sel = this.value; | |
294 | pre_cm.setValue(get_data(sel, pre_old)) |
|
293 | pre_cm.setValue(get_data(sel, pre_old)) | |
295 | }) |
|
294 | }) | |
296 | </script> |
|
295 | </script> |
@@ -1,147 +1,147 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.mako"/> |
|
2 | <%inherit file="/base/base.mako"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Add user')} |
|
5 | ${_('Add user')} | |
6 | %if c.rhodecode_name: |
|
6 | %if c.rhodecode_name: | |
7 | · ${h.branding(c.rhodecode_name)} |
|
7 | · ${h.branding(c.rhodecode_name)} | |
8 | %endif |
|
8 | %endif | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="breadcrumbs_links()"> |
|
10 | <%def name="breadcrumbs_links()"> | |
11 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
11 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
12 | » |
|
12 | » | |
13 | ${h.link_to(_('Users'),h.url('users'))} |
|
13 | ${h.link_to(_('Users'),h.url('users'))} | |
14 | » |
|
14 | » | |
15 | ${_('Add User')} |
|
15 | ${_('Add User')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="menu_bar_nav()"> |
|
18 | <%def name="menu_bar_nav()"> | |
19 | ${self.menu_items(active='admin')} |
|
19 | ${self.menu_items(active='admin')} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="main()"> |
|
22 | <%def name="main()"> | |
23 | <div class="box"> |
|
23 | <div class="box"> | |
24 | <!-- box / title --> |
|
24 | <!-- box / title --> | |
25 | <div class="title"> |
|
25 | <div class="title"> | |
26 | ${self.breadcrumbs()} |
|
26 | ${self.breadcrumbs()} | |
27 | </div> |
|
27 | </div> | |
28 | <!-- end box / title --> |
|
28 | <!-- end box / title --> | |
29 | ${h.secure_form(url('users'))} |
|
29 | ${h.secure_form(url('users'))} | |
30 | <div class="form"> |
|
30 | <div class="form"> | |
31 | <!-- fields --> |
|
31 | <!-- fields --> | |
32 | <div class="fields"> |
|
32 | <div class="fields"> | |
33 | <div class="field"> |
|
33 | <div class="field"> | |
34 | <div class="label"> |
|
34 | <div class="label"> | |
35 | <label for="username">${_('Username')}:</label> |
|
35 | <label for="username">${_('Username')}:</label> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="input"> |
|
37 | <div class="input"> | |
38 | ${h.text('username', class_='medium')} |
|
38 | ${h.text('username', class_='medium')} | |
39 | </div> |
|
39 | </div> | |
40 | </div> |
|
40 | </div> | |
41 |
|
41 | |||
42 | <div class="field"> |
|
42 | <div class="field"> | |
43 | <div class="label"> |
|
43 | <div class="label"> | |
44 | <label for="password">${_('Password')}:</label> |
|
44 | <label for="password">${_('Password')}:</label> | |
45 | </div> |
|
45 | </div> | |
46 | <div class="input"> |
|
46 | <div class="input"> | |
47 | ${h.password('password', class_='medium')} |
|
47 | ${h.password('password', class_='medium')} | |
48 | </div> |
|
48 | </div> | |
49 | </div> |
|
49 | </div> | |
50 |
|
50 | |||
51 | <div class="field"> |
|
51 | <div class="field"> | |
52 | <div class="label"> |
|
52 | <div class="label"> | |
53 | <label for="password_confirmation">${_('Password confirmation')}:</label> |
|
53 | <label for="password_confirmation">${_('Password confirmation')}:</label> | |
54 | </div> |
|
54 | </div> | |
55 | <div class="input"> |
|
55 | <div class="input"> | |
56 | ${h.password('password_confirmation',autocomplete="off", class_='medium')} |
|
56 | ${h.password('password_confirmation',autocomplete="off", class_='medium')} | |
57 | <div class="info-block"> |
|
57 | <div class="info-block"> | |
58 | <a id="generate_password" href="#"> |
|
58 | <a id="generate_password" href="#"> | |
59 | <i class="icon-lock"></i> ${_('Generate password')} |
|
59 | <i class="icon-lock"></i> ${_('Generate password')} | |
60 | </a> |
|
60 | </a> | |
61 | <span id="generate_password_preview"></span> |
|
61 | <span id="generate_password_preview"></span> | |
62 | </div> |
|
62 | </div> | |
63 | </div> |
|
63 | </div> | |
64 | </div> |
|
64 | </div> | |
65 |
|
65 | |||
66 | <div class="field"> |
|
66 | <div class="field"> | |
67 | <div class="label"> |
|
67 | <div class="label"> | |
68 | <label for="firstname">${_('First Name')}:</label> |
|
68 | <label for="firstname">${_('First Name')}:</label> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="input"> |
|
70 | <div class="input"> | |
71 | ${h.text('firstname', class_='medium')} |
|
71 | ${h.text('firstname', class_='medium')} | |
72 | </div> |
|
72 | </div> | |
73 | </div> |
|
73 | </div> | |
74 |
|
74 | |||
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label"> |
|
76 | <div class="label"> | |
77 | <label for="lastname">${_('Last Name')}:</label> |
|
77 | <label for="lastname">${_('Last Name')}:</label> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="input"> |
|
79 | <div class="input"> | |
80 | ${h.text('lastname', class_='medium')} |
|
80 | ${h.text('lastname', class_='medium')} | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 |
|
83 | |||
84 | <div class="field"> |
|
84 | <div class="field"> | |
85 | <div class="label"> |
|
85 | <div class="label"> | |
86 | <label for="email">${_('Email')}:</label> |
|
86 | <label for="email">${_('Email')}:</label> | |
87 | </div> |
|
87 | </div> | |
88 | <div class="input"> |
|
88 | <div class="input"> | |
89 | ${h.text('email', class_='medium')} |
|
89 | ${h.text('email', class_='medium')} | |
90 | ${h.hidden('extern_name', c.default_extern_type)} |
|
90 | ${h.hidden('extern_name', c.default_extern_type)} | |
91 | ${h.hidden('extern_type', c.default_extern_type)} |
|
91 | ${h.hidden('extern_type', c.default_extern_type)} | |
92 | </div> |
|
92 | </div> | |
93 | </div> |
|
93 | </div> | |
94 |
|
94 | |||
95 | <div class="field"> |
|
95 | <div class="field"> | |
96 | <div class="label label-checkbox"> |
|
96 | <div class="label label-checkbox"> | |
97 | <label for="active">${_('Active')}:</label> |
|
97 | <label for="active">${_('Active')}:</label> | |
98 | </div> |
|
98 | </div> | |
99 | <div class="checkboxes"> |
|
99 | <div class="checkboxes"> | |
100 | ${h.checkbox('active',value=True,checked='checked')} |
|
100 | ${h.checkbox('active',value=True,checked='checked')} | |
101 | </div> |
|
101 | </div> | |
102 | </div> |
|
102 | </div> | |
103 |
|
103 | |||
104 | <div class="field"> |
|
104 | <div class="field"> | |
105 | <div class="label label-checkbox"> |
|
105 | <div class="label label-checkbox"> | |
106 | <label for="password_change">${_('Password change')}:</label> |
|
106 | <label for="password_change">${_('Password change')}:</label> | |
107 | </div> |
|
107 | </div> | |
108 | <div class="checkboxes"> |
|
108 | <div class="checkboxes"> | |
109 | ${h.checkbox('password_change',value=True)} |
|
109 | ${h.checkbox('password_change',value=True)} | |
110 | <span class="help-block">${_('Force user to change his password on the next login')}</span> |
|
110 | <span class="help-block">${_('Force user to change his password on the next login')}</span> | |
111 | </div> |
|
111 | </div> | |
112 | </div> |
|
112 | </div> | |
113 |
|
113 | |||
114 | <div class="field"> |
|
114 | <div class="field"> | |
115 | <div class="label label-checkbox"> |
|
115 | <div class="label label-checkbox"> | |
116 | <label for="create_repo_group">${_('Add personal repository group')}:</label> |
|
116 | <label for="create_repo_group">${_('Add personal repository group')}:</label> | |
117 | </div> |
|
117 | </div> | |
118 | <div class="checkboxes"> |
|
118 | <div class="checkboxes"> | |
119 | ${h.checkbox('create_repo_group',value=True, checked=c.default_create_repo_group)} |
|
119 | ${h.checkbox('create_repo_group',value=True, checked=c.default_create_repo_group)} | |
120 | <span class="help-block"> |
|
120 | <span class="help-block"> | |
121 | ${_('New group will be created at: `/%(path)s`') % {'path': c.personal_repo_group_name}}<br/> |
|
121 | ${_('New group will be created at: `/%(path)s`') % {'path': c.personal_repo_group_name}}<br/> | |
122 | ${_('User will be automatically set as this group owner.')} |
|
122 | ${_('User will be automatically set as this group owner.')} | |
123 | </span> |
|
123 | </span> | |
124 | </div> |
|
124 | </div> | |
125 | </div> |
|
125 | </div> | |
126 |
|
126 | |||
127 | <div class="buttons"> |
|
127 | <div class="buttons"> | |
128 | ${h.submit('save',_('Save'),class_="btn")} |
|
128 | ${h.submit('save',_('Save'),class_="btn")} | |
129 | </div> |
|
129 | </div> | |
130 | </div> |
|
130 | </div> | |
131 | </div> |
|
131 | </div> | |
132 | ${h.end_form()} |
|
132 | ${h.end_form()} | |
133 | </div> |
|
133 | </div> | |
134 | <script> |
|
134 | <script> | |
135 | $(document).ready(function(){ |
|
135 | $(document).ready(function(){ | |
136 | $('#username').focus(); |
|
136 | $('#username').focus(); | |
137 |
|
137 | |||
138 | $('#generate_password').on('click', function(e){ |
|
138 | $('#generate_password').on('click', function(e){ | |
139 | var tmpl = "(${_('generated password:')} {0})" |
|
139 | var tmpl = "(${_('generated password:')} {0})"; | |
140 | var new_passwd = generatePassword(12) |
|
140 | var new_passwd = generatePassword(12); | |
141 | $('#generate_password_preview').html(tmpl.format(new_passwd)) |
|
141 | $('#generate_password_preview').html(tmpl.format(new_passwd)); | |
142 | $('#password').val(new_passwd); |
|
142 | $('#password').val(new_passwd); | |
143 | $('#password_confirmation').val(new_passwd); |
|
143 | $('#password_confirmation').val(new_passwd); | |
144 | }) |
|
144 | }) | |
145 | }) |
|
145 | }) | |
146 | </script> |
|
146 | </script> | |
147 | </%def> |
|
147 | </%def> |
@@ -1,71 +1,71 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <div class="panel panel-default"> |
|
3 | <div class="panel panel-default"> | |
4 | <div class="panel-heading"> |
|
4 | <div class="panel-heading"> | |
5 | <h3 class="panel-title">${_('Additional Email Addresses')}</h3> |
|
5 | <h3 class="panel-title">${_('Additional Email Addresses')}</h3> | |
6 | </div> |
|
6 | </div> | |
7 | <div class="panel-body"> |
|
7 | <div class="panel-body"> | |
8 | <div class="emails_wrap"> |
|
8 | <div class="emails_wrap"> | |
9 | <table class="rctable account_emails useremails"> |
|
9 | <table class="rctable account_emails useremails"> | |
10 | <tr> |
|
10 | <tr> | |
11 | <td class="td-user"> |
|
11 | <td class="td-user"> | |
12 | ${base.gravatar(c.user.email, 16)} |
|
12 | ${base.gravatar(c.user.email, 16)} | |
13 | <span class="user email">${c.user.email} |
|
13 | <span class="user email">${c.user.email}</span> | |
14 | </td> |
|
14 | </td> | |
15 | <td class="td-tags"> |
|
15 | <td class="td-tags"> | |
16 | <span class="tag">${_('Primary')}</span> |
|
16 | <span class="tag">${_('Primary')}</span> | |
17 | </td> |
|
17 | </td> | |
18 | </tr> |
|
18 | </tr> | |
19 | %if c.user_email_map: |
|
19 | %if c.user_email_map: | |
20 | %for em in c.user_email_map: |
|
20 | %for em in c.user_email_map: | |
21 | <tr> |
|
21 | <tr> | |
22 | <td class="td-user"> |
|
22 | <td class="td-user"> | |
23 | ${base.gravatar(em.email, 16)} |
|
23 | ${base.gravatar(em.email, 16)} | |
24 | <span class="user email">${em.email}</span> |
|
24 | <span class="user email">${em.email}</span> | |
25 | </td> |
|
25 | </td> | |
26 | <td class="td-action"> |
|
26 | <td class="td-action"> | |
27 | ${h.secure_form(url('edit_user_emails', user_id=c.user.user_id),method='delete')} |
|
27 | ${h.secure_form(url('edit_user_emails', user_id=c.user.user_id),method='delete')} | |
28 | ${h.hidden('del_email_id',em.email_id)} |
|
28 | ${h.hidden('del_email_id',em.email_id)} | |
29 | <button class="btn btn-link btn-danger" type="submit" |
|
29 | <button class="btn btn-link btn-danger" type="submit" | |
30 | onclick="return confirm('${_('Confirm to delete this email: %s') % em.email}');"> |
|
30 | onclick="return confirm('${_('Confirm to delete this email: %s') % em.email}');"> | |
31 | ${_('Delete')} |
|
31 | ${_('Delete')} | |
32 | </button> |
|
32 | </button> | |
33 | ${h.end_form()} |
|
33 | ${h.end_form()} | |
34 | </td> |
|
34 | </td> | |
35 | </tr> |
|
35 | </tr> | |
36 | %endfor |
|
36 | %endfor | |
37 | %else: |
|
37 | %else: | |
38 | <tr class="noborder"> |
|
38 | <tr class="noborder"> | |
39 | <td colspan="3"> |
|
39 | <td colspan="3"> | |
40 | <div class="td-email"> |
|
40 | <div class="td-email"> | |
41 | ${_('No additional emails specified')} |
|
41 | ${_('No additional emails specified')} | |
42 | </div> |
|
42 | </div> | |
43 | </td> |
|
43 | </td> | |
44 | </tr> |
|
44 | </tr> | |
45 | %endif |
|
45 | %endif | |
46 | </table> |
|
46 | </table> | |
47 | </div> |
|
47 | </div> | |
48 |
|
48 | |||
49 | ${h.secure_form(url('edit_user_emails', user_id=c.user.user_id),method='put')} |
|
49 | ${h.secure_form(url('edit_user_emails', user_id=c.user.user_id),method='put')} | |
50 | <div class="form"> |
|
50 | <div class="form"> | |
51 | <!-- fields --> |
|
51 | <!-- fields --> | |
52 | <div class="fields"> |
|
52 | <div class="fields"> | |
53 | <div class="field"> |
|
53 | <div class="field"> | |
54 | <div class="label"> |
|
54 | <div class="label"> | |
55 | <label for="new_email">${_('New email address')}:</label> |
|
55 | <label for="new_email">${_('New email address')}:</label> | |
56 | </div> |
|
56 | </div> | |
57 | <div class="input"> |
|
57 | <div class="input"> | |
58 | ${h.text('new_email', class_='medium')} |
|
58 | ${h.text('new_email', class_='medium')} | |
59 | </div> |
|
59 | </div> | |
60 | </div> |
|
60 | </div> | |
61 | <div class="buttons"> |
|
61 | <div class="buttons"> | |
62 | ${h.submit('save',_('Add'),class_="btn btn-small")} |
|
62 | ${h.submit('save',_('Add'),class_="btn btn-small")} | |
63 | ${h.reset('reset',_('Reset'),class_="btn btn-small")} |
|
63 | ${h.reset('reset',_('Reset'),class_="btn btn-small")} | |
64 | </div> |
|
64 | </div> | |
65 | </div> |
|
65 | </div> | |
66 | </div> |
|
66 | </div> | |
67 | ${h.end_form()} |
|
67 | ${h.end_form()} | |
68 | </div> |
|
68 | </div> | |
69 | </div> |
|
69 | </div> | |
70 |
|
70 | |||
71 |
|
71 |
@@ -1,418 +1,418 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%inherit file="/base/base.mako"/> |
|
3 | <%inherit file="/base/base.mako"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('%s Changelog') % c.repo_name} |
|
6 | ${_('%s Changelog') % c.repo_name} | |
7 | %if c.changelog_for_path: |
|
7 | %if c.changelog_for_path: | |
8 | /${c.changelog_for_path} |
|
8 | /${c.changelog_for_path} | |
9 | %endif |
|
9 | %endif | |
10 | %if c.rhodecode_name: |
|
10 | %if c.rhodecode_name: | |
11 | · ${h.branding(c.rhodecode_name)} |
|
11 | · ${h.branding(c.rhodecode_name)} | |
12 | %endif |
|
12 | %endif | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="breadcrumbs_links()"> |
|
15 | <%def name="breadcrumbs_links()"> | |
16 | %if c.changelog_for_path: |
|
16 | %if c.changelog_for_path: | |
17 | /${c.changelog_for_path} |
|
17 | /${c.changelog_for_path} | |
18 | %endif |
|
18 | %endif | |
19 | ${ungettext('showing %d out of %d commit', 'showing %d out of %d commits', c.showing_commits) % (c.showing_commits, c.total_cs)} |
|
19 | ${ungettext('showing %d out of %d commit', 'showing %d out of %d commits', c.showing_commits) % (c.showing_commits, c.total_cs)} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="menu_bar_nav()"> |
|
22 | <%def name="menu_bar_nav()"> | |
23 | ${self.menu_items(active='repositories')} |
|
23 | ${self.menu_items(active='repositories')} | |
24 | </%def> |
|
24 | </%def> | |
25 |
|
25 | |||
26 | <%def name="menu_bar_subnav()"> |
|
26 | <%def name="menu_bar_subnav()"> | |
27 | ${self.repo_menu(active='changelog')} |
|
27 | ${self.repo_menu(active='changelog')} | |
28 | </%def> |
|
28 | </%def> | |
29 |
|
29 | |||
30 | <%def name="main()"> |
|
30 | <%def name="main()"> | |
31 |
|
31 | |||
32 | <div class="box"> |
|
32 | <div class="box"> | |
33 | <div class="title"> |
|
33 | <div class="title"> | |
34 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
34 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
35 | <ul class="links"> |
|
35 | <ul class="links"> | |
36 | <li> |
|
36 | <li> | |
37 | <a href="#" class="btn btn-small" id="rev_range_container" style="display:none;"></a> |
|
37 | <a href="#" class="btn btn-small" id="rev_range_container" style="display:none;"></a> | |
38 | %if c.rhodecode_db_repo.fork: |
|
38 | %if c.rhodecode_db_repo.fork: | |
39 | <span> |
|
39 | <span> | |
40 | <a id="compare_fork_button" |
|
40 | <a id="compare_fork_button" | |
41 | title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" |
|
41 | title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" | |
42 | class="btn btn-small" |
|
42 | class="btn btn-small" | |
43 | href="${h.url('compare_url', |
|
43 | href="${h.url('compare_url', | |
44 | repo_name=c.rhodecode_db_repo.fork.repo_name, |
|
44 | repo_name=c.rhodecode_db_repo.fork.repo_name, | |
45 | source_ref_type=c.rhodecode_db_repo.landing_rev[0], |
|
45 | source_ref_type=c.rhodecode_db_repo.landing_rev[0], | |
46 | source_ref=c.rhodecode_db_repo.landing_rev[1], |
|
46 | source_ref=c.rhodecode_db_repo.landing_rev[1], | |
47 | target_repo=c.repo_name, |
|
47 | target_repo=c.repo_name, | |
48 | target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0], |
|
48 | target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0], | |
49 | target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], |
|
49 | target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], | |
50 | merge=1) |
|
50 | merge=1)}" | |
51 |
|
|
51 | > | |
52 | <i class="icon-loop"></i> |
|
52 | <i class="icon-loop"></i> | |
53 | ${_('Compare fork with Parent (%s)' % c.rhodecode_db_repo.fork.repo_name)} |
|
53 | ${_('Compare fork with Parent (%s)' % c.rhodecode_db_repo.fork.repo_name)} | |
54 | </a> |
|
54 | </a> | |
55 | </span> |
|
55 | </span> | |
56 | %endif |
|
56 | %endif | |
57 |
|
57 | |||
58 | ## pr open link |
|
58 | ## pr open link | |
59 | %if h.is_hg(c.rhodecode_repo) or h.is_git(c.rhodecode_repo): |
|
59 | %if h.is_hg(c.rhodecode_repo) or h.is_git(c.rhodecode_repo): | |
60 | <span> |
|
60 | <span> | |
61 | <a id="open_new_pull_request" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}"> |
|
61 | <a id="open_new_pull_request" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}"> | |
62 | ${_('Open new pull request')} |
|
62 | ${_('Open new pull request')} | |
63 | </a> |
|
63 | </a> | |
64 | </span> |
|
64 | </span> | |
65 | %endif |
|
65 | %endif | |
66 |
|
66 | |||
67 | ## clear selection |
|
67 | ## clear selection | |
68 | <div title="${_('Clear selection')}" class="btn" id="rev_range_clear" style="display:none"> |
|
68 | <div title="${_('Clear selection')}" class="btn" id="rev_range_clear" style="display:none"> | |
69 | ${_('Clear selection')} |
|
69 | ${_('Clear selection')} | |
70 | </div> |
|
70 | </div> | |
71 |
|
71 | |||
72 | </li> |
|
72 | </li> | |
73 | </ul> |
|
73 | </ul> | |
74 | </div> |
|
74 | </div> | |
75 |
|
75 | |||
76 | % if c.pagination: |
|
76 | % if c.pagination: | |
77 |
|
77 | |||
78 | <div class="graph-header"> |
|
78 | <div class="graph-header"> | |
79 | <div id="filter_changelog"> |
|
79 | <div id="filter_changelog"> | |
80 | ${h.hidden('branch_filter')} |
|
80 | ${h.hidden('branch_filter')} | |
81 | %if c.selected_name: |
|
81 | %if c.selected_name: | |
82 | <div class="btn btn-default" id="clear_filter" > |
|
82 | <div class="btn btn-default" id="clear_filter" > | |
83 | ${_('Clear filter')} |
|
83 | ${_('Clear filter')} | |
84 | </div> |
|
84 | </div> | |
85 | %endif |
|
85 | %endif | |
86 | </div> |
|
86 | </div> | |
87 | ${self.breadcrumbs('breadcrumbs_light')} |
|
87 | ${self.breadcrumbs('breadcrumbs_light')} | |
88 | </div> |
|
88 | </div> | |
89 |
|
89 | |||
90 | <div id="graph"> |
|
90 | <div id="graph"> | |
91 | <div class="graph-col-wrapper"> |
|
91 | <div class="graph-col-wrapper"> | |
92 | <div id="graph_nodes"> |
|
92 | <div id="graph_nodes"> | |
93 | <div id="graph_canvas" data-graph='${c.jsdata|n}'></div> |
|
93 | <div id="graph_canvas" data-graph='${c.jsdata|n}'></div> | |
94 | </div> |
|
94 | </div> | |
95 | <div id="graph_content" class="main-content graph_full_width"> |
|
95 | <div id="graph_content" class="main-content graph_full_width"> | |
96 |
|
96 | |||
97 | <div class="table"> |
|
97 | <div class="table"> | |
98 | <table id="changesets" class="rctable"> |
|
98 | <table id="changesets" class="rctable"> | |
99 | <tr> |
|
99 | <tr> | |
100 | ## checkbox |
|
100 | ## checkbox | |
101 | <th></th> |
|
101 | <th></th> | |
102 | <th colspan="2"></th> |
|
102 | <th colspan="2"></th> | |
103 |
|
103 | |||
104 | <th>${_('Commit')}</th> |
|
104 | <th>${_('Commit')}</th> | |
105 | ## commit message expand arrow |
|
105 | ## commit message expand arrow | |
106 | <th></th> |
|
106 | <th></th> | |
107 | <th>${_('Commit Message')}</th> |
|
107 | <th>${_('Commit Message')}</th> | |
108 |
|
108 | |||
109 | <th>${_('Age')}</th> |
|
109 | <th>${_('Age')}</th> | |
110 | <th>${_('Author')}</th> |
|
110 | <th>${_('Author')}</th> | |
111 |
|
111 | |||
112 | <th>${_('Refs')}</th> |
|
112 | <th>${_('Refs')}</th> | |
113 | </tr> |
|
113 | </tr> | |
114 | <tbody> |
|
114 | <tbody> | |
115 | %for cnt,commit in enumerate(c.pagination): |
|
115 | %for cnt,commit in enumerate(c.pagination): | |
116 | <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
116 | <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> | |
117 |
|
117 | |||
118 | <td class="td-checkbox"> |
|
118 | <td class="td-checkbox"> | |
119 | ${h.checkbox(commit.raw_id,class_="commit-range")} |
|
119 | ${h.checkbox(commit.raw_id,class_="commit-range")} | |
120 | </td> |
|
120 | </td> | |
121 | <td class="td-status"> |
|
121 | <td class="td-status"> | |
122 |
|
122 | |||
123 | %if c.statuses.get(commit.raw_id): |
|
123 | %if c.statuses.get(commit.raw_id): | |
124 | <div class="changeset-status-ico"> |
|
124 | <div class="changeset-status-ico"> | |
125 | %if c.statuses.get(commit.raw_id)[2]: |
|
125 | %if c.statuses.get(commit.raw_id)[2]: | |
126 | <a class="tooltip" title="${_('Commit status: %s\nClick to open associated pull request #%s') % (h.commit_status_lbl(c.statuses.get(commit.raw_id)[0]), c.statuses.get(commit.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(commit.raw_id)[3],pull_request_id=c.statuses.get(commit.raw_id)[2])}"> |
|
126 | <a class="tooltip" title="${_('Commit status: %s\nClick to open associated pull request #%s') % (h.commit_status_lbl(c.statuses.get(commit.raw_id)[0]), c.statuses.get(commit.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(commit.raw_id)[3],pull_request_id=c.statuses.get(commit.raw_id)[2])}"> | |
127 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> |
|
127 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> | |
128 | </a> |
|
128 | </a> | |
129 | %else: |
|
129 | %else: | |
130 | <a class="tooltip" title="${_('Commit status: %s') % h.commit_status_lbl(c.statuses.get(commit.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> |
|
130 | <a class="tooltip" title="${_('Commit status: %s') % h.commit_status_lbl(c.statuses.get(commit.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> | |
131 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> |
|
131 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> | |
132 | </a> |
|
132 | </a> | |
133 | %endif |
|
133 | %endif | |
134 | </div> |
|
134 | </div> | |
135 | %else: |
|
135 | %else: | |
136 | <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div> |
|
136 | <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div> | |
137 | %endif |
|
137 | %endif | |
138 | </td> |
|
138 | </td> | |
139 | <td class="td-comments comments-col"> |
|
139 | <td class="td-comments comments-col"> | |
140 | %if c.comments.get(commit.raw_id): |
|
140 | %if c.comments.get(commit.raw_id): | |
141 | <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> |
|
141 | <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> | |
142 | <i class="icon-comment"></i> ${len(c.comments[commit.raw_id])} |
|
142 | <i class="icon-comment"></i> ${len(c.comments[commit.raw_id])} | |
143 | </a> |
|
143 | </a> | |
144 | %endif |
|
144 | %endif | |
145 | </td> |
|
145 | </td> | |
146 | <td class="td-hash"> |
|
146 | <td class="td-hash"> | |
147 | <code> |
|
147 | <code> | |
148 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}"> |
|
148 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}"> | |
149 | <span class="commit_hash">${h.show_id(commit)}</span> |
|
149 | <span class="commit_hash">${h.show_id(commit)}</span> | |
150 | </a> |
|
150 | </a> | |
151 | </code> |
|
151 | </code> | |
152 | </td> |
|
152 | </td> | |
153 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}"> |
|
153 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}"> | |
154 | <div class="show_more_col"> |
|
154 | <div class="show_more_col"> | |
155 | <i class="show_more"></i> |
|
155 | <i class="show_more"></i> | |
156 | </div> |
|
156 | </div> | |
157 | </td> |
|
157 | </td> | |
158 | <td class="td-description mid"> |
|
158 | <td class="td-description mid"> | |
159 | <div class="log-container truncate-wrap"> |
|
159 | <div class="log-container truncate-wrap"> | |
160 | <div class="message truncate" id="c-${commit.raw_id}">${h.urlify_commit_message(commit.message, c.repo_name)}</div> |
|
160 | <div class="message truncate" id="c-${commit.raw_id}">${h.urlify_commit_message(commit.message, c.repo_name)}</div> | |
161 | </div> |
|
161 | </div> | |
162 | </td> |
|
162 | </td> | |
163 |
|
163 | |||
164 | <td class="td-time"> |
|
164 | <td class="td-time"> | |
165 | ${h.age_component(commit.date)} |
|
165 | ${h.age_component(commit.date)} | |
166 | </td> |
|
166 | </td> | |
167 | <td class="td-user"> |
|
167 | <td class="td-user"> | |
168 | ${self.gravatar_with_user(commit.author)} |
|
168 | ${self.gravatar_with_user(commit.author)} | |
169 | </td> |
|
169 | </td> | |
170 |
|
170 | |||
171 | <td class="td-tags tags-col"> |
|
171 | <td class="td-tags tags-col"> | |
172 | <div id="t-${commit.raw_id}"> |
|
172 | <div id="t-${commit.raw_id}"> | |
173 | ## branch |
|
173 | ## branch | |
174 | %if commit.branch: |
|
174 | %if commit.branch: | |
175 | <span class="branchtag tag" title="${_('Branch %s') % commit.branch}"> |
|
175 | <span class="branchtag tag" title="${_('Branch %s') % commit.branch}"> | |
176 | <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=commit.branch)}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a> |
|
176 | <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=commit.branch)}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a> | |
177 | </span> |
|
177 | </span> | |
178 | %endif |
|
178 | %endif | |
179 |
|
179 | |||
180 | ## bookmarks |
|
180 | ## bookmarks | |
181 | %if h.is_hg(c.rhodecode_repo): |
|
181 | %if h.is_hg(c.rhodecode_repo): | |
182 | %for book in commit.bookmarks: |
|
182 | %for book in commit.bookmarks: | |
183 | <span class="tag booktag" title="${_('Bookmark %s') % book}"> |
|
183 | <span class="tag booktag" title="${_('Bookmark %s') % book}"> | |
184 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> |
|
184 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> | |
185 | </span> |
|
185 | </span> | |
186 | %endfor |
|
186 | %endfor | |
187 | %endif |
|
187 | %endif | |
188 |
|
188 | |||
189 | ## tags |
|
189 | ## tags | |
190 | %for tag in commit.tags: |
|
190 | %for tag in commit.tags: | |
191 | <span class="tagtag tag" title="${_('Tag %s') % tag}"> |
|
191 | <span class="tagtag tag" title="${_('Tag %s') % tag}"> | |
192 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a> |
|
192 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a> | |
193 | </span> |
|
193 | </span> | |
194 | %endfor |
|
194 | %endfor | |
195 |
|
195 | |||
196 | </div> |
|
196 | </div> | |
197 | </td> |
|
197 | </td> | |
198 | </tr> |
|
198 | </tr> | |
199 | %endfor |
|
199 | %endfor | |
200 | </tbody> |
|
200 | </tbody> | |
201 | </table> |
|
201 | </table> | |
202 | </div> |
|
202 | </div> | |
203 | </div> |
|
203 | </div> | |
204 | </div> |
|
204 | </div> | |
205 | <div class="pagination-wh pagination-left"> |
|
205 | <div class="pagination-wh pagination-left"> | |
206 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
206 | ${c.pagination.pager('$link_previous ~2~ $link_next')} | |
207 | </div> |
|
207 | </div> | |
208 |
|
208 | |||
209 | <script type="text/javascript" src="${h.asset('js/jquery.commits-graph.js')}"></script> |
|
209 | <script type="text/javascript" src="${h.asset('js/jquery.commits-graph.js')}"></script> | |
210 | <script type="text/javascript"> |
|
210 | <script type="text/javascript"> | |
211 | var cache = {}; |
|
211 | var cache = {}; | |
212 | $(function(){ |
|
212 | $(function(){ | |
213 |
|
213 | |||
214 | // Create links to commit ranges when range checkboxes are selected |
|
214 | // Create links to commit ranges when range checkboxes are selected | |
215 | var $commitCheckboxes = $('.commit-range'); |
|
215 | var $commitCheckboxes = $('.commit-range'); | |
216 | // cache elements |
|
216 | // cache elements | |
217 | var $commitRangeContainer = $('#rev_range_container'); |
|
217 | var $commitRangeContainer = $('#rev_range_container'); | |
218 | var $commitRangeClear = $('#rev_range_clear'); |
|
218 | var $commitRangeClear = $('#rev_range_clear'); | |
219 |
|
219 | |||
220 | var checkboxRangeSelector = function(e){ |
|
220 | var checkboxRangeSelector = function(e){ | |
221 | var selectedCheckboxes = []; |
|
221 | var selectedCheckboxes = []; | |
222 | for (pos in $commitCheckboxes){ |
|
222 | for (pos in $commitCheckboxes){ | |
223 | if($commitCheckboxes[pos].checked){ |
|
223 | if($commitCheckboxes[pos].checked){ | |
224 | selectedCheckboxes.push($commitCheckboxes[pos]); |
|
224 | selectedCheckboxes.push($commitCheckboxes[pos]); | |
225 | } |
|
225 | } | |
226 | } |
|
226 | } | |
227 | var open_new_pull_request = $('#open_new_pull_request'); |
|
227 | var open_new_pull_request = $('#open_new_pull_request'); | |
228 | if(open_new_pull_request){ |
|
228 | if(open_new_pull_request){ | |
229 | var selected_changes = selectedCheckboxes.length; |
|
229 | var selected_changes = selectedCheckboxes.length; | |
230 | if (selected_changes > 1 || selected_changes == 1 && templateContext.repo_type != 'hg') { |
|
230 | if (selected_changes > 1 || selected_changes == 1 && templateContext.repo_type != 'hg') { | |
231 | open_new_pull_request.hide(); |
|
231 | open_new_pull_request.hide(); | |
232 | } else { |
|
232 | } else { | |
233 | if (selected_changes == 1) { |
|
233 | if (selected_changes == 1) { | |
234 | open_new_pull_request.html(_gettext('Open new pull request for selected commit')); |
|
234 | open_new_pull_request.html(_gettext('Open new pull request for selected commit')); | |
235 | } else if (selected_changes == 0) { |
|
235 | } else if (selected_changes == 0) { | |
236 | open_new_pull_request.html(_gettext('Open new pull request')); |
|
236 | open_new_pull_request.html(_gettext('Open new pull request')); | |
237 | } |
|
237 | } | |
238 | open_new_pull_request.show(); |
|
238 | open_new_pull_request.show(); | |
239 | } |
|
239 | } | |
240 | } |
|
240 | } | |
241 |
|
241 | |||
242 | if (selectedCheckboxes.length>0){ |
|
242 | if (selectedCheckboxes.length>0){ | |
243 | var revEnd = selectedCheckboxes[0].name; |
|
243 | var revEnd = selectedCheckboxes[0].name; | |
244 | var revStart = selectedCheckboxes[selectedCheckboxes.length-1].name; |
|
244 | var revStart = selectedCheckboxes[selectedCheckboxes.length-1].name; | |
245 | var url = pyroutes.url('changeset_home', |
|
245 | var url = pyroutes.url('changeset_home', | |
246 | {'repo_name': '${c.repo_name}', |
|
246 | {'repo_name': '${c.repo_name}', | |
247 | 'revision': revStart+'...'+revEnd}); |
|
247 | 'revision': revStart+'...'+revEnd}); | |
248 |
|
248 | |||
249 | var link = (revStart == revEnd) |
|
249 | var link = (revStart == revEnd) | |
250 | ? _gettext('Show selected commit __S') |
|
250 | ? _gettext('Show selected commit __S') | |
251 | : _gettext('Show selected commits __S ... __E'); |
|
251 | : _gettext('Show selected commits __S ... __E'); | |
252 |
|
252 | |||
253 | link = link.replace('__S', revStart.substr(0,6)); |
|
253 | link = link.replace('__S', revStart.substr(0,6)); | |
254 | link = link.replace('__E', revEnd.substr(0,6)); |
|
254 | link = link.replace('__E', revEnd.substr(0,6)); | |
255 |
|
255 | |||
256 | $commitRangeContainer |
|
256 | $commitRangeContainer | |
257 | .attr('href',url) |
|
257 | .attr('href',url) | |
258 | .html(link) |
|
258 | .html(link) | |
259 | .show(); |
|
259 | .show(); | |
260 |
|
260 | |||
261 | $commitRangeClear.show(); |
|
261 | $commitRangeClear.show(); | |
262 | var _url = pyroutes.url('pullrequest_home', |
|
262 | var _url = pyroutes.url('pullrequest_home', | |
263 | {'repo_name': '${c.repo_name}', |
|
263 | {'repo_name': '${c.repo_name}', | |
264 | 'commit': revEnd}); |
|
264 | 'commit': revEnd}); | |
265 | open_new_pull_request.attr('href', _url); |
|
265 | open_new_pull_request.attr('href', _url); | |
266 | $('#compare_fork_button').hide(); |
|
266 | $('#compare_fork_button').hide(); | |
267 | } else { |
|
267 | } else { | |
268 | $commitRangeContainer.hide(); |
|
268 | $commitRangeContainer.hide(); | |
269 | $commitRangeClear.hide(); |
|
269 | $commitRangeClear.hide(); | |
270 |
|
270 | |||
271 | %if c.branch_name: |
|
271 | %if c.branch_name: | |
272 | var _url = pyroutes.url('pullrequest_home', |
|
272 | var _url = pyroutes.url('pullrequest_home', | |
273 | {'repo_name': '${c.repo_name}', |
|
273 | {'repo_name': '${c.repo_name}', | |
274 | 'branch':'${c.branch_name}'}); |
|
274 | 'branch':'${c.branch_name}'}); | |
275 | open_new_pull_request.attr('href', _url); |
|
275 | open_new_pull_request.attr('href', _url); | |
276 | %else: |
|
276 | %else: | |
277 | var _url = pyroutes.url('pullrequest_home', |
|
277 | var _url = pyroutes.url('pullrequest_home', | |
278 | {'repo_name': '${c.repo_name}'}); |
|
278 | {'repo_name': '${c.repo_name}'}); | |
279 | open_new_pull_request.attr('href', _url); |
|
279 | open_new_pull_request.attr('href', _url); | |
280 | %endif |
|
280 | %endif | |
281 | $('#compare_fork_button').show(); |
|
281 | $('#compare_fork_button').show(); | |
282 | } |
|
282 | } | |
283 | }; |
|
283 | }; | |
284 |
|
284 | |||
285 | $commitCheckboxes.on('click', checkboxRangeSelector); |
|
285 | $commitCheckboxes.on('click', checkboxRangeSelector); | |
286 |
|
286 | |||
287 | $commitRangeClear.on('click',function(e) { |
|
287 | $commitRangeClear.on('click',function(e) { | |
288 | $commitCheckboxes.attr('checked', false) |
|
288 | $commitCheckboxes.attr('checked', false); | |
289 | checkboxRangeSelector(); |
|
289 | checkboxRangeSelector(); | |
290 | e.preventDefault(); |
|
290 | e.preventDefault(); | |
291 | }); |
|
291 | }); | |
292 |
|
292 | |||
293 | // make sure the buttons are consistent when navigate back and forth |
|
293 | // make sure the buttons are consistent when navigate back and forth | |
294 | checkboxRangeSelector(); |
|
294 | checkboxRangeSelector(); | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | var msgs = $('.message'); |
|
297 | var msgs = $('.message'); | |
298 | // get first element height |
|
298 | // get first element height | |
299 | var el = $('#graph_content .container')[0]; |
|
299 | var el = $('#graph_content .container')[0]; | |
300 | var row_h = el.clientHeight; |
|
300 | var row_h = el.clientHeight; | |
301 | for (var i=0; i < msgs.length; i++) { |
|
301 | for (var i=0; i < msgs.length; i++) { | |
302 | var m = msgs[i]; |
|
302 | var m = msgs[i]; | |
303 |
|
303 | |||
304 | var h = m.clientHeight; |
|
304 | var h = m.clientHeight; | |
305 | var pad = $(m).css('padding'); |
|
305 | var pad = $(m).css('padding'); | |
306 | if (h > row_h) { |
|
306 | if (h > row_h) { | |
307 | var offset = row_h - (h+12); |
|
307 | var offset = row_h - (h+12); | |
308 | $(m.nextElementSibling).css('display','block'); |
|
308 | $(m.nextElementSibling).css('display','block'); | |
309 | $(m.nextElementSibling).css('margin-top',offset+'px'); |
|
309 | $(m.nextElementSibling).css('margin-top',offset+'px'); | |
310 | } |
|
310 | } | |
311 | } |
|
311 | } | |
312 |
|
312 | |||
313 | $('.expand_commit').on('click',function(e){ |
|
313 | $('.expand_commit').on('click',function(e){ | |
314 | var target_expand = $(this); |
|
314 | var target_expand = $(this); | |
315 | var cid = target_expand.data('commitId'); |
|
315 | var cid = target_expand.data('commitId'); | |
316 |
|
316 | |||
317 | if (target_expand.hasClass('open')){ |
|
317 | if (target_expand.hasClass('open')){ | |
318 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); |
|
318 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); | |
319 | $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden', 'white-space':'nowrap'}); |
|
319 | $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden', 'white-space':'nowrap'}); | |
320 | target_expand.removeClass('open'); |
|
320 | target_expand.removeClass('open'); | |
321 | } |
|
321 | } | |
322 | else { |
|
322 | else { | |
323 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'}); |
|
323 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'}); | |
324 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'}); |
|
324 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'}); | |
325 | target_expand.addClass('open'); |
|
325 | target_expand.addClass('open'); | |
326 | } |
|
326 | } | |
327 | // redraw the graph |
|
327 | // redraw the graph | |
328 | graph_options.height = $("#changesets").height(); |
|
328 | graph_options.height = $("#changesets").height(); | |
329 | $("canvas").remove(); |
|
329 | $("canvas").remove(); | |
330 | $("[data-graph]").commits(graph_options); |
|
330 | $("[data-graph]").commits(graph_options); | |
331 | }); |
|
331 | }); | |
332 |
|
332 | |||
333 | $("#clear_filter").on("click", function() { |
|
333 | $("#clear_filter").on("click", function() { | |
334 | var filter = {'repo_name': '${c.repo_name}'}; |
|
334 | var filter = {'repo_name': '${c.repo_name}'}; | |
335 | window.location = pyroutes.url('changelog_home', filter); |
|
335 | window.location = pyroutes.url('changelog_home', filter); | |
336 | }); |
|
336 | }); | |
337 |
|
337 | |||
338 | $("#branch_filter").select2({ |
|
338 | $("#branch_filter").select2({ | |
339 | 'dropdownAutoWidth': true, |
|
339 | 'dropdownAutoWidth': true, | |
340 | 'width': 'resolve', |
|
340 | 'width': 'resolve', | |
341 | 'placeholder': "${c.selected_name or _('Filter changelog')}", |
|
341 | 'placeholder': "${c.selected_name or _('Filter changelog')}", | |
342 | containerCssClass: "drop-menu", |
|
342 | containerCssClass: "drop-menu", | |
343 | dropdownCssClass: "drop-menu-dropdown", |
|
343 | dropdownCssClass: "drop-menu-dropdown", | |
344 | query: function(query){ |
|
344 | query: function(query){ | |
345 | var key = 'cache'; |
|
345 | var key = 'cache'; | |
346 | var cached = cache[key] ; |
|
346 | var cached = cache[key] ; | |
347 | if(cached) { |
|
347 | if(cached) { | |
348 | var data = {results: []}; |
|
348 | var data = {results: []}; | |
349 | //filter results |
|
349 | //filter results | |
350 | $.each(cached.results, function(){ |
|
350 | $.each(cached.results, function(){ | |
351 | var section = this.text; |
|
351 | var section = this.text; | |
352 | var children = []; |
|
352 | var children = []; | |
353 | $.each(this.children, function(){ |
|
353 | $.each(this.children, function(){ | |
354 | if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){ |
|
354 | if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){ | |
355 | children.push({'id': this.id, 'text': this.text, 'type': this.type}) |
|
355 | children.push({'id': this.id, 'text': this.text, 'type': this.type}) | |
356 | } |
|
356 | } | |
357 | }); |
|
357 | }); | |
358 | data.results.push({'text': section, 'children': children}); |
|
358 | data.results.push({'text': section, 'children': children}); | |
359 | query.callback({results: data.results}); |
|
359 | query.callback({results: data.results}); | |
360 | }); |
|
360 | }); | |
361 | }else{ |
|
361 | }else{ | |
362 | $.ajax({ |
|
362 | $.ajax({ | |
363 | url: pyroutes.url('repo_refs_changelog_data', {'repo_name': '${c.repo_name}'}), |
|
363 | url: pyroutes.url('repo_refs_changelog_data', {'repo_name': '${c.repo_name}'}), | |
364 | data: {}, |
|
364 | data: {}, | |
365 | dataType: 'json', |
|
365 | dataType: 'json', | |
366 | type: 'GET', |
|
366 | type: 'GET', | |
367 | success: function(data) { |
|
367 | success: function(data) { | |
368 | cache[key] = data; |
|
368 | cache[key] = data; | |
369 | query.callback({results: data.results}); |
|
369 | query.callback({results: data.results}); | |
370 | } |
|
370 | } | |
371 | }) |
|
371 | }) | |
372 | } |
|
372 | } | |
373 | } |
|
373 | } | |
374 | }); |
|
374 | }); | |
375 |
|
375 | |||
376 | $('#branch_filter').on('change', function(e){ |
|
376 | $('#branch_filter').on('change', function(e){ | |
377 | var data = $('#branch_filter').select2('data'); |
|
377 | var data = $('#branch_filter').select2('data'); | |
378 | var selected = data.text; |
|
378 | var selected = data.text; | |
379 | var filter = {'repo_name': '${c.repo_name}'}; |
|
379 | var filter = {'repo_name': '${c.repo_name}'}; | |
380 | if(data.type == 'branch' || data.type == 'branch_closed'){ |
|
380 | if(data.type == 'branch' || data.type == 'branch_closed'){ | |
381 | filter["branch"] = selected; |
|
381 | filter["branch"] = selected; | |
382 | } |
|
382 | } | |
383 | else if (data.type == 'book'){ |
|
383 | else if (data.type == 'book'){ | |
384 | filter["bookmark"] = selected; |
|
384 | filter["bookmark"] = selected; | |
385 | } |
|
385 | } | |
386 | window.location = pyroutes.url('changelog_home', filter); |
|
386 | window.location = pyroutes.url('changelog_home', filter); | |
387 | }); |
|
387 | }); | |
388 |
|
388 | |||
389 | // Determine max number of edges per row in graph |
|
389 | // Determine max number of edges per row in graph | |
390 | var jsdata = $.parseJSON($("[data-graph]").attr('data-graph')); |
|
390 | var jsdata = $.parseJSON($("[data-graph]").attr('data-graph')); | |
391 | var edgeCount = 1; |
|
391 | var edgeCount = 1; | |
392 | $.each(jsdata, function(i, item){ |
|
392 | $.each(jsdata, function(i, item){ | |
393 | $.each(item[2], function(key, value) { |
|
393 | $.each(item[2], function(key, value) { | |
394 | if (value[1] > edgeCount){ |
|
394 | if (value[1] > edgeCount){ | |
395 | edgeCount = value[1]; |
|
395 | edgeCount = value[1]; | |
396 | } |
|
396 | } | |
397 | }); |
|
397 | }); | |
398 | }); |
|
398 | }); | |
399 | var x_step = Math.min(18, Math.floor(86 / edgeCount)); |
|
399 | var x_step = Math.min(18, Math.floor(86 / edgeCount)); | |
400 | var graph_options = { |
|
400 | var graph_options = { | |
401 | width: 100, |
|
401 | width: 100, | |
402 | height: $("#changesets").height(), |
|
402 | height: $("#changesets").height(), | |
403 | x_step: x_step, |
|
403 | x_step: x_step, | |
404 | y_step: 42, |
|
404 | y_step: 42, | |
405 | dotRadius: 3.5, |
|
405 | dotRadius: 3.5, | |
406 | lineWidth: 2.5 |
|
406 | lineWidth: 2.5 | |
407 | }; |
|
407 | }; | |
408 | $("[data-graph]").commits(graph_options); |
|
408 | $("[data-graph]").commits(graph_options); | |
409 |
|
409 | |||
410 | }); |
|
410 | }); | |
411 |
|
411 | |||
412 | </script> |
|
412 | </script> | |
413 | %else: |
|
413 | %else: | |
414 | ${_('There are no changes yet')} |
|
414 | ${_('There are no changes yet')} | |
415 | %endif |
|
415 | %endif | |
416 | </div> |
|
416 | </div> | |
417 | </div> |
|
417 | </div> | |
418 | </%def> |
|
418 | </%def> |
@@ -1,314 +1,314 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%inherit file="/base/base.mako"/> |
|
3 | <%inherit file="/base/base.mako"/> | |
4 | <%namespace name="diff_block" file="/changeset/diff_block.mako"/> |
|
4 | <%namespace name="diff_block" file="/changeset/diff_block.mako"/> | |
5 |
|
5 | |||
6 | <%def name="title()"> |
|
6 | <%def name="title()"> | |
7 | ${_('%s Commit') % c.repo_name} - ${h.show_id(c.commit)} |
|
7 | ${_('%s Commit') % c.repo_name} - ${h.show_id(c.commit)} | |
8 | %if c.rhodecode_name: |
|
8 | %if c.rhodecode_name: | |
9 | · ${h.branding(c.rhodecode_name)} |
|
9 | · ${h.branding(c.rhodecode_name)} | |
10 | %endif |
|
10 | %endif | |
11 | </%def> |
|
11 | </%def> | |
12 |
|
12 | |||
13 | <%def name="menu_bar_nav()"> |
|
13 | <%def name="menu_bar_nav()"> | |
14 | ${self.menu_items(active='repositories')} |
|
14 | ${self.menu_items(active='repositories')} | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="menu_bar_subnav()"> |
|
17 | <%def name="menu_bar_subnav()"> | |
18 | ${self.repo_menu(active='changelog')} |
|
18 | ${self.repo_menu(active='changelog')} | |
19 | </%def> |
|
19 | </%def> | |
20 |
|
20 | |||
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <script> |
|
22 | <script> | |
23 | // TODO: marcink switch this to pyroutes |
|
23 | // TODO: marcink switch this to pyroutes | |
24 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
24 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
25 | templateContext.commit_data.commit_id = "${c.commit.raw_id}"; |
|
25 | templateContext.commit_data.commit_id = "${c.commit.raw_id}"; | |
26 | </script> |
|
26 | </script> | |
27 | <div class="box"> |
|
27 | <div class="box"> | |
28 | <div class="title"> |
|
28 | <div class="title"> | |
29 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
29 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
30 | </div> |
|
30 | </div> | |
31 |
|
31 | |||
32 | <div id="changeset_compare_view_content" class="summary changeset"> |
|
32 | <div id="changeset_compare_view_content" class="summary changeset"> | |
33 | <div class="summary-detail"> |
|
33 | <div class="summary-detail"> | |
34 | <div class="summary-detail-header"> |
|
34 | <div class="summary-detail-header"> | |
35 | <span class="breadcrumbs files_location"> |
|
35 | <span class="breadcrumbs files_location"> | |
36 | <h4>${_('Commit')} |
|
36 | <h4>${_('Commit')} | |
37 | <code> |
|
37 | <code> | |
38 | ${h.show_id(c.commit)} |
|
38 | ${h.show_id(c.commit)} | |
39 | </code> |
|
39 | </code> | |
40 | </h4> |
|
40 | </h4> | |
41 | </span> |
|
41 | </span> | |
42 | <span id="parent_link"> |
|
42 | <span id="parent_link"> | |
43 | <a href="#" title="${_('Parent Commit')}">${_('Parent')}</a> |
|
43 | <a href="#" title="${_('Parent Commit')}">${_('Parent')}</a> | |
44 | </span> |
|
44 | </span> | |
45 | | |
|
45 | | | |
46 | <span id="child_link"> |
|
46 | <span id="child_link"> | |
47 | <a href="#" title="${_('Child Commit')}">${_('Child')}</a> |
|
47 | <a href="#" title="${_('Child Commit')}">${_('Child')}</a> | |
48 | </span> |
|
48 | </span> | |
49 | </div> |
|
49 | </div> | |
50 |
|
50 | |||
51 | <div class="fieldset"> |
|
51 | <div class="fieldset"> | |
52 | <div class="left-label"> |
|
52 | <div class="left-label"> | |
53 | ${_('Description')}: |
|
53 | ${_('Description')}: | |
54 | </div> |
|
54 | </div> | |
55 | <div class="right-content"> |
|
55 | <div class="right-content"> | |
56 | <div id="trimmed_message_box" class="commit">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div> |
|
56 | <div id="trimmed_message_box" class="commit">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div> | |
57 | <div id="message_expand" style="display:none;"> |
|
57 | <div id="message_expand" style="display:none;"> | |
58 | ${_('Expand')} |
|
58 | ${_('Expand')} | |
59 | </div> |
|
59 | </div> | |
60 | </div> |
|
60 | </div> | |
61 | </div> |
|
61 | </div> | |
62 |
|
62 | |||
63 | %if c.statuses: |
|
63 | %if c.statuses: | |
64 | <div class="fieldset"> |
|
64 | <div class="fieldset"> | |
65 | <div class="left-label"> |
|
65 | <div class="left-label"> | |
66 | ${_('Commit status')}: |
|
66 | ${_('Commit status')}: | |
67 | </div> |
|
67 | </div> | |
68 | <div class="right-content"> |
|
68 | <div class="right-content"> | |
69 | <div class="changeset-status-ico"> |
|
69 | <div class="changeset-status-ico"> | |
70 | <div class="${'flag_status %s' % c.statuses[0]} pull-left"></div> |
|
70 | <div class="${'flag_status %s' % c.statuses[0]} pull-left"></div> | |
71 | </div> |
|
71 | </div> | |
72 | <div title="${_('Commit status')}" class="changeset-status-lbl">[${h.commit_status_lbl(c.statuses[0])}]</div> |
|
72 | <div title="${_('Commit status')}" class="changeset-status-lbl">[${h.commit_status_lbl(c.statuses[0])}]</div> | |
73 | </div> |
|
73 | </div> | |
74 | </div> |
|
74 | </div> | |
75 | %endif |
|
75 | %endif | |
76 |
|
76 | |||
77 | <div class="fieldset"> |
|
77 | <div class="fieldset"> | |
78 | <div class="left-label"> |
|
78 | <div class="left-label"> | |
79 | ${_('References')}: |
|
79 | ${_('References')}: | |
80 | </div> |
|
80 | </div> | |
81 | <div class="right-content"> |
|
81 | <div class="right-content"> | |
82 | <div class="tags"> |
|
82 | <div class="tags"> | |
83 |
|
83 | |||
84 | %if c.commit.merge: |
|
84 | %if c.commit.merge: | |
85 | <span class="mergetag tag"> |
|
85 | <span class="mergetag tag"> | |
86 | <i class="icon-merge"></i>${_('merge')} |
|
86 | <i class="icon-merge"></i>${_('merge')} | |
87 | </span> |
|
87 | </span> | |
88 | %endif |
|
88 | %endif | |
89 |
|
89 | |||
90 | %if h.is_hg(c.rhodecode_repo): |
|
90 | %if h.is_hg(c.rhodecode_repo): | |
91 | %for book in c.commit.bookmarks: |
|
91 | %for book in c.commit.bookmarks: | |
92 | <span class="booktag tag" title="${_('Bookmark %s') % book}"> |
|
92 | <span class="booktag tag" title="${_('Bookmark %s') % book}"> | |
93 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=c.commit.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> |
|
93 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=c.commit.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> | |
94 | </span> |
|
94 | </span> | |
95 | %endfor |
|
95 | %endfor | |
96 | %endif |
|
96 | %endif | |
97 |
|
97 | |||
98 | %for tag in c.commit.tags: |
|
98 | %for tag in c.commit.tags: | |
99 | <span class="tagtag tag" title="${_('Tag %s') % tag}"> |
|
99 | <span class="tagtag tag" title="${_('Tag %s') % tag}"> | |
100 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=c.commit.raw_id)}"><i class="icon-tag"></i>${tag}</a> |
|
100 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=c.commit.raw_id)}"><i class="icon-tag"></i>${tag}</a> | |
101 | </span> |
|
101 | </span> | |
102 | %endfor |
|
102 | %endfor | |
103 |
|
103 | |||
104 | %if c.commit.branch: |
|
104 | %if c.commit.branch: | |
105 | <span class="branchtag tag" title="${_('Branch %s') % c.commit.branch}"> |
|
105 | <span class="branchtag tag" title="${_('Branch %s') % c.commit.branch}"> | |
106 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=c.commit.raw_id)}"><i class="icon-code-fork"></i>${h.shorter(c.commit.branch)}</a> |
|
106 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=c.commit.raw_id)}"><i class="icon-code-fork"></i>${h.shorter(c.commit.branch)}</a> | |
107 | </span> |
|
107 | </span> | |
108 | %endif |
|
108 | %endif | |
109 | </div> |
|
109 | </div> | |
110 | </div> |
|
110 | </div> | |
111 | </div> |
|
111 | </div> | |
112 |
|
112 | |||
113 | <div class="fieldset"> |
|
113 | <div class="fieldset"> | |
114 | <div class="left-label"> |
|
114 | <div class="left-label"> | |
115 | ${_('Diff options')}: |
|
115 | ${_('Diff options')}: | |
116 | </div> |
|
116 | </div> | |
117 | <div class="right-content"> |
|
117 | <div class="right-content"> | |
118 | <div class="diff-actions"> |
|
118 | <div class="diff-actions"> | |
119 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Raw diff'))}"> |
|
119 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Raw diff'))}"> | |
120 | ${_('Raw Diff')} |
|
120 | ${_('Raw Diff')} | |
121 | </a> |
|
121 | </a> | |
122 | | |
|
122 | | | |
123 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Patch diff'))}"> |
|
123 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Patch diff'))}"> | |
124 | ${_('Patch Diff')} |
|
124 | ${_('Patch Diff')} | |
125 | </a> |
|
125 | </a> | |
126 | | |
|
126 | | | |
127 | <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.commit.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('Download diff'))}"> |
|
127 | <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.commit.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('Download diff'))}"> | |
128 | ${_('Download Diff')} |
|
128 | ${_('Download Diff')} | |
129 | </a> |
|
129 | </a> | |
130 | | |
|
130 | | | |
131 | ${c.ignorews_url(request.GET)} |
|
131 | ${c.ignorews_url(request.GET)} | |
132 | | |
|
132 | | | |
133 | ${c.context_url(request.GET)} |
|
133 | ${c.context_url(request.GET)} | |
134 | </div> |
|
134 | </div> | |
135 | </div> |
|
135 | </div> | |
136 | </div> |
|
136 | </div> | |
137 |
|
137 | |||
138 | <div class="fieldset"> |
|
138 | <div class="fieldset"> | |
139 | <div class="left-label"> |
|
139 | <div class="left-label"> | |
140 | ${_('Comments')}: |
|
140 | ${_('Comments')}: | |
141 | </div> |
|
141 | </div> | |
142 | <div class="right-content"> |
|
142 | <div class="right-content"> | |
143 | <div class="comments-number"> |
|
143 | <div class="comments-number"> | |
144 | %if c.comments: |
|
144 | %if c.comments: | |
145 | <a href="#comments">${ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}</a>, |
|
145 | <a href="#comments">${ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}</a>, | |
146 | %else: |
|
146 | %else: | |
147 | ${ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)} |
|
147 | ${ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)} | |
148 | %endif |
|
148 | %endif | |
149 | %if c.inline_cnt: |
|
149 | %if c.inline_cnt: | |
150 | <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}</a> |
|
150 | <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}</a> | |
151 | %else: |
|
151 | %else: | |
152 | ${ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt} |
|
152 | ${ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt} | |
153 | %endif |
|
153 | %endif | |
154 | </div> |
|
154 | </div> | |
155 | </div> |
|
155 | </div> | |
156 | </div> |
|
156 | </div> | |
157 |
|
157 | |||
158 | </div> <!-- end summary-detail --> |
|
158 | </div> <!-- end summary-detail --> | |
159 |
|
159 | |||
160 | <div id="commit-stats" class="sidebar-right"> |
|
160 | <div id="commit-stats" class="sidebar-right"> | |
161 | <div class="summary-detail-header"> |
|
161 | <div class="summary-detail-header"> | |
162 | <h4 class="item"> |
|
162 | <h4 class="item"> | |
163 | ${_('Author')} |
|
163 | ${_('Author')} | |
164 | </h4> |
|
164 | </h4> | |
165 | </div> |
|
165 | </div> | |
166 | <div class="sidebar-right-content"> |
|
166 | <div class="sidebar-right-content"> | |
167 | ${self.gravatar_with_user(c.commit.author)} |
|
167 | ${self.gravatar_with_user(c.commit.author)} | |
168 | <div class="user-inline-data">- ${h.age_component(c.commit.date)}</div> |
|
168 | <div class="user-inline-data">- ${h.age_component(c.commit.date)}</div> | |
169 | </div> |
|
169 | </div> | |
170 | </div><!-- end sidebar --> |
|
170 | </div><!-- end sidebar --> | |
171 | </div> <!-- end summary --> |
|
171 | </div> <!-- end summary --> | |
172 | <div class="cs_files"> |
|
172 | <div class="cs_files"> | |
173 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> |
|
173 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> | |
174 | ${cbdiffs.render_diffset_menu()} |
|
174 | ${cbdiffs.render_diffset_menu()} | |
175 | ${cbdiffs.render_diffset( |
|
175 | ${cbdiffs.render_diffset( | |
176 | c.changes[c.commit.raw_id], commit=c.commit, use_comments=True)} |
|
176 | c.changes[c.commit.raw_id], commit=c.commit, use_comments=True)} | |
177 | </div> |
|
177 | </div> | |
178 |
|
178 | |||
179 | ## template for inline comment form |
|
179 | ## template for inline comment form | |
180 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> |
|
180 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> | |
181 |
|
181 | |||
182 | ## render comments |
|
182 | ## render comments | |
183 | ${comment.generate_comments()} |
|
183 | ${comment.generate_comments()} | |
184 |
|
184 | |||
185 | ## main comment form and it status |
|
185 | ## main comment form and it status | |
186 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.commit.raw_id), |
|
186 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.commit.raw_id), | |
187 | h.commit_status(c.rhodecode_db_repo, c.commit.raw_id))} |
|
187 | h.commit_status(c.rhodecode_db_repo, c.commit.raw_id))} | |
188 | </div> |
|
188 | </div> | |
189 |
|
189 | |||
190 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
190 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS | |
191 | <script type="text/javascript"> |
|
191 | <script type="text/javascript"> | |
192 |
|
192 | |||
193 | $(document).ready(function() { |
|
193 | $(document).ready(function() { | |
194 |
|
194 | |||
195 | var boxmax = parseInt($('#trimmed_message_box').css('max-height'), 10); |
|
195 | var boxmax = parseInt($('#trimmed_message_box').css('max-height'), 10); | |
196 | if($('#trimmed_message_box').height() === boxmax){ |
|
196 | if($('#trimmed_message_box').height() === boxmax){ | |
197 | $('#message_expand').show(); |
|
197 | $('#message_expand').show(); | |
198 | } |
|
198 | } | |
199 |
|
199 | |||
200 | $('#message_expand').on('click', function(e){ |
|
200 | $('#message_expand').on('click', function(e){ | |
201 | $('#trimmed_message_box').css('max-height', 'none'); |
|
201 | $('#trimmed_message_box').css('max-height', 'none'); | |
202 | $(this).hide(); |
|
202 | $(this).hide(); | |
203 | }); |
|
203 | }); | |
204 |
|
204 | |||
205 | $('.show-inline-comments').on('click', function(e){ |
|
205 | $('.show-inline-comments').on('click', function(e){ | |
206 | var boxid = $(this).attr('data-comment-id'); |
|
206 | var boxid = $(this).attr('data-comment-id'); | |
207 | var button = $(this); |
|
207 | var button = $(this); | |
208 |
|
208 | |||
209 | if(button.hasClass("comments-visible")) { |
|
209 | if(button.hasClass("comments-visible")) { | |
210 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
210 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ | |
211 | $(this).hide(); |
|
211 | $(this).hide(); | |
212 | }); |
|
212 | }); | |
213 | button.removeClass("comments-visible"); |
|
213 | button.removeClass("comments-visible"); | |
214 | } else { |
|
214 | } else { | |
215 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
215 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ | |
216 | $(this).show(); |
|
216 | $(this).show(); | |
217 | }); |
|
217 | }); | |
218 | button.addClass("comments-visible"); |
|
218 | button.addClass("comments-visible"); | |
219 | } |
|
219 | } | |
220 | }); |
|
220 | }); | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | // next links |
|
223 | // next links | |
224 | $('#child_link').on('click', function(e){ |
|
224 | $('#child_link').on('click', function(e){ | |
225 | // fetch via ajax what is going to be the next link, if we have |
|
225 | // fetch via ajax what is going to be the next link, if we have | |
226 | // >1 links show them to user to choose |
|
226 | // >1 links show them to user to choose | |
227 | if(!$('#child_link').hasClass('disabled')){ |
|
227 | if(!$('#child_link').hasClass('disabled')){ | |
228 | $.ajax({ |
|
228 | $.ajax({ | |
229 | url: '${h.url('changeset_children',repo_name=c.repo_name, revision=c.commit.raw_id)}', |
|
229 | url: '${h.url('changeset_children',repo_name=c.repo_name, revision=c.commit.raw_id)}', | |
230 | success: function(data) { |
|
230 | success: function(data) { | |
231 | if(data.results.length === 0){ |
|
231 | if(data.results.length === 0){ | |
232 | $('#child_link').html("${_('No Child Commits')}").addClass('disabled'); |
|
232 | $('#child_link').html("${_('No Child Commits')}").addClass('disabled'); | |
233 | } |
|
233 | } | |
234 | if(data.results.length === 1){ |
|
234 | if(data.results.length === 1){ | |
235 | var commit = data.results[0]; |
|
235 | var commit = data.results[0]; | |
236 | window.location = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': commit.raw_id}); |
|
236 | window.location = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': commit.raw_id}); | |
237 | } |
|
237 | } | |
238 | else if(data.results.length === 2){ |
|
238 | else if(data.results.length === 2){ | |
239 | $('#child_link').addClass('disabled'); |
|
239 | $('#child_link').addClass('disabled'); | |
240 | $('#child_link').addClass('double'); |
|
240 | $('#child_link').addClass('double'); | |
241 | var _html = ''; |
|
241 | var _html = ''; | |
242 | _html +='<a title="__title__" href="__url__">__rev__</a> ' |
|
242 | _html +='<a title="__title__" href="__url__">__rev__</a> ' | |
243 | .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) |
|
243 | .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) | |
244 | .replace('__title__', data.results[0].message) |
|
244 | .replace('__title__', data.results[0].message) | |
245 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); |
|
245 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); | |
246 | _html +=' | ' |
|
246 | _html +=' | '; | |
247 | _html +='<a title="__title__" href="__url__">__rev__</a> ' |
|
247 | _html +='<a title="__title__" href="__url__">__rev__</a> ' | |
248 | .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) |
|
248 | .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) | |
249 | .replace('__title__', data.results[1].message) |
|
249 | .replace('__title__', data.results[1].message) | |
250 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[1].raw_id})); |
|
250 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[1].raw_id})); | |
251 | $('#child_link').html(_html); |
|
251 | $('#child_link').html(_html); | |
252 | } |
|
252 | } | |
253 | } |
|
253 | } | |
254 | }); |
|
254 | }); | |
255 | e.preventDefault(); |
|
255 | e.preventDefault(); | |
256 | } |
|
256 | } | |
257 | }); |
|
257 | }); | |
258 |
|
258 | |||
259 | // prev links |
|
259 | // prev links | |
260 | $('#parent_link').on('click', function(e){ |
|
260 | $('#parent_link').on('click', function(e){ | |
261 | // fetch via ajax what is going to be the next link, if we have |
|
261 | // fetch via ajax what is going to be the next link, if we have | |
262 | // >1 links show them to user to choose |
|
262 | // >1 links show them to user to choose | |
263 | if(!$('#parent_link').hasClass('disabled')){ |
|
263 | if(!$('#parent_link').hasClass('disabled')){ | |
264 | $.ajax({ |
|
264 | $.ajax({ | |
265 | url: '${h.url("changeset_parents",repo_name=c.repo_name, revision=c.commit.raw_id)}', |
|
265 | url: '${h.url("changeset_parents",repo_name=c.repo_name, revision=c.commit.raw_id)}', | |
266 | success: function(data) { |
|
266 | success: function(data) { | |
267 | if(data.results.length === 0){ |
|
267 | if(data.results.length === 0){ | |
268 | $('#parent_link').html('${_('No Parent Commits')}').addClass('disabled'); |
|
268 | $('#parent_link').html('${_('No Parent Commits')}').addClass('disabled'); | |
269 | } |
|
269 | } | |
270 | if(data.results.length === 1){ |
|
270 | if(data.results.length === 1){ | |
271 | var commit = data.results[0]; |
|
271 | var commit = data.results[0]; | |
272 | window.location = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': commit.raw_id}); |
|
272 | window.location = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': commit.raw_id}); | |
273 | } |
|
273 | } | |
274 | else if(data.results.length === 2){ |
|
274 | else if(data.results.length === 2){ | |
275 | $('#parent_link').addClass('disabled'); |
|
275 | $('#parent_link').addClass('disabled'); | |
276 | $('#parent_link').addClass('double'); |
|
276 | $('#parent_link').addClass('double'); | |
277 | var _html = ''; |
|
277 | var _html = ''; | |
278 | _html +='<a title="__title__" href="__url__">Parent __rev__</a>' |
|
278 | _html +='<a title="__title__" href="__url__">Parent __rev__</a>' | |
279 | .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) |
|
279 | .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) | |
280 | .replace('__title__', data.results[0].message) |
|
280 | .replace('__title__', data.results[0].message) | |
281 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); |
|
281 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); | |
282 | _html +=' | ' |
|
282 | _html +=' | '; | |
283 | _html +='<a title="__title__" href="__url__">Parent __rev__</a>' |
|
283 | _html +='<a title="__title__" href="__url__">Parent __rev__</a>' | |
284 | .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) |
|
284 | .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) | |
285 | .replace('__title__', data.results[1].message) |
|
285 | .replace('__title__', data.results[1].message) | |
286 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[1].raw_id})); |
|
286 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[1].raw_id})); | |
287 | $('#parent_link').html(_html); |
|
287 | $('#parent_link').html(_html); | |
288 | } |
|
288 | } | |
289 | } |
|
289 | } | |
290 | }); |
|
290 | }); | |
291 | e.preventDefault(); |
|
291 | e.preventDefault(); | |
292 | } |
|
292 | } | |
293 | }); |
|
293 | }); | |
294 |
|
294 | |||
295 | if (location.hash) { |
|
295 | if (location.hash) { | |
296 | var result = splitDelimitedHash(location.hash); |
|
296 | var result = splitDelimitedHash(location.hash); | |
297 | var line = $('html').find(result.loc); |
|
297 | var line = $('html').find(result.loc); | |
298 | if (line.length > 0){ |
|
298 | if (line.length > 0){ | |
299 | offsetScroll(line, 70); |
|
299 | offsetScroll(line, 70); | |
300 | } |
|
300 | } | |
301 | } |
|
301 | } | |
302 |
|
302 | |||
303 | // browse tree @ revision |
|
303 | // browse tree @ revision | |
304 | $('#files_link').on('click', function(e){ |
|
304 | $('#files_link').on('click', function(e){ | |
305 | window.location = '${h.url('files_home',repo_name=c.repo_name, revision=c.commit.raw_id, f_path='')}'; |
|
305 | window.location = '${h.url('files_home',repo_name=c.repo_name, revision=c.commit.raw_id, f_path='')}'; | |
306 | e.preventDefault(); |
|
306 | e.preventDefault(); | |
307 | }); |
|
307 | }); | |
308 |
|
308 | |||
309 | // inject comments into their proper positions |
|
309 | // inject comments into their proper positions | |
310 | var file_comments = $('.inline-comment-placeholder'); |
|
310 | var file_comments = $('.inline-comment-placeholder'); | |
311 | }) |
|
311 | }) | |
312 | </script> |
|
312 | </script> | |
313 |
|
313 | |||
314 | </%def> |
|
314 | </%def> |
@@ -1,264 +1,263 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | ## usage: |
|
2 | ## usage: | |
3 | ## <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> |
|
3 | ## <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> | |
4 | ## ${comment.comment_block(comment)} |
|
4 | ## ${comment.comment_block(comment)} | |
5 | ## |
|
5 | ## | |
6 | <%namespace name="base" file="/base/base.mako"/> |
|
6 | <%namespace name="base" file="/base/base.mako"/> | |
7 |
|
7 | |||
8 | <%def name="comment_block(comment, inline=False)"> |
|
8 | <%def name="comment_block(comment, inline=False)"> | |
9 | <% outdated_at_ver = comment.outdated_at_version(getattr(c, 'at_version', None)) %> |
|
9 | <% outdated_at_ver = comment.outdated_at_version(getattr(c, 'at_version', None)) %> | |
10 |
|
10 | |||
11 | <div class="comment |
|
11 | <div class="comment | |
12 | ${'comment-inline' if inline else ''} |
|
12 | ${'comment-inline' if inline else ''} | |
13 | ${'comment-outdated' if outdated_at_ver else 'comment-current'}" |
|
13 | ${'comment-outdated' if outdated_at_ver else 'comment-current'}" | |
14 | id="comment-${comment.comment_id}" |
|
14 | id="comment-${comment.comment_id}" | |
15 | line="${comment.line_no}" |
|
15 | line="${comment.line_no}" | |
16 | data-comment-id="${comment.comment_id}" |
|
16 | data-comment-id="${comment.comment_id}" | |
17 | style="${'display: none;' if outdated_at_ver else ''}"> |
|
17 | style="${'display: none;' if outdated_at_ver else ''}"> | |
18 |
|
18 | |||
19 | <div class="meta"> |
|
19 | <div class="meta"> | |
20 | <div class="author"> |
|
20 | <div class="author"> | |
21 | ${base.gravatar_with_user(comment.author.email, 16)} |
|
21 | ${base.gravatar_with_user(comment.author.email, 16)} | |
22 | </div> |
|
22 | </div> | |
23 | <div class="date"> |
|
23 | <div class="date"> | |
24 | ${h.age_component(comment.modified_at, time_is_local=True)} |
|
24 | ${h.age_component(comment.modified_at, time_is_local=True)} | |
25 | </div> |
|
25 | </div> | |
26 | <div class="status-change"> |
|
26 | <div class="status-change"> | |
27 | % if comment.pull_request: |
|
27 | % if comment.pull_request: | |
28 | % if comment.outdated: |
|
28 | % if comment.outdated: | |
29 | <a href="?version=${comment.pull_request_version_id}#comment-${comment.comment_id}"> |
|
29 | <a href="?version=${comment.pull_request_version_id}#comment-${comment.comment_id}"> | |
30 | ${_('Outdated comment from pull request version {}').format(comment.pull_request_version_id)} |
|
30 | ${_('Outdated comment from pull request version {}').format(comment.pull_request_version_id)} | |
31 | </a> |
|
31 | </a> | |
32 | % else: |
|
32 | % else: | |
33 | <a href="${h.url('pullrequest_show',repo_name=comment.pull_request.target_repo.repo_name,pull_request_id=comment.pull_request.pull_request_id)}"> |
|
33 | <a href="${h.url('pullrequest_show',repo_name=comment.pull_request.target_repo.repo_name,pull_request_id=comment.pull_request.pull_request_id)}"> | |
34 | %if comment.status_change: |
|
34 | %if comment.status_change: | |
35 | ${_('Vote on pull request #%s') % comment.pull_request.pull_request_id}: |
|
35 | ${_('Vote on pull request #%s') % comment.pull_request.pull_request_id}: | |
36 | %else: |
|
36 | %else: | |
37 | ${_('Comment on pull request #%s') % comment.pull_request.pull_request_id} |
|
37 | ${_('Comment on pull request #%s') % comment.pull_request.pull_request_id} | |
38 | %endif |
|
38 | %endif | |
39 | </a> |
|
39 | </a> | |
40 | % endif |
|
40 | % endif | |
41 | % else: |
|
41 | % else: | |
42 | % if comment.status_change: |
|
42 | % if comment.status_change: | |
43 | ${_('Status change on commit')}: |
|
43 | ${_('Status change on commit')}: | |
44 | % else: |
|
44 | % else: | |
45 | ${_('Comment on commit')} |
|
45 | ${_('Comment on commit')} | |
46 | % endif |
|
46 | % endif | |
47 | % endif |
|
47 | % endif | |
48 | </div> |
|
48 | </div> | |
49 | %if comment.status_change: |
|
49 | %if comment.status_change: | |
50 | <div class="${'flag_status %s' % comment.status_change[0].status}"></div> |
|
50 | <div class="${'flag_status %s' % comment.status_change[0].status}"></div> | |
51 | <div title="${_('Commit status')}" class="changeset-status-lbl"> |
|
51 | <div title="${_('Commit status')}" class="changeset-status-lbl"> | |
52 | ${comment.status_change[0].status_lbl} |
|
52 | ${comment.status_change[0].status_lbl} | |
53 | </div> |
|
53 | </div> | |
54 | %endif |
|
54 | %endif | |
55 | <a class="permalink" href="#comment-${comment.comment_id}"> ¶</a> |
|
55 | <a class="permalink" href="#comment-${comment.comment_id}"> ¶</a> | |
56 |
|
56 | |||
57 | <div class="comment-links-block"> |
|
57 | <div class="comment-links-block"> | |
58 | ## show delete comment if it's not a PR (regular comments) or it's PR that is not closed |
|
58 | ## show delete comment if it's not a PR (regular comments) or it's PR that is not closed | |
59 | ## only super-admin, repo admin OR comment owner can delete, also hide delete if currently viewed comment is outdated |
|
59 | ## only super-admin, repo admin OR comment owner can delete, also hide delete if currently viewed comment is outdated | |
60 | %if not outdated_at_ver and (not comment.pull_request or (comment.pull_request and not comment.pull_request.is_closed())): |
|
60 | %if not outdated_at_ver and (not comment.pull_request or (comment.pull_request and not comment.pull_request.is_closed())): | |
61 | ## permissions to delete |
|
61 | ## permissions to delete | |
62 | %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or comment.author.user_id == c.rhodecode_user.user_id: |
|
62 | %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or comment.author.user_id == c.rhodecode_user.user_id: | |
63 | ## TODO: dan: add edit comment here |
|
63 | ## TODO: dan: add edit comment here | |
64 | <a onclick="return Rhodecode.comments.deleteComment(this);" class="delete-comment"> ${_('Delete')}</a> |
|
64 | <a onclick="return Rhodecode.comments.deleteComment(this);" class="delete-comment"> ${_('Delete')}</a> | |
65 | %else: |
|
65 | %else: | |
66 | <button class="btn-link" disabled="disabled"> ${_('Delete')}</button> |
|
66 | <button class="btn-link" disabled="disabled"> ${_('Delete')}</button> | |
67 | %endif |
|
67 | %endif | |
68 | %else: |
|
68 | %else: | |
69 | <button class="btn-link" disabled="disabled"> ${_('Delete')}</button> |
|
69 | <button class="btn-link" disabled="disabled"> ${_('Delete')}</button> | |
70 | %endif |
|
70 | %endif | |
71 |
|
71 | |||
72 | %if not outdated_at_ver: |
|
72 | %if not outdated_at_ver: | |
73 | | <a onclick="return Rhodecode.comments.prevComment(this);" class="prev-comment"> ${_('Prev')}</a> |
|
73 | | <a onclick="return Rhodecode.comments.prevComment(this);" class="prev-comment"> ${_('Prev')}</a> | |
74 | | <a onclick="return Rhodecode.comments.nextComment(this);" class="next-comment"> ${_('Next')}</a> |
|
74 | | <a onclick="return Rhodecode.comments.nextComment(this);" class="next-comment"> ${_('Next')}</a> | |
75 | %endif |
|
75 | %endif | |
76 |
|
76 | |||
77 | </div> |
|
77 | </div> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="text"> |
|
79 | <div class="text"> | |
80 | ${comment.render(mentions=True)|n} |
|
80 | ${comment.render(mentions=True)|n} | |
81 | </div> |
|
81 | </div> | |
82 |
|
82 | |||
83 | </div> |
|
83 | </div> | |
84 | </%def> |
|
84 | </%def> | |
85 | ## generate main comments |
|
85 | ## generate main comments | |
86 | <%def name="generate_comments(include_pull_request=False, is_pull_request=False)"> |
|
86 | <%def name="generate_comments(include_pull_request=False, is_pull_request=False)"> | |
87 | <div id="comments"> |
|
87 | <div id="comments"> | |
88 | %for comment in c.comments: |
|
88 | %for comment in c.comments: | |
89 | <div id="comment-tr-${comment.comment_id}"> |
|
89 | <div id="comment-tr-${comment.comment_id}"> | |
90 | ## only render comments that are not from pull request, or from |
|
90 | ## only render comments that are not from pull request, or from | |
91 | ## pull request and a status change |
|
91 | ## pull request and a status change | |
92 | %if not comment.pull_request or (comment.pull_request and comment.status_change) or include_pull_request: |
|
92 | %if not comment.pull_request or (comment.pull_request and comment.status_change) or include_pull_request: | |
93 | ${comment_block(comment)} |
|
93 | ${comment_block(comment)} | |
94 | %endif |
|
94 | %endif | |
95 | </div> |
|
95 | </div> | |
96 | %endfor |
|
96 | %endfor | |
97 | ## to anchor ajax comments |
|
97 | ## to anchor ajax comments | |
98 | <div id="injected_page_comments"></div> |
|
98 | <div id="injected_page_comments"></div> | |
99 | </div> |
|
99 | </div> | |
100 | </%def> |
|
100 | </%def> | |
101 |
|
101 | |||
102 | ## MAIN COMMENT FORM |
|
102 | ## MAIN COMMENT FORM | |
103 | <%def name="comments(post_url, cur_status, is_pull_request=False, is_compare=False, change_status=True, form_extras=None)"> |
|
103 | <%def name="comments(post_url, cur_status, is_pull_request=False, is_compare=False, change_status=True, form_extras=None)"> | |
104 |
|
104 | |||
105 | %if is_compare: |
|
105 | %if is_compare: | |
106 | <% form_id = "comments_form_compare" %> |
|
106 | <% form_id = "comments_form_compare" %> | |
107 | %else: |
|
107 | %else: | |
108 | <% form_id = "comments_form" %> |
|
108 | <% form_id = "comments_form" %> | |
109 | %endif |
|
109 | %endif | |
110 |
|
110 | |||
111 |
|
111 | |||
112 | %if is_pull_request: |
|
112 | %if is_pull_request: | |
113 | <div class="pull-request-merge"> |
|
113 | <div class="pull-request-merge"> | |
114 | %if c.allowed_to_merge: |
|
114 | %if c.allowed_to_merge: | |
115 | <div class="pull-request-wrap"> |
|
115 | <div class="pull-request-wrap"> | |
116 | <div class="pull-right"> |
|
116 | <div class="pull-right"> | |
117 | ${h.secure_form(url('pullrequest_merge', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), id='merge_pull_request_form')} |
|
117 | ${h.secure_form(url('pullrequest_merge', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), id='merge_pull_request_form')} | |
118 | <span data-role="merge-message">${c.pr_merge_msg} ${c.approval_msg if c.approval_msg else ''}</span> |
|
118 | <span data-role="merge-message">${c.pr_merge_msg} ${c.approval_msg if c.approval_msg else ''}</span> | |
119 | <% merge_disabled = ' disabled' if c.pr_merge_status is False else '' %> |
|
119 | <% merge_disabled = ' disabled' if c.pr_merge_status is False else '' %> | |
120 | <input type="submit" id="merge_pull_request" value="${_('Merge Pull Request')}" class="btn${merge_disabled}"${merge_disabled}> |
|
120 | <input type="submit" id="merge_pull_request" value="${_('Merge Pull Request')}" class="btn${merge_disabled}"${merge_disabled}> | |
121 | ${h.end_form()} |
|
121 | ${h.end_form()} | |
122 | </div> |
|
122 | </div> | |
123 | </div> |
|
123 | </div> | |
124 | %else: |
|
124 | %else: | |
125 | <div class="pull-request-wrap"> |
|
125 | <div class="pull-request-wrap"> | |
126 | <div class="pull-right"> |
|
126 | <div class="pull-right"> | |
127 | <span>${c.pr_merge_msg} ${c.approval_msg if c.approval_msg else ''}</span> |
|
127 | <span>${c.pr_merge_msg} ${c.approval_msg if c.approval_msg else ''}</span> | |
128 | </div> |
|
128 | </div> | |
129 | </div> |
|
129 | </div> | |
130 | %endif |
|
130 | %endif | |
131 | </div> |
|
131 | </div> | |
132 | %endif |
|
132 | %endif | |
133 | <div class="comments"> |
|
133 | <div class="comments"> | |
134 | <% |
|
134 | <% | |
135 | if is_pull_request: |
|
135 | if is_pull_request: | |
136 | placeholder = _('Leave a comment on this Pull Request.') |
|
136 | placeholder = _('Leave a comment on this Pull Request.') | |
137 | elif is_compare: |
|
137 | elif is_compare: | |
138 | placeholder = _('Leave a comment on all commits in this range.') |
|
138 | placeholder = _('Leave a comment on all commits in this range.') | |
139 | else: |
|
139 | else: | |
140 | placeholder = _('Leave a comment on this Commit.') |
|
140 | placeholder = _('Leave a comment on this Commit.') | |
141 | %> |
|
141 | %> | |
142 | % if c.rhodecode_user.username != h.DEFAULT_USER: |
|
142 | % if c.rhodecode_user.username != h.DEFAULT_USER: | |
143 | <div class="comment-form ac"> |
|
143 | <div class="comment-form ac"> | |
144 | ${h.secure_form(post_url, id_=form_id)} |
|
144 | ${h.secure_form(post_url, id_=form_id)} | |
145 | <div class="comment-area"> |
|
145 | <div class="comment-area"> | |
146 | <div class="comment-area-header"> |
|
146 | <div class="comment-area-header"> | |
147 | <ul class="nav-links clearfix"> |
|
147 | <ul class="nav-links clearfix"> | |
148 | <li class="active"> |
|
148 | <li class="active"> | |
149 | <a href="#edit-btn" tabindex="-1" id="edit-btn">${_('Write')}</a> |
|
149 | <a href="#edit-btn" tabindex="-1" id="edit-btn">${_('Write')}</a> | |
150 | </li> |
|
150 | </li> | |
151 | <li class=""> |
|
151 | <li class=""> | |
152 | <a href="#preview-btn" tabindex="-1" id="preview-btn">${_('Preview')}</a> |
|
152 | <a href="#preview-btn" tabindex="-1" id="preview-btn">${_('Preview')}</a> | |
153 | </li> |
|
153 | </li> | |
154 | </ul> |
|
154 | </ul> | |
155 | </div> |
|
155 | </div> | |
156 |
|
156 | |||
157 | <div class="comment-area-write" style="display: block;"> |
|
157 | <div class="comment-area-write" style="display: block;"> | |
158 | <div id="edit-container"> |
|
158 | <div id="edit-container"> | |
159 | <textarea id="text" name="text" class="comment-block-ta ac-input"></textarea> |
|
159 | <textarea id="text" name="text" class="comment-block-ta ac-input"></textarea> | |
160 | </div> |
|
160 | </div> | |
161 | <div id="preview-container" class="clearfix" style="display: none;"> |
|
161 | <div id="preview-container" class="clearfix" style="display: none;"> | |
162 | <div id="preview-box" class="preview-box"></div> |
|
162 | <div id="preview-box" class="preview-box"></div> | |
163 | </div> |
|
163 | </div> | |
164 | </div> |
|
164 | </div> | |
165 |
|
165 | |||
166 | <div class="comment-area-footer"> |
|
166 | <div class="comment-area-footer"> | |
167 | <div class="toolbar"> |
|
167 | <div class="toolbar"> | |
168 | <div class="toolbar-text"> |
|
168 | <div class="toolbar-text"> | |
169 | ${(_('Comments parsed using %s syntax with %s support.') % ( |
|
169 | ${(_('Comments parsed using %s syntax with %s support.') % ( | |
170 | ('<a href="%s">%s</a>' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())), |
|
170 | ('<a href="%s">%s</a>' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())), | |
171 | ('<span class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user')) |
|
171 | ('<span class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user')) | |
172 | ) |
|
172 | ) | |
173 | )|n |
|
173 | )|n} | |
174 | } |
|
|||
175 | </div> |
|
174 | </div> | |
176 | </div> |
|
175 | </div> | |
177 | </div> |
|
176 | </div> | |
178 | </div> |
|
177 | </div> | |
179 |
|
178 | |||
180 | <div id="comment_form_extras"> |
|
179 | <div id="comment_form_extras"> | |
181 | %if form_extras and isinstance(form_extras, (list, tuple)): |
|
180 | %if form_extras and isinstance(form_extras, (list, tuple)): | |
182 | % for form_ex_el in form_extras: |
|
181 | % for form_ex_el in form_extras: | |
183 | ${form_ex_el|n} |
|
182 | ${form_ex_el|n} | |
184 | % endfor |
|
183 | % endfor | |
185 | %endif |
|
184 | %endif | |
186 | </div> |
|
185 | </div> | |
187 | <div class="comment-footer"> |
|
186 | <div class="comment-footer"> | |
188 | %if change_status: |
|
187 | %if change_status: | |
189 | <div class="status_box"> |
|
188 | <div class="status_box"> | |
190 | <select id="change_status" name="changeset_status"> |
|
189 | <select id="change_status" name="changeset_status"> | |
191 | <option></option> # Placeholder |
|
190 | <option></option> # Placeholder | |
192 | %for status,lbl in c.commit_statuses: |
|
191 | %for status,lbl in c.commit_statuses: | |
193 | <option value="${status}" data-status="${status}">${lbl}</option> |
|
192 | <option value="${status}" data-status="${status}">${lbl}</option> | |
194 | %if is_pull_request and change_status and status in ('approved', 'rejected'): |
|
193 | %if is_pull_request and change_status and status in ('approved', 'rejected'): | |
195 | <option value="${status}_closed" data-status="${status}">${lbl} & ${_('Closed')}</option> |
|
194 | <option value="${status}_closed" data-status="${status}">${lbl} & ${_('Closed')}</option> | |
196 | %endif |
|
195 | %endif | |
197 | %endfor |
|
196 | %endfor | |
198 | </select> |
|
197 | </select> | |
199 | </div> |
|
198 | </div> | |
200 | %endif |
|
199 | %endif | |
201 | <div class="action-buttons"> |
|
200 | <div class="action-buttons"> | |
202 | <div class="comment-button">${h.submit('save', _('Comment'), class_="btn btn-success comment-button-input")}</div> |
|
201 | <div class="comment-button">${h.submit('save', _('Comment'), class_="btn btn-success comment-button-input")}</div> | |
203 | </div> |
|
202 | </div> | |
204 | </div> |
|
203 | </div> | |
205 | ${h.end_form()} |
|
204 | ${h.end_form()} | |
206 | </div> |
|
205 | </div> | |
207 | % else: |
|
206 | % else: | |
208 | <div class="comment-form ac"> |
|
207 | <div class="comment-form ac"> | |
209 |
|
208 | |||
210 | <div class="comment-area"> |
|
209 | <div class="comment-area"> | |
211 | <div class="comment-area-header"> |
|
210 | <div class="comment-area-header"> | |
212 | <ul class="nav-links clearfix"> |
|
211 | <ul class="nav-links clearfix"> | |
213 | <li class="active"> |
|
212 | <li class="active"> | |
214 | <a class="disabled" href="#edit-btn" disabled="disabled" onclick="return false">${_('Write')}</a> |
|
213 | <a class="disabled" href="#edit-btn" disabled="disabled" onclick="return false">${_('Write')}</a> | |
215 | </li> |
|
214 | </li> | |
216 | <li class=""> |
|
215 | <li class=""> | |
217 | <a class="disabled" href="#preview-btn" disabled="disabled" onclick="return false">${_('Preview')}</a> |
|
216 | <a class="disabled" href="#preview-btn" disabled="disabled" onclick="return false">${_('Preview')}</a> | |
218 | </li> |
|
217 | </li> | |
219 | </ul> |
|
218 | </ul> | |
220 | </div> |
|
219 | </div> | |
221 |
|
220 | |||
222 | <div class="comment-area-write" style="display: block;"> |
|
221 | <div class="comment-area-write" style="display: block;"> | |
223 | <div id="edit-container"> |
|
222 | <div id="edit-container"> | |
224 | <div style="padding: 40px 0"> |
|
223 | <div style="padding: 40px 0"> | |
225 | ${_('You need to be logged in to leave comments.')} |
|
224 | ${_('You need to be logged in to leave comments.')} | |
226 | <a href="${h.route_path('login', _query={'came_from': h.url.current()})}">${_('Login now')}</a> |
|
225 | <a href="${h.route_path('login', _query={'came_from': h.url.current()})}">${_('Login now')}</a> | |
227 | </div> |
|
226 | </div> | |
228 | </div> |
|
227 | </div> | |
229 | <div id="preview-container" class="clearfix" style="display: none;"> |
|
228 | <div id="preview-container" class="clearfix" style="display: none;"> | |
230 | <div id="preview-box" class="preview-box"></div> |
|
229 | <div id="preview-box" class="preview-box"></div> | |
231 | </div> |
|
230 | </div> | |
232 | </div> |
|
231 | </div> | |
233 |
|
232 | |||
234 | <div class="comment-area-footer"> |
|
233 | <div class="comment-area-footer"> | |
235 | <div class="toolbar"> |
|
234 | <div class="toolbar"> | |
236 | <div class="toolbar-text"> |
|
235 | <div class="toolbar-text"> | |
237 | </div> |
|
236 | </div> | |
238 | </div> |
|
237 | </div> | |
239 | </div> |
|
238 | </div> | |
240 | </div> |
|
239 | </div> | |
241 |
|
240 | |||
242 | <div class="comment-footer"> |
|
241 | <div class="comment-footer"> | |
243 | </div> |
|
242 | </div> | |
244 |
|
243 | |||
245 | </div> |
|
244 | </div> | |
246 | % endif |
|
245 | % endif | |
247 |
|
246 | |||
248 | </div> |
|
247 | </div> | |
249 |
|
248 | |||
250 | <script> |
|
249 | <script> | |
251 | // init active elements of commentForm |
|
250 | // init active elements of commentForm | |
252 | var commitId = templateContext.commit_data.commit_id; |
|
251 | var commitId = templateContext.commit_data.commit_id; | |
253 | var pullRequestId = templateContext.pull_request_data.pull_request_id; |
|
252 | var pullRequestId = templateContext.pull_request_data.pull_request_id; | |
254 | var lineNo; |
|
253 | var lineNo; | |
255 |
|
254 | |||
256 | var mainCommentForm = new CommentForm( |
|
255 | var mainCommentForm = new CommentForm( | |
257 | "#${form_id}", commitId, pullRequestId, lineNo, true); |
|
256 | "#${form_id}", commitId, pullRequestId, lineNo, true); | |
258 |
|
257 | |||
259 | mainCommentForm.cm.setOption('placeholder', "${placeholder}"); |
|
258 | mainCommentForm.cm.setOption('placeholder', "${placeholder}"); | |
260 |
|
259 | |||
261 | mainCommentForm.initStatusChangeSelector(); |
|
260 | mainCommentForm.initStatusChangeSelector(); | |
262 | bindToggleButtons(); |
|
261 | bindToggleButtons(); | |
263 | </script> |
|
262 | </script> | |
264 | </%def> |
|
263 | </%def> |
@@ -1,64 +1,64 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | ##usage: |
|
2 | ##usage: | |
3 | ## <%namespace name="diff_block" file="/changeset/diff_block.mako"/> |
|
3 | ## <%namespace name="diff_block" file="/changeset/diff_block.mako"/> | |
4 | ## ${diff_block.diff_block_changeset_table(change)} |
|
4 | ## ${diff_block.diff_block_changeset_table(change)} | |
5 | ## |
|
5 | ## | |
6 | <%def name="changeset_message()"> |
|
6 | <%def name="changeset_message()"> | |
7 | <h5>${_('The requested commit is too big and content was truncated.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5> |
|
7 | <h5>${_('The requested commit is too big and content was truncated.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5> | |
8 | </%def> |
|
8 | </%def> | |
9 | <%def name="file_message()"> |
|
9 | <%def name="file_message()"> | |
10 | <h5>${_('The requested file is too big and its content is not shown.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5> |
|
10 | <h5>${_('The requested file is too big and its content is not shown.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5> | |
11 | </%def> |
|
11 | </%def> | |
12 |
|
12 | |||
13 | <%def name="diff_block_changeset_table(change)"> |
|
13 | <%def name="diff_block_changeset_table(change)"> | |
14 | <div class="diff-container" id="${'diff-container-%s' % (id(change))}"> |
|
14 | <div class="diff-container" id="${'diff-container-%s' % (id(change))}"> | |
15 | %for FID,(cs1, cs2, change, filenode_path, diff, stats, file) in change.iteritems(): |
|
15 | %for FID,(cs1, cs2, change, filenode_path, diff, stats, file_data) in change.iteritems(): | |
16 | <div id="${h.FID('',filenode_path)}_target" ></div> |
|
16 | <div id="${h.FID('',filenode_path)}_target" ></div> | |
17 | <div id="${h.FID('',filenode_path)}" class="diffblock margined comm"> |
|
17 | <div id="${h.FID('',filenode_path)}" class="diffblock margined comm"> | |
18 | <div class="code-body"> |
|
18 | <div class="code-body"> | |
19 | <div class="full_f_path" path="${h.safe_unicode(filenode_path)}" style="display: none"></div> |
|
19 | <div class="full_f_path" path="${h.safe_unicode(filenode_path)}" style="display: none"></div> | |
20 | ${diff|n} |
|
20 | ${diff|n} | |
21 | % if file["is_limited_diff"]: |
|
21 | % if file_data["is_limited_diff"]: | |
22 | % if file["exceeds_limit"]: |
|
22 | % if file_data["exceeds_limit"]: | |
23 | ${self.file_message()} |
|
23 | ${self.file_message()} | |
24 | % else: |
|
24 | % else: | |
25 | <h5>${_('Diff was truncated. File content available only in full diff.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5> |
|
25 | <h5>${_('Diff was truncated. File content available only in full diff.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5> | |
26 | % endif |
|
26 | % endif | |
27 | % endif |
|
27 | % endif | |
28 | </div> |
|
28 | </div> | |
29 | </div> |
|
29 | </div> | |
30 | %endfor |
|
30 | %endfor | |
31 | </div> |
|
31 | </div> | |
32 | </%def> |
|
32 | </%def> | |
33 |
|
33 | |||
34 | <%def name="diff_block_simple(change)"> |
|
34 | <%def name="diff_block_simple(change)"> | |
35 | <div class="diff-container" id="${'diff-container-%s' % (id(change))}"> |
|
35 | <div class="diff-container" id="${'diff-container-%s' % (id(change))}"> | |
36 | %for op,filenode_path,diff,file in change: |
|
36 | %for op,filenode_path,diff,file_data in change: | |
37 | <div id="${h.FID('',filenode_path)}_target" ></div> |
|
37 | <div id="${h.FID('',filenode_path)}_target" ></div> | |
38 | <div id="${h.FID('',filenode_path)}" class="diffblock margined comm" > |
|
38 | <div id="${h.FID('',filenode_path)}" class="diffblock margined comm" > | |
39 | <div class="code-body"> |
|
39 | <div class="code-body"> | |
40 | <div class="full_f_path" path="${h.safe_unicode(filenode_path)}" style="display: none;"></div> |
|
40 | <div class="full_f_path" path="${h.safe_unicode(filenode_path)}" style="display: none;"></div> | |
41 | ${diff|n} |
|
41 | ${diff|n} | |
42 | % if file["is_limited_diff"]: |
|
42 | % if file_data["is_limited_diff"]: | |
43 | % if file["exceeds_limit"]: |
|
43 | % if file_data["exceeds_limit"]: | |
44 | ${self.file_message()} |
|
44 | ${self.file_message()} | |
45 | % else: |
|
45 | % else: | |
46 | <h5>${_('Diff was truncated. File content available only in full diff.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5> |
|
46 | <h5>${_('Diff was truncated. File content available only in full diff.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5> | |
47 | % endif |
|
47 | % endif | |
48 | % endif |
|
48 | % endif | |
49 | </div> |
|
49 | </div> | |
50 | </div> |
|
50 | </div> | |
51 | %endfor |
|
51 | %endfor | |
52 | </div> |
|
52 | </div> | |
53 | </%def> |
|
53 | </%def> | |
54 |
|
54 | |||
55 |
|
55 | |||
56 | <%def name="diff_summary_text(changed_files, lines_added, lines_deleted, limited_diff=False)"> |
|
56 | <%def name="diff_summary_text(changed_files, lines_added, lines_deleted, limited_diff=False)"> | |
57 | % if limited_diff: |
|
57 | % if limited_diff: | |
58 | ${ungettext('%(num)s file changed', '%(num)s files changed', changed_files) % {'num': changed_files}} |
|
58 | ${ungettext('%(num)s file changed', '%(num)s files changed', changed_files) % {'num': changed_files}} | |
59 | % else: |
|
59 | % else: | |
60 | ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', |
|
60 | ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', | |
61 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', changed_files) % {'num': changed_files, 'linesadd': lines_added, 'linesdel': lines_deleted}} |
|
61 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', changed_files) % {'num': changed_files, 'linesadd': lines_added, 'linesdel': lines_deleted}} | |
62 | %endif |
|
62 | %endif | |
63 | </%def> |
|
63 | </%def> | |
64 |
|
64 |
@@ -1,705 +1,711 b'' | |||||
1 | <%def name="diff_line_anchor(filename, line, type)"><% |
|
1 | <%def name="diff_line_anchor(filename, line, type)"><% | |
2 | return '%s_%s_%i' % (h.safeid(filename), type, line) |
|
2 | return '%s_%s_%i' % (h.safeid(filename), type, line) | |
3 | %></%def> |
|
3 | %></%def> | |
4 |
|
4 | |||
5 |
<%def name="action_class(action)"> |
|
5 | <%def name="action_class(action)"> | |
|
6 | <% | |||
6 | return { |
|
7 | return { | |
7 | '-': 'cb-deletion', |
|
8 | '-': 'cb-deletion', | |
8 | '+': 'cb-addition', |
|
9 | '+': 'cb-addition', | |
9 | ' ': 'cb-context', |
|
10 | ' ': 'cb-context', | |
10 | }.get(action, 'cb-empty') |
|
11 | }.get(action, 'cb-empty') | |
11 | %></%def> |
|
12 | %> | |
|
13 | </%def> | |||
12 |
|
14 | |||
13 |
<%def name="op_class(op_id)"> |
|
15 | <%def name="op_class(op_id)"> | |
|
16 | <% | |||
14 | return { |
|
17 | return { | |
15 | DEL_FILENODE: 'deletion', # file deleted |
|
18 | DEL_FILENODE: 'deletion', # file deleted | |
16 | BIN_FILENODE: 'warning' # binary diff hidden |
|
19 | BIN_FILENODE: 'warning' # binary diff hidden | |
17 | }.get(op_id, 'addition') |
|
20 | }.get(op_id, 'addition') | |
18 | %></%def> |
|
21 | %> | |
|
22 | </%def> | |||
19 |
|
23 | |||
20 |
<%def name="link_for(**kw)"> |
|
24 | <%def name="link_for(**kw)"> | |
|
25 | <% | |||
21 | new_args = request.GET.mixed() |
|
26 | new_args = request.GET.mixed() | |
22 | new_args.update(kw) |
|
27 | new_args.update(kw) | |
23 | return h.url('', **new_args) |
|
28 | return h.url('', **new_args) | |
24 | %></%def> |
|
29 | %> | |
|
30 | </%def> | |||
25 |
|
31 | |||
26 | <%def name="render_diffset(diffset, commit=None, |
|
32 | <%def name="render_diffset(diffset, commit=None, | |
27 |
|
33 | |||
28 | # collapse all file diff entries when there are more than this amount of files in the diff |
|
34 | # collapse all file diff entries when there are more than this amount of files in the diff | |
29 | collapse_when_files_over=20, |
|
35 | collapse_when_files_over=20, | |
30 |
|
36 | |||
31 | # collapse lines in the diff when more than this amount of lines changed in the file diff |
|
37 | # collapse lines in the diff when more than this amount of lines changed in the file diff | |
32 | lines_changed_limit=500, |
|
38 | lines_changed_limit=500, | |
33 |
|
39 | |||
34 | # add a ruler at to the output |
|
40 | # add a ruler at to the output | |
35 | ruler_at_chars=0, |
|
41 | ruler_at_chars=0, | |
36 |
|
42 | |||
37 | # show inline comments |
|
43 | # show inline comments | |
38 | use_comments=False, |
|
44 | use_comments=False, | |
39 |
|
45 | |||
40 | # disable new comments |
|
46 | # disable new comments | |
41 | disable_new_comments=False, |
|
47 | disable_new_comments=False, | |
42 |
|
48 | |||
43 | # special file-comments that were deleted in previous versions |
|
49 | # special file-comments that were deleted in previous versions | |
44 | # it's used for showing outdated comments for deleted files in a PR |
|
50 | # it's used for showing outdated comments for deleted files in a PR | |
45 | deleted_files_comments=None |
|
51 | deleted_files_comments=None | |
46 |
|
52 | |||
47 | )"> |
|
53 | )"> | |
48 |
|
54 | |||
49 | %if use_comments: |
|
55 | %if use_comments: | |
50 | <div id="cb-comments-inline-container-template" class="js-template"> |
|
56 | <div id="cb-comments-inline-container-template" class="js-template"> | |
51 | ${inline_comments_container([])} |
|
57 | ${inline_comments_container([])} | |
52 | </div> |
|
58 | </div> | |
53 | <div class="js-template" id="cb-comment-inline-form-template"> |
|
59 | <div class="js-template" id="cb-comment-inline-form-template"> | |
54 | <div class="comment-inline-form ac"> |
|
60 | <div class="comment-inline-form ac"> | |
55 |
|
61 | |||
56 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
62 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
57 | ${h.form('#', method='get')} |
|
63 | ${h.form('#', method='get')} | |
58 | <div class="comment-area"> |
|
64 | <div class="comment-area"> | |
59 | <div class="comment-area-header"> |
|
65 | <div class="comment-area-header"> | |
60 | <ul class="nav-links clearfix"> |
|
66 | <ul class="nav-links clearfix"> | |
61 | <li class="active"> |
|
67 | <li class="active"> | |
62 | <a href="#edit-btn" tabindex="-1" id="edit-btn_{1}">${_('Write')}</a> |
|
68 | <a href="#edit-btn" tabindex="-1" id="edit-btn_{1}">${_('Write')}</a> | |
63 | </li> |
|
69 | </li> | |
64 | <li class=""> |
|
70 | <li class=""> | |
65 | <a href="#preview-btn" tabindex="-1" id="preview-btn_{1}">${_('Preview')}</a> |
|
71 | <a href="#preview-btn" tabindex="-1" id="preview-btn_{1}">${_('Preview')}</a> | |
66 | </li> |
|
72 | </li> | |
67 | </ul> |
|
73 | </ul> | |
68 | </div> |
|
74 | </div> | |
69 |
|
75 | |||
70 | <div class="comment-area-write" style="display: block;"> |
|
76 | <div class="comment-area-write" style="display: block;"> | |
71 | <div id="edit-container_{1}"> |
|
77 | <div id="edit-container_{1}"> | |
72 | <textarea id="text_{1}" name="text" class="comment-block-ta ac-input"></textarea> |
|
78 | <textarea id="text_{1}" name="text" class="comment-block-ta ac-input"></textarea> | |
73 | </div> |
|
79 | </div> | |
74 | <div id="preview-container_{1}" class="clearfix" style="display: none;"> |
|
80 | <div id="preview-container_{1}" class="clearfix" style="display: none;"> | |
75 | <div id="preview-box_{1}" class="preview-box"></div> |
|
81 | <div id="preview-box_{1}" class="preview-box"></div> | |
76 | </div> |
|
82 | </div> | |
77 | </div> |
|
83 | </div> | |
78 |
|
84 | |||
79 | <div class="comment-area-footer"> |
|
85 | <div class="comment-area-footer"> | |
80 | <div class="toolbar"> |
|
86 | <div class="toolbar"> | |
81 | <div class="toolbar-text"> |
|
87 | <div class="toolbar-text"> | |
82 | ${(_('Comments parsed using %s syntax with %s support.') % ( |
|
88 | ${(_('Comments parsed using %s syntax with %s support.') % ( | |
83 | ('<a href="%s">%s</a>' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())), |
|
89 | ('<a href="%s">%s</a>' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())), | |
84 | ('<span class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user')) |
|
90 | ('<span class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user')) | |
85 | ) |
|
91 | ) | |
86 | )|n |
|
92 | )|n} | |
87 | } |
|
|||
88 | </div> |
|
93 | </div> | |
89 | </div> |
|
94 | </div> | |
90 | </div> |
|
95 | </div> | |
91 | </div> |
|
96 | </div> | |
92 |
|
97 | |||
93 | <div class="comment-footer"> |
|
98 | <div class="comment-footer"> | |
94 | <div class="action-buttons"> |
|
99 | <div class="action-buttons"> | |
95 | <input type="hidden" name="f_path" value="{0}"> |
|
100 | <input type="hidden" name="f_path" value="{0}"> | |
96 | <input type="hidden" name="line" value="{1}"> |
|
101 | <input type="hidden" name="line" value="{1}"> | |
97 | <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);"> |
|
102 | <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);"> | |
98 | ${_('Cancel')} |
|
103 | ${_('Cancel')} | |
99 | </button> |
|
104 | </button> | |
100 | ${h.submit('save', _('Comment'), class_='btn btn-success save-inline-form')} |
|
105 | ${h.submit('save', _('Comment'), class_='btn btn-success save-inline-form')} | |
101 | </div> |
|
106 | </div> | |
102 | ${h.end_form()} |
|
107 | ${h.end_form()} | |
103 | </div> |
|
108 | </div> | |
104 | %else: |
|
109 | %else: | |
105 | ${h.form('', class_='inline-form comment-form-login', method='get')} |
|
110 | ${h.form('', class_='inline-form comment-form-login', method='get')} | |
106 | <div class="pull-left"> |
|
111 | <div class="pull-left"> | |
107 | <div class="comment-help pull-right"> |
|
112 | <div class="comment-help pull-right"> | |
108 | ${_('You need to be logged in to leave comments.')} <a href="${h.route_path('login', _query={'came_from': h.url.current()})}">${_('Login now')}</a> |
|
113 | ${_('You need to be logged in to leave comments.')} <a href="${h.route_path('login', _query={'came_from': h.url.current()})}">${_('Login now')}</a> | |
109 | </div> |
|
114 | </div> | |
110 | </div> |
|
115 | </div> | |
111 | <div class="comment-button pull-right"> |
|
116 | <div class="comment-button pull-right"> | |
112 | <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);"> |
|
117 | <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);"> | |
113 | ${_('Cancel')} |
|
118 | ${_('Cancel')} | |
114 | </button> |
|
119 | </button> | |
115 | </div> |
|
120 | </div> | |
116 | <div class="clearfix"></div> |
|
121 | <div class="clearfix"></div> | |
117 | ${h.end_form()} |
|
122 | ${h.end_form()} | |
118 | %endif |
|
123 | %endif | |
119 | </div> |
|
124 | </div> | |
120 | </div> |
|
125 | </div> | |
121 |
|
126 | |||
122 | %endif |
|
127 | %endif | |
123 | <% |
|
128 | <% | |
124 | collapse_all = len(diffset.files) > collapse_when_files_over |
|
129 | collapse_all = len(diffset.files) > collapse_when_files_over | |
125 | %> |
|
130 | %> | |
126 |
|
131 | |||
127 | %if c.diffmode == 'sideside': |
|
132 | %if c.diffmode == 'sideside': | |
128 | <style> |
|
133 | <style> | |
129 | .wrapper { |
|
134 | .wrapper { | |
130 | max-width: 1600px !important; |
|
135 | max-width: 1600px !important; | |
131 | } |
|
136 | } | |
132 | </style> |
|
137 | </style> | |
133 | %endif |
|
138 | %endif | |
134 |
|
139 | |||
135 | %if ruler_at_chars: |
|
140 | %if ruler_at_chars: | |
136 | <style> |
|
141 | <style> | |
137 | .diff table.cb .cb-content:after { |
|
142 | .diff table.cb .cb-content:after { | |
138 | content: ""; |
|
143 | content: ""; | |
139 | border-left: 1px solid blue; |
|
144 | border-left: 1px solid blue; | |
140 | position: absolute; |
|
145 | position: absolute; | |
141 | top: 0; |
|
146 | top: 0; | |
142 | height: 18px; |
|
147 | height: 18px; | |
143 | opacity: .2; |
|
148 | opacity: .2; | |
144 | z-index: 10; |
|
149 | z-index: 10; | |
145 | //## +5 to account for diff action (+/-) |
|
150 | //## +5 to account for diff action (+/-) | |
146 | left: ${ruler_at_chars + 5}ch; |
|
151 | left: ${ruler_at_chars + 5}ch; | |
147 | </style> |
|
152 | </style> | |
148 | %endif |
|
153 | %endif | |
149 |
|
154 | |||
150 | <div class="diffset ${disable_new_comments and 'diffset-comments-disabled'}"> |
|
155 | <div class="diffset ${disable_new_comments and 'diffset-comments-disabled'}"> | |
151 | <div class="diffset-heading ${diffset.limited_diff and 'diffset-heading-warning' or ''}"> |
|
156 | <div class="diffset-heading ${diffset.limited_diff and 'diffset-heading-warning' or ''}"> | |
152 | %if commit: |
|
157 | %if commit: | |
153 | <div class="pull-right"> |
|
158 | <div class="pull-right"> | |
154 | <a class="btn tooltip" title="${_('Browse Files at revision {}').format(commit.raw_id)}" href="${h.url('files_home',repo_name=diffset.repo_name, revision=commit.raw_id, f_path='')}"> |
|
159 | <a class="btn tooltip" title="${_('Browse Files at revision {}').format(commit.raw_id)}" href="${h.url('files_home',repo_name=diffset.repo_name, revision=commit.raw_id, f_path='')}"> | |
155 | ${_('Browse Files')} |
|
160 | ${_('Browse Files')} | |
156 | </a> |
|
161 | </a> | |
157 | </div> |
|
162 | </div> | |
158 | %endif |
|
163 | %endif | |
159 | <h2 class="clearinner"> |
|
164 | <h2 class="clearinner"> | |
160 | %if commit: |
|
165 | %if commit: | |
161 | <a class="tooltip revision" title="${h.tooltip(commit.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}">${'r%s:%s' % (commit.revision,h.short_id(commit.raw_id))}</a> - |
|
166 | <a class="tooltip revision" title="${h.tooltip(commit.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}">${'r%s:%s' % (commit.revision,h.short_id(commit.raw_id))}</a> - | |
162 | ${h.age_component(commit.date)} - |
|
167 | ${h.age_component(commit.date)} - | |
163 | %endif |
|
168 | %endif | |
164 | %if diffset.limited_diff: |
|
169 | %if diffset.limited_diff: | |
165 | ${_('The requested commit is too big and content was truncated.')} |
|
170 | ${_('The requested commit is too big and content was truncated.')} | |
166 |
|
171 | |||
167 | ${ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} |
|
172 | ${ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} | |
168 | <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> |
|
173 | <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> | |
169 | %else: |
|
174 | %else: | |
170 | ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', |
|
175 | ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', | |
171 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}} |
|
176 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}} | |
172 | %endif |
|
177 | %endif | |
173 |
|
178 | |||
174 | <% at_ver = getattr(c, 'at_version_num', None) %> |
|
179 | <% at_ver = getattr(c, 'at_version_num', None) %> | |
175 | % if at_ver: |
|
180 | % if at_ver: | |
176 | <div class="pull-right"> |
|
181 | <div class="pull-right"> | |
177 | ${_('Changes at version %d') % at_ver} |
|
182 | ${_('Changes at version %d') % at_ver} | |
178 | </div> |
|
183 | </div> | |
179 | % endif |
|
184 | % endif | |
180 |
|
185 | |||
181 | </h2> |
|
186 | </h2> | |
182 | </div> |
|
187 | </div> | |
183 |
|
188 | |||
184 | %if not diffset.files: |
|
189 | %if not diffset.files: | |
185 | <p class="empty_data">${_('No files')}</p> |
|
190 | <p class="empty_data">${_('No files')}</p> | |
186 | %endif |
|
191 | %endif | |
187 |
|
192 | |||
188 | <div class="filediffs"> |
|
193 | <div class="filediffs"> | |
189 | %for i, filediff in enumerate(diffset.files): |
|
194 | %for i, filediff in enumerate(diffset.files): | |
190 |
|
195 | |||
191 | <% |
|
196 | <% | |
192 | lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] |
|
197 | lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] | |
193 | over_lines_changed_limit = lines_changed > lines_changed_limit |
|
198 | over_lines_changed_limit = lines_changed > lines_changed_limit | |
194 | %> |
|
199 | %> | |
195 | <input ${collapse_all and 'checked' or ''} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox"> |
|
200 | <input ${collapse_all and 'checked' or ''} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox"> | |
196 | <div |
|
201 | <div | |
197 | class="filediff" |
|
202 | class="filediff" | |
198 | data-f-path="${filediff['patch']['filename']}" |
|
203 | data-f-path="${filediff['patch']['filename']}" | |
199 | id="a_${h.FID('', filediff['patch']['filename'])}"> |
|
204 | id="a_${h.FID('', filediff['patch']['filename'])}"> | |
200 | <label for="filediff-collapse-${id(filediff)}" class="filediff-heading"> |
|
205 | <label for="filediff-collapse-${id(filediff)}" class="filediff-heading"> | |
201 | <div class="filediff-collapse-indicator"></div> |
|
206 | <div class="filediff-collapse-indicator"></div> | |
202 | ${diff_ops(filediff)} |
|
207 | ${diff_ops(filediff)} | |
203 | </label> |
|
208 | </label> | |
204 | ${diff_menu(filediff, use_comments=use_comments)} |
|
209 | ${diff_menu(filediff, use_comments=use_comments)} | |
205 | <table class="cb cb-diff-${c.diffmode} code-highlight ${over_lines_changed_limit and 'cb-collapsed' or ''}"> |
|
210 | <table class="cb cb-diff-${c.diffmode} code-highlight ${over_lines_changed_limit and 'cb-collapsed' or ''}"> | |
206 | %if not filediff.hunks: |
|
211 | %if not filediff.hunks: | |
207 | %for op_id, op_text in filediff['patch']['stats']['ops'].items(): |
|
212 | %for op_id, op_text in filediff['patch']['stats']['ops'].items(): | |
208 | <tr> |
|
213 | <tr> | |
209 | <td class="cb-text cb-${op_class(op_id)}" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> |
|
214 | <td class="cb-text cb-${op_class(op_id)}" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> | |
210 | %if op_id == DEL_FILENODE: |
|
215 | %if op_id == DEL_FILENODE: | |
211 | ${_('File was deleted')} |
|
216 | ${_('File was deleted')} | |
212 | %elif op_id == BIN_FILENODE: |
|
217 | %elif op_id == BIN_FILENODE: | |
213 | ${_('Binary file hidden')} |
|
218 | ${_('Binary file hidden')} | |
214 | %else: |
|
219 | %else: | |
215 | ${op_text} |
|
220 | ${op_text} | |
216 | %endif |
|
221 | %endif | |
217 | </td> |
|
222 | </td> | |
218 | </tr> |
|
223 | </tr> | |
219 | %endfor |
|
224 | %endfor | |
220 | %endif |
|
225 | %endif | |
221 | %if filediff.patch['is_limited_diff']: |
|
226 | %if filediff.patch['is_limited_diff']: | |
222 | <tr class="cb-warning cb-collapser"> |
|
227 | <tr class="cb-warning cb-collapser"> | |
223 | <td class="cb-text" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> |
|
228 | <td class="cb-text" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> | |
224 | ${_('The requested commit is too big and content was truncated.')} <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> |
|
229 | ${_('The requested commit is too big and content was truncated.')} <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> | |
225 | </td> |
|
230 | </td> | |
226 | </tr> |
|
231 | </tr> | |
227 | %else: |
|
232 | %else: | |
228 | %if over_lines_changed_limit: |
|
233 | %if over_lines_changed_limit: | |
229 | <tr class="cb-warning cb-collapser"> |
|
234 | <tr class="cb-warning cb-collapser"> | |
230 | <td class="cb-text" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> |
|
235 | <td class="cb-text" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> | |
231 | ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)} |
|
236 | ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)} | |
232 | <a href="#" class="cb-expand" |
|
237 | <a href="#" class="cb-expand" | |
233 | onclick="$(this).closest('table').removeClass('cb-collapsed'); return false;">${_('Show them')} |
|
238 | onclick="$(this).closest('table').removeClass('cb-collapsed'); return false;">${_('Show them')} | |
234 | </a> |
|
239 | </a> | |
235 | <a href="#" class="cb-collapse" |
|
240 | <a href="#" class="cb-collapse" | |
236 | onclick="$(this).closest('table').addClass('cb-collapsed'); return false;">${_('Hide them')} |
|
241 | onclick="$(this).closest('table').addClass('cb-collapsed'); return false;">${_('Hide them')} | |
237 | </a> |
|
242 | </a> | |
238 | </td> |
|
243 | </td> | |
239 | </tr> |
|
244 | </tr> | |
240 | %endif |
|
245 | %endif | |
241 | %endif |
|
246 | %endif | |
242 |
|
247 | |||
243 | %for hunk in filediff.hunks: |
|
248 | %for hunk in filediff.hunks: | |
244 | <tr class="cb-hunk"> |
|
249 | <tr class="cb-hunk"> | |
245 | <td ${c.diffmode == 'unified' and 'colspan=3' or ''}> |
|
250 | <td ${c.diffmode == 'unified' and 'colspan=3' or ''}> | |
246 | ## TODO: dan: add ajax loading of more context here |
|
251 | ## TODO: dan: add ajax loading of more context here | |
247 | ## <a href="#"> |
|
252 | ## <a href="#"> | |
248 | <i class="icon-more"></i> |
|
253 | <i class="icon-more"></i> | |
249 | ## </a> |
|
254 | ## </a> | |
250 | </td> |
|
255 | </td> | |
251 | <td ${c.diffmode == 'sideside' and 'colspan=5' or ''}> |
|
256 | <td ${c.diffmode == 'sideside' and 'colspan=5' or ''}> | |
252 | @@ |
|
257 | @@ | |
253 | -${hunk.source_start},${hunk.source_length} |
|
258 | -${hunk.source_start},${hunk.source_length} | |
254 | +${hunk.target_start},${hunk.target_length} |
|
259 | +${hunk.target_start},${hunk.target_length} | |
255 | ${hunk.section_header} |
|
260 | ${hunk.section_header} | |
256 | </td> |
|
261 | </td> | |
257 | </tr> |
|
262 | </tr> | |
258 | %if c.diffmode == 'unified': |
|
263 | %if c.diffmode == 'unified': | |
259 | ${render_hunk_lines_unified(hunk, use_comments=use_comments)} |
|
264 | ${render_hunk_lines_unified(hunk, use_comments=use_comments)} | |
260 | %elif c.diffmode == 'sideside': |
|
265 | %elif c.diffmode == 'sideside': | |
261 | ${render_hunk_lines_sideside(hunk, use_comments=use_comments)} |
|
266 | ${render_hunk_lines_sideside(hunk, use_comments=use_comments)} | |
262 | %else: |
|
267 | %else: | |
263 | <tr class="cb-line"> |
|
268 | <tr class="cb-line"> | |
264 | <td>unknown diff mode</td> |
|
269 | <td>unknown diff mode</td> | |
265 | </tr> |
|
270 | </tr> | |
266 | %endif |
|
271 | %endif | |
267 | %endfor |
|
272 | %endfor | |
268 |
|
273 | |||
269 | ## outdated comments that do not fit into currently displayed lines |
|
274 | ## outdated comments that do not fit into currently displayed lines | |
270 | % for lineno, comments in filediff.left_comments.items(): |
|
275 | % for lineno, comments in filediff.left_comments.items(): | |
271 |
|
276 | |||
272 | %if c.diffmode == 'unified': |
|
277 | %if c.diffmode == 'unified': | |
273 | <tr class="cb-line"> |
|
278 | <tr class="cb-line"> | |
274 | <td class="cb-data cb-context"></td> |
|
279 | <td class="cb-data cb-context"></td> | |
275 | <td class="cb-lineno cb-context"></td> |
|
280 | <td class="cb-lineno cb-context"></td> | |
276 | <td class="cb-lineno cb-context"></td> |
|
281 | <td class="cb-lineno cb-context"></td> | |
277 | <td class="cb-content cb-context"> |
|
282 | <td class="cb-content cb-context"> | |
278 | ${inline_comments_container(comments)} |
|
283 | ${inline_comments_container(comments)} | |
279 | </td> |
|
284 | </td> | |
280 | </tr> |
|
285 | </tr> | |
281 | %elif c.diffmode == 'sideside': |
|
286 | %elif c.diffmode == 'sideside': | |
282 | <tr class="cb-line"> |
|
287 | <tr class="cb-line"> | |
283 | <td class="cb-data cb-context"></td> |
|
288 | <td class="cb-data cb-context"></td> | |
284 | <td class="cb-lineno cb-context"></td> |
|
289 | <td class="cb-lineno cb-context"></td> | |
285 | <td class="cb-content cb-context"></td> |
|
290 | <td class="cb-content cb-context"></td> | |
286 |
|
291 | |||
287 | <td class="cb-data cb-context"></td> |
|
292 | <td class="cb-data cb-context"></td> | |
288 | <td class="cb-lineno cb-context"></td> |
|
293 | <td class="cb-lineno cb-context"></td> | |
289 | <td class="cb-content cb-context"> |
|
294 | <td class="cb-content cb-context"> | |
290 | ${inline_comments_container(comments)} |
|
295 | ${inline_comments_container(comments)} | |
291 | </td> |
|
296 | </td> | |
292 | </tr> |
|
297 | </tr> | |
293 | %endif |
|
298 | %endif | |
294 |
|
299 | |||
295 | % endfor |
|
300 | % endfor | |
296 |
|
301 | |||
297 | </table> |
|
302 | </table> | |
298 | </div> |
|
303 | </div> | |
299 | %endfor |
|
304 | %endfor | |
300 |
|
305 | |||
301 | ## outdated comments that are made for a file that has been deleted |
|
306 | ## outdated comments that are made for a file that has been deleted | |
302 | % for filename, comments_dict in (deleted_files_comments or {}).items(): |
|
307 | % for filename, comments_dict in (deleted_files_comments or {}).items(): | |
303 |
|
308 | |||
304 | <div class="filediffs filediff-outdated" style="display: none"> |
|
309 | <div class="filediffs filediff-outdated" style="display: none"> | |
305 | <input ${collapse_all and 'checked' or ''} class="filediff-collapse-state" id="filediff-collapse-${id(filename)}" type="checkbox"> |
|
310 | <input ${collapse_all and 'checked' or ''} class="filediff-collapse-state" id="filediff-collapse-${id(filename)}" type="checkbox"> | |
306 | <div class="filediff" data-f-path="${filename}" id="a_${h.FID('', filename)}"> |
|
311 | <div class="filediff" data-f-path="${filename}" id="a_${h.FID('', filename)}"> | |
307 | <label for="filediff-collapse-${id(filename)}" class="filediff-heading"> |
|
312 | <label for="filediff-collapse-${id(filename)}" class="filediff-heading"> | |
308 | <div class="filediff-collapse-indicator"></div> |
|
313 | <div class="filediff-collapse-indicator"></div> | |
309 | <span class="pill"> |
|
314 | <span class="pill"> | |
310 | ## file was deleted |
|
315 | ## file was deleted | |
311 | <strong>${filename}</strong> |
|
316 | <strong>${filename}</strong> | |
312 | </span> |
|
317 | </span> | |
313 | <span class="pill-group" style="float: left"> |
|
318 | <span class="pill-group" style="float: left"> | |
314 | ## file op, doesn't need translation |
|
319 | ## file op, doesn't need translation | |
315 | <span class="pill" op="removed">removed in this version</span> |
|
320 | <span class="pill" op="removed">removed in this version</span> | |
316 | </span> |
|
321 | </span> | |
317 | <a class="pill filediff-anchor" href="#a_${h.FID('', filename)}">ΒΆ</a> |
|
322 | <a class="pill filediff-anchor" href="#a_${h.FID('', filename)}">ΒΆ</a> | |
318 | <span class="pill-group" style="float: right"> |
|
323 | <span class="pill-group" style="float: right"> | |
319 | <span class="pill" op="deleted">-${comments_dict['stats']}</span> |
|
324 | <span class="pill" op="deleted">-${comments_dict['stats']}</span> | |
320 | </span> |
|
325 | </span> | |
321 | </label> |
|
326 | </label> | |
322 |
|
327 | |||
323 | <table class="cb cb-diff-${c.diffmode} code-highlight ${over_lines_changed_limit and 'cb-collapsed' or ''}"> |
|
328 | <table class="cb cb-diff-${c.diffmode} code-highlight ${over_lines_changed_limit and 'cb-collapsed' or ''}"> | |
324 | <tr> |
|
329 | <tr> | |
325 | % if c.diffmode == 'unified': |
|
330 | % if c.diffmode == 'unified': | |
326 | <td></td> |
|
331 | <td></td> | |
327 | %endif |
|
332 | %endif | |
328 |
|
333 | |||
329 | <td></td> |
|
334 | <td></td> | |
330 | <td class="cb-text cb-${op_class(BIN_FILENODE)}" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=5'}> |
|
335 | <td class="cb-text cb-${op_class(BIN_FILENODE)}" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=5'}> | |
331 | ${_('File was deleted in this version, and outdated comments were made on it')} |
|
336 | ${_('File was deleted in this version, and outdated comments were made on it')} | |
332 | </td> |
|
337 | </td> | |
333 | </tr> |
|
338 | </tr> | |
334 | %if c.diffmode == 'unified': |
|
339 | %if c.diffmode == 'unified': | |
335 | <tr class="cb-line"> |
|
340 | <tr class="cb-line"> | |
336 | <td class="cb-data cb-context"></td> |
|
341 | <td class="cb-data cb-context"></td> | |
337 | <td class="cb-lineno cb-context"></td> |
|
342 | <td class="cb-lineno cb-context"></td> | |
338 | <td class="cb-lineno cb-context"></td> |
|
343 | <td class="cb-lineno cb-context"></td> | |
339 | <td class="cb-content cb-context"> |
|
344 | <td class="cb-content cb-context"> | |
340 | ${inline_comments_container(comments_dict['comments'])} |
|
345 | ${inline_comments_container(comments_dict['comments'])} | |
341 | </td> |
|
346 | </td> | |
342 | </tr> |
|
347 | </tr> | |
343 | %elif c.diffmode == 'sideside': |
|
348 | %elif c.diffmode == 'sideside': | |
344 | <tr class="cb-line"> |
|
349 | <tr class="cb-line"> | |
345 | <td class="cb-data cb-context"></td> |
|
350 | <td class="cb-data cb-context"></td> | |
346 | <td class="cb-lineno cb-context"></td> |
|
351 | <td class="cb-lineno cb-context"></td> | |
347 | <td class="cb-content cb-context"></td> |
|
352 | <td class="cb-content cb-context"></td> | |
348 |
|
353 | |||
349 | <td class="cb-data cb-context"></td> |
|
354 | <td class="cb-data cb-context"></td> | |
350 | <td class="cb-lineno cb-context"></td> |
|
355 | <td class="cb-lineno cb-context"></td> | |
351 | <td class="cb-content cb-context"> |
|
356 | <td class="cb-content cb-context"> | |
352 | ${inline_comments_container(comments_dict['comments'])} |
|
357 | ${inline_comments_container(comments_dict['comments'])} | |
353 | </td> |
|
358 | </td> | |
354 | </tr> |
|
359 | </tr> | |
355 | %endif |
|
360 | %endif | |
356 | </table> |
|
361 | </table> | |
357 | </div> |
|
362 | </div> | |
358 | </div> |
|
363 | </div> | |
359 | % endfor |
|
364 | % endfor | |
360 |
|
365 | |||
361 | </div> |
|
366 | </div> | |
362 | </div> |
|
367 | </div> | |
363 | </%def> |
|
368 | </%def> | |
364 |
|
369 | |||
365 | <%def name="diff_ops(filediff)"> |
|
370 | <%def name="diff_ops(filediff)"> | |
366 | <% |
|
371 | <% | |
367 | stats = filediff['patch']['stats'] |
|
372 | stats = filediff['patch']['stats'] | |
368 | from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \ |
|
373 | from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \ | |
369 | MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE |
|
374 | MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE | |
370 | %> |
|
375 | %> | |
371 | <span class="pill"> |
|
376 | <span class="pill"> | |
372 | %if filediff.source_file_path and filediff.target_file_path: |
|
377 | %if filediff.source_file_path and filediff.target_file_path: | |
373 |
%if filediff.source_file_path != filediff.target_file_path: |
|
378 | %if filediff.source_file_path != filediff.target_file_path: | |
374 | <strong>${filediff.target_file_path}</strong> β¬ <del>${filediff.source_file_path}</del> |
|
379 | ## file was renamed | |
|
380 | <strong>${filediff.target_file_path}</strong> β¬ <del>${filediff.source_file_path}</del> | |||
375 | %else: |
|
381 | %else: | |
376 | ## file was modified |
|
382 | ## file was modified | |
377 | <strong>${filediff.source_file_path}</strong> |
|
383 | <strong>${filediff.source_file_path}</strong> | |
378 | %endif |
|
384 | %endif | |
379 | %else: |
|
385 | %else: | |
380 | %if filediff.source_file_path: |
|
386 | %if filediff.source_file_path: | |
381 | ## file was deleted |
|
387 | ## file was deleted | |
382 | <strong>${filediff.source_file_path}</strong> |
|
388 | <strong>${filediff.source_file_path}</strong> | |
383 | %else: |
|
389 | %else: | |
384 | ## file was added |
|
390 | ## file was added | |
385 | <strong>${filediff.target_file_path}</strong> |
|
391 | <strong>${filediff.target_file_path}</strong> | |
386 | %endif |
|
392 | %endif | |
387 | %endif |
|
393 | %endif | |
388 | </span> |
|
394 | </span> | |
389 | <span class="pill-group" style="float: left"> |
|
395 | <span class="pill-group" style="float: left"> | |
390 | %if filediff.patch['is_limited_diff']: |
|
396 | %if filediff.patch['is_limited_diff']: | |
391 | <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span> |
|
397 | <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span> | |
392 | %endif |
|
398 | %endif | |
393 | %if RENAMED_FILENODE in stats['ops']: |
|
399 | %if RENAMED_FILENODE in stats['ops']: | |
394 | <span class="pill" op="renamed">renamed</span> |
|
400 | <span class="pill" op="renamed">renamed</span> | |
395 | %endif |
|
401 | %endif | |
396 |
|
402 | |||
397 | %if NEW_FILENODE in stats['ops']: |
|
403 | %if NEW_FILENODE in stats['ops']: | |
398 | <span class="pill" op="created">created</span> |
|
404 | <span class="pill" op="created">created</span> | |
399 | %if filediff['target_mode'].startswith('120'): |
|
405 | %if filediff['target_mode'].startswith('120'): | |
400 | <span class="pill" op="symlink">symlink</span> |
|
406 | <span class="pill" op="symlink">symlink</span> | |
401 | %else: |
|
407 | %else: | |
402 | <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span> |
|
408 | <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span> | |
403 | %endif |
|
409 | %endif | |
404 | %endif |
|
410 | %endif | |
405 |
|
411 | |||
406 | %if DEL_FILENODE in stats['ops']: |
|
412 | %if DEL_FILENODE in stats['ops']: | |
407 | <span class="pill" op="removed">removed</span> |
|
413 | <span class="pill" op="removed">removed</span> | |
408 | %endif |
|
414 | %endif | |
409 |
|
415 | |||
410 | %if CHMOD_FILENODE in stats['ops']: |
|
416 | %if CHMOD_FILENODE in stats['ops']: | |
411 | <span class="pill" op="mode"> |
|
417 | <span class="pill" op="mode"> | |
412 | ${nice_mode(filediff['source_mode'])} β‘ ${nice_mode(filediff['target_mode'])} |
|
418 | ${nice_mode(filediff['source_mode'])} β‘ ${nice_mode(filediff['target_mode'])} | |
413 | </span> |
|
419 | </span> | |
414 | %endif |
|
420 | %endif | |
415 | </span> |
|
421 | </span> | |
416 |
|
422 | |||
417 | <a class="pill filediff-anchor" href="#a_${h.FID('', filediff.patch['filename'])}">ΒΆ</a> |
|
423 | <a class="pill filediff-anchor" href="#a_${h.FID('', filediff.patch['filename'])}">ΒΆ</a> | |
418 |
|
424 | |||
419 | <span class="pill-group" style="float: right"> |
|
425 | <span class="pill-group" style="float: right"> | |
420 | %if BIN_FILENODE in stats['ops']: |
|
426 | %if BIN_FILENODE in stats['ops']: | |
421 | <span class="pill" op="binary">binary</span> |
|
427 | <span class="pill" op="binary">binary</span> | |
422 | %if MOD_FILENODE in stats['ops']: |
|
428 | %if MOD_FILENODE in stats['ops']: | |
423 | <span class="pill" op="modified">modified</span> |
|
429 | <span class="pill" op="modified">modified</span> | |
424 | %endif |
|
430 | %endif | |
425 | %endif |
|
431 | %endif | |
426 | %if stats['added']: |
|
432 | %if stats['added']: | |
427 | <span class="pill" op="added">+${stats['added']}</span> |
|
433 | <span class="pill" op="added">+${stats['added']}</span> | |
428 | %endif |
|
434 | %endif | |
429 | %if stats['deleted']: |
|
435 | %if stats['deleted']: | |
430 | <span class="pill" op="deleted">-${stats['deleted']}</span> |
|
436 | <span class="pill" op="deleted">-${stats['deleted']}</span> | |
431 | %endif |
|
437 | %endif | |
432 | </span> |
|
438 | </span> | |
433 |
|
439 | |||
434 | </%def> |
|
440 | </%def> | |
435 |
|
441 | |||
436 | <%def name="nice_mode(filemode)"> |
|
442 | <%def name="nice_mode(filemode)"> | |
437 | ${filemode.startswith('100') and filemode[3:] or filemode} |
|
443 | ${filemode.startswith('100') and filemode[3:] or filemode} | |
438 | </%def> |
|
444 | </%def> | |
439 |
|
445 | |||
440 | <%def name="diff_menu(filediff, use_comments=False)"> |
|
446 | <%def name="diff_menu(filediff, use_comments=False)"> | |
441 | <div class="filediff-menu"> |
|
447 | <div class="filediff-menu"> | |
442 | %if filediff.diffset.source_ref: |
|
448 | %if filediff.diffset.source_ref: | |
443 | %if filediff.patch['operation'] in ['D', 'M']: |
|
449 | %if filediff.patch['operation'] in ['D', 'M']: | |
444 | <a |
|
450 | <a | |
445 | class="tooltip" |
|
451 | class="tooltip" | |
446 | href="${h.url('files_home',repo_name=filediff.diffset.repo_name,f_path=filediff.source_file_path,revision=filediff.diffset.source_ref)}" |
|
452 | href="${h.url('files_home',repo_name=filediff.diffset.repo_name,f_path=filediff.source_file_path,revision=filediff.diffset.source_ref)}" | |
447 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" |
|
453 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" | |
448 | > |
|
454 | > | |
449 | ${_('Show file before')} |
|
455 | ${_('Show file before')} | |
450 | </a> | |
|
456 | </a> | | |
451 | %else: |
|
457 | %else: | |
452 | <span |
|
458 | <span | |
453 | class="tooltip" |
|
459 | class="tooltip" | |
454 | title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" |
|
460 | title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" | |
455 | > |
|
461 | > | |
456 | ${_('Show file before')} |
|
462 | ${_('Show file before')} | |
457 | </span> | |
|
463 | </span> | | |
458 | %endif |
|
464 | %endif | |
459 | %if filediff.patch['operation'] in ['A', 'M']: |
|
465 | %if filediff.patch['operation'] in ['A', 'M']: | |
460 | <a |
|
466 | <a | |
461 | class="tooltip" |
|
467 | class="tooltip" | |
462 | href="${h.url('files_home',repo_name=filediff.diffset.source_repo_name,f_path=filediff.target_file_path,revision=filediff.diffset.target_ref)}" |
|
468 | href="${h.url('files_home',repo_name=filediff.diffset.source_repo_name,f_path=filediff.target_file_path,revision=filediff.diffset.target_ref)}" | |
463 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}" |
|
469 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}" | |
464 | > |
|
470 | > | |
465 | ${_('Show file after')} |
|
471 | ${_('Show file after')} | |
466 | </a> | |
|
472 | </a> | | |
467 | %else: |
|
473 | %else: | |
468 | <span |
|
474 | <span | |
469 | class="tooltip" |
|
475 | class="tooltip" | |
470 | title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}" |
|
476 | title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}" | |
471 | > |
|
477 | > | |
472 | ${_('Show file after')} |
|
478 | ${_('Show file after')} | |
473 | </span> | |
|
479 | </span> | | |
474 | %endif |
|
480 | %endif | |
475 | <a |
|
481 | <a | |
476 | class="tooltip" |
|
482 | class="tooltip" | |
477 | title="${h.tooltip(_('Raw diff'))}" |
|
483 | title="${h.tooltip(_('Raw diff'))}" | |
478 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='raw')}" |
|
484 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='raw')}" | |
479 | > |
|
485 | > | |
480 | ${_('Raw diff')} |
|
486 | ${_('Raw diff')} | |
481 | </a> | |
|
487 | </a> | | |
482 | <a |
|
488 | <a | |
483 | class="tooltip" |
|
489 | class="tooltip" | |
484 | title="${h.tooltip(_('Download diff'))}" |
|
490 | title="${h.tooltip(_('Download diff'))}" | |
485 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='download')}" |
|
491 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='download')}" | |
486 | > |
|
492 | > | |
487 | ${_('Download diff')} |
|
493 | ${_('Download diff')} | |
488 | </a> |
|
494 | </a> | |
489 | % if use_comments: |
|
495 | % if use_comments: | |
490 | | |
|
496 | | | |
491 | % endif |
|
497 | % endif | |
492 |
|
498 | |||
493 | ## TODO: dan: refactor ignorews_url and context_url into the diff renderer same as diffmode=unified/sideside. Also use ajax to load more context (by clicking hunks) |
|
499 | ## TODO: dan: refactor ignorews_url and context_url into the diff renderer same as diffmode=unified/sideside. Also use ajax to load more context (by clicking hunks) | |
494 | %if hasattr(c, 'ignorews_url'): |
|
500 | %if hasattr(c, 'ignorews_url'): | |
495 | ${c.ignorews_url(request.GET, h.FID('', filediff['patch']['filename']))} |
|
501 | ${c.ignorews_url(request.GET, h.FID('', filediff['patch']['filename']))} | |
496 | %endif |
|
502 | %endif | |
497 | %if hasattr(c, 'context_url'): |
|
503 | %if hasattr(c, 'context_url'): | |
498 | ${c.context_url(request.GET, h.FID('', filediff['patch']['filename']))} |
|
504 | ${c.context_url(request.GET, h.FID('', filediff['patch']['filename']))} | |
499 | %endif |
|
505 | %endif | |
500 |
|
506 | |||
501 | %if use_comments: |
|
507 | %if use_comments: | |
502 | <a href="#" onclick="return Rhodecode.comments.toggleComments(this);"> |
|
508 | <a href="#" onclick="return Rhodecode.comments.toggleComments(this);"> | |
503 | <span class="show-comment-button">${_('Show comments')}</span><span class="hide-comment-button">${_('Hide comments')}</span> |
|
509 | <span class="show-comment-button">${_('Show comments')}</span><span class="hide-comment-button">${_('Hide comments')}</span> | |
504 | </a> |
|
510 | </a> | |
505 | %endif |
|
511 | %endif | |
506 | %endif |
|
512 | %endif | |
507 | </div> |
|
513 | </div> | |
508 | </%def> |
|
514 | </%def> | |
509 |
|
515 | |||
510 |
|
516 | |||
511 | <%namespace name="commentblock" file="/changeset/changeset_file_comment.mako"/> |
|
517 | <%namespace name="commentblock" file="/changeset/changeset_file_comment.mako"/> | |
512 | <%def name="inline_comments_container(comments)"> |
|
518 | <%def name="inline_comments_container(comments)"> | |
513 | <div class="inline-comments"> |
|
519 | <div class="inline-comments"> | |
514 | %for comment in comments: |
|
520 | %for comment in comments: | |
515 | ${commentblock.comment_block(comment, inline=True)} |
|
521 | ${commentblock.comment_block(comment, inline=True)} | |
516 | %endfor |
|
522 | %endfor | |
517 |
|
523 | |||
518 | % if comments and comments[-1].outdated: |
|
524 | % if comments and comments[-1].outdated: | |
519 | <span class="btn btn-secondary cb-comment-add-button comment-outdated}" |
|
525 | <span class="btn btn-secondary cb-comment-add-button comment-outdated}" | |
520 | style="display: none;}"> |
|
526 | style="display: none;}"> | |
521 | ${_('Add another comment')} |
|
527 | ${_('Add another comment')} | |
522 | </span> |
|
528 | </span> | |
523 | % else: |
|
529 | % else: | |
524 | <span onclick="return Rhodecode.comments.createComment(this)" |
|
530 | <span onclick="return Rhodecode.comments.createComment(this)" | |
525 | class="btn btn-secondary cb-comment-add-button"> |
|
531 | class="btn btn-secondary cb-comment-add-button"> | |
526 | ${_('Add another comment')} |
|
532 | ${_('Add another comment')} | |
527 | </span> |
|
533 | </span> | |
528 | % endif |
|
534 | % endif | |
529 |
|
535 | |||
530 | </div> |
|
536 | </div> | |
531 | </%def> |
|
537 | </%def> | |
532 |
|
538 | |||
533 |
|
539 | |||
534 | <%def name="render_hunk_lines_sideside(hunk, use_comments=False)"> |
|
540 | <%def name="render_hunk_lines_sideside(hunk, use_comments=False)"> | |
535 | %for i, line in enumerate(hunk.sideside): |
|
541 | %for i, line in enumerate(hunk.sideside): | |
536 | <% |
|
542 | <% | |
537 | old_line_anchor, new_line_anchor = None, None |
|
543 | old_line_anchor, new_line_anchor = None, None | |
538 | if line.original.lineno: |
|
544 | if line.original.lineno: | |
539 | old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, line.original.lineno, 'o') |
|
545 | old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, line.original.lineno, 'o') | |
540 | if line.modified.lineno: |
|
546 | if line.modified.lineno: | |
541 | new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, line.modified.lineno, 'n') |
|
547 | new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, line.modified.lineno, 'n') | |
542 | %> |
|
548 | %> | |
543 |
|
549 | |||
544 | <tr class="cb-line"> |
|
550 | <tr class="cb-line"> | |
545 | <td class="cb-data ${action_class(line.original.action)}" |
|
551 | <td class="cb-data ${action_class(line.original.action)}" | |
546 | data-line-number="${line.original.lineno}" |
|
552 | data-line-number="${line.original.lineno}" | |
547 | > |
|
553 | > | |
548 | <div> |
|
554 | <div> | |
549 | %if line.original.comments: |
|
555 | %if line.original.comments: | |
550 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> |
|
556 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> | |
551 | %endif |
|
557 | %endif | |
552 | </div> |
|
558 | </div> | |
553 | </td> |
|
559 | </td> | |
554 | <td class="cb-lineno ${action_class(line.original.action)}" |
|
560 | <td class="cb-lineno ${action_class(line.original.action)}" | |
555 | data-line-number="${line.original.lineno}" |
|
561 | data-line-number="${line.original.lineno}" | |
556 | %if old_line_anchor: |
|
562 | %if old_line_anchor: | |
557 | id="${old_line_anchor}" |
|
563 | id="${old_line_anchor}" | |
558 | %endif |
|
564 | %endif | |
559 | > |
|
565 | > | |
560 | %if line.original.lineno: |
|
566 | %if line.original.lineno: | |
561 | <a name="${old_line_anchor}" href="#${old_line_anchor}">${line.original.lineno}</a> |
|
567 | <a name="${old_line_anchor}" href="#${old_line_anchor}">${line.original.lineno}</a> | |
562 | %endif |
|
568 | %endif | |
563 | </td> |
|
569 | </td> | |
564 | <td class="cb-content ${action_class(line.original.action)}" |
|
570 | <td class="cb-content ${action_class(line.original.action)}" | |
565 | data-line-number="o${line.original.lineno}" |
|
571 | data-line-number="o${line.original.lineno}" | |
566 | > |
|
572 | > | |
567 | %if use_comments and line.original.lineno: |
|
573 | %if use_comments and line.original.lineno: | |
568 | ${render_add_comment_button()} |
|
574 | ${render_add_comment_button()} | |
569 | %endif |
|
575 | %endif | |
570 | <span class="cb-code">${line.original.action} ${line.original.content or '' | n}</span> |
|
576 | <span class="cb-code">${line.original.action} ${line.original.content or '' | n}</span> | |
571 | %if use_comments and line.original.lineno and line.original.comments: |
|
577 | %if use_comments and line.original.lineno and line.original.comments: | |
572 | ${inline_comments_container(line.original.comments)} |
|
578 | ${inline_comments_container(line.original.comments)} | |
573 | %endif |
|
579 | %endif | |
574 | </td> |
|
580 | </td> | |
575 | <td class="cb-data ${action_class(line.modified.action)}" |
|
581 | <td class="cb-data ${action_class(line.modified.action)}" | |
576 | data-line-number="${line.modified.lineno}" |
|
582 | data-line-number="${line.modified.lineno}" | |
577 | > |
|
583 | > | |
578 | <div> |
|
584 | <div> | |
579 | %if line.modified.comments: |
|
585 | %if line.modified.comments: | |
580 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> |
|
586 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> | |
581 | %endif |
|
587 | %endif | |
582 | </div> |
|
588 | </div> | |
583 | </td> |
|
589 | </td> | |
584 | <td class="cb-lineno ${action_class(line.modified.action)}" |
|
590 | <td class="cb-lineno ${action_class(line.modified.action)}" | |
585 | data-line-number="${line.modified.lineno}" |
|
591 | data-line-number="${line.modified.lineno}" | |
586 | %if new_line_anchor: |
|
592 | %if new_line_anchor: | |
587 | id="${new_line_anchor}" |
|
593 | id="${new_line_anchor}" | |
588 | %endif |
|
594 | %endif | |
589 | > |
|
595 | > | |
590 | %if line.modified.lineno: |
|
596 | %if line.modified.lineno: | |
591 | <a name="${new_line_anchor}" href="#${new_line_anchor}">${line.modified.lineno}</a> |
|
597 | <a name="${new_line_anchor}" href="#${new_line_anchor}">${line.modified.lineno}</a> | |
592 | %endif |
|
598 | %endif | |
593 | </td> |
|
599 | </td> | |
594 | <td class="cb-content ${action_class(line.modified.action)}" |
|
600 | <td class="cb-content ${action_class(line.modified.action)}" | |
595 | data-line-number="n${line.modified.lineno}" |
|
601 | data-line-number="n${line.modified.lineno}" | |
596 | > |
|
602 | > | |
597 | %if use_comments and line.modified.lineno: |
|
603 | %if use_comments and line.modified.lineno: | |
598 | ${render_add_comment_button()} |
|
604 | ${render_add_comment_button()} | |
599 | %endif |
|
605 | %endif | |
600 | <span class="cb-code">${line.modified.action} ${line.modified.content or '' | n}</span> |
|
606 | <span class="cb-code">${line.modified.action} ${line.modified.content or '' | n}</span> | |
601 | %if use_comments and line.modified.lineno and line.modified.comments: |
|
607 | %if use_comments and line.modified.lineno and line.modified.comments: | |
602 | ${inline_comments_container(line.modified.comments)} |
|
608 | ${inline_comments_container(line.modified.comments)} | |
603 | %endif |
|
609 | %endif | |
604 | </td> |
|
610 | </td> | |
605 | </tr> |
|
611 | </tr> | |
606 | %endfor |
|
612 | %endfor | |
607 | </%def> |
|
613 | </%def> | |
608 |
|
614 | |||
609 |
|
615 | |||
610 | <%def name="render_hunk_lines_unified(hunk, use_comments=False)"> |
|
616 | <%def name="render_hunk_lines_unified(hunk, use_comments=False)"> | |
611 | %for old_line_no, new_line_no, action, content, comments in hunk.unified: |
|
617 | %for old_line_no, new_line_no, action, content, comments in hunk.unified: | |
612 | <% |
|
618 | <% | |
613 | old_line_anchor, new_line_anchor = None, None |
|
619 | old_line_anchor, new_line_anchor = None, None | |
614 | if old_line_no: |
|
620 | if old_line_no: | |
615 | old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, old_line_no, 'o') |
|
621 | old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, old_line_no, 'o') | |
616 | if new_line_no: |
|
622 | if new_line_no: | |
617 | new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, new_line_no, 'n') |
|
623 | new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, new_line_no, 'n') | |
618 | %> |
|
624 | %> | |
619 | <tr class="cb-line"> |
|
625 | <tr class="cb-line"> | |
620 | <td class="cb-data ${action_class(action)}"> |
|
626 | <td class="cb-data ${action_class(action)}"> | |
621 | <div> |
|
627 | <div> | |
622 | %if comments: |
|
628 | %if comments: | |
623 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> |
|
629 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> | |
624 | %endif |
|
630 | %endif | |
625 | </div> |
|
631 | </div> | |
626 | </td> |
|
632 | </td> | |
627 | <td class="cb-lineno ${action_class(action)}" |
|
633 | <td class="cb-lineno ${action_class(action)}" | |
628 | data-line-number="${old_line_no}" |
|
634 | data-line-number="${old_line_no}" | |
629 | %if old_line_anchor: |
|
635 | %if old_line_anchor: | |
630 | id="${old_line_anchor}" |
|
636 | id="${old_line_anchor}" | |
631 | %endif |
|
637 | %endif | |
632 | > |
|
638 | > | |
633 | %if old_line_anchor: |
|
639 | %if old_line_anchor: | |
634 | <a name="${old_line_anchor}" href="#${old_line_anchor}">${old_line_no}</a> |
|
640 | <a name="${old_line_anchor}" href="#${old_line_anchor}">${old_line_no}</a> | |
635 | %endif |
|
641 | %endif | |
636 | </td> |
|
642 | </td> | |
637 | <td class="cb-lineno ${action_class(action)}" |
|
643 | <td class="cb-lineno ${action_class(action)}" | |
638 | data-line-number="${new_line_no}" |
|
644 | data-line-number="${new_line_no}" | |
639 | %if new_line_anchor: |
|
645 | %if new_line_anchor: | |
640 | id="${new_line_anchor}" |
|
646 | id="${new_line_anchor}" | |
641 | %endif |
|
647 | %endif | |
642 | > |
|
648 | > | |
643 | %if new_line_anchor: |
|
649 | %if new_line_anchor: | |
644 | <a name="${new_line_anchor}" href="#${new_line_anchor}">${new_line_no}</a> |
|
650 | <a name="${new_line_anchor}" href="#${new_line_anchor}">${new_line_no}</a> | |
645 | %endif |
|
651 | %endif | |
646 | </td> |
|
652 | </td> | |
647 | <td class="cb-content ${action_class(action)}" |
|
653 | <td class="cb-content ${action_class(action)}" | |
648 | data-line-number="${new_line_no and 'n' or 'o'}${new_line_no or old_line_no}" |
|
654 | data-line-number="${new_line_no and 'n' or 'o'}${new_line_no or old_line_no}" | |
649 | > |
|
655 | > | |
650 | %if use_comments: |
|
656 | %if use_comments: | |
651 | ${render_add_comment_button()} |
|
657 | ${render_add_comment_button()} | |
652 | %endif |
|
658 | %endif | |
653 | <span class="cb-code">${action} ${content or '' | n}</span> |
|
659 | <span class="cb-code">${action} ${content or '' | n}</span> | |
654 | %if use_comments and comments: |
|
660 | %if use_comments and comments: | |
655 | ${inline_comments_container(comments)} |
|
661 | ${inline_comments_container(comments)} | |
656 | %endif |
|
662 | %endif | |
657 | </td> |
|
663 | </td> | |
658 | </tr> |
|
664 | </tr> | |
659 | %endfor |
|
665 | %endfor | |
660 | </%def> |
|
666 | </%def> | |
661 |
|
667 | |||
662 | <%def name="render_add_comment_button()"> |
|
668 | <%def name="render_add_comment_button()"> | |
663 | <button class="btn btn-small btn-primary cb-comment-box-opener" onclick="return Rhodecode.comments.createComment(this)"> |
|
669 | <button class="btn btn-small btn-primary cb-comment-box-opener" onclick="return Rhodecode.comments.createComment(this)"> | |
664 | <span><i class="icon-comment"></i></span> |
|
670 | <span><i class="icon-comment"></i></span> | |
665 | </button> |
|
671 | </button> | |
666 | </%def> |
|
672 | </%def> | |
667 |
|
673 | |||
668 | <%def name="render_diffset_menu()"> |
|
674 | <%def name="render_diffset_menu()"> | |
669 |
|
675 | |||
670 | <div class="diffset-menu clearinner"> |
|
676 | <div class="diffset-menu clearinner"> | |
671 | <div class="pull-right"> |
|
677 | <div class="pull-right"> | |
672 | <div class="btn-group"> |
|
678 | <div class="btn-group"> | |
673 |
|
679 | |||
674 | <a |
|
680 | <a | |
675 | class="btn ${c.diffmode == 'sideside' and 'btn-primary'} tooltip" |
|
681 | class="btn ${c.diffmode == 'sideside' and 'btn-primary'} tooltip" | |
676 | title="${_('View side by side')}" |
|
682 | title="${_('View side by side')}" | |
677 | href="${h.url_replace(diffmode='sideside')}"> |
|
683 | href="${h.url_replace(diffmode='sideside')}"> | |
678 | <span>${_('Side by Side')}</span> |
|
684 | <span>${_('Side by Side')}</span> | |
679 | </a> |
|
685 | </a> | |
680 | <a |
|
686 | <a | |
681 | class="btn ${c.diffmode == 'unified' and 'btn-primary'} tooltip" |
|
687 | class="btn ${c.diffmode == 'unified' and 'btn-primary'} tooltip" | |
682 | title="${_('View unified')}" href="${h.url_replace(diffmode='unified')}"> |
|
688 | title="${_('View unified')}" href="${h.url_replace(diffmode='unified')}"> | |
683 | <span>${_('Unified')}</span> |
|
689 | <span>${_('Unified')}</span> | |
684 | </a> |
|
690 | </a> | |
685 | </div> |
|
691 | </div> | |
686 | </div> |
|
692 | </div> | |
687 |
|
693 | |||
688 | <div class="pull-left"> |
|
694 | <div class="pull-left"> | |
689 | <div class="btn-group"> |
|
695 | <div class="btn-group"> | |
690 | <a |
|
696 | <a | |
691 | class="btn" |
|
697 | class="btn" | |
692 | href="#" |
|
698 | href="#" | |
693 | onclick="$('input[class=filediff-collapse-state]').prop('checked', false); return false">${_('Expand All Files')}</a> |
|
699 | onclick="$('input[class=filediff-collapse-state]').prop('checked', false); return false">${_('Expand All Files')}</a> | |
694 | <a |
|
700 | <a | |
695 | class="btn" |
|
701 | class="btn" | |
696 | href="#" |
|
702 | href="#" | |
697 | onclick="$('input[class=filediff-collapse-state]').prop('checked', true); return false">${_('Collapse All Files')}</a> |
|
703 | onclick="$('input[class=filediff-collapse-state]').prop('checked', true); return false">${_('Collapse All Files')}</a> | |
698 | <a |
|
704 | <a | |
699 | class="btn" |
|
705 | class="btn" | |
700 | href="#" |
|
706 | href="#" | |
701 | onclick="return Rhodecode.comments.toggleWideMode(this)">${_('Wide Mode Diff')}</a> |
|
707 | onclick="return Rhodecode.comments.toggleWideMode(this)">${_('Wide Mode Diff')}</a> | |
702 | </div> |
|
708 | </div> | |
703 | </div> |
|
709 | </div> | |
704 | </div> |
|
710 | </div> | |
705 | </%def> |
|
711 | </%def> |
@@ -1,68 +1,66 b'' | |||||
1 | <%def name="render_line(line_num, tokens, |
|
1 | <%def name="render_line(line_num, tokens, | |
2 | annotation=None, |
|
2 | annotation=None, | |
3 | bgcolor=None)"> |
|
3 | bgcolor=None)"> | |
4 | <% |
|
4 | <% | |
5 | from rhodecode.lib.codeblocks import render_tokenstream |
|
5 | from rhodecode.lib.codeblocks import render_tokenstream | |
6 | # avoid module lookup for performance |
|
6 | # avoid module lookup for performance | |
7 | html_escape = h.html_escape |
|
7 | html_escape = h.html_escape | |
8 | %> |
|
8 | %> | |
9 | <tr class="cb-line cb-line-fresh" |
|
9 | <tr class="cb-line cb-line-fresh" | |
10 | %if annotation: |
|
10 | %if annotation: | |
11 | data-revision="${annotation.revision}" |
|
11 | data-revision="${annotation.revision}" | |
12 | %endif |
|
12 | %endif | |
13 | > |
|
13 | > | |
14 | <td class="cb-lineno" id="L${line_num}"> |
|
14 | <td class="cb-lineno" id="L${line_num}"> | |
15 | <a data-line-no="${line_num}" href="#L${line_num}"></a> |
|
15 | <a data-line-no="${line_num}" href="#L${line_num}"></a> | |
16 | </td> |
|
16 | </td> | |
17 | <td class="cb-content cb-content-fresh" |
|
17 | <td class="cb-content cb-content-fresh" | |
18 | %if bgcolor: |
|
18 | %if bgcolor: | |
19 | style="background: ${bgcolor}" |
|
19 | style="background: ${bgcolor}" | |
20 | %endif |
|
20 | %endif | |
21 | > |
|
21 | > | |
22 | ## newline at end is necessary for highlight to work when line is empty |
|
22 | ## newline at end is necessary for highlight to work when line is empty | |
23 | ## and for copy pasting code to work as expected |
|
23 | ## and for copy pasting code to work as expected | |
24 | <span class="cb-code">${render_tokenstream(tokens)|n}${'\n'}</span> |
|
24 | <span class="cb-code">${render_tokenstream(tokens)|n}${'\n'}</span> | |
25 | </td> |
|
25 | </td> | |
26 | </tr> |
|
26 | </tr> | |
27 | </%def> |
|
27 | </%def> | |
28 |
|
28 | |||
29 | <%def name="render_annotation_lines(annotation, lines, color_hasher)"> |
|
29 | <%def name="render_annotation_lines(annotation, lines, color_hasher)"> | |
30 | <% |
|
30 | <% | |
31 | rowspan = len(lines) + 1 # span the line's <tr> and annotation <tr> |
|
31 | rowspan = len(lines) + 1 # span the line's <tr> and annotation <tr> | |
32 | %> |
|
32 | %> | |
33 | %if not annotation: |
|
33 | %if not annotation: | |
34 | <tr class="cb-annotate"> |
|
34 | <tr class="cb-annotate"> | |
35 | <td class="cb-annotate-message" rowspan="${rowspan}"></td> |
|
35 | <td class="cb-annotate-message" rowspan="${rowspan}"></td> | |
36 | <td class="cb-annotate-revision" rowspan="${rowspan}"></td> |
|
36 | <td class="cb-annotate-revision" rowspan="${rowspan}"></td> | |
37 | </tr> |
|
37 | </tr> | |
38 | %else: |
|
38 | %else: | |
39 | <tr class="cb-annotate"> |
|
39 | <tr class="cb-annotate"> | |
40 | <td class="cb-annotate-info tooltip" |
|
40 | <td class="cb-annotate-info tooltip" | |
41 | rowspan="${rowspan}" |
|
41 | rowspan="${rowspan}" | |
42 | title="Author: ${annotation.author | entity}<br>Date: ${annotation.date}<br>Message: ${annotation.message | entity}" |
|
42 | title="Author: ${annotation.author | entity}<br>Date: ${annotation.date}<br>Message: ${annotation.message | entity}" | |
43 | > |
|
43 | > | |
44 | ${h.gravatar_with_user(annotation.author, 16) | n} |
|
44 | ${h.gravatar_with_user(annotation.author, 16) | n} | |
45 | <strong class="cb-annotate-message">${ |
|
45 | <strong class="cb-annotate-message">${h.truncate(annotation.message, len(lines) * 30)}</strong> | |
46 | h.truncate(annotation.message, len(lines) * 30) |
|
|||
47 | }</strong> |
|
|||
48 | </td> |
|
46 | </td> | |
49 | <td |
|
47 | <td | |
50 | class="cb-annotate-revision" |
|
48 | class="cb-annotate-revision" | |
51 | rowspan="${rowspan}" |
|
49 | rowspan="${rowspan}" | |
52 | data-revision="${annotation.revision}" |
|
50 | data-revision="${annotation.revision}" | |
53 | onclick="$('[data-revision=${annotation.revision}]').toggleClass('cb-line-fresh')" |
|
51 | onclick="$('[data-revision=${annotation.revision}]').toggleClass('cb-line-fresh')" | |
54 | style="background: ${color_hasher(annotation.raw_id)}"> |
|
52 | style="background: ${color_hasher(annotation.raw_id)}"> | |
55 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=annotation.raw_id)}"> |
|
53 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=annotation.raw_id)}"> | |
56 | r${annotation.revision} |
|
54 | r${annotation.revision} | |
57 | </a> |
|
55 | </a> | |
58 | </td> |
|
56 | </td> | |
59 | </tr> |
|
57 | </tr> | |
60 | %endif |
|
58 | %endif | |
61 |
|
59 | |||
62 | %for line_num, tokens in lines: |
|
60 | %for line_num, tokens in lines: | |
63 | ${render_line(line_num, tokens, |
|
61 | ${render_line(line_num, tokens, | |
64 | bgcolor=color_hasher(annotation and annotation.raw_id or ''), |
|
62 | bgcolor=color_hasher(annotation and annotation.raw_id or ''), | |
65 | annotation=annotation, |
|
63 | annotation=annotation, | |
66 | )} |
|
64 | )} | |
67 | %endfor |
|
65 | %endfor | |
68 | </%def> |
|
66 | </%def> |
@@ -1,1160 +1,1160 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | <%namespace name="base" file="/base/base.mako"/> | |
3 | <%inherit file="/debug_style/index.html"/> |
|
3 | <%inherit file="/debug_style/index.html"/> | |
4 |
|
4 | |||
5 | <%def name="breadcrumbs_links()"> |
|
5 | <%def name="breadcrumbs_links()"> | |
6 | ${h.link_to(_('Style'), h.url('debug_style_home'))} |
|
6 | ${h.link_to(_('Style'), h.url('debug_style_home'))} | |
7 | » |
|
7 | » | |
8 | ${c.active} |
|
8 | ${c.active} | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="js_extra()"> |
|
11 | <%def name="js_extra()"> | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="css_extra()"> |
|
14 | <%def name="css_extra()"> | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 |
|
17 | |||
18 | <%def name="real_main()"> |
|
18 | <%def name="real_main()"> | |
19 | <div class="box"> |
|
19 | <div class="box"> | |
20 | <div class="title"> |
|
20 | <div class="title"> | |
21 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
22 | </div> |
|
22 | </div> | |
23 |
|
23 | |||
24 | ##main |
|
24 | ##main | |
25 | <div class='sidebar-col-wrapper'> |
|
25 | <div class='sidebar-col-wrapper'> | |
26 | ${self.sidebar()} |
|
26 | ${self.sidebar()} | |
27 |
|
27 | |||
28 | <div class="main-content"> |
|
28 | <div class="main-content"> | |
29 |
|
29 | |||
30 |
|
30 | |||
31 |
|
31 | |||
32 | <h2>Code Blocks</h2> |
|
32 | <h2>Code Blocks</h2> | |
33 |
|
33 | |||
34 | <dl class="dl-horizontal"> |
|
34 | <dl class="dl-horizontal"> | |
35 | <dt><code>.codeblock</code></dt> |
|
35 | <dt><code>.codeblock</code></dt> | |
36 | <dd>Used as a wrapping element around <code>.code-header</code> and |
|
36 | <dd>Used as a wrapping element around <code>.code-header</code> and | |
37 | <code>.code-body</code>. Used to show the content of a file or a |
|
37 | <code>.code-body</code>. Used to show the content of a file or a | |
38 | Gist.</dd> |
|
38 | Gist.</dd> | |
39 |
|
39 | |||
40 | <dt><code>.diffblock</code></dt> |
|
40 | <dt><code>.diffblock</code></dt> | |
41 | <dd>Used as a wrapping element to show a diff in a Commit or Pull |
|
41 | <dd>Used as a wrapping element to show a diff in a Commit or Pull | |
42 | Request page. Contains usually <code>.code-header</code>, |
|
42 | Request page. Contains usually <code>.code-header</code>, | |
43 | <code>.code-body</code> and in the edit case a <code>.message</code>. |
|
43 | <code>.code-body</code> and in the edit case a <code>.message</code>. | |
44 | </dd> |
|
44 | </dd> | |
45 | </dl> |
|
45 | </dl> | |
46 |
|
46 | |||
47 |
|
47 | |||
48 | <p>Code Blocks are used in the following areas:</p> |
|
48 | <p>Code Blocks are used in the following areas:</p> | |
49 |
|
49 | |||
50 | <ul> |
|
50 | <ul> | |
51 | <li>Commit: Showing the Diff (still called Changeset in a few |
|
51 | <li>Commit: Showing the Diff (still called Changeset in a few | |
52 | places).</li> |
|
52 | places).</li> | |
53 | <li>File: Display a file, annotations, and edit a file.</li> |
|
53 | <li>File: Display a file, annotations, and edit a file.</li> | |
54 | <li>Gist: Show the Gist and edit it.</li> |
|
54 | <li>Gist: Show the Gist and edit it.</li> | |
55 | <li>Pull Request: Display the Diff of a Pull Request.</li> |
|
55 | <li>Pull Request: Display the Diff of a Pull Request.</li> | |
56 | </ul> |
|
56 | </ul> | |
57 |
|
57 | |||
58 |
|
58 | |||
59 |
|
59 | |||
60 | <!-- |
|
60 | <!-- | |
61 | Compare Commits |
|
61 | Compare Commits | |
62 | --> |
|
62 | --> | |
63 | <h2>Compare Commits</h2> |
|
63 | <h2>Compare Commits</h2> | |
64 |
|
64 | |||
65 | <div id="c-e589e34d6be8-5ab783e6d81b" class="diffblock margined comm"> |
|
65 | <div id="c-e589e34d6be8-5ab783e6d81b" class="diffblock margined comm"> | |
66 | <div class="code-header"> |
|
66 | <div class="code-header"> | |
67 | <div title="Go back to changed files overview"> |
|
67 | <div title="Go back to changed files overview"> | |
68 | <a href="#changes_box"> |
|
68 | <a href="#changes_box"> | |
69 | <i class="icon-circle-arrow-up"></i> |
|
69 | <i class="icon-circle-arrow-up"></i> | |
70 | </a> |
|
70 | </a> | |
71 | </div> |
|
71 | </div> | |
72 | <div class="changeset_header"> |
|
72 | <div class="changeset_header"> | |
73 | <div class="changeset_file"> |
|
73 | <div class="changeset_file"> | |
74 | <i class="icon-file"></i> |
|
74 | <i class="icon-file"></i> | |
75 | <a href="/example/files/e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d/rhodecode/public/css/code-block.less">rhodecode/public/css/code-block.less</a> |
|
75 | <a href="/example/files/e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d/rhodecode/public/css/code-block.less">rhodecode/public/css/code-block.less</a> | |
76 | </div> |
|
76 | </div> | |
77 | <div class="diff-actions"> |
|
77 | <div class="diff-actions"> | |
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"> |
|
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 | <img class="icon" src="/images/icons/page_white_go.png"> |
|
79 | <img class="icon" src="/images/icons/page_white_go.png"> | |
80 | </a> |
|
80 | </a> | |
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"> |
|
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 | <img class="icon" src="/images/icons/application_double.png"> |
|
82 | <img class="icon" src="/images/icons/application_double.png"> | |
83 | </a> |
|
83 | </a> | |
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"> |
|
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 | <img class="icon" src="/images/icons/page_white.png"> |
|
85 | <img class="icon" src="/images/icons/page_white.png"> | |
86 | </a> |
|
86 | </a> | |
87 | <a href="/example/diff/rhodecode/public/css/code-block.less?diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&diff=download&diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Download diff"> |
|
87 | <a href="/example/diff/rhodecode/public/css/code-block.less?diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&diff=download&diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Download diff"> | |
88 | <img class="icon" src="/images/icons/page_save.png"> |
|
88 | <img class="icon" src="/images/icons/page_save.png"> | |
89 | </a> |
|
89 | </a> | |
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> |
|
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 | <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> |
|
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 | </div> |
|
92 | </div> | |
93 | <span> |
|
93 | <span> | |
94 | <label> |
|
94 | <label> | |
95 | Show inline comments |
|
95 | Show inline comments | |
96 | <input checked="checked" class="show-inline-comments" id="" id_for="c-e589e34d6be8-5ab783e6d81b" name="" type="checkbox" value="1"> |
|
96 | <input checked="checked" class="show-inline-comments" id="" id_for="c-e589e34d6be8-5ab783e6d81b" name="" type="checkbox" value="1"> | |
97 | </label> |
|
97 | </label> | |
98 | </span> |
|
98 | </span> | |
99 | </div> |
|
99 | </div> | |
100 | </div> |
|
100 | </div> | |
101 | <div class="code-body"> |
|
101 | <div class="code-body"> | |
102 | <div class="full_f_path" path="rhodecode/public/css/code-block.less"></div> |
|
102 | <div class="full_f_path" path="rhodecode/public/css/code-block.less"></div> | |
103 | <table class="code-difftable"> |
|
103 | <table class="code-difftable"> | |
104 | <tbody><tr class="line context"> |
|
104 | <tbody><tr class="line context"> | |
105 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td> |
|
105 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td> | |
106 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td> |
|
106 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td> | |
107 | <td class="code no-comment"> |
|
107 | <td class="code no-comment"> | |
108 | <pre>@@ -391,7 +391,7 @@ |
|
108 | <pre>@@ -391,7 +391,7 @@ | |
109 | </pre> |
|
109 | </pre> | |
110 | </td> |
|
110 | </td> | |
111 | </tr> |
|
111 | </tr> | |
112 | <tr class="line unmod"> |
|
112 | <tr class="line unmod"> | |
113 | <td id="rhodecodepubliccsscode-blockless_o391" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o391">391</a></td> |
|
113 | <td id="rhodecodepubliccsscode-blockless_o391" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o391">391</a></td> | |
114 | <td id="rhodecodepubliccsscode-blockless_n391" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n391">391</a></td> |
|
114 | <td id="rhodecodepubliccsscode-blockless_n391" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n391">391</a></td> | |
115 | <td class="code no-comment"> |
|
115 | <td class="code no-comment"> | |
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. |
|
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 | </pre> |
|
117 | </pre> | |
118 | </td> |
|
118 | </td> | |
119 | </tr> |
|
119 | </tr> | |
120 | <tr class="line unmod"> |
|
120 | <tr class="line unmod"> | |
121 | <td id="rhodecodepubliccsscode-blockless_o392" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o392">392</a></td> |
|
121 | <td id="rhodecodepubliccsscode-blockless_o392" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o392">392</a></td> | |
122 | <td id="rhodecodepubliccsscode-blockless_n392" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n392">392</a></td> |
|
122 | <td id="rhodecodepubliccsscode-blockless_n392" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n392">392</a></td> | |
123 | <td class="code no-comment"> |
|
123 | <td class="code no-comment"> | |
124 | <pre></pre> |
|
124 | <pre></pre> | |
125 | </td> |
|
125 | </td> | |
126 | </tr> |
|
126 | </tr> | |
127 | <tr class="line unmod"> |
|
127 | <tr class="line unmod"> | |
128 | <td id="rhodecodepubliccsscode-blockless_o393" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o393">393</a></td> |
|
128 | <td id="rhodecodepubliccsscode-blockless_o393" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o393">393</a></td> | |
129 | <td id="rhodecodepubliccsscode-blockless_n393" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n393">393</a></td> |
|
129 | <td id="rhodecodepubliccsscode-blockless_n393" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n393">393</a></td> | |
130 | <td class="code no-comment"> |
|
130 | <td class="code no-comment"> | |
131 | <pre>.code-body.textarea.editor, |
|
131 | <pre>.code-body.textarea.editor, | |
132 | </pre> |
|
132 | </pre> | |
133 | </td> |
|
133 | </td> | |
134 | </tr> |
|
134 | </tr> | |
135 | <tr class="line del"> |
|
135 | <tr class="line del"> | |
136 | <td id="rhodecodepubliccsscode-blockless_o394" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o394">394</a></td> |
|
136 | <td id="rhodecodepubliccsscode-blockless_o394" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o394">394</a></td> | |
137 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n"></a></td> |
|
137 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n"></a></td> | |
138 | <td class="code no-comment"> |
|
138 | <td class="code no-comment"> | |
139 | <pre>div.code-body{ |
|
139 | <pre>div.code-body{ | |
140 | </pre> |
|
140 | </pre> | |
141 | </td> |
|
141 | </td> | |
142 | </tr> |
|
142 | </tr> | |
143 | <tr class="line add"> |
|
143 | <tr class="line add"> | |
144 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> |
|
144 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> | |
145 | <td id="rhodecodepubliccsscode-blockless_n394" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n394">394</a></td> |
|
145 | <td id="rhodecodepubliccsscode-blockless_n394" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n394">394</a></td> | |
146 | <td class="code no-comment"> |
|
146 | <td class="code no-comment"> | |
147 | <pre>div.code-body<ins> </ins>{ |
|
147 | <pre>div.code-body<ins> </ins>{ | |
148 | </pre> |
|
148 | </pre> | |
149 | </td> |
|
149 | </td> | |
150 | </tr> |
|
150 | </tr> | |
151 | <tr class="line unmod"> |
|
151 | <tr class="line unmod"> | |
152 | <td id="rhodecodepubliccsscode-blockless_o395" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o395">395</a></td> |
|
152 | <td id="rhodecodepubliccsscode-blockless_o395" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o395">395</a></td> | |
153 | <td id="rhodecodepubliccsscode-blockless_n395" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n395">395</a></td> |
|
153 | <td id="rhodecodepubliccsscode-blockless_n395" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n395">395</a></td> | |
154 | <td class="code no-comment"> |
|
154 | <td class="code no-comment"> | |
155 | <pre> float: left; |
|
155 | <pre> float: left; | |
156 | </pre> |
|
156 | </pre> | |
157 | </td> |
|
157 | </td> | |
158 | </tr> |
|
158 | </tr> | |
159 | <tr class="line unmod"> |
|
159 | <tr class="line unmod"> | |
160 | <td id="rhodecodepubliccsscode-blockless_o396" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o396">396</a></td> |
|
160 | <td id="rhodecodepubliccsscode-blockless_o396" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o396">396</a></td> | |
161 | <td id="rhodecodepubliccsscode-blockless_n396" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n396">396</a></td> |
|
161 | <td id="rhodecodepubliccsscode-blockless_n396" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n396">396</a></td> | |
162 | <td class="code no-comment"> |
|
162 | <td class="code no-comment"> | |
163 | <pre> position: relative; |
|
163 | <pre> position: relative; | |
164 | </pre> |
|
164 | </pre> | |
165 | </td> |
|
165 | </td> | |
166 | </tr> |
|
166 | </tr> | |
167 | <tr class="line unmod"> |
|
167 | <tr class="line unmod"> | |
168 | <td id="rhodecodepubliccsscode-blockless_o397" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o397">397</a></td> |
|
168 | <td id="rhodecodepubliccsscode-blockless_o397" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o397">397</a></td> | |
169 | <td id="rhodecodepubliccsscode-blockless_n397" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n397">397</a></td> |
|
169 | <td id="rhodecodepubliccsscode-blockless_n397" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n397">397</a></td> | |
170 | <td class="code no-comment"> |
|
170 | <td class="code no-comment"> | |
171 | <pre> max-width: none; |
|
171 | <pre> max-width: none; | |
172 | </pre> |
|
172 | </pre> | |
173 | </td> |
|
173 | </td> | |
174 | </tr> |
|
174 | </tr> | |
175 | <tr class="line context"> |
|
175 | <tr class="line context"> | |
176 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td> |
|
176 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td> | |
177 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td> |
|
177 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td> | |
178 | <td class="code no-comment"> |
|
178 | <td class="code no-comment"> | |
179 | <pre>@@ -399,3 +399,6 @@ |
|
179 | <pre>@@ -399,3 +399,6 @@ | |
180 | </pre> |
|
180 | </pre> | |
181 | </td> |
|
181 | </td> | |
182 | </tr> |
|
182 | </tr> | |
183 | <tr class="line unmod"> |
|
183 | <tr class="line unmod"> | |
184 | <td id="rhodecodepubliccsscode-blockless_o399" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o399">399</a></td> |
|
184 | <td id="rhodecodepubliccsscode-blockless_o399" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o399">399</a></td> | |
185 | <td id="rhodecodepubliccsscode-blockless_n399" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n399">399</a></td> |
|
185 | <td id="rhodecodepubliccsscode-blockless_n399" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n399">399</a></td> | |
186 | <td class="code no-comment"> |
|
186 | <td class="code no-comment"> | |
187 | <pre> box-sizing: border-box; |
|
187 | <pre> box-sizing: border-box; | |
188 | </pre> |
|
188 | </pre> | |
189 | </td> |
|
189 | </td> | |
190 | </tr> |
|
190 | </tr> | |
191 | <tr class="line unmod"> |
|
191 | <tr class="line unmod"> | |
192 | <td id="rhodecodepubliccsscode-blockless_o400" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o400">400</a></td> |
|
192 | <td id="rhodecodepubliccsscode-blockless_o400" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o400">400</a></td> | |
193 | <td id="rhodecodepubliccsscode-blockless_n400" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n400">400</a></td> |
|
193 | <td id="rhodecodepubliccsscode-blockless_n400" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n400">400</a></td> | |
194 | <td class="code no-comment"> |
|
194 | <td class="code no-comment"> | |
195 | <pre>} |
|
195 | <pre>} | |
196 | </pre> |
|
196 | </pre> | |
197 | </td> |
|
197 | </td> | |
198 | </tr> |
|
198 | </tr> | |
199 | <tr class="line unmod"> |
|
199 | <tr class="line unmod"> | |
200 | <td id="rhodecodepubliccsscode-blockless_o401" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o401">401</a></td> |
|
200 | <td id="rhodecodepubliccsscode-blockless_o401" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o401">401</a></td> | |
201 | <td id="rhodecodepubliccsscode-blockless_n401" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n401">401</a></td> |
|
201 | <td id="rhodecodepubliccsscode-blockless_n401" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n401">401</a></td> | |
202 | <td class="code no-comment"> |
|
202 | <td class="code no-comment"> | |
203 | <pre></pre> |
|
203 | <pre></pre> | |
204 | </td> |
|
204 | </td> | |
205 | </tr> |
|
205 | </tr> | |
206 | <tr class="line add"> |
|
206 | <tr class="line add"> | |
207 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> |
|
207 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> | |
208 | <td id="rhodecodepubliccsscode-blockless_n402" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n402">402</a></td> |
|
208 | <td id="rhodecodepubliccsscode-blockless_n402" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n402">402</a></td> | |
209 | <td class="code no-comment"> |
|
209 | <td class="code no-comment"> | |
210 | <pre>.code-body td{ |
|
210 | <pre>.code-body td{ | |
211 | </pre> |
|
211 | </pre> | |
212 | </td> |
|
212 | </td> | |
213 | </tr> |
|
213 | </tr> | |
214 | <tr class="line add"> |
|
214 | <tr class="line add"> | |
215 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> |
|
215 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> | |
216 | <td id="rhodecodepubliccsscode-blockless_n403" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n403">403</a></td> |
|
216 | <td id="rhodecodepubliccsscode-blockless_n403" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n403">403</a></td> | |
217 | <td class="code no-comment"> |
|
217 | <td class="code no-comment"> | |
218 | <pre> line-height: 1.2em; |
|
218 | <pre> line-height: 1.2em; | |
219 | </pre> |
|
219 | </pre> | |
220 | </td> |
|
220 | </td> | |
221 | </tr> |
|
221 | </tr> | |
222 | <tr class="line add"> |
|
222 | <tr class="line add"> | |
223 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> |
|
223 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td> | |
224 | <td id="rhodecodepubliccsscode-blockless_n404" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n404">404</a></td> |
|
224 | <td id="rhodecodepubliccsscode-blockless_n404" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n404">404</a></td> | |
225 | <td class="code no-comment"> |
|
225 | <td class="code no-comment"> | |
226 | <pre>} |
|
226 | <pre>} | |
227 | </pre> |
|
227 | </pre> | |
228 | </td> |
|
228 | </td> | |
229 | </tr> |
|
229 | </tr> | |
230 | <tr class="line context"> |
|
230 | <tr class="line context"> | |
231 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td> |
|
231 | <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td> | |
232 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td> |
|
232 | <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td> | |
233 | <td class="code no-comment"> |
|
233 | <td class="code no-comment"> | |
234 | <pre> No newline at end of file |
|
234 | <pre> No newline at end of file | |
235 | </pre> |
|
235 | </pre> | |
236 | </td> |
|
236 | </td> | |
237 | </tr> |
|
237 | </tr> | |
238 | </tbody></table> |
|
238 | </tbody></table> | |
239 | </div> |
|
239 | </div> | |
240 | </div> |
|
240 | </div> | |
241 |
|
241 | |||
242 |
|
242 | |||
243 |
|
243 | |||
244 |
|
244 | |||
245 |
|
245 | |||
246 |
|
246 | |||
247 | <!-- |
|
247 | <!-- | |
248 | Pull Request |
|
248 | Pull Request | |
249 | --> |
|
249 | --> | |
250 |
|
250 | |||
251 | <h2>Pull Request</h2> |
|
251 | <h2>Pull Request</h2> | |
252 |
|
252 | |||
253 | <div class="cs_files"> |
|
253 | <div class="cs_files"> | |
254 | <table class="compare_view_files"> |
|
254 | <table class="compare_view_files"> | |
255 |
|
255 | |||
256 | <tbody><tr class="cs_M collapse_file" fid="c--5f1d017cf13b"> |
|
256 | <tbody><tr class="cs_M collapse_file" fid="c--5f1d017cf13b"> | |
257 | <td class="cs_icon_td"> |
|
257 | <td class="cs_icon_td"> | |
258 | <span class="collapse_file_icon" fid="c--5f1d017cf13b"></span> |
|
258 | <span class="collapse_file_icon" fid="c--5f1d017cf13b"></span> | |
259 | </td> |
|
259 | </td> | |
260 | <td class="cs_icon_td"> |
|
260 | <td class="cs_icon_td"> | |
261 | <div class="flag_status not_reviewed hidden"></div> |
|
261 | <div class="flag_status not_reviewed hidden"></div> | |
262 | </td> |
|
262 | </td> | |
263 | <td id="a_c--5f1d017cf13b"> |
|
263 | <td id="a_c--5f1d017cf13b"> | |
264 | <a class="compare_view_filepath" href="#a_c--5f1d017cf13b"> |
|
264 | <a class="compare_view_filepath" href="#a_c--5f1d017cf13b"> | |
265 | rhodecode/public/css/main.less |
|
265 | rhodecode/public/css/main.less | |
266 | </a> |
|
266 | </a> | |
267 | <span id="diff_c--5f1d017cf13b" class="diff_links" style=""> |
|
267 | <span id="diff_c--5f1d017cf13b" class="diff_links" style=""> | |
268 | <a href="/example/diff/rhodecode/public/css/main.less?fulldiff=1&diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&diff=diff&diff2=27eb56cf467ca849112536d62decb2ed020b3ebc"> |
|
268 | <a href="/example/diff/rhodecode/public/css/main.less?fulldiff=1&diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&diff=diff&diff2=27eb56cf467ca849112536d62decb2ed020b3ebc"> | |
269 | Unified Diff |
|
269 | Unified Diff | |
270 | </a> |
|
270 | </a> | |
271 | | |
|
271 | | | |
272 | <a href="/example/diff-2way/rhodecode/public/css/main.less?fulldiff=1&diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&diff=diff&diff2=27eb56cf467ca849112536d62decb2ed020b3ebc"> |
|
272 | <a href="/example/diff-2way/rhodecode/public/css/main.less?fulldiff=1&diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&diff=diff&diff2=27eb56cf467ca849112536d62decb2ed020b3ebc"> | |
273 | Side-by-side Diff |
|
273 | Side-by-side Diff | |
274 | </a> |
|
274 | </a> | |
275 | </span> |
|
275 | </span> | |
276 | </td> |
|
276 | </td> | |
277 | <td> |
|
277 | <td> | |
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> |
|
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 | <div class="comment-bubble pull-right" data-path="rhodecode/public/css/main.less"> |
|
279 | <div class="comment-bubble pull-right" data-path="rhodecode/public/css/main.less"> | |
280 | <i class="icon-comment"></i> |
|
280 | <i class="icon-comment"></i> | |
281 | </div> |
|
281 | </div> | |
282 | </td> |
|
282 | </td> | |
283 | </tr> |
|
283 | </tr> | |
284 | <tr id="tr_c--5f1d017cf13b"> |
|
284 | <tr id="tr_c--5f1d017cf13b"> | |
285 | <td></td> |
|
285 | <td></td> | |
286 | <td></td> |
|
286 | <td></td> | |
287 | <td class="injected_diff" colspan="2"> |
|
287 | <td class="injected_diff" colspan="2"> | |
288 |
|
288 | |||
289 | <div class="diff-container" id="diff-container-140360026534904"> |
|
289 | <div class="diff-container" id="diff-container-140360026534904"> | |
290 | <div id="c--5f1d017cf13b_target"></div> |
|
290 | <div id="c--5f1d017cf13b_target"></div> | |
291 | <div id="c--5f1d017cf13b" class="diffblock margined comm"> |
|
291 | <div id="c--5f1d017cf13b" class="diffblock margined comm"> | |
292 | <div class="code-body"> |
|
292 | <div class="code-body"> | |
293 | <div class="full_f_path" path="rhodecode/public/css/main.less" style="display: none;"></div> |
|
293 | <div class="full_f_path" path="rhodecode/public/css/main.less" style="display: none;"></div> | |
294 | <table class="code-difftable"> |
|
294 | <table class="code-difftable"> | |
295 | <tbody><tr class="line context"> |
|
295 | <tbody><tr class="line context"> | |
296 | <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td> |
|
296 | <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td> | |
297 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td> |
|
297 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td> | |
298 | <td class="code "> |
|
298 | <td class="code "> | |
299 | <pre>@@ -2110,7 +2110,6 @@ |
|
299 | <pre>@@ -2110,7 +2110,6 @@ | |
300 | </pre> |
|
300 | </pre> | |
301 | </td> |
|
301 | </td> | |
302 | </tr> |
|
302 | </tr> | |
303 | <tr class="line unmod"> |
|
303 | <tr class="line unmod"> | |
304 | <td id="rhodecodepubliccssmainless_o2110" class="lineno old"><a href="#rhodecodepubliccssmainless_o2110">2110</a></td> |
|
304 | <td id="rhodecodepubliccssmainless_o2110" class="lineno old"><a href="#rhodecodepubliccssmainless_o2110">2110</a></td> | |
305 | <td id="rhodecodepubliccssmainless_n2110" class="lineno new"><a href="#rhodecodepubliccssmainless_n2110">2110</a></td> |
|
305 | <td id="rhodecodepubliccssmainless_n2110" class="lineno new"><a href="#rhodecodepubliccssmainless_n2110">2110</a></td> | |
306 | <td class="code "> |
|
306 | <td class="code "> | |
307 | <pre><span class="tab-escape"> </span>width: auto !important; |
|
307 | <pre><span class="tab-escape"> </span>width: auto !important; | |
308 | </pre> |
|
308 | </pre> | |
309 | </td> |
|
309 | </td> | |
310 | </tr> |
|
310 | </tr> | |
311 | <tr class="line unmod"> |
|
311 | <tr class="line unmod"> | |
312 | <td id="rhodecodepubliccssmainless_o2111" class="lineno old"><a href="#rhodecodepubliccssmainless_o2111">2111</a></td> |
|
312 | <td id="rhodecodepubliccssmainless_o2111" class="lineno old"><a href="#rhodecodepubliccssmainless_o2111">2111</a></td> | |
313 | <td id="rhodecodepubliccssmainless_n2111" class="lineno new"><a href="#rhodecodepubliccssmainless_n2111">2111</a></td> |
|
313 | <td id="rhodecodepubliccssmainless_n2111" class="lineno new"><a href="#rhodecodepubliccssmainless_n2111">2111</a></td> | |
314 | <td class="code "> |
|
314 | <td class="code "> | |
315 | <pre><span class="tab-escape"> </span>min-width: 160px; |
|
315 | <pre><span class="tab-escape"> </span>min-width: 160px; | |
316 | </pre> |
|
316 | </pre> | |
317 | </td> |
|
317 | </td> | |
318 | </tr> |
|
318 | </tr> | |
319 | <tr class="line unmod"> |
|
319 | <tr class="line unmod"> | |
320 | <td id="rhodecodepubliccssmainless_o2112" class="lineno old"><a href="#rhodecodepubliccssmainless_o2112">2112</a></td> |
|
320 | <td id="rhodecodepubliccssmainless_o2112" class="lineno old"><a href="#rhodecodepubliccssmainless_o2112">2112</a></td> | |
321 | <td id="rhodecodepubliccssmainless_n2112" class="lineno new"><a href="#rhodecodepubliccssmainless_n2112">2112</a></td> |
|
321 | <td id="rhodecodepubliccssmainless_n2112" class="lineno new"><a href="#rhodecodepubliccssmainless_n2112">2112</a></td> | |
322 | <td class="code "> |
|
322 | <td class="code "> | |
323 | <pre><span class="tab-escape"> </span>margin: @padding @padding @padding 0; |
|
323 | <pre><span class="tab-escape"> </span>margin: @padding @padding @padding 0; | |
324 | </pre> |
|
324 | </pre> | |
325 | </td> |
|
325 | </td> | |
326 | </tr> |
|
326 | </tr> | |
327 | <tr class="line del"> |
|
327 | <tr class="line del"> | |
328 | <td id="rhodecodepubliccssmainless_o2113" class="lineno old"><a href="#rhodecodepubliccssmainless_o2113">2113</a></td> |
|
328 | <td id="rhodecodepubliccssmainless_o2113" class="lineno old"><a href="#rhodecodepubliccssmainless_o2113">2113</a></td> | |
329 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td> |
|
329 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td> | |
330 | <td class="code "> |
|
330 | <td class="code "> | |
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. */ |
|
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 | </pre> |
|
332 | </pre> | |
333 | </td> |
|
333 | </td> | |
334 | </tr> |
|
334 | </tr> | |
335 | <tr class="line unmod"> |
|
335 | <tr class="line unmod"> | |
336 | <td id="rhodecodepubliccssmainless_o2114" class="lineno old"><a href="#rhodecodepubliccssmainless_o2114">2114</a></td> |
|
336 | <td id="rhodecodepubliccssmainless_o2114" class="lineno old"><a href="#rhodecodepubliccssmainless_o2114">2114</a></td> | |
337 | <td id="rhodecodepubliccssmainless_n2113" class="lineno new"><a href="#rhodecodepubliccssmainless_n2113">2113</a></td> |
|
337 | <td id="rhodecodepubliccssmainless_n2113" class="lineno new"><a href="#rhodecodepubliccssmainless_n2113">2113</a></td> | |
338 | <td class="code "> |
|
338 | <td class="code "> | |
339 | <pre> line-height: 1em; |
|
339 | <pre> line-height: 1em; | |
340 | </pre> |
|
340 | </pre> | |
341 | </td> |
|
341 | </td> | |
342 | </tr> |
|
342 | </tr> | |
343 | <tr class="line unmod"> |
|
343 | <tr class="line unmod"> | |
344 | <td id="rhodecodepubliccssmainless_o2115" class="lineno old"><a href="#rhodecodepubliccssmainless_o2115">2115</a></td> |
|
344 | <td id="rhodecodepubliccssmainless_o2115" class="lineno old"><a href="#rhodecodepubliccssmainless_o2115">2115</a></td> | |
345 | <td id="rhodecodepubliccssmainless_n2114" class="lineno new"><a href="#rhodecodepubliccssmainless_n2114">2114</a></td> |
|
345 | <td id="rhodecodepubliccssmainless_n2114" class="lineno new"><a href="#rhodecodepubliccssmainless_n2114">2114</a></td> | |
346 | <td class="code "> |
|
346 | <td class="code "> | |
347 | <pre><span class="tab-escape"> </span>z-index: 100;//js sets the menu below it to 9999 |
|
347 | <pre><span class="tab-escape"> </span>z-index: 100;//js sets the menu below it to 9999 | |
348 | </pre> |
|
348 | </pre> | |
349 | </td> |
|
349 | </td> | |
350 | </tr> |
|
350 | </tr> | |
351 | <tr class="line unmod"> |
|
351 | <tr class="line unmod"> | |
352 | <td id="rhodecodepubliccssmainless_o2116" class="lineno old"><a href="#rhodecodepubliccssmainless_o2116">2116</a></td> |
|
352 | <td id="rhodecodepubliccssmainless_o2116" class="lineno old"><a href="#rhodecodepubliccssmainless_o2116">2116</a></td> | |
353 | <td id="rhodecodepubliccssmainless_n2115" class="lineno new"><a href="#rhodecodepubliccssmainless_n2115">2115</a></td> |
|
353 | <td id="rhodecodepubliccssmainless_n2115" class="lineno new"><a href="#rhodecodepubliccssmainless_n2115">2115</a></td> | |
354 | <td class="code "> |
|
354 | <td class="code "> | |
355 | <pre><span class="tab-escape"> </span>background-color: white; |
|
355 | <pre><span class="tab-escape"> </span>background-color: white; | |
356 | </pre> |
|
356 | </pre> | |
357 | </td> |
|
357 | </td> | |
358 | </tr> |
|
358 | </tr> | |
359 | <tr class="line context"> |
|
359 | <tr class="line context"> | |
360 | <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td> |
|
360 | <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td> | |
361 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td> |
|
361 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td> | |
362 | <td class="code "> |
|
362 | <td class="code "> | |
363 | <pre>@@ -2118,7 +2117,7 @@ |
|
363 | <pre>@@ -2118,7 +2117,7 @@ | |
364 | </pre> |
|
364 | </pre> | |
365 | </td> |
|
365 | </td> | |
366 | </tr> |
|
366 | </tr> | |
367 | <tr class="line unmod"> |
|
367 | <tr class="line unmod"> | |
368 | <td id="rhodecodepubliccssmainless_o2118" class="lineno old"><a href="#rhodecodepubliccssmainless_o2118">2118</a></td> |
|
368 | <td id="rhodecodepubliccssmainless_o2118" class="lineno old"><a href="#rhodecodepubliccssmainless_o2118">2118</a></td> | |
369 | <td id="rhodecodepubliccssmainless_n2117" class="lineno new"><a href="#rhodecodepubliccssmainless_n2117">2117</a></td> |
|
369 | <td id="rhodecodepubliccssmainless_n2117" class="lineno new"><a href="#rhodecodepubliccssmainless_n2117">2117</a></td> | |
370 | <td class="code "> |
|
370 | <td class="code "> | |
371 | <pre></pre> |
|
371 | <pre></pre> | |
372 | </td> |
|
372 | </td> | |
373 | </tr> |
|
373 | </tr> | |
374 | <tr class="line unmod"> |
|
374 | <tr class="line unmod"> | |
375 | <td id="rhodecodepubliccssmainless_o2119" class="lineno old"><a href="#rhodecodepubliccssmainless_o2119">2119</a></td> |
|
375 | <td id="rhodecodepubliccssmainless_o2119" class="lineno old"><a href="#rhodecodepubliccssmainless_o2119">2119</a></td> | |
376 | <td id="rhodecodepubliccssmainless_n2118" class="lineno new"><a href="#rhodecodepubliccssmainless_n2118">2118</a></td> |
|
376 | <td id="rhodecodepubliccssmainless_n2118" class="lineno new"><a href="#rhodecodepubliccssmainless_n2118">2118</a></td> | |
377 | <td class="code "> |
|
377 | <td class="code "> | |
378 | <pre><span class="tab-escape"> </span>a { |
|
378 | <pre><span class="tab-escape"> </span>a { | |
379 | </pre> |
|
379 | </pre> | |
380 | </td> |
|
380 | </td> | |
381 | </tr> |
|
381 | </tr> | |
382 | <tr class="line unmod"> |
|
382 | <tr class="line unmod"> | |
383 | <td id="rhodecodepubliccssmainless_o2120" class="lineno old"><a href="#rhodecodepubliccssmainless_o2120">2120</a></td> |
|
383 | <td id="rhodecodepubliccssmainless_o2120" class="lineno old"><a href="#rhodecodepubliccssmainless_o2120">2120</a></td> | |
384 | <td id="rhodecodepubliccssmainless_n2119" class="lineno new"><a href="#rhodecodepubliccssmainless_n2119">2119</a></td> |
|
384 | <td id="rhodecodepubliccssmainless_n2119" class="lineno new"><a href="#rhodecodepubliccssmainless_n2119">2119</a></td> | |
385 | <td class="code "> |
|
385 | <td class="code "> | |
386 | <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>display:block; |
|
386 | <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>display:block; | |
387 | </pre> |
|
387 | </pre> | |
388 | </td> |
|
388 | </td> | |
389 | </tr> |
|
389 | </tr> | |
390 | <tr class="line del"> |
|
390 | <tr class="line del"> | |
391 | <td id="rhodecodepubliccssmainless_o2121" class="lineno old"><a href="#rhodecodepubliccssmainless_o2121">2121</a></td> |
|
391 | <td id="rhodecodepubliccssmainless_o2121" class="lineno old"><a href="#rhodecodepubliccssmainless_o2121">2121</a></td> | |
392 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td> |
|
392 | <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td> | |
393 | <td class="code "> |
|
393 | <td class="code "> | |
394 | <pre><span class="tab-escape"> </span><del><span< del=""> <del>class=</del><del>"tab-escape"</del><del>> </del>padding: <del>0</del>; |
|
394 | <pre><span class="tab-escape"> </span><del><span< del=""> <del>class=</del><del>"tab-escape"</del><del>> </del>padding: <del>0</del>; | |
395 | </span<></del></pre> |
|
395 | </span<></del></pre> | |
396 | </td> |
|
396 | </td> | |
397 | </tr> |
|
397 | </tr> | |
398 | <tr class="line add"> |
|
398 | <tr class="line add"> | |
399 | <td class="lineno old"><a href="#rhodecodepubliccssmainless_o"></a></td> |
|
399 | <td class="lineno old"><a href="#rhodecodepubliccssmainless_o"></a></td> | |
400 | <td id="rhodecodepubliccssmainless_n2120" class="lineno new"><a href="#rhodecodepubliccssmainless_n2120">2120</a></td> |
|
400 | <td id="rhodecodepubliccssmainless_n2120" class="lineno new"><a href="#rhodecodepubliccssmainless_n2120">2120</a></td> | |
401 | <td class="code "> |
|
401 | <td class="code "> | |
402 | <pre><span class="tab-escape"> </span><ins> </ins> <ins> </ins><ins> </ins>padding: <ins>.9em</ins>; |
|
402 | <pre><span class="tab-escape"> </span><ins> </ins> <ins> </ins><ins> </ins>padding: <ins>.9em</ins>; | |
403 | </pre> |
|
403 | </pre> | |
404 | </td> |
|
404 | </td> | |
405 | </tr> |
|
405 | </tr> | |
406 | <tr class="line unmod"> |
|
406 | <tr class="line unmod"> | |
407 | <td id="rhodecodepubliccssmainless_o2122" class="lineno old"><a href="#rhodecodepubliccssmainless_o2122">2122</a></td> |
|
407 | <td id="rhodecodepubliccssmainless_o2122" class="lineno old"><a href="#rhodecodepubliccssmainless_o2122">2122</a></td> | |
408 | <td id="rhodecodepubliccssmainless_n2121" class="lineno new"><a href="#rhodecodepubliccssmainless_n2121">2121</a></td> |
|
408 | <td id="rhodecodepubliccssmainless_n2121" class="lineno new"><a href="#rhodecodepubliccssmainless_n2121">2121</a></td> | |
409 | <td class="code "> |
|
409 | <td class="code "> | |
410 | <pre></pre> |
|
410 | <pre></pre> | |
411 | </td> |
|
411 | </td> | |
412 | </tr> |
|
412 | </tr> | |
413 | <tr class="line unmod"> |
|
413 | <tr class="line unmod"> | |
414 | <td id="rhodecodepubliccssmainless_o2123" class="lineno old"><a href="#rhodecodepubliccssmainless_o2123">2123</a></td> |
|
414 | <td id="rhodecodepubliccssmainless_o2123" class="lineno old"><a href="#rhodecodepubliccssmainless_o2123">2123</a></td> | |
415 | <td id="rhodecodepubliccssmainless_n2122" class="lineno new"><a href="#rhodecodepubliccssmainless_n2122">2122</a></td> |
|
415 | <td id="rhodecodepubliccssmainless_n2122" class="lineno new"><a href="#rhodecodepubliccssmainless_n2122">2122</a></td> | |
416 | <td class="code "> |
|
416 | <td class="code "> | |
417 | <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>&:after { |
|
417 | <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>&:after { | |
418 | </pre> |
|
418 | </pre> | |
419 | </td> |
|
419 | </td> | |
420 | </tr> |
|
420 | </tr> | |
421 | <tr class="line unmod"> |
|
421 | <tr class="line unmod"> | |
422 | <td id="rhodecodepubliccssmainless_o2124" class="lineno old"><a href="#rhodecodepubliccssmainless_o2124">2124</a></td> |
|
422 | <td id="rhodecodepubliccssmainless_o2124" class="lineno old"><a href="#rhodecodepubliccssmainless_o2124">2124</a></td> | |
423 | <td id="rhodecodepubliccssmainless_n2123" class="lineno new"><a href="#rhodecodepubliccssmainless_n2123">2123</a></td> |
|
423 | <td id="rhodecodepubliccssmainless_n2123" class="lineno new"><a href="#rhodecodepubliccssmainless_n2123">2123</a></td> | |
424 | <td class="code "> |
|
424 | <td class="code "> | |
425 | <pre><span class="tab-escape"> </span><span class="tab-escape"> </span><span class="tab-escape"> </span>content: "\00A0\25BE"; |
|
425 | <pre><span class="tab-escape"> </span><span class="tab-escape"> </span><span class="tab-escape"> </span>content: "\00A0\25BE"; | |
426 | </pre> |
|
426 | </pre> | |
427 | </td> |
|
427 | </td> | |
428 | </tr> |
|
428 | </tr> | |
429 | </tbody></table> |
|
429 | </tbody></table> | |
430 | </div> |
|
430 | </div> | |
431 | </div> |
|
431 | </div> | |
432 | </div> |
|
432 | </div> | |
433 |
|
433 | |||
434 | </td> |
|
434 | </td> | |
435 | </tr> |
|
435 | </tr> | |
436 | </tbody></table> |
|
436 | </tbody></table> | |
437 | </div> |
|
437 | </div> | |
438 |
|
438 | |||
439 |
|
439 | |||
440 |
|
440 | |||
441 |
|
441 | |||
442 |
|
442 | |||
443 |
|
443 | |||
444 |
|
444 | |||
445 |
|
445 | |||
446 |
|
446 | |||
447 | <!-- |
|
447 | <!-- | |
448 | File View |
|
448 | File View | |
449 | --> |
|
449 | --> | |
450 |
|
450 | |||
451 | ##TODO: lisa: I believe this needs to be updated as the layout has changed. |
|
451 | ##TODO: lisa: I believe this needs to be updated as the layout has changed. | |
452 | <h2>File View</h2> |
|
452 | <h2>File View</h2> | |
453 |
|
453 | |||
454 | <div class="codeblock"> |
|
454 | <div class="codeblock"> | |
455 | <div class="code-header"> |
|
455 | <div class="code-header"> | |
456 | <div class="stats"> |
|
456 | <div class="stats"> | |
457 | <div class="img"> |
|
457 | <div class="img"> | |
458 | <i class="icon-file"></i> |
|
458 | <i class="icon-file"></i> | |
459 | <span class="revision_id item"><a href="/example/changeset/fc252256eb0fcb4f2613e66f0126ea27967ae28c">r5487:fc252256eb0f</a></span> |
|
459 | <span class="revision_id item"><a href="/example/changeset/fc252256eb0fcb4f2613e66f0126ea27967ae28c">r5487:fc252256eb0f</a></span> | |
460 | <span>1.2 KiB</span> |
|
460 | <span>1.2 KiB</span> | |
461 | <span class="item last">text/x-python</span> |
|
461 | <span class="item last">text/x-python</span> | |
462 | <div class="buttons"> |
|
462 | <div class="buttons"> | |
463 |
|
463 | |||
464 | <a id="file_history_overview" class="btn btn-mini" href="#"> |
|
464 | <a id="file_history_overview" class="btn btn-mini" href="#"> | |
465 | <i class="icon-time"></i> history |
|
465 | <i class="icon-time"></i> history | |
466 | </a> |
|
466 | </a> | |
467 | <a id="file_history_overview_full" class="btn btn-mini" style="display: none" href="/example/changelog/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py"> |
|
467 | <a id="file_history_overview_full" class="btn btn-mini" style="display: none" href="/example/changelog/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py"> | |
468 | <i class="icon-time"></i> show full history |
|
468 | <i class="icon-time"></i> show full history | |
469 | </a> |
|
469 | </a> | |
470 | <a class="btn btn-mini" href="/example/annotate/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">annotation</a> |
|
470 | <a class="btn btn-mini" href="/example/annotate/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">annotation</a> | |
471 | <a class="btn btn-mini" href="/example/raw/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">raw</a> |
|
471 | <a class="btn btn-mini" href="/example/raw/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">raw</a> | |
472 | <a class="btn btn-mini" href="/example/rawfile/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py"> |
|
472 | <a class="btn btn-mini" href="/example/rawfile/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py"> | |
473 | <i class="icon-archive"></i> download |
|
473 | <i class="icon-archive"></i> download | |
474 | </a> |
|
474 | </a> | |
475 |
|
475 | |||
476 | <a class="btn btn-mini disabled tooltip" href="#" title="Editing files allowed only when on branch head commit">edit</a> |
|
476 | <a class="btn btn-mini disabled tooltip" href="#" title="Editing files allowed only when on branch head commit">edit</a> | |
477 | <a class="btn btn-mini btn-danger disabled tooltip" href="#" title="Deleting files allowed only when on branch head commit">delete</a> |
|
477 | <a class="btn btn-mini btn-danger disabled tooltip" href="#" title="Deleting files allowed only when on branch head commit">delete</a> | |
478 | </div> |
|
478 | </div> | |
479 | </div> |
|
479 | </div> | |
480 | </div> |
|
480 | </div> | |
481 | <div id="file_history_container"></div> |
|
481 | <div id="file_history_container"></div> | |
482 | <div class="author"> |
|
482 | <div class="author"> | |
483 | <div class="gravatar"> |
|
483 | <div class="gravatar"> | |
484 | <img alt="gravatar" src="https://secure.gravatar.com/avatar/99e27b99c64003ca8c9875c9e3843495?d=identicon&s=32" height="16" width="16"> |
|
484 | <img alt="gravatar" src="https://secure.gravatar.com/avatar/99e27b99c64003ca8c9875c9e3843495?d=identicon&s=32" height="16" width="16"> | |
485 | </div> |
|
485 | </div> | |
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> |
|
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 | </div> |
|
487 | </div> | |
488 | <div id="trimmed_message_box" class="commit">License changes</div> |
|
488 | <div id="trimmed_message_box" class="commit">License changes</div> | |
489 | <div id="message_expand" style="display: none;"> |
|
489 | <div id="message_expand" style="display: none;"> | |
490 | <i class="icon-resize-vertical"></i> |
|
490 | <i class="icon-resize-vertical"></i> | |
491 | expand |
|
491 | expand | |
492 | <i class="icon-resize-vertical"></i> |
|
492 | <i class="icon-resize-vertical"></i> | |
493 | </div> |
|
493 | </div> | |
494 | </div> |
|
494 | </div> | |
495 | <div class="code-body"> |
|
495 | <div class="code-body"> | |
496 | <table class="code-highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L1"> 1</a> |
|
496 | <table class="code-highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L1"> 1</a> | |
497 | <a href="#L2"> 2</a> |
|
497 | <a href="#L2"> 2</a> | |
498 | <a href="#L3"> 3</a> |
|
498 | <a href="#L3"> 3</a> | |
499 | <a href="#L4"> 4</a> |
|
499 | <a href="#L4"> 4</a> | |
500 | <a href="#L5"> 5</a> |
|
500 | <a href="#L5"> 5</a> | |
501 | <a href="#L6"> 6</a> |
|
501 | <a href="#L6"> 6</a> | |
502 | <a href="#L7"> 7</a> |
|
502 | <a href="#L7"> 7</a> | |
503 | <a href="#L8"> 8</a> |
|
503 | <a href="#L8"> 8</a> | |
504 | <a href="#L9"> 9</a> |
|
504 | <a href="#L9"> 9</a> | |
505 | <a href="#L10">10</a> |
|
505 | <a href="#L10">10</a> | |
506 | <a href="#L11">11</a> |
|
506 | <a href="#L11">11</a> | |
507 | <a href="#L12">12</a> |
|
507 | <a href="#L12">12</a> | |
508 | <a href="#L13">13</a> |
|
508 | <a href="#L13">13</a> | |
509 | <a href="#L14">14</a> |
|
509 | <a href="#L14">14</a> | |
510 | <a href="#L15">15</a> |
|
510 | <a href="#L15">15</a> | |
511 | <a href="#L16">16</a> |
|
511 | <a href="#L16">16</a> | |
512 | <a href="#L17">17</a> |
|
512 | <a href="#L17">17</a> | |
513 | <a href="#L18">18</a> |
|
513 | <a href="#L18">18</a> | |
514 | <a href="#L19">19</a> |
|
514 | <a href="#L19">19</a> | |
515 | <a href="#L20">20</a> |
|
515 | <a href="#L20">20</a> | |
516 | <a href="#L21">21</a> |
|
516 | <a href="#L21">21</a> | |
517 | <a href="#L22">22</a> |
|
517 | <a href="#L22">22</a> | |
518 | <a href="#L23">23</a> |
|
518 | <a href="#L23">23</a> | |
519 | <a href="#L24">24</a> |
|
519 | <a href="#L24">24</a> | |
520 | <a href="#L25">25</a> |
|
520 | <a href="#L25">25</a> | |
521 | <a href="#L26">26</a> |
|
521 | <a href="#L26">26</a> | |
522 | <a href="#L27">27</a> |
|
522 | <a href="#L27">27</a> | |
523 | <a href="#L28">28</a> |
|
523 | <a href="#L28">28</a> | |
524 | <a href="#L29">29</a> |
|
524 | <a href="#L29">29</a> | |
525 | <a href="#L30">30</a> |
|
525 | <a href="#L30">30</a> | |
526 | <a href="#L31">31</a> |
|
526 | <a href="#L31">31</a> | |
527 | <a href="#L32">32</a> |
|
527 | <a href="#L32">32</a> | |
528 | <a href="#L33">33</a> |
|
528 | <a href="#L33">33</a> | |
529 | <a href="#L34">34</a> |
|
529 | <a href="#L34">34</a> | |
530 | <a href="#L35">35</a> |
|
530 | <a href="#L35">35</a> | |
531 | <a href="#L36">36</a> |
|
531 | <a href="#L36">36</a> | |
532 | <a href="#L37">37</a> |
|
532 | <a href="#L37">37</a> | |
533 | <a href="#L38">38</a> |
|
533 | <a href="#L38">38</a> | |
534 | <a href="#L39">39</a> |
|
534 | <a href="#L39">39</a> | |
535 | <a href="#L40">40</a> |
|
535 | <a href="#L40">40</a> | |
536 | <a href="#L41">41</a> |
|
536 | <a href="#L41">41</a> | |
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> |
|
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 | </div><div id="L2"><a name="L-2"></a> |
|
538 | </div><div id="L2"><a name="L-2"></a> | |
539 | </div><div id="L3"><a name="L-3"></a><span class="c"># Published under Business Source License.</span> |
|
539 | </div><div id="L3"><a name="L-3"></a><span class="c"># Published under Business Source License.</span> | |
540 | </div><div id="L4"><a name="L-4"></a><span class="c"># Read the full license text at https://rhodecode.com/licenses.</span> |
|
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 | </div><div id="L5"><a name="L-5"></a><span class="sd">"""</span> |
|
541 | </div><div id="L5"><a name="L-5"></a><span class="sd">"""</span> | |
542 | </div><div id="L6"><a name="L-6"></a><span class="sd">rhodecode.websetup</span> |
|
542 | </div><div id="L6"><a name="L-6"></a><span class="sd">rhodecode.websetup</span> | |
543 | </div><div id="L7"><a name="L-7"></a><span class="sd">~~~~~~~~~~~~~~~~~~</span> |
|
543 | </div><div id="L7"><a name="L-7"></a><span class="sd">~~~~~~~~~~~~~~~~~~</span> | |
544 | </div><div id="L8"><a name="L-8"></a> |
|
544 | </div><div id="L8"><a name="L-8"></a> | |
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> |
|
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 | </div><div id="L10"><a name="L-10"></a> |
|
546 | </div><div id="L10"><a name="L-10"></a> | |
547 | </div><div id="L11"><a name="L-11"></a><span class="sd">:created_on: Dec 11, 2010</span> |
|
547 | </div><div id="L11"><a name="L-11"></a><span class="sd">:created_on: Dec 11, 2010</span> | |
548 | </div><div id="L12"><a name="L-12"></a><span class="sd">:author: marcink</span> |
|
548 | </div><div id="L12"><a name="L-12"></a><span class="sd">:author: marcink</span> | |
549 | </div><div id="L13"><a name="L-13"></a><span class="sd">:copyright: (c) 2013-2015 RhodeCode GmbH.</span> |
|
549 | </div><div id="L13"><a name="L-13"></a><span class="sd">:copyright: (c) 2013-2015 RhodeCode GmbH.</span> | |
550 | </div><div id="L14"><a name="L-14"></a><span class="sd">:license: Business Source License, see LICENSE for more details.</span> |
|
550 | </div><div id="L14"><a name="L-14"></a><span class="sd">:license: Business Source License, see LICENSE for more details.</span> | |
551 | </div><div id="L15"><a name="L-15"></a><span class="sd">"""</span> |
|
551 | </div><div id="L15"><a name="L-15"></a><span class="sd">"""</span> | |
552 | </div><div id="L16"><a name="L-16"></a> |
|
552 | </div><div id="L16"><a name="L-16"></a> | |
553 | </div><div id="L17"><a name="L-17"></a><span class="kn">import</span> <span class="nn">logging</span> |
|
553 | </div><div id="L17"><a name="L-17"></a><span class="kn">import</span> <span class="nn">logging</span> | |
554 | </div><div id="L18"><a name="L-18"></a> |
|
554 | </div><div id="L18"><a name="L-18"></a> | |
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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </div><div id="L22"><a name="L-22"></a> |
|
558 | </div><div id="L22"><a name="L-22"></a> | |
559 | </div><div id="L23"><a name="L-23"></a> |
|
559 | </div><div id="L23"><a name="L-23"></a> | |
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> |
|
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 | </div><div id="L25"><a name="L-25"></a> |
|
561 | </div><div id="L25"><a name="L-25"></a> | |
562 | </div><div id="L26"><a name="L-26"></a> |
|
562 | </div><div id="L26"><a name="L-26"></a> | |
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> |
|
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 | </div><div id="L28"><a name="L-28"></a> <span class="sd">"""Place any commands to setup rhodecode here"""</span> |
|
564 | </div><div id="L28"><a name="L-28"></a> <span class="sd">"""Place any commands to setup rhodecode here"""</span> | |
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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </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> |
|
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 | </div></pre></div> |
|
579 | </div></pre></div> | |
580 | </td></tr></tbody></table> |
|
580 | </td></tr></tbody></table> | |
581 | </div> |
|
581 | </div> | |
582 | </div> |
|
582 | </div> | |
583 |
|
583 | |||
584 |
|
584 | |||
585 |
|
585 | |||
586 |
|
586 | |||
587 |
|
587 | |||
588 |
|
588 | |||
589 |
|
589 | |||
590 |
|
590 | |||
591 |
|
591 | |||
592 | <!-- |
|
592 | <!-- | |
593 | Gist Edit |
|
593 | Gist Edit | |
594 | --> |
|
594 | --> | |
595 |
|
595 | |||
596 |
|
596 | |||
597 | <h2>Gist Edit</h2> |
|
597 | <h2>Gist Edit</h2> | |
598 |
|
598 | |||
599 | <div class="codeblock"> |
|
599 | <div class="codeblock"> | |
600 | <div class="code-header"> |
|
600 | <div class="code-header"> | |
601 | <div class="form"> |
|
601 | <div class="form"> | |
602 | <div class="fields"> |
|
602 | <div class="fields"> | |
603 | <input id="filename" name="filename" placeholder="name this file..." size="30" type="text"> |
|
603 | <input id="filename" name="filename" placeholder="name this file..." size="30" type="text"> | |
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;"> |
|
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 | <option selected="selected" value="plain">plain</option> |
|
605 | <option selected="selected" value="plain">plain</option> | |
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> |
|
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 | <script> |
|
607 | <script> | |
608 | $(document).ready(function() { |
|
608 | $(document).ready(function() { | |
609 | $('#mimetype').select2({ |
|
609 | $('#mimetype').select2({ | |
610 | containerCssClass: 'drop-menu', |
|
610 | containerCssClass: 'drop-menu', | |
611 | dropdownCssClass: 'drop-menu-dropdown', |
|
611 | dropdownCssClass: 'drop-menu-dropdown', | |
612 | dropdownAutoWidth: true |
|
612 | dropdownAutoWidth: true | |
613 | }); |
|
613 | }); | |
614 | }); |
|
614 | }); | |
615 | </script> |
|
615 | </script> | |
616 |
|
616 | |||
617 | </div> |
|
617 | </div> | |
618 | </div> |
|
618 | </div> | |
619 | </div> |
|
619 | </div> | |
620 | <div id="editor_container"> |
|
620 | <div id="editor_container"> | |
621 | <div id="editor_pre"></div> |
|
621 | <div id="editor_pre"></div> | |
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> |
|
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 | </div> |
|
623 | </div> | |
624 | </div> |
|
624 | </div> | |
625 |
|
625 | |||
626 |
|
626 | |||
627 |
|
627 | |||
628 |
|
628 | |||
629 |
|
629 | |||
630 | <!-- |
|
630 | <!-- | |
631 | File Edit |
|
631 | File Edit | |
632 | --> |
|
632 | --> | |
633 |
|
633 | |||
634 | <h2>File Edit</h2> |
|
634 | <h2>File Edit</h2> | |
635 |
|
635 | |||
636 | <div class="codeblock"> |
|
636 | <div class="codeblock"> | |
637 | <div class="code-header"> |
|
637 | <div class="code-header"> | |
638 | <div class="stats"> |
|
638 | <div class="stats"> | |
639 | <i class="icon-file"></i> |
|
639 | <i class="icon-file"></i> | |
640 | <span class="item"><a href="/example/changeset/80ead1899f50a894889e19ffeb49c9cebf5bf045">r8248:80ead1899f50</a></span> |
|
640 | <span class="item"><a href="/example/changeset/80ead1899f50a894889e19ffeb49c9cebf5bf045">r8248:80ead1899f50</a></span> | |
641 | <span class="item">1.2 KiB</span> |
|
641 | <span class="item">1.2 KiB</span> | |
642 | <span class="item last">text/x-python</span> |
|
642 | <span class="item last">text/x-python</span> | |
643 | <div class="buttons"> |
|
643 | <div class="buttons"> | |
644 | <a class="btn btn-mini" href="/example/changelog/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py"> |
|
644 | <a class="btn btn-mini" href="/example/changelog/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py"> | |
645 | <i class="icon-time"></i> history |
|
645 | <i class="icon-time"></i> history | |
646 | </a> |
|
646 | </a> | |
647 |
|
647 | |||
648 | <a class="btn btn-mini" href="/example/files/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">source</a> |
|
648 | <a class="btn btn-mini" href="/example/files/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">source</a> | |
649 | <a class="btn btn-mini" href="/example/raw/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">raw</a> |
|
649 | <a class="btn btn-mini" href="/example/raw/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">raw</a> | |
650 | <a class="btn btn-mini" href="/example/rawfile/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py"> |
|
650 | <a class="btn btn-mini" href="/example/rawfile/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py"> | |
651 | <i class="icon-archive"></i> download |
|
651 | <i class="icon-archive"></i> download | |
652 | </a> |
|
652 | </a> | |
653 | </div> |
|
653 | </div> | |
654 | </div> |
|
654 | </div> | |
655 | <div class="form"> |
|
655 | <div class="form"> | |
656 | <label for="set_mode">Editing file:</label> |
|
656 | <label for="set_mode">Editing file:</label> | |
657 | rhodecode / |
|
657 | rhodecode / | |
658 | <input type="text" name="filename" value="websetup.py"> |
|
658 | <input type="text" name="filename" value="websetup.py"> | |
659 |
|
659 | |||
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;"> |
|
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 | <option selected="selected" value="plain">plain</option> |
|
661 | <option selected="selected" value="plain">plain</option> | |
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> |
|
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 | <script> |
|
663 | <script> | |
664 | $(document).ready(function() { |
|
664 | $(document).ready(function() { | |
665 | $('#set_mode').select2({ |
|
665 | $('#set_mode').select2({ | |
666 | containerCssClass: 'drop-menu', |
|
666 | containerCssClass: 'drop-menu', | |
667 | dropdownCssClass: 'drop-menu-dropdown', |
|
667 | dropdownCssClass: 'drop-menu-dropdown', | |
668 | dropdownAutoWidth: true |
|
668 | dropdownAutoWidth: true | |
669 | }); |
|
669 | }); | |
670 | }); |
|
670 | }); | |
671 | </script> |
|
671 | </script> | |
672 |
|
672 | |||
673 | <label for="line_wrap">line wraps</label> |
|
673 | <label for="line_wrap">line wraps</label> | |
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;"> |
|
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 | <option value="on">on</option> |
|
675 | <option value="on">on</option> | |
676 | <option selected="selected" value="off">off</option> |
|
676 | <option selected="selected" value="off">off</option> | |
677 | </select> |
|
677 | </select> | |
678 | <script> |
|
678 | <script> | |
679 | $(document).ready(function() { |
|
679 | $(document).ready(function() { | |
680 | $('#line_wrap').select2({ |
|
680 | $('#line_wrap').select2({ | |
681 | containerCssClass: 'drop-menu', |
|
681 | containerCssClass: 'drop-menu', | |
682 | dropdownCssClass: 'drop-menu-dropdown', |
|
682 | dropdownCssClass: 'drop-menu-dropdown', | |
683 | dropdownAutoWidth: true, |
|
683 | dropdownAutoWidth: true, | |
684 | minimumResultsForSearch: -1 |
|
684 | minimumResultsForSearch: -1 | |
685 |
|
685 | |||
686 | }); |
|
686 | }); | |
687 | }); |
|
687 | }); | |
688 | </script> |
|
688 | </script> | |
689 |
|
689 | |||
690 | <div id="render_preview" class="btn btn-mini hidden disabled">Preview</div> |
|
690 | <div id="render_preview" class="btn btn-mini hidden disabled">Preview</div> | |
691 | </div> |
|
691 | </div> | |
692 | </div> |
|
692 | </div> | |
693 | <div id="editor_container"> |
|
693 | <div id="editor_container"> | |
694 | <pre id="editor_pre"></pre> |
|
694 | <pre id="editor_pre"></pre> | |
695 | <textarea id="editor" name="content" style="display: none;"># -*- coding: utf-8 -*- |
|
695 | <textarea id="editor" name="content" style="display: none;"># -*- coding: utf-8 -*- | |
696 |
|
696 | |||
697 | # Published under Commercial License. |
|
697 | # Published under Commercial License. | |
698 | # Read the full license text at https://rhodecode.com/licenses. |
|
698 | # Read the full license text at https://rhodecode.com/licenses. | |
699 | """ |
|
699 | """ | |
700 | rhodecode.websetup |
|
700 | rhodecode.websetup | |
701 | ~~~~~~~~~~~~~~~~~~ |
|
701 | ~~~~~~~~~~~~~~~~~~ | |
702 |
|
702 | |||
703 | Weboperations and setup for rhodecode |
|
703 | Weboperations and setup for rhodecode | |
704 |
|
704 | |||
705 | :created_on: Dec 11, 2010 |
|
705 | :created_on: Dec 11, 2010 | |
706 | :author: marcink |
|
706 | :author: marcink | |
707 | :copyright: (c) 2013-2015 RhodeCode GmbH. |
|
707 | :copyright: (c) 2013-2015 RhodeCode GmbH. | |
708 | :license: Commercial License, see LICENSE for more details. |
|
708 | :license: Commercial License, see LICENSE for more details. | |
709 | """ |
|
709 | """ | |
710 |
|
710 | |||
711 | import logging |
|
711 | import logging | |
712 |
|
712 | |||
713 | from rhodecode.config.environment import load_environment |
|
713 | from rhodecode.config.environment import load_environment | |
714 | from rhodecode.lib.db_manage import DbManage |
|
714 | from rhodecode.lib.db_manage import DbManage | |
715 | from rhodecode.model.meta import Session |
|
715 | from rhodecode.model.meta import Session | |
716 |
|
716 | |||
717 |
|
717 | |||
718 | log = logging.getLogger(__name__) |
|
718 | log = logging.getLogger(__name__) | |
719 |
|
719 | |||
720 |
|
720 | |||
721 | def setup_app(command, conf, vars): |
|
721 | def setup_app(command, conf, vars): | |
722 | """Place any commands to setup rhodecode here""" |
|
722 | """Place any commands to setup rhodecode here""" | |
723 | dbconf = conf['sqlalchemy.db1.url'] |
|
723 | dbconf = conf['sqlalchemy.db1.url'] | |
724 | dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'], |
|
724 | dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'], | |
725 | tests=False, cli_args=command.options.__dict__) |
|
725 | tests=False, cli_args=command.options.__dict__) | |
726 | dbmanage.create_tables(override=True) |
|
726 | dbmanage.create_tables(override=True) | |
727 | dbmanage.set_db_version() |
|
727 | dbmanage.set_db_version() | |
728 | opts = dbmanage.config_prompt(None) |
|
728 | opts = dbmanage.config_prompt(None) | |
729 | dbmanage.create_settings(opts) |
|
729 | dbmanage.create_settings(opts) | |
730 | dbmanage.create_default_user() |
|
730 | dbmanage.create_default_user() | |
731 | dbmanage.admin_prompt() |
|
731 | dbmanage.admin_prompt() | |
732 | dbmanage.create_permissions() |
|
732 | dbmanage.create_permissions() | |
733 | dbmanage.populate_default_permissions() |
|
733 | dbmanage.populate_default_permissions() | |
734 | Session().commit() |
|
734 | Session().commit() | |
735 | load_environment(conf.global_conf, conf.local_conf, initial=True) |
|
735 | load_environment(conf.global_conf, conf.local_conf, initial=True) | |
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> |
|
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 | <div id="editor_preview"></div> |
|
737 | <div id="editor_preview"></div> | |
738 | </div> |
|
738 | </div> | |
739 | <div class="message"> |
|
739 | <div class="message"> | |
740 | <label class="codeblock-label">Commit Message</label> |
|
740 | <label class="codeblock-label">Commit Message</label> | |
741 | <textarea id="commit" name="message" placeholder="Edited file rhodecode/websetup.py via RhodeCode"></textarea> |
|
741 | <textarea id="commit" name="message" placeholder="Edited file rhodecode/websetup.py via RhodeCode"></textarea> | |
742 | </div> |
|
742 | </div> | |
743 | </div> |
|
743 | </div> | |
744 |
|
744 | |||
745 |
|
745 | |||
746 |
|
746 | |||
747 |
|
747 | |||
748 |
|
748 | |||
749 |
|
749 | |||
750 | <!-- |
|
750 | <!-- | |
751 | Commit with comments |
|
751 | Commit with comments | |
752 | --> |
|
752 | --> | |
753 |
|
753 | |||
754 | <h2>Commit with comments</h2> |
|
754 | <h2>Commit with comments</h2> | |
755 |
|
755 | |||
756 | <div class="diff-container" id="diff-container-140360037209920"> |
|
756 | <div class="diff-container" id="diff-container-140360037209920"> | |
757 | <div id="c-4e5ee86997c6-7046e4320b26_target"></div> |
|
757 | <div id="c-4e5ee86997c6-7046e4320b26_target"></div> | |
758 | <div id="c-4e5ee86997c6-7046e4320b26" class="diffblock margined comm"> |
|
758 | <div id="c-4e5ee86997c6-7046e4320b26" class="diffblock margined comm"> | |
759 | <div class="code-header"> |
|
759 | <div class="code-header"> | |
760 | <div title="Go back to changed files overview"> |
|
760 | <div title="Go back to changed files overview"> | |
761 | <a href="#changes_box"> |
|
761 | <a href="#changes_box"> | |
762 | <i class="icon-circle-arrow-up"></i> |
|
762 | <i class="icon-circle-arrow-up"></i> | |
763 | </a> |
|
763 | </a> | |
764 | </div> |
|
764 | </div> | |
765 | <div class="changeset_header"> |
|
765 | <div class="changeset_header"> | |
766 | <div class="changeset_file"> |
|
766 | <div class="changeset_file"> | |
767 | <i class="icon-file"></i> |
|
767 | <i class="icon-file"></i> | |
768 | <a href="/andersonsantos/rhodecode-dev-fork/files/4e5ee86997c64981d85cf62283af448624e26929/rhodecode/tests/functional/test_compare_local.py">rhodecode/tests/functional/test_compare_local.py</a> |
|
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 | </div> |
|
769 | </div> | |
770 | <div class="diff-actions"> |
|
770 | <div class="diff-actions"> | |
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"> |
|
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 | <img class="icon" src="/images/icons/page_white_go.png"> |
|
772 | <img class="icon" src="/images/icons/page_white_go.png"> | |
773 | </a> |
|
773 | </a> | |
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"> |
|
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 | <img class="icon" src="/images/icons/application_double.png"> |
|
775 | <img class="icon" src="/images/icons/application_double.png"> | |
776 | </a> |
|
776 | </a> | |
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"> |
|
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 | <img class="icon" src="/images/icons/page_white.png"> |
|
778 | <img class="icon" src="/images/icons/page_white.png"> | |
779 | </a> |
|
779 | </a> | |
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"> |
|
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 | <img class="icon" src="/images/icons/page_save.png"> |
|
781 | <img class="icon" src="/images/icons/page_save.png"> | |
782 | </a> |
|
782 | </a> | |
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> |
|
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 | <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> |
|
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 | </div> |
|
785 | </div> | |
786 | <span> |
|
786 | <span> | |
787 | <label> |
|
787 | <label> | |
788 | Show inline comments |
|
788 | Show inline comments | |
789 | <input checked="checked" class="show-inline-comments" id="" id_for="c-4e5ee86997c6-7046e4320b26" name="" type="checkbox" value="1"> |
|
789 | <input checked="checked" class="show-inline-comments" id="" id_for="c-4e5ee86997c6-7046e4320b26" name="" type="checkbox" value="1"> | |
790 | </label> |
|
790 | </label> | |
791 | </span> |
|
791 | </span> | |
792 | </div> |
|
792 | </div> | |
793 | </div> |
|
793 | </div> | |
794 | <div class="code-body"> |
|
794 | <div class="code-body"> | |
795 | <div class="full_f_path" path="rhodecode/tests/functional/test_compare_local.py"></div> |
|
795 | <div class="full_f_path" path="rhodecode/tests/functional/test_compare_local.py"></div> | |
796 | <table class="code-difftable"> |
|
796 | <table class="code-difftable"> | |
797 | <tbody><tr class="line context"> |
|
797 | <tbody><tr class="line context"> | |
798 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td> |
|
798 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td> | |
799 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td> |
|
799 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td> | |
800 | <td class="code "> |
|
800 | <td class="code "> | |
801 | <pre>@@ -59,7 +59,7 @@ |
|
801 | <pre>@@ -59,7 +59,7 @@ | |
802 | </pre> |
|
802 | </pre> | |
803 | </td> |
|
803 | </td> | |
804 | </tr> |
|
804 | </tr> | |
805 | <tr class="line unmod"> |
|
805 | <tr class="line unmod"> | |
806 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o59" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o59">59</a></td> |
|
806 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o59" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o59">59</a></td> | |
807 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n59" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n59">59</a></td> |
|
807 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n59" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n59">59</a></td> | |
808 | <td class="code "> |
|
808 | <td class="code "> | |
809 | <pre> 'tag': 'v0.2.0', |
|
809 | <pre> 'tag': 'v0.2.0', | |
810 | </pre> |
|
810 | </pre> | |
811 | </td> |
|
811 | </td> | |
812 | </tr> |
|
812 | </tr> | |
813 | <tr class="line unmod"> |
|
813 | <tr class="line unmod"> | |
814 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o60" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o60">60</a></td> |
|
814 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o60" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o60">60</a></td> | |
815 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n60" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n60">60</a></td> |
|
815 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n60" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n60">60</a></td> | |
816 | <td class="code "> |
|
816 | <td class="code "> | |
817 | <pre> 'branch': 'default', |
|
817 | <pre> 'branch': 'default', | |
818 | </pre> |
|
818 | </pre> | |
819 | </td> |
|
819 | </td> | |
820 | </tr> |
|
820 | </tr> | |
821 | <tr class="line unmod"> |
|
821 | <tr class="line unmod"> | |
822 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o61" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o61">61</a></td> |
|
822 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o61" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o61">61</a></td> | |
823 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n61" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n61">61</a></td> |
|
823 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n61" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n61">61</a></td> | |
824 | <td class="code "> |
|
824 | <td class="code "> | |
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. |
|
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 | </pre> |
|
826 | </pre> | |
827 | </td> |
|
827 | </td> | |
828 | </tr> |
|
828 | </tr> | |
829 | <tr class="line del"> |
|
829 | <tr class="line del"> | |
830 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o62" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o62">62</a></td> |
|
830 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o62" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o62">62</a></td> | |
831 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td> |
|
831 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td> | |
832 | <td class="code "> |
|
832 | <td class="code "> | |
833 | <pre> '147 files changed: 5700 inserted, 10176 deleted' |
|
833 | <pre> '147 files changed: 5700 inserted, 10176 deleted' | |
834 | </pre> |
|
834 | </pre> | |
835 | </td> |
|
835 | </td> | |
836 | </tr> |
|
836 | </tr> | |
837 | <tr class="line add"> |
|
837 | <tr class="line add"> | |
838 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
838 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> | |
839 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n62" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n62">62</a></td> |
|
839 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n62" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n62">62</a></td> | |
840 | <td class="code "> |
|
840 | <td class="code "> | |
841 | <pre><ins> </ins> '147 files changed: 5700 inserted, 10176 deleted' |
|
841 | <pre><ins> </ins> '147 files changed: 5700 inserted, 10176 deleted' | |
842 | </pre> |
|
842 | </pre> | |
843 | </td> |
|
843 | </td> | |
844 | </tr> |
|
844 | </tr> | |
845 | <tr class="line unmod"> |
|
845 | <tr class="line unmod"> | |
846 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o63" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o63">63</a></td> |
|
846 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o63" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o63">63</a></td> | |
847 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n63" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n63">63</a></td> |
|
847 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n63" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n63">63</a></td> | |
848 | <td class="code "> |
|
848 | <td class="code "> | |
849 | <pre> }, |
|
849 | <pre> }, | |
850 | </pre> |
|
850 | </pre> | |
851 | </td> |
|
851 | </td> | |
852 | </tr> |
|
852 | </tr> | |
853 | <tr class="line unmod"> |
|
853 | <tr class="line unmod"> | |
854 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o64" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o64">64</a></td> |
|
854 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o64" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o64">64</a></td> | |
855 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n64" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n64">64</a></td> |
|
855 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n64" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n64">64</a></td> | |
856 | <td class="code "> |
|
856 | <td class="code "> | |
857 | <pre> 'git': { |
|
857 | <pre> 'git': { | |
858 | </pre> |
|
858 | </pre> | |
859 | </td> |
|
859 | </td> | |
860 | </tr> |
|
860 | </tr> | |
861 | <tr class="line unmod"> |
|
861 | <tr class="line unmod"> | |
862 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o65" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o65">65</a></td> |
|
862 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o65" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o65">65</a></td> | |
863 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n65" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n65">65</a></td> |
|
863 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n65" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n65">65</a></td> | |
864 | <td class="code "> |
|
864 | <td class="code "> | |
865 | <pre> 'tag': 'v0.2.2', |
|
865 | <pre> 'tag': 'v0.2.2', | |
866 | </pre> |
|
866 | </pre> | |
867 | </td> |
|
867 | </td> | |
868 | </tr> |
|
868 | </tr> | |
869 | <tr class="line context"> |
|
869 | <tr class="line context"> | |
870 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td> |
|
870 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td> | |
871 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td> |
|
871 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td> | |
872 | <td class="code "> |
|
872 | <td class="code "> | |
873 | <pre>@@ -77,9 +77,11 @@ |
|
873 | <pre>@@ -77,9 +77,11 @@ | |
874 | </pre> |
|
874 | </pre> | |
875 | </td> |
|
875 | </td> | |
876 | </tr> |
|
876 | </tr> | |
877 | <tr class="line unmod"> |
|
877 | <tr class="line unmod"> | |
878 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o77" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o77">77</a></td> |
|
878 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o77" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o77">77</a></td> | |
879 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n77" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n77">77</a></td> |
|
879 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n77" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n77">77</a></td> | |
880 | <td class="code "> |
|
880 | <td class="code "> | |
881 | <pre> target_ref=revisions[backend.alias]['tag'], |
|
881 | <pre> target_ref=revisions[backend.alias]['tag'], | |
882 | </pre> |
|
882 | </pre> | |
883 | </td> |
|
883 | </td> | |
884 | </tr> |
|
884 | </tr> | |
885 | <tr class="line unmod"> |
|
885 | <tr class="line unmod"> | |
886 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o78" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o78">78</a></td> |
|
886 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o78" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o78">78</a></td> | |
887 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n78" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n78">78</a></td> |
|
887 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n78" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n78">78</a></td> | |
888 | <td class="code "> |
|
888 | <td class="code "> | |
889 | <pre> )) |
|
889 | <pre> )) | |
890 | </pre> |
|
890 | </pre> | |
891 | </td> |
|
891 | </td> | |
892 | </tr><tr id="comment-tr-3754" class="inline-comments"><td></td><td></td><td> |
|
892 | </tr><tr id="comment-tr-3754" class="inline-comments"><td></td><td></td><td> | |
893 |
|
893 | |||
894 | <div class="comment" id="comment-3754" line="n78"> |
|
894 | <div class="comment" id="comment-3754" line="n78"> | |
895 | <div class="comment-wrapp"> |
|
895 | <div class="comment-wrapp"> | |
896 | <div class="meta"> |
|
896 | <div class="meta"> | |
897 | <span class="gravatar"> |
|
897 | <span class="gravatar"> | |
898 | <img src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&s=40" height="20" width="20"> |
|
898 | <img src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&s=40" height="20" width="20"> | |
899 | </span> |
|
899 | </span> | |
900 | <span class="user"> |
|
900 | <span class="user"> | |
901 | anderson |
|
901 | anderson | |
902 | </span> |
|
902 | </span> | |
903 | <span class="date"> |
|
903 | <span class="date"> | |
904 | just now | |
|
904 | just now | | |
905 | </span> |
|
905 | </span> | |
906 | <span class="status-change"> |
|
906 | <span class="status-change"> | |
907 | Comment on commit |
|
907 | Comment on commit | |
908 | </span> |
|
908 | </span> | |
909 | <a class="permalink" href="#comment-3754">ΒΆ</a> |
|
909 | <a class="permalink" href="#comment-3754">ΒΆ</a> | |
910 | </div> |
|
910 | </div> | |
911 | <div class="text"> |
|
911 | <div class="text"> | |
912 | <div class="rst-block"><p>commented line |
|
912 | <div class="rst-block"><p>commented line | |
913 | with multiple lines</p> |
|
913 | with multiple lines</p> | |
914 | </div> |
|
914 | </div> | |
915 | </div> |
|
915 | </div> | |
916 | </div> |
|
916 | </div> | |
917 | </div><div class="add-comment"><span class="btn btn-default">Add another comment</span></div> |
|
917 | </div><div class="add-comment"><span class="btn btn-default">Add another comment</span></div> | |
918 |
|
918 | |||
919 | </td></tr> |
|
919 | </td></tr> | |
920 | <tr class="line unmod"> |
|
920 | <tr class="line unmod"> | |
921 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o79" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o79">79</a></td> |
|
921 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o79" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o79">79</a></td> | |
922 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n79" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n79">79</a></td> |
|
922 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n79" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n79">79</a></td> | |
923 | <td class="code "> |
|
923 | <td class="code "> | |
924 | <pre></pre> |
|
924 | <pre></pre> | |
925 | </td> |
|
925 | </td> | |
926 | </tr> |
|
926 | </tr> | |
927 | <tr class="line del form-open hl-comment"> |
|
927 | <tr class="line del form-open hl-comment"> | |
928 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o80" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o80">80</a></td> |
|
928 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o80" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o80">80</a></td> | |
929 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td> |
|
929 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td> | |
930 | <td class="code "> |
|
930 | <td class="code "> | |
931 | <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del> |
|
931 | <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del> | |
932 | </pre> |
|
932 | </pre> | |
933 | </td> |
|
933 | </td> | |
934 | </tr><tr id="comment-tr-undefined" class="comment-form-inline"><td></td><td></td><td> |
|
934 | </tr><tr id="comment-tr-undefined" class="comment-form-inline"><td></td><td></td><td> | |
935 | <div class="comment-inline-form ac"> |
|
935 | <div class="comment-inline-form ac"> | |
936 | <div class="overlay"><div class="overlay-text">Submitting...</div></div> |
|
936 | <div class="overlay"><div class="overlay-text">Submitting...</div></div> | |
937 | <form action="#" class="inline-form" method="get"> |
|
937 | <form action="#" class="inline-form" method="get"> | |
938 | <div id="edit-container_o80" class="clearfix"> |
|
938 | <div id="edit-container_o80" class="clearfix"> | |
939 | <div class="comment-title pull-left"> |
|
939 | <div class="comment-title pull-left"> | |
940 | Commenting on line o80. |
|
940 | Commenting on line o80. | |
941 | </div> |
|
941 | </div> | |
942 | <div class="comment-help pull-right"> |
|
942 | <div class="comment-help pull-right"> | |
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. |
|
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 | </div> |
|
944 | </div> | |
945 | <div style="clear: both"></div> |
|
945 | <div style="clear: both"></div> | |
946 | <textarea id="text_o80" name="text" class="comment-block-ta ac-input" autocomplete="off"></textarea> |
|
946 | <textarea id="text_o80" name="text" class="comment-block-ta ac-input" autocomplete="off"></textarea> | |
947 | </div> |
|
947 | </div> | |
948 | <div id="preview-container_o80" class="clearfix" style="display: none;"> |
|
948 | <div id="preview-container_o80" class="clearfix" style="display: none;"> | |
949 | <div class="comment-help"> |
|
949 | <div class="comment-help"> | |
950 | Comment preview |
|
950 | Comment preview | |
951 | </div> |
|
951 | </div> | |
952 | <div id="preview-box_o80" class="preview-box"></div> |
|
952 | <div id="preview-box_o80" class="preview-box"></div> | |
953 | </div> |
|
953 | </div> | |
954 | <div class="comment-button pull-right"> |
|
954 | <div class="comment-button pull-right"> | |
955 | <input type="hidden" name="f_path" value="rhodecode/tests/functional/test_compare_local.py"> |
|
955 | <input type="hidden" name="f_path" value="rhodecode/tests/functional/test_compare_local.py"> | |
956 | <input type="hidden" name="line" value="o80"> |
|
956 | <input type="hidden" name="line" value="o80"> | |
957 | <div id="preview-btn_o80" class="btn btn-default">Preview</div> |
|
957 | <div id="preview-btn_o80" class="btn btn-default">Preview</div> | |
958 | <div id="edit-btn_o80" class="btn" style="display: none;">Edit</div> |
|
958 | <div id="edit-btn_o80" class="btn" style="display: none;">Edit</div> | |
959 | <input class="btn btn-success save-inline-form" id="save" name="save" type="submit" value="Comment"> |
|
959 | <input class="btn btn-success save-inline-form" id="save" name="save" type="submit" value="Comment"> | |
960 | </div> |
|
960 | </div> | |
961 | <div class="comment-button hide-inline-form-button"> |
|
961 | <div class="comment-button hide-inline-form-button"> | |
962 | <input class="btn hide-inline-form" id="hide-inline-form" name="hide-inline-form" type="reset" value="Cancel"> |
|
962 | <input class="btn hide-inline-form" id="hide-inline-form" name="hide-inline-form" type="reset" value="Cancel"> | |
963 | </div> |
|
963 | </div> | |
964 | </form> |
|
964 | </form> | |
965 | </div> |
|
965 | </div> | |
966 | </td></tr> |
|
966 | </td></tr> | |
967 | <tr class="line add"> |
|
967 | <tr class="line add"> | |
968 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
968 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> | |
969 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n80" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n80">80</a></td> |
|
969 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n80" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n80">80</a></td> | |
970 | <td class="code "> |
|
970 | <td class="code "> | |
971 | <pre> response.mustcontain('%s@%s' % ( |
|
971 | <pre> response.mustcontain('%s@%s' % ( | |
972 | </pre> |
|
972 | </pre> | |
973 | </td> |
|
973 | </td> | |
974 | </tr> |
|
974 | </tr> | |
975 | <tr class="line add"> |
|
975 | <tr class="line add"> | |
976 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
976 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> | |
977 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n81" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n81">81</a></td> |
|
977 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n81" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n81">81</a></td> | |
978 | <td class="code "> |
|
978 | <td class="code "> | |
979 | <pre> backend.repo_name, |
|
979 | <pre> backend.repo_name, | |
980 | </pre> |
|
980 | </pre> | |
981 | </td> |
|
981 | </td> | |
982 | </tr> |
|
982 | </tr> | |
983 | <tr class="line unmod"> |
|
983 | <tr class="line unmod"> | |
984 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o81" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o81">81</a></td> |
|
984 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o81" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o81">81</a></td> | |
985 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n82" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n82">82</a></td> |
|
985 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n82" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n82">82</a></td> | |
986 | <td class="code "> |
|
986 | <td class="code "> | |
987 | <pre> revisions[backend.alias]['branch'])) |
|
987 | <pre> revisions[backend.alias]['branch'])) | |
988 | </pre> |
|
988 | </pre> | |
989 | </td> |
|
989 | </td> | |
990 | </tr> |
|
990 | </tr> | |
991 | <tr class="line del"> |
|
991 | <tr class="line del"> | |
992 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o82" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o82">82</a></td> |
|
992 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o82" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o82">82</a></td> | |
993 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td> |
|
993 | <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td> | |
994 | <td class="code "> |
|
994 | <td class="code "> | |
995 | <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del> |
|
995 | <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del> | |
996 | </pre> |
|
996 | </pre> | |
997 | </td> |
|
997 | </td> | |
998 | </tr> |
|
998 | </tr> | |
999 | <tr class="line add"> |
|
999 | <tr class="line add"> | |
1000 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
1000 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> | |
1001 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n83" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n83">83</a></td> |
|
1001 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n83" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n83">83</a></td> | |
1002 | <td class="code "> |
|
1002 | <td class="code "> | |
1003 | <pre> response.mustcontain('%s@%s' % ( |
|
1003 | <pre> response.mustcontain('%s@%s' % ( | |
1004 | </pre> |
|
1004 | </pre> | |
1005 | </td> |
|
1005 | </td> | |
1006 | </tr> |
|
1006 | </tr> | |
1007 | <tr class="line add"> |
|
1007 | <tr class="line add"> | |
1008 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> |
|
1008 | <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td> | |
1009 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n84" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n84">84</a></td> |
|
1009 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n84" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n84">84</a></td> | |
1010 | <td class="code "> |
|
1010 | <td class="code "> | |
1011 | <pre> backend.repo_name, |
|
1011 | <pre> backend.repo_name, | |
1012 | </pre> |
|
1012 | </pre> | |
1013 | </td> |
|
1013 | </td> | |
1014 | </tr> |
|
1014 | </tr> | |
1015 | <tr class="line unmod"> |
|
1015 | <tr class="line unmod"> | |
1016 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o83" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o83">83</a></td> |
|
1016 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o83" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o83">83</a></td> | |
1017 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n85" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n85">85</a></td> |
|
1017 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n85" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n85">85</a></td> | |
1018 | <td class="code "> |
|
1018 | <td class="code "> | |
1019 | <pre> revisions[backend.alias]['tag'])) |
|
1019 | <pre> revisions[backend.alias]['tag'])) | |
1020 | </pre> |
|
1020 | </pre> | |
1021 | </td> |
|
1021 | </td> | |
1022 | </tr> |
|
1022 | </tr> | |
1023 | <tr class="line unmod"> |
|
1023 | <tr class="line unmod"> | |
1024 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o84" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o84">84</a></td> |
|
1024 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o84" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o84">84</a></td> | |
1025 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n86" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n86">86</a></td> |
|
1025 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n86" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n86">86</a></td> | |
1026 | <td class="code "> |
|
1026 | <td class="code "> | |
1027 | <pre> response.mustcontain(revisions[backend.alias]['response']) |
|
1027 | <pre> response.mustcontain(revisions[backend.alias]['response']) | |
1028 | </pre> |
|
1028 | </pre> | |
1029 | </td> |
|
1029 | </td> | |
1030 | </tr> |
|
1030 | </tr> | |
1031 | <tr class="line unmod"> |
|
1031 | <tr class="line unmod"> | |
1032 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o85" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o85">85</a></td> |
|
1032 | <td id="rhodecodetestsfunctionaltest_compare_localpy_o85" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o85">85</a></td> | |
1033 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n87" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n87">87</a></td> |
|
1033 | <td id="rhodecodetestsfunctionaltest_compare_localpy_n87" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n87">87</a></td> | |
1034 | <td class="code "> |
|
1034 | <td class="code "> | |
1035 | <pre></pre> |
|
1035 | <pre></pre> | |
1036 | </td> |
|
1036 | </td> | |
1037 | </tr> |
|
1037 | </tr> | |
1038 | </tbody></table> |
|
1038 | </tbody></table> | |
1039 | </div> |
|
1039 | </div> | |
1040 | </div> |
|
1040 | </div> | |
1041 | </div> |
|
1041 | </div> | |
1042 |
|
1042 | |||
1043 |
|
1043 | |||
1044 |
|
1044 | |||
1045 | <!-- |
|
1045 | <!-- | |
1046 | Side-by-side diff |
|
1046 | Side-by-side diff | |
1047 | --> |
|
1047 | --> | |
1048 |
|
1048 | |||
1049 | <h2>Side-by-side diff</h2> |
|
1049 | <h2>Side-by-side diff</h2> | |
1050 |
|
1050 | |||
1051 | <div class="box"> |
|
1051 | <div class="box"> | |
1052 | <div class="diff-container" style="overflow-x: hidden"> |
|
1052 | <div class="diff-container" style="overflow-x: hidden"> | |
1053 | <div class="diffblock comm" style="margin:3px; padding:1px"> |
|
1053 | <div class="diffblock comm" style="margin:3px; padding:1px"> | |
1054 | <div class="code-header"> |
|
1054 | <div class="code-header"> | |
1055 | <div class="changeset_header"> |
|
1055 | <div class="changeset_header"> | |
1056 | <div class="changeset_file"> |
|
1056 | <div class="changeset_file"> | |
1057 | <i class="icon-file"></i> |
|
1057 | <i class="icon-file"></i> | |
1058 | <a href="/pygments/files/ea295cfb622620f5ba13e226ec531e3fe5296399/tests/test_basic_api.py">tests/test_basic_api.py</a> |
|
1058 | <a href="/pygments/files/ea295cfb622620f5ba13e226ec531e3fe5296399/tests/test_basic_api.py">tests/test_basic_api.py</a> | |
1059 | [mode: <span id="selected_mode">python</span>] |
|
1059 | [mode: <span id="selected_mode">python</span>] | |
1060 | </div> |
|
1060 | </div> | |
1061 | <div class="diff-actions"> |
|
1061 | <div class="diff-actions"> | |
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"> |
|
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 | <img class="icon" src="/images/icons/page_white_go.png"> |
|
1063 | <img class="icon" src="/images/icons/page_white_go.png"> | |
1064 | </a> |
|
1064 | </a> | |
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"> |
|
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 | <img class="icon" src="/images/icons/application_double.png"> |
|
1066 | <img class="icon" src="/images/icons/application_double.png"> | |
1067 | </a> |
|
1067 | </a> | |
1068 | <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&diff=raw" class="tooltip" title="Raw diff"> |
|
1068 | <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&diff=raw" class="tooltip" title="Raw diff"> | |
1069 | <img class="icon" src="/images/icons/page_white.png"> |
|
1069 | <img class="icon" src="/images/icons/page_white.png"> | |
1070 | </a> |
|
1070 | </a> | |
1071 | <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&diff=download" class="tooltip" title="Download diff"> |
|
1071 | <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&diff=download" class="tooltip" title="Download diff"> | |
1072 | <img class="icon" src="/images/icons/page_save.png"> |
|
1072 | <img class="icon" src="/images/icons/page_save.png"> | |
1073 | </a> |
|
1073 | </a> | |
1074 | <label><input id="ignorews" name="ignorews" type="checkbox" value="1">ignore white space</label> |
|
1074 | <label><input id="ignorews" name="ignorews" type="checkbox" value="1">ignore white space</label> | |
1075 | <label><input id="edit_mode" name="edit_mode" type="checkbox" value="1">turn on edit mode</label> |
|
1075 | <label><input id="edit_mode" name="edit_mode" type="checkbox" value="1">turn on edit mode</label> | |
1076 |
|
1076 | |||
1077 | </div> |
|
1077 | </div> | |
1078 | <div style="float: right; padding: 0px 10px 0px 0px"> |
|
1078 | <div style="float: right; padding: 0px 10px 0px 0px"> | |
1079 | r1538:de45f950b669 ... r1539:ea295cfb6226 |
|
1079 | r1538:de45f950b669 ... r1539:ea295cfb6226 | |
1080 | </div> |
|
1080 | </div> | |
1081 | </div> |
|
1081 | </div> | |
1082 | </div> |
|
1082 | </div> | |
1083 | <div id="compare"></div> |
|
1083 | <div id="compare"></div> | |
1084 | </div> |
|
1084 | </div> | |
1085 | </div> |
|
1085 | </div> | |
1086 |
|
1086 | |||
1087 | <script> |
|
1087 | <script> | |
1088 | $(document).ready(function () { |
|
1088 | $(document).ready(function () { | |
1089 | var example_lines = '1\n2\n3\n4\n5\n6\n7\n8\n9\n \n'; |
|
1089 | var example_lines = '1\n2\n3\n4\n5\n6\n7\n8\n9\n \n'; | |
1090 |
|
1090 | |||
1091 | $('#compare').mergely({ |
|
1091 | $('#compare').mergely({ | |
1092 | width: 'auto', |
|
1092 | width: 'auto', | |
1093 | height: '600', |
|
1093 | height: '600', | |
1094 | fgcolor: {a:'#ddffdd',c:'#cccccc',d:'#ffdddd'}, |
|
1094 | fgcolor: {a:'#ddffdd',c:'#cccccc',d:'#ffdddd'}, | |
1095 | bgcolor: '#fff', |
|
1095 | bgcolor: '#fff', | |
1096 | viewport: true, |
|
1096 | viewport: true, | |
1097 | cmsettings: {mode: 'text/plain', readOnly: true, lineWrapping: false, lineNumbers: true}, |
|
1097 | cmsettings: {mode: 'text/plain', readOnly: true, lineWrapping: false, lineNumbers: true}, | |
1098 | lhs: function(setValue) { |
|
1098 | lhs: function(setValue) { | |
1099 | if("False" == "True"){ |
|
1099 | if("False" == "True"){ | |
1100 | setValue('Binary file') |
|
1100 | setValue('Binary file') | |
1101 | } |
|
1101 | } | |
1102 | else if("MercurialCommit" == "EmptyCommit"){ |
|
1102 | else if("MercurialCommit" == "EmptyCommit"){ | |
1103 | setValue(''); |
|
1103 | setValue(''); | |
1104 | } |
|
1104 | } | |
1105 | else{ |
|
1105 | else{ | |
1106 | var left_value = example_lines.slice(0, 10) + |
|
1106 | var left_value = example_lines.slice(0, 10) + | |
1107 | '123456789 '.repeat(10) + |
|
1107 | '123456789 '.repeat(10) + | |
1108 | '\n'+ |
|
1108 | '\n'+ | |
1109 | example_lines.slice(10, 20); |
|
1109 | example_lines.slice(10, 20); | |
1110 | setValue(left_value + example_lines.repeat(9)); |
|
1110 | setValue(left_value + example_lines.repeat(9)); | |
1111 | } |
|
1111 | } | |
1112 |
|
1112 | |||
1113 | }, |
|
1113 | }, | |
1114 | rhs: function(setValue) { |
|
1114 | rhs: function(setValue) { | |
1115 | if("False" == "True"){ |
|
1115 | if("False" == "True"){ | |
1116 | setValue('Binary file') |
|
1116 | setValue('Binary file') | |
1117 | } |
|
1117 | } | |
1118 | else if("MercurialCommit" == "EmptyCommit"){ |
|
1118 | else if("MercurialCommit" == "EmptyCommit"){ | |
1119 | setValue(''); |
|
1119 | setValue(''); | |
1120 | } |
|
1120 | } | |
1121 | else{ |
|
1121 | else{ | |
1122 | var right_value = example_lines + |
|
1122 | var right_value = example_lines + | |
1123 | example_lines.slice(0, 8) + |
|
1123 | example_lines.slice(0, 8) + | |
1124 | 'abcdefghi '.repeat(10) + |
|
1124 | 'abcdefghi '.repeat(10) + | |
1125 | '\n'+ |
|
1125 | '\n'+ | |
1126 | example_lines.slice(8, 20); |
|
1126 | example_lines.slice(8, 20); | |
1127 | setValue(right_value + example_lines.repeat(9)); |
|
1127 | setValue(right_value + example_lines.repeat(9)); | |
1128 | } |
|
1128 | } | |
1129 | }, |
|
1129 | }, | |
1130 | }); |
|
1130 | }); | |
1131 |
|
1131 | |||
1132 | var detected_mode = detectCodeMirrorModeFromExt('test_basic_api.py', true); |
|
1132 | var detected_mode = detectCodeMirrorModeFromExt('test_basic_api.py', true); | |
1133 | if(detected_mode){ |
|
1133 | if(detected_mode){ | |
1134 | setCodeMirrorMode($('#compare').mergely('cm', 'lhs'), detected_mode); |
|
1134 | setCodeMirrorMode($('#compare').mergely('cm', 'lhs'), detected_mode); | |
1135 | setCodeMirrorMode($('#compare').mergely('cm', 'rhs'), detected_mode); |
|
1135 | setCodeMirrorMode($('#compare').mergely('cm', 'rhs'), detected_mode); | |
1136 | $('#selected_mode').html(detected_mode); |
|
1136 | $('#selected_mode').html(detected_mode); | |
1137 | } |
|
1137 | } | |
1138 |
|
1138 | |||
1139 | $('#ignorews').change(function(e){ |
|
1139 | $('#ignorews').change(function(e){ | |
1140 | var val = e.currentTarget.checked; |
|
1140 | var val = e.currentTarget.checked; | |
1141 | $('#compare').mergely('options', {ignorews: val}); |
|
1141 | $('#compare').mergely('options', {ignorews: val}); | |
1142 | $('#compare').mergely('update'); |
|
1142 | $('#compare').mergely('update'); | |
1143 | }) |
|
1143 | }); | |
1144 | $('#edit_mode').change(function(e){ |
|
1144 | $('#edit_mode').change(function(e){ | |
1145 | var val = !e.currentTarget.checked; |
|
1145 | var val = !e.currentTarget.checked; | |
1146 | $('#compare').mergely('cm', 'lhs').setOption('readOnly', val); |
|
1146 | $('#compare').mergely('cm', 'lhs').setOption('readOnly', val); | |
1147 | $('#compare').mergely('cm', 'rhs').setOption('readOnly', val); |
|
1147 | $('#compare').mergely('cm', 'rhs').setOption('readOnly', val); | |
1148 | $('#compare').mergely('update'); |
|
1148 | $('#compare').mergely('update'); | |
1149 | }) |
|
1149 | }) | |
1150 | }); |
|
1150 | }); | |
1151 | </script> |
|
1151 | </script> | |
1152 |
|
1152 | |||
1153 | </div> |
|
1153 | </div> | |
1154 |
|
1154 | |||
1155 | <!-- end examples --> |
|
1155 | <!-- end examples --> | |
1156 |
|
1156 | |||
1157 | </div> |
|
1157 | </div> | |
1158 | </div> |
|
1158 | </div> | |
1159 | </div> |
|
1159 | </div> | |
1160 | </%def> |
|
1160 | </%def> |
@@ -1,545 +1,545 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/debug_style/index.html"/> |
|
2 | <%inherit file="/debug_style/index.html"/> | |
3 |
|
3 | |||
4 | <%def name="breadcrumbs_links()"> |
|
4 | <%def name="breadcrumbs_links()"> | |
5 | ${h.link_to(_('Style'), h.url('debug_style_home'))} |
|
5 | ${h.link_to(_('Style'), h.url('debug_style_home'))} | |
6 | » |
|
6 | » | |
7 | ${c.active} |
|
7 | ${c.active} | |
8 | </%def> |
|
8 | </%def> | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | <%def name="real_main()"> |
|
11 | <%def name="real_main()"> | |
12 | <div class="box"> |
|
12 | <div class="box"> | |
13 | <div class="title"> |
|
13 | <div class="title"> | |
14 | ${self.breadcrumbs()} |
|
14 | ${self.breadcrumbs()} | |
15 | </div> |
|
15 | </div> | |
16 |
|
16 | |||
17 | <div class='sidebar-col-wrapper'> |
|
17 | <div class='sidebar-col-wrapper'> | |
18 | ##main |
|
18 | ##main | |
19 | ${self.sidebar()} |
|
19 | ${self.sidebar()} | |
20 |
|
20 | |||
21 | <div class="main-content"> |
|
21 | <div class="main-content"> | |
22 |
|
22 | |||
23 | <div style="opacity:.5"> |
|
23 | <div style="opacity:.5"> | |
24 |
|
24 | |||
25 | <h2>Simple tables</h2> |
|
25 | <h2>Simple tables</h2> | |
26 |
|
26 | |||
27 | <p>These styles will be adjusted later to provide a baseline style |
|
27 | <p>These styles will be adjusted later to provide a baseline style | |
28 | for all tables without classes added, whether part of the |
|
28 | for all tables without classes added, whether part of the | |
29 | application or not. Currently, some of the |
|
29 | application or not. Currently, some of the | |
30 | application-specific styles are applied to this table.</p> |
|
30 | application-specific styles are applied to this table.</p> | |
31 | <p>This is a baseline style for all tables, whether part of the |
|
31 | <p>This is a baseline style for all tables, whether part of the | |
32 | application or not. It has no class applied for styling. Use |
|
32 | application or not. It has no class applied for styling. Use | |
33 | the "rctable" class as outlined before for tables which are |
|
33 | the "rctable" class as outlined before for tables which are | |
34 | part of the RhodeCode application.</p> |
|
34 | part of the RhodeCode application.</p> | |
35 | <table> |
|
35 | <table> | |
36 | <tbody> |
|
36 | <tbody> | |
37 | <tr> |
|
37 | <tr> | |
38 | <th>Header A</th> |
|
38 | <th>Header A</th> | |
39 | <th>Header B</th> |
|
39 | <th>Header B</th> | |
40 | <th>Header C</th> |
|
40 | <th>Header C</th> | |
41 | <th>Header D</th> |
|
41 | <th>Header D</th> | |
42 | </tr> |
|
42 | </tr> | |
43 | <tr> |
|
43 | <tr> | |
44 | <td>Content of col A</td> |
|
44 | <td>Content of col A</td> | |
45 | <td>Content of col B</td> |
|
45 | <td>Content of col B</td> | |
46 | <td>Content of col C</td> |
|
46 | <td>Content of col C</td> | |
47 | <td>Content of col D</td> |
|
47 | <td>Content of col D</td> | |
48 | </tr> |
|
48 | </tr> | |
49 | <tr> |
|
49 | <tr> | |
50 | <td>Content of col A</td> |
|
50 | <td>Content of col A</td> | |
51 | <td>Content of col B</td> |
|
51 | <td>Content of col B</td> | |
52 | <td>Content of col C</td> |
|
52 | <td>Content of col C</td> | |
53 | <td>Content of col D</td> |
|
53 | <td>Content of col D</td> | |
54 | </tr> |
|
54 | </tr> | |
55 | <tr> |
|
55 | <tr> | |
56 | <td>Content of col A</td> |
|
56 | <td>Content of col A</td> | |
57 | <td>Content of col B</td> |
|
57 | <td>Content of col B</td> | |
58 | <td>Content of col C</td> |
|
58 | <td>Content of col C</td> | |
59 | <td>Content of col D</td> |
|
59 | <td>Content of col D</td> | |
60 | </tr> |
|
60 | </tr> | |
61 | <tr> |
|
61 | <tr> | |
62 | <td>Content of col A</td> |
|
62 | <td>Content of col A</td> | |
63 | <td>Content of col B</td> |
|
63 | <td>Content of col B</td> | |
64 | <td>Content of col C</td> |
|
64 | <td>Content of col C</td> | |
65 | <td>Content of col D</td> |
|
65 | <td>Content of col D</td> | |
66 | </tr> |
|
66 | </tr> | |
67 | </tbody> |
|
67 | </tbody> | |
68 | </table> |
|
68 | </table> | |
69 | </div> |
|
69 | </div> | |
70 |
|
70 | |||
71 |
|
71 | |||
72 |
|
72 | |||
73 |
|
73 | |||
74 | <h2>RC application table with examples</h2> |
|
74 | <h2>RC application table with examples</h2> | |
75 |
|
75 | |||
76 | <p>This is a standard table which applies the rhodecode-specific styling to be used |
|
76 | <p>This is a standard table which applies the rhodecode-specific styling to be used | |
77 | throughout the application; it has <code><table class="rctable"></code>. |
|
77 | throughout the application; it has <code><table class="rctable"></code>. | |
78 | <br/> |
|
78 | <br/> | |
79 | By default, table data is not truncated, and wraps inside of the <code><td> |
|
79 | By default, table data is not truncated, and wraps inside of the <code><td> | |
80 | ;</code>. To prevent wrapping and contain data on one line, use the <code>< |
|
80 | ;</code>. To prevent wrapping and contain data on one line, use the <code>< | |
81 | class="truncate-wrap"></code> on the <code><td></code>, and <code>span |
|
81 | class="truncate-wrap"></code> on the <code><td></code>, and <code>span | |
82 | class="truncate"</code> around the specific data to be truncated. |
|
82 | class="truncate"</code> around the specific data to be truncated. | |
83 | </p> |
|
83 | </p> | |
84 | <p> |
|
84 | <p> | |
85 | Ellipsis is added via CSS. Please always add a row of headers using <code><th |
|
85 | Ellipsis is added via CSS. Please always add a row of headers using <code><th | |
86 | ></code> to the top of a table. |
|
86 | ></code> to the top of a table. | |
87 | </p> |
|
87 | </p> | |
88 |
|
88 | |||
89 | ## TODO: johbo: in case we have more tables with examples, we should |
|
89 | ## TODO: johbo: in case we have more tables with examples, we should | |
90 | ## create a generic class here. |
|
90 | ## create a generic class here. | |
91 | <table class="rctable issuetracker"> |
|
91 | <table class="rctable issuetracker"> | |
92 | <thead> |
|
92 | <thead> | |
93 | <tr> |
|
93 | <tr> | |
94 | <th>Header A</th> |
|
94 | <th>Header A</th> | |
95 | <th>Header B</th> |
|
95 | <th>Header B</th> | |
96 | <th>Header C</th> |
|
96 | <th>Header C</th> | |
97 | <th>Header D</th> |
|
97 | <th>Header D</th> | |
98 | </tr> |
|
98 | </tr> | |
99 | </thead> |
|
99 | </thead> | |
100 | <tbody> |
|
100 | <tbody> | |
101 | <tr> |
|
101 | <tr> | |
102 | <td class="issue-tracker-example"> |
|
102 | <td class="issue-tracker-example"> | |
103 | Example of col A |
|
103 | Example of col A | |
104 | </td> |
|
104 | </td> | |
105 | <td class="issue-tracker-example"> |
|
105 | <td class="issue-tracker-example"> | |
106 | Example of col B |
|
106 | Example of col B | |
107 | </td> |
|
107 | </td> | |
108 | <td class="issue-tracker-example"> |
|
108 | <td class="issue-tracker-example"> | |
109 | Example of col C |
|
109 | Example of col C | |
110 | </td> |
|
110 | </td> | |
111 | <td class="issue-tracker-example"> |
|
111 | <td class="issue-tracker-example"> | |
112 | Example of col D |
|
112 | Example of col D | |
113 | </td> |
|
113 | </td> | |
114 | </tr> |
|
114 | </tr> | |
115 | <tr> |
|
115 | <tr> | |
116 | <td>Content of col A</td> |
|
116 | <td>Content of col A</td> | |
117 | <td>Content of col B</td> |
|
117 | <td>Content of col B</td> | |
118 | <td>Content of col C which is very long and will not be |
|
118 | <td>Content of col C which is very long and will not be | |
119 | truncated because sometimes people just want to write |
|
119 | truncated because sometimes people just want to write | |
120 | really, really long commit messages which explain what |
|
120 | really, really long commit messages which explain what | |
121 | they did in excruciating detail and you really, really |
|
121 | they did in excruciating detail and you really, really | |
122 | want to read them.</td> |
|
122 | want to read them.</td> | |
123 | <td>Content of col D</td> |
|
123 | <td>Content of col D</td> | |
124 | </tr> |
|
124 | </tr> | |
125 | <tr> |
|
125 | <tr> | |
126 | <td>Content of col A</td> |
|
126 | <td>Content of col A</td> | |
127 | <td>Content of col B</td> |
|
127 | <td>Content of col B</td> | |
128 | <td>Content of col C</td> |
|
128 | <td>Content of col C</td> | |
129 | <td class="truncate-wrap"><span class="truncate">Truncated |
|
129 | <td class="truncate-wrap"><span class="truncate">Truncated | |
130 | content of column D truncate truncate truncatetruncate |
|
130 | content of column D truncate truncate truncatetruncate | |
131 | truncate truncate</span></td> |
|
131 | truncate truncate</span></td> | |
132 | </tr> |
|
132 | </tr> | |
133 | </tbody> |
|
133 | </tbody> | |
134 | </table> |
|
134 | </table> | |
135 |
|
135 | |||
136 | <h2>RC application table data classes</h2> |
|
136 | <h2>RC application table data classes</h2> | |
137 |
|
137 | |||
138 | <p>The following tables contain documentation of all existing table data classes. |
|
138 | <p>The following tables contain documentation of all existing table data classes. | |
139 | Please update when new classes are made. |
|
139 | Please update when new classes are made. | |
140 | </p> |
|
140 | </p> | |
141 | <table class="rctable examples"> |
|
141 | <table class="rctable examples"> | |
142 | <thead> |
|
142 | <thead> | |
143 | <tr> |
|
143 | <tr> | |
144 | <th>Class</th> |
|
144 | <th>Class</th> | |
145 | <th>Description</th> |
|
145 | <th>Description</th> | |
146 | <th>Example</th> |
|
146 | <th>Example</th> | |
147 | </tr> |
|
147 | </tr> | |
148 | </thead> |
|
148 | </thead> | |
149 | <tbody> |
|
149 | <tbody> | |
150 | <td>td-user</td> |
|
150 | <td>td-user</td> | |
151 | <td>Any username/gravatar combination (see also Icons style).</td> |
|
151 | <td>Any username/gravatar combination (see also Icons style).</td> | |
152 | <td class="td-user author"> |
|
152 | <td class="td-user author"> | |
153 | <img class="gravatar" alt="gravatar" src="https://secure.gravatar.com/avatar/0c9a7e6674b6f0b35d98dbe073e3f0ab?d=identicon&s=32" height="16" width="16"> |
|
153 | <img class="gravatar" alt="gravatar" src="https://secure.gravatar.com/avatar/0c9a7e6674b6f0b35d98dbe073e3f0ab?d=identicon&s=32" height="16" width="16"> | |
154 | <span title="Oliver Strobel <oliver@rhodecode.com>" class="user">ostrobel (Oliver Strobel)</span> |
|
154 | <span title="Oliver Strobel <oliver@rhodecode.com>" class="user">ostrobel (Oliver Strobel)</span> | |
155 | </td> |
|
155 | </td> | |
156 | </tr> |
|
156 | </tr> | |
157 | <tr> |
|
157 | <tr> | |
158 | <td>td-hash</td> |
|
158 | <td>td-hash</td> | |
159 | <td>Any hash; a commit, revision, etc. Use <code><pre></code> and header 'Commit'</td> |
|
159 | <td>Any hash; a commit, revision, etc. Use <code><pre></code> and header 'Commit'</td> | |
160 | <td class="td-commit"> |
|
160 | <td class="td-commit"> | |
161 | <pre><a href="/anothercpythonforkkkk/files/8d6b27837c6979983b037693fe975cdbb761b500/">r93699:8d6b27837c69</a></pre> |
|
161 | <pre><a href="/anothercpythonforkkkk/files/8d6b27837c6979983b037693fe975cdbb761b500/">r93699:8d6b27837c69</a></pre> | |
162 | </td> |
|
162 | </td> | |
163 | </tr> |
|
163 | </tr> | |
164 | <tr> |
|
164 | <tr> | |
165 | <td>td-rss</td> |
|
165 | <td>td-rss</td> | |
166 | <td>RSS feed link icon</td> |
|
166 | <td>RSS feed link icon</td> | |
167 | <td class="td-rss"> |
|
167 | <td class="td-rss"> | |
168 | <a title="Subscribe to rss feed" href="/feed/rss"><i class="icon-rss-sign"></i></a> |
|
168 | <a title="Subscribe to rss feed" href="/feed/rss"><i class="icon-rss-sign"></i></a> | |
169 | </td> |
|
169 | </td> | |
170 | </tr> |
|
170 | </tr> | |
171 | <tr> |
|
171 | <tr> | |
172 | <td>td-componentname</td> |
|
172 | <td>td-componentname</td> | |
173 | <td>Any group, file, gist, or directory name.</td> |
|
173 | <td>Any group, file, gist, or directory name.</td> | |
174 | <td class="td-componentname"> |
|
174 | <td class="td-componentname"> | |
175 | <a href="/cpythonfork"> |
|
175 | <a href="/cpythonfork"> | |
176 | <span title="Mercurial repository"><i class="icon-hg"></i></span> |
|
176 | <span title="Mercurial repository"><i class="icon-hg"></i></span> | |
177 | <i class="icon-unlock-alt" title="Public repository"></i> |
|
177 | <i class="icon-unlock-alt" title="Public repository"></i> | |
178 | rhodecode-dev-restyle-fork |
|
178 | rhodecode-dev-restyle-fork | |
179 | </a> |
|
179 | </a> | |
180 | </td> |
|
180 | </td> | |
181 | </tr> |
|
181 | </tr> | |
182 | <tr> |
|
182 | <tr> | |
183 | <td>td-tags</td> |
|
183 | <td>td-tags</td> | |
184 | <td>Any cell containing tags, including branches and bookmarks.</td> |
|
184 | <td>Any cell containing tags, including branches and bookmarks.</td> | |
185 | <td class="td-tags"> |
|
185 | <td class="td-tags"> | |
186 | <span class="branchtag tag" title="Branch default"> |
|
186 | <span class="branchtag tag" title="Branch default"> | |
187 | <a href="/rhodecode-dev-restyle- fork/changelog?branch=default"><i class="icon-code-fork"></i>default</a> |
|
187 | <a href="/rhodecode-dev-restyle- fork/changelog?branch=default"><i class="icon-code-fork"></i>default</a> | |
188 | </span> |
|
188 | </span> | |
189 | </td> |
|
189 | </td> | |
190 | </tr> |
|
190 | </tr> | |
191 | <tr> |
|
191 | <tr> | |
192 | <td>tags-truncate</td> |
|
192 | <td>tags-truncate</td> | |
193 | <td>Used to truncate a cell containing tags; avoid if possible.</td> |
|
193 | <td>Used to truncate a cell containing tags; avoid if possible.</td> | |
194 | <td class="td-tags truncate-wrap"> |
|
194 | <td class="td-tags truncate-wrap"> | |
195 | <div class="truncate tags-truncate"> |
|
195 | <div class="truncate tags-truncate"> | |
196 | <div class="autoexpand"> |
|
196 | <div class="autoexpand"> | |
197 | <span class="tagtag tag" title="Tag tip"> |
|
197 | <span class="tagtag tag" title="Tag tip"> | |
198 | <a href="/rhodecode-dev-restyle-fork/files/e519d5a0e71466d27257ddff921c4a13c540408e/"><i class="icon-tag"></i>tip</a> |
|
198 | <a href="/rhodecode-dev-restyle-fork/files/e519d5a0e71466d27257ddff921c4a13c540408e/"><i class="icon-tag"></i>tip</a> | |
199 | </span> |
|
199 | </span> | |
200 | <span class="branchtag tag" title="Branch default"> |
|
200 | <span class="branchtag tag" title="Branch default"> | |
201 | <a href="/rhodecode-dev-restyle-fork/changelog?branch=default"><i class="icon-code-fork"></i>default</a> |
|
201 | <a href="/rhodecode-dev-restyle-fork/changelog?branch=default"><i class="icon-code-fork"></i>default</a> | |
202 | </span> |
|
202 | </span> | |
203 | <span class="branchtag tag" title="Branch default"> |
|
203 | <span class="branchtag tag" title="Branch default"> | |
204 | <a href="/rhodecode-dev-restyle-fork/changelog?branch=default"><i class="icon-code-fork"></i>default</a> |
|
204 | <a href="/rhodecode-dev-restyle-fork/changelog?branch=default"><i class="icon-code-fork"></i>default</a> | |
205 | </span> |
|
205 | </span> | |
206 | </div> |
|
206 | </div> | |
207 | </div> |
|
207 | </div> | |
208 | </td> |
|
208 | </td> | |
209 | </tr> |
|
209 | </tr> | |
210 | <tr> |
|
210 | <tr> | |
211 | <td>td-ip</td> |
|
211 | <td>td-ip</td> | |
212 | <td>Any ip address.</td> |
|
212 | <td>Any ip address.</td> | |
213 | <td class="td-ip"> |
|
213 | <td class="td-ip"> | |
214 | 172.16.115.168 |
|
214 | 172.16.115.168 | |
215 | </td> |
|
215 | </td> | |
216 | </tr> |
|
216 | </tr> | |
217 | <tr> |
|
217 | <tr> | |
218 | <td>td-type</td> |
|
218 | <td>td-type</td> | |
219 | <td>A state or an auth type.</td> |
|
219 | <td>A state or an auth type.</td> | |
220 | <td class="td-type"> |
|
220 | <td class="td-type"> | |
221 | rhodecode |
|
221 | rhodecode | |
222 | </td> |
|
222 | </td> | |
223 | </tr> |
|
223 | </tr> | |
224 | <tr> |
|
224 | <tr> | |
225 | <td>td-authtoken</td> |
|
225 | <td>td-authtoken</td> | |
226 | <td>For auth tokens. Use truncate classes for hover expand; see html.</td> |
|
226 | <td>For auth tokens. Use truncate classes for hover expand; see html.</td> | |
227 | <td class="truncate-wrap td-authtoken"> |
|
227 | <td class="truncate-wrap td-authtoken"> | |
228 | <div class="truncate autoexpand"> |
|
228 | <div class="truncate autoexpand"> | |
229 | <code>688df65b87d3ad16ae9f8fc6338a551d40f41c7a</code> |
|
229 | <code>688df65b87d3ad16ae9f8fc6338a551d40f41c7a</code> | |
230 | </div> |
|
230 | </div> | |
231 | </td> |
|
231 | </td> | |
232 | </tr> |
|
232 | </tr> | |
233 | <tr> |
|
233 | <tr> | |
234 | <td>td-action</td> |
|
234 | <td>td-action</td> | |
235 | <td>Buttons which perform an action.</td> |
|
235 | <td>Buttons which perform an action.</td> | |
236 | <td class="td-action"> |
|
236 | <td class="td-action"> | |
237 | <div class="grid_edit"> |
|
237 | <div class="grid_edit"> | |
238 | <a href="/_admin/users/2/edit" title="edit"> |
|
238 | <a href="/_admin/users/2/edit" title="edit"> | |
239 | <i class="icon-pencil"></i>Edit</a> |
|
239 | <i class="icon-pencil"></i>Edit</a> | |
240 | </div> |
|
240 | </div> | |
241 | <div class="grid_delete"> |
|
241 | <div class="grid_delete"> | |
242 | <form action="/_admin/users/2" method="post"> |
|
242 | <form action="/_admin/users/2" method="post"> | |
243 | <i class="icon-remove-sign"></i> |
|
243 | <i class="icon-remove-sign"></i> | |
244 | <input class="btn btn-danger btn-link" id="remove_user_2" name="remove_" type="submit" value="delete"> |
|
244 | <input class="btn btn-danger btn-link" id="remove_user_2" name="remove_" type="submit" value="delete"> | |
245 | </form> |
|
245 | </form> | |
246 | </div> |
|
246 | </div> | |
247 | </td> |
|
247 | </td> | |
248 | </tr> |
|
248 | </tr> | |
249 | <tr> |
|
249 | <tr> | |
250 | <td>td-radio</td> |
|
250 | <td>td-radio</td> | |
251 | <td>Radio buttons for a form. Centers element.</td> |
|
251 | <td>Radio buttons for a form. Centers element.</td> | |
252 | <td class="td-radio"> |
|
252 | <td class="td-radio"> | |
253 | <input type="radio" checked="checked" value="" name="1" id="read"></td> |
|
253 | <input type="radio" checked="checked" value="" name="1" id="read"></td> | |
254 | </tr> |
|
254 | </tr> | |
255 | <tr> |
|
255 | <tr> | |
256 | <td>td-checkbox</td> |
|
256 | <td>td-checkbox</td> | |
257 | <td>Checkbox for a form. Centers element.</td> |
|
257 | <td>Checkbox for a form. Centers element.</td> | |
258 | <td class="td-checkbox"> |
|
258 | <td class="td-checkbox"> | |
259 | <input type="checkbox" checked="checked" value="" name="1" id="read"></td> |
|
259 | <input type="checkbox" checked="checked" value="" name="1" id="read"></td> | |
260 | </tr> |
|
260 | </tr> | |
261 | <tr> |
|
261 | <tr> | |
262 | <tr> |
|
262 | <tr> | |
263 | <td>td-buttons</td> |
|
263 | <td>td-buttons</td> | |
264 | <td>Buttons.</td> |
|
264 | <td>Buttons.</td> | |
265 | <td class="td-buttons"> |
|
265 | <td class="td-buttons"> | |
266 | <span class="btn btn-mini btn-primary">feed access</span> |
|
266 | <span class="btn btn-mini btn-primary">feed access</span> | |
267 | </td> |
|
267 | </td> | |
268 | </tr> |
|
268 | </tr> | |
269 | <tr> |
|
269 | <tr> | |
270 | <td>td-compare</td> |
|
270 | <td>td-compare</td> | |
271 | <td>Radio buttons to compare commits.</td> |
|
271 | <td>Radio buttons to compare commits.</td> | |
272 | <td class=" td-compare"> |
|
272 | <td class=" td-compare"> | |
273 | <input class="compare-radio-button" type="radio" name="compare_source" value="2.0"> |
|
273 | <input class="compare-radio-button" type="radio" name="compare_source" value="2.0"> | |
274 | <input class="compare-radio-button" type="radio" name="compare_target" value="2.0"> |
|
274 | <input class="compare-radio-button" type="radio" name="compare_target" value="2.0"> | |
275 | </td> |
|
275 | </td> | |
276 | </tr> |
|
276 | </tr> | |
277 | <tr> |
|
277 | <tr> | |
278 | <td>td-comments</td> |
|
278 | <td>td-comments</td> | |
279 | <td>Comments indicator icon.</td> |
|
279 | <td>Comments indicator icon.</td> | |
280 | <td> |
|
280 | <td> | |
281 | <i class="icon-comment"></i> 0 |
|
281 | <i class="icon-comment"></i> 0 | |
282 | </td> |
|
282 | </td> | |
283 | </tr> |
|
283 | </tr> | |
284 | <tr> |
|
284 | <tr> | |
285 | <td>td-status</td> |
|
285 | <td>td-status</td> | |
286 | <td>Status indicator icon.</td> |
|
286 | <td>Status indicator icon.</td> | |
287 | <td class="td-description"> |
|
287 | <td class="td-description"> | |
288 | <div class="flag_status under_review pull-left"></div> |
|
288 | <div class="flag_status under_review pull-left"></div> | |
289 | </td> |
|
289 | </td> | |
290 | </tr> |
|
290 | </tr> | |
291 | </tbody> |
|
291 | </tbody> | |
292 | </table> |
|
292 | </table> | |
293 | <table class="dataTable rctable examples"> |
|
293 | <table class="dataTable rctable examples"> | |
294 | <tbody> |
|
294 | <tbody> | |
295 | <tr> |
|
295 | <tr> | |
296 | <td>quick_repo_menu</td> |
|
296 | <td>quick_repo_menu</td> | |
297 | <td>Hidden menu generated by dataTable.</td> |
|
297 | <td>Hidden menu generated by dataTable.</td> | |
298 | <td class="quick_repo_menu"> |
|
298 | <td class="quick_repo_menu"> | |
299 | <i class="pointer icon-more"></i> |
|
299 | <i class="pointer icon-more"></i> | |
300 | <div class="menu_items_container" style="display: none;"> |
|
300 | <div class="menu_items_container" style="display: none;"> | |
301 | <ul class="menu_items"> |
|
301 | <ul class="menu_items"> | |
302 | <li> |
|
302 | <li> | |
303 | <a title="Summary" href="/anothercpythonforkkkk-fork"> |
|
303 | <a title="Summary" href="/anothercpythonforkkkk-fork"> | |
304 | <span>Summary</span> |
|
304 | <span>Summary</span> | |
305 | </a> |
|
305 | </a> | |
306 | </li> |
|
306 | </li> | |
307 | <li> |
|
307 | <li> | |
308 | <a title="Changelog" href="/anothercpythonforkkkk-fork/changelog"> |
|
308 | <a title="Changelog" href="/anothercpythonforkkkk-fork/changelog"> | |
309 | <span>Changelog</span> |
|
309 | <span>Changelog</span> | |
310 | </a> |
|
310 | </a> | |
311 | </li> |
|
311 | </li> | |
312 | <li> |
|
312 | <li> | |
313 | <a title="Files" href="/anothercpythonforkkkk-fork/files/tip/"> |
|
313 | <a title="Files" href="/anothercpythonforkkkk-fork/files/tip/"> | |
314 | <span>Files</span> |
|
314 | <span>Files</span> | |
315 | </a> |
|
315 | </a> | |
316 | </li> |
|
316 | </li> | |
317 | <li> |
|
317 | <li> | |
318 | <a title="Fork" href="/anothercpythonforkkkk-fork/fork"> |
|
318 | <a title="Fork" href="/anothercpythonforkkkk-fork/fork"> | |
319 | <span>Fork</span> |
|
319 | <span>Fork</span> | |
320 | </a> |
|
320 | </a> | |
321 | </li> |
|
321 | </li> | |
322 | </ul> |
|
322 | </ul> | |
323 | </div> |
|
323 | </div> | |
324 | </td> |
|
324 | </td> | |
325 | <td></td> |
|
325 | <td></td> | |
326 | </tr> |
|
326 | </tr> | |
327 | </tbody> |
|
327 | </tbody> | |
328 | </table> |
|
328 | </table> | |
329 | <script>quick_repo_menu();</script> |
|
329 | <script>quick_repo_menu();</script> | |
330 | <table class="rctable examples"> |
|
330 | <table class="rctable examples"> | |
331 | <tbody> |
|
331 | <tbody> | |
332 | <tr> |
|
332 | <tr> | |
333 | <td>td-description</td> |
|
333 | <td>td-description</td> | |
334 | <td>Any description. They may be rather long, and using the expand_commit outlined below is recommended.</td> |
|
334 | <td>Any description. They may be rather long, and using the expand_commit outlined below is recommended.</td> | |
335 | <td class="td-description"> |
|
335 | <td class="td-description"> | |
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. |
|
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 | </td> |
|
337 | </td> | |
338 | </tr> |
|
338 | </tr> | |
339 | </tbody> |
|
339 | </tbody> | |
340 | </table> |
|
340 | </table> | |
341 | <table id="changesets" class="rctable examples end"> |
|
341 | <table id="changesets" class="rctable examples end"> | |
342 | <tbody> |
|
342 | <tbody> | |
343 | <tr> |
|
343 | <tr> | |
344 | <td>expand_commit</td> |
|
344 | <td>expand_commit</td> | |
345 | <td>Expands a long message; see html+js.</td> |
|
345 | <td>Expands a long message; see html+js.</td> | |
346 | <td class="expand_commit" data-commit-id="2ffc6faabc7a9c790b1b452943a3f0c047b8b436" title="Expand commit message"> |
|
346 | <td class="expand_commit" data-commit-id="2ffc6faabc7a9c790b1b452943a3f0c047b8b436" title="Expand commit message"> | |
347 | <div class="show_more_col"> |
|
347 | <div class="show_more_col"> | |
348 | <i class="show_more"></i> |
|
348 | <i class="show_more"></i> | |
349 | </div> |
|
349 | </div> | |
350 | </td> |
|
350 | </td> | |
351 | <td class="mid td-description"> |
|
351 | <td class="mid td-description"> | |
352 | <div class="log-container truncate-wrap"> |
|
352 | <div class="log-container truncate-wrap"> | |
353 | <div id="c-2ffc6faabc7a9c790b1b452943a3f0c047b8b436" class="message truncate" data-message-raw="tests: Test echo method on the server object |
|
353 | <div id="c-2ffc6faabc7a9c790b1b452943a3f0c047b8b436" class="message truncate" data-message-raw="tests: Test echo method on the server object | |
354 |
|
354 | |||
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 |
|
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 | This only works for Pyro4 so far, have to extend it still for HTTP to work.</div> |
|
357 | This only works for Pyro4 so far, have to extend it still for HTTP to work.</div> | |
358 | </div> |
|
358 | </div> | |
359 | </td> |
|
359 | </td> | |
360 | </tr> |
|
360 | </tr> | |
361 | </tbody> |
|
361 | </tbody> | |
362 | </table> |
|
362 | </table> | |
363 | <script type="text/javascript"> |
|
363 | <script type="text/javascript"> | |
364 | var cache = {} |
|
364 | var cache = {}; | |
365 | $('.expand_commit').on('click',function(e){ |
|
365 | $('.expand_commit').on('click',function(e){ | |
366 | var target_expand = $(this); |
|
366 | var target_expand = $(this); | |
367 | var cid = target_expand.data('commitId'); |
|
367 | var cid = target_expand.data('commitId'); | |
368 |
|
368 | |||
369 | if (target_expand.hasClass('open')){ |
|
369 | if (target_expand.hasClass('open')){ | |
370 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); |
|
370 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); | |
371 | $('#t-'+cid).css({'height': '1.5em', 'max-height': '1.5em', 'text-overflow': 'ellipsis', 'overflow':'hidden', 'white-space':'nowrap'}); |
|
371 | $('#t-'+cid).css({'height': '1.5em', 'max-height': '1.5em', 'text-overflow': 'ellipsis', 'overflow':'hidden', 'white-space':'nowrap'}); | |
372 | target_expand.removeClass('open'); |
|
372 | target_expand.removeClass('open'); | |
373 | } |
|
373 | } | |
374 | else { |
|
374 | else { | |
375 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'}); |
|
375 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'}); | |
376 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'}); |
|
376 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'}); | |
377 | target_expand.addClass('open'); |
|
377 | target_expand.addClass('open'); | |
378 | } |
|
378 | } | |
379 | }); |
|
379 | }); | |
380 |
|
380 | |||
381 | </script> |
|
381 | </script> | |
382 | <p>The following classes currently do not have unique styles applied.</p> |
|
382 | <p>The following classes currently do not have unique styles applied.</p> | |
383 | <table class="rctable examples end"> |
|
383 | <table class="rctable examples end"> | |
384 | <tbody> |
|
384 | <tbody> | |
385 | <tr> |
|
385 | <tr> | |
386 | <td>td-regex</td> |
|
386 | <td>td-regex</td> | |
387 | <td>Regex patterns</td> |
|
387 | <td>Regex patterns</td> | |
388 | <td class="td-regex">(?:#)(?P<issue_id>\d+)</td> |
|
388 | <td class="td-regex">(?:#)(?P<issue_id>\d+)</td> | |
389 | </tr> |
|
389 | </tr> | |
390 | <tr> |
|
390 | <tr> | |
391 | <td>td-url</td> |
|
391 | <td>td-url</td> | |
392 | <td>Any URL.</td> |
|
392 | <td>Any URL.</td> | |
393 | <td class="td-url">https://rhodecode.com</td> |
|
393 | <td class="td-url">https://rhodecode.com</td> | |
394 | </tr> |
|
394 | </tr> | |
395 | <tr> |
|
395 | <tr> | |
396 | <td>td-journalaction</td> |
|
396 | <td>td-journalaction</td> | |
397 | <td>Action listed in a journal</td> |
|
397 | <td>Action listed in a journal</td> | |
398 | <td class="td-journalaction">started following repository supervisor-fork-4</td> |
|
398 | <td class="td-journalaction">started following repository supervisor-fork-4</td> | |
399 | </tr> |
|
399 | </tr> | |
400 | <tr> |
|
400 | <tr> | |
401 | <td>td-iprange</td> |
|
401 | <td>td-iprange</td> | |
402 | <td>Any ip address.</td> |
|
402 | <td>Any ip address.</td> | |
403 | <td class="td-ip">127.0.0.1-127.0.0.10</td> |
|
403 | <td class="td-ip">127.0.0.1-127.0.0.10</td> | |
404 | </tr> |
|
404 | </tr> | |
405 | <tr> |
|
405 | <tr> | |
406 | <td>td-exp</td> |
|
406 | <td>td-exp</td> | |
407 | <td>Expiration time.</td> |
|
407 | <td>Expiration time.</td> | |
408 | <td class="td-exp">never</td> |
|
408 | <td class="td-exp">never</td> | |
409 | </tr> |
|
409 | </tr> | |
410 | <tr> |
|
410 | <tr> | |
411 | <td>td-prefix</td> |
|
411 | <td>td-prefix</td> | |
412 | <td>Prefixes outlined in settings.</td> |
|
412 | <td>Prefixes outlined in settings.</td> | |
413 | <td class="td-prefix">ubuntu-92539</td> |
|
413 | <td class="td-prefix">ubuntu-92539</td> | |
414 | </tr> |
|
414 | </tr> | |
415 | <tr> |
|
415 | <tr> | |
416 | <td>td-cachekey</td> |
|
416 | <td>td-cachekey</td> | |
417 | <td>Cache key value.</td> |
|
417 | <td>Cache key value.</td> | |
418 | <td class="td-cachekey">ubuntu-92539supervisor</td> |
|
418 | <td class="td-cachekey">ubuntu-92539supervisor</td> | |
419 | </tr> |
|
419 | </tr> | |
420 | <tr> |
|
420 | <tr> | |
421 | <td>td-email</td> |
|
421 | <td>td-email</td> | |
422 | <td>Any email address.</td> |
|
422 | <td>Any email address.</td> | |
423 | <td class="td-email">example@rhodecode.com</td> |
|
423 | <td class="td-email">example@rhodecode.com</td> | |
424 | </tr> |
|
424 | </tr> | |
425 | <tr> |
|
425 | <tr> | |
426 | <td>td-active</td> |
|
426 | <td>td-active</td> | |
427 | <td>Shows active state with icon-true/icon-false.</td> |
|
427 | <td>Shows active state with icon-true/icon-false.</td> | |
428 | <td class="td-active"><i class="icon-false"></i></td> |
|
428 | <td class="td-active"><i class="icon-false"></i></td> | |
429 | </tr> |
|
429 | </tr> | |
430 | <tr> |
|
430 | <tr> | |
431 | <td>td-size</td> |
|
431 | <td>td-size</td> | |
432 | <td>File, repo, or directory size.</td> |
|
432 | <td>File, repo, or directory size.</td> | |
433 | <td class="td-size">89 MB</td> |
|
433 | <td class="td-size">89 MB</td> | |
434 | </tr> |
|
434 | </tr> | |
435 | <tr> |
|
435 | <tr> | |
436 | <td>td-number</td> |
|
436 | <td>td-number</td> | |
437 | <td>Any numerical data.</td> |
|
437 | <td>Any numerical data.</td> | |
438 | <td class="td-number">42</td> |
|
438 | <td class="td-number">42</td> | |
439 | </tr> |
|
439 | </tr> | |
440 | <tr> |
|
440 | <tr> | |
441 | <td>td-message</td> |
|
441 | <td>td-message</td> | |
442 | <td>Any commit message. Often treated with the truncate class used for descriptions as well.</td> |
|
442 | <td>Any commit message. Often treated with the truncate class used for descriptions as well.</td> | |
443 | <td class="td-message">Updated the files</td> |
|
443 | <td class="td-message">Updated the files</td> | |
444 | </tr> |
|
444 | </tr> | |
445 | </tbody> |
|
445 | </tbody> | |
446 | </table> |
|
446 | </table> | |
447 |
|
447 | |||
448 |
|
448 | |||
449 | <h2>Permissions table</h2> |
|
449 | <h2>Permissions table</h2> | |
450 |
|
450 | |||
451 | <p> |
|
451 | <p> | |
452 | This is a special-case table; it has |
|
452 | This is a special-case table; it has | |
453 | <code>table class="rctable permissions"</code> |
|
453 | <code>table class="rctable permissions"</code> | |
454 | where "rctable" applies the rhodecode styling as above, and |
|
454 | where "rctable" applies the rhodecode styling as above, and | |
455 | "permissions" adds an extra layer of customization specific to |
|
455 | "permissions" adds an extra layer of customization specific to | |
456 | permissions tables. Other special-case tables may exist or be |
|
456 | permissions tables. Other special-case tables may exist or be | |
457 | created if necessary. |
|
457 | created if necessary. | |
458 | </p> |
|
458 | </p> | |
459 |
|
459 | |||
460 | <table class="rctable permissions"> |
|
460 | <table class="rctable permissions"> | |
461 | <tr> |
|
461 | <tr> | |
462 | <th class="td-radio">none</th> |
|
462 | <th class="td-radio">none</th> | |
463 | <th class="td-radio">read</th> |
|
463 | <th class="td-radio">read</th> | |
464 | <th class="td-radio">write</th> |
|
464 | <th class="td-radio">write</th> | |
465 | <th class="td-radio">admin</th> |
|
465 | <th class="td-radio">admin</th> | |
466 | <th>user/user group</th> |
|
466 | <th>user/user group</th> | |
467 | <th></th> |
|
467 | <th></th> | |
468 | </tr> |
|
468 | </tr> | |
469 | <tr class="perm_admin_row"> |
|
469 | <tr class="perm_admin_row"> | |
470 | <td class="td-radio"><input type="radio" value="repository.none" |
|
470 | <td class="td-radio"><input type="radio" value="repository.none" | |
471 | name="admin_perm_2" id="admin_perm_2_repositorynone" |
|
471 | name="admin_perm_2" id="admin_perm_2_repositorynone" | |
472 | disabled="disabled"></td> |
|
472 | disabled="disabled"></td> | |
473 | <td class="td-radio"><input type="radio" value="repository.read" |
|
473 | <td class="td-radio"><input type="radio" value="repository.read" | |
474 | name="admin_perm_2" id="admin_perm_2_repositoryread" |
|
474 | name="admin_perm_2" id="admin_perm_2_repositoryread" | |
475 | disabled="disabled"></td> |
|
475 | disabled="disabled"></td> | |
476 | <td class="td-radio"><input type="radio" value="repository.write" |
|
476 | <td class="td-radio"><input type="radio" value="repository.write" | |
477 | name="admin_perm_2" id="admin_perm_2_repositorywrite" |
|
477 | name="admin_perm_2" id="admin_perm_2_repositorywrite" | |
478 | disabled="disabled"></td> |
|
478 | disabled="disabled"></td> | |
479 | <td class="td-radio"><input type="radio" value="repository.admin" |
|
479 | <td class="td-radio"><input type="radio" value="repository.admin" | |
480 | name="admin_perm_2" id="admin_perm_2_repositoryadmin" |
|
480 | name="admin_perm_2" id="admin_perm_2_repositoryadmin" | |
481 | disabled="disabled" checked="checked"></td> |
|
481 | disabled="disabled" checked="checked"></td> | |
482 | <td> |
|
482 | <td> | |
483 | <img class="gravatar" src="https://secure.gravatar.com/avatar/be9d18f611892a738e54f2a3a171e2f9?d=identicon&s=32" height="16" width="16"> |
|
483 | <img class="gravatar" src="https://secure.gravatar.com/avatar/be9d18f611892a738e54f2a3a171e2f9?d=identicon&s=32" height="16" width="16"> | |
484 | <span class="user">dev (super admin) (owner)</span> |
|
484 | <span class="user">dev (super admin) (owner)</span> | |
485 | </td> |
|
485 | </td> | |
486 | <td></td> |
|
486 | <td></td> | |
487 | </tr> |
|
487 | </tr> | |
488 | <tr> |
|
488 | <tr> | |
489 | <td colspan="4"> |
|
489 | <td colspan="4"> | |
490 | <span class="private_repo_msg"> |
|
490 | <span class="private_repo_msg"> | |
491 | private repository |
|
491 | private repository | |
492 | </span> |
|
492 | </span> | |
493 | </td> |
|
493 | </td> | |
494 | <td class="private_repo_msg"> |
|
494 | <td class="private_repo_msg"> | |
495 | <i class="icon-user"></i> |
|
495 | <i class="icon-user"></i> | |
496 | default - only people explicitly added here will have access</td> |
|
496 | default - only people explicitly added here will have access</td> | |
497 | <td></td> |
|
497 | <td></td> | |
498 | </tr> |
|
498 | </tr> | |
499 | <tr> |
|
499 | <tr> | |
500 | <td class="td-radio"><input type="radio" value="repository.none" |
|
500 | <td class="td-radio"><input type="radio" value="repository.none" | |
501 | name="u_perm_1" id="u_perm_1_repositorynone"></td> |
|
501 | name="u_perm_1" id="u_perm_1_repositorynone"></td> | |
502 | <td class="td-radio"><input type="radio" checked="checked" |
|
502 | <td class="td-radio"><input type="radio" checked="checked" | |
503 | value="repository.read" name="u_perm_1" |
|
503 | value="repository.read" name="u_perm_1" | |
504 | id="u_perm_1_repositoryread"></td> |
|
504 | id="u_perm_1_repositoryread"></td> | |
505 | <td class="td-radio"><input type="radio" value="repository.write" |
|
505 | <td class="td-radio"><input type="radio" value="repository.write" | |
506 | name="u_perm_1" id="u_perm_1_repositorywrite"></td> |
|
506 | name="u_perm_1" id="u_perm_1_repositorywrite"></td> | |
507 | <td class="td-radio"><input type="radio" value="repository.admin" |
|
507 | <td class="td-radio"><input type="radio" value="repository.admin" | |
508 | name="u_perm_1" id="u_perm_1_repositoryadmin"></td> |
|
508 | name="u_perm_1" id="u_perm_1_repositoryadmin"></td> | |
509 | <td> |
|
509 | <td> | |
510 | <img class="gravatar" src="/_static/rhodecode/images/user30.png" height="16" width="16"> |
|
510 | <img class="gravatar" src="/_static/rhodecode/images/user30.png" height="16" width="16"> | |
511 | <span class="user">default</span> |
|
511 | <span class="user">default</span> | |
512 | </td> |
|
512 | </td> | |
513 | <td></td> |
|
513 | <td></td> | |
514 | </tr> |
|
514 | </tr> | |
515 | <tr> |
|
515 | <tr> | |
516 | <td class="td-radio"><input type="radio" value="repository.none" |
|
516 | <td class="td-radio"><input type="radio" value="repository.none" | |
517 | name="u_perm_2" id="u_perm_2_repositorynone"></td> |
|
517 | name="u_perm_2" id="u_perm_2_repositorynone"></td> | |
518 | <td class="td-radio"><input type="radio" checked="checked" |
|
518 | <td class="td-radio"><input type="radio" checked="checked" | |
519 | value="repository.read" name="u_perm_2" |
|
519 | value="repository.read" name="u_perm_2" | |
520 | id="u_perm_2_repositoryread"></td> |
|
520 | id="u_perm_2_repositoryread"></td> | |
521 | <td class="td-radio"><input type="radio" value="repository.write" |
|
521 | <td class="td-radio"><input type="radio" value="repository.write" | |
522 | name="u_perm_2" id="u_perm_2_repositorywrite"></td> |
|
522 | name="u_perm_2" id="u_perm_2_repositorywrite"></td> | |
523 | <td class="td-radio"><input type="radio" value="repository.admin" |
|
523 | <td class="td-radio"><input type="radio" value="repository.admin" | |
524 | name="u_perm_2" id="u_perm_2_repositoryadmin"></td> |
|
524 | name="u_perm_2" id="u_perm_2_repositoryadmin"></td> | |
525 | <td> |
|
525 | <td> | |
526 | <img class="gravatar" src="https://secure.gravatar.com/avatar/be9d18f611892a738e54f2a3a171e2f9?d=identicon&s=32" height="16" width="16"> |
|
526 | <img class="gravatar" src="https://secure.gravatar.com/avatar/be9d18f611892a738e54f2a3a171e2f9?d=identicon&s=32" height="16" width="16"> | |
527 | <a class="user" href="/_admin/users/2/edit">dev</a> |
|
527 | <a class="user" href="/_admin/users/2/edit">dev</a> | |
528 | </td> |
|
528 | </td> | |
529 | <td> |
|
529 | <td> | |
530 | <span member_type="user" member="2" |
|
530 | <span member_type="user" member="2" | |
531 | class="btn action_button btn-link btn-danger">revoke</span> |
|
531 | class="btn action_button btn-link btn-danger">revoke</span> | |
532 | </td> |
|
532 | </td> | |
533 | </tr> |
|
533 | </tr> | |
534 | </tbody> |
|
534 | </tbody> | |
535 | </table> |
|
535 | </table> | |
536 | <div class="link" id="add_perm"> |
|
536 | <div class="link" id="add_perm"> | |
537 | Add new |
|
537 | Add new | |
538 | </div> |
|
538 | </div> | |
539 |
|
539 | |||
540 |
|
540 | |||
541 |
|
541 | |||
542 | </div> |
|
542 | </div> | |
543 | </div> |
|
543 | </div> | |
544 | </div> |
|
544 | </div> | |
545 | </%def> |
|
545 | </%def> |
@@ -1,21 +1,21 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base.mako"/> |
|
2 | <%inherit file="base.mako"/> | |
3 |
|
3 | |||
4 | <%def name="subject()" filter="n,trim"> |
|
4 | <%def name="subject()" filter="n,trim"> | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 |
|
7 | |||
8 | ## plain text version of the email. Empty by default |
|
8 | ## plain text version of the email. Empty by default | |
9 | <%def name="body_plaintext()" filter="n,trim"> |
|
9 | <%def name="body_plaintext()" filter="n,trim"> | |
10 | ${body} |
|
10 | ${body} | |
11 |
|
11 | |||
12 | ${self.plaintext_footer()} |
|
12 | ${self.plaintext_footer()} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | ## BODY GOES BELOW |
|
15 | ## BODY GOES BELOW | |
16 | <table style="text-align:left;vertical-align:top;"> |
|
16 | <table style="text-align:left;vertical-align:top;"> | |
17 | <tr><td style="padding-right:20px;padding-top:15px;white-space:pre-wrap">${body}</td></tr> |
|
17 | <tr><td style="padding-right:20px;padding-top:15px;white-space:pre-wrap">${body}</td></tr> | |
18 | </table |
|
18 | </table> | |
19 | <p><a style="margin-top:15px;margin-left:1%;font-family:sans-serif;font-weight:100;font-size:11px;display:block;color:#666666;text-decoration:none;" href="${instance_url}"> |
|
19 | <p><a style="margin-top:15px;margin-left:1%;font-family:sans-serif;font-weight:100;font-size:11px;display:block;color:#666666;text-decoration:none;" href="${instance_url}"> | |
20 | ${self.plaintext_footer()} |
|
20 | ${self.plaintext_footer()} | |
21 | </a></p> No newline at end of file |
|
21 | </a></p> |
@@ -1,27 +1,27 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base.mako"/> |
|
2 | <%inherit file="base.mako"/> | |
3 |
|
3 | |||
4 | <%def name="subject()" filter="n,trim"> |
|
4 | <%def name="subject()" filter="n,trim"> | |
5 | RhodeCode new user registration: ${user.username} |
|
5 | RhodeCode new user registration: ${user.username} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="body_plaintext()" filter="n,trim"> |
|
8 | <%def name="body_plaintext()" filter="n,trim"> | |
9 |
|
9 | |||
10 | A new user `${user.username}` has registered on ${h.format_date(date)} |
|
10 | A new user `${user.username}` has registered on ${h.format_date(date)} | |
11 |
|
11 | |||
12 | - Username: ${user.username} |
|
12 | - Username: ${user.username} | |
13 | - Full Name: ${user.firstname} ${user.lastname} |
|
13 | - Full Name: ${user.firstname} ${user.lastname} | |
14 | - Email: ${user.email} |
|
14 | - Email: ${user.email} | |
15 | - Profile link: ${h.url('user_profile', username=user.username, qualified=True)} |
|
15 | - Profile link: ${h.url('user_profile', username=user.username, qualified=True)} | |
16 |
|
16 | |||
17 | ${self.plaintext_footer()} |
|
17 | ${self.plaintext_footer()} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | ## BODY GOES BELOW |
|
20 | ## BODY GOES BELOW | |
21 | <table style="text-align:left;vertical-align:middle;"> |
|
21 | <table style="text-align:left;vertical-align:middle;"> | |
22 | <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;"><h4><a href="${h.url('user_profile', username=user.username, qualified=True)}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('New user %(user)s has registered on %(date)s') % {'user': user.username, 'date': h.format_date(date)}}</h4></td></tr> |
|
22 | <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;"><h4><a href="${h.url('user_profile', username=user.username, qualified=True)}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('New user %(user)s has registered on %(date)s') % {'user': user.username, 'date': h.format_date(date)}}</a></h4></td></tr> | |
23 | <tr><td style="padding-right:20px;padding-top:20px;">${_('Username')}</td><td style="line-height:1;padding-top:20px;"><img style="margin-bottom:-5px;text-align:left;border:1px solid #dbd9da" src="${h.gravatar_url(user.email, 16)}" height="16" width="16"> ${user.username}</td></tr> |
|
23 | <tr><td style="padding-right:20px;padding-top:20px;">${_('Username')}</td><td style="line-height:1;padding-top:20px;"><img style="margin-bottom:-5px;text-align:left;border:1px solid #dbd9da" src="${h.gravatar_url(user.email, 16)}" height="16" width="16"> ${user.username}</td></tr> | |
24 | <tr><td style="padding-right:20px;">${_('Full Name')}</td><td>${user.firstname} ${user.lastname}</td></tr> |
|
24 | <tr><td style="padding-right:20px;">${_('Full Name')}</td><td>${user.firstname} ${user.lastname}</td></tr> | |
25 | <tr><td style="padding-right:20px;">${_('Email')}</td><td>${user.email}</td></tr> |
|
25 | <tr><td style="padding-right:20px;">${_('Email')}</td><td>${user.email}</td></tr> | |
26 | <tr><td style="padding-right:20px;">${_('Profile')}</td><td><a href="${h.url('user_profile', username=user.username, qualified=True)}">${h.url('user_profile', username=user.username, qualified=True)}</a></td></tr> |
|
26 | <tr><td style="padding-right:20px;">${_('Profile')}</td><td><a href="${h.url('user_profile', username=user.username, qualified=True)}">${h.url('user_profile', username=user.username, qualified=True)}</a></td></tr> | |
27 | </table> No newline at end of file |
|
27 | </table> |
@@ -1,90 +1,90 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base/root.mako"/> |
|
2 | <%inherit file="base/root.mako"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Reset Password')} |
|
5 | ${_('Reset Password')} | |
6 | %if c.rhodecode_name: |
|
6 | %if c.rhodecode_name: | |
7 | · ${h.branding(c.rhodecode_name)} |
|
7 | · ${h.branding(c.rhodecode_name)} | |
8 | %endif |
|
8 | %endif | |
9 | </%def> |
|
9 | </%def> | |
10 | <style>body{background-color:#eeeeee;}</style> |
|
10 | <style>body{background-color:#eeeeee;}</style> | |
11 |
|
11 | |||
12 | <div class="loginbox"> |
|
12 | <div class="loginbox"> | |
13 | <div class="header"> |
|
13 | <div class="header"> | |
14 | <div id="header-inner" class="title"> |
|
14 | <div id="header-inner" class="title"> | |
15 | <div id="logo"> |
|
15 | <div id="logo"> | |
16 | <div class="logo-wrapper"> |
|
16 | <div class="logo-wrapper"> | |
17 | <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a> |
|
17 | <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a> | |
18 | </div> |
|
18 | </div> | |
19 | %if c.rhodecode_name: |
|
19 | %if c.rhodecode_name: | |
20 | <div class="branding"> ${h.branding(c.rhodecode_name)}</div> |
|
20 | <div class="branding"> ${h.branding(c.rhodecode_name)}</div> | |
21 | %endif |
|
21 | %endif | |
22 | </div> |
|
22 | </div> | |
23 | </div> |
|
23 | </div> | |
24 | </div> |
|
24 | </div> | |
25 |
|
25 | |||
26 | <div class="loginwrapper"> |
|
26 | <div class="loginwrapper"> | |
27 | <div class="left-column"> |
|
27 | <div class="left-column"> | |
28 | <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/> |
|
28 | <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/> | |
29 | </div> |
|
29 | </div> | |
30 |
|
30 | |||
31 | %if h.HasPermissionAny('hg.password_reset.disabled')(): |
|
31 | %if h.HasPermissionAny('hg.password_reset.disabled')(): | |
32 | <div class="right-column"> |
|
32 | <div class="right-column"> | |
33 | <p> |
|
33 | <p> | |
34 | ${_('Password reset is disabled. Please contact ')} |
|
34 | ${_('Password reset is disabled. Please contact ')} | |
35 | % if c.visual.rhodecode_support_url: |
|
35 | % if c.visual.rhodecode_support_url: | |
36 | <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a> |
|
36 | <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a> | |
37 | ${_('or')} |
|
37 | ${_('or')} | |
38 | % endif |
|
38 | % endif | |
39 | ${_('an administrator if you need help.')} |
|
39 | ${_('an administrator if you need help.')} | |
40 | </p> |
|
40 | </p> | |
41 | </div> |
|
41 | </div> | |
42 | %else: |
|
42 | %else: | |
43 | <div id="register" class="right-column"> |
|
43 | <div id="register" class="right-column"> | |
44 | <!-- login --> |
|
44 | <!-- login --> | |
45 | <div class="sign-in-title"> |
|
45 | <div class="sign-in-title"> | |
46 | <h1>${_('Reset your Password')}</h1> |
|
46 | <h1>${_('Reset your Password')}</h1> | |
47 | <h4>${h.link_to(_("Go to the login page to sign in."), request.route_path('login'))}</h4> |
|
47 | <h4>${h.link_to(_("Go to the login page to sign in."), request.route_path('login'))}</h4> | |
48 | </div> |
|
48 | </div> | |
49 | <div class="inner form"> |
|
49 | <div class="inner form"> | |
50 | ${h.form(request.route_path('reset_password'), needs_csrf_token=False)} |
|
50 | ${h.form(request.route_path('reset_password'), needs_csrf_token=False)} | |
51 | <label for="email">${_('Email Address')}:</label> |
|
51 | <label for="email">${_('Email Address')}:</label> | |
52 | ${h.text('email', defaults.get('email'))} |
|
52 | ${h.text('email', defaults.get('email'))} | |
53 | %if 'email' in errors: |
|
53 | %if 'email' in errors: | |
54 | <span class="error-message">${errors.get('email')}</span> |
|
54 | <span class="error-message">${errors.get('email')}</span> | |
55 | <br /> |
|
55 | <br /> | |
56 | %endif |
|
56 | %endif | |
57 |
|
57 | |||
58 | %if captcha_active: |
|
58 | %if captcha_active: | |
59 | <div class="login-captcha" |
|
59 | <div class="login-captcha"> | |
60 | <label for="email">${_('Captcha')}:</label> |
|
60 | <label for="email">${_('Captcha')}:</label> | |
61 | ${h.hidden('recaptcha_field')} |
|
61 | ${h.hidden('recaptcha_field')} | |
62 | <div id="recaptcha"></div> |
|
62 | <div id="recaptcha"></div> | |
63 | %if 'recaptcha_field' in errors: |
|
63 | %if 'recaptcha_field' in errors: | |
64 | <span class="error-message">${errors.get('recaptcha_field')}</span> |
|
64 | <span class="error-message">${errors.get('recaptcha_field')}</span> | |
65 | <br /> |
|
65 | <br /> | |
66 | %endif |
|
66 | %endif | |
67 | </div> |
|
67 | </div> | |
68 | %endif |
|
68 | %endif | |
69 |
|
69 | |||
70 | ${h.submit('send', _('Send password reset email'), class_="btn sign-in")} |
|
70 | ${h.submit('send', _('Send password reset email'), class_="btn sign-in")} | |
71 | <div class="activation_msg">${_('Password reset link will be sent to matching email address')}</div> |
|
71 | <div class="activation_msg">${_('Password reset link will be sent to matching email address')}</div> | |
72 |
|
72 | |||
73 | ${h.end_form()} |
|
73 | ${h.end_form()} | |
74 | </div> |
|
74 | </div> | |
75 | </div> |
|
75 | </div> | |
76 | %endif |
|
76 | %endif | |
77 | </div> |
|
77 | </div> | |
78 | </div> |
|
78 | </div> | |
79 |
|
79 | |||
80 | %if captcha_active: |
|
80 | %if captcha_active: | |
81 | <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script> |
|
81 | <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script> | |
82 | %endif |
|
82 | %endif | |
83 | <script type="text/javascript"> |
|
83 | <script type="text/javascript"> | |
84 | $(document).ready(function(){ |
|
84 | $(document).ready(function(){ | |
85 | $('#email').focus(); |
|
85 | $('#email').focus(); | |
86 | %if captcha_active: |
|
86 | %if captcha_active: | |
87 | Recaptcha.create("${captcha_public_key}", "recaptcha", {theme: "white"}); |
|
87 | Recaptcha.create("${captcha_public_key}", "recaptcha", {theme: "white"}); | |
88 | %endif |
|
88 | %endif | |
89 | }); |
|
89 | }); | |
90 | </script> |
|
90 | </script> |
@@ -1,637 +1,638 b'' | |||||
1 | <%inherit file="/base/base.mako"/> |
|
1 | <%inherit file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} |
|
4 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} | |
5 | %if c.rhodecode_name: |
|
5 | %if c.rhodecode_name: | |
6 | · ${h.branding(c.rhodecode_name)} |
|
6 | · ${h.branding(c.rhodecode_name)} | |
7 | %endif |
|
7 | %endif | |
8 | </%def> |
|
8 | </%def> | |
9 |
|
9 | |||
10 | <%def name="breadcrumbs_links()"> |
|
10 | <%def name="breadcrumbs_links()"> | |
11 | <span id="pr-title"> |
|
11 | <span id="pr-title"> | |
12 | ${c.pull_request.title} |
|
12 | ${c.pull_request.title} | |
13 | %if c.pull_request.is_closed(): |
|
13 | %if c.pull_request.is_closed(): | |
14 | (${_('Closed')}) |
|
14 | (${_('Closed')}) | |
15 | %endif |
|
15 | %endif | |
16 | </span> |
|
16 | </span> | |
17 | <div id="pr-title-edit" class="input" style="display: none;"> |
|
17 | <div id="pr-title-edit" class="input" style="display: none;"> | |
18 | ${h.text('pullrequest_title', id_="pr-title-input", class_="large", value=c.pull_request.title)} |
|
18 | ${h.text('pullrequest_title', id_="pr-title-input", class_="large", value=c.pull_request.title)} | |
19 | </div> |
|
19 | </div> | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="menu_bar_nav()"> |
|
22 | <%def name="menu_bar_nav()"> | |
23 | ${self.menu_items(active='repositories')} |
|
23 | ${self.menu_items(active='repositories')} | |
24 | </%def> |
|
24 | </%def> | |
25 |
|
25 | |||
26 | <%def name="menu_bar_subnav()"> |
|
26 | <%def name="menu_bar_subnav()"> | |
27 | ${self.repo_menu(active='showpullrequest')} |
|
27 | ${self.repo_menu(active='showpullrequest')} | |
28 | </%def> |
|
28 | </%def> | |
29 |
|
29 | |||
30 | <%def name="main()"> |
|
30 | <%def name="main()"> | |
|
31 | ||||
31 | <script type="text/javascript"> |
|
32 | <script type="text/javascript"> | |
32 | // TODO: marcink switch this to pyroutes |
|
33 | // TODO: marcink switch this to pyroutes | |
33 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
34 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
34 | templateContext.pull_request_data.pull_request_id = ${c.pull_request.pull_request_id}; |
|
35 | templateContext.pull_request_data.pull_request_id = ${c.pull_request.pull_request_id}; | |
35 | </script> |
|
36 | </script> | |
36 | <div class="box"> |
|
37 | <div class="box"> | |
37 | <div class="title"> |
|
38 | <div class="title"> | |
38 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
39 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
39 | </div> |
|
40 | </div> | |
40 |
|
41 | |||
41 | ${self.breadcrumbs()} |
|
42 | ${self.breadcrumbs()} | |
42 |
|
43 | |||
43 |
|
||||
44 | <div class="box pr-summary"> |
|
44 | <div class="box pr-summary"> | |
45 | <div class="summary-details block-left"> |
|
45 | <div class="summary-details block-left"> | |
46 | <%summary = lambda n:{False:'summary-short'}.get(n)%> |
|
46 | <% summary = lambda n:{False:'summary-short'}.get(n) %> | |
47 | <div class="pr-details-title"> |
|
47 | <div class="pr-details-title"> | |
48 | <a href="${h.url('pull_requests_global', pull_request_id=c.pull_request.pull_request_id)}">${_('Pull request #%s') % c.pull_request.pull_request_id}</a> ${_('From')} ${h.format_date(c.pull_request.created_on)} |
|
48 | <a href="${h.url('pull_requests_global', pull_request_id=c.pull_request.pull_request_id)}">${_('Pull request #%s') % c.pull_request.pull_request_id}</a> ${_('From')} ${h.format_date(c.pull_request.created_on)} | |
49 | %if c.allowed_to_update: |
|
49 | %if c.allowed_to_update: | |
50 | <div id="delete_pullrequest" class="pull-right action_button ${'' if c.allowed_to_delete else 'disabled' }" style="clear:inherit;padding: 0"> |
|
50 | <div id="delete_pullrequest" class="pull-right action_button ${'' if c.allowed_to_delete else 'disabled' }" style="clear:inherit;padding: 0"> | |
51 | % if c.allowed_to_delete: |
|
51 | % if c.allowed_to_delete: | |
52 | ${h.secure_form(url('pullrequest_delete', repo_name=c.pull_request.target_repo.repo_name, pull_request_id=c.pull_request.pull_request_id),method='delete')} |
|
52 | ${h.secure_form(url('pullrequest_delete', repo_name=c.pull_request.target_repo.repo_name, pull_request_id=c.pull_request.pull_request_id),method='delete')} | |
53 | ${h.submit('remove_%s' % c.pull_request.pull_request_id, _('Delete'), |
|
53 | ${h.submit('remove_%s' % c.pull_request.pull_request_id, _('Delete'), | |
54 | class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} |
|
54 | class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} | |
55 | ${h.end_form()} |
|
55 | ${h.end_form()} | |
56 | % else: |
|
56 | % else: | |
57 | ${_('Delete')} |
|
57 | ${_('Delete')} | |
58 | % endif |
|
58 | % endif | |
59 | </div> |
|
59 | </div> | |
60 | <div id="open_edit_pullrequest" class="pull-right action_button">${_('Edit')}</div> |
|
60 | <div id="open_edit_pullrequest" class="pull-right action_button">${_('Edit')}</div> | |
61 | <div id="close_edit_pullrequest" class="pull-right action_button" style="display: none;padding: 0">${_('Cancel')}</div> |
|
61 | <div id="close_edit_pullrequest" class="pull-right action_button" style="display: none;padding: 0">${_('Cancel')}</div> | |
62 | %endif |
|
62 | %endif | |
63 | </div> |
|
63 | </div> | |
64 |
|
64 | |||
65 | <div id="summary" class="fields pr-details-content"> |
|
65 | <div id="summary" class="fields pr-details-content"> | |
66 | <div class="field"> |
|
66 | <div class="field"> | |
67 | <div class="label-summary"> |
|
67 | <div class="label-summary"> | |
68 | <label>${_('Origin')}:</label> |
|
68 | <label>${_('Origin')}:</label> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="input"> |
|
70 | <div class="input"> | |
71 | <div class="pr-origininfo"> |
|
71 | <div class="pr-origininfo"> | |
72 | ## branch link is only valid if it is a branch |
|
72 | ## branch link is only valid if it is a branch | |
73 | <span class="tag"> |
|
73 | <span class="tag"> | |
74 | %if c.pull_request.source_ref_parts.type == 'branch': |
|
74 | %if c.pull_request.source_ref_parts.type == 'branch': | |
75 | <a href="${h.url('changelog_home', repo_name=c.pull_request.source_repo.repo_name, branch=c.pull_request.source_ref_parts.name)}">${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name}</a> |
|
75 | <a href="${h.url('changelog_home', repo_name=c.pull_request.source_repo.repo_name, branch=c.pull_request.source_ref_parts.name)}">${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name}</a> | |
76 | %else: |
|
76 | %else: | |
77 | ${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name} |
|
77 | ${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name} | |
78 | %endif |
|
78 | %endif | |
79 | </span> |
|
79 | </span> | |
80 | <span class="clone-url"> |
|
80 | <span class="clone-url"> | |
81 | <a href="${h.url('summary_home', repo_name=c.pull_request.source_repo.repo_name)}">${c.pull_request.source_repo.clone_url()}</a> |
|
81 | <a href="${h.url('summary_home', repo_name=c.pull_request.source_repo.repo_name)}">${c.pull_request.source_repo.clone_url()}</a> | |
82 | </span> |
|
82 | </span> | |
83 | </div> |
|
83 | </div> | |
84 | <div class="pr-pullinfo"> |
|
84 | <div class="pr-pullinfo"> | |
85 | %if h.is_hg(c.pull_request.source_repo): |
|
85 | %if h.is_hg(c.pull_request.source_repo): | |
86 | <input type="text" value="hg pull -r ${h.short_id(c.source_ref)} ${c.pull_request.source_repo.clone_url()}" readonly="readonly"> |
|
86 | <input type="text" value="hg pull -r ${h.short_id(c.source_ref)} ${c.pull_request.source_repo.clone_url()}" readonly="readonly"> | |
87 | %elif h.is_git(c.pull_request.source_repo): |
|
87 | %elif h.is_git(c.pull_request.source_repo): | |
88 | <input type="text" value="git pull ${c.pull_request.source_repo.clone_url()} ${c.pull_request.source_ref_parts.name}" readonly="readonly"> |
|
88 | <input type="text" value="git pull ${c.pull_request.source_repo.clone_url()} ${c.pull_request.source_ref_parts.name}" readonly="readonly"> | |
89 | %endif |
|
89 | %endif | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 | <div class="field"> |
|
93 | <div class="field"> | |
94 | <div class="label-summary"> |
|
94 | <div class="label-summary"> | |
95 | <label>${_('Target')}:</label> |
|
95 | <label>${_('Target')}:</label> | |
96 | </div> |
|
96 | </div> | |
97 | <div class="input"> |
|
97 | <div class="input"> | |
98 | <div class="pr-targetinfo"> |
|
98 | <div class="pr-targetinfo"> | |
99 | ## branch link is only valid if it is a branch |
|
99 | ## branch link is only valid if it is a branch | |
100 | <span class="tag"> |
|
100 | <span class="tag"> | |
101 | %if c.pull_request.target_ref_parts.type == 'branch': |
|
101 | %if c.pull_request.target_ref_parts.type == 'branch': | |
102 | <a href="${h.url('changelog_home', repo_name=c.pull_request.target_repo.repo_name, branch=c.pull_request.target_ref_parts.name)}">${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name}</a> |
|
102 | <a href="${h.url('changelog_home', repo_name=c.pull_request.target_repo.repo_name, branch=c.pull_request.target_ref_parts.name)}">${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name}</a> | |
103 | %else: |
|
103 | %else: | |
104 | ${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name} |
|
104 | ${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name} | |
105 | %endif |
|
105 | %endif | |
106 | </span> |
|
106 | </span> | |
107 | <span class="clone-url"> |
|
107 | <span class="clone-url"> | |
108 | <a href="${h.url('summary_home', repo_name=c.pull_request.target_repo.repo_name)}">${c.pull_request.target_repo.clone_url()}</a> |
|
108 | <a href="${h.url('summary_home', repo_name=c.pull_request.target_repo.repo_name)}">${c.pull_request.target_repo.clone_url()}</a> | |
109 | </span> |
|
109 | </span> | |
110 | </div> |
|
110 | </div> | |
111 | </div> |
|
111 | </div> | |
112 | </div> |
|
112 | </div> | |
113 |
|
113 | |||
114 | ## Link to the shadow repository. |
|
114 | ## Link to the shadow repository. | |
115 | <div class="field"> |
|
115 | <div class="field"> | |
116 | <div class="label-summary"> |
|
116 | <div class="label-summary"> | |
117 | <label>${_('Merge')}:</label> |
|
117 | <label>${_('Merge')}:</label> | |
118 | </div> |
|
118 | </div> | |
119 | <div class="input"> |
|
119 | <div class="input"> | |
120 | % if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref: |
|
120 | % if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref: | |
121 | <div class="pr-mergeinfo"> |
|
121 | <div class="pr-mergeinfo"> | |
122 | %if h.is_hg(c.pull_request.target_repo): |
|
122 | %if h.is_hg(c.pull_request.target_repo): | |
123 | <input type="text" value="hg clone -u ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly"> |
|
123 | <input type="text" value="hg clone -u ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly"> | |
124 | %elif h.is_git(c.pull_request.target_repo): |
|
124 | %elif h.is_git(c.pull_request.target_repo): | |
125 | <input type="text" value="git clone --branch ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly"> |
|
125 | <input type="text" value="git clone --branch ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly"> | |
126 | %endif |
|
126 | %endif | |
127 | </div> |
|
127 | </div> | |
128 | % else: |
|
128 | % else: | |
129 | <div class=""> |
|
129 | <div class=""> | |
130 | ${_('Shadow repository data not available')}. |
|
130 | ${_('Shadow repository data not available')}. | |
131 | </div> |
|
131 | </div> | |
132 | % endif |
|
132 | % endif | |
133 | </div> |
|
133 | </div> | |
134 | </div> |
|
134 | </div> | |
135 |
|
135 | |||
136 | <div class="field"> |
|
136 | <div class="field"> | |
137 | <div class="label-summary"> |
|
137 | <div class="label-summary"> | |
138 | <label>${_('Review')}:</label> |
|
138 | <label>${_('Review')}:</label> | |
139 | </div> |
|
139 | </div> | |
140 | <div class="input"> |
|
140 | <div class="input"> | |
141 | %if c.pull_request_review_status: |
|
141 | %if c.pull_request_review_status: | |
142 | <div class="${'flag_status %s' % c.pull_request_review_status} tooltip pull-left"></div> |
|
142 | <div class="${'flag_status %s' % c.pull_request_review_status} tooltip pull-left"></div> | |
143 | <span class="changeset-status-lbl tooltip"> |
|
143 | <span class="changeset-status-lbl tooltip"> | |
144 | %if c.pull_request.is_closed(): |
|
144 | %if c.pull_request.is_closed(): | |
145 | ${_('Closed')}, |
|
145 | ${_('Closed')}, | |
146 | %endif |
|
146 | %endif | |
147 | ${h.commit_status_lbl(c.pull_request_review_status)} |
|
147 | ${h.commit_status_lbl(c.pull_request_review_status)} | |
148 | </span> |
|
148 | </span> | |
149 | - ${ungettext('calculated based on %s reviewer vote', 'calculated based on %s reviewers votes', len(c.pull_request_reviewers)) % len(c.pull_request_reviewers)} |
|
149 | - ${ungettext('calculated based on %s reviewer vote', 'calculated based on %s reviewers votes', len(c.pull_request_reviewers)) % len(c.pull_request_reviewers)} | |
150 | %endif |
|
150 | %endif | |
151 | </div> |
|
151 | </div> | |
152 | </div> |
|
152 | </div> | |
153 | <div class="field"> |
|
153 | <div class="field"> | |
154 | <div class="pr-description-label label-summary"> |
|
154 | <div class="pr-description-label label-summary"> | |
155 | <label>${_('Description')}:</label> |
|
155 | <label>${_('Description')}:</label> | |
156 | </div> |
|
156 | </div> | |
157 | <div id="pr-desc" class="input"> |
|
157 | <div id="pr-desc" class="input"> | |
158 | <div class="pr-description">${h.urlify_commit_message(c.pull_request.description, c.repo_name)}</div> |
|
158 | <div class="pr-description">${h.urlify_commit_message(c.pull_request.description, c.repo_name)}</div> | |
159 | </div> |
|
159 | </div> | |
160 | <div id="pr-desc-edit" class="input textarea editor" style="display: none;"> |
|
160 | <div id="pr-desc-edit" class="input textarea editor" style="display: none;"> | |
161 | <textarea id="pr-description-input" size="30">${c.pull_request.description}</textarea> |
|
161 | <textarea id="pr-description-input" size="30">${c.pull_request.description}</textarea> | |
162 | </div> |
|
162 | </div> | |
163 | </div> |
|
163 | </div> | |
164 |
|
164 | |||
165 | <div class="field"> |
|
165 | <div class="field"> | |
166 | <div class="label-summary"> |
|
166 | <div class="label-summary"> | |
167 | <label>${_('Versions')} (${len(c.versions)+1}):</label> |
|
167 | <label>${_('Versions')} (${len(c.versions)+1}):</label> | |
168 | </div> |
|
168 | </div> | |
169 |
|
169 | |||
170 | <div class="pr-versions"> |
|
170 | <div class="pr-versions"> | |
171 | % if c.show_version_changes: |
|
171 | % if c.show_version_changes: | |
172 | <table> |
|
172 | <table> | |
173 | ## CURRENTLY SELECT PR VERSION |
|
173 | ## CURRENTLY SELECT PR VERSION | |
174 | <tr class="version-pr" style="display: ${'' if c.at_version_num is None else 'none'}"> |
|
174 | <tr class="version-pr" style="display: ${'' if c.at_version_num is None else 'none'}"> | |
175 | <td> |
|
175 | <td> | |
176 | % if c.at_version in [None, 'latest']: |
|
176 | % if c.at_version in [None, 'latest']: | |
177 | <i class="icon-ok link"></i> |
|
177 | <i class="icon-ok link"></i> | |
178 | % else: |
|
178 | % else: | |
179 | <i class="icon-comment"></i> <code>${len(c.inline_versions[None])}</code> |
|
179 | <i class="icon-comment"></i> <code>${len(c.inline_versions[None])}</code> | |
180 | % endif |
|
180 | % endif | |
181 | </td> |
|
181 | </td> | |
182 | <td> |
|
182 | <td> | |
183 | <code> |
|
183 | <code> | |
184 | % if c.versions: |
|
184 | % if c.versions: | |
185 | <a href="${h.url.current(version='latest')}">${_('latest')}</a> |
|
185 | <a href="${h.url.current(version='latest')}">${_('latest')}</a> | |
186 | % else: |
|
186 | % else: | |
187 | ${_('initial')} |
|
187 | ${_('initial')} | |
188 | % endif |
|
188 | % endif | |
189 | </code> |
|
189 | </code> | |
190 | </td> |
|
190 | </td> | |
191 | <td> |
|
191 | <td> | |
192 | <code>${c.pull_request_latest.source_ref_parts.commit_id[:6]}</code> |
|
192 | <code>${c.pull_request_latest.source_ref_parts.commit_id[:6]}</code> | |
193 | </td> |
|
193 | </td> | |
194 | <td> |
|
194 | <td> | |
195 | ${_('created')} ${h.age_component(c.pull_request_latest.updated_on)} |
|
195 | ${_('created')} ${h.age_component(c.pull_request_latest.updated_on)} | |
196 | </td> |
|
196 | </td> | |
197 | <td align="right"> |
|
197 | <td align="right"> | |
198 | % if c.versions and c.at_version_num in [None, 'latest']: |
|
198 | % if c.versions and c.at_version_num in [None, 'latest']: | |
199 | <span id="show-pr-versions" class="btn btn-link" onclick="$('.version-pr').show(); $(this).hide(); return false">${_('Show all versions')}</span> |
|
199 | <span id="show-pr-versions" class="btn btn-link" onclick="$('.version-pr').show(); $(this).hide(); return false">${_('Show all versions')}</span> | |
200 | % endif |
|
200 | % endif | |
201 | </td> |
|
201 | </td> | |
202 | </tr> |
|
202 | </tr> | |
203 |
|
203 | |||
204 | ## SHOW ALL VERSIONS OF PR |
|
204 | ## SHOW ALL VERSIONS OF PR | |
205 | <% ver_pr = None %> |
|
205 | <% ver_pr = None %> | |
206 | % for ver in reversed(c.pull_request.versions()): |
|
206 | % for ver in reversed(c.pull_request.versions()): | |
207 | <% ver_pr = ver.pull_request_version_id %> |
|
207 | <% ver_pr = ver.pull_request_version_id %> | |
208 | <tr class="version-pr" style="display: ${'' if c.at_version == ver_pr else 'none'}"> |
|
208 | <tr class="version-pr" style="display: ${'' if c.at_version == ver_pr else 'none'}"> | |
209 | <td> |
|
209 | <td> | |
210 | % if c.at_version == ver_pr: |
|
210 | % if c.at_version == ver_pr: | |
211 | <i class="icon-ok link"></i> |
|
211 | <i class="icon-ok link"></i> | |
212 | % else: |
|
212 | % else: | |
213 | <i class="icon-comment"></i> <code>${len(c.inline_versions[ver_pr])}</code> |
|
213 | <i class="icon-comment"></i> <code>${len(c.inline_versions[ver_pr])}</code> | |
214 | % endif |
|
214 | % endif | |
215 | </td> |
|
215 | </td> | |
216 | <td> |
|
216 | <td> | |
217 | <code><a href="${h.url.current(version=ver_pr)}">version ${ver_pr}</a></code> |
|
217 | <code><a href="${h.url.current(version=ver_pr)}">version ${ver_pr}</a></code> | |
218 | </td> |
|
218 | </td> | |
219 | <td> |
|
219 | <td> | |
220 | <code>${ver.source_ref_parts.commit_id[:6]}</code> |
|
220 | <code>${ver.source_ref_parts.commit_id[:6]}</code> | |
221 | </td> |
|
221 | </td> | |
222 | <td> |
|
222 | <td> | |
223 | ${_('created')} ${h.age_component(ver.updated_on)} |
|
223 | ${_('created')} ${h.age_component(ver.updated_on)} | |
224 | </td> |
|
224 | </td> | |
225 | <td align="right"> |
|
225 | <td align="right"> | |
226 | % if c.at_version == ver_pr: |
|
226 | % if c.at_version == ver_pr: | |
227 | <span id="show-pr-versions" class="btn btn-link" onclick="$('.version-pr').show(); $(this).hide(); return false">${_('Show all versions')}</span> |
|
227 | <span id="show-pr-versions" class="btn btn-link" onclick="$('.version-pr').show(); $(this).hide(); return false">${_('Show all versions')}</span> | |
228 | % endif |
|
228 | % endif | |
229 | </td> |
|
229 | </td> | |
230 | </tr> |
|
230 | </tr> | |
231 | % endfor |
|
231 | % endfor | |
232 |
|
232 | |||
233 | ## show comment/inline comments summary |
|
233 | ## show comment/inline comments summary | |
234 | <tr> |
|
234 | <tr> | |
235 | <td> |
|
235 | <td> | |
236 | </td> |
|
236 | </td> | |
237 |
|
237 | |||
238 | <% inline_comm_count_ver = len(c.inline_versions[ver_pr])%> |
|
238 | <% inline_comm_count_ver = len(c.inline_versions[ver_pr])%> | |
239 | <td colspan="4" style="border-top: 1px dashed #dbd9da"> |
|
239 | <td colspan="4" style="border-top: 1px dashed #dbd9da"> | |
240 | ${_('Comments for this version')}: |
|
240 | ${_('Comments for this version')}: | |
241 | %if c.comments: |
|
241 | %if c.comments: | |
242 | <a href="#comments">${_("%d General ") % len(c.comments)}</a> |
|
242 | <a href="#comments">${_("%d General ") % len(c.comments)}</a> | |
243 | %else: |
|
243 | %else: | |
244 | ${_("%d General ") % len(c.comments)} |
|
244 | ${_("%d General ") % len(c.comments)} | |
245 | %endif |
|
245 | %endif | |
246 |
|
246 | |||
247 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num])%> |
|
247 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num])%> | |
248 | %if inline_comm_count_ver: |
|
248 | %if inline_comm_count_ver: | |
249 | , <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_("%d Inline") % inline_comm_count_ver}</a> |
|
249 | , <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_("%d Inline") % inline_comm_count_ver}</a> | |
250 | %else: |
|
250 | %else: | |
251 | , ${_("%d Inline") % inline_comm_count_ver} |
|
251 | , ${_("%d Inline") % inline_comm_count_ver} | |
252 | %endif |
|
252 | %endif | |
253 |
|
253 | |||
254 | %if c.outdated_cnt: |
|
254 | %if c.outdated_cnt: | |
255 | , <a href="#" onclick="showOutdated(); Rhodecode.comments.nextOutdatedComment(); return false;">${_("%d Outdated") % c.outdated_cnt}</a> |
|
255 | , <a href="#" onclick="showOutdated(); Rhodecode.comments.nextOutdatedComment(); return false;">${_("%d Outdated") % c.outdated_cnt}</a> | |
256 | <a href="#" class="showOutdatedComments" onclick="showOutdated(this); return false;"> | ${_('show outdated comments')}</a> |
|
256 | <a href="#" class="showOutdatedComments" onclick="showOutdated(this); return false;"> | ${_('show outdated comments')}</a> | |
257 | <a href="#" class="hideOutdatedComments" style="display: none" onclick="hideOutdated(this); return false;"> | ${_('hide outdated comments')}</a> |
|
257 | <a href="#" class="hideOutdatedComments" style="display: none" onclick="hideOutdated(this); return false;"> | ${_('hide outdated comments')}</a> | |
258 | %else: |
|
258 | %else: | |
259 | , ${_("%d Outdated") % c.outdated_cnt} |
|
259 | , ${_("%d Outdated") % c.outdated_cnt} | |
260 | %endif |
|
260 | %endif | |
261 | </td> |
|
261 | </td> | |
262 | </tr> |
|
262 | </tr> | |
263 |
|
263 | |||
264 | <tr> |
|
264 | <tr> | |
265 | <td></td> |
|
265 | <td></td> | |
266 | <td colspan="4"> |
|
266 | <td colspan="4"> | |
267 | % if c.at_version: |
|
267 | % if c.at_version: | |
268 | <pre> |
|
268 | <pre> | |
269 | Changed commits: |
|
269 | Changed commits: | |
270 | * added: ${len(c.changes.added)} |
|
270 | * added: ${len(c.changes.added)} | |
271 | * removed: ${len(c.changes.removed)} |
|
271 | * removed: ${len(c.changes.removed)} | |
272 |
|
272 | |||
273 | % if not (c.file_changes.added+c.file_changes.modified+c.file_changes.removed): |
|
273 | % if not (c.file_changes.added+c.file_changes.modified+c.file_changes.removed): | |
274 | No file changes found |
|
274 | No file changes found | |
275 | % else: |
|
275 | % else: | |
276 | Changed files: |
|
276 | Changed files: | |
277 | %for file_name in c.file_changes.added: |
|
277 | %for file_name in c.file_changes.added: | |
278 | * A <a href="#${'a_' + h.FID('', file_name)}">${file_name}</a> |
|
278 | * A <a href="#${'a_' + h.FID('', file_name)}">${file_name}</a> | |
279 | %endfor |
|
279 | %endfor | |
280 | %for file_name in c.file_changes.modified: |
|
280 | %for file_name in c.file_changes.modified: | |
281 | * M <a href="#${'a_' + h.FID('', file_name)}">${file_name}</a> |
|
281 | * M <a href="#${'a_' + h.FID('', file_name)}">${file_name}</a> | |
282 | %endfor |
|
282 | %endfor | |
283 | %for file_name in c.file_changes.removed: |
|
283 | %for file_name in c.file_changes.removed: | |
284 | * R ${file_name} |
|
284 | * R ${file_name} | |
285 | %endfor |
|
285 | %endfor | |
286 | % endif |
|
286 | % endif | |
287 | </pre> |
|
287 | </pre> | |
288 | % endif |
|
288 | % endif | |
289 | </td> |
|
289 | </td> | |
290 | </tr> |
|
290 | </tr> | |
291 | </table> |
|
291 | </table> | |
292 | % else: |
|
292 | % else: | |
293 | ${_('Pull request versions not available')}. |
|
293 | ${_('Pull request versions not available')}. | |
294 | % endif |
|
294 | % endif | |
295 | </div> |
|
295 | </div> | |
296 | </div> |
|
296 | </div> | |
297 |
|
297 | |||
298 | <div id="pr-save" class="field" style="display: none;"> |
|
298 | <div id="pr-save" class="field" style="display: none;"> | |
299 | <div class="label-summary"></div> |
|
299 | <div class="label-summary"></div> | |
300 | <div class="input"> |
|
300 | <div class="input"> | |
301 | <span id="edit_pull_request" class="btn btn-small">${_('Save Changes')}</span> |
|
301 | <span id="edit_pull_request" class="btn btn-small">${_('Save Changes')}</span> | |
302 | </div> |
|
302 | </div> | |
303 | </div> |
|
303 | </div> | |
304 | </div> |
|
304 | </div> | |
305 | </div> |
|
305 | </div> | |
306 | <div> |
|
306 | <div> | |
307 | ## AUTHOR |
|
307 | ## AUTHOR | |
308 | <div class="reviewers-title block-right"> |
|
308 | <div class="reviewers-title block-right"> | |
309 | <div class="pr-details-title"> |
|
309 | <div class="pr-details-title"> | |
310 | ${_('Author')} |
|
310 | ${_('Author')} | |
311 | </div> |
|
311 | </div> | |
312 | </div> |
|
312 | </div> | |
313 | <div class="block-right pr-details-content reviewers"> |
|
313 | <div class="block-right pr-details-content reviewers"> | |
314 | <ul class="group_members"> |
|
314 | <ul class="group_members"> | |
315 | <li> |
|
315 | <li> | |
316 | ${self.gravatar_with_user(c.pull_request.author.email, 16)} |
|
316 | ${self.gravatar_with_user(c.pull_request.author.email, 16)} | |
317 | </li> |
|
317 | </li> | |
318 | </ul> |
|
318 | </ul> | |
319 | </div> |
|
319 | </div> | |
320 | ## REVIEWERS |
|
320 | ## REVIEWERS | |
321 | <div class="reviewers-title block-right"> |
|
321 | <div class="reviewers-title block-right"> | |
322 | <div class="pr-details-title"> |
|
322 | <div class="pr-details-title"> | |
323 | ${_('Pull request reviewers')} |
|
323 | ${_('Pull request reviewers')} | |
324 | %if c.allowed_to_update: |
|
324 | %if c.allowed_to_update: | |
325 | <span id="open_edit_reviewers" class="block-right action_button">${_('Edit')}</span> |
|
325 | <span id="open_edit_reviewers" class="block-right action_button">${_('Edit')}</span> | |
326 | <span id="close_edit_reviewers" class="block-right action_button" style="display: none;">${_('Close')}</span> |
|
326 | <span id="close_edit_reviewers" class="block-right action_button" style="display: none;">${_('Close')}</span> | |
327 | %endif |
|
327 | %endif | |
328 | </div> |
|
328 | </div> | |
329 | </div> |
|
329 | </div> | |
330 | <div id="reviewers" class="block-right pr-details-content reviewers"> |
|
330 | <div id="reviewers" class="block-right pr-details-content reviewers"> | |
331 | ## members goes here ! |
|
331 | ## members goes here ! | |
332 | <input type="hidden" name="__start__" value="review_members:sequence"> |
|
332 | <input type="hidden" name="__start__" value="review_members:sequence"> | |
333 | <ul id="review_members" class="group_members"> |
|
333 | <ul id="review_members" class="group_members"> | |
334 | %for member,reasons,status in c.pull_request_reviewers: |
|
334 | %for member,reasons,status in c.pull_request_reviewers: | |
335 | <li id="reviewer_${member.user_id}"> |
|
335 | <li id="reviewer_${member.user_id}"> | |
336 | <div class="reviewers_member"> |
|
336 | <div class="reviewers_member"> | |
337 | <div class="reviewer_status tooltip" title="${h.tooltip(h.commit_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> |
|
337 | <div class="reviewer_status tooltip" title="${h.tooltip(h.commit_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> | |
338 | <div class="${'flag_status %s' % (status[0][1].status if status else 'not_reviewed')} pull-left reviewer_member_status"></div> |
|
338 | <div class="${'flag_status %s' % (status[0][1].status if status else 'not_reviewed')} pull-left reviewer_member_status"></div> | |
339 | </div> |
|
339 | </div> | |
340 | <div id="reviewer_${member.user_id}_name" class="reviewer_name"> |
|
340 | <div id="reviewer_${member.user_id}_name" class="reviewer_name"> | |
341 | ${self.gravatar_with_user(member.email, 16)} |
|
341 | ${self.gravatar_with_user(member.email, 16)} | |
342 | </div> |
|
342 | </div> | |
343 | <input type="hidden" name="__start__" value="reviewer:mapping"> |
|
343 | <input type="hidden" name="__start__" value="reviewer:mapping"> | |
344 | <input type="hidden" name="__start__" value="reasons:sequence"> |
|
344 | <input type="hidden" name="__start__" value="reasons:sequence"> | |
345 | %for reason in reasons: |
|
345 | %for reason in reasons: | |
346 | <div class="reviewer_reason">- ${reason}</div> |
|
346 | <div class="reviewer_reason">- ${reason}</div> | |
347 | <input type="hidden" name="reason" value="${reason}"> |
|
347 | <input type="hidden" name="reason" value="${reason}"> | |
348 |
|
348 | |||
349 | %endfor |
|
349 | %endfor | |
350 | <input type="hidden" name="__end__" value="reasons:sequence"> |
|
350 | <input type="hidden" name="__end__" value="reasons:sequence"> | |
351 | <input id="reviewer_${member.user_id}_input" type="hidden" value="${member.user_id}" name="user_id" /> |
|
351 | <input id="reviewer_${member.user_id}_input" type="hidden" value="${member.user_id}" name="user_id" /> | |
352 | <input type="hidden" name="__end__" value="reviewer:mapping"> |
|
352 | <input type="hidden" name="__end__" value="reviewer:mapping"> | |
353 | %if c.allowed_to_update: |
|
353 | %if c.allowed_to_update: | |
354 | <div class="reviewer_member_remove action_button" onclick="removeReviewMember(${member.user_id}, true)" style="visibility: hidden;"> |
|
354 | <div class="reviewer_member_remove action_button" onclick="removeReviewMember(${member.user_id}, true)" style="visibility: hidden;"> | |
355 | <i class="icon-remove-sign" ></i> |
|
355 | <i class="icon-remove-sign" ></i> | |
356 | </div> |
|
356 | </div> | |
357 | %endif |
|
357 | %endif | |
358 | </div> |
|
358 | </div> | |
359 | </li> |
|
359 | </li> | |
360 | %endfor |
|
360 | %endfor | |
361 | </ul> |
|
361 | </ul> | |
362 | <input type="hidden" name="__end__" value="review_members:sequence"> |
|
362 | <input type="hidden" name="__end__" value="review_members:sequence"> | |
363 | %if not c.pull_request.is_closed(): |
|
363 | %if not c.pull_request.is_closed(): | |
364 | <div id="add_reviewer_input" class='ac' style="display: none;"> |
|
364 | <div id="add_reviewer_input" class='ac' style="display: none;"> | |
365 | %if c.allowed_to_update: |
|
365 | %if c.allowed_to_update: | |
366 | <div class="reviewer_ac"> |
|
366 | <div class="reviewer_ac"> | |
367 | ${h.text('user', class_='ac-input', placeholder=_('Add reviewer'))} |
|
367 | ${h.text('user', class_='ac-input', placeholder=_('Add reviewer'))} | |
368 | <div id="reviewers_container"></div> |
|
368 | <div id="reviewers_container"></div> | |
369 | </div> |
|
369 | </div> | |
370 | <div> |
|
370 | <div> | |
371 | <span id="update_pull_request" class="btn btn-small">${_('Save Changes')}</span> |
|
371 | <span id="update_pull_request" class="btn btn-small">${_('Save Changes')}</span> | |
372 | </div> |
|
372 | </div> | |
373 | %endif |
|
373 | %endif | |
374 | </div> |
|
374 | </div> | |
375 | %endif |
|
375 | %endif | |
376 | </div> |
|
376 | </div> | |
377 | </div> |
|
377 | </div> | |
378 | </div> |
|
378 | </div> | |
379 | <div class="box"> |
|
379 | <div class="box"> | |
380 | ##DIFF |
|
380 | ##DIFF | |
381 | <div class="table" > |
|
381 | <div class="table" > | |
382 | <div id="changeset_compare_view_content"> |
|
382 | <div id="changeset_compare_view_content"> | |
383 | ##CS |
|
383 | ##CS | |
384 | % if c.missing_requirements: |
|
384 | % if c.missing_requirements: | |
385 | <div class="box"> |
|
385 | <div class="box"> | |
386 | <div class="alert alert-warning"> |
|
386 | <div class="alert alert-warning"> | |
387 | <div> |
|
387 | <div> | |
388 | <strong>${_('Missing requirements:')}</strong> |
|
388 | <strong>${_('Missing requirements:')}</strong> | |
389 | ${_('These commits cannot be displayed, because this repository uses the Mercurial largefiles extension, which was not enabled.')} |
|
389 | ${_('These commits cannot be displayed, because this repository uses the Mercurial largefiles extension, which was not enabled.')} | |
390 | </div> |
|
390 | </div> | |
391 | </div> |
|
391 | </div> | |
392 | </div> |
|
392 | </div> | |
393 | % elif c.missing_commits: |
|
393 | % elif c.missing_commits: | |
394 | <div class="box"> |
|
394 | <div class="box"> | |
395 | <div class="alert alert-warning"> |
|
395 | <div class="alert alert-warning"> | |
396 | <div> |
|
396 | <div> | |
397 | <strong>${_('Missing commits')}:</strong> |
|
397 | <strong>${_('Missing commits')}:</strong> | |
398 | ${_('This pull request cannot be displayed, because one or more commits no longer exist in the source repository.')} |
|
398 | ${_('This pull request cannot be displayed, because one or more commits no longer exist in the source repository.')} | |
399 | ${_('Please update this pull request, push the commits back into the source repository, or consider closing this pull request.')} |
|
399 | ${_('Please update this pull request, push the commits back into the source repository, or consider closing this pull request.')} | |
400 | </div> |
|
400 | </div> | |
401 | </div> |
|
401 | </div> | |
402 | </div> |
|
402 | </div> | |
403 | % endif |
|
403 | % endif | |
404 | <div class="compare_view_commits_title"> |
|
404 | <div class="compare_view_commits_title"> | |
405 |
|
405 | |||
406 | <div class="pull-left"> |
|
406 | <div class="pull-left"> | |
407 | <div class="btn-group"> |
|
407 | <div class="btn-group"> | |
408 | <a |
|
408 | <a | |
409 | class="btn" |
|
409 | class="btn" | |
410 | href="#" |
|
410 | href="#" | |
411 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> |
|
411 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> | |
412 | ${ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
412 | ${ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
413 | </a> |
|
413 | </a> | |
414 | <a |
|
414 | <a | |
415 | class="btn" |
|
415 | class="btn" | |
416 | href="#" |
|
416 | href="#" | |
417 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> |
|
417 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> | |
418 | ${ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
418 | ${ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
419 | </a> |
|
419 | </a> | |
420 | </div> |
|
420 | </div> | |
421 | </div> |
|
421 | </div> | |
422 |
|
422 | |||
423 | <div class="pull-right"> |
|
423 | <div class="pull-right"> | |
424 | % if c.allowed_to_update and not c.pull_request.is_closed(): |
|
424 | % if c.allowed_to_update and not c.pull_request.is_closed(): | |
425 | <a id="update_commits" class="btn btn-primary pull-right">${_('Update commits')}</a> |
|
425 | <a id="update_commits" class="btn btn-primary pull-right">${_('Update commits')}</a> | |
426 | % else: |
|
426 | % else: | |
427 | <a class="tooltip btn disabled pull-right" disabled="disabled" title="${_('Update is disabled for current view')}">${_('Update commits')}</a> |
|
427 | <a class="tooltip btn disabled pull-right" disabled="disabled" title="${_('Update is disabled for current view')}">${_('Update commits')}</a> | |
428 | % endif |
|
428 | % endif | |
429 |
|
429 | |||
430 | </div> |
|
430 | </div> | |
431 |
|
431 | |||
432 | </div> |
|
432 | </div> | |
433 | % if not c.missing_commits: |
|
433 | % if not c.missing_commits: | |
434 | <%include file="/compare/compare_commits.mako" /> |
|
434 | <%include file="/compare/compare_commits.mako" /> | |
435 | <div class="cs_files"> |
|
435 | <div class="cs_files"> | |
436 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> |
|
436 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> | |
437 | ${cbdiffs.render_diffset_menu()} |
|
437 | ${cbdiffs.render_diffset_menu()} | |
438 | ${cbdiffs.render_diffset( |
|
438 | ${cbdiffs.render_diffset( | |
439 | c.diffset, use_comments=True, |
|
439 | c.diffset, use_comments=True, | |
440 | collapse_when_files_over=30, |
|
440 | collapse_when_files_over=30, | |
441 | disable_new_comments=not c.allowed_to_comment, |
|
441 | disable_new_comments=not c.allowed_to_comment, | |
442 | deleted_files_comments=c.deleted_files_comments)} |
|
442 | deleted_files_comments=c.deleted_files_comments)} | |
443 |
|
443 | |||
|
444 | </div> | |||
|
445 | % endif | |||
444 | </div> |
|
446 | </div> | |
445 | % endif |
|
|||
446 | </div> |
|
447 | </div> | |
447 |
|
448 | |||
448 | ## template for inline comment form |
|
449 | ## template for inline comment form | |
449 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> |
|
450 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> | |
450 |
|
451 | |||
451 | ## render general comments |
|
452 | ## render general comments | |
452 | ${comment.generate_comments(include_pull_request=True, is_pull_request=True)} |
|
453 | ${comment.generate_comments(include_pull_request=True, is_pull_request=True)} | |
453 |
|
454 | |||
454 | % if not c.pull_request.is_closed(): |
|
455 | % if not c.pull_request.is_closed(): | |
455 | ## main comment form and it status |
|
456 | ## main comment form and it status | |
456 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, |
|
457 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, | |
457 | pull_request_id=c.pull_request.pull_request_id), |
|
458 | pull_request_id=c.pull_request.pull_request_id), | |
458 | c.pull_request_review_status, |
|
459 | c.pull_request_review_status, | |
459 | is_pull_request=True, change_status=c.allowed_to_change_status)} |
|
460 | is_pull_request=True, change_status=c.allowed_to_change_status)} | |
460 | %endif |
|
461 | %endif | |
461 |
|
462 | |||
462 | <script type="text/javascript"> |
|
463 | <script type="text/javascript"> | |
463 | if (location.hash) { |
|
464 | if (location.hash) { | |
464 | var result = splitDelimitedHash(location.hash); |
|
465 | var result = splitDelimitedHash(location.hash); | |
465 | var line = $('html').find(result.loc); |
|
466 | var line = $('html').find(result.loc); | |
466 | if (line.length > 0){ |
|
467 | if (line.length > 0){ | |
467 | offsetScroll(line, 70); |
|
468 | offsetScroll(line, 70); | |
468 | } |
|
469 | } | |
469 | } |
|
470 | } | |
470 | $(function(){ |
|
471 | $(function(){ | |
471 | ReviewerAutoComplete('user'); |
|
472 | ReviewerAutoComplete('user'); | |
472 | // custom code mirror |
|
473 | // custom code mirror | |
473 | var codeMirrorInstance = initPullRequestsCodeMirror('#pr-description-input'); |
|
474 | var codeMirrorInstance = initPullRequestsCodeMirror('#pr-description-input'); | |
474 |
|
475 | |||
475 | var PRDetails = { |
|
476 | var PRDetails = { | |
476 | editButton: $('#open_edit_pullrequest'), |
|
477 | editButton: $('#open_edit_pullrequest'), | |
477 | closeButton: $('#close_edit_pullrequest'), |
|
478 | closeButton: $('#close_edit_pullrequest'), | |
478 | deleteButton: $('#delete_pullrequest'), |
|
479 | deleteButton: $('#delete_pullrequest'), | |
479 | viewFields: $('#pr-desc, #pr-title'), |
|
480 | viewFields: $('#pr-desc, #pr-title'), | |
480 | editFields: $('#pr-desc-edit, #pr-title-edit, #pr-save'), |
|
481 | editFields: $('#pr-desc-edit, #pr-title-edit, #pr-save'), | |
481 |
|
482 | |||
482 | init: function() { |
|
483 | init: function() { | |
483 | var that = this; |
|
484 | var that = this; | |
484 | this.editButton.on('click', function(e) { that.edit(); }); |
|
485 | this.editButton.on('click', function(e) { that.edit(); }); | |
485 | this.closeButton.on('click', function(e) { that.view(); }); |
|
486 | this.closeButton.on('click', function(e) { that.view(); }); | |
486 | }, |
|
487 | }, | |
487 |
|
488 | |||
488 | edit: function(event) { |
|
489 | edit: function(event) { | |
489 | this.viewFields.hide(); |
|
490 | this.viewFields.hide(); | |
490 | this.editButton.hide(); |
|
491 | this.editButton.hide(); | |
491 | this.deleteButton.hide(); |
|
492 | this.deleteButton.hide(); | |
492 | this.closeButton.show(); |
|
493 | this.closeButton.show(); | |
493 | this.editFields.show(); |
|
494 | this.editFields.show(); | |
494 | codeMirrorInstance.refresh(); |
|
495 | codeMirrorInstance.refresh(); | |
495 | }, |
|
496 | }, | |
496 |
|
497 | |||
497 | view: function(event) { |
|
498 | view: function(event) { | |
498 | this.editButton.show(); |
|
499 | this.editButton.show(); | |
499 | this.deleteButton.show(); |
|
500 | this.deleteButton.show(); | |
500 | this.editFields.hide(); |
|
501 | this.editFields.hide(); | |
501 | this.closeButton.hide(); |
|
502 | this.closeButton.hide(); | |
502 | this.viewFields.show(); |
|
503 | this.viewFields.show(); | |
503 | } |
|
504 | } | |
504 | }; |
|
505 | }; | |
505 |
|
506 | |||
506 | var ReviewersPanel = { |
|
507 | var ReviewersPanel = { | |
507 | editButton: $('#open_edit_reviewers'), |
|
508 | editButton: $('#open_edit_reviewers'), | |
508 | closeButton: $('#close_edit_reviewers'), |
|
509 | closeButton: $('#close_edit_reviewers'), | |
509 | addButton: $('#add_reviewer_input'), |
|
510 | addButton: $('#add_reviewer_input'), | |
510 | removeButtons: $('.reviewer_member_remove'), |
|
511 | removeButtons: $('.reviewer_member_remove'), | |
511 |
|
512 | |||
512 | init: function() { |
|
513 | init: function() { | |
513 | var that = this; |
|
514 | var that = this; | |
514 | this.editButton.on('click', function(e) { that.edit(); }); |
|
515 | this.editButton.on('click', function(e) { that.edit(); }); | |
515 | this.closeButton.on('click', function(e) { that.close(); }); |
|
516 | this.closeButton.on('click', function(e) { that.close(); }); | |
516 | }, |
|
517 | }, | |
517 |
|
518 | |||
518 | edit: function(event) { |
|
519 | edit: function(event) { | |
519 | this.editButton.hide(); |
|
520 | this.editButton.hide(); | |
520 | this.closeButton.show(); |
|
521 | this.closeButton.show(); | |
521 | this.addButton.show(); |
|
522 | this.addButton.show(); | |
522 | this.removeButtons.css('visibility', 'visible'); |
|
523 | this.removeButtons.css('visibility', 'visible'); | |
523 | }, |
|
524 | }, | |
524 |
|
525 | |||
525 | close: function(event) { |
|
526 | close: function(event) { | |
526 | this.editButton.show(); |
|
527 | this.editButton.show(); | |
527 | this.closeButton.hide(); |
|
528 | this.closeButton.hide(); | |
528 | this.addButton.hide(); |
|
529 | this.addButton.hide(); | |
529 | this.removeButtons.css('visibility', 'hidden'); |
|
530 | this.removeButtons.css('visibility', 'hidden'); | |
530 | } |
|
531 | } | |
531 | }; |
|
532 | }; | |
532 |
|
533 | |||
533 | PRDetails.init(); |
|
534 | PRDetails.init(); | |
534 | ReviewersPanel.init(); |
|
535 | ReviewersPanel.init(); | |
535 |
|
536 | |||
536 | showOutdated = function(self){ |
|
537 | showOutdated = function(self){ | |
537 | $('.comment-outdated').show(); |
|
538 | $('.comment-outdated').show(); | |
538 | $('.filediff-outdated').show(); |
|
539 | $('.filediff-outdated').show(); | |
539 | $('.showOutdatedComments').hide(); |
|
540 | $('.showOutdatedComments').hide(); | |
540 | $('.hideOutdatedComments').show(); |
|
541 | $('.hideOutdatedComments').show(); | |
541 |
|
542 | |||
542 | }; |
|
543 | }; | |
543 |
|
544 | |||
544 | hideOutdated = function(self){ |
|
545 | hideOutdated = function(self){ | |
545 | $('.comment-outdated').hide(); |
|
546 | $('.comment-outdated').hide(); | |
546 | $('.filediff-outdated').hide(); |
|
547 | $('.filediff-outdated').hide(); | |
547 | $('.hideOutdatedComments').hide(); |
|
548 | $('.hideOutdatedComments').hide(); | |
548 | $('.showOutdatedComments').show(); |
|
549 | $('.showOutdatedComments').show(); | |
549 | }; |
|
550 | }; | |
550 |
|
551 | |||
551 | $('#show-outdated-comments').on('click', function(e){ |
|
552 | $('#show-outdated-comments').on('click', function(e){ | |
552 | var button = $(this); |
|
553 | var button = $(this); | |
553 | var outdated = $('.comment-outdated'); |
|
554 | var outdated = $('.comment-outdated'); | |
554 |
|
555 | |||
555 | if (button.html() === "(Show)") { |
|
556 | if (button.html() === "(Show)") { | |
556 | button.html("(Hide)"); |
|
557 | button.html("(Hide)"); | |
557 | outdated.show(); |
|
558 | outdated.show(); | |
558 | } else { |
|
559 | } else { | |
559 | button.html("(Show)"); |
|
560 | button.html("(Show)"); | |
560 | outdated.hide(); |
|
561 | outdated.hide(); | |
561 | } |
|
562 | } | |
562 | }); |
|
563 | }); | |
563 |
|
564 | |||
564 | $('.show-inline-comments').on('change', function(e){ |
|
565 | $('.show-inline-comments').on('change', function(e){ | |
565 | var show = 'none'; |
|
566 | var show = 'none'; | |
566 | var target = e.currentTarget; |
|
567 | var target = e.currentTarget; | |
567 | if(target.checked){ |
|
568 | if(target.checked){ | |
568 | show = '' |
|
569 | show = '' | |
569 | } |
|
570 | } | |
570 | var boxid = $(target).attr('id_for'); |
|
571 | var boxid = $(target).attr('id_for'); | |
571 | var comments = $('#{0} .inline-comments'.format(boxid)); |
|
572 | var comments = $('#{0} .inline-comments'.format(boxid)); | |
572 | var fn_display = function(idx){ |
|
573 | var fn_display = function(idx){ | |
573 | $(this).css('display', show); |
|
574 | $(this).css('display', show); | |
574 | }; |
|
575 | }; | |
575 | $(comments).each(fn_display); |
|
576 | $(comments).each(fn_display); | |
576 | var btns = $('#{0} .inline-comments-button'.format(boxid)); |
|
577 | var btns = $('#{0} .inline-comments-button'.format(boxid)); | |
577 | $(btns).each(fn_display); |
|
578 | $(btns).each(fn_display); | |
578 | }); |
|
579 | }); | |
579 |
|
580 | |||
580 | $('#merge_pull_request_form').submit(function() { |
|
581 | $('#merge_pull_request_form').submit(function() { | |
581 | if (!$('#merge_pull_request').attr('disabled')) { |
|
582 | if (!$('#merge_pull_request').attr('disabled')) { | |
582 | $('#merge_pull_request').attr('disabled', 'disabled'); |
|
583 | $('#merge_pull_request').attr('disabled', 'disabled'); | |
583 | } |
|
584 | } | |
584 | return true; |
|
585 | return true; | |
585 | }); |
|
586 | }); | |
586 |
|
587 | |||
587 | $('#edit_pull_request').on('click', function(e){ |
|
588 | $('#edit_pull_request').on('click', function(e){ | |
588 | var title = $('#pr-title-input').val(); |
|
589 | var title = $('#pr-title-input').val(); | |
589 | var description = codeMirrorInstance.getValue(); |
|
590 | var description = codeMirrorInstance.getValue(); | |
590 | editPullRequest( |
|
591 | editPullRequest( | |
591 | "${c.repo_name}", "${c.pull_request.pull_request_id}", |
|
592 | "${c.repo_name}", "${c.pull_request.pull_request_id}", | |
592 | title, description); |
|
593 | title, description); | |
593 | }); |
|
594 | }); | |
594 |
|
595 | |||
595 | $('#update_pull_request').on('click', function(e){ |
|
596 | $('#update_pull_request').on('click', function(e){ | |
596 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
597 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
597 | }); |
|
598 | }); | |
598 |
|
599 | |||
599 | $('#update_commits').on('click', function(e){ |
|
600 | $('#update_commits').on('click', function(e){ | |
600 | var isDisabled = !$(e.currentTarget).attr('disabled'); |
|
601 | var isDisabled = !$(e.currentTarget).attr('disabled'); | |
601 | $(e.currentTarget).text(_gettext('Updating...')); |
|
602 | $(e.currentTarget).text(_gettext('Updating...')); | |
602 | $(e.currentTarget).attr('disabled', 'disabled'); |
|
603 | $(e.currentTarget).attr('disabled', 'disabled'); | |
603 | if(isDisabled){ |
|
604 | if(isDisabled){ | |
604 | updateCommits("${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
605 | updateCommits("${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
605 | } |
|
606 | } | |
606 |
|
607 | |||
607 | }); |
|
608 | }); | |
608 | // fixing issue with caches on firefox |
|
609 | // fixing issue with caches on firefox | |
609 | $('#update_commits').removeAttr("disabled"); |
|
610 | $('#update_commits').removeAttr("disabled"); | |
610 |
|
611 | |||
611 | $('#close_pull_request').on('click', function(e){ |
|
612 | $('#close_pull_request').on('click', function(e){ | |
612 | closePullRequest("${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
613 | closePullRequest("${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
613 | }); |
|
614 | }); | |
614 |
|
615 | |||
615 | $('.show-inline-comments').on('click', function(e){ |
|
616 | $('.show-inline-comments').on('click', function(e){ | |
616 | var boxid = $(this).attr('data-comment-id'); |
|
617 | var boxid = $(this).attr('data-comment-id'); | |
617 | var button = $(this); |
|
618 | var button = $(this); | |
618 |
|
619 | |||
619 | if(button.hasClass("comments-visible")) { |
|
620 | if(button.hasClass("comments-visible")) { | |
620 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
621 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ | |
621 | $(this).hide(); |
|
622 | $(this).hide(); | |
622 | }); |
|
623 | }); | |
623 | button.removeClass("comments-visible"); |
|
624 | button.removeClass("comments-visible"); | |
624 | } else { |
|
625 | } else { | |
625 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
626 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ | |
626 | $(this).show(); |
|
627 | $(this).show(); | |
627 | }); |
|
628 | }); | |
628 | button.addClass("comments-visible"); |
|
629 | button.addClass("comments-visible"); | |
629 | } |
|
630 | } | |
630 | }); |
|
631 | }); | |
631 | }) |
|
632 | }) | |
632 | </script> |
|
633 | </script> | |
633 |
|
634 | |||
634 | </div> |
|
635 | </div> | |
635 | </div> |
|
636 | </div> | |
636 |
|
637 | |||
637 | </%def> |
|
638 | </%def> |
@@ -1,101 +1,101 b'' | |||||
1 | <%def name="highlight_text_file(terms, text, url, line_context=3, |
|
1 | <%def name="highlight_text_file(terms, text, url, line_context=3, | |
2 | max_lines=10, |
|
2 | max_lines=10, | |
3 | mimetype=None, filepath=None)"> |
|
3 | mimetype=None, filepath=None)"> | |
4 | <% |
|
4 | <% | |
5 | lines = text.split('\n') |
|
5 | lines = text.split('\n') | |
6 | lines_of_interest = set() |
|
6 | lines_of_interest = set() | |
7 | matching_lines = h.get_matching_line_offsets(lines, terms) |
|
7 | matching_lines = h.get_matching_line_offsets(lines, terms) | |
8 | shown_matching_lines = 0 |
|
8 | shown_matching_lines = 0 | |
9 |
|
9 | |||
10 | for line_number in matching_lines: |
|
10 | for line_number in matching_lines: | |
11 | if len(lines_of_interest) < max_lines: |
|
11 | if len(lines_of_interest) < max_lines: | |
12 | lines_of_interest |= set(range( |
|
12 | lines_of_interest |= set(range( | |
13 | max(line_number - line_context, 0), |
|
13 | max(line_number - line_context, 0), | |
14 | min(line_number + line_context, len(lines) + 1))) |
|
14 | min(line_number + line_context, len(lines) + 1))) | |
15 | shown_matching_lines += 1 |
|
15 | shown_matching_lines += 1 | |
16 |
|
16 | |||
17 | %> |
|
17 | %> | |
18 | ${h.code_highlight( |
|
18 | ${h.code_highlight( | |
19 | text, |
|
19 | text, | |
20 | h.get_lexer_safe( |
|
20 | h.get_lexer_safe( | |
21 | mimetype=mimetype, |
|
21 | mimetype=mimetype, | |
22 | filepath=filepath, |
|
22 | filepath=filepath, | |
23 | ), |
|
23 | ), | |
24 | h.SearchContentCodeHtmlFormatter( |
|
24 | h.SearchContentCodeHtmlFormatter( | |
25 | linenos=True, |
|
25 | linenos=True, | |
26 | cssclass="code-highlight", |
|
26 | cssclass="code-highlight", | |
27 | url=url, |
|
27 | url=url, | |
28 | query_terms=terms, |
|
28 | query_terms=terms, | |
29 | only_line_numbers=lines_of_interest |
|
29 | only_line_numbers=lines_of_interest | |
30 | ))|n} |
|
30 | ))|n} | |
31 | %if len(matching_lines) > shown_matching_lines: |
|
31 | %if len(matching_lines) > shown_matching_lines: | |
32 | <a href="${url}"> |
|
32 | <a href="${url}"> | |
33 | ${len(matching_lines) - shown_matching_lines} ${_('more matches in this file')} |
|
33 | ${len(matching_lines) - shown_matching_lines} ${_('more matches in this file')} | |
34 |
</ |
|
34 | </a> | |
35 | %endif |
|
35 | %endif | |
36 | </%def> |
|
36 | </%def> | |
37 |
|
37 | |||
38 | <div class="search-results"> |
|
38 | <div class="search-results"> | |
39 | %for entry in c.formatted_results: |
|
39 | %for entry in c.formatted_results: | |
40 | ## search results are additionally filtered, and this check is just a safe gate |
|
40 | ## search results are additionally filtered, and this check is just a safe gate | |
41 | % if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results content check'): |
|
41 | % if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results content check'): | |
42 | <div id="codeblock" class="codeblock"> |
|
42 | <div id="codeblock" class="codeblock"> | |
43 | <div class="codeblock-header"> |
|
43 | <div class="codeblock-header"> | |
44 | <h2> |
|
44 | <h2> | |
45 | %if h.get_repo_type_by_name(entry.get('repository')) == 'hg': |
|
45 | %if h.get_repo_type_by_name(entry.get('repository')) == 'hg': | |
46 | <i class="icon-hg"></i> |
|
46 | <i class="icon-hg"></i> | |
47 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'git': |
|
47 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'git': | |
48 | <i class="icon-git"></i> |
|
48 | <i class="icon-git"></i> | |
49 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'svn': |
|
49 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'svn': | |
50 | <i class="icon-svn"></i> |
|
50 | <i class="icon-svn"></i> | |
51 | %endif |
|
51 | %endif | |
52 | ${h.link_to(entry['repository'], h.url('summary_home',repo_name=entry['repository']))} |
|
52 | ${h.link_to(entry['repository'], h.url('summary_home',repo_name=entry['repository']))} | |
53 | </h2> |
|
53 | </h2> | |
54 | <div class="stats"> |
|
54 | <div class="stats"> | |
55 | ${h.link_to(h.literal(entry['f_path']), h.url('files_home',repo_name=entry['repository'],revision=entry.get('commit_id', 'tip'),f_path=entry['f_path']))} |
|
55 | ${h.link_to(h.literal(entry['f_path']), h.url('files_home',repo_name=entry['repository'],revision=entry.get('commit_id', 'tip'),f_path=entry['f_path']))} | |
56 | %if entry.get('lines'): |
|
56 | %if entry.get('lines'): | |
57 | | ${entry.get('lines', 0.)} ${ungettext('line', 'lines', entry.get('lines', 0.))} |
|
57 | | ${entry.get('lines', 0.)} ${ungettext('line', 'lines', entry.get('lines', 0.))} | |
58 | %endif |
|
58 | %endif | |
59 | %if entry.get('size'): |
|
59 | %if entry.get('size'): | |
60 | | ${h.format_byte_size_binary(entry['size'])} |
|
60 | | ${h.format_byte_size_binary(entry['size'])} | |
61 | %endif |
|
61 | %endif | |
62 | %if entry.get('mimetype'): |
|
62 | %if entry.get('mimetype'): | |
63 | | ${entry.get('mimetype', "unknown mimetype")} |
|
63 | | ${entry.get('mimetype', "unknown mimetype")} | |
64 | %endif |
|
64 | %endif | |
65 | </div> |
|
65 | </div> | |
66 | <div class="buttons"> |
|
66 | <div class="buttons"> | |
67 | <a id="file_history_overview_full" href="${h.url('changelog_file_home',repo_name=entry.get('repository',''),revision=entry.get('commit_id', 'tip'),f_path=entry.get('f_path',''))}"> |
|
67 | <a id="file_history_overview_full" href="${h.url('changelog_file_home',repo_name=entry.get('repository',''),revision=entry.get('commit_id', 'tip'),f_path=entry.get('f_path',''))}"> | |
68 | ${_('Show Full History')} |
|
68 | ${_('Show Full History')} | |
69 | </a> | |
|
69 | </a> | | |
70 | ${h.link_to(_('Annotation'), h.url('files_annotate_home', repo_name=entry.get('repository',''),revision=entry.get('commit_id', 'tip'),f_path=entry.get('f_path','')))} |
|
70 | ${h.link_to(_('Annotation'), h.url('files_annotate_home', repo_name=entry.get('repository',''),revision=entry.get('commit_id', 'tip'),f_path=entry.get('f_path','')))} | |
71 | | ${h.link_to(_('Raw'), h.url('files_raw_home', repo_name=entry.get('repository',''),revision=entry.get('commit_id', 'tip'),f_path=entry.get('f_path','')))} |
|
71 | | ${h.link_to(_('Raw'), h.url('files_raw_home', repo_name=entry.get('repository',''),revision=entry.get('commit_id', 'tip'),f_path=entry.get('f_path','')))} | |
72 | | <a href="${h.url('files_rawfile_home',repo_name=entry.get('repository',''),revision=entry.get('commit_id', 'tip'),f_path=entry.get('f_path',''))}"> |
|
72 | | <a href="${h.url('files_rawfile_home',repo_name=entry.get('repository',''),revision=entry.get('commit_id', 'tip'),f_path=entry.get('f_path',''))}"> | |
73 | ${_('Download')} |
|
73 | ${_('Download')} | |
74 | </a> |
|
74 | </a> | |
75 | </div> |
|
75 | </div> | |
76 | </div> |
|
76 | </div> | |
77 | <div class="code-body search-code-body"> |
|
77 | <div class="code-body search-code-body"> | |
78 | ${highlight_text_file(c.cur_query, entry['content'], |
|
78 | ${highlight_text_file(c.cur_query, entry['content'], | |
79 | url=h.url('files_home',repo_name=entry['repository'],revision=entry.get('commit_id', 'tip'),f_path=entry['f_path']), |
|
79 | url=h.url('files_home',repo_name=entry['repository'],revision=entry.get('commit_id', 'tip'),f_path=entry['f_path']), | |
80 | mimetype=entry.get('mimetype'), filepath=entry.get('path'))} |
|
80 | mimetype=entry.get('mimetype'), filepath=entry.get('path'))} | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | % endif |
|
83 | % endif | |
84 | %endfor |
|
84 | %endfor | |
85 | </div> |
|
85 | </div> | |
86 | %if c.cur_query and c.formatted_results: |
|
86 | %if c.cur_query and c.formatted_results: | |
87 | <div class="pagination-wh pagination-left" > |
|
87 | <div class="pagination-wh pagination-left" > | |
88 | ${c.formatted_results.pager('$link_previous ~2~ $link_next')} |
|
88 | ${c.formatted_results.pager('$link_previous ~2~ $link_next')} | |
89 | </div> |
|
89 | </div> | |
90 | %endif |
|
90 | %endif | |
91 |
|
91 | |||
92 | %if c.cur_query: |
|
92 | %if c.cur_query: | |
93 | <script type="text/javascript"> |
|
93 | <script type="text/javascript"> | |
94 | $(function(){ |
|
94 | $(function(){ | |
95 | $(".code").mark( |
|
95 | $(".code").mark( | |
96 | '${' '.join(h.normalize_text_for_matching(c.cur_query).split())}', |
|
96 | '${' '.join(h.normalize_text_for_matching(c.cur_query).split())}', | |
97 | {"className": 'match', |
|
97 | {"className": 'match', | |
98 | }); |
|
98 | }); | |
99 | }) |
|
99 | }) | |
100 | </script> |
|
100 | </script> | |
101 | %endif No newline at end of file |
|
101 | %endif |
@@ -1,202 +1,202 b'' | |||||
1 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> |
|
1 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> | |
2 | <span class="branchtag tag"> |
|
2 | <span class="branchtag tag"> | |
3 | <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
3 | <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"> | |
4 | <i class="icon-branch"></i>${ungettext( |
|
4 | <i class="icon-branch"></i>${ungettext( | |
5 | '%(num)s Branch','%(num)s Branches', len(branches)) % {'num': len(branches)}}</a> |
|
5 | '%(num)s Branch','%(num)s Branches', len(branches)) % {'num': len(branches)}}</a> | |
6 | </span> |
|
6 | </span> | |
7 |
|
7 | |||
8 | %if closed_branches: |
|
8 | %if closed_branches: | |
9 | <span class="branchtag tag"> |
|
9 | <span class="branchtag tag"> | |
10 | <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
10 | <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"> | |
11 | <i class="icon-branch"></i>${ungettext( |
|
11 | <i class="icon-branch"></i>${ungettext( | |
12 | '%(num)s Closed Branch', '%(num)s Closed Branches', len(closed_branches)) % {'num': len(closed_branches)}}</a> |
|
12 | '%(num)s Closed Branch', '%(num)s Closed Branches', len(closed_branches)) % {'num': len(closed_branches)}}</a> | |
13 | </span> |
|
13 | </span> | |
14 | %endif |
|
14 | %endif | |
15 |
|
15 | |||
16 | <span class="tagtag tag"> |
|
16 | <span class="tagtag tag"> | |
17 | <a href="${h.url('tags_home',repo_name=c.repo_name)}" class="childs"> |
|
17 | <a href="${h.url('tags_home',repo_name=c.repo_name)}" class="childs"> | |
18 | <i class="icon-tag"></i>${ungettext( |
|
18 | <i class="icon-tag"></i>${ungettext( | |
19 | '%(num)s Tag', '%(num)s Tags', len(tags)) % {'num': len(tags)}}</a> |
|
19 | '%(num)s Tag', '%(num)s Tags', len(tags)) % {'num': len(tags)}}</a> | |
20 | </span> |
|
20 | </span> | |
21 |
|
21 | |||
22 | %if bookmarks: |
|
22 | %if bookmarks: | |
23 | <span class="booktag tag"> |
|
23 | <span class="booktag tag"> | |
24 | <a href="${h.url('bookmarks_home',repo_name=c.repo_name)}" class="childs"> |
|
24 | <a href="${h.url('bookmarks_home',repo_name=c.repo_name)}" class="childs"> | |
25 | <i class="icon-bookmark"></i>${ungettext( |
|
25 | <i class="icon-bookmark"></i>${ungettext( | |
26 | '%(num)s Bookmark', '%(num)s Bookmarks', len(bookmarks)) % {'num': len(bookmarks)}}</a> |
|
26 | '%(num)s Bookmark', '%(num)s Bookmarks', len(bookmarks)) % {'num': len(bookmarks)}}</a> | |
27 | </span> |
|
27 | </span> | |
28 | %endif |
|
28 | %endif | |
29 | </%def> |
|
29 | </%def> | |
30 |
|
30 | |||
31 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> |
|
31 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> | |
32 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
32 | <% summary = lambda n:{False:'summary-short'}.get(n) %> | |
33 |
|
33 | |||
34 | <div id="summary-menu-stats" class="summary-detail"> |
|
34 | <div id="summary-menu-stats" class="summary-detail"> | |
35 | <div class="summary-detail-header"> |
|
35 | <div class="summary-detail-header"> | |
36 | <div class="breadcrumbs files_location"> |
|
36 | <div class="breadcrumbs files_location"> | |
37 | <h4> |
|
37 | <h4> | |
38 | ${breadcrumbs_links} |
|
38 | ${breadcrumbs_links} | |
39 | </h4> |
|
39 | </h4> | |
40 | </div> |
|
40 | </div> | |
41 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> |
|
41 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> | |
42 | ${_('Show More')} |
|
42 | ${_('Show More')} | |
43 | </div> |
|
43 | </div> | |
44 | </div> |
|
44 | </div> | |
45 |
|
45 | |||
46 | <div class="fieldset"> |
|
46 | <div class="fieldset"> | |
47 | %if h.is_svn_without_proxy(c.rhodecode_db_repo): |
|
47 | %if h.is_svn_without_proxy(c.rhodecode_db_repo): | |
48 | <div class="left-label disabled"> |
|
48 | <div class="left-label disabled"> | |
49 | ${_('Read-only url')}: |
|
49 | ${_('Read-only url')}: | |
50 | </div> |
|
50 | </div> | |
51 | <div class="right-content disabled"> |
|
51 | <div class="right-content disabled"> | |
52 | <input type="text" id="clone_url" disabled value="${c.clone_repo_url}"/> |
|
52 | <input type="text" id="clone_url" disabled value="${c.clone_repo_url}"/> | |
53 | <input type="text" id="clone_url_id" disabled value="${c.clone_repo_url_id}" style="display: none;"/> |
|
53 | <input type="text" id="clone_url_id" disabled value="${c.clone_repo_url_id}" style="display: none;"/> | |
54 | <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a> |
|
54 | <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a> | |
55 | <a id="clone_by_id" class="clone">${_('Show by ID')}</a> |
|
55 | <a id="clone_by_id" class="clone">${_('Show by ID')}</a> | |
56 | <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p> |
|
56 | <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p> | |
57 | </div> |
|
57 | </div> | |
58 | %else: |
|
58 | %else: | |
59 | <div class="left-label"> |
|
59 | <div class="left-label"> | |
60 | ${_('Clone url')}: |
|
60 | ${_('Clone url')}: | |
61 | </div> |
|
61 | </div> | |
62 | <div class="right-content"> |
|
62 | <div class="right-content"> | |
63 | <input type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> |
|
63 | <input type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> | |
64 | <input type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}" style="display: none;"/> |
|
64 | <input type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}" style="display: none;"/> | |
65 | <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a> |
|
65 | <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a> | |
66 | <a id="clone_by_id" class="clone">${_('Show by ID')}</a> |
|
66 | <a id="clone_by_id" class="clone">${_('Show by ID')}</a> | |
67 | </div> |
|
67 | </div> | |
68 | %endif |
|
68 | %endif | |
69 | </div> |
|
69 | </div> | |
70 |
|
70 | |||
71 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
71 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
72 | <div class="left-label"> |
|
72 | <div class="left-label"> | |
73 | ${_('Description')}: |
|
73 | ${_('Description')}: | |
74 | </div> |
|
74 | </div> | |
75 | <div class="right-content"> |
|
75 | <div class="right-content"> | |
76 | %if c.visual.stylify_metatags: |
|
76 | %if c.visual.stylify_metatags: | |
77 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.escaped_stylize(c.rhodecode_db_repo.description))}</div> |
|
77 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.escaped_stylize(c.rhodecode_db_repo.description))}</div> | |
78 | %else: |
|
78 | %else: | |
79 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.html_escape(c.rhodecode_db_repo.description))}</div> |
|
79 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.html_escape(c.rhodecode_db_repo.description))}</div> | |
80 | %endif |
|
80 | %endif | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 |
|
83 | |||
84 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
84 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
85 | <div class="left-label"> |
|
85 | <div class="left-label"> | |
86 | ${_('Information')}: |
|
86 | ${_('Information')}: | |
87 | </div> |
|
87 | </div> | |
88 | <div class="right-content"> |
|
88 | <div class="right-content"> | |
89 |
|
89 | |||
90 | <div class="repo-size"> |
|
90 | <div class="repo-size"> | |
91 | <%commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision')%> |
|
91 | <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %> | |
92 |
|
92 | |||
93 | ## commits |
|
93 | ## commits | |
94 | % if commit_rev == -1: |
|
94 | % if commit_rev == -1: | |
95 | ${ungettext('%(num)s Commit', '%(num)s Commits', 0) % {'num': 0}}, |
|
95 | ${ungettext('%(num)s Commit', '%(num)s Commits', 0) % {'num': 0}}, | |
96 | % else: |
|
96 | % else: | |
97 | <a href="${h.url('changelog_home', repo_name=c.repo_name)}"> |
|
97 | <a href="${h.url('changelog_home', repo_name=c.repo_name)}"> | |
98 | ${ungettext('%(num)s Commit', '%(num)s Commits', commit_rev) % {'num': commit_rev}}</a>, |
|
98 | ${ungettext('%(num)s Commit', '%(num)s Commits', commit_rev) % {'num': commit_rev}}</a>, | |
99 | % endif |
|
99 | % endif | |
100 |
|
100 | |||
101 | ## forks |
|
101 | ## forks | |
102 | <a title="${_('Number of Repository Forks')}" href="${h.url('repo_forks_home', repo_name=c.repo_name)}"> |
|
102 | <a title="${_('Number of Repository Forks')}" href="${h.url('repo_forks_home', repo_name=c.repo_name)}"> | |
103 | ${c.repository_forks} ${ungettext('Fork', 'Forks', c.repository_forks)}</a>, |
|
103 | ${c.repository_forks} ${ungettext('Fork', 'Forks', c.repository_forks)}</a>, | |
104 |
|
104 | |||
105 | ## repo size |
|
105 | ## repo size | |
106 | % if commit_rev == -1: |
|
106 | % if commit_rev == -1: | |
107 | <span class="stats-bullet">0 B</span> |
|
107 | <span class="stats-bullet">0 B</span> | |
108 | % else: |
|
108 | % else: | |
109 | <span class="stats-bullet" id="repo_size_container"> |
|
109 | <span class="stats-bullet" id="repo_size_container"> | |
110 | ${_('Calculating Repository Size...')} |
|
110 | ${_('Calculating Repository Size...')} | |
111 | </span> |
|
111 | </span> | |
112 | % endif |
|
112 | % endif | |
113 | </div> |
|
113 | </div> | |
114 |
|
114 | |||
115 | <div class="commit-info"> |
|
115 | <div class="commit-info"> | |
116 | <div class="tags"> |
|
116 | <div class="tags"> | |
117 | % if c.rhodecode_repo: |
|
117 | % if c.rhodecode_repo: | |
118 | ${refs_counters( |
|
118 | ${refs_counters( | |
119 | c.rhodecode_repo.branches, |
|
119 | c.rhodecode_repo.branches, | |
120 | c.rhodecode_repo.branches_closed, |
|
120 | c.rhodecode_repo.branches_closed, | |
121 | c.rhodecode_repo.tags, |
|
121 | c.rhodecode_repo.tags, | |
122 | c.rhodecode_repo.bookmarks)} |
|
122 | c.rhodecode_repo.bookmarks)} | |
123 | % else: |
|
123 | % else: | |
124 | ## missing requirements can make c.rhodecode_repo None |
|
124 | ## missing requirements can make c.rhodecode_repo None | |
125 | ${refs_counters([], [], [], [])} |
|
125 | ${refs_counters([], [], [], [])} | |
126 | % endif |
|
126 | % endif | |
127 | </div> |
|
127 | </div> | |
128 | </div> |
|
128 | </div> | |
129 |
|
129 | |||
130 | </div> |
|
130 | </div> | |
131 | </div> |
|
131 | </div> | |
132 |
|
132 | |||
133 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
133 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
134 | <div class="left-label"> |
|
134 | <div class="left-label"> | |
135 | ${_('Statistics')}: |
|
135 | ${_('Statistics')}: | |
136 | </div> |
|
136 | </div> | |
137 | <div class="right-content"> |
|
137 | <div class="right-content"> | |
138 | <div class="input ${summary(c.show_stats)} statistics"> |
|
138 | <div class="input ${summary(c.show_stats)} statistics"> | |
139 | % if c.show_stats: |
|
139 | % if c.show_stats: | |
140 | <div id="lang_stats" class="enabled"> |
|
140 | <div id="lang_stats" class="enabled"> | |
141 | ${_('Calculating Code Statistics...')} |
|
141 | ${_('Calculating Code Statistics...')} | |
142 | </div> |
|
142 | </div> | |
143 | % else: |
|
143 | % else: | |
144 | <span class="disabled"> |
|
144 | <span class="disabled"> | |
145 | ${_('Statistics are disabled for this repository')} |
|
145 | ${_('Statistics are disabled for this repository')} | |
146 | </span> |
|
146 | </span> | |
147 | % if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
147 | % if h.HasPermissionAll('hg.admin')('enable stats on from summary'): | |
148 | , ${h.link_to(_('enable statistics'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_statistics'))} |
|
148 | , ${h.link_to(_('enable statistics'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_statistics'))} | |
149 | % endif |
|
149 | % endif | |
150 | % endif |
|
150 | % endif | |
151 | </div> |
|
151 | </div> | |
152 |
|
152 | |||
153 | </div> |
|
153 | </div> | |
154 | </div> |
|
154 | </div> | |
155 |
|
155 | |||
156 | % if show_downloads: |
|
156 | % if show_downloads: | |
157 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
157 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
158 | <div class="left-label"> |
|
158 | <div class="left-label"> | |
159 | ${_('Downloads')}: |
|
159 | ${_('Downloads')}: | |
160 | </div> |
|
160 | </div> | |
161 | <div class="right-content"> |
|
161 | <div class="right-content"> | |
162 | <div class="input ${summary(c.show_stats)} downloads"> |
|
162 | <div class="input ${summary(c.show_stats)} downloads"> | |
163 | % if c.rhodecode_repo and len(c.rhodecode_repo.revisions) == 0: |
|
163 | % if c.rhodecode_repo and len(c.rhodecode_repo.revisions) == 0: | |
164 | <span class="disabled"> |
|
164 | <span class="disabled"> | |
165 | ${_('There are no downloads yet')} |
|
165 | ${_('There are no downloads yet')} | |
166 | </span> |
|
166 | </span> | |
167 | % elif not c.enable_downloads: |
|
167 | % elif not c.enable_downloads: | |
168 | <span class="disabled"> |
|
168 | <span class="disabled"> | |
169 | ${_('Downloads are disabled for this repository')} |
|
169 | ${_('Downloads are disabled for this repository')} | |
170 | </span> |
|
170 | </span> | |
171 | % if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
|
171 | % if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): | |
172 | , ${h.link_to(_('enable downloads'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_downloads'))} |
|
172 | , ${h.link_to(_('enable downloads'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_downloads'))} | |
173 | % endif |
|
173 | % endif | |
174 | % else: |
|
174 | % else: | |
175 | <span class="enabled"> |
|
175 | <span class="enabled"> | |
176 | <a id="archive_link" class="btn btn-small" href="${h.url('files_archive_home',repo_name=c.rhodecode_db_repo.repo_name,fname='tip.zip')}"> |
|
176 | <a id="archive_link" class="btn btn-small" href="${h.url('files_archive_home',repo_name=c.rhodecode_db_repo.repo_name,fname='tip.zip')}"> | |
177 | <i class="icon-archive"></i> tip.zip |
|
177 | <i class="icon-archive"></i> tip.zip | |
178 | ## replaced by some JS on select |
|
178 | ## replaced by some JS on select | |
179 | </a> |
|
179 | </a> | |
180 | </span> |
|
180 | </span> | |
181 | ${h.hidden('download_options')} |
|
181 | ${h.hidden('download_options')} | |
182 | % endif |
|
182 | % endif | |
183 | </div> |
|
183 | </div> | |
184 | </div> |
|
184 | </div> | |
185 | </div> |
|
185 | </div> | |
186 | % endif |
|
186 | % endif | |
187 |
|
187 | |||
188 | </div><!--end summary-detail--> |
|
188 | </div><!--end summary-detail--> | |
189 | </%def> |
|
189 | </%def> | |
190 |
|
190 | |||
191 | <%def name="summary_stats(gravatar_function)"> |
|
191 | <%def name="summary_stats(gravatar_function)"> | |
192 | <div class="sidebar-right"> |
|
192 | <div class="sidebar-right"> | |
193 | <div class="summary-detail-header"> |
|
193 | <div class="summary-detail-header"> | |
194 | <h4 class="item"> |
|
194 | <h4 class="item"> | |
195 | ${_('Owner')} |
|
195 | ${_('Owner')} | |
196 | </h4> |
|
196 | </h4> | |
197 | </div> |
|
197 | </div> | |
198 | <div class="sidebar-right-content"> |
|
198 | <div class="sidebar-right-content"> | |
199 | ${gravatar_function(c.rhodecode_db_repo.user.email, 16)} |
|
199 | ${gravatar_function(c.rhodecode_db_repo.user.email, 16)} | |
200 | </div> |
|
200 | </div> | |
201 | </div><!--end sidebar-right--> |
|
201 | </div><!--end sidebar-right--> | |
202 | </%def> |
|
202 | </%def> |
@@ -1,130 +1,129 b'' | |||||
1 | <%inherit file="/summary/base.mako"/> |
|
1 | <%inherit file="/summary/base.mako"/> | |
2 |
|
2 | |||
3 | <%namespace name="components" file="/summary/components.mako"/> |
|
3 | <%namespace name="components" file="/summary/components.mako"/> | |
4 |
|
4 | |||
5 |
|
5 | |||
6 | <%def name="menu_bar_subnav()"> |
|
6 | <%def name="menu_bar_subnav()"> | |
7 | ${self.repo_menu(active='summary')} |
|
7 | ${self.repo_menu(active='summary')} | |
8 | </%def> |
|
8 | </%def> | |
9 |
|
9 | |||
10 | <%def name="main()"> |
|
10 | <%def name="main()"> | |
11 |
|
11 | |||
12 | <div class="title"> |
|
12 | <div class="title"> | |
13 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
13 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
14 | <ul class="links icon-only-links block-right"> |
|
14 | <ul class="links icon-only-links block-right"> | |
15 | <li> |
|
15 | <li> | |
16 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
16 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
17 | <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name,auth_token=c.rhodecode_user.feed_token)}" title="${_('RSS Feed')}"> |
|
17 | <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name,auth_token=c.rhodecode_user.feed_token)}" title="${_('RSS Feed')}"><i class="icon-rss-sign"></i></a> | |
18 | %else: |
|
18 | %else: | |
19 | <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}"> |
|
19 | <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}"><i class="icon-rss-sign"></i></a> | |
20 | %endif |
|
20 | %endif | |
21 | <i class="icon-rss-sign"></i></a> |
|
|||
22 | </li> |
|
21 | </li> | |
23 | </ul> |
|
22 | </ul> | |
24 | </div> |
|
23 | </div> | |
25 |
|
24 | |||
26 | <div id="repo-summary" class="summary"> |
|
25 | <div id="repo-summary" class="summary"> | |
27 | ${components.summary_detail(breadcrumbs_links=self.breadcrumbs_links(), show_downloads=True)} |
|
26 | ${components.summary_detail(breadcrumbs_links=self.breadcrumbs_links(), show_downloads=True)} | |
28 | ${components.summary_stats(gravatar_function=self.gravatar_with_user)} |
|
27 | ${components.summary_stats(gravatar_function=self.gravatar_with_user)} | |
29 | </div><!--end repo-summary--> |
|
28 | </div><!--end repo-summary--> | |
30 |
|
29 | |||
31 |
|
30 | |||
32 | <div class="box" > |
|
31 | <div class="box" > | |
33 | %if not c.repo_commits: |
|
32 | %if not c.repo_commits: | |
34 | <div class="title"> |
|
33 | <div class="title"> | |
35 | <h3>${_('Quick start')}</h3> |
|
34 | <h3>${_('Quick start')}</h3> | |
36 | </div> |
|
35 | </div> | |
37 | %endif |
|
36 | %endif | |
38 | <div class="table"> |
|
37 | <div class="table"> | |
39 | <div id="shortlog_data"> |
|
38 | <div id="shortlog_data"> | |
40 | <%include file='../changelog/changelog_summary_data.mako'/> |
|
39 | <%include file='../changelog/changelog_summary_data.mako'/> | |
41 | </div> |
|
40 | </div> | |
42 | </div> |
|
41 | </div> | |
43 | </div> |
|
42 | </div> | |
44 |
|
43 | |||
45 | %if c.readme_data: |
|
44 | %if c.readme_data: | |
46 | <div id="readme" class="anchor"> |
|
45 | <div id="readme" class="anchor"> | |
47 | <div class="box" > |
|
46 | <div class="box" > | |
48 | <div class="title" title="${_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1])}"> |
|
47 | <div class="title" title="${_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1])}"> | |
49 | <h3 class="breadcrumbs"> |
|
48 | <h3 class="breadcrumbs"> | |
50 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> |
|
49 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> | |
51 | </h3> |
|
50 | </h3> | |
52 | </div> |
|
51 | </div> | |
53 | <div class="readme codeblock"> |
|
52 | <div class="readme codeblock"> | |
54 | <div class="readme_box markdown-block"> |
|
53 | <div class="readme_box markdown-block"> | |
55 | ${c.readme_data|n} |
|
54 | ${c.readme_data|n} | |
56 | </div> |
|
55 | </div> | |
57 | </div> |
|
56 | </div> | |
58 | </div> |
|
57 | </div> | |
59 | </div> |
|
58 | </div> | |
60 | %endif |
|
59 | %endif | |
61 |
|
60 | |||
62 | <script type="text/javascript"> |
|
61 | <script type="text/javascript"> | |
63 | $(document).ready(function(){ |
|
62 | $(document).ready(function(){ | |
64 | $('#clone_by_name').on('click',function(e){ |
|
63 | $('#clone_by_name').on('click',function(e){ | |
65 | // show url by name and hide name button |
|
64 | // show url by name and hide name button | |
66 | $('#clone_url').show(); |
|
65 | $('#clone_url').show(); | |
67 | $('#clone_by_name').hide(); |
|
66 | $('#clone_by_name').hide(); | |
68 |
|
67 | |||
69 | // hide url by id and show name button |
|
68 | // hide url by id and show name button | |
70 | $('#clone_by_id').show(); |
|
69 | $('#clone_by_id').show(); | |
71 | $('#clone_url_id').hide(); |
|
70 | $('#clone_url_id').hide(); | |
72 |
|
71 | |||
73 | }); |
|
72 | }); | |
74 | $('#clone_by_id').on('click',function(e){ |
|
73 | $('#clone_by_id').on('click',function(e){ | |
75 |
|
74 | |||
76 | // show url by id and hide id button |
|
75 | // show url by id and hide id button | |
77 | $('#clone_by_id').hide(); |
|
76 | $('#clone_by_id').hide(); | |
78 | $('#clone_url_id').show(); |
|
77 | $('#clone_url_id').show(); | |
79 |
|
78 | |||
80 | // hide url by name and show id button |
|
79 | // hide url by name and show id button | |
81 | $('#clone_by_name').show(); |
|
80 | $('#clone_by_name').show(); | |
82 | $('#clone_url').hide(); |
|
81 | $('#clone_url').hide(); | |
83 | }); |
|
82 | }); | |
84 |
|
83 | |||
85 | var initialCommitData = { |
|
84 | var initialCommitData = { | |
86 | id: null, |
|
85 | id: null, | |
87 | text: 'tip', |
|
86 | text: 'tip', | |
88 | type: 'tag', |
|
87 | type: 'tag', | |
89 | raw_id: null, |
|
88 | raw_id: null, | |
90 | files_url: null |
|
89 | files_url: null | |
91 | }; |
|
90 | }; | |
92 |
|
91 | |||
93 | select2RefSwitcher('#download_options', initialCommitData); |
|
92 | select2RefSwitcher('#download_options', initialCommitData); | |
94 |
|
93 | |||
95 | // on change of download options |
|
94 | // on change of download options | |
96 | $('#download_options').on('change', function(e) { |
|
95 | $('#download_options').on('change', function(e) { | |
97 | // format of Object {text: "v0.0.3", type: "tag", id: "rev"} |
|
96 | // format of Object {text: "v0.0.3", type: "tag", id: "rev"} | |
98 | var selected_cs = e.added; |
|
97 | var selected_cs = e.added; | |
99 | var fname= e.added.raw_id + ".zip"; |
|
98 | var fname= e.added.raw_id + ".zip"; | |
100 | var href = pyroutes.url('files_archive_home', {'repo_name': templateContext.repo_name, 'fname':fname}) |
|
99 | var href = pyroutes.url('files_archive_home', {'repo_name': templateContext.repo_name, 'fname':fname}); | |
101 | // set new label |
|
100 | // set new label | |
102 | $('#archive_link').html('<i class="icon-archive"></i> '+ e.added.text+".zip") |
|
101 | $('#archive_link').html('<i class="icon-archive"></i> '+ e.added.text+".zip"); | |
103 |
|
102 | |||
104 | // set new url to button, |
|
103 | // set new url to button, | |
105 | $('#archive_link').attr('href', href) |
|
104 | $('#archive_link').attr('href', href) | |
106 | }); |
|
105 | }); | |
107 |
|
106 | |||
108 |
|
107 | |||
109 | // load details on summary page expand |
|
108 | // load details on summary page expand | |
110 | $('#summary_details_expand').on('click', function() { |
|
109 | $('#summary_details_expand').on('click', function() { | |
111 |
|
110 | |||
112 | var callback = function (data) { |
|
111 | var callback = function (data) { | |
113 | % if c.show_stats: |
|
112 | % if c.show_stats: | |
114 | showRepoStats( |
|
113 | showRepoStats( | |
115 | 'lang_stats', data); |
|
114 | 'lang_stats', data); | |
116 | % endif |
|
115 | % endif | |
117 | }; |
|
116 | }; | |
118 |
|
117 | |||
119 | showRepoSize( |
|
118 | showRepoSize( | |
120 | 'repo_size_container', |
|
119 | 'repo_size_container', | |
121 | templateContext.repo_name, |
|
120 | templateContext.repo_name, | |
122 | templateContext.repo_landing_commit, |
|
121 | templateContext.repo_landing_commit, | |
123 | callback); |
|
122 | callback); | |
124 |
|
123 | |||
125 | }) |
|
124 | }) | |
126 |
|
125 | |||
127 | }) |
|
126 | }) | |
128 | </script> |
|
127 | </script> | |
129 |
|
128 | |||
130 | </%def> |
|
129 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now