Show More
@@ -1,93 +1,93 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Repositories defaults')} - ${c.rhodecode_name} |
|
5 | ${_('Repositories defaults')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 |
${_(' |
|
11 | ${_('defaults')} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 | ${self.menu('admin')} |
|
15 | ${self.menu('admin')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
19 | <div class="box"> |
|
19 | <div class="box"> | |
20 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
23 | </div> |
|
23 | </div> | |
24 |
|
24 | |||
25 | <h3>${_('Repositories defaults')}</h3> |
|
25 | <h3>${_('Repositories defaults')}</h3> | |
26 |
|
26 | |||
27 | ${h.form(url('default', id='defaults'),method='put')} |
|
27 | ${h.form(url('default', id='defaults'),method='put')} | |
28 | <div class="form"> |
|
28 | <div class="form"> | |
29 | <!-- fields --> |
|
29 | <!-- fields --> | |
30 |
|
30 | |||
31 | <div class="fields"> |
|
31 | <div class="fields"> | |
32 |
|
32 | |||
33 | <div class="field"> |
|
33 | <div class="field"> | |
34 | <div class="label"> |
|
34 | <div class="label"> | |
35 | <label for="default_repo_type">${_('Type')}:</label> |
|
35 | <label for="default_repo_type">${_('Type')}:</label> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="input"> |
|
37 | <div class="input"> | |
38 | ${h.select('default_repo_type','hg',c.backends,class_="medium")} |
|
38 | ${h.select('default_repo_type','hg',c.backends,class_="medium")} | |
39 | </div> |
|
39 | </div> | |
40 | </div> |
|
40 | </div> | |
41 |
|
41 | |||
42 | <div class="field"> |
|
42 | <div class="field"> | |
43 | <div class="label label-checkbox"> |
|
43 | <div class="label label-checkbox"> | |
44 | <label for="default_repo_private">${_('Private repository')}:</label> |
|
44 | <label for="default_repo_private">${_('Private repository')}:</label> | |
45 | </div> |
|
45 | </div> | |
46 | <div class="checkboxes"> |
|
46 | <div class="checkboxes"> | |
47 | ${h.checkbox('default_repo_private',value="True")} |
|
47 | ${h.checkbox('default_repo_private',value="True")} | |
48 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
48 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
49 | </div> |
|
49 | </div> | |
50 | </div> |
|
50 | </div> | |
51 |
|
51 | |||
52 |
|
52 | |||
53 | <div class="field"> |
|
53 | <div class="field"> | |
54 | <div class="label label-checkbox"> |
|
54 | <div class="label label-checkbox"> | |
55 | <label for="default_repo_enable_statistics">${_('Enable statistics')}:</label> |
|
55 | <label for="default_repo_enable_statistics">${_('Enable statistics')}:</label> | |
56 | </div> |
|
56 | </div> | |
57 | <div class="checkboxes"> |
|
57 | <div class="checkboxes"> | |
58 | ${h.checkbox('default_repo_enable_statistics',value="True")} |
|
58 | ${h.checkbox('default_repo_enable_statistics',value="True")} | |
59 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
59 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> | |
60 | </div> |
|
60 | </div> | |
61 | </div> |
|
61 | </div> | |
62 |
|
62 | |||
63 | <div class="field"> |
|
63 | <div class="field"> | |
64 | <div class="label label-checkbox"> |
|
64 | <div class="label label-checkbox"> | |
65 | <label for="default_repo_enable_downloads">${_('Enable downloads')}:</label> |
|
65 | <label for="default_repo_enable_downloads">${_('Enable downloads')}:</label> | |
66 | </div> |
|
66 | </div> | |
67 | <div class="checkboxes"> |
|
67 | <div class="checkboxes"> | |
68 | ${h.checkbox('default_repo_enable_downloads',value="True")} |
|
68 | ${h.checkbox('default_repo_enable_downloads',value="True")} | |
69 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
69 | <span class="help-block">${_('Enable download menu on summary page.')}</span> | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 |
|
72 | |||
73 | <div class="field"> |
|
73 | <div class="field"> | |
74 | <div class="label label-checkbox"> |
|
74 | <div class="label label-checkbox"> | |
75 | <label for="default_repo_enable_locking">${_('Enable locking')}:</label> |
|
75 | <label for="default_repo_enable_locking">${_('Enable locking')}:</label> | |
76 | </div> |
|
76 | </div> | |
77 | <div class="checkboxes"> |
|
77 | <div class="checkboxes"> | |
78 | ${h.checkbox('default_repo_enable_locking',value="True")} |
|
78 | ${h.checkbox('default_repo_enable_locking',value="True")} | |
79 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
79 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 |
|
82 | |||
83 | <div class="buttons"> |
|
83 | <div class="buttons"> | |
84 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
84 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
85 | </div> |
|
85 | </div> | |
86 | </div> |
|
86 | </div> | |
87 | </div> |
|
87 | </div> | |
88 | ${h.end_form()} |
|
88 | ${h.end_form()} | |
89 |
|
89 | |||
90 | ##<h3>${_('Groups defaults')}</h3> |
|
90 | ##<h3>${_('Groups defaults')}</h3> | |
91 |
|
91 | |||
92 | </div> |
|
92 | </div> | |
93 | </%def> |
|
93 | </%def> |
@@ -1,95 +1,95 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('LDAP administration')} - ${c.rhodecode_name} |
|
5 | ${_('LDAP administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 |
${_(' |
|
11 | ${_('ldap')} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 | ${self.menu('admin')} |
|
15 | ${self.menu('admin')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
19 | <div class="box"> |
|
19 | <div class="box"> | |
20 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
23 | </div> |
|
23 | </div> | |
24 | ${h.form(url('ldap_settings'))} |
|
24 | ${h.form(url('ldap_settings'))} | |
25 | <div class="form"> |
|
25 | <div class="form"> | |
26 | <div class="fields"> |
|
26 | <div class="fields"> | |
27 |
|
27 | |||
28 | <h3>${_('Connection settings')}</h3> |
|
28 | <h3>${_('Connection settings')}</h3> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="label label-checkbox"><label for="ldap_active">${_('Enable LDAP')}</label></div> |
|
30 | <div class="label label-checkbox"><label for="ldap_active">${_('Enable LDAP')}</label></div> | |
31 | <div class="checkboxes"><div class="checkbox">${h.checkbox('ldap_active',True,class_='small')}</div></div> |
|
31 | <div class="checkboxes"><div class="checkbox">${h.checkbox('ldap_active',True,class_='small')}</div></div> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="field"> |
|
33 | <div class="field"> | |
34 | <div class="label"><label for="ldap_host">${_('Host')}</label></div> |
|
34 | <div class="label"><label for="ldap_host">${_('Host')}</label></div> | |
35 | <div class="input">${h.text('ldap_host',class_='small')}</div> |
|
35 | <div class="input">${h.text('ldap_host',class_='small')}</div> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="field"> |
|
37 | <div class="field"> | |
38 | <div class="label"><label for="ldap_port">${_('Port')}</label></div> |
|
38 | <div class="label"><label for="ldap_port">${_('Port')}</label></div> | |
39 | <div class="input">${h.text('ldap_port',class_='small')}</div> |
|
39 | <div class="input">${h.text('ldap_port',class_='small')}</div> | |
40 | </div> |
|
40 | </div> | |
41 | <div class="field"> |
|
41 | <div class="field"> | |
42 | <div class="label"><label for="ldap_dn_user">${_('Account')}</label></div> |
|
42 | <div class="label"><label for="ldap_dn_user">${_('Account')}</label></div> | |
43 | <div class="input">${h.text('ldap_dn_user',class_='small')}</div> |
|
43 | <div class="input">${h.text('ldap_dn_user',class_='small')}</div> | |
44 | </div> |
|
44 | </div> | |
45 | <div class="field"> |
|
45 | <div class="field"> | |
46 | <div class="label"><label for="ldap_dn_pass">${_('Password')}</label></div> |
|
46 | <div class="label"><label for="ldap_dn_pass">${_('Password')}</label></div> | |
47 | <div class="input">${h.password('ldap_dn_pass',class_='small')}</div> |
|
47 | <div class="input">${h.password('ldap_dn_pass',class_='small')}</div> | |
48 | </div> |
|
48 | </div> | |
49 | <div class="field"> |
|
49 | <div class="field"> | |
50 | <div class="label"><label for="ldap_tls_kind">${_('Connection security')}</label></div> |
|
50 | <div class="label"><label for="ldap_tls_kind">${_('Connection security')}</label></div> | |
51 | <div class="select">${h.select('ldap_tls_kind',c.tls_kind_cur,c.tls_kind_choices,class_='small')}</div> |
|
51 | <div class="select">${h.select('ldap_tls_kind',c.tls_kind_cur,c.tls_kind_choices,class_='small')}</div> | |
52 | </div> |
|
52 | </div> | |
53 | <div class="field"> |
|
53 | <div class="field"> | |
54 | <div class="label"><label for="ldap_tls_reqcert">${_('Certificate Checks')}</label></div> |
|
54 | <div class="label"><label for="ldap_tls_reqcert">${_('Certificate Checks')}</label></div> | |
55 | <div class="select">${h.select('ldap_tls_reqcert',c.tls_reqcert_cur,c.tls_reqcert_choices,class_='small')}</div> |
|
55 | <div class="select">${h.select('ldap_tls_reqcert',c.tls_reqcert_cur,c.tls_reqcert_choices,class_='small')}</div> | |
56 | </div> |
|
56 | </div> | |
57 | <h3>${_('Search settings')}</h3> |
|
57 | <h3>${_('Search settings')}</h3> | |
58 | <div class="field"> |
|
58 | <div class="field"> | |
59 | <div class="label"><label for="ldap_base_dn">${_('Base DN')}</label></div> |
|
59 | <div class="label"><label for="ldap_base_dn">${_('Base DN')}</label></div> | |
60 | <div class="input">${h.text('ldap_base_dn',class_='small')}</div> |
|
60 | <div class="input">${h.text('ldap_base_dn',class_='small')}</div> | |
61 | </div> |
|
61 | </div> | |
62 | <div class="field"> |
|
62 | <div class="field"> | |
63 | <div class="label"><label for="ldap_filter">${_('LDAP Filter')}</label></div> |
|
63 | <div class="label"><label for="ldap_filter">${_('LDAP Filter')}</label></div> | |
64 | <div class="input">${h.text('ldap_filter',class_='small')}</div> |
|
64 | <div class="input">${h.text('ldap_filter',class_='small')}</div> | |
65 | </div> |
|
65 | </div> | |
66 | <div class="field"> |
|
66 | <div class="field"> | |
67 | <div class="label"><label for="ldap_search_scope">${_('LDAP Search Scope')}</label></div> |
|
67 | <div class="label"><label for="ldap_search_scope">${_('LDAP Search Scope')}</label></div> | |
68 | <div class="select">${h.select('ldap_search_scope',c.search_scope_cur,c.search_scope_choices,class_='small')}</div> |
|
68 | <div class="select">${h.select('ldap_search_scope',c.search_scope_cur,c.search_scope_choices,class_='small')}</div> | |
69 | </div> |
|
69 | </div> | |
70 | <h3>${_('Attribute mappings')}</h3> |
|
70 | <h3>${_('Attribute mappings')}</h3> | |
71 | <div class="field"> |
|
71 | <div class="field"> | |
72 | <div class="label"><label for="ldap_attr_login">${_('Login Attribute')}</label></div> |
|
72 | <div class="label"><label for="ldap_attr_login">${_('Login Attribute')}</label></div> | |
73 | <div class="input">${h.text('ldap_attr_login',class_='small')}</div> |
|
73 | <div class="input">${h.text('ldap_attr_login',class_='small')}</div> | |
74 | </div> |
|
74 | </div> | |
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label"><label for="ldap_attr_firstname">${_('First Name Attribute')}</label></div> |
|
76 | <div class="label"><label for="ldap_attr_firstname">${_('First Name Attribute')}</label></div> | |
77 | <div class="input">${h.text('ldap_attr_firstname',class_='small')}</div> |
|
77 | <div class="input">${h.text('ldap_attr_firstname',class_='small')}</div> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="field"> |
|
79 | <div class="field"> | |
80 | <div class="label"><label for="ldap_attr_lastname">${_('Last Name Attribute')}</label></div> |
|
80 | <div class="label"><label for="ldap_attr_lastname">${_('Last Name Attribute')}</label></div> | |
81 | <div class="input">${h.text('ldap_attr_lastname',class_='small')}</div> |
|
81 | <div class="input">${h.text('ldap_attr_lastname',class_='small')}</div> | |
82 | </div> |
|
82 | </div> | |
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label"><label for="ldap_attr_email">${_('E-mail Attribute')}</label></div> |
|
84 | <div class="label"><label for="ldap_attr_email">${_('E-mail Attribute')}</label></div> | |
85 | <div class="input">${h.text('ldap_attr_email',class_='small')}</div> |
|
85 | <div class="input">${h.text('ldap_attr_email',class_='small')}</div> | |
86 | </div> |
|
86 | </div> | |
87 |
|
87 | |||
88 | <div class="buttons"> |
|
88 | <div class="buttons"> | |
89 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
89 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 | ${h.end_form()} |
|
93 | ${h.end_form()} | |
94 | </div> |
|
94 | </div> | |
95 | </%def> |
|
95 | </%def> |
@@ -1,215 +1,215 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Permissions administration')} - ${c.rhodecode_name} |
|
5 | ${_('Permissions administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 |
${_(' |
|
11 | ${_('permissions')} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 | ${self.menu('admin')} |
|
15 | ${self.menu('admin')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
19 | <div class="box box-left"> |
|
19 | <div class="box box-left"> | |
20 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
23 | </div> |
|
23 | </div> | |
24 | <h3>${_('Default permissions')}</h3> |
|
24 | <h3>${_('Default permissions')}</h3> | |
25 | ${h.form(url('permission', id='default'),method='put')} |
|
25 | ${h.form(url('permission', id='default'),method='put')} | |
26 | <div class="form"> |
|
26 | <div class="form"> | |
27 | <!-- fields --> |
|
27 | <!-- fields --> | |
28 | <div class="fields"> |
|
28 | <div class="fields"> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="label label-checkbox"> |
|
30 | <div class="label label-checkbox"> | |
31 | <label for="anonymous">${_('Anonymous access')}:</label> |
|
31 | <label for="anonymous">${_('Anonymous access')}:</label> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="checkboxes"> |
|
33 | <div class="checkboxes"> | |
34 | <div class="checkbox"> |
|
34 | <div class="checkbox"> | |
35 | ${h.checkbox('anonymous',True)} |
|
35 | ${h.checkbox('anonymous',True)} | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 | <div class="field"> |
|
39 | <div class="field"> | |
40 | <div class="label"> |
|
40 | <div class="label"> | |
41 | <label for="default_repo_perm">${_('Repository')}:</label> |
|
41 | <label for="default_repo_perm">${_('Repository')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 | <div class="select"> |
|
43 | <div class="select"> | |
44 | ${h.select('default_repo_perm','',c.repo_perms_choices)} |
|
44 | ${h.select('default_repo_perm','',c.repo_perms_choices)} | |
45 |
|
45 | |||
46 | ${h.checkbox('overwrite_default_repo','true')} |
|
46 | ${h.checkbox('overwrite_default_repo','true')} | |
47 | <label for="overwrite_default_repo"> |
|
47 | <label for="overwrite_default_repo"> | |
48 | <span class="tooltip" |
|
48 | <span class="tooltip" | |
49 | title="${h.tooltip(_('All default permissions on each repository will be reset to choosen permission, note that all custom default permission on repositories will be lost'))}"> |
|
49 | title="${h.tooltip(_('All default permissions on each repository will be reset to choosen permission, note that all custom default permission on repositories will be lost'))}"> | |
50 | ${_('overwrite existing settings')}</span> </label> |
|
50 | ${_('overwrite existing settings')}</span> </label> | |
51 | </div> |
|
51 | </div> | |
52 | </div> |
|
52 | </div> | |
53 | <div class="field"> |
|
53 | <div class="field"> | |
54 | <div class="label"> |
|
54 | <div class="label"> | |
55 | <label for="default_group_perm">${_('Repository group')}:</label> |
|
55 | <label for="default_group_perm">${_('Repository group')}:</label> | |
56 | </div> |
|
56 | </div> | |
57 | <div class="select"> |
|
57 | <div class="select"> | |
58 | ${h.select('default_group_perm','',c.group_perms_choices)} |
|
58 | ${h.select('default_group_perm','',c.group_perms_choices)} | |
59 | ${h.checkbox('overwrite_default_group','true')} |
|
59 | ${h.checkbox('overwrite_default_group','true')} | |
60 | <label for="overwrite_default_group"> |
|
60 | <label for="overwrite_default_group"> | |
61 | <span class="tooltip" |
|
61 | <span class="tooltip" | |
62 | title="${h.tooltip(_('All default permissions on each repository group will be reset to choosen permission, note that all custom default permission on repositories group will be lost'))}"> |
|
62 | title="${h.tooltip(_('All default permissions on each repository group will be reset to choosen permission, note that all custom default permission on repositories group will be lost'))}"> | |
63 | ${_('overwrite existing settings')}</span> </label> |
|
63 | ${_('overwrite existing settings')}</span> </label> | |
64 |
|
64 | |||
65 | </div> |
|
65 | </div> | |
66 | </div> |
|
66 | </div> | |
67 | <div class="field"> |
|
67 | <div class="field"> | |
68 | <div class="label"> |
|
68 | <div class="label"> | |
69 | <label for="default_register">${_('Registration')}:</label> |
|
69 | <label for="default_register">${_('Registration')}:</label> | |
70 | </div> |
|
70 | </div> | |
71 | <div class="select"> |
|
71 | <div class="select"> | |
72 | ${h.select('default_register','',c.register_choices)} |
|
72 | ${h.select('default_register','',c.register_choices)} | |
73 | </div> |
|
73 | </div> | |
74 | </div> |
|
74 | </div> | |
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label"> |
|
76 | <div class="label"> | |
77 | <label for="default_create">${_('Repository creation')}:</label> |
|
77 | <label for="default_create">${_('Repository creation')}:</label> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="select"> |
|
79 | <div class="select"> | |
80 | ${h.select('default_create','',c.create_choices)} |
|
80 | ${h.select('default_create','',c.create_choices)} | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label"> |
|
84 | <div class="label"> | |
85 | <label for="default_fork">${_('Repository forking')}:</label> |
|
85 | <label for="default_fork">${_('Repository forking')}:</label> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="select"> |
|
87 | <div class="select"> | |
88 | ${h.select('default_fork','',c.fork_choices)} |
|
88 | ${h.select('default_fork','',c.fork_choices)} | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 | <div class="buttons"> |
|
91 | <div class="buttons"> | |
92 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
92 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
93 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
93 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
94 | </div> |
|
94 | </div> | |
95 | </div> |
|
95 | </div> | |
96 | </div> |
|
96 | </div> | |
97 | ${h.end_form()} |
|
97 | ${h.end_form()} | |
98 | </div> |
|
98 | </div> | |
99 |
|
99 | |||
100 | <div style="min-height:780px" class="box box-right"> |
|
100 | <div style="min-height:780px" class="box box-right"> | |
101 | <!-- box / title --> |
|
101 | <!-- box / title --> | |
102 | <div class="title"> |
|
102 | <div class="title"> | |
103 | <h5>${_('Default User Permissions')}</h5> |
|
103 | <h5>${_('Default User Permissions')}</h5> | |
104 | </div> |
|
104 | </div> | |
105 |
|
105 | |||
106 | ## permissions overview |
|
106 | ## permissions overview | |
107 | <div id="perms" class="table"> |
|
107 | <div id="perms" class="table"> | |
108 | %for section in sorted(c.perm_user.permissions.keys()): |
|
108 | %for section in sorted(c.perm_user.permissions.keys()): | |
109 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
109 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
110 | %if not c.perm_user.permissions[section]: |
|
110 | %if not c.perm_user.permissions[section]: | |
111 | <span class="empty_data">${_('Nothing here yet')}</span> |
|
111 | <span class="empty_data">${_('Nothing here yet')}</span> | |
112 | %else: |
|
112 | %else: | |
113 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
113 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
114 | <table id="tbl_list_${section}"> |
|
114 | <table id="tbl_list_${section}"> | |
115 | <thead> |
|
115 | <thead> | |
116 | <tr> |
|
116 | <tr> | |
117 | <th class="left">${_('Name')}</th> |
|
117 | <th class="left">${_('Name')}</th> | |
118 | <th class="left">${_('Permission')}</th> |
|
118 | <th class="left">${_('Permission')}</th> | |
119 | <th class="left">${_('Edit Permission')}</th> |
|
119 | <th class="left">${_('Edit Permission')}</th> | |
120 | </thead> |
|
120 | </thead> | |
121 | <tbody> |
|
121 | <tbody> | |
122 | %for k in c.perm_user.permissions[section]: |
|
122 | %for k in c.perm_user.permissions[section]: | |
123 | <% |
|
123 | <% | |
124 | if section != 'global': |
|
124 | if section != 'global': | |
125 | section_perm = c.perm_user.permissions[section].get(k) |
|
125 | section_perm = c.perm_user.permissions[section].get(k) | |
126 | _perm = section_perm.split('.')[-1] |
|
126 | _perm = section_perm.split('.')[-1] | |
127 | else: |
|
127 | else: | |
128 | _perm = section_perm = None |
|
128 | _perm = section_perm = None | |
129 | %> |
|
129 | %> | |
130 | <tr> |
|
130 | <tr> | |
131 | <td> |
|
131 | <td> | |
132 | %if section == 'repositories': |
|
132 | %if section == 'repositories': | |
133 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
133 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
134 | %elif section == 'repositories_groups': |
|
134 | %elif section == 'repositories_groups': | |
135 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
135 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
136 | %else: |
|
136 | %else: | |
137 | ${h.get_permission_name(k)} |
|
137 | ${h.get_permission_name(k)} | |
138 | %endif |
|
138 | %endif | |
139 | </td> |
|
139 | </td> | |
140 | <td> |
|
140 | <td> | |
141 | %if section == 'global': |
|
141 | %if section == 'global': | |
142 | ${h.bool2icon(k.split('.')[-1] != 'none')} |
|
142 | ${h.bool2icon(k.split('.')[-1] != 'none')} | |
143 | %else: |
|
143 | %else: | |
144 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
144 | <span class="perm_tag ${_perm}">${section_perm}</span> | |
145 | %endif |
|
145 | %endif | |
146 | </td> |
|
146 | </td> | |
147 | <td> |
|
147 | <td> | |
148 | %if section == 'repositories': |
|
148 | %if section == 'repositories': | |
149 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
149 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
150 | %elif section == 'repositories_groups': |
|
150 | %elif section == 'repositories_groups': | |
151 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
151 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
152 | %else: |
|
152 | %else: | |
153 | -- |
|
153 | -- | |
154 | %endif |
|
154 | %endif | |
155 | </td> |
|
155 | </td> | |
156 | </tr> |
|
156 | </tr> | |
157 | %endfor |
|
157 | %endfor | |
158 | </tbody> |
|
158 | </tbody> | |
159 | </table> |
|
159 | </table> | |
160 | </div> |
|
160 | </div> | |
161 | %endif |
|
161 | %endif | |
162 | %endfor |
|
162 | %endfor | |
163 | </div> |
|
163 | </div> | |
164 | </div> |
|
164 | </div> | |
165 | <div class="box box-left" style="clear:left"> |
|
165 | <div class="box box-left" style="clear:left"> | |
166 | <!-- box / title --> |
|
166 | <!-- box / title --> | |
167 | <div class="title"> |
|
167 | <div class="title"> | |
168 | <h5>${_('Allowed IP addresses')}</h5> |
|
168 | <h5>${_('Allowed IP addresses')}</h5> | |
169 | </div> |
|
169 | </div> | |
170 |
|
170 | |||
171 | <div class="ips_wrap"> |
|
171 | <div class="ips_wrap"> | |
172 | <table class="noborder"> |
|
172 | <table class="noborder"> | |
173 | %if c.user_ip_map: |
|
173 | %if c.user_ip_map: | |
174 | %for ip in c.user_ip_map: |
|
174 | %for ip in c.user_ip_map: | |
175 | <tr> |
|
175 | <tr> | |
176 | <td><div class="ip">${ip.ip_addr}</div></td> |
|
176 | <td><div class="ip">${ip.ip_addr}</div></td> | |
177 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> |
|
177 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> | |
178 | <td> |
|
178 | <td> | |
179 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} |
|
179 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} | |
180 | ${h.hidden('del_ip',ip.ip_id)} |
|
180 | ${h.hidden('del_ip',ip.ip_id)} | |
181 | ${h.hidden('default_user', 'True')} |
|
181 | ${h.hidden('default_user', 'True')} | |
182 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, |
|
182 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, | |
183 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} |
|
183 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} | |
184 | ${h.end_form()} |
|
184 | ${h.end_form()} | |
185 | </td> |
|
185 | </td> | |
186 | </tr> |
|
186 | </tr> | |
187 | %endfor |
|
187 | %endfor | |
188 | %else: |
|
188 | %else: | |
189 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> |
|
189 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> | |
190 | %endif |
|
190 | %endif | |
191 | </table> |
|
191 | </table> | |
192 | </div> |
|
192 | </div> | |
193 |
|
193 | |||
194 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} |
|
194 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} | |
195 | <div class="form"> |
|
195 | <div class="form"> | |
196 | <!-- fields --> |
|
196 | <!-- fields --> | |
197 | <div class="fields"> |
|
197 | <div class="fields"> | |
198 | <div class="field"> |
|
198 | <div class="field"> | |
199 | <div class="label"> |
|
199 | <div class="label"> | |
200 | <label for="new_ip">${_('New ip address')}:</label> |
|
200 | <label for="new_ip">${_('New ip address')}:</label> | |
201 | </div> |
|
201 | </div> | |
202 | <div class="input"> |
|
202 | <div class="input"> | |
203 | ${h.hidden('default_user', 'True')} |
|
203 | ${h.hidden('default_user', 'True')} | |
204 | ${h.text('new_ip', class_='medium')} |
|
204 | ${h.text('new_ip', class_='medium')} | |
205 | </div> |
|
205 | </div> | |
206 | </div> |
|
206 | </div> | |
207 | <div class="buttons"> |
|
207 | <div class="buttons"> | |
208 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
208 | ${h.submit('save',_('Add'),class_="ui-btn large")} | |
209 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
209 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
210 | </div> |
|
210 | </div> | |
211 | </div> |
|
211 | </div> | |
212 | </div> |
|
212 | </div> | |
213 | ${h.end_form()} |
|
213 | ${h.end_form()} | |
214 | </div> |
|
214 | </div> | |
215 | </%def> |
|
215 | </%def> |
@@ -1,373 +1,373 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Edit repository')} ${c.repo_info.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('Edit repository')} ${c.repo_info.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
12 | » |
|
12 | » | |
13 | ${_('edit')} |
|
13 | ${_('edit')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('options')} |
|
17 | ${self.menu('options')} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="main()"> |
|
20 | <%def name="main()"> | |
21 | <div class="box box-left"> |
|
21 | <div class="box box-left"> | |
22 | <!-- box / title --> |
|
22 | <!-- box / title --> | |
23 | <div class="title"> |
|
23 | <div class="title"> | |
24 | ${self.breadcrumbs()} |
|
24 | ${self.breadcrumbs()} | |
25 | </div> |
|
25 | </div> | |
26 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')} |
|
26 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')} | |
27 | <div class="form"> |
|
27 | <div class="form"> | |
28 | <!-- fields --> |
|
28 | <!-- fields --> | |
29 | <div class="fields"> |
|
29 | <div class="fields"> | |
30 | <div class="field"> |
|
30 | <div class="field"> | |
31 | <div class="label"> |
|
31 | <div class="label"> | |
32 | <label for="repo_name">${_('Name')}:</label> |
|
32 | <label for="repo_name">${_('Name')}:</label> | |
33 | </div> |
|
33 | </div> | |
34 | <div class="input"> |
|
34 | <div class="input"> | |
35 | ${h.text('repo_name',class_="medium")} |
|
35 | ${h.text('repo_name',class_="medium")} | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 | <div class="field"> |
|
38 | <div class="field"> | |
39 | <div class="label"> |
|
39 | <div class="label"> | |
40 | <label for="clone_uri">${_('Clone uri')}:</label> |
|
40 | <label for="clone_uri">${_('Clone uri')}:</label> | |
41 | </div> |
|
41 | </div> | |
42 | <div class="input"> |
|
42 | <div class="input"> | |
43 | ${h.text('clone_uri',class_="medium")} |
|
43 | ${h.text('clone_uri',class_="medium")} | |
44 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
44 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> | |
45 | </div> |
|
45 | </div> | |
46 | </div> |
|
46 | </div> | |
47 | <div class="field"> |
|
47 | <div class="field"> | |
48 | <div class="label"> |
|
48 | <div class="label"> | |
49 | <label for="repo_group">${_('Repository group')}:</label> |
|
49 | <label for="repo_group">${_('Repository group')}:</label> | |
50 | </div> |
|
50 | </div> | |
51 | <div class="input"> |
|
51 | <div class="input"> | |
52 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
52 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
53 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> |
|
53 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> | |
54 | </div> |
|
54 | </div> | |
55 | </div> |
|
55 | </div> | |
56 | <div class="field"> |
|
56 | <div class="field"> | |
57 | <div class="label"> |
|
57 | <div class="label"> | |
58 | <label for="repo_type">${_('Type')}:</label> |
|
58 | <label for="repo_type">${_('Type')}:</label> | |
59 | </div> |
|
59 | </div> | |
60 | <div class="input"> |
|
60 | <div class="input"> | |
61 | ${h.select('repo_type','hg',c.backends,class_="medium")} |
|
61 | ${h.select('repo_type','hg',c.backends,class_="medium")} | |
62 | </div> |
|
62 | </div> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="field"> |
|
64 | <div class="field"> | |
65 | <div class="label"> |
|
65 | <div class="label"> | |
66 | <label for="repo_landing_rev">${_('Landing revision')}:</label> |
|
66 | <label for="repo_landing_rev">${_('Landing revision')}:</label> | |
67 | </div> |
|
67 | </div> | |
68 | <div class="input"> |
|
68 | <div class="input"> | |
69 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
69 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} | |
70 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
70 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 | <div class="field"> |
|
73 | <div class="field"> | |
74 | <div class="label label-textarea"> |
|
74 | <div class="label label-textarea"> | |
75 | <label for="repo_description">${_('Description')}:</label> |
|
75 | <label for="repo_description">${_('Description')}:</label> | |
76 | </div> |
|
76 | </div> | |
77 | <div class="textarea text-area editor"> |
|
77 | <div class="textarea text-area editor"> | |
78 | ${h.textarea('repo_description')} |
|
78 | ${h.textarea('repo_description')} | |
79 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
79 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 |
|
82 | |||
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label label-checkbox"> |
|
84 | <div class="label label-checkbox"> | |
85 | <label for="repo_private">${_('Private repository')}:</label> |
|
85 | <label for="repo_private">${_('Private repository')}:</label> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="checkboxes"> |
|
87 | <div class="checkboxes"> | |
88 | ${h.checkbox('repo_private',value="True")} |
|
88 | ${h.checkbox('repo_private',value="True")} | |
89 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
89 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | <div class="field"> |
|
92 | <div class="field"> | |
93 | <div class="label label-checkbox"> |
|
93 | <div class="label label-checkbox"> | |
94 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> |
|
94 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> | |
95 | </div> |
|
95 | </div> | |
96 | <div class="checkboxes"> |
|
96 | <div class="checkboxes"> | |
97 | ${h.checkbox('repo_enable_statistics',value="True")} |
|
97 | ${h.checkbox('repo_enable_statistics',value="True")} | |
98 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
98 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> | |
99 | </div> |
|
99 | </div> | |
100 | </div> |
|
100 | </div> | |
101 | <div class="field"> |
|
101 | <div class="field"> | |
102 | <div class="label label-checkbox"> |
|
102 | <div class="label label-checkbox"> | |
103 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> |
|
103 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> | |
104 | </div> |
|
104 | </div> | |
105 | <div class="checkboxes"> |
|
105 | <div class="checkboxes"> | |
106 | ${h.checkbox('repo_enable_downloads',value="True")} |
|
106 | ${h.checkbox('repo_enable_downloads',value="True")} | |
107 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
107 | <span class="help-block">${_('Enable download menu on summary page.')}</span> | |
108 | </div> |
|
108 | </div> | |
109 | </div> |
|
109 | </div> | |
110 | <div class="field"> |
|
110 | <div class="field"> | |
111 | <div class="label label-checkbox"> |
|
111 | <div class="label label-checkbox"> | |
112 | <label for="repo_enable_locking">${_('Enable locking')}:</label> |
|
112 | <label for="repo_enable_locking">${_('Enable locking')}:</label> | |
113 | </div> |
|
113 | </div> | |
114 | <div class="checkboxes"> |
|
114 | <div class="checkboxes"> | |
115 | ${h.checkbox('repo_enable_locking',value="True")} |
|
115 | ${h.checkbox('repo_enable_locking',value="True")} | |
116 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
116 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> | |
117 | </div> |
|
117 | </div> | |
118 | </div> |
|
118 | </div> | |
119 | <div class="field"> |
|
119 | <div class="field"> | |
120 | <div class="label"> |
|
120 | <div class="label"> | |
121 | <label for="user">${_('Owner')}:</label> |
|
121 | <label for="user">${_('Owner')}:</label> | |
122 | </div> |
|
122 | </div> | |
123 | <div class="input input-medium ac"> |
|
123 | <div class="input input-medium ac"> | |
124 | <div class="perm_ac"> |
|
124 | <div class="perm_ac"> | |
125 | ${h.text('user',class_='yui-ac-input')} |
|
125 | ${h.text('user',class_='yui-ac-input')} | |
126 | <span class="help-block">${_('Change owner of this repository.')}</span> |
|
126 | <span class="help-block">${_('Change owner of this repository.')}</span> | |
127 | <div id="owner_container"></div> |
|
127 | <div id="owner_container"></div> | |
128 | </div> |
|
128 | </div> | |
129 | </div> |
|
129 | </div> | |
130 | </div> |
|
130 | </div> | |
131 | %if c.visual.repository_fields: |
|
131 | %if c.visual.repository_fields: | |
132 | ## EXTRA FIELDS |
|
132 | ## EXTRA FIELDS | |
133 | %for field in c.repo_fields: |
|
133 | %for field in c.repo_fields: | |
134 | <div class="field"> |
|
134 | <div class="field"> | |
135 | <div class="label"> |
|
135 | <div class="label"> | |
136 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
136 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> | |
137 | </div> |
|
137 | </div> | |
138 | <div class="input input-medium"> |
|
138 | <div class="input input-medium"> | |
139 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
139 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} | |
140 | %if field.field_desc: |
|
140 | %if field.field_desc: | |
141 | <span class="help-block">${field.field_desc}</span> |
|
141 | <span class="help-block">${field.field_desc}</span> | |
142 | %endif |
|
142 | %endif | |
143 | </div> |
|
143 | </div> | |
144 | </div> |
|
144 | </div> | |
145 | %endfor |
|
145 | %endfor | |
146 | %endif |
|
146 | %endif | |
147 | <div class="field"> |
|
147 | <div class="field"> | |
148 | <div class="label"> |
|
148 | <div class="label"> | |
149 | <label for="input">${_('Permissions')}:</label> |
|
149 | <label for="input">${_('Permissions')}:</label> | |
150 | </div> |
|
150 | </div> | |
151 | <div class="input"> |
|
151 | <div class="input"> | |
152 | <%include file="repo_edit_perms.html"/> |
|
152 | <%include file="repo_edit_perms.html"/> | |
153 | </div> |
|
153 | </div> | |
154 |
|
154 | |||
155 | <div class="buttons"> |
|
155 | <div class="buttons"> | |
156 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
156 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
157 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
157 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
158 | </div> |
|
158 | </div> | |
159 | </div> |
|
159 | </div> | |
160 | </div> |
|
160 | </div> | |
161 | </div> |
|
161 | </div> | |
162 | ${h.end_form()} |
|
162 | ${h.end_form()} | |
163 | </div> |
|
163 | </div> | |
164 |
|
164 | |||
165 | <div class="box box-right"> |
|
165 | <div class="box box-right"> | |
166 | <div class="title"> |
|
166 | <div class="title"> | |
167 | <h5>${_('Administration')}</h5> |
|
167 | <h5>${_('Administration')}</h5> | |
168 | </div> |
|
168 | </div> | |
169 |
|
169 | |||
170 | <h3>${_('Statistics')}</h3> |
|
170 | <h3>${_('Statistics')}</h3> | |
171 | ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')} |
|
171 | ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')} | |
172 | <div class="form"> |
|
172 | <div class="form"> | |
173 | <div class="fields"> |
|
173 | <div class="fields"> | |
174 | ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")} |
|
174 | ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")} | |
175 | <div class="field" style="border:none;color:#888"> |
|
175 | <div class="field" style="border:none;color:#888"> | |
176 | <ul> |
|
176 | <ul> | |
177 | <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li> |
|
177 | <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li> | |
178 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> |
|
178 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> | |
179 | </ul> |
|
179 | </ul> | |
180 | </div> |
|
180 | </div> | |
181 | </div> |
|
181 | </div> | |
182 | </div> |
|
182 | </div> | |
183 | ${h.end_form()} |
|
183 | ${h.end_form()} | |
184 |
|
184 | |||
185 | %if c.repo_info.clone_uri: |
|
185 | %if c.repo_info.clone_uri: | |
186 | <h3>${_('Remote')}</h3> |
|
186 | <h3>${_('Remote')}</h3> | |
187 | ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')} |
|
187 | ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')} | |
188 | <div class="form"> |
|
188 | <div class="form"> | |
189 | <div class="fields"> |
|
189 | <div class="fields"> | |
190 | ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="ui-btn",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")} |
|
190 | ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="ui-btn",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")} | |
191 | <div class="field" style="border:none"> |
|
191 | <div class="field" style="border:none"> | |
192 | <ul> |
|
192 | <ul> | |
193 | <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li> |
|
193 | <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li> | |
194 | </ul> |
|
194 | </ul> | |
195 | </div> |
|
195 | </div> | |
196 | </div> |
|
196 | </div> | |
197 | </div> |
|
197 | </div> | |
198 | ${h.end_form()} |
|
198 | ${h.end_form()} | |
199 | %endif |
|
199 | %endif | |
200 |
|
200 | |||
201 | <h3>${_('Cache')}</h3> |
|
201 | <h3>${_('Cache')}</h3> | |
202 | ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')} |
|
202 | ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')} | |
203 | <div class="form"> |
|
203 | <div class="form"> | |
204 | <div class="fields"> |
|
204 | <div class="fields"> | |
205 | ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")} |
|
205 | ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")} | |
206 | <div class="field" style="border:none;color:#888"> |
|
206 | <div class="field" style="border:none;color:#888"> | |
207 | <ul> |
|
207 | <ul> | |
208 | <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')} |
|
208 | <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')} | |
209 | </li> |
|
209 | </li> | |
210 | </ul> |
|
210 | </ul> | |
211 | </div> |
|
211 | </div> | |
212 | <div class="field" style="border:none;"> |
|
212 | <div class="field" style="border:none;"> | |
213 | ${_('List of cached values')} |
|
213 | ${_('List of cached values')} | |
214 | <table> |
|
214 | <table> | |
215 | <tr> |
|
215 | <tr> | |
216 | <th>${_('Prefix')}</th> |
|
216 | <th>${_('Prefix')}</th> | |
217 | <th>${_('Key')}</th> |
|
217 | <th>${_('Key')}</th> | |
218 | <th>${_('Active')}</th> |
|
218 | <th>${_('Active')}</th> | |
219 | </tr> |
|
219 | </tr> | |
220 | %for cache in c.repo_info.cache_keys: |
|
220 | %for cache in c.repo_info.cache_keys: | |
221 | <tr> |
|
221 | <tr> | |
222 | <td>${cache.prefix or '-'}</td> |
|
222 | <td>${cache.prefix or '-'}</td> | |
223 | <td>${cache.cache_key}</td> |
|
223 | <td>${cache.cache_key}</td> | |
224 | <td>${h.bool2icon(cache.cache_active)}</td> |
|
224 | <td>${h.bool2icon(cache.cache_active)}</td> | |
225 | </tr> |
|
225 | </tr> | |
226 | %endfor |
|
226 | %endfor | |
227 | </table> |
|
227 | </table> | |
228 | </div> |
|
228 | </div> | |
229 | </div> |
|
229 | </div> | |
230 | </div> |
|
230 | </div> | |
231 | ${h.end_form()} |
|
231 | ${h.end_form()} | |
232 |
|
232 | |||
233 | <h3>${_('Public journal')}</h3> |
|
233 | <h3>${_('Public journal')}</h3> | |
234 | ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')} |
|
234 | ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')} | |
235 | <div class="form"> |
|
235 | <div class="form"> | |
236 | ${h.hidden('auth_token',str(h.get_token()))} |
|
236 | ${h.hidden('auth_token',str(h.get_token()))} | |
237 | <div class="field"> |
|
237 | <div class="field"> | |
238 | %if c.in_public_journal: |
|
238 | %if c.in_public_journal: | |
239 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")} |
|
239 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")} | |
240 | %else: |
|
240 | %else: | |
241 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")} |
|
241 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")} | |
242 | %endif |
|
242 | %endif | |
243 | </div> |
|
243 | </div> | |
244 | <div class="field" style="border:none;color:#888"> |
|
244 | <div class="field" style="border:none;color:#888"> | |
245 | <ul> |
|
245 | <ul> | |
246 | <li>${_('All actions made on this repository will be accessible to everyone in public journal')} |
|
246 | <li>${_('All actions made on this repository will be accessible to everyone in public journal')} | |
247 | </li> |
|
247 | </li> | |
248 | </ul> |
|
248 | </ul> | |
249 | </div> |
|
249 | </div> | |
250 | </div> |
|
250 | </div> | |
251 | ${h.end_form()} |
|
251 | ${h.end_form()} | |
252 |
|
252 | |||
253 | <h3>${_('Locking')}</h3> |
|
253 | <h3>${_('Locking')}</h3> | |
254 | ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')} |
|
254 | ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')} | |
255 | <div class="form"> |
|
255 | <div class="form"> | |
256 | <div class="fields"> |
|
256 | <div class="fields"> | |
257 | %if c.repo_info.locked[0]: |
|
257 | %if c.repo_info.locked[0]: | |
258 | ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")} |
|
258 | ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")} | |
259 | ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))} |
|
259 | ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))} | |
260 | %else: |
|
260 | %else: | |
261 | ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")} |
|
261 | ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")} | |
262 | ${_('Repository is not locked')} |
|
262 | ${_('Repository is not locked')} | |
263 | %endif |
|
263 | %endif | |
264 | </div> |
|
264 | </div> | |
265 | <div class="field" style="border:none;color:#888"> |
|
265 | <div class="field" style="border:none;color:#888"> | |
266 | <ul> |
|
266 | <ul> | |
267 | <li>${_('Force locking on repository. Works only when anonymous access is disabled')} |
|
267 | <li>${_('Force locking on repository. Works only when anonymous access is disabled')} | |
268 | </li> |
|
268 | </li> | |
269 | </ul> |
|
269 | </ul> | |
270 | </div> |
|
270 | </div> | |
271 | </div> |
|
271 | </div> | |
272 | ${h.end_form()} |
|
272 | ${h.end_form()} | |
273 |
|
273 | |||
274 | <h3>${_('Set as fork of')}</h3> |
|
274 | <h3>${_('Set as fork of')}</h3> | |
275 | ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')} |
|
275 | ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')} | |
276 | <div class="form"> |
|
276 | <div class="form"> | |
277 | <div class="fields"> |
|
277 | <div class="fields"> | |
278 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} |
|
278 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} | |
279 | ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)} |
|
279 | ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)} | |
280 | </div> |
|
280 | </div> | |
281 | <div class="field" style="border:none;color:#888"> |
|
281 | <div class="field" style="border:none;color:#888"> | |
282 | <ul> |
|
282 | <ul> | |
283 | <li>${_('''Manually set this repository as a fork of another from the list''')}</li> |
|
283 | <li>${_('''Manually set this repository as a fork of another from the list''')}</li> | |
284 | </ul> |
|
284 | </ul> | |
285 | </div> |
|
285 | </div> | |
286 | </div> |
|
286 | </div> | |
287 | ${h.end_form()} |
|
287 | ${h.end_form()} | |
288 |
|
288 | |||
289 | <h3>${_('Delete')}</h3> |
|
289 | <h3>${_('Delete')}</h3> | |
290 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')} |
|
290 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')} | |
291 | <div class="form"> |
|
291 | <div class="form"> | |
292 | <div class="fields"> |
|
292 | <div class="fields"> | |
293 | ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")} |
|
293 | ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")} | |
294 | %if c.repo_info.forks.count(): |
|
294 | %if c.repo_info.forks.count(): | |
295 | - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()} |
|
295 | - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()} | |
296 | <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label> |
|
296 | <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label> | |
297 | <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label> |
|
297 | <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label> | |
298 | %endif |
|
298 | %endif | |
299 | </div> |
|
299 | </div> | |
300 | <div class="field" style="border:none;color:#888"> |
|
300 | <div class="field" style="border:none;color:#888"> | |
301 | <ul> |
|
301 | <ul> | |
302 | <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li> |
|
302 | <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li> | |
303 | </ul> |
|
303 | </ul> | |
304 | </div> |
|
304 | </div> | |
305 | </div> |
|
305 | </div> | |
306 | ${h.end_form()} |
|
306 | ${h.end_form()} | |
307 | </div> |
|
307 | </div> | |
308 |
|
308 | |||
309 | ##TODO: this should be controlled by the VISUAL setting |
|
309 | ##TODO: this should be controlled by the VISUAL setting | |
310 | %if c.visual.repository_fields: |
|
310 | %if c.visual.repository_fields: | |
311 | <div class="box box-left" style="clear:left"> |
|
311 | <div class="box box-left" style="clear:left"> | |
312 | <!-- box / title --> |
|
312 | <!-- box / title --> | |
313 | <div class="title"> |
|
313 | <div class="title"> | |
314 | <h5>${_('Extra fields')}</h5> |
|
314 | <h5>${_('Extra fields')}</h5> | |
315 | </div> |
|
315 | </div> | |
316 |
|
316 | |||
317 | <div class="emails_wrap"> |
|
317 | <div class="emails_wrap"> | |
318 | <table class="noborder"> |
|
318 | <table class="noborder"> | |
319 | %for field in c.repo_fields: |
|
319 | %for field in c.repo_fields: | |
320 | <tr> |
|
320 | <tr> | |
321 | <td>${field.field_label} (${field.field_key})</td> |
|
321 | <td>${field.field_label} (${field.field_key})</td> | |
322 | <td>${field.field_type}</td> |
|
322 | <td>${field.field_type}</td> | |
323 | <td> |
|
323 | <td> | |
324 | ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')} |
|
324 | ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')} | |
325 | ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id, |
|
325 | ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id, | |
326 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")} |
|
326 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")} | |
327 | ${h.end_form()} |
|
327 | ${h.end_form()} | |
328 | </td> |
|
328 | </td> | |
329 | </tr> |
|
329 | </tr> | |
330 | %endfor |
|
330 | %endfor | |
331 | </table> |
|
331 | </table> | |
332 | </div> |
|
332 | </div> | |
333 |
|
333 | |||
334 | ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')} |
|
334 | ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')} | |
335 | <div class="form"> |
|
335 | <div class="form"> | |
336 | <!-- fields --> |
|
336 | <!-- fields --> | |
337 | <div class="fields"> |
|
337 | <div class="fields"> | |
338 | <div class="field"> |
|
338 | <div class="field"> | |
339 | <div class="label"> |
|
339 | <div class="label"> | |
340 | <label for="new_field_key">${_('New field key')}:</label> |
|
340 | <label for="new_field_key">${_('New field key')}:</label> | |
341 | </div> |
|
341 | </div> | |
342 | <div class="input"> |
|
342 | <div class="input"> | |
343 | ${h.text('new_field_key', class_='small')} |
|
343 | ${h.text('new_field_key', class_='small')} | |
344 | </div> |
|
344 | </div> | |
345 | </div> |
|
345 | </div> | |
346 | <div class="field"> |
|
346 | <div class="field"> | |
347 | <div class="label"> |
|
347 | <div class="label"> | |
348 | <label for="new_field_label">${_('New field label')}:</label> |
|
348 | <label for="new_field_label">${_('New field label')}:</label> | |
349 | </div> |
|
349 | </div> | |
350 | <div class="input"> |
|
350 | <div class="input"> | |
351 | ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} |
|
351 | ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} | |
352 | </div> |
|
352 | </div> | |
353 | </div> |
|
353 | </div> | |
354 |
|
354 | |||
355 | <div class="field"> |
|
355 | <div class="field"> | |
356 | <div class="label"> |
|
356 | <div class="label"> | |
357 | <label for="new_field_desc">${_('New field description')}:</label> |
|
357 | <label for="new_field_desc">${_('New field description')}:</label> | |
358 | </div> |
|
358 | </div> | |
359 | <div class="input"> |
|
359 | <div class="input"> | |
360 | ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))} |
|
360 | ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))} | |
361 | </div> |
|
361 | </div> | |
362 | </div> |
|
362 | </div> | |
363 |
|
363 | |||
364 | <div class="buttons"> |
|
364 | <div class="buttons"> | |
365 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
365 | ${h.submit('save',_('Add'),class_="ui-btn large")} | |
366 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
366 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
367 | </div> |
|
367 | </div> | |
368 | </div> |
|
368 | </div> | |
369 | </div> |
|
369 | </div> | |
370 | ${h.end_form()} |
|
370 | ${h.end_form()} | |
371 | </div> |
|
371 | </div> | |
372 | %endif |
|
372 | %endif | |
373 | </%def> |
|
373 | </%def> |
@@ -1,76 +1,78 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Repositories groups administration')} - ${c.rhodecode_name} |
|
5 | ${_('Repositories groups administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 |
${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
|
11 | » | |||
|
12 | ${_('repositories groups')} | |||
11 | </%def> |
|
13 | </%def> | |
12 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
15 | ${self.menu('admin')} | |
14 | </%def> |
|
16 | </%def> | |
15 | <%def name="main()"> |
|
17 | <%def name="main()"> | |
16 | <div class="box"> |
|
18 | <div class="box"> | |
17 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
18 | <div class="title"> |
|
20 | <div class="title"> | |
19 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
20 | <ul class="links"> |
|
22 | <ul class="links"> | |
21 | <li> |
|
23 | <li> | |
22 | %if h.HasPermissionAny('hg.admin')(): |
|
24 | %if h.HasPermissionAny('hg.admin')(): | |
23 | <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span> |
|
25 | <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span> | |
24 | %endif |
|
26 | %endif | |
25 | </li> |
|
27 | </li> | |
26 | </ul> |
|
28 | </ul> | |
27 | </div> |
|
29 | </div> | |
28 | <!-- end box / title --> |
|
30 | <!-- end box / title --> | |
29 | <div class="table"> |
|
31 | <div class="table"> | |
30 | % if c.groups: |
|
32 | % if c.groups: | |
31 | <table class="table_disp"> |
|
33 | <table class="table_disp"> | |
32 |
|
34 | |||
33 | <thead> |
|
35 | <thead> | |
34 | <tr> |
|
36 | <tr> | |
35 | <th class="left"><a href="#">${_('Group name')}</a></th> |
|
37 | <th class="left"><a href="#">${_('Group name')}</a></th> | |
36 | <th class="left"><a href="#">${_('Description')}</a></th> |
|
38 | <th class="left"><a href="#">${_('Description')}</a></th> | |
37 | <th class="left"><a href="#">${_('Number of toplevel repositories')}</a></th> |
|
39 | <th class="left"><a href="#">${_('Number of toplevel repositories')}</a></th> | |
38 | <th class="left" colspan="2">${_('action')}</th> |
|
40 | <th class="left" colspan="2">${_('action')}</th> | |
39 | </tr> |
|
41 | </tr> | |
40 | </thead> |
|
42 | </thead> | |
41 |
|
43 | |||
42 | ## REPO GROUPS |
|
44 | ## REPO GROUPS | |
43 |
|
45 | |||
44 | % for gr in c.groups: |
|
46 | % for gr in c.groups: | |
45 | <% gr_cn = gr.repositories.count() %> |
|
47 | <% gr_cn = gr.repositories.count() %> | |
46 | <tr> |
|
48 | <tr> | |
47 | <td> |
|
49 | <td> | |
48 | <div style="white-space: nowrap"> |
|
50 | <div style="white-space: nowrap"> | |
49 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> |
|
51 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> | |
50 | ${h.link_to(h.literal(' » '.join(map(h.safe_unicode,[g.name for g in gr.parents+[gr]]))), url('repos_group_home',group_name=gr.group_name))} |
|
52 | ${h.link_to(h.literal(' » '.join(map(h.safe_unicode,[g.name for g in gr.parents+[gr]]))), url('repos_group_home',group_name=gr.group_name))} | |
51 | </div> |
|
53 | </div> | |
52 | </td> |
|
54 | </td> | |
53 | <td>${gr.group_description}</td> |
|
55 | <td>${gr.group_description}</td> | |
54 | <td><b>${gr_cn}</b></td> |
|
56 | <td><b>${gr_cn}</b></td> | |
55 | <td> |
|
57 | <td> | |
56 | <a href="${h.url('edit_repos_group',group_name=gr.group_name)}" title="${_('edit')}"> |
|
58 | <a href="${h.url('edit_repos_group',group_name=gr.group_name)}" title="${_('edit')}"> | |
57 | ${h.submit('edit_%s' % gr.group_name,_('edit'),class_="edit_icon action_button")} |
|
59 | ${h.submit('edit_%s' % gr.group_name,_('edit'),class_="edit_icon action_button")} | |
58 | </a> |
|
60 | </a> | |
59 | </td> |
|
61 | </td> | |
60 | <td> |
|
62 | <td> | |
61 | ${h.form(url('repos_group', group_name=gr.group_name),method='delete')} |
|
63 | ${h.form(url('repos_group', group_name=gr.group_name),method='delete')} | |
62 | ${h.submit('remove_%s' % gr.name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_cn) % (gr.name,gr_cn)+"');")} |
|
64 | ${h.submit('remove_%s' % gr.name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_cn) % (gr.name,gr_cn)+"');")} | |
63 | ${h.end_form()} |
|
65 | ${h.end_form()} | |
64 | </td> |
|
66 | </td> | |
65 | </tr> |
|
67 | </tr> | |
66 | % endfor |
|
68 | % endfor | |
67 |
|
69 | |||
68 | </table> |
|
70 | </table> | |
69 | % else: |
|
71 | % else: | |
70 | ${_('There are no repositories groups yet')} |
|
72 | ${_('There are no repositories groups yet')} | |
71 | % endif |
|
73 | % endif | |
72 |
|
74 | |||
73 | </div> |
|
75 | </div> | |
74 | </div> |
|
76 | </div> | |
75 |
|
77 | |||
76 | </%def> |
|
78 | </%def> |
@@ -1,344 +1,346 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Settings administration')} - ${c.rhodecode_name} |
|
5 | ${_('Settings administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 |
${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
|
10 | » | |||
|
11 | ${_('settings')} | |||
10 | </%def> |
|
12 | </%def> | |
11 |
|
13 | |||
12 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
15 | ${self.menu('admin')} | |
14 | </%def> |
|
16 | </%def> | |
15 |
|
17 | |||
16 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
17 | <div class="box"> |
|
19 | <div class="box"> | |
18 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
19 | <div class="title"> |
|
21 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
21 | </div> |
|
23 | </div> | |
22 | <!-- end box / title --> |
|
24 | <!-- end box / title --> | |
23 |
|
25 | |||
24 | <h3>${_('Remap and rescan repositories')}</h3> |
|
26 | <h3>${_('Remap and rescan repositories')}</h3> | |
25 | ${h.form(url('admin_setting', setting_id='mapping'),method='put')} |
|
27 | ${h.form(url('admin_setting', setting_id='mapping'),method='put')} | |
26 | <div class="form"> |
|
28 | <div class="form"> | |
27 | <!-- fields --> |
|
29 | <!-- fields --> | |
28 |
|
30 | |||
29 | <div class="fields"> |
|
31 | <div class="fields"> | |
30 | <div class="field"> |
|
32 | <div class="field"> | |
31 | <div class="label label-checkbox"> |
|
33 | <div class="label label-checkbox"> | |
32 | <label for="destroy">${_('rescan option')}:</label> |
|
34 | <label for="destroy">${_('rescan option')}:</label> | |
33 | </div> |
|
35 | </div> | |
34 | <div class="checkboxes"> |
|
36 | <div class="checkboxes"> | |
35 | <div class="checkbox"> |
|
37 | <div class="checkbox"> | |
36 | ${h.checkbox('destroy',True)} |
|
38 | ${h.checkbox('destroy',True)} | |
37 | <label for="destroy"> |
|
39 | <label for="destroy"> | |
38 | <span class="tooltip" title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}"> |
|
40 | <span class="tooltip" title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}"> | |
39 | ${_('destroy old data')}</span> </label> |
|
41 | ${_('destroy old data')}</span> </label> | |
40 | </div> |
|
42 | </div> | |
41 | <span class="help-block">${_('Rescan repositories location for new repositories. Also deletes obsolete if `destroy` flag is checked ')}</span> |
|
43 | <span class="help-block">${_('Rescan repositories location for new repositories. Also deletes obsolete if `destroy` flag is checked ')}</span> | |
42 | </div> |
|
44 | </div> | |
43 | </div> |
|
45 | </div> | |
44 |
|
46 | |||
45 | <div class="buttons"> |
|
47 | <div class="buttons"> | |
46 | ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")} |
|
48 | ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")} | |
47 | </div> |
|
49 | </div> | |
48 | </div> |
|
50 | </div> | |
49 | </div> |
|
51 | </div> | |
50 | ${h.end_form()} |
|
52 | ${h.end_form()} | |
51 |
|
53 | |||
52 | <h3>${_('Whoosh indexing')}</h3> |
|
54 | <h3>${_('Whoosh indexing')}</h3> | |
53 | ${h.form(url('admin_setting', setting_id='whoosh'),method='put')} |
|
55 | ${h.form(url('admin_setting', setting_id='whoosh'),method='put')} | |
54 | <div class="form"> |
|
56 | <div class="form"> | |
55 | <!-- fields --> |
|
57 | <!-- fields --> | |
56 |
|
58 | |||
57 | <div class="fields"> |
|
59 | <div class="fields"> | |
58 | <div class="field"> |
|
60 | <div class="field"> | |
59 | <div class="label label-checkbox"> |
|
61 | <div class="label label-checkbox"> | |
60 | <label>${_('index build option')}:</label> |
|
62 | <label>${_('index build option')}:</label> | |
61 | </div> |
|
63 | </div> | |
62 | <div class="checkboxes"> |
|
64 | <div class="checkboxes"> | |
63 | <div class="checkbox"> |
|
65 | <div class="checkbox"> | |
64 | ${h.checkbox('full_index',True)} |
|
66 | ${h.checkbox('full_index',True)} | |
65 | <label for="full_index">${_('build from scratch')}</label> |
|
67 | <label for="full_index">${_('build from scratch')}</label> | |
66 | </div> |
|
68 | </div> | |
67 | </div> |
|
69 | </div> | |
68 | </div> |
|
70 | </div> | |
69 |
|
71 | |||
70 | <div class="buttons"> |
|
72 | <div class="buttons"> | |
71 | ${h.submit('reindex',_('Reindex'),class_="ui-btn large")} |
|
73 | ${h.submit('reindex',_('Reindex'),class_="ui-btn large")} | |
72 | </div> |
|
74 | </div> | |
73 | </div> |
|
75 | </div> | |
74 | </div> |
|
76 | </div> | |
75 | ${h.end_form()} |
|
77 | ${h.end_form()} | |
76 |
|
78 | |||
77 | <h3>${_('Global application settings')}</h3> |
|
79 | <h3>${_('Global application settings')}</h3> | |
78 | ${h.form(url('admin_setting', setting_id='global'),method='put')} |
|
80 | ${h.form(url('admin_setting', setting_id='global'),method='put')} | |
79 | <div class="form"> |
|
81 | <div class="form"> | |
80 | <!-- fields --> |
|
82 | <!-- fields --> | |
81 |
|
83 | |||
82 | <div class="fields"> |
|
84 | <div class="fields"> | |
83 |
|
85 | |||
84 | <div class="field"> |
|
86 | <div class="field"> | |
85 | <div class="label"> |
|
87 | <div class="label"> | |
86 | <label for="rhodecode_title">${_('Application name')}:</label> |
|
88 | <label for="rhodecode_title">${_('Application name')}:</label> | |
87 | </div> |
|
89 | </div> | |
88 | <div class="input"> |
|
90 | <div class="input"> | |
89 | ${h.text('rhodecode_title',size=30)} |
|
91 | ${h.text('rhodecode_title',size=30)} | |
90 | </div> |
|
92 | </div> | |
91 | </div> |
|
93 | </div> | |
92 |
|
94 | |||
93 | <div class="field"> |
|
95 | <div class="field"> | |
94 | <div class="label"> |
|
96 | <div class="label"> | |
95 | <label for="rhodecode_realm">${_('Realm text')}:</label> |
|
97 | <label for="rhodecode_realm">${_('Realm text')}:</label> | |
96 | </div> |
|
98 | </div> | |
97 | <div class="input"> |
|
99 | <div class="input"> | |
98 | ${h.text('rhodecode_realm',size=30)} |
|
100 | ${h.text('rhodecode_realm',size=30)} | |
99 | </div> |
|
101 | </div> | |
100 | </div> |
|
102 | </div> | |
101 |
|
103 | |||
102 | <div class="field"> |
|
104 | <div class="field"> | |
103 | <div class="label"> |
|
105 | <div class="label"> | |
104 | <label for="rhodecode_ga_code">${_('GA code')}:</label> |
|
106 | <label for="rhodecode_ga_code">${_('GA code')}:</label> | |
105 | </div> |
|
107 | </div> | |
106 | <div class="input"> |
|
108 | <div class="input"> | |
107 | ${h.text('rhodecode_ga_code',size=30)} |
|
109 | ${h.text('rhodecode_ga_code',size=30)} | |
108 | </div> |
|
110 | </div> | |
109 | </div> |
|
111 | </div> | |
110 |
|
112 | |||
111 | <div class="buttons"> |
|
113 | <div class="buttons"> | |
112 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
114 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
113 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
115 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
114 | </div> |
|
116 | </div> | |
115 | </div> |
|
117 | </div> | |
116 | </div> |
|
118 | </div> | |
117 | ${h.end_form()} |
|
119 | ${h.end_form()} | |
118 |
|
120 | |||
119 | <h3>${_('Visualisation settings')}</h3> |
|
121 | <h3>${_('Visualisation settings')}</h3> | |
120 | ${h.form(url('admin_setting', setting_id='visual'),method='put')} |
|
122 | ${h.form(url('admin_setting', setting_id='visual'),method='put')} | |
121 | <div class="form"> |
|
123 | <div class="form"> | |
122 | <!-- fields --> |
|
124 | <!-- fields --> | |
123 |
|
125 | |||
124 | <div class="fields"> |
|
126 | <div class="fields"> | |
125 | <div class="field"> |
|
127 | <div class="field"> | |
126 | <div class="label label-checkbox"> |
|
128 | <div class="label label-checkbox"> | |
127 | <label>${_('General')}:</label> |
|
129 | <label>${_('General')}:</label> | |
128 | </div> |
|
130 | </div> | |
129 | <div class="checkboxes"> |
|
131 | <div class="checkboxes"> | |
130 | <div class="checkbox"> |
|
132 | <div class="checkbox"> | |
131 | ${h.checkbox('rhodecode_lightweight_dashboard','True')} |
|
133 | ${h.checkbox('rhodecode_lightweight_dashboard','True')} | |
132 | <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> |
|
134 | <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> | |
133 | </div> |
|
135 | </div> | |
134 | </div> |
|
136 | </div> | |
135 | <div class="checkboxes"> |
|
137 | <div class="checkboxes"> | |
136 | <div class="checkbox"> |
|
138 | <div class="checkbox"> | |
137 | ${h.checkbox('rhodecode_repository_fields','True')} |
|
139 | ${h.checkbox('rhodecode_repository_fields','True')} | |
138 | <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label> |
|
140 | <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label> | |
139 | </div> |
|
141 | </div> | |
140 | </div> |
|
142 | </div> | |
141 | </div> |
|
143 | </div> | |
142 |
|
144 | |||
143 | <div class="field"> |
|
145 | <div class="field"> | |
144 | <div class="label label-checkbox"> |
|
146 | <div class="label label-checkbox"> | |
145 | <label>${_('Icons')}:</label> |
|
147 | <label>${_('Icons')}:</label> | |
146 | </div> |
|
148 | </div> | |
147 | <div class="checkboxes"> |
|
149 | <div class="checkboxes"> | |
148 | <div class="checkbox"> |
|
150 | <div class="checkbox"> | |
149 | ${h.checkbox('rhodecode_show_public_icon','True')} |
|
151 | ${h.checkbox('rhodecode_show_public_icon','True')} | |
150 | <label for="rhodecode_show_public_icon">${_('Show public repo icon on repositories')}</label> |
|
152 | <label for="rhodecode_show_public_icon">${_('Show public repo icon on repositories')}</label> | |
151 | </div> |
|
153 | </div> | |
152 | <div class="checkbox"> |
|
154 | <div class="checkbox"> | |
153 | ${h.checkbox('rhodecode_show_private_icon','True')} |
|
155 | ${h.checkbox('rhodecode_show_private_icon','True')} | |
154 | <label for="rhodecode_show_private_icon">${_('Show private repo icon on repositories')}</label> |
|
156 | <label for="rhodecode_show_private_icon">${_('Show private repo icon on repositories')}</label> | |
155 | </div> |
|
157 | </div> | |
156 | </div> |
|
158 | </div> | |
157 | </div> |
|
159 | </div> | |
158 |
|
160 | |||
159 | <div class="field"> |
|
161 | <div class="field"> | |
160 | <div class="label label-checkbox"> |
|
162 | <div class="label label-checkbox"> | |
161 | <label>${_('Meta-Tagging')}:</label> |
|
163 | <label>${_('Meta-Tagging')}:</label> | |
162 | </div> |
|
164 | </div> | |
163 | <div class="checkboxes"> |
|
165 | <div class="checkboxes"> | |
164 | <div class="checkbox"> |
|
166 | <div class="checkbox"> | |
165 | ${h.checkbox('rhodecode_stylify_metatags','True')} |
|
167 | ${h.checkbox('rhodecode_stylify_metatags','True')} | |
166 | <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label> |
|
168 | <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label> | |
167 | </div> |
|
169 | </div> | |
168 | <div style="padding-left: 20px;"> |
|
170 | <div style="padding-left: 20px;"> | |
169 | <ul> <!-- Fix style here --> |
|
171 | <ul> <!-- Fix style here --> | |
170 | <li>[featured] <span class="metatag" tag="featured">featured</span></li> |
|
172 | <li>[featured] <span class="metatag" tag="featured">featured</span></li> | |
171 | <li>[stale] <span class="metatag" tag="stale">stale</span></li> |
|
173 | <li>[stale] <span class="metatag" tag="stale">stale</span></li> | |
172 | <li>[dead] <span class="metatag" tag="dead">dead</span></li> |
|
174 | <li>[dead] <span class="metatag" tag="dead">dead</span></li> | |
173 | <li>[lang => lang] <span class="metatag" tag="lang" >lang</span></li> |
|
175 | <li>[lang => lang] <span class="metatag" tag="lang" >lang</span></li> | |
174 | <li>[license => License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li> |
|
176 | <li>[license => License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li> | |
175 | <li>[requires => Repo] <span class="metatag" tag="requires" >requires => <a href="#" >Repo</a></span></li> |
|
177 | <li>[requires => Repo] <span class="metatag" tag="requires" >requires => <a href="#" >Repo</a></span></li> | |
176 | <li>[recommends => Repo] <span class="metatag" tag="recommends" >recommends => <a href="#" >Repo</a></span></li> |
|
178 | <li>[recommends => Repo] <span class="metatag" tag="recommends" >recommends => <a href="#" >Repo</a></span></li> | |
177 | <li>[see => URI] <span class="metatag" tag="see">see => <a href="#">URI</a> </span></li> |
|
179 | <li>[see => URI] <span class="metatag" tag="see">see => <a href="#">URI</a> </span></li> | |
178 | </ul> |
|
180 | </ul> | |
179 | </div> |
|
181 | </div> | |
180 | </div> |
|
182 | </div> | |
181 | </div> |
|
183 | </div> | |
182 |
|
184 | |||
183 | <div class="buttons"> |
|
185 | <div class="buttons"> | |
184 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
186 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
185 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
187 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
186 | </div> |
|
188 | </div> | |
187 |
|
189 | |||
188 | </div> |
|
190 | </div> | |
189 | </div> |
|
191 | </div> | |
190 | ${h.end_form()} |
|
192 | ${h.end_form()} | |
191 |
|
193 | |||
192 |
|
194 | |||
193 | <h3>${_('VCS settings')}</h3> |
|
195 | <h3>${_('VCS settings')}</h3> | |
194 | ${h.form(url('admin_setting', setting_id='vcs'),method='put')} |
|
196 | ${h.form(url('admin_setting', setting_id='vcs'),method='put')} | |
195 | <div class="form"> |
|
197 | <div class="form"> | |
196 | <!-- fields --> |
|
198 | <!-- fields --> | |
197 |
|
199 | |||
198 | <div class="fields"> |
|
200 | <div class="fields"> | |
199 |
|
201 | |||
200 | <div class="field"> |
|
202 | <div class="field"> | |
201 | <div class="label label-checkbox"> |
|
203 | <div class="label label-checkbox"> | |
202 | <label>${_('Web')}:</label> |
|
204 | <label>${_('Web')}:</label> | |
203 | </div> |
|
205 | </div> | |
204 | <div class="checkboxes"> |
|
206 | <div class="checkboxes"> | |
205 | <div class="checkbox"> |
|
207 | <div class="checkbox"> | |
206 | ${h.checkbox('web_push_ssl', 'True')} |
|
208 | ${h.checkbox('web_push_ssl', 'True')} | |
207 | <label for="web_push_ssl">${_('require ssl for vcs operations')}</label> |
|
209 | <label for="web_push_ssl">${_('require ssl for vcs operations')}</label> | |
208 | </div> |
|
210 | </div> | |
209 | <span class="help-block">${_('RhodeCode will require SSL for pushing or pulling. If SSL is missing it will return HTTP Error 406: Not Acceptable')}</span> |
|
211 | <span class="help-block">${_('RhodeCode will require SSL for pushing or pulling. If SSL is missing it will return HTTP Error 406: Not Acceptable')}</span> | |
210 | </div> |
|
212 | </div> | |
211 | </div> |
|
213 | </div> | |
212 |
|
214 | |||
213 | <div class="field"> |
|
215 | <div class="field"> | |
214 | <div class="label label-checkbox"> |
|
216 | <div class="label label-checkbox"> | |
215 | <label>${_('Hooks')}:</label> |
|
217 | <label>${_('Hooks')}:</label> | |
216 | </div> |
|
218 | </div> | |
217 | <div class="checkboxes"> |
|
219 | <div class="checkboxes"> | |
218 | <div class="checkbox"> |
|
220 | <div class="checkbox"> | |
219 | ${h.checkbox('hooks_changegroup_update','True')} |
|
221 | ${h.checkbox('hooks_changegroup_update','True')} | |
220 | <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label> |
|
222 | <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label> | |
221 | </div> |
|
223 | </div> | |
222 | <div class="checkbox"> |
|
224 | <div class="checkbox"> | |
223 | ${h.checkbox('hooks_changegroup_repo_size','True')} |
|
225 | ${h.checkbox('hooks_changegroup_repo_size','True')} | |
224 | <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label> |
|
226 | <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label> | |
225 | </div> |
|
227 | </div> | |
226 | <div class="checkbox"> |
|
228 | <div class="checkbox"> | |
227 | ${h.checkbox('hooks_changegroup_push_logger','True')} |
|
229 | ${h.checkbox('hooks_changegroup_push_logger','True')} | |
228 | <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label> |
|
230 | <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label> | |
229 | </div> |
|
231 | </div> | |
230 | <div class="checkbox"> |
|
232 | <div class="checkbox"> | |
231 | ${h.checkbox('hooks_outgoing_pull_logger','True')} |
|
233 | ${h.checkbox('hooks_outgoing_pull_logger','True')} | |
232 | <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label> |
|
234 | <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label> | |
233 | </div> |
|
235 | </div> | |
234 | </div> |
|
236 | </div> | |
235 | <div class="input" style="margin-top:10px"> |
|
237 | <div class="input" style="margin-top:10px"> | |
236 | ${h.link_to(_('advanced setup'),url('admin_edit_setting',setting_id='hooks'),class_="ui-btn")} |
|
238 | ${h.link_to(_('advanced setup'),url('admin_edit_setting',setting_id='hooks'),class_="ui-btn")} | |
237 | </div> |
|
239 | </div> | |
238 | </div> |
|
240 | </div> | |
239 | <div class="field"> |
|
241 | <div class="field"> | |
240 | <div class="label label-checkbox"> |
|
242 | <div class="label label-checkbox"> | |
241 | <label>${_('Mercurial Extensions')}:</label> |
|
243 | <label>${_('Mercurial Extensions')}:</label> | |
242 | </div> |
|
244 | </div> | |
243 | <div class="checkboxes"> |
|
245 | <div class="checkboxes"> | |
244 | <div class="checkbox"> |
|
246 | <div class="checkbox"> | |
245 | ${h.checkbox('extensions_largefiles','True')} |
|
247 | ${h.checkbox('extensions_largefiles','True')} | |
246 | <label for="extensions_hgsubversion">${_('largefiles extensions')}</label> |
|
248 | <label for="extensions_hgsubversion">${_('largefiles extensions')}</label> | |
247 | </div> |
|
249 | </div> | |
248 | <div class="checkbox"> |
|
250 | <div class="checkbox"> | |
249 | ${h.checkbox('extensions_hgsubversion','True')} |
|
251 | ${h.checkbox('extensions_hgsubversion','True')} | |
250 | <label for="extensions_hgsubversion">${_('hgsubversion extensions')}</label> |
|
252 | <label for="extensions_hgsubversion">${_('hgsubversion extensions')}</label> | |
251 | </div> |
|
253 | </div> | |
252 | <span class="help-block">${_('Requires hgsubversion library installed. Allows clonning from svn remote locations')}</span> |
|
254 | <span class="help-block">${_('Requires hgsubversion library installed. Allows clonning from svn remote locations')}</span> | |
253 | ##<div class="checkbox"> |
|
255 | ##<div class="checkbox"> | |
254 | ## ${h.checkbox('extensions_hggit','True')} |
|
256 | ## ${h.checkbox('extensions_hggit','True')} | |
255 | ## <label for="extensions_hggit">${_('hg-git extensions')}</label> |
|
257 | ## <label for="extensions_hggit">${_('hg-git extensions')}</label> | |
256 | ##</div> |
|
258 | ##</div> | |
257 | ##<span class="help-block">${_('Requires hg-git library installed. Allows clonning from git remote locations')}</span> |
|
259 | ##<span class="help-block">${_('Requires hg-git library installed. Allows clonning from git remote locations')}</span> | |
258 | </div> |
|
260 | </div> | |
259 | </div> |
|
261 | </div> | |
260 | <div class="field"> |
|
262 | <div class="field"> | |
261 | <div class="label"> |
|
263 | <div class="label"> | |
262 | <label for="paths_root_path">${_('Repositories location')}:</label> |
|
264 | <label for="paths_root_path">${_('Repositories location')}:</label> | |
263 | </div> |
|
265 | </div> | |
264 | <div class="input"> |
|
266 | <div class="input"> | |
265 | ${h.text('paths_root_path',size=30,readonly="readonly")} |
|
267 | ${h.text('paths_root_path',size=30,readonly="readonly")} | |
266 | <span id="path_unlock" class="tooltip" |
|
268 | <span id="path_unlock" class="tooltip" | |
267 | title="${h.tooltip(_('This a crucial application setting. If you are really sure you need to change this, you must restart application in order to make this setting take effect. Click this label to unlock.'))}"> |
|
269 | title="${h.tooltip(_('This a crucial application setting. If you are really sure you need to change this, you must restart application in order to make this setting take effect. Click this label to unlock.'))}"> | |
268 | ${_('unlock')}</span> |
|
270 | ${_('unlock')}</span> | |
269 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> |
|
271 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> | |
270 | </div> |
|
272 | </div> | |
271 | </div> |
|
273 | </div> | |
272 |
|
274 | |||
273 | <div class="buttons"> |
|
275 | <div class="buttons"> | |
274 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
276 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
275 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
277 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
276 | </div> |
|
278 | </div> | |
277 | </div> |
|
279 | </div> | |
278 | </div> |
|
280 | </div> | |
279 | ${h.end_form()} |
|
281 | ${h.end_form()} | |
280 |
|
282 | |||
281 | <script type="text/javascript"> |
|
283 | <script type="text/javascript"> | |
282 | YAHOO.util.Event.onDOMReady(function(){ |
|
284 | YAHOO.util.Event.onDOMReady(function(){ | |
283 | YAHOO.util.Event.addListener('path_unlock','click',function(){ |
|
285 | YAHOO.util.Event.addListener('path_unlock','click',function(){ | |
284 | YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly'); |
|
286 | YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly'); | |
285 | }); |
|
287 | }); | |
286 | }); |
|
288 | }); | |
287 | </script> |
|
289 | </script> | |
288 |
|
290 | |||
289 | <h3>${_('Test Email')}</h3> |
|
291 | <h3>${_('Test Email')}</h3> | |
290 | ${h.form(url('admin_setting', setting_id='email'),method='put')} |
|
292 | ${h.form(url('admin_setting', setting_id='email'),method='put')} | |
291 | <div class="form"> |
|
293 | <div class="form"> | |
292 | <!-- fields --> |
|
294 | <!-- fields --> | |
293 |
|
295 | |||
294 | <div class="fields"> |
|
296 | <div class="fields"> | |
295 | <div class="field"> |
|
297 | <div class="field"> | |
296 | <div class="label"> |
|
298 | <div class="label"> | |
297 | <label for="test_email">${_('Email to')}:</label> |
|
299 | <label for="test_email">${_('Email to')}:</label> | |
298 | </div> |
|
300 | </div> | |
299 | <div class="input"> |
|
301 | <div class="input"> | |
300 | ${h.text('test_email',size=30)} |
|
302 | ${h.text('test_email',size=30)} | |
301 | </div> |
|
303 | </div> | |
302 | </div> |
|
304 | </div> | |
303 |
|
305 | |||
304 | <div class="buttons"> |
|
306 | <div class="buttons"> | |
305 | ${h.submit('send',_('Send'),class_="ui-btn large")} |
|
307 | ${h.submit('send',_('Send'),class_="ui-btn large")} | |
306 | </div> |
|
308 | </div> | |
307 | </div> |
|
309 | </div> | |
308 | </div> |
|
310 | </div> | |
309 | ${h.end_form()} |
|
311 | ${h.end_form()} | |
310 |
|
312 | |||
311 | <h3>${_('System Info and Packages')}</h3> |
|
313 | <h3>${_('System Info and Packages')}</h3> | |
312 | <div class="form"> |
|
314 | <div class="form"> | |
313 | <div> |
|
315 | <div> | |
314 | <h5 id="expand_modules" style="cursor: pointer">↓ ${_('show')} ↓</h5> |
|
316 | <h5 id="expand_modules" style="cursor: pointer">↓ ${_('show')} ↓</h5> | |
315 | </div> |
|
317 | </div> | |
316 | <div id="expand_modules_table" style="display:none"> |
|
318 | <div id="expand_modules_table" style="display:none"> | |
317 | <h5>Python - ${c.py_version}</h5> |
|
319 | <h5>Python - ${c.py_version}</h5> | |
318 | <h5>System - ${c.platform}</h5> |
|
320 | <h5>System - ${c.platform}</h5> | |
319 |
|
321 | |||
320 | <table class="table" style="margin:0px 0px 0px 20px"> |
|
322 | <table class="table" style="margin:0px 0px 0px 20px"> | |
321 | <colgroup> |
|
323 | <colgroup> | |
322 | <col style="width:220px"> |
|
324 | <col style="width:220px"> | |
323 | </colgroup> |
|
325 | </colgroup> | |
324 | <tbody> |
|
326 | <tbody> | |
325 | %for key, value in c.modules: |
|
327 | %for key, value in c.modules: | |
326 | <tr> |
|
328 | <tr> | |
327 | <th style="text-align: right;padding-right:5px;">${key}</th> |
|
329 | <th style="text-align: right;padding-right:5px;">${key}</th> | |
328 | <td>${value}</td> |
|
330 | <td>${value}</td> | |
329 | </tr> |
|
331 | </tr> | |
330 | %endfor |
|
332 | %endfor | |
331 | </tbody> |
|
333 | </tbody> | |
332 | </table> |
|
334 | </table> | |
333 | </div> |
|
335 | </div> | |
334 | </div> |
|
336 | </div> | |
335 |
|
337 | |||
336 | <script type="text/javascript"> |
|
338 | <script type="text/javascript"> | |
337 | YUE.on('expand_modules','click',function(e){ |
|
339 | YUE.on('expand_modules','click',function(e){ | |
338 | YUD.setStyle('expand_modules_table','display',''); |
|
340 | YUD.setStyle('expand_modules_table','display',''); | |
339 | YUD.setStyle('expand_modules','display','none'); |
|
341 | YUD.setStyle('expand_modules','display','none'); | |
340 | }) |
|
342 | }) | |
341 | </script> |
|
343 | </script> | |
342 |
|
344 | |||
343 | </div> |
|
345 | </div> | |
344 | </%def> |
|
346 | </%def> |
@@ -1,53 +1,55 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Users groups administration')} - ${c.rhodecode_name} |
|
5 | ${_('Users groups administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 |
${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
|
10 | » | |||
|
11 | ${_('users groups')} | |||
10 | </%def> |
|
12 | </%def> | |
11 |
|
13 | |||
12 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
15 | ${self.menu('admin')} | |
14 | </%def> |
|
16 | </%def> | |
15 |
|
17 | |||
16 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
17 | <div class="box"> |
|
19 | <div class="box"> | |
18 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
19 | <div class="title"> |
|
21 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
21 | <ul class="links"> |
|
23 | <ul class="links"> | |
22 | <li> |
|
24 | <li> | |
23 | <span>${h.link_to(_(u'Add new user group'),h.url('new_users_group'))}</span> |
|
25 | <span>${h.link_to(_(u'Add new user group'),h.url('new_users_group'))}</span> | |
24 | </li> |
|
26 | </li> | |
25 |
|
27 | |||
26 | </ul> |
|
28 | </ul> | |
27 | </div> |
|
29 | </div> | |
28 | <!-- end box / title --> |
|
30 | <!-- end box / title --> | |
29 | <div class="table"> |
|
31 | <div class="table"> | |
30 | <table class="table_disp"> |
|
32 | <table class="table_disp"> | |
31 | <tr class="header"> |
|
33 | <tr class="header"> | |
32 | <th class="left">${_('group name')}</th> |
|
34 | <th class="left">${_('group name')}</th> | |
33 | <th class="left">${_('members')}</th> |
|
35 | <th class="left">${_('members')}</th> | |
34 | <th class="left">${_('active')}</th> |
|
36 | <th class="left">${_('active')}</th> | |
35 | <th class="left">${_('action')}</th> |
|
37 | <th class="left">${_('action')}</th> | |
36 | </tr> |
|
38 | </tr> | |
37 | %for cnt,u_group in enumerate(c.users_groups_list): |
|
39 | %for cnt,u_group in enumerate(c.users_groups_list): | |
38 | <tr class="parity${cnt%2}"> |
|
40 | <tr class="parity${cnt%2}"> | |
39 | <td>${h.link_to(u_group.users_group_name,h.url('edit_users_group', id=u_group.users_group_id))}</td> |
|
41 | <td>${h.link_to(u_group.users_group_name,h.url('edit_users_group', id=u_group.users_group_id))}</td> | |
40 | <td><span class="tooltip" title="${h.tooltip(', '.join(map(h.safe_unicode,[x.user.username for x in u_group.members[:50]])))}">${len(u_group.members)}</span></td> |
|
42 | <td><span class="tooltip" title="${h.tooltip(', '.join(map(h.safe_unicode,[x.user.username for x in u_group.members[:50]])))}">${len(u_group.members)}</span></td> | |
41 | <td>${h.bool2icon(u_group.users_group_active)}</td> |
|
43 | <td>${h.bool2icon(u_group.users_group_active)}</td> | |
42 | <td> |
|
44 | <td> | |
43 | ${h.form(url('users_group', id=u_group.users_group_id),method='delete')} |
|
45 | ${h.form(url('users_group', id=u_group.users_group_id),method='delete')} | |
44 | ${h.submit('remove_',_('delete'),id="remove_group_%s" % u_group.users_group_id, |
|
46 | ${h.submit('remove_',_('delete'),id="remove_group_%s" % u_group.users_group_id, | |
45 | class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this users group: %s') % u_group.users_group_name+"');")} |
|
47 | class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this users group: %s') % u_group.users_group_name+"');")} | |
46 | ${h.end_form()} |
|
48 | ${h.end_form()} | |
47 | </td> |
|
49 | </td> | |
48 | </tr> |
|
50 | </tr> | |
49 | %endfor |
|
51 | %endfor | |
50 | </table> |
|
52 | </table> | |
51 | </div> |
|
53 | </div> | |
52 | </div> |
|
54 | </div> | |
53 | </%def> |
|
55 | </%def> |
@@ -1,78 +1,78 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Bookmarks') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Bookmarks') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
10 | <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" value="${_('quick filter...')}"/> | |
11 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
11 | ${h.link_to(_(u'Home'),h.url('/'))} | |
12 | » |
|
12 | » | |
13 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
13 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
14 | » |
|
14 | » | |
15 | ${_('bookmarks')} |
|
15 | ${_('bookmarks')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 | ${self.menu('bookmarks')} |
|
19 | ${self.menu('bookmarks')} | |
20 | </%def> |
|
20 | </%def> | |
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <div class="box"> |
|
22 | <div class="box"> | |
23 | <!-- box / title --> |
|
23 | <!-- box / title --> | |
24 | <div class="title"> |
|
24 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
25 | ${self.breadcrumbs()} | |
26 | </div> |
|
26 | </div> | |
27 | <!-- end box / title --> |
|
27 | <!-- end box / title --> | |
28 | <div class="table"> |
|
28 | <div class="table"> | |
29 | <%include file='bookmarks_data.html'/> |
|
29 | <%include file='bookmarks_data.html'/> | |
30 | </div> |
|
30 | </div> | |
31 | </div> |
|
31 | </div> | |
32 | <script type="text/javascript"> |
|
32 | <script type="text/javascript"> | |
33 |
|
33 | |||
34 | // main table sorting |
|
34 | // main table sorting | |
35 | var myColumnDefs = [ |
|
35 | var myColumnDefs = [ | |
36 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
36 | {key:"name",label:"${_('Name')}",sortable:true}, | |
37 | {key:"date",label:"${_('Date')}",sortable:true, |
|
37 | {key:"date",label:"${_('Date')}",sortable:true, | |
38 | sortOptions: { sortFunction: dateSort }}, |
|
38 | sortOptions: { sortFunction: dateSort }}, | |
39 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
39 | {key:"author",label:"${_('Author')}",sortable:true}, | |
40 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
40 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
41 | sortOptions: { sortFunction: revisionSort }}, |
|
41 | sortOptions: { sortFunction: revisionSort }}, | |
42 | ]; |
|
42 | ]; | |
43 |
|
43 | |||
44 | var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data")); |
|
44 | var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data")); | |
45 |
|
45 | |||
46 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
46 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
47 |
|
47 | |||
48 | myDataSource.responseSchema = { |
|
48 | myDataSource.responseSchema = { | |
49 | fields: [ |
|
49 | fields: [ | |
50 | {key:"name"}, |
|
50 | {key:"name"}, | |
51 | {key:"date"}, |
|
51 | {key:"date"}, | |
52 | {key:"author"}, |
|
52 | {key:"author"}, | |
53 | {key:"revision"}, |
|
53 | {key:"revision"}, | |
54 | ] |
|
54 | ] | |
55 | }; |
|
55 | }; | |
56 |
|
56 | |||
57 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
57 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
58 | { |
|
58 | { | |
59 | sortedBy:{key:"name",dir:"asc"}, |
|
59 | sortedBy:{key:"name",dir:"asc"}, | |
60 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
60 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
61 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
61 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
62 | MSG_EMPTY:"${_('No records found.')}", |
|
62 | MSG_EMPTY:"${_('No records found.')}", | |
63 | MSG_ERROR:"${_('Data error.')}", |
|
63 | MSG_ERROR:"${_('Data error.')}", | |
64 | MSG_LOADING:"${_('Loading...')}", |
|
64 | MSG_LOADING:"${_('Loading...')}", | |
65 | } |
|
65 | } | |
66 | ); |
|
66 | ); | |
67 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
67 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
68 | tooltip_activate(); |
|
68 | tooltip_activate(); | |
69 | var func = function(node){ |
|
69 | var func = function(node){ | |
70 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
70 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
71 | } |
|
71 | } | |
72 | q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func); |
|
72 | q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func); | |
73 | }); |
|
73 | }); | |
74 |
|
74 | |||
75 | </script> |
|
75 | </script> | |
76 |
|
76 | |||
77 |
|
77 | |||
78 | </%def> |
|
78 | </%def> |
@@ -1,93 +1,93 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Branches') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Branches') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
9 | <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" value="${_('quick filter...')}"/> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | ${h.link_to(_(u'Home'),h.url('/'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
13 | » |
|
13 | » | |
14 | ${_('branches')} |
|
14 | ${_('branches')} | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="page_nav()"> |
|
17 | <%def name="page_nav()"> | |
18 | ${self.menu('branches')} |
|
18 | ${self.menu('branches')} | |
19 | </%def> |
|
19 | </%def> | |
20 |
|
20 | |||
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <div class="box"> |
|
22 | <div class="box"> | |
23 | <!-- box / title --> |
|
23 | <!-- box / title --> | |
24 | <div class="title"> |
|
24 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
25 | ${self.breadcrumbs()} | |
26 | </div> |
|
26 | </div> | |
27 | <!-- end box / title --> |
|
27 | <!-- end box / title --> | |
28 | %if c.repo_branches: |
|
28 | %if c.repo_branches: | |
29 | <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;vertical-align: right;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div> |
|
29 | <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;vertical-align: right;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div> | |
30 | %endif |
|
30 | %endif | |
31 | <div class="table"> |
|
31 | <div class="table"> | |
32 | <%include file='branches_data.html'/> |
|
32 | <%include file='branches_data.html'/> | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | <script type="text/javascript"> |
|
35 | <script type="text/javascript"> | |
36 | YUE.on('compare_branches','click',function(e){ |
|
36 | YUE.on('compare_branches','click',function(e){ | |
37 | YUE.preventDefault(e); |
|
37 | YUE.preventDefault(e); | |
38 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
38 | var org = YUQ('input[name=compare_org]:checked')[0]; | |
39 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
39 | var other = YUQ('input[name=compare_other]:checked')[0]; | |
40 |
|
40 | |||
41 | if(org && other){ |
|
41 | if(org && other){ | |
42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}"; |
|
42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}"; | |
43 | var u = compare_url.replace('__ORG__',org.value) |
|
43 | var u = compare_url.replace('__ORG__',org.value) | |
44 | .replace('__OTHER__',other.value); |
|
44 | .replace('__OTHER__',other.value); | |
45 | window.location=u; |
|
45 | window.location=u; | |
46 | } |
|
46 | } | |
47 | }); |
|
47 | }); | |
48 | // main table sorting |
|
48 | // main table sorting | |
49 | var myColumnDefs = [ |
|
49 | var myColumnDefs = [ | |
50 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
50 | {key:"name",label:"${_('Name')}",sortable:true}, | |
51 | {key:"date",label:"${_('Date')}",sortable:true, |
|
51 | {key:"date",label:"${_('Date')}",sortable:true, | |
52 | sortOptions: { sortFunction: dateSort }}, |
|
52 | sortOptions: { sortFunction: dateSort }}, | |
53 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
53 | {key:"author",label:"${_('Author')}",sortable:true}, | |
54 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
54 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
55 | sortOptions: { sortFunction: revisionSort }}, |
|
55 | sortOptions: { sortFunction: revisionSort }}, | |
56 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
56 | {key:"compare",label:"${_('Compare')}",sortable:false,}, | |
57 | ]; |
|
57 | ]; | |
58 |
|
58 | |||
59 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); |
|
59 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); | |
60 |
|
60 | |||
61 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
61 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
62 |
|
62 | |||
63 | myDataSource.responseSchema = { |
|
63 | myDataSource.responseSchema = { | |
64 | fields: [ |
|
64 | fields: [ | |
65 | {key:"name"}, |
|
65 | {key:"name"}, | |
66 | {key:"date"}, |
|
66 | {key:"date"}, | |
67 | {key:"author"}, |
|
67 | {key:"author"}, | |
68 | {key:"revision"}, |
|
68 | {key:"revision"}, | |
69 | {key:"compare"}, |
|
69 | {key:"compare"}, | |
70 | ] |
|
70 | ] | |
71 | }; |
|
71 | }; | |
72 |
|
72 | |||
73 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
73 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
74 | { |
|
74 | { | |
75 | sortedBy:{key:"name",dir:"asc"}, |
|
75 | sortedBy:{key:"name",dir:"asc"}, | |
76 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
76 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
77 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
77 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
78 | MSG_EMPTY:"${_('No records found.')}", |
|
78 | MSG_EMPTY:"${_('No records found.')}", | |
79 | MSG_ERROR:"${_('Data error.')}", |
|
79 | MSG_ERROR:"${_('Data error.')}", | |
80 | MSG_LOADING:"${_('Loading...')}", |
|
80 | MSG_LOADING:"${_('Loading...')}", | |
81 | } |
|
81 | } | |
82 | ); |
|
82 | ); | |
83 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
83 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
84 | tooltip_activate(); |
|
84 | tooltip_activate(); | |
85 | var func = function(node){ |
|
85 | var func = function(node){ | |
86 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
86 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
87 | } |
|
87 | } | |
88 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); |
|
88 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); | |
89 | }); |
|
89 | }); | |
90 |
|
90 | |||
91 | </script> |
|
91 | </script> | |
92 |
|
92 | |||
93 | </%def> |
|
93 | </%def> |
@@ -1,306 +1,306 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%inherit file="/base/base.html"/> |
|
3 | <%inherit file="/base/base.html"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('%s Changelog') % c.repo_name} - ${c.rhodecode_name} |
|
6 | ${_('%s Changelog') % c.repo_name} - ${c.rhodecode_name} | |
7 | </%def> |
|
7 | </%def> | |
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | ${h.link_to(_(u'Home'),h.url('/'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
13 | » |
|
13 | » | |
14 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
|
14 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> | |
15 |
${_(' |
|
15 | ${_('changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 | ${self.menu('changelog')} |
|
19 | ${self.menu('changelog')} | |
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 | <div class="table"> |
|
28 | <div class="table"> | |
29 | % if c.pagination: |
|
29 | % if c.pagination: | |
30 | <div id="graph"> |
|
30 | <div id="graph"> | |
31 | <div id="graph_nodes"> |
|
31 | <div id="graph_nodes"> | |
32 | <canvas id="graph_canvas"></canvas> |
|
32 | <canvas id="graph_canvas"></canvas> | |
33 | </div> |
|
33 | </div> | |
34 | <div id="graph_content"> |
|
34 | <div id="graph_content"> | |
35 | <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;"> |
|
35 | <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;"> | |
36 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> |
|
36 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> | |
37 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> |
|
37 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> | |
38 |
|
38 | |||
39 | %if c.rhodecode_db_repo.fork: |
|
39 | %if c.rhodecode_db_repo.fork: | |
40 | <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default')}" class="ui-btn small">${_('Compare fork with parent')}</a> |
|
40 | <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default')}" class="ui-btn small">${_('Compare fork with parent')}</a> | |
41 | %endif |
|
41 | %endif | |
42 | %if h.is_hg(c.rhodecode_repo): |
|
42 | %if h.is_hg(c.rhodecode_repo): | |
43 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a> |
|
43 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a> | |
44 | %endif |
|
44 | %endif | |
45 | </div> |
|
45 | </div> | |
46 | <div class="container_header"> |
|
46 | <div class="container_header"> | |
47 | ${h.form(h.url.current(),method='get')} |
|
47 | ${h.form(h.url.current(),method='get')} | |
48 | <div class="info_box" style="float:left"> |
|
48 | <div class="info_box" style="float:left"> | |
49 | ${h.submit('set',_('Show'),class_="ui-btn")} |
|
49 | ${h.submit('set',_('Show'),class_="ui-btn")} | |
50 | ${h.text('size',size=1,value=c.size)} |
|
50 | ${h.text('size',size=1,value=c.size)} | |
51 | ${_('revisions')} |
|
51 | ${_('revisions')} | |
52 | </div> |
|
52 | </div> | |
53 | ${h.end_form()} |
|
53 | ${h.end_form()} | |
54 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
54 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> | |
55 | </div> |
|
55 | </div> | |
56 |
|
56 | |||
57 | %for cnt,cs in enumerate(c.pagination): |
|
57 | %for cnt,cs in enumerate(c.pagination): | |
58 | <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
58 | <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> | |
59 | <div class="left"> |
|
59 | <div class="left"> | |
60 | <div> |
|
60 | <div> | |
61 | ${h.checkbox(cs.raw_id,class_="changeset_range")} |
|
61 | ${h.checkbox(cs.raw_id,class_="changeset_range")} | |
62 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> |
|
62 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="author"> |
|
64 | <div class="author"> | |
65 | <div class="gravatar"> |
|
65 | <div class="gravatar"> | |
66 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> |
|
66 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> | |
67 | </div> |
|
67 | </div> | |
68 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> |
|
68 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="date">${h.fmt_date(cs.date)}</div> |
|
70 | <div class="date">${h.fmt_date(cs.date)}</div> | |
71 | </div> |
|
71 | </div> | |
72 | <div class="mid"> |
|
72 | <div class="mid"> | |
73 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
73 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> | |
74 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> |
|
74 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> | |
75 | </div> |
|
75 | </div> | |
76 | <div class="right"> |
|
76 | <div class="right"> | |
77 | <div class="changes"> |
|
77 | <div class="changes"> | |
78 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> |
|
78 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> | |
79 | <div class="comments-container"> |
|
79 | <div class="comments-container"> | |
80 | %if len(c.comments.get(cs.raw_id,[])) > 0: |
|
80 | %if len(c.comments.get(cs.raw_id,[])) > 0: | |
81 | <div class="comments-cnt" title="${('comments')}"> |
|
81 | <div class="comments-cnt" title="${('comments')}"> | |
82 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
82 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> | |
83 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> |
|
83 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> | |
84 | <img src="${h.url('/images/icons/comments.png')}"> |
|
84 | <img src="${h.url('/images/icons/comments.png')}"> | |
85 | </a> |
|
85 | </a> | |
86 | </div> |
|
86 | </div> | |
87 | %endif |
|
87 | %endif | |
88 | </div> |
|
88 | </div> | |
89 | <div class="changeset-status-container"> |
|
89 | <div class="changeset-status-container"> | |
90 | %if c.statuses.get(cs.raw_id): |
|
90 | %if c.statuses.get(cs.raw_id): | |
91 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> |
|
91 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> | |
92 | <div class="changeset-status-ico"> |
|
92 | <div class="changeset-status-ico"> | |
93 | %if c.statuses.get(cs.raw_id)[2]: |
|
93 | %if c.statuses.get(cs.raw_id)[2]: | |
94 | <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> |
|
94 | <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> | |
95 | %else: |
|
95 | %else: | |
96 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> |
|
96 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> | |
97 | %endif |
|
97 | %endif | |
98 | </div> |
|
98 | </div> | |
99 | %endif |
|
99 | %endif | |
100 | </div> |
|
100 | </div> | |
101 | </div> |
|
101 | </div> | |
102 | %if cs.parents: |
|
102 | %if cs.parents: | |
103 | %for p_cs in reversed(cs.parents): |
|
103 | %for p_cs in reversed(cs.parents): | |
104 | <div class="parent">${_('Parent')} |
|
104 | <div class="parent">${_('Parent')} | |
105 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), |
|
105 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), | |
106 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> |
|
106 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> | |
107 | </div> |
|
107 | </div> | |
108 | %endfor |
|
108 | %endfor | |
109 | %else: |
|
109 | %else: | |
110 | <div class="parent">${_('No parents')}</div> |
|
110 | <div class="parent">${_('No parents')}</div> | |
111 | %endif |
|
111 | %endif | |
112 |
|
112 | |||
113 | <span class="logtags"> |
|
113 | <span class="logtags"> | |
114 | %if len(cs.parents)>1: |
|
114 | %if len(cs.parents)>1: | |
115 | <span class="merge">${_('merge')}</span> |
|
115 | <span class="merge">${_('merge')}</span> | |
116 | %endif |
|
116 | %endif | |
117 | %if cs.branch: |
|
117 | %if cs.branch: | |
118 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
118 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | |
119 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
119 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
120 | </span> |
|
120 | </span> | |
121 | %endif |
|
121 | %endif | |
122 | %if h.is_hg(c.rhodecode_repo): |
|
122 | %if h.is_hg(c.rhodecode_repo): | |
123 | %for book in cs.bookmarks: |
|
123 | %for book in cs.bookmarks: | |
124 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
124 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
125 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
125 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
126 | </span> |
|
126 | </span> | |
127 | %endfor |
|
127 | %endfor | |
128 | %endif |
|
128 | %endif | |
129 | %for tag in cs.tags: |
|
129 | %for tag in cs.tags: | |
130 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
130 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
131 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
131 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> | |
132 | %endfor |
|
132 | %endfor | |
133 | </span> |
|
133 | </span> | |
134 | </div> |
|
134 | </div> | |
135 | </div> |
|
135 | </div> | |
136 |
|
136 | |||
137 | %endfor |
|
137 | %endfor | |
138 | <div class="pagination-wh pagination-left"> |
|
138 | <div class="pagination-wh pagination-left"> | |
139 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
139 | ${c.pagination.pager('$link_previous ~2~ $link_next')} | |
140 | </div> |
|
140 | </div> | |
141 | </div> |
|
141 | </div> | |
142 | </div> |
|
142 | </div> | |
143 |
|
143 | |||
144 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
|
144 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> | |
145 | <script type="text/javascript"> |
|
145 | <script type="text/javascript"> | |
146 | YAHOO.util.Event.onDOMReady(function(){ |
|
146 | YAHOO.util.Event.onDOMReady(function(){ | |
147 |
|
147 | |||
148 | //Monitor range checkboxes and build a link to changesets |
|
148 | //Monitor range checkboxes and build a link to changesets | |
149 | //ranges |
|
149 | //ranges | |
150 | var checkboxes = YUD.getElementsByClassName('changeset_range'); |
|
150 | var checkboxes = YUD.getElementsByClassName('changeset_range'); | |
151 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
|
151 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; | |
152 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; |
|
152 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; | |
153 | YUE.on(checkboxes,'click',function(e){ |
|
153 | YUE.on(checkboxes,'click',function(e){ | |
154 | var clicked_cb = e.currentTarget; |
|
154 | var clicked_cb = e.currentTarget; | |
155 | var checked_checkboxes = []; |
|
155 | var checked_checkboxes = []; | |
156 | for (pos in checkboxes){ |
|
156 | for (pos in checkboxes){ | |
157 | if(checkboxes[pos].checked){ |
|
157 | if(checkboxes[pos].checked){ | |
158 | checked_checkboxes.push(checkboxes[pos]); |
|
158 | checked_checkboxes.push(checkboxes[pos]); | |
159 | } |
|
159 | } | |
160 | } |
|
160 | } | |
161 | if(YUD.get('open_new_pr')){ |
|
161 | if(YUD.get('open_new_pr')){ | |
162 | if(checked_checkboxes.length>0){ |
|
162 | if(checked_checkboxes.length>0){ | |
163 | // modify open pull request to show we have selected cs |
|
163 | // modify open pull request to show we have selected cs | |
164 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; |
|
164 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; | |
165 |
|
165 | |||
166 | }else{ |
|
166 | }else{ | |
167 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; |
|
167 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; | |
168 | } |
|
168 | } | |
169 | } |
|
169 | } | |
170 |
|
170 | |||
171 | if(checked_checkboxes.length>0){ |
|
171 | if(checked_checkboxes.length>0){ | |
172 | var rev_end = checked_checkboxes[0].name; |
|
172 | var rev_end = checked_checkboxes[0].name; | |
173 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
|
173 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; | |
174 |
|
174 | |||
175 | // now select all checkboxes in the middle. |
|
175 | // now select all checkboxes in the middle. | |
176 | var checked = false; |
|
176 | var checked = false; | |
177 | for (var i=0; i<checkboxes.length; i++){ |
|
177 | for (var i=0; i<checkboxes.length; i++){ | |
178 | var cb = checkboxes[i]; |
|
178 | var cb = checkboxes[i]; | |
179 | var rev = cb.name; |
|
179 | var rev = cb.name; | |
180 |
|
180 | |||
181 | if (rev == rev_end){ |
|
181 | if (rev == rev_end){ | |
182 | checked = true; |
|
182 | checked = true; | |
183 | } |
|
183 | } | |
184 | if (checked){ |
|
184 | if (checked){ | |
185 | cb.checked = true; |
|
185 | cb.checked = true; | |
186 | } |
|
186 | } | |
187 | else{ |
|
187 | else{ | |
188 | cb.checked = false; |
|
188 | cb.checked = false; | |
189 | } |
|
189 | } | |
190 | if (rev == rev_start){ |
|
190 | if (rev == rev_start){ | |
191 | checked = false; |
|
191 | checked = false; | |
192 | } |
|
192 | } | |
193 |
|
193 | |||
194 | } |
|
194 | } | |
195 |
|
195 | |||
196 | var url = url_tmpl.replace('__REVRANGE__', |
|
196 | var url = url_tmpl.replace('__REVRANGE__', | |
197 | rev_start+'...'+rev_end); |
|
197 | rev_start+'...'+rev_end); | |
198 |
|
198 | |||
199 | var link = _TM['Show selected changes __S -> __E']; |
|
199 | var link = _TM['Show selected changes __S -> __E']; | |
200 | link = link.replace('__S',rev_start.substr(0,6)); |
|
200 | link = link.replace('__S',rev_start.substr(0,6)); | |
201 | link = link.replace('__E',rev_end.substr(0,6)); |
|
201 | link = link.replace('__E',rev_end.substr(0,6)); | |
202 | YUD.get('rev_range_container').href = url; |
|
202 | YUD.get('rev_range_container').href = url; | |
203 | YUD.get('rev_range_container').innerHTML = link; |
|
203 | YUD.get('rev_range_container').innerHTML = link; | |
204 | YUD.setStyle('rev_range_container','display',''); |
|
204 | YUD.setStyle('rev_range_container','display',''); | |
205 | YUD.setStyle('rev_range_clear','display',''); |
|
205 | YUD.setStyle('rev_range_clear','display',''); | |
206 |
|
206 | |||
207 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); |
|
207 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); | |
208 |
|
208 | |||
209 | } |
|
209 | } | |
210 | else{ |
|
210 | else{ | |
211 | YUD.setStyle('rev_range_container','display','none'); |
|
211 | YUD.setStyle('rev_range_container','display','none'); | |
212 | YUD.setStyle('rev_range_clear','display','none'); |
|
212 | YUD.setStyle('rev_range_clear','display','none'); | |
213 | } |
|
213 | } | |
214 | }); |
|
214 | }); | |
215 | YUE.on('rev_range_clear','click',function(e){ |
|
215 | YUE.on('rev_range_clear','click',function(e){ | |
216 | for (var i=0; i<checkboxes.length; i++){ |
|
216 | for (var i=0; i<checkboxes.length; i++){ | |
217 | var cb = checkboxes[i]; |
|
217 | var cb = checkboxes[i]; | |
218 | cb.checked = false; |
|
218 | cb.checked = false; | |
219 | } |
|
219 | } | |
220 | YUE.preventDefault(e); |
|
220 | YUE.preventDefault(e); | |
221 | }) |
|
221 | }) | |
222 | var msgs = YUQ('.message'); |
|
222 | var msgs = YUQ('.message'); | |
223 | // get first element height |
|
223 | // get first element height | |
224 | var el = YUQ('#graph_content .container')[0]; |
|
224 | var el = YUQ('#graph_content .container')[0]; | |
225 | var row_h = el.clientHeight; |
|
225 | var row_h = el.clientHeight; | |
226 | for(var i=0;i<msgs.length;i++){ |
|
226 | for(var i=0;i<msgs.length;i++){ | |
227 | var m = msgs[i]; |
|
227 | var m = msgs[i]; | |
228 |
|
228 | |||
229 | var h = m.clientHeight; |
|
229 | var h = m.clientHeight; | |
230 | var pad = YUD.getStyle(m,'padding'); |
|
230 | var pad = YUD.getStyle(m,'padding'); | |
231 | if(h > row_h){ |
|
231 | if(h > row_h){ | |
232 | var offset = row_h - (h+12); |
|
232 | var offset = row_h - (h+12); | |
233 | YUD.setStyle(m.nextElementSibling,'display','block'); |
|
233 | YUD.setStyle(m.nextElementSibling,'display','block'); | |
234 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
|
234 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); | |
235 | }; |
|
235 | }; | |
236 | } |
|
236 | } | |
237 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
237 | YUE.on(YUQ('.expand'),'click',function(e){ | |
238 | var elem = e.currentTarget.parentNode.parentNode; |
|
238 | var elem = e.currentTarget.parentNode.parentNode; | |
239 | YUD.setStyle(e.currentTarget,'display','none'); |
|
239 | YUD.setStyle(e.currentTarget,'display','none'); | |
240 | YUD.setStyle(elem,'height','auto'); |
|
240 | YUD.setStyle(elem,'height','auto'); | |
241 |
|
241 | |||
242 | //redraw the graph, line_count and jsdata are global vars |
|
242 | //redraw the graph, line_count and jsdata are global vars | |
243 | set_canvas(100); |
|
243 | set_canvas(100); | |
244 |
|
244 | |||
245 | var r = new BranchRenderer(); |
|
245 | var r = new BranchRenderer(); | |
246 | r.render(jsdata,100,line_count); |
|
246 | r.render(jsdata,100,line_count); | |
247 |
|
247 | |||
248 | }) |
|
248 | }) | |
249 |
|
249 | |||
250 | // Fetch changeset details |
|
250 | // Fetch changeset details | |
251 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ |
|
251 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ | |
252 | var id = e.currentTarget.id; |
|
252 | var id = e.currentTarget.id; | |
253 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; |
|
253 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; | |
254 | var url = url.replace('__CS__',id.replace('changed_total_','')); |
|
254 | var url = url.replace('__CS__',id.replace('changed_total_','')); | |
255 | ypjax(url,id,function(){tooltip_activate()}); |
|
255 | ypjax(url,id,function(){tooltip_activate()}); | |
256 | }); |
|
256 | }); | |
257 |
|
257 | |||
258 | // change branch filter |
|
258 | // change branch filter | |
259 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
259 | YUE.on(YUD.get('branch_filter'),'change',function(e){ | |
260 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
|
260 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; | |
261 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
|
261 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; | |
262 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
|
262 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; | |
263 | var url = url.replace('__BRANCH__',selected_branch); |
|
263 | var url = url.replace('__BRANCH__',selected_branch); | |
264 | if(selected_branch != ''){ |
|
264 | if(selected_branch != ''){ | |
265 | window.location = url; |
|
265 | window.location = url; | |
266 | }else{ |
|
266 | }else{ | |
267 | window.location = url_main; |
|
267 | window.location = url_main; | |
268 | } |
|
268 | } | |
269 |
|
269 | |||
270 | }); |
|
270 | }); | |
271 |
|
271 | |||
272 | function set_canvas(width) { |
|
272 | function set_canvas(width) { | |
273 | var c = document.getElementById('graph_nodes'); |
|
273 | var c = document.getElementById('graph_nodes'); | |
274 | var t = document.getElementById('graph_content'); |
|
274 | var t = document.getElementById('graph_content'); | |
275 | canvas = document.getElementById('graph_canvas'); |
|
275 | canvas = document.getElementById('graph_canvas'); | |
276 | var div_h = t.clientHeight; |
|
276 | var div_h = t.clientHeight; | |
277 | c.style.height=div_h+'px'; |
|
277 | c.style.height=div_h+'px'; | |
278 | canvas.setAttribute('height',div_h); |
|
278 | canvas.setAttribute('height',div_h); | |
279 | c.style.height=width+'px'; |
|
279 | c.style.height=width+'px'; | |
280 | canvas.setAttribute('width',width); |
|
280 | canvas.setAttribute('width',width); | |
281 | }; |
|
281 | }; | |
282 | var heads = 1; |
|
282 | var heads = 1; | |
283 | var line_count = 0; |
|
283 | var line_count = 0; | |
284 | var jsdata = ${c.jsdata|n}; |
|
284 | var jsdata = ${c.jsdata|n}; | |
285 |
|
285 | |||
286 | for (var i=0;i<jsdata.length;i++) { |
|
286 | for (var i=0;i<jsdata.length;i++) { | |
287 | var in_l = jsdata[i][2]; |
|
287 | var in_l = jsdata[i][2]; | |
288 | for (var j in in_l) { |
|
288 | for (var j in in_l) { | |
289 | var m = in_l[j][1]; |
|
289 | var m = in_l[j][1]; | |
290 | if (m > line_count) |
|
290 | if (m > line_count) | |
291 | line_count = m; |
|
291 | line_count = m; | |
292 | } |
|
292 | } | |
293 | } |
|
293 | } | |
294 | set_canvas(100); |
|
294 | set_canvas(100); | |
295 |
|
295 | |||
296 | var r = new BranchRenderer(); |
|
296 | var r = new BranchRenderer(); | |
297 | r.render(jsdata,100,line_count); |
|
297 | r.render(jsdata,100,line_count); | |
298 |
|
298 | |||
299 | }); |
|
299 | }); | |
300 | </script> |
|
300 | </script> | |
301 | %else: |
|
301 | %else: | |
302 | ${_('There are no changes yet')} |
|
302 | ${_('There are no changes yet')} | |
303 | %endif |
|
303 | %endif | |
304 | </div> |
|
304 | </div> | |
305 | </div> |
|
305 | </div> | |
306 | </%def> |
|
306 | </%def> |
@@ -1,202 +1,202 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%inherit file="/base/base.html"/> |
|
3 | <%inherit file="/base/base.html"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('%s Changeset') % c.repo_name} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name} |
|
6 | ${_('%s Changeset') % c.repo_name} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name} | |
7 | </%def> |
|
7 | </%def> | |
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | ${h.link_to(_(u'Home'),h.url('/'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
13 | » |
|
13 | » | |
14 |
${_(' |
|
14 | ${_('changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="page_nav()"> |
|
17 | <%def name="page_nav()"> | |
18 | ${self.menu('changelog')} |
|
18 | ${self.menu('changelog')} | |
19 | </%def> |
|
19 | </%def> | |
20 |
|
20 | |||
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <div class="box"> |
|
22 | <div class="box"> | |
23 | <!-- box / title --> |
|
23 | <!-- box / title --> | |
24 | <div class="title"> |
|
24 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
25 | ${self.breadcrumbs()} | |
26 | </div> |
|
26 | </div> | |
27 | <script> |
|
27 | <script> | |
28 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
28 | var _USERS_AC_DATA = ${c.users_array|n}; | |
29 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
29 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
30 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; |
|
30 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; | |
31 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
31 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
32 | </script> |
|
32 | </script> | |
33 | <div class="table"> |
|
33 | <div class="table"> | |
34 | <div class="diffblock"> |
|
34 | <div class="diffblock"> | |
35 | <div class="parents"> |
|
35 | <div class="parents"> | |
36 | %if c.changeset.parents: |
|
36 | %if c.changeset.parents: | |
37 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): |
|
37 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): | |
38 | <span class="changeset_hash">« ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span> |
|
38 | <span class="changeset_hash">« ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span> | |
39 | <br> |
|
39 | <br> | |
40 | %endfor |
|
40 | %endfor | |
41 | %else: |
|
41 | %else: | |
42 | <span>${_('No parents')}</span> |
|
42 | <span>${_('No parents')}</span> | |
43 | %endif |
|
43 | %endif | |
44 | </div> |
|
44 | </div> | |
45 | <div class="children"> |
|
45 | <div class="children"> | |
46 | %if c.changeset.children: |
|
46 | %if c.changeset.children: | |
47 | %for n, p_cs in enumerate(reversed(c.changeset.children)): |
|
47 | %for n, p_cs in enumerate(reversed(c.changeset.children)): | |
48 | <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} »</span> |
|
48 | <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} »</span> | |
49 | <br> |
|
49 | <br> | |
50 | %endfor |
|
50 | %endfor | |
51 | %else: |
|
51 | %else: | |
52 | <span>${_('No children')}</span> |
|
52 | <span>${_('No children')}</span> | |
53 | %endif |
|
53 | %endif | |
54 | </div> |
|
54 | </div> | |
55 | <div class="code-header banner"> |
|
55 | <div class="code-header banner"> | |
56 |
|
56 | |||
57 | <div class="hash"> |
|
57 | <div class="hash"> | |
58 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
58 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} | |
59 | </div> |
|
59 | </div> | |
60 | <div class="date"> |
|
60 | <div class="date"> | |
61 | ${h.fmt_date(c.changeset.date)} |
|
61 | ${h.fmt_date(c.changeset.date)} | |
62 | </div> |
|
62 | </div> | |
63 | <div class="changeset-status-container"> |
|
63 | <div class="changeset-status-container"> | |
64 | %if c.statuses: |
|
64 | %if c.statuses: | |
65 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> |
|
65 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> | |
66 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> |
|
66 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> | |
67 | %endif |
|
67 | %endif | |
68 | </div> |
|
68 | </div> | |
69 | <div class="diff-actions"> |
|
69 | <div class="diff-actions"> | |
70 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> |
|
70 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> | |
71 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a> |
|
71 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a> | |
72 | <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a> |
|
72 | <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a> | |
73 | ${c.ignorews_url(request.GET)} |
|
73 | ${c.ignorews_url(request.GET)} | |
74 | ${c.context_url(request.GET)} |
|
74 | ${c.context_url(request.GET)} | |
75 | </div> |
|
75 | </div> | |
76 | <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div> |
|
76 | <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div> | |
77 | </div> |
|
77 | </div> | |
78 | </div> |
|
78 | </div> | |
79 | <div id="changeset_content"> |
|
79 | <div id="changeset_content"> | |
80 | <div class="container"> |
|
80 | <div class="container"> | |
81 | <div class="left"> |
|
81 | <div class="left"> | |
82 | <div class="author"> |
|
82 | <div class="author"> | |
83 | <div class="gravatar"> |
|
83 | <div class="gravatar"> | |
84 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> |
|
84 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> | |
85 | </div> |
|
85 | </div> | |
86 | <span>${h.person(c.changeset.author)}</span><br/> |
|
86 | <span>${h.person(c.changeset.author)}</span><br/> | |
87 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> |
|
87 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> | |
88 | </div> |
|
88 | </div> | |
89 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> |
|
89 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> | |
90 | </div> |
|
90 | </div> | |
91 | <div class="right"> |
|
91 | <div class="right"> | |
92 | <div class="changes"> |
|
92 | <div class="changes"> | |
93 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: |
|
93 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: | |
94 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> |
|
94 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> | |
95 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> |
|
95 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> | |
96 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> |
|
96 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> | |
97 | % else: |
|
97 | % else: | |
98 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
98 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
99 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
99 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
100 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
100 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
101 | % endif |
|
101 | % endif | |
102 | </div> |
|
102 | </div> | |
103 |
|
103 | |||
104 | <span class="logtags"> |
|
104 | <span class="logtags"> | |
105 | %if len(c.changeset.parents)>1: |
|
105 | %if len(c.changeset.parents)>1: | |
106 | <span class="merge">${_('merge')}</span> |
|
106 | <span class="merge">${_('merge')}</span> | |
107 | %endif |
|
107 | %endif | |
108 | %if c.changeset.branch: |
|
108 | %if c.changeset.branch: | |
109 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> |
|
109 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> | |
110 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} |
|
110 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} | |
111 | </span> |
|
111 | </span> | |
112 | %endif |
|
112 | %endif | |
113 | %for tag in c.changeset.tags: |
|
113 | %for tag in c.changeset.tags: | |
114 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
114 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
115 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> |
|
115 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> | |
116 | %endfor |
|
116 | %endfor | |
117 | </span> |
|
117 | </span> | |
118 | </div> |
|
118 | </div> | |
119 | </div> |
|
119 | </div> | |
120 | <span> |
|
120 | <span> | |
121 | % if c.limited_diff: |
|
121 | % if c.limited_diff: | |
122 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: |
|
122 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: | |
123 | % else: |
|
123 | % else: | |
124 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}: |
|
124 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}: | |
125 | %endif |
|
125 | %endif | |
126 | </span> |
|
126 | </span> | |
127 | <div class="cs_files"> |
|
127 | <div class="cs_files"> | |
128 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): |
|
128 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): | |
129 | <div class="cs_${change}"> |
|
129 | <div class="cs_${change}"> | |
130 | <div class="node"> |
|
130 | <div class="node"> | |
131 | <a href="#${FID}">${h.safe_unicode(path)}</a> |
|
131 | <a href="#${FID}">${h.safe_unicode(path)}</a> | |
132 | </div> |
|
132 | </div> | |
133 | <div class="changes">${h.fancy_file_stats(stats)}</div> |
|
133 | <div class="changes">${h.fancy_file_stats(stats)}</div> | |
134 | </div> |
|
134 | </div> | |
135 | %endfor |
|
135 | %endfor | |
136 | % if c.limited_diff: |
|
136 | % if c.limited_diff: | |
137 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> |
|
137 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> | |
138 | % endif |
|
138 | % endif | |
139 | </div> |
|
139 | </div> | |
140 | </div> |
|
140 | </div> | |
141 |
|
141 | |||
142 | </div> |
|
142 | </div> | |
143 |
|
143 | |||
144 | ## diff block |
|
144 | ## diff block | |
145 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
145 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
146 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} |
|
146 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} | |
147 |
|
147 | |||
148 | % if c.limited_diff: |
|
148 | % if c.limited_diff: | |
149 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> |
|
149 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> | |
150 | % endif |
|
150 | % endif | |
151 |
|
151 | |||
152 | ## template for inline comment form |
|
152 | ## template for inline comment form | |
153 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
153 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
154 | ${comment.comment_inline_form()} |
|
154 | ${comment.comment_inline_form()} | |
155 |
|
155 | |||
156 | ## render comments and inlines |
|
156 | ## render comments and inlines | |
157 | ${comment.generate_comments()} |
|
157 | ${comment.generate_comments()} | |
158 |
|
158 | |||
159 | ## main comment form and it status |
|
159 | ## main comment form and it status | |
160 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), |
|
160 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), | |
161 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} |
|
161 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} | |
162 |
|
162 | |||
163 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
163 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS | |
164 | <script type="text/javascript"> |
|
164 | <script type="text/javascript"> | |
165 | YUE.onDOMReady(function(){ |
|
165 | YUE.onDOMReady(function(){ | |
166 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
166 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ | |
167 | var show = 'none'; |
|
167 | var show = 'none'; | |
168 | var target = e.currentTarget; |
|
168 | var target = e.currentTarget; | |
169 | if(target == null){ |
|
169 | if(target == null){ | |
170 | target = this; |
|
170 | target = this; | |
171 | } |
|
171 | } | |
172 | if(target.checked){ |
|
172 | if(target.checked){ | |
173 | var show = '' |
|
173 | var show = '' | |
174 | } |
|
174 | } | |
175 | var boxid = YUD.getAttribute(target,'id_for'); |
|
175 | var boxid = YUD.getAttribute(target,'id_for'); | |
176 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
176 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); | |
177 | for(c in comments){ |
|
177 | for(c in comments){ | |
178 | YUD.setStyle(comments[c],'display',show); |
|
178 | YUD.setStyle(comments[c],'display',show); | |
179 | } |
|
179 | } | |
180 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
180 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); | |
181 | for(c in btns){ |
|
181 | for(c in btns){ | |
182 | YUD.setStyle(btns[c],'display',show); |
|
182 | YUD.setStyle(btns[c],'display',show); | |
183 | } |
|
183 | } | |
184 | }) |
|
184 | }) | |
185 |
|
185 | |||
186 | YUE.on(YUQ('.line'),'click',function(e){ |
|
186 | YUE.on(YUQ('.line'),'click',function(e){ | |
187 | var tr = e.currentTarget; |
|
187 | var tr = e.currentTarget; | |
188 | if(tr == null){ |
|
188 | if(tr == null){ | |
189 | tr = this; |
|
189 | tr = this; | |
190 | } |
|
190 | } | |
191 | injectInlineForm(tr); |
|
191 | injectInlineForm(tr); | |
192 | }); |
|
192 | }); | |
193 |
|
193 | |||
194 | // inject comments into they proper positions |
|
194 | // inject comments into they proper positions | |
195 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
195 | var file_comments = YUQ('.inline-comment-placeholder'); | |
196 | renderInlineComments(file_comments); |
|
196 | renderInlineComments(file_comments); | |
197 | }) |
|
197 | }) | |
198 |
|
198 | |||
199 | </script> |
|
199 | </script> | |
200 |
|
200 | |||
201 | </div> |
|
201 | </div> | |
202 | </%def> |
|
202 | </%def> |
@@ -1,93 +1,93 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${c.repo_name} ${_('Compare')} ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} |
|
5 | ${c.repo_name} ${_('Compare')} ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
12 | » |
|
12 | » | |
13 |
${_(' |
|
13 | ${_('compare')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('changelog')} |
|
17 | ${self.menu('changelog')} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="main()"> |
|
20 | <%def name="main()"> | |
21 | <div class="box"> |
|
21 | <div class="box"> | |
22 | <!-- box / title --> |
|
22 | <!-- box / title --> | |
23 | <div class="title"> |
|
23 | <div class="title"> | |
24 | ${self.breadcrumbs()} |
|
24 | ${self.breadcrumbs()} | |
25 | </div> |
|
25 | </div> | |
26 | <div class="table"> |
|
26 | <div class="table"> | |
27 | <div id="body" class="diffblock"> |
|
27 | <div id="body" class="diffblock"> | |
28 | <div class="code-header cv"> |
|
28 | <div class="code-header cv"> | |
29 | <h3 class="code-header-title">${_('Compare View')}</h3> |
|
29 | <h3 class="code-header-title">${_('Compare View')}</h3> | |
30 | <div> |
|
30 | <div> | |
31 | ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a> |
|
31 | ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a> | |
32 | </div> |
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | <div id="changeset_compare_view_content"> |
|
35 | <div id="changeset_compare_view_content"> | |
36 | ##CS |
|
36 | ##CS | |
37 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div> |
|
37 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div> | |
38 | <%include file="compare_cs.html" /> |
|
38 | <%include file="compare_cs.html" /> | |
39 |
|
39 | |||
40 | ## FILES |
|
40 | ## FILES | |
41 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
41 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> | |
42 |
|
42 | |||
43 | % if c.limited_diff: |
|
43 | % if c.limited_diff: | |
44 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
44 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} | |
45 | % else: |
|
45 | % else: | |
46 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}: |
|
46 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}: | |
47 | %endif |
|
47 | %endif | |
48 |
|
48 | |||
49 | </div> |
|
49 | </div> | |
50 | <div class="cs_files"> |
|
50 | <div class="cs_files"> | |
51 | %if not c.files: |
|
51 | %if not c.files: | |
52 | <span class="empty_data">${_('No files')}</span> |
|
52 | <span class="empty_data">${_('No files')}</span> | |
53 | %endif |
|
53 | %endif | |
54 | %for fid, change, f, stat in c.files: |
|
54 | %for fid, change, f, stat in c.files: | |
55 | <div class="cs_${change}"> |
|
55 | <div class="cs_${change}"> | |
56 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div> |
|
56 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div> | |
57 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
57 | <div class="changes">${h.fancy_file_stats(stat)}</div> | |
58 | </div> |
|
58 | </div> | |
59 | %endfor |
|
59 | %endfor | |
60 | </div> |
|
60 | </div> | |
61 | % if c.limited_diff: |
|
61 | % if c.limited_diff: | |
62 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> |
|
62 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> | |
63 | % endif |
|
63 | % endif | |
64 | </div> |
|
64 | </div> | |
65 | </div> |
|
65 | </div> | |
66 |
|
66 | |||
67 | ## diff block |
|
67 | ## diff block | |
68 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
68 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
69 | %for fid, change, f, stat in c.files: |
|
69 | %for fid, change, f, stat in c.files: | |
70 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
70 | ${diff_block.diff_block_simple([c.changes[fid]])} | |
71 | %endfor |
|
71 | %endfor | |
72 | % if c.limited_diff: |
|
72 | % if c.limited_diff: | |
73 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> |
|
73 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> | |
74 | % endif |
|
74 | % endif | |
75 | <script type="text/javascript"> |
|
75 | <script type="text/javascript"> | |
76 |
|
76 | |||
77 | YUE.onDOMReady(function(){ |
|
77 | YUE.onDOMReady(function(){ | |
78 |
|
78 | |||
79 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
79 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ | |
80 | var act = e.currentTarget.nextElementSibling; |
|
80 | var act = e.currentTarget.nextElementSibling; | |
81 |
|
81 | |||
82 | if(YUD.hasClass(act,'active')){ |
|
82 | if(YUD.hasClass(act,'active')){ | |
83 | YUD.removeClass(act,'active'); |
|
83 | YUD.removeClass(act,'active'); | |
84 | YUD.setStyle(act,'display','none'); |
|
84 | YUD.setStyle(act,'display','none'); | |
85 | }else{ |
|
85 | }else{ | |
86 | YUD.addClass(act,'active'); |
|
86 | YUD.addClass(act,'active'); | |
87 | YUD.setStyle(act,'display',''); |
|
87 | YUD.setStyle(act,'display',''); | |
88 | } |
|
88 | } | |
89 | }); |
|
89 | }); | |
90 | }) |
|
90 | }) | |
91 | </script> |
|
91 | </script> | |
92 | </div> |
|
92 | </div> | |
93 | </%def> |
|
93 | </%def> |
@@ -1,161 +1,161 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('%s files') % c.repo_name} - ${c.rhodecode_name} |
|
4 | ${_('%s files') % c.repo_name} - ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))} |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
11 | » |
|
11 | » | |
12 | ${_('files')} |
|
12 | ${_('files')} | |
13 | %if c.file: |
|
13 | %if c.file: | |
14 | @ r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
14 | @ r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} | |
15 | %endif |
|
15 | %endif | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 | ${self.menu('files')} |
|
19 | ${self.menu('files')} | |
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 | <ul class="links"> |
|
27 | <ul class="links"> | |
28 | <li> |
|
28 | <li> | |
29 | <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span> |
|
29 | <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span> | |
30 | </li> |
|
30 | </li> | |
31 | </ul> |
|
31 | </ul> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="table"> |
|
33 | <div class="table"> | |
34 | <div id="files_data"> |
|
34 | <div id="files_data"> | |
35 | <%include file='files_ypjax.html'/> |
|
35 | <%include file='files_ypjax.html'/> | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 |
|
39 | |||
40 | <script type="text/javascript"> |
|
40 | <script type="text/javascript"> | |
41 | var CACHE = {}; |
|
41 | var CACHE = {}; | |
42 | var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s |
|
42 | var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s | |
43 | //used to construct links from the search list |
|
43 | //used to construct links from the search list | |
44 | var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
44 | var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; | |
45 | //send the nodelist request to this url |
|
45 | //send the nodelist request to this url | |
46 | var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
46 | var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; | |
47 | // send the node history requst to this url |
|
47 | // send the node history requst to this url | |
48 | var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
48 | var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; | |
49 |
|
49 | |||
50 | var ypjax_links = function(){ |
|
50 | var ypjax_links = function(){ | |
51 | YUE.on(YUQ('.ypjax-link'), 'click',function(e){ |
|
51 | YUE.on(YUQ('.ypjax-link'), 'click',function(e){ | |
52 |
|
52 | |||
53 | //don't do ypjax on middle click |
|
53 | //don't do ypjax on middle click | |
54 | if(e.which == 2 || !History.enabled){ |
|
54 | if(e.which == 2 || !History.enabled){ | |
55 | return true; |
|
55 | return true; | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 | var el = e.currentTarget; |
|
58 | var el = e.currentTarget; | |
59 | var url = el.href; |
|
59 | var url = el.href; | |
60 |
|
60 | |||
61 | var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}'; |
|
61 | var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}'; | |
62 | _base_url = _base_url.replace('//','/') |
|
62 | _base_url = _base_url.replace('//','/') | |
63 |
|
63 | |||
64 | //extract rev and the f_path from url. |
|
64 | //extract rev and the f_path from url. | |
65 | parts = url.split(_base_url) |
|
65 | parts = url.split(_base_url) | |
66 | if(parts.length != 2){ |
|
66 | if(parts.length != 2){ | |
67 | return false; |
|
67 | return false; | |
68 | } |
|
68 | } | |
69 |
|
69 | |||
70 | var parts2 = parts[1].split('/'); |
|
70 | var parts2 = parts[1].split('/'); | |
71 | var rev = parts2.shift(); // pop the first element which is the revision |
|
71 | var rev = parts2.shift(); // pop the first element which is the revision | |
72 | var f_path = parts2.join('/'); |
|
72 | var f_path = parts2.join('/'); | |
73 |
|
73 | |||
74 | var title = "${_('%s files') % c.repo_name}" + " - " + f_path; |
|
74 | var title = "${_('%s files') % c.repo_name}" + " - " + f_path; | |
75 |
|
75 | |||
76 | var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path); |
|
76 | var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path); | |
77 | var _url_base = url_base.replace('__REV__',rev); |
|
77 | var _url_base = url_base.replace('__REV__',rev); | |
78 |
|
78 | |||
79 | // Change our States and save some data for handling events |
|
79 | // Change our States and save some data for handling events | |
80 | var data = {url:url,title:title, url_base:_url_base, |
|
80 | var data = {url:url,title:title, url_base:_url_base, | |
81 | node_list_url:_node_list_url, rev:rev, f_path:f_path}; |
|
81 | node_list_url:_node_list_url, rev:rev, f_path:f_path}; | |
82 | History.pushState(data, title, url); |
|
82 | History.pushState(data, title, url); | |
83 |
|
83 | |||
84 | //now we're sure that we can do ypjax things |
|
84 | //now we're sure that we can do ypjax things | |
85 | YUE.preventDefault(e); |
|
85 | YUE.preventDefault(e); | |
86 | return false; |
|
86 | return false; | |
87 | }); |
|
87 | }); | |
88 | } |
|
88 | } | |
89 |
|
89 | |||
90 | var callbacks = function(State){ |
|
90 | var callbacks = function(State){ | |
91 | ypjax_links(); |
|
91 | ypjax_links(); | |
92 | tooltip_activate(); |
|
92 | tooltip_activate(); | |
93 | fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); |
|
93 | fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); | |
94 |
|
94 | |||
95 | if(YUD.get('hlcode')){ |
|
95 | if(YUD.get('hlcode')){ | |
96 | YUE.on('hlcode', 'mouseup', getSelectionLink); |
|
96 | YUE.on('hlcode', 'mouseup', getSelectionLink); | |
97 | } |
|
97 | } | |
98 | //console.log(State); |
|
98 | //console.log(State); | |
99 | if(YUD.get('load_node_history')){ |
|
99 | if(YUD.get('load_node_history')){ | |
100 | //remove all listeners due to problems of history state |
|
100 | //remove all listeners due to problems of history state | |
101 | YUE.removeListener('load_node_history', 'click'); |
|
101 | YUE.removeListener('load_node_history', 'click'); | |
102 | YUE.on('load_node_history', 'click', function(e){ |
|
102 | YUE.on('load_node_history', 'click', function(e){ | |
103 | var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path); |
|
103 | var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path); | |
104 | ypjax(_url, 'node_history', function(o){ |
|
104 | ypjax(_url, 'node_history', function(o){ | |
105 | tooltip_activate(); |
|
105 | tooltip_activate(); | |
106 | }) |
|
106 | }) | |
107 | }); |
|
107 | }); | |
108 | } |
|
108 | } | |
109 | // Inform Google Analytics of the change |
|
109 | // Inform Google Analytics of the change | |
110 | if ( typeof window.pageTracker !== 'undefined' ) { |
|
110 | if ( typeof window.pageTracker !== 'undefined' ) { | |
111 | window.pageTracker._trackPageview(State.url); |
|
111 | window.pageTracker._trackPageview(State.url); | |
112 | } |
|
112 | } | |
113 | } |
|
113 | } | |
114 |
|
114 | |||
115 | YUE.onDOMReady(function(){ |
|
115 | YUE.onDOMReady(function(){ | |
116 | ypjax_links(); |
|
116 | ypjax_links(); | |
117 | var container = 'files_data'; |
|
117 | var container = 'files_data'; | |
118 | //Bind to StateChange Event |
|
118 | //Bind to StateChange Event | |
119 | History.Adapter.bind(window,'statechange',function(){ |
|
119 | History.Adapter.bind(window,'statechange',function(){ | |
120 | var State = History.getState(); |
|
120 | var State = History.getState(); | |
121 | cache_key = State.url; |
|
121 | cache_key = State.url; | |
122 | //check if we have this request in cache maybe ? |
|
122 | //check if we have this request in cache maybe ? | |
123 | var _cache_obj = CACHE[cache_key]; |
|
123 | var _cache_obj = CACHE[cache_key]; | |
124 | var _cur_time = new Date().getTime(); |
|
124 | var _cur_time = new Date().getTime(); | |
125 | // get from cache if it's there and not yet expired ! |
|
125 | // get from cache if it's there and not yet expired ! | |
126 | if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){ |
|
126 | if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){ | |
127 | YUD.get(container).innerHTML=_cache_obj[1]; |
|
127 | YUD.get(container).innerHTML=_cache_obj[1]; | |
128 | YUD.setStyle(container,'opacity','1.0'); |
|
128 | YUD.setStyle(container,'opacity','1.0'); | |
129 |
|
129 | |||
130 | //callbacks after ypjax call |
|
130 | //callbacks after ypjax call | |
131 | callbacks(State); |
|
131 | callbacks(State); | |
132 | } |
|
132 | } | |
133 | else{ |
|
133 | else{ | |
134 | ypjax(State.url,container,function(o){ |
|
134 | ypjax(State.url,container,function(o){ | |
135 | //callbacks after ypjax call |
|
135 | //callbacks after ypjax call | |
136 | callbacks(State); |
|
136 | callbacks(State); | |
137 | if (o !== undefined){ |
|
137 | if (o !== undefined){ | |
138 | //store our request in cache |
|
138 | //store our request in cache | |
139 | var _expire_on = new Date().getTime()+CACHE_EXPIRE; |
|
139 | var _expire_on = new Date().getTime()+CACHE_EXPIRE; | |
140 | CACHE[cache_key] = [_expire_on, o.responseText]; |
|
140 | CACHE[cache_key] = [_expire_on, o.responseText]; | |
141 | } |
|
141 | } | |
142 | }); |
|
142 | }); | |
143 | } |
|
143 | } | |
144 | }); |
|
144 | }); | |
145 |
|
145 | |||
146 | // init the search filter |
|
146 | // init the search filter | |
147 | var _State = { |
|
147 | var _State = { | |
148 | url: "${h.url.current()}", |
|
148 | url: "${h.url.current()}", | |
149 | data: { |
|
149 | data: { | |
150 | node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"), |
|
150 | node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"), | |
151 | url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"), |
|
151 | url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"), | |
152 | rev:"${c.changeset.raw_id}", |
|
152 | rev:"${c.changeset.raw_id}", | |
153 | f_path: "${h.safe_unicode(c.file.path)}" |
|
153 | f_path: "${h.safe_unicode(c.file.path)}" | |
154 | } |
|
154 | } | |
155 | } |
|
155 | } | |
156 | fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); |
|
156 | fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); | |
157 | }); |
|
157 | }); | |
158 |
|
158 | |||
159 | </script> |
|
159 | </script> | |
160 |
|
160 | |||
161 | </%def> |
|
161 | </%def> |
@@ -1,32 +1,32 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Followers') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Followers') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
12 | » |
|
12 | » | |
13 | ${_('followers')} |
|
13 | ${_('followers')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('followers')} |
|
17 | ${self.menu('followers')} | |
18 | </%def> |
|
18 | </%def> | |
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 | </div> |
|
24 | </div> | |
25 | <!-- end box / title --> |
|
25 | <!-- end box / title --> | |
26 | <div class="table"> |
|
26 | <div class="table"> | |
27 | <div id="followers"> |
|
27 | <div id="followers"> | |
28 | ${c.followers_data} |
|
28 | ${c.followers_data} | |
29 | </div> |
|
29 | </div> | |
30 | </div> |
|
30 | </div> | |
31 | </div> |
|
31 | </div> | |
32 | </%def> |
|
32 | </%def> |
@@ -1,100 +1,100 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Fork') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Fork') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
12 | » |
|
12 | » | |
13 | ${_('fork')} |
|
13 | ${_('fork')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('')} |
|
17 | ${self.menu('')} | |
18 | </%def> |
|
18 | </%def> | |
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 | </div> |
|
24 | </div> | |
25 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} |
|
25 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} | |
26 | <div class="form"> |
|
26 | <div class="form"> | |
27 | <!-- fields --> |
|
27 | <!-- fields --> | |
28 | <div class="fields"> |
|
28 | <div class="fields"> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="label"> |
|
30 | <div class="label"> | |
31 | <label for="repo_name">${_('Fork name')}:</label> |
|
31 | <label for="repo_name">${_('Fork name')}:</label> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="input"> |
|
33 | <div class="input"> | |
34 | ${h.text('repo_name',class_="small")} |
|
34 | ${h.text('repo_name',class_="small")} | |
35 | ${h.hidden('repo_type',c.repo_info.repo_type)} |
|
35 | ${h.hidden('repo_type',c.repo_info.repo_type)} | |
36 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} |
|
36 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 | <div class="field"> |
|
39 | <div class="field"> | |
40 | <div class="label"> |
|
40 | <div class="label"> | |
41 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
41 | <label for="landing_rev">${_('Landing revision')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 | <div class="input"> |
|
43 | <div class="input"> | |
44 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} |
|
44 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} | |
45 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
45 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
46 | </div> |
|
46 | </div> | |
47 | </div> |
|
47 | </div> | |
48 | <div class="field"> |
|
48 | <div class="field"> | |
49 | <div class="label"> |
|
49 | <div class="label"> | |
50 | <label for="repo_group">${_('Repository group')}:</label> |
|
50 | <label for="repo_group">${_('Repository group')}:</label> | |
51 | </div> |
|
51 | </div> | |
52 | <div class="input"> |
|
52 | <div class="input"> | |
53 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
53 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
54 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> |
|
54 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> | |
55 | </div> |
|
55 | </div> | |
56 | </div> |
|
56 | </div> | |
57 | <div class="field"> |
|
57 | <div class="field"> | |
58 | <div class="label label-textarea"> |
|
58 | <div class="label label-textarea"> | |
59 | <label for="description">${_('Description')}:</label> |
|
59 | <label for="description">${_('Description')}:</label> | |
60 | </div> |
|
60 | </div> | |
61 | <div class="textarea text-area editor"> |
|
61 | <div class="textarea text-area editor"> | |
62 | ${h.textarea('description',cols=23,rows=5)} |
|
62 | ${h.textarea('description',cols=23,rows=5)} | |
63 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
63 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
64 | </div> |
|
64 | </div> | |
65 | </div> |
|
65 | </div> | |
66 | <div class="field"> |
|
66 | <div class="field"> | |
67 | <div class="label label-checkbox"> |
|
67 | <div class="label label-checkbox"> | |
68 | <label for="private">${_('Private')}:</label> |
|
68 | <label for="private">${_('Private')}:</label> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="checkboxes"> |
|
70 | <div class="checkboxes"> | |
71 | ${h.checkbox('private',value="True")} |
|
71 | ${h.checkbox('private',value="True")} | |
72 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
72 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
73 | </div> |
|
73 | </div> | |
74 | </div> |
|
74 | </div> | |
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label label-checkbox"> |
|
76 | <div class="label label-checkbox"> | |
77 | <label for="private">${_('Copy permissions')}:</label> |
|
77 | <label for="private">${_('Copy permissions')}:</label> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="checkboxes"> |
|
79 | <div class="checkboxes"> | |
80 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
80 | ${h.checkbox('copy_permissions',value="True", checked="checked")} | |
81 | <span class="help-block">${_('Copy permissions from forked repository')}</span> |
|
81 | <span class="help-block">${_('Copy permissions from forked repository')}</span> | |
82 | </div> |
|
82 | </div> | |
83 | </div> |
|
83 | </div> | |
84 | <div class="field"> |
|
84 | <div class="field"> | |
85 | <div class="label label-checkbox"> |
|
85 | <div class="label label-checkbox"> | |
86 | <label for="private">${_('Update after clone')}:</label> |
|
86 | <label for="private">${_('Update after clone')}:</label> | |
87 | </div> |
|
87 | </div> | |
88 | <div class="checkboxes"> |
|
88 | <div class="checkboxes"> | |
89 | ${h.checkbox('update_after_clone',value="True")} |
|
89 | ${h.checkbox('update_after_clone',value="True")} | |
90 | <span class="help-block">${_('Checkout source after making a clone')}</span> |
|
90 | <span class="help-block">${_('Checkout source after making a clone')}</span> | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 | <div class="buttons"> |
|
93 | <div class="buttons"> | |
94 | ${h.submit('',_('fork this repository'),class_="ui-btn large")} |
|
94 | ${h.submit('',_('fork this repository'),class_="ui-btn large")} | |
95 | </div> |
|
95 | </div> | |
96 | </div> |
|
96 | </div> | |
97 | </div> |
|
97 | </div> | |
98 | ${h.end_form()} |
|
98 | ${h.end_form()} | |
99 | </div> |
|
99 | </div> | |
100 | </%def> |
|
100 | </%def> |
@@ -1,32 +1,32 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Forks') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Forks') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
12 | » |
|
12 | » | |
13 | ${_('forks')} |
|
13 | ${_('forks')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('forks')} |
|
17 | ${self.menu('forks')} | |
18 | </%def> |
|
18 | </%def> | |
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 | </div> |
|
24 | </div> | |
25 | <!-- end box / title --> |
|
25 | <!-- end box / title --> | |
26 | <div class="table"> |
|
26 | <div class="table"> | |
27 | <div id="forks"> |
|
27 | <div id="forks"> | |
28 | ${c.forks_data} |
|
28 | ${c.forks_data} | |
29 | </div> |
|
29 | </div> | |
30 | </div> |
|
30 | </div> | |
31 | </div> |
|
31 | </div> | |
32 | </%def> |
|
32 | </%def> |
@@ -1,201 +1,201 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${c.repo_name} ${_('New pull request')} |
|
4 | ${c.repo_name} ${_('New pull request')} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
11 | » |
|
11 | » | |
12 |
${_(' |
|
12 | ${_('new pull request')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="main()"> |
|
15 | <%def name="main()"> | |
16 |
|
16 | |||
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | </div> |
|
21 | </div> | |
22 | ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} |
|
22 | ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} | |
23 | <div style="float:left;padding:0px 30px 30px 30px"> |
|
23 | <div style="float:left;padding:0px 30px 30px 30px"> | |
24 | <input type="hidden" name="rev_start" value="${request.GET.get('rev_start')}" /> |
|
24 | <input type="hidden" name="rev_start" value="${request.GET.get('rev_start')}" /> | |
25 | <input type="hidden" name="rev_end" value="${request.GET.get('rev_end')}" /> |
|
25 | <input type="hidden" name="rev_end" value="${request.GET.get('rev_end')}" /> | |
26 |
|
26 | |||
27 | ##ORG |
|
27 | ##ORG | |
28 | <div style="float:left"> |
|
28 | <div style="float:left"> | |
29 | <div> |
|
29 | <div> | |
30 | <span style="font-size: 20px"> |
|
30 | <span style="font-size: 20px"> | |
31 | ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref',c.default_org_ref,c.org_refs,class_='refs')} |
|
31 | ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref',c.default_org_ref,c.org_refs,class_='refs')} | |
32 | </span> |
|
32 | </span> | |
33 | <div style="padding:5px 3px 3px 42px;">${c.rhodecode_db_repo.description}</div> |
|
33 | <div style="padding:5px 3px 3px 42px;">${c.rhodecode_db_repo.description}</div> | |
34 | </div> |
|
34 | </div> | |
35 | <div style="clear:both;padding-top: 10px"></div> |
|
35 | <div style="clear:both;padding-top: 10px"></div> | |
36 | </div> |
|
36 | </div> | |
37 | <div style="float:left;font-size:24px;padding:0px 20px"> |
|
37 | <div style="float:left;font-size:24px;padding:0px 20px"> | |
38 | <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/> |
|
38 | <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/> | |
39 | </div> |
|
39 | </div> | |
40 |
|
40 | |||
41 | ##OTHER, most Probably the PARENT OF THIS FORK |
|
41 | ##OTHER, most Probably the PARENT OF THIS FORK | |
42 | <div style="float:left"> |
|
42 | <div style="float:left"> | |
43 | <div> |
|
43 | <div> | |
44 | <span style="font-size: 20px"> |
|
44 | <span style="font-size: 20px"> | |
45 | ${h.select('other_repo',c.default_other_repo,c.other_repos,class_='refs')}:${h.select('other_ref',c.default_other_ref,c.default_other_refs,class_='refs')} |
|
45 | ${h.select('other_repo',c.default_other_repo,c.other_repos,class_='refs')}:${h.select('other_ref',c.default_other_ref,c.default_other_refs,class_='refs')} | |
46 | </span> |
|
46 | </span> | |
47 | <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div> |
|
47 | <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div> | |
48 | </div> |
|
48 | </div> | |
49 | <div style="clear:both;padding-top: 10px"></div> |
|
49 | <div style="clear:both;padding-top: 10px"></div> | |
50 | </div> |
|
50 | </div> | |
51 | <div style="clear:both;padding-top: 10px"></div> |
|
51 | <div style="clear:both;padding-top: 10px"></div> | |
52 | ## overview pulled by ajax |
|
52 | ## overview pulled by ajax | |
53 | <div style="float:left" id="pull_request_overview"></div> |
|
53 | <div style="float:left" id="pull_request_overview"></div> | |
54 | <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none"> |
|
54 | <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none"> | |
55 | <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a> |
|
55 | <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a> | |
56 | </div> |
|
56 | </div> | |
57 | </div> |
|
57 | </div> | |
58 | <div style="float:left; border-left:1px dashed #eee"> |
|
58 | <div style="float:left; border-left:1px dashed #eee"> | |
59 | <h4>${_('Pull request reviewers')}</h4> |
|
59 | <h4>${_('Pull request reviewers')}</h4> | |
60 | <div id="reviewers" style="padding:0px 0px 0px 15px"> |
|
60 | <div id="reviewers" style="padding:0px 0px 0px 15px"> | |
61 | ## members goes here ! |
|
61 | ## members goes here ! | |
62 | <div class="group_members_wrap"> |
|
62 | <div class="group_members_wrap"> | |
63 | <ul id="review_members" class="group_members"> |
|
63 | <ul id="review_members" class="group_members"> | |
64 | %for member in c.review_members: |
|
64 | %for member in c.review_members: | |
65 | <li id="reviewer_${member.user_id}"> |
|
65 | <li id="reviewer_${member.user_id}"> | |
66 | <div class="reviewers_member"> |
|
66 | <div class="reviewers_member"> | |
67 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
67 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> | |
68 | <div style="float:left">${member.full_name} (${_('owner')})</div> |
|
68 | <div style="float:left">${member.full_name} (${_('owner')})</div> | |
69 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
69 | <input type="hidden" value="${member.user_id}" name="review_members" /> | |
70 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> |
|
70 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> | |
71 | </div> |
|
71 | </div> | |
72 | </li> |
|
72 | </li> | |
73 | %endfor |
|
73 | %endfor | |
74 | </ul> |
|
74 | </ul> | |
75 | </div> |
|
75 | </div> | |
76 |
|
76 | |||
77 | <div class='ac'> |
|
77 | <div class='ac'> | |
78 | <div class="reviewer_ac"> |
|
78 | <div class="reviewer_ac"> | |
79 | ${h.text('user', class_='yui-ac-input')} |
|
79 | ${h.text('user', class_='yui-ac-input')} | |
80 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> |
|
80 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> | |
81 | <div id="reviewers_container"></div> |
|
81 | <div id="reviewers_container"></div> | |
82 | </div> |
|
82 | </div> | |
83 | </div> |
|
83 | </div> | |
84 | </div> |
|
84 | </div> | |
85 | </div> |
|
85 | </div> | |
86 | <h3>${_('Create new pull request')}</h3> |
|
86 | <h3>${_('Create new pull request')}</h3> | |
87 |
|
87 | |||
88 | <div class="form"> |
|
88 | <div class="form"> | |
89 | <!-- fields --> |
|
89 | <!-- fields --> | |
90 |
|
90 | |||
91 | <div class="fields"> |
|
91 | <div class="fields"> | |
92 |
|
92 | |||
93 | <div class="field"> |
|
93 | <div class="field"> | |
94 | <div class="label"> |
|
94 | <div class="label"> | |
95 | <label for="pullrequest_title">${_('Title')}:</label> |
|
95 | <label for="pullrequest_title">${_('Title')}:</label> | |
96 | </div> |
|
96 | </div> | |
97 | <div class="input"> |
|
97 | <div class="input"> | |
98 | ${h.text('pullrequest_title',size=30)} |
|
98 | ${h.text('pullrequest_title',size=30)} | |
99 | </div> |
|
99 | </div> | |
100 | </div> |
|
100 | </div> | |
101 |
|
101 | |||
102 | <div class="field"> |
|
102 | <div class="field"> | |
103 | <div class="label label-textarea"> |
|
103 | <div class="label label-textarea"> | |
104 | <label for="pullrequest_desc">${_('description')}:</label> |
|
104 | <label for="pullrequest_desc">${_('description')}:</label> | |
105 | </div> |
|
105 | </div> | |
106 | <div class="textarea text-area editor"> |
|
106 | <div class="textarea text-area editor"> | |
107 | ${h.textarea('pullrequest_desc',size=30)} |
|
107 | ${h.textarea('pullrequest_desc',size=30)} | |
108 | </div> |
|
108 | </div> | |
109 | </div> |
|
109 | </div> | |
110 |
|
110 | |||
111 | <div class="buttons"> |
|
111 | <div class="buttons"> | |
112 | ${h.submit('save',_('Send pull request'),class_="ui-btn large")} |
|
112 | ${h.submit('save',_('Send pull request'),class_="ui-btn large")} | |
113 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
113 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
114 | </div> |
|
114 | </div> | |
115 | </div> |
|
115 | </div> | |
116 | </div> |
|
116 | </div> | |
117 | ${h.end_form()} |
|
117 | ${h.end_form()} | |
118 |
|
118 | |||
119 | </div> |
|
119 | </div> | |
120 |
|
120 | |||
121 | <script type="text/javascript"> |
|
121 | <script type="text/javascript"> | |
122 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
122 | var _USERS_AC_DATA = ${c.users_array|n}; | |
123 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
123 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
124 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
124 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); | |
125 |
|
125 | |||
126 | var other_repos_info = ${c.other_repos_info|n}; |
|
126 | var other_repos_info = ${c.other_repos_info|n}; | |
127 |
|
127 | |||
128 | var loadPreview = function(){ |
|
128 | var loadPreview = function(){ | |
129 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none'); |
|
129 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none'); | |
130 | //url template |
|
130 | //url template | |
131 | var url = "${h.url('compare_url', |
|
131 | var url = "${h.url('compare_url', | |
132 | repo_name='__other_repo__', |
|
132 | repo_name='__other_repo__', | |
133 | org_ref_type='__other_ref_type__', |
|
133 | org_ref_type='__other_ref_type__', | |
134 | org_ref='__other_ref__', |
|
134 | org_ref='__other_ref__', | |
135 | other_repo='__org_repo__', |
|
135 | other_repo='__org_repo__', | |
136 | other_ref_type='__org_ref_type__', |
|
136 | other_ref_type='__org_ref_type__', | |
137 | other_ref='__org_ref__', |
|
137 | other_ref='__org_ref__', | |
138 | as_form=True, |
|
138 | as_form=True, | |
139 | rev_start=request.GET.get('rev_start',''), |
|
139 | rev_start=request.GET.get('rev_start',''), | |
140 | rev_end=request.GET.get('rev_end',''))}"; |
|
140 | rev_end=request.GET.get('rev_end',''))}"; | |
141 | var org_repo = YUQ('#pull_request_form #org_repo')[0].value; |
|
141 | var org_repo = YUQ('#pull_request_form #org_repo')[0].value; | |
142 | var org_ref = YUQ('#pull_request_form #org_ref')[0].value.split(':'); |
|
142 | var org_ref = YUQ('#pull_request_form #org_ref')[0].value.split(':'); | |
143 |
|
143 | |||
144 | var other_repo = YUQ('#pull_request_form #other_repo')[0].value; |
|
144 | var other_repo = YUQ('#pull_request_form #other_repo')[0].value; | |
145 | var other_ref = YUQ('#pull_request_form #other_ref')[0].value.split(':'); |
|
145 | var other_ref = YUQ('#pull_request_form #other_ref')[0].value.split(':'); | |
146 |
|
146 | |||
147 | var select_refs = YUQ('#pull_request_form select.refs') |
|
147 | var select_refs = YUQ('#pull_request_form select.refs') | |
148 | var rev_data = { |
|
148 | var rev_data = { | |
149 | 'org_repo': org_repo, |
|
149 | 'org_repo': org_repo, | |
150 | 'org_ref': org_ref[1], |
|
150 | 'org_ref': org_ref[1], | |
151 | 'org_ref_type': org_ref[0], |
|
151 | 'org_ref_type': org_ref[0], | |
152 | 'other_repo': other_repo, |
|
152 | 'other_repo': other_repo, | |
153 | 'other_ref': other_ref[1], |
|
153 | 'other_ref': other_ref[1], | |
154 | 'other_ref_type': other_ref[0], |
|
154 | 'other_ref_type': other_ref[0], | |
155 | }; // gather the org/other ref and repo here |
|
155 | }; // gather the org/other ref and repo here | |
156 |
|
156 | |||
157 | for (k in rev_data){ |
|
157 | for (k in rev_data){ | |
158 | url = url.replace('__'+k+'__',rev_data[k]); |
|
158 | url = url.replace('__'+k+'__',rev_data[k]); | |
159 | } |
|
159 | } | |
160 |
|
160 | |||
161 | ypjax(url,'pull_request_overview', function(data){ |
|
161 | ypjax(url,'pull_request_overview', function(data){ | |
162 | var sel_box = YUQ('#pull_request_form #other_repo')[0]; |
|
162 | var sel_box = YUQ('#pull_request_form #other_repo')[0]; | |
163 | var repo_name = sel_box.options[sel_box.selectedIndex].value; |
|
163 | var repo_name = sel_box.options[sel_box.selectedIndex].value; | |
164 | var _data = other_repos_info[repo_name]; |
|
164 | var _data = other_repos_info[repo_name]; | |
165 | YUD.get('pull_request_overview_url').href = url; |
|
165 | YUD.get('pull_request_overview_url').href = url; | |
166 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display',''); |
|
166 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display',''); | |
167 | YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; |
|
167 | YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; | |
168 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; |
|
168 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; | |
169 | // select back the revision that was just compared |
|
169 | // select back the revision that was just compared | |
170 | setSelectValue(YUD.get('other_ref'), rev_data['other_ref']); |
|
170 | setSelectValue(YUD.get('other_ref'), rev_data['other_ref']); | |
171 | // reset && add the reviewer based on selected repo |
|
171 | // reset && add the reviewer based on selected repo | |
172 | YUD.get('review_members').innerHTML = ''; |
|
172 | YUD.get('review_members').innerHTML = ''; | |
173 | addReviewMember(_data.user.user_id, _data.user.firstname, |
|
173 | addReviewMember(_data.user.user_id, _data.user.firstname, | |
174 | _data.user.lastname, _data.user.username, |
|
174 | _data.user.lastname, _data.user.username, | |
175 | _data.user.gravatar_link); |
|
175 | _data.user.gravatar_link); | |
176 | }) |
|
176 | }) | |
177 | } |
|
177 | } | |
178 |
|
178 | |||
179 | ## refresh automatically when something changes (org_repo can't change) |
|
179 | ## refresh automatically when something changes (org_repo can't change) | |
180 |
|
180 | |||
181 | YUE.on('org_ref', 'change', function(e){ |
|
181 | YUE.on('org_ref', 'change', function(e){ | |
182 | loadPreview(); |
|
182 | loadPreview(); | |
183 | }); |
|
183 | }); | |
184 |
|
184 | |||
185 | YUE.on('other_repo', 'change', function(e){ |
|
185 | YUE.on('other_repo', 'change', function(e){ | |
186 | var repo_name = e.currentTarget.value; |
|
186 | var repo_name = e.currentTarget.value; | |
187 | // replace the <select> of changed repo |
|
187 | // replace the <select> of changed repo | |
188 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; |
|
188 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; | |
189 | loadPreview(); |
|
189 | loadPreview(); | |
190 | }); |
|
190 | }); | |
191 |
|
191 | |||
192 | YUE.on('other_ref', 'change', function(e){ |
|
192 | YUE.on('other_ref', 'change', function(e){ | |
193 | loadPreview(); |
|
193 | loadPreview(); | |
194 | }); |
|
194 | }); | |
195 |
|
195 | |||
196 | //lazy load overview after 0.5s |
|
196 | //lazy load overview after 0.5s | |
197 | setTimeout(loadPreview, 500) |
|
197 | setTimeout(loadPreview, 500) | |
198 |
|
198 | |||
199 | </script> |
|
199 | </script> | |
200 |
|
200 | |||
201 | </%def> |
|
201 | </%def> |
@@ -1,44 +1,44 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${c.repo_name} ${_('all pull requests')} |
|
4 | ${c.repo_name} ${_('all pull requests')} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
11 | » |
|
11 | » | |
12 |
${_(' |
|
12 | ${_('pull requests')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="main()"> |
|
15 | <%def name="main()"> | |
16 |
|
16 | |||
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | </div> |
|
21 | </div> | |
22 |
|
22 | |||
23 | %for pr in c.pull_requests: |
|
23 | %for pr in c.pull_requests: | |
24 | <div> |
|
24 | <div> | |
25 | <h4 style="border:0px;padding:0px"> |
|
25 | <h4 style="border:0px;padding:0px"> | |
26 | %if pr.is_closed(): |
|
26 | %if pr.is_closed(): | |
27 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> |
|
27 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> | |
28 | %endif |
|
28 | %endif | |
29 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(pr.last_review_status))}" /> |
|
29 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(pr.last_review_status))}" /> | |
30 | <a href="${h.url('pullrequest_show',repo_name=c.repo_name,pull_request_id=pr.pull_request_id)}"> |
|
30 | <a href="${h.url('pullrequest_show',repo_name=c.repo_name,pull_request_id=pr.pull_request_id)}"> | |
31 | ${_('Pull request #%s opened by %s on %s') % (pr.pull_request_id, pr.author.full_name, h.fmt_date(pr.created_on))} |
|
31 | ${_('Pull request #%s opened by %s on %s') % (pr.pull_request_id, pr.author.full_name, h.fmt_date(pr.created_on))} | |
32 | </a> |
|
32 | </a> | |
33 | </h4> |
|
33 | </h4> | |
34 | <h5 style="border:0px;padding-bottom:0px">${_('Title')}: ${pr.title}</h5> |
|
34 | <h5 style="border:0px;padding-bottom:0px">${_('Title')}: ${pr.title}</h5> | |
35 | <div style="padding:0px 24px">${pr.description}</div> |
|
35 | <div style="padding:0px 24px">${pr.description}</div> | |
36 | <div style="border-bottom: 1px solid #DDD;margin:10px 20px;padding-bottom:10px"></div> |
|
36 | <div style="border-bottom: 1px solid #DDD;margin:10px 20px;padding-bottom:10px"></div> | |
37 | </div> |
|
37 | </div> | |
38 | %endfor |
|
38 | %endfor | |
39 |
|
39 | |||
40 | </div> |
|
40 | </div> | |
41 |
|
41 | |||
42 | <script type="text/javascript"></script> |
|
42 | <script type="text/javascript"></script> | |
43 |
|
43 | |||
44 | </%def> |
|
44 | </%def> |
@@ -1,91 +1,91 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | %if c.repo_name: |
|
5 | %if c.repo_name: | |
6 | ${_('Search repository')} ${c.repo_name} - ${c.rhodecode_name} |
|
6 | ${_('Search repository')} ${c.repo_name} - ${c.rhodecode_name} | |
7 | %else: |
|
7 | %else: | |
8 | ${_('Search in all repositories')} |
|
8 | ${_('Search in all repositories')} | |
9 | %endif |
|
9 | %endif | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="breadcrumbs_links()"> |
|
12 | <%def name="breadcrumbs_links()"> | |
13 | %if c.repo_name: |
|
13 | %if c.repo_name: | |
14 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
14 | ${h.link_to(_(u'Home'),h.url('/'))} | |
15 | » |
|
15 | » | |
16 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
16 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
17 | » |
|
17 | » | |
18 |
${_(' |
|
18 | ${_('search')} | |
19 | %else: |
|
19 | %else: | |
20 |
${_(' |
|
20 | ${_('search in all repositories')} | |
21 | %endif |
|
21 | %endif | |
22 | %if c.cur_query: |
|
22 | %if c.cur_query: | |
23 | » |
|
23 | » | |
24 | ${c.cur_query} |
|
24 | ${c.cur_query} | |
25 | %endif |
|
25 | %endif | |
26 | </%def> |
|
26 | </%def> | |
27 |
|
27 | |||
28 | <%def name="page_nav()"> |
|
28 | <%def name="page_nav()"> | |
29 | %if c.repo_name: |
|
29 | %if c.repo_name: | |
30 | ${self.menu('options')} |
|
30 | ${self.menu('options')} | |
31 | %else: |
|
31 | %else: | |
32 | ${self.menu('search')} |
|
32 | ${self.menu('search')} | |
33 | %endif |
|
33 | %endif | |
34 | </%def> |
|
34 | </%def> | |
35 | <%def name="main()"> |
|
35 | <%def name="main()"> | |
36 |
|
36 | |||
37 | <div class="box"> |
|
37 | <div class="box"> | |
38 | <!-- box / title --> |
|
38 | <!-- box / title --> | |
39 | <div class="title"> |
|
39 | <div class="title"> | |
40 | ${self.breadcrumbs()} |
|
40 | ${self.breadcrumbs()} | |
41 | </div> |
|
41 | </div> | |
42 | <!-- end box / title --> |
|
42 | <!-- end box / title --> | |
43 | %if c.repo_name: |
|
43 | %if c.repo_name: | |
44 | ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')} |
|
44 | ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')} | |
45 | %else: |
|
45 | %else: | |
46 | ${h.form(h.url('search'),method='get')} |
|
46 | ${h.form(h.url('search'),method='get')} | |
47 | %endif |
|
47 | %endif | |
48 | <div class="form"> |
|
48 | <div class="form"> | |
49 | <div class="fields"> |
|
49 | <div class="fields"> | |
50 | <div class="field field-first field-noborder"> |
|
50 | <div class="field field-first field-noborder"> | |
51 | <div class="label"> |
|
51 | <div class="label"> | |
52 | <label for="q">${_('Search term')}</label> |
|
52 | <label for="q">${_('Search term')}</label> | |
53 | </div> |
|
53 | </div> | |
54 | <div class="input">${h.text('q',c.cur_query,class_="small")} |
|
54 | <div class="input">${h.text('q',c.cur_query,class_="small")} | |
55 | <div class="button highlight"> |
|
55 | <div class="button highlight"> | |
56 | <input type="submit" value="${_('Search')}" class="ui-button"/> |
|
56 | <input type="submit" value="${_('Search')}" class="ui-button"/> | |
57 | </div> |
|
57 | </div> | |
58 | </div> |
|
58 | </div> | |
59 | <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> |
|
59 | <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> | |
60 | </div> |
|
60 | </div> | |
61 |
|
61 | |||
62 | <div class="field"> |
|
62 | <div class="field"> | |
63 | <div class="label"> |
|
63 | <div class="label"> | |
64 | <label for="type">${_('Search in')}</label> |
|
64 | <label for="type">${_('Search in')}</label> | |
65 | </div> |
|
65 | </div> | |
66 | <div class="select"> |
|
66 | <div class="select"> | |
67 | ${h.select('type',c.cur_type,[('content',_('File contents')), |
|
67 | ${h.select('type',c.cur_type,[('content',_('File contents')), | |
68 | ('commit',_('Commit messages')), |
|
68 | ('commit',_('Commit messages')), | |
69 | ('path',_('File names')), |
|
69 | ('path',_('File names')), | |
70 | ##('repository',_('Repository names')), |
|
70 | ##('repository',_('Repository names')), | |
71 | ])} |
|
71 | ])} | |
72 | </div> |
|
72 | </div> | |
73 | </div> |
|
73 | </div> | |
74 |
|
74 | |||
75 | </div> |
|
75 | </div> | |
76 | </div> |
|
76 | </div> | |
77 | ${h.end_form()} |
|
77 | ${h.end_form()} | |
78 | <div class="search"> |
|
78 | <div class="search"> | |
79 | %if c.cur_type == 'content': |
|
79 | %if c.cur_type == 'content': | |
80 | <%include file='search_content.html'/> |
|
80 | <%include file='search_content.html'/> | |
81 | %elif c.cur_type == 'path': |
|
81 | %elif c.cur_type == 'path': | |
82 | <%include file='search_path.html'/> |
|
82 | <%include file='search_path.html'/> | |
83 | %elif c.cur_type == 'commit': |
|
83 | %elif c.cur_type == 'commit': | |
84 | <%include file='search_commit.html'/> |
|
84 | <%include file='search_commit.html'/> | |
85 | %elif c.cur_type == 'repository': |
|
85 | %elif c.cur_type == 'repository': | |
86 | <%include file='search_repository.html'/> |
|
86 | <%include file='search_repository.html'/> | |
87 | %endif |
|
87 | %endif | |
88 | </div> |
|
88 | </div> | |
89 | </div> |
|
89 | </div> | |
90 |
|
90 | |||
91 | </%def> |
|
91 | </%def> |
@@ -1,39 +1,39 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Shortlog') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Shortlog') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | ${h.link_to(_(u'Home'),h.url('/'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
13 | » |
|
13 | » | |
14 | %if c.file_history: |
|
14 | %if c.file_history: | |
15 | ${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))} |
|
15 | ${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))} | |
16 | » |
|
16 | » | |
17 | ${c.file_history} |
|
17 | ${c.file_history} | |
18 | %else: |
|
18 | %else: | |
19 | ${_('shortlog')} |
|
19 | ${_('shortlog')} | |
20 | %endif |
|
20 | %endif | |
21 | </%def> |
|
21 | </%def> | |
22 |
|
22 | |||
23 | <%def name="page_nav()"> |
|
23 | <%def name="page_nav()"> | |
24 | ${self.menu('shortlog')} |
|
24 | ${self.menu('shortlog')} | |
25 | </%def> |
|
25 | </%def> | |
26 | <%def name="main()"> |
|
26 | <%def name="main()"> | |
27 | <div class="box"> |
|
27 | <div class="box"> | |
28 | <!-- box / title --> |
|
28 | <!-- box / title --> | |
29 | <div class="title"> |
|
29 | <div class="title"> | |
30 | ${self.breadcrumbs()} |
|
30 | ${self.breadcrumbs()} | |
31 | </div> |
|
31 | </div> | |
32 | <!-- end box / title --> |
|
32 | <!-- end box / title --> | |
33 | <div class="table"> |
|
33 | <div class="table"> | |
34 | <div id="shortlog_data"> |
|
34 | <div id="shortlog_data"> | |
35 | ${c.shortlog_data} |
|
35 | ${c.shortlog_data} | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 | </%def> |
|
39 | </%def> |
@@ -1,725 +1,725 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('%s Summary') % c.repo_name} - ${c.rhodecode_name} |
|
4 | ${_('%s Summary') % c.repo_name} - ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
9 | » |
|
9 | » | |
10 | ${h.repo_link(c.dbrepo.groups_and_repo)} |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
11 | » |
|
11 | » | |
12 | ${_('summary')} |
|
12 | ${_('summary')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
16 | ${self.menu('summary')} |
|
16 | ${self.menu('summary')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="head_extra()"> |
|
19 | <%def name="head_extra()"> | |
20 | <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s ATOM feed') % c.repo_name}" type="application/atom+xml" /> |
|
20 | <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s ATOM feed') % c.repo_name}" type="application/atom+xml" /> | |
21 | <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s RSS feed') % c.repo_name}" type="application/rss+xml" /> |
|
21 | <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s RSS feed') % c.repo_name}" type="application/rss+xml" /> | |
22 | </%def> |
|
22 | </%def> | |
23 |
|
23 | |||
24 | <%def name="main()"> |
|
24 | <%def name="main()"> | |
25 | <% |
|
25 | <% | |
26 | summary = lambda n:{False:'summary-short'}.get(n) |
|
26 | summary = lambda n:{False:'summary-short'}.get(n) | |
27 | %> |
|
27 | %> | |
28 | %if c.show_stats: |
|
28 | %if c.show_stats: | |
29 | <div class="box box-left"> |
|
29 | <div class="box box-left"> | |
30 | %else: |
|
30 | %else: | |
31 | <div class="box"> |
|
31 | <div class="box"> | |
32 | %endif |
|
32 | %endif | |
33 | <!-- box / title --> |
|
33 | <!-- box / title --> | |
34 | <div class="title"> |
|
34 | <div class="title"> | |
35 | ${self.breadcrumbs()} |
|
35 | ${self.breadcrumbs()} | |
36 | </div> |
|
36 | </div> | |
37 | <!-- end box / title --> |
|
37 | <!-- end box / title --> | |
38 | <div class="form"> |
|
38 | <div class="form"> | |
39 | <div id="summary" class="fields"> |
|
39 | <div id="summary" class="fields"> | |
40 |
|
40 | |||
41 | <div class="field"> |
|
41 | <div class="field"> | |
42 | <div class="label-summary"> |
|
42 | <div class="label-summary"> | |
43 | <label>${_('Name')}:</label> |
|
43 | <label>${_('Name')}:</label> | |
44 | </div> |
|
44 | </div> | |
45 | <div class="input ${summary(c.show_stats)}"> |
|
45 | <div class="input ${summary(c.show_stats)}"> | |
46 | <div style="float:right;padding:5px 0px 0px 5px"> |
|
46 | <div style="float:right;padding:5px 0px 0px 5px"> | |
47 | %if c.rhodecode_user.username != 'default': |
|
47 | %if c.rhodecode_user.username != 'default': | |
48 | ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='atom_icon')} |
|
48 | ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='atom_icon')} | |
49 | %else: |
|
49 | %else: | |
50 | ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')} |
|
50 | ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')} | |
51 | %endif |
|
51 | %endif | |
52 | </div> |
|
52 | </div> | |
53 | %if c.rhodecode_user.username != 'default': |
|
53 | %if c.rhodecode_user.username != 'default': | |
54 | %if c.following: |
|
54 | %if c.following: | |
55 | <span id="follow_toggle" class="following tooltip" title="${_('Stop following this repository')}" |
|
55 | <span id="follow_toggle" class="following tooltip" title="${_('Stop following this repository')}" | |
56 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> |
|
56 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> | |
57 | </span> |
|
57 | </span> | |
58 | %else: |
|
58 | %else: | |
59 | <span id="follow_toggle" class="follow tooltip" title="${_('Start following this repository')}" |
|
59 | <span id="follow_toggle" class="follow tooltip" title="${_('Start following this repository')}" | |
60 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> |
|
60 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> | |
61 | </span> |
|
61 | </span> | |
62 | %endif |
|
62 | %endif | |
63 | <div style="float:right;padding:0px 0px 0px 0px"> |
|
63 | <div style="float:right;padding:0px 0px 0px 0px"> | |
64 | <span class="reposize tooltip" title="${_('Click to show size of repository')}" |
|
64 | <span class="reposize tooltip" title="${_('Click to show size of repository')}" | |
65 | onclick="javascript:showRepoSize('repo_size','${c.dbrepo.repo_name}','${str(h.get_token())}')"> |
|
65 | onclick="javascript:showRepoSize('repo_size','${c.dbrepo.repo_name}','${str(h.get_token())}')"> | |
66 | </span> |
|
66 | </span> | |
67 | <span id="repo_size"></span> |
|
67 | <span id="repo_size"></span> | |
68 | </div> |
|
68 | </div> | |
69 | %endif: |
|
69 | %endif: | |
70 |
|
70 | |||
71 | ## locking icon |
|
71 | ## locking icon | |
72 | %if c.rhodecode_db_repo.enable_locking: |
|
72 | %if c.rhodecode_db_repo.enable_locking: | |
73 | %if c.rhodecode_db_repo.locked[0]: |
|
73 | %if c.rhodecode_db_repo.locked[0]: | |
74 | <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span> |
|
74 | <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span> | |
75 | %else: |
|
75 | %else: | |
76 | <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span> |
|
76 | <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span> | |
77 | %endif |
|
77 | %endif | |
78 | %endif |
|
78 | %endif | |
79 | ##REPO TYPE |
|
79 | ##REPO TYPE | |
80 | %if h.is_hg(c.dbrepo): |
|
80 | %if h.is_hg(c.dbrepo): | |
81 | <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
81 | <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> | |
82 | %endif |
|
82 | %endif | |
83 | %if h.is_git(c.dbrepo): |
|
83 | %if h.is_git(c.dbrepo): | |
84 | <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
84 | <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> | |
85 | %endif |
|
85 | %endif | |
86 |
|
86 | |||
87 | ##PUBLIC/PRIVATE |
|
87 | ##PUBLIC/PRIVATE | |
88 | %if c.dbrepo.private: |
|
88 | %if c.dbrepo.private: | |
89 | <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
|
89 | <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> | |
90 | %else: |
|
90 | %else: | |
91 | <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
|
91 | <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> | |
92 | %endif |
|
92 | %endif | |
93 |
|
93 | |||
94 | ##REPO NAME |
|
94 | ##REPO NAME | |
95 | <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span> |
|
95 | <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span> | |
96 |
|
96 | |||
97 | ##FORK |
|
97 | ##FORK | |
98 | %if c.dbrepo.fork: |
|
98 | %if c.dbrepo.fork: | |
99 | <div style="margin-top:5px;clear:both""> |
|
99 | <div style="margin-top:5px;clear:both""> | |
100 | <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}"><img class="icon" alt="${_('public')}" title="${_('Fork of')} ${c.dbrepo.fork.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/> |
|
100 | <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}"><img class="icon" alt="${_('public')}" title="${_('Fork of')} ${c.dbrepo.fork.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/> | |
101 | ${_('Fork of')} ${c.dbrepo.fork.repo_name} |
|
101 | ${_('Fork of')} ${c.dbrepo.fork.repo_name} | |
102 | </a> |
|
102 | </a> | |
103 | </div> |
|
103 | </div> | |
104 | %endif |
|
104 | %endif | |
105 | ##REMOTE |
|
105 | ##REMOTE | |
106 | %if c.dbrepo.clone_uri: |
|
106 | %if c.dbrepo.clone_uri: | |
107 | <div style="margin-top:5px;clear:both"> |
|
107 | <div style="margin-top:5px;clear:both"> | |
108 | <a href="${h.url(str(h.hide_credentials(c.dbrepo.clone_uri)))}"><img class="icon" alt="${_('remote clone')}" title="${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}" src="${h.url('/images/icons/connect.png')}"/> |
|
108 | <a href="${h.url(str(h.hide_credentials(c.dbrepo.clone_uri)))}"><img class="icon" alt="${_('remote clone')}" title="${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}" src="${h.url('/images/icons/connect.png')}"/> | |
109 | ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)} |
|
109 | ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)} | |
110 | </a> |
|
110 | </a> | |
111 | </div> |
|
111 | </div> | |
112 | %endif |
|
112 | %endif | |
113 | </div> |
|
113 | </div> | |
114 | </div> |
|
114 | </div> | |
115 |
|
115 | |||
116 | <div class="field"> |
|
116 | <div class="field"> | |
117 | <div class="label-summary"> |
|
117 | <div class="label-summary"> | |
118 | <label>${_('Description')}:</label> |
|
118 | <label>${_('Description')}:</label> | |
119 | </div> |
|
119 | </div> | |
120 | %if c.visual.stylify_metatags: |
|
120 | %if c.visual.stylify_metatags: | |
121 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div> |
|
121 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div> | |
122 | %else: |
|
122 | %else: | |
123 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div> |
|
123 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div> | |
124 | %endif |
|
124 | %endif | |
125 | </div> |
|
125 | </div> | |
126 |
|
126 | |||
127 | <div class="field"> |
|
127 | <div class="field"> | |
128 | <div class="label-summary"> |
|
128 | <div class="label-summary"> | |
129 | <label>${_('Contact')}:</label> |
|
129 | <label>${_('Contact')}:</label> | |
130 | </div> |
|
130 | </div> | |
131 | <div class="input ${summary(c.show_stats)}"> |
|
131 | <div class="input ${summary(c.show_stats)}"> | |
132 | <div class="gravatar"> |
|
132 | <div class="gravatar"> | |
133 | <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/> |
|
133 | <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/> | |
134 | </div> |
|
134 | </div> | |
135 | ${_('Username')}: ${c.dbrepo.user.username}<br/> |
|
135 | ${_('Username')}: ${c.dbrepo.user.username}<br/> | |
136 | ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/> |
|
136 | ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/> | |
137 | ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a> |
|
137 | ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a> | |
138 | </div> |
|
138 | </div> | |
139 | </div> |
|
139 | </div> | |
140 |
|
140 | |||
141 | <div class="field"> |
|
141 | <div class="field"> | |
142 | <div class="label-summary"> |
|
142 | <div class="label-summary"> | |
143 | <label>${_('Clone url')}:</label> |
|
143 | <label>${_('Clone url')}:</label> | |
144 | </div> |
|
144 | </div> | |
145 | <div class="input ${summary(c.show_stats)}"> |
|
145 | <div class="input ${summary(c.show_stats)}"> | |
146 | <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> |
|
146 | <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> | |
147 | <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> |
|
147 | <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> | |
148 | <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> |
|
148 | <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> | |
149 | <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> |
|
149 | <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> | |
150 | </div> |
|
150 | </div> | |
151 | </div> |
|
151 | </div> | |
152 |
|
152 | |||
153 | <div class="field"> |
|
153 | <div class="field"> | |
154 | <div class="label-summary"> |
|
154 | <div class="label-summary"> | |
155 | <label>${_('Trending files')}:</label> |
|
155 | <label>${_('Trending files')}:</label> | |
156 | </div> |
|
156 | </div> | |
157 | <div class="input ${summary(c.show_stats)}"> |
|
157 | <div class="input ${summary(c.show_stats)}"> | |
158 | %if c.show_stats: |
|
158 | %if c.show_stats: | |
159 | <div id="lang_stats"></div> |
|
159 | <div id="lang_stats"></div> | |
160 | %else: |
|
160 | %else: | |
161 | ${_('Statistics are disabled for this repository')} |
|
161 | ${_('Statistics are disabled for this repository')} | |
162 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
162 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): | |
163 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
163 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | |
164 | %endif |
|
164 | %endif | |
165 | %endif |
|
165 | %endif | |
166 | </div> |
|
166 | </div> | |
167 | </div> |
|
167 | </div> | |
168 |
|
168 | |||
169 | <div class="field"> |
|
169 | <div class="field"> | |
170 | <div class="label-summary"> |
|
170 | <div class="label-summary"> | |
171 | <label>${_('Download')}:</label> |
|
171 | <label>${_('Download')}:</label> | |
172 | </div> |
|
172 | </div> | |
173 | <div class="input ${summary(c.show_stats)}"> |
|
173 | <div class="input ${summary(c.show_stats)}"> | |
174 | %if len(c.rhodecode_repo.revisions) == 0: |
|
174 | %if len(c.rhodecode_repo.revisions) == 0: | |
175 | ${_('There are no downloads yet')} |
|
175 | ${_('There are no downloads yet')} | |
176 | %elif c.enable_downloads is False: |
|
176 | %elif c.enable_downloads is False: | |
177 | ${_('Downloads are disabled for this repository')} |
|
177 | ${_('Downloads are disabled for this repository')} | |
178 | %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
|
178 | %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): | |
179 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
179 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | |
180 | %endif |
|
180 | %endif | |
181 | %else: |
|
181 | %else: | |
182 | ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)} |
|
182 | ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)} | |
183 | <span id="${'zip_link'}">${h.link_to(_('Download as zip'), h.url('files_archive_home',repo_name=c.dbrepo.repo_name,fname='tip.zip'),class_="archive_icon ui-btn")}</span> |
|
183 | <span id="${'zip_link'}">${h.link_to(_('Download as zip'), h.url('files_archive_home',repo_name=c.dbrepo.repo_name,fname='tip.zip'),class_="archive_icon ui-btn")}</span> | |
184 | <span style="vertical-align: bottom"> |
|
184 | <span style="vertical-align: bottom"> | |
185 | <input id="archive_subrepos" type="checkbox" name="subrepos" /> |
|
185 | <input id="archive_subrepos" type="checkbox" name="subrepos" /> | |
186 | <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label> |
|
186 | <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label> | |
187 | </span> |
|
187 | </span> | |
188 | %endif |
|
188 | %endif | |
189 | </div> |
|
189 | </div> | |
190 | </div> |
|
190 | </div> | |
191 | </div> |
|
191 | </div> | |
192 | </div> |
|
192 | </div> | |
193 | </div> |
|
193 | </div> | |
194 |
|
194 | |||
195 | %if c.show_stats: |
|
195 | %if c.show_stats: | |
196 | <div class="box box-right" style="min-height:455px"> |
|
196 | <div class="box box-right" style="min-height:455px"> | |
197 | <!-- box / title --> |
|
197 | <!-- box / title --> | |
198 | <div class="title"> |
|
198 | <div class="title"> | |
199 | <h5>${_('Commit activity by day / author')}</h5> |
|
199 | <h5>${_('Commit activity by day / author')}</h5> | |
200 | </div> |
|
200 | </div> | |
201 |
|
201 | |||
202 | <div class="graph"> |
|
202 | <div class="graph"> | |
203 | <div style="padding:0 10px 10px 17px;"> |
|
203 | <div style="padding:0 10px 10px 17px;"> | |
204 | %if c.no_data: |
|
204 | %if c.no_data: | |
205 | ${c.no_data_msg} |
|
205 | ${c.no_data_msg} | |
206 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
206 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): | |
207 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
207 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | |
208 | %endif |
|
208 | %endif | |
209 | %else: |
|
209 | %else: | |
210 | ${_('Stats gathered: ')} ${c.stats_percentage}% |
|
210 | ${_('Stats gathered: ')} ${c.stats_percentage}% | |
211 | %endif |
|
211 | %endif | |
212 | </div> |
|
212 | </div> | |
213 | <div id="commit_history" style="width:450px;height:300px;float:left"></div> |
|
213 | <div id="commit_history" style="width:450px;height:300px;float:left"></div> | |
214 | <div style="clear: both;height: 10px"></div> |
|
214 | <div style="clear: both;height: 10px"></div> | |
215 | <div id="overview" style="width:450px;height:100px;float:left"></div> |
|
215 | <div id="overview" style="width:450px;height:100px;float:left"></div> | |
216 |
|
216 | |||
217 | <div id="legend_data" style="clear:both;margin-top:10px;"> |
|
217 | <div id="legend_data" style="clear:both;margin-top:10px;"> | |
218 | <div id="legend_container"></div> |
|
218 | <div id="legend_container"></div> | |
219 | <div id="legend_choices"> |
|
219 | <div id="legend_choices"> | |
220 | <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table> |
|
220 | <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table> | |
221 | </div> |
|
221 | </div> | |
222 | </div> |
|
222 | </div> | |
223 | </div> |
|
223 | </div> | |
224 | </div> |
|
224 | </div> | |
225 | %endif |
|
225 | %endif | |
226 |
|
226 | |||
227 | <div class="box"> |
|
227 | <div class="box"> | |
228 | <div class="title"> |
|
228 | <div class="title"> | |
229 | <div class="breadcrumbs"> |
|
229 | <div class="breadcrumbs"> | |
230 | %if c.repo_changesets: |
|
230 | %if c.repo_changesets: | |
231 | ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))} |
|
231 | ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))} | |
232 | %else: |
|
232 | %else: | |
233 | ${_('Quick start')} |
|
233 | ${_('Quick start')} | |
234 | %endif |
|
234 | %endif | |
235 | </div> |
|
235 | </div> | |
236 | </div> |
|
236 | </div> | |
237 | <div class="table"> |
|
237 | <div class="table"> | |
238 | <div id="shortlog_data"> |
|
238 | <div id="shortlog_data"> | |
239 | <%include file='../shortlog/shortlog_data.html'/> |
|
239 | <%include file='../shortlog/shortlog_data.html'/> | |
240 | </div> |
|
240 | </div> | |
241 | </div> |
|
241 | </div> | |
242 | </div> |
|
242 | </div> | |
243 |
|
243 | |||
244 | %if c.readme_data: |
|
244 | %if c.readme_data: | |
245 | <div id="readme" class="anchor"> |
|
245 | <div id="readme" class="anchor"> | |
246 | <div class="box" style="background-color: #FAFAFA"> |
|
246 | <div class="box" style="background-color: #FAFAFA"> | |
247 | <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}"> |
|
247 | <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}"> | |
248 | <div class="breadcrumbs"> |
|
248 | <div class="breadcrumbs"> | |
249 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> |
|
249 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> | |
250 | <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">¶</a> |
|
250 | <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">¶</a> | |
251 | </div> |
|
251 | </div> | |
252 | </div> |
|
252 | </div> | |
253 | <div class="readme"> |
|
253 | <div class="readme"> | |
254 | <div class="readme_box"> |
|
254 | <div class="readme_box"> | |
255 | ${c.readme_data|n} |
|
255 | ${c.readme_data|n} | |
256 | </div> |
|
256 | </div> | |
257 | </div> |
|
257 | </div> | |
258 | </div> |
|
258 | </div> | |
259 | </div> |
|
259 | </div> | |
260 | %endif |
|
260 | %endif | |
261 |
|
261 | |||
262 | <script type="text/javascript"> |
|
262 | <script type="text/javascript"> | |
263 | var clone_url = 'clone_url'; |
|
263 | var clone_url = 'clone_url'; | |
264 | YUE.on(clone_url,'click',function(e){ |
|
264 | YUE.on(clone_url,'click',function(e){ | |
265 | if(YUD.hasClass(clone_url,'selected')){ |
|
265 | if(YUD.hasClass(clone_url,'selected')){ | |
266 | return |
|
266 | return | |
267 | } |
|
267 | } | |
268 | else{ |
|
268 | else{ | |
269 | YUD.addClass(clone_url,'selected'); |
|
269 | YUD.addClass(clone_url,'selected'); | |
270 | YUD.get(clone_url).select(); |
|
270 | YUD.get(clone_url).select(); | |
271 | } |
|
271 | } | |
272 | }) |
|
272 | }) | |
273 |
|
273 | |||
274 | YUE.on('clone_by_name','click',function(e){ |
|
274 | YUE.on('clone_by_name','click',function(e){ | |
275 | // show url by name and hide name button |
|
275 | // show url by name and hide name button | |
276 | YUD.setStyle('clone_url','display',''); |
|
276 | YUD.setStyle('clone_url','display',''); | |
277 | YUD.setStyle('clone_by_name','display','none'); |
|
277 | YUD.setStyle('clone_by_name','display','none'); | |
278 |
|
278 | |||
279 | // hide url by id and show name button |
|
279 | // hide url by id and show name button | |
280 | YUD.setStyle('clone_by_id','display',''); |
|
280 | YUD.setStyle('clone_by_id','display',''); | |
281 | YUD.setStyle('clone_url_id','display','none'); |
|
281 | YUD.setStyle('clone_url_id','display','none'); | |
282 |
|
282 | |||
283 | }) |
|
283 | }) | |
284 | YUE.on('clone_by_id','click',function(e){ |
|
284 | YUE.on('clone_by_id','click',function(e){ | |
285 |
|
285 | |||
286 | // show url by id and hide id button |
|
286 | // show url by id and hide id button | |
287 | YUD.setStyle('clone_by_id','display','none'); |
|
287 | YUD.setStyle('clone_by_id','display','none'); | |
288 | YUD.setStyle('clone_url_id','display',''); |
|
288 | YUD.setStyle('clone_url_id','display',''); | |
289 |
|
289 | |||
290 | // hide url by name and show id button |
|
290 | // hide url by name and show id button | |
291 | YUD.setStyle('clone_by_name','display',''); |
|
291 | YUD.setStyle('clone_by_name','display',''); | |
292 | YUD.setStyle('clone_url','display','none'); |
|
292 | YUD.setStyle('clone_url','display','none'); | |
293 | }) |
|
293 | }) | |
294 |
|
294 | |||
295 |
|
295 | |||
296 | var tmpl_links = {}; |
|
296 | var tmpl_links = {}; | |
297 | %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): |
|
297 | %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): | |
298 | tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.dbrepo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='archive_icon ui-btn')}'; |
|
298 | tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.dbrepo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='archive_icon ui-btn')}'; | |
299 | %endfor |
|
299 | %endfor | |
300 |
|
300 | |||
301 | YUE.on(['download_options','archive_subrepos'],'change',function(e){ |
|
301 | YUE.on(['download_options','archive_subrepos'],'change',function(e){ | |
302 | var sm = YUD.get('download_options'); |
|
302 | var sm = YUD.get('download_options'); | |
303 | var new_cs = sm.options[sm.selectedIndex]; |
|
303 | var new_cs = sm.options[sm.selectedIndex]; | |
304 |
|
304 | |||
305 | for(k in tmpl_links){ |
|
305 | for(k in tmpl_links){ | |
306 | var s = YUD.get(k+'_link'); |
|
306 | var s = YUD.get(k+'_link'); | |
307 | if(s){ |
|
307 | if(s){ | |
308 | var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}"; |
|
308 | var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}"; | |
309 | title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text); |
|
309 | title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text); | |
310 | title_tmpl = title_tmpl.replace('__CS_EXT__',k); |
|
310 | title_tmpl = title_tmpl.replace('__CS_EXT__',k); | |
311 |
|
311 | |||
312 | var url = tmpl_links[k].replace('__CS__',new_cs.value); |
|
312 | var url = tmpl_links[k].replace('__CS__',new_cs.value); | |
313 | var subrepos = YUD.get('archive_subrepos').checked; |
|
313 | var subrepos = YUD.get('archive_subrepos').checked; | |
314 | url = url.replace('__SUB__',subrepos); |
|
314 | url = url.replace('__SUB__',subrepos); | |
315 | url = url.replace('__NAME__',title_tmpl); |
|
315 | url = url.replace('__NAME__',title_tmpl); | |
316 | s.innerHTML = url |
|
316 | s.innerHTML = url | |
317 | } |
|
317 | } | |
318 | } |
|
318 | } | |
319 | }); |
|
319 | }); | |
320 | </script> |
|
320 | </script> | |
321 | %if c.show_stats: |
|
321 | %if c.show_stats: | |
322 | <script type="text/javascript"> |
|
322 | <script type="text/javascript"> | |
323 | var data = ${c.trending_languages|n}; |
|
323 | var data = ${c.trending_languages|n}; | |
324 | var total = 0; |
|
324 | var total = 0; | |
325 | var no_data = true; |
|
325 | var no_data = true; | |
326 | var tbl = document.createElement('table'); |
|
326 | var tbl = document.createElement('table'); | |
327 | tbl.setAttribute('class','trending_language_tbl'); |
|
327 | tbl.setAttribute('class','trending_language_tbl'); | |
328 | var cnt = 0; |
|
328 | var cnt = 0; | |
329 | for (var i=0;i<data.length;i++){ |
|
329 | for (var i=0;i<data.length;i++){ | |
330 | total+= data[i][1].count; |
|
330 | total+= data[i][1].count; | |
331 | } |
|
331 | } | |
332 | for (var i=0;i<data.length;i++){ |
|
332 | for (var i=0;i<data.length;i++){ | |
333 | cnt += 1; |
|
333 | cnt += 1; | |
334 | no_data = false; |
|
334 | no_data = false; | |
335 |
|
335 | |||
336 | var hide = cnt>2; |
|
336 | var hide = cnt>2; | |
337 | var tr = document.createElement('tr'); |
|
337 | var tr = document.createElement('tr'); | |
338 | if (hide){ |
|
338 | if (hide){ | |
339 | tr.setAttribute('style','display:none'); |
|
339 | tr.setAttribute('style','display:none'); | |
340 | tr.setAttribute('class','stats_hidden'); |
|
340 | tr.setAttribute('class','stats_hidden'); | |
341 | } |
|
341 | } | |
342 | var k = data[i][0]; |
|
342 | var k = data[i][0]; | |
343 | var obj = data[i][1]; |
|
343 | var obj = data[i][1]; | |
344 | var percentage = Math.round((obj.count/total*100),2); |
|
344 | var percentage = Math.round((obj.count/total*100),2); | |
345 |
|
345 | |||
346 | var td1 = document.createElement('td'); |
|
346 | var td1 = document.createElement('td'); | |
347 | td1.width = 150; |
|
347 | td1.width = 150; | |
348 | var trending_language_label = document.createElement('div'); |
|
348 | var trending_language_label = document.createElement('div'); | |
349 | trending_language_label.innerHTML = obj.desc+" ("+k+")"; |
|
349 | trending_language_label.innerHTML = obj.desc+" ("+k+")"; | |
350 | td1.appendChild(trending_language_label); |
|
350 | td1.appendChild(trending_language_label); | |
351 |
|
351 | |||
352 | var td2 = document.createElement('td'); |
|
352 | var td2 = document.createElement('td'); | |
353 | td2.setAttribute('style','padding-right:14px !important'); |
|
353 | td2.setAttribute('style','padding-right:14px !important'); | |
354 | var trending_language = document.createElement('div'); |
|
354 | var trending_language = document.createElement('div'); | |
355 | var nr_files = obj.count+" ${_('files')}"; |
|
355 | var nr_files = obj.count+" ${_('files')}"; | |
356 |
|
356 | |||
357 | trending_language.title = k+" "+nr_files; |
|
357 | trending_language.title = k+" "+nr_files; | |
358 |
|
358 | |||
359 | if (percentage>22){ |
|
359 | if (percentage>22){ | |
360 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>"; |
|
360 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>"; | |
361 | } |
|
361 | } | |
362 | else{ |
|
362 | else{ | |
363 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>"; |
|
363 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>"; | |
364 | } |
|
364 | } | |
365 |
|
365 | |||
366 | trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner'); |
|
366 | trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner'); | |
367 | trending_language.style.width=percentage+"%"; |
|
367 | trending_language.style.width=percentage+"%"; | |
368 | td2.appendChild(trending_language); |
|
368 | td2.appendChild(trending_language); | |
369 |
|
369 | |||
370 | tr.appendChild(td1); |
|
370 | tr.appendChild(td1); | |
371 | tr.appendChild(td2); |
|
371 | tr.appendChild(td2); | |
372 | tbl.appendChild(tr); |
|
372 | tbl.appendChild(tr); | |
373 | if(cnt == 3){ |
|
373 | if(cnt == 3){ | |
374 | var show_more = document.createElement('tr'); |
|
374 | var show_more = document.createElement('tr'); | |
375 | var td = document.createElement('td'); |
|
375 | var td = document.createElement('td'); | |
376 | lnk = document.createElement('a'); |
|
376 | lnk = document.createElement('a'); | |
377 |
|
377 | |||
378 | lnk.href='#'; |
|
378 | lnk.href='#'; | |
379 | lnk.innerHTML = "${_('show more')}"; |
|
379 | lnk.innerHTML = "${_('show more')}"; | |
380 | lnk.id='code_stats_show_more'; |
|
380 | lnk.id='code_stats_show_more'; | |
381 | td.appendChild(lnk); |
|
381 | td.appendChild(lnk); | |
382 |
|
382 | |||
383 | show_more.appendChild(td); |
|
383 | show_more.appendChild(td); | |
384 | show_more.appendChild(document.createElement('td')); |
|
384 | show_more.appendChild(document.createElement('td')); | |
385 | tbl.appendChild(show_more); |
|
385 | tbl.appendChild(show_more); | |
386 | } |
|
386 | } | |
387 |
|
387 | |||
388 | } |
|
388 | } | |
389 |
|
389 | |||
390 | YUD.get('lang_stats').appendChild(tbl); |
|
390 | YUD.get('lang_stats').appendChild(tbl); | |
391 | YUE.on('code_stats_show_more','click',function(){ |
|
391 | YUE.on('code_stats_show_more','click',function(){ | |
392 | l = YUD.getElementsByClassName('stats_hidden') |
|
392 | l = YUD.getElementsByClassName('stats_hidden') | |
393 | for (e in l){ |
|
393 | for (e in l){ | |
394 | YUD.setStyle(l[e],'display',''); |
|
394 | YUD.setStyle(l[e],'display',''); | |
395 | }; |
|
395 | }; | |
396 | YUD.setStyle(YUD.get('code_stats_show_more'), |
|
396 | YUD.setStyle(YUD.get('code_stats_show_more'), | |
397 | 'display','none'); |
|
397 | 'display','none'); | |
398 | }); |
|
398 | }); | |
399 | </script> |
|
399 | </script> | |
400 | <script type="text/javascript"> |
|
400 | <script type="text/javascript"> | |
401 | /** |
|
401 | /** | |
402 | * Plots summary graph |
|
402 | * Plots summary graph | |
403 | * |
|
403 | * | |
404 | * @class SummaryPlot |
|
404 | * @class SummaryPlot | |
405 | * @param {from} initial from for detailed graph |
|
405 | * @param {from} initial from for detailed graph | |
406 | * @param {to} initial to for detailed graph |
|
406 | * @param {to} initial to for detailed graph | |
407 | * @param {dataset} |
|
407 | * @param {dataset} | |
408 | * @param {overview_dataset} |
|
408 | * @param {overview_dataset} | |
409 | */ |
|
409 | */ | |
410 | function SummaryPlot(from,to,dataset,overview_dataset) { |
|
410 | function SummaryPlot(from,to,dataset,overview_dataset) { | |
411 | var initial_ranges = { |
|
411 | var initial_ranges = { | |
412 | "xaxis":{ |
|
412 | "xaxis":{ | |
413 | "from":from, |
|
413 | "from":from, | |
414 | "to":to, |
|
414 | "to":to, | |
415 | }, |
|
415 | }, | |
416 | }; |
|
416 | }; | |
417 | var dataset = dataset; |
|
417 | var dataset = dataset; | |
418 | var overview_dataset = [overview_dataset]; |
|
418 | var overview_dataset = [overview_dataset]; | |
419 | var choiceContainer = YUD.get("legend_choices"); |
|
419 | var choiceContainer = YUD.get("legend_choices"); | |
420 | var choiceContainerTable = YUD.get("legend_choices_tables"); |
|
420 | var choiceContainerTable = YUD.get("legend_choices_tables"); | |
421 | var plotContainer = YUD.get('commit_history'); |
|
421 | var plotContainer = YUD.get('commit_history'); | |
422 | var overviewContainer = YUD.get('overview'); |
|
422 | var overviewContainer = YUD.get('overview'); | |
423 |
|
423 | |||
424 | var plot_options = { |
|
424 | var plot_options = { | |
425 | bars: {show:true,align:'center',lineWidth:4}, |
|
425 | bars: {show:true,align:'center',lineWidth:4}, | |
426 | legend: {show:true, container:"legend_container"}, |
|
426 | legend: {show:true, container:"legend_container"}, | |
427 | points: {show:true,radius:0,fill:false}, |
|
427 | points: {show:true,radius:0,fill:false}, | |
428 | yaxis: {tickDecimals:0,}, |
|
428 | yaxis: {tickDecimals:0,}, | |
429 | xaxis: { |
|
429 | xaxis: { | |
430 | mode: "time", |
|
430 | mode: "time", | |
431 | timeformat: "%d/%m", |
|
431 | timeformat: "%d/%m", | |
432 | min:from, |
|
432 | min:from, | |
433 | max:to, |
|
433 | max:to, | |
434 | }, |
|
434 | }, | |
435 | grid: { |
|
435 | grid: { | |
436 | hoverable: true, |
|
436 | hoverable: true, | |
437 | clickable: true, |
|
437 | clickable: true, | |
438 | autoHighlight:true, |
|
438 | autoHighlight:true, | |
439 | color: "#999" |
|
439 | color: "#999" | |
440 | }, |
|
440 | }, | |
441 | //selection: {mode: "x"} |
|
441 | //selection: {mode: "x"} | |
442 | }; |
|
442 | }; | |
443 | var overview_options = { |
|
443 | var overview_options = { | |
444 | legend:{show:false}, |
|
444 | legend:{show:false}, | |
445 | bars: {show:true,barWidth: 2,}, |
|
445 | bars: {show:true,barWidth: 2,}, | |
446 | shadowSize: 0, |
|
446 | shadowSize: 0, | |
447 | xaxis: {mode: "time", timeformat: "%d/%m/%y",}, |
|
447 | xaxis: {mode: "time", timeformat: "%d/%m/%y",}, | |
448 | yaxis: {ticks: 3, min: 0,tickDecimals:0,}, |
|
448 | yaxis: {ticks: 3, min: 0,tickDecimals:0,}, | |
449 | grid: {color: "#999",}, |
|
449 | grid: {color: "#999",}, | |
450 | selection: {mode: "x"} |
|
450 | selection: {mode: "x"} | |
451 | }; |
|
451 | }; | |
452 |
|
452 | |||
453 | /** |
|
453 | /** | |
454 | *get dummy data needed in few places |
|
454 | *get dummy data needed in few places | |
455 | */ |
|
455 | */ | |
456 | function getDummyData(label){ |
|
456 | function getDummyData(label){ | |
457 | return {"label":label, |
|
457 | return {"label":label, | |
458 | "data":[{"time":0, |
|
458 | "data":[{"time":0, | |
459 | "commits":0, |
|
459 | "commits":0, | |
460 | "added":0, |
|
460 | "added":0, | |
461 | "changed":0, |
|
461 | "changed":0, | |
462 | "removed":0, |
|
462 | "removed":0, | |
463 | }], |
|
463 | }], | |
464 | "schema":["commits"], |
|
464 | "schema":["commits"], | |
465 | "color":'#ffffff', |
|
465 | "color":'#ffffff', | |
466 | } |
|
466 | } | |
467 | } |
|
467 | } | |
468 |
|
468 | |||
469 | /** |
|
469 | /** | |
470 | * generate checkboxes accordindly to data |
|
470 | * generate checkboxes accordindly to data | |
471 | * @param keys |
|
471 | * @param keys | |
472 | * @returns |
|
472 | * @returns | |
473 | */ |
|
473 | */ | |
474 | function generateCheckboxes(data) { |
|
474 | function generateCheckboxes(data) { | |
475 | //append checkboxes |
|
475 | //append checkboxes | |
476 | var i = 0; |
|
476 | var i = 0; | |
477 | choiceContainerTable.innerHTML = ''; |
|
477 | choiceContainerTable.innerHTML = ''; | |
478 | for(var pos in data) { |
|
478 | for(var pos in data) { | |
479 |
|
479 | |||
480 | data[pos].color = i; |
|
480 | data[pos].color = i; | |
481 | i++; |
|
481 | i++; | |
482 | if(data[pos].label != ''){ |
|
482 | if(data[pos].label != ''){ | |
483 | choiceContainerTable.innerHTML += |
|
483 | choiceContainerTable.innerHTML += | |
484 | '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \ |
|
484 | '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \ | |
485 | <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label); |
|
485 | <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label); | |
486 | } |
|
486 | } | |
487 | } |
|
487 | } | |
488 | } |
|
488 | } | |
489 |
|
489 | |||
490 | /** |
|
490 | /** | |
491 | * ToolTip show |
|
491 | * ToolTip show | |
492 | */ |
|
492 | */ | |
493 | function showTooltip(x, y, contents) { |
|
493 | function showTooltip(x, y, contents) { | |
494 | var div=document.getElementById('tooltip'); |
|
494 | var div=document.getElementById('tooltip'); | |
495 | if(!div) { |
|
495 | if(!div) { | |
496 | div = document.createElement('div'); |
|
496 | div = document.createElement('div'); | |
497 | div.id="tooltip"; |
|
497 | div.id="tooltip"; | |
498 | div.style.position="absolute"; |
|
498 | div.style.position="absolute"; | |
499 | div.style.border='1px solid #fdd'; |
|
499 | div.style.border='1px solid #fdd'; | |
500 | div.style.padding='2px'; |
|
500 | div.style.padding='2px'; | |
501 | div.style.backgroundColor='#fee'; |
|
501 | div.style.backgroundColor='#fee'; | |
502 | document.body.appendChild(div); |
|
502 | document.body.appendChild(div); | |
503 | } |
|
503 | } | |
504 | YUD.setStyle(div, 'opacity', 0); |
|
504 | YUD.setStyle(div, 'opacity', 0); | |
505 | div.innerHTML = contents; |
|
505 | div.innerHTML = contents; | |
506 | div.style.top=(y + 5) + "px"; |
|
506 | div.style.top=(y + 5) + "px"; | |
507 | div.style.left=(x + 5) + "px"; |
|
507 | div.style.left=(x + 5) + "px"; | |
508 |
|
508 | |||
509 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); |
|
509 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); | |
510 | anim.animate(); |
|
510 | anim.animate(); | |
511 | } |
|
511 | } | |
512 |
|
512 | |||
513 | /** |
|
513 | /** | |
514 | * This function will detect if selected period has some changesets |
|
514 | * This function will detect if selected period has some changesets | |
515 | for this user if it does this data is then pushed for displaying |
|
515 | for this user if it does this data is then pushed for displaying | |
516 | Additionally it will only display users that are selected by the checkbox |
|
516 | Additionally it will only display users that are selected by the checkbox | |
517 | */ |
|
517 | */ | |
518 | function getDataAccordingToRanges(ranges) { |
|
518 | function getDataAccordingToRanges(ranges) { | |
519 |
|
519 | |||
520 | var data = []; |
|
520 | var data = []; | |
521 | var new_dataset = {}; |
|
521 | var new_dataset = {}; | |
522 | var keys = []; |
|
522 | var keys = []; | |
523 | var max_commits = 0; |
|
523 | var max_commits = 0; | |
524 | for(var key in dataset){ |
|
524 | for(var key in dataset){ | |
525 |
|
525 | |||
526 | for(var ds in dataset[key].data){ |
|
526 | for(var ds in dataset[key].data){ | |
527 | commit_data = dataset[key].data[ds]; |
|
527 | commit_data = dataset[key].data[ds]; | |
528 | if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){ |
|
528 | if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){ | |
529 |
|
529 | |||
530 | if(new_dataset[key] === undefined){ |
|
530 | if(new_dataset[key] === undefined){ | |
531 | new_dataset[key] = {data:[],schema:["commits"],label:key}; |
|
531 | new_dataset[key] = {data:[],schema:["commits"],label:key}; | |
532 | } |
|
532 | } | |
533 | new_dataset[key].data.push(commit_data); |
|
533 | new_dataset[key].data.push(commit_data); | |
534 | } |
|
534 | } | |
535 | } |
|
535 | } | |
536 | if (new_dataset[key] !== undefined){ |
|
536 | if (new_dataset[key] !== undefined){ | |
537 | data.push(new_dataset[key]); |
|
537 | data.push(new_dataset[key]); | |
538 | } |
|
538 | } | |
539 | } |
|
539 | } | |
540 |
|
540 | |||
541 | if (data.length > 0){ |
|
541 | if (data.length > 0){ | |
542 | return data; |
|
542 | return data; | |
543 | } |
|
543 | } | |
544 | else{ |
|
544 | else{ | |
545 | //just return dummy data for graph to plot itself |
|
545 | //just return dummy data for graph to plot itself | |
546 | return [getDummyData('')]; |
|
546 | return [getDummyData('')]; | |
547 | } |
|
547 | } | |
548 | } |
|
548 | } | |
549 |
|
549 | |||
550 | /** |
|
550 | /** | |
551 | * redraw using new checkbox data |
|
551 | * redraw using new checkbox data | |
552 | */ |
|
552 | */ | |
553 | function plotchoiced(e,args){ |
|
553 | function plotchoiced(e,args){ | |
554 | var cur_data = args[0]; |
|
554 | var cur_data = args[0]; | |
555 | var cur_ranges = args[1]; |
|
555 | var cur_ranges = args[1]; | |
556 |
|
556 | |||
557 | var new_data = []; |
|
557 | var new_data = []; | |
558 | var inputs = choiceContainer.getElementsByTagName("input"); |
|
558 | var inputs = choiceContainer.getElementsByTagName("input"); | |
559 |
|
559 | |||
560 | //show only checked labels |
|
560 | //show only checked labels | |
561 | for(var i=0; i<inputs.length; i++) { |
|
561 | for(var i=0; i<inputs.length; i++) { | |
562 | var checkbox_key = inputs[i].name; |
|
562 | var checkbox_key = inputs[i].name; | |
563 |
|
563 | |||
564 | if(inputs[i].checked){ |
|
564 | if(inputs[i].checked){ | |
565 | for(var d in cur_data){ |
|
565 | for(var d in cur_data){ | |
566 | if(cur_data[d].label == checkbox_key){ |
|
566 | if(cur_data[d].label == checkbox_key){ | |
567 | new_data.push(cur_data[d]); |
|
567 | new_data.push(cur_data[d]); | |
568 | } |
|
568 | } | |
569 | } |
|
569 | } | |
570 | } |
|
570 | } | |
571 | else{ |
|
571 | else{ | |
572 | //push dummy data to not hide the label |
|
572 | //push dummy data to not hide the label | |
573 | new_data.push(getDummyData(checkbox_key)); |
|
573 | new_data.push(getDummyData(checkbox_key)); | |
574 | } |
|
574 | } | |
575 | } |
|
575 | } | |
576 |
|
576 | |||
577 | var new_options = YAHOO.lang.merge(plot_options, { |
|
577 | var new_options = YAHOO.lang.merge(plot_options, { | |
578 | xaxis: { |
|
578 | xaxis: { | |
579 | min: cur_ranges.xaxis.from, |
|
579 | min: cur_ranges.xaxis.from, | |
580 | max: cur_ranges.xaxis.to, |
|
580 | max: cur_ranges.xaxis.to, | |
581 | mode:"time", |
|
581 | mode:"time", | |
582 | timeformat: "%d/%m", |
|
582 | timeformat: "%d/%m", | |
583 | }, |
|
583 | }, | |
584 | }); |
|
584 | }); | |
585 | if (!new_data){ |
|
585 | if (!new_data){ | |
586 | new_data = [[0,1]]; |
|
586 | new_data = [[0,1]]; | |
587 | } |
|
587 | } | |
588 | // do the zooming |
|
588 | // do the zooming | |
589 | plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); |
|
589 | plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); | |
590 |
|
590 | |||
591 | plot.subscribe("plotselected", plotselected); |
|
591 | plot.subscribe("plotselected", plotselected); | |
592 |
|
592 | |||
593 | //resubscribe plothover |
|
593 | //resubscribe plothover | |
594 | plot.subscribe("plothover", plothover); |
|
594 | plot.subscribe("plothover", plothover); | |
595 |
|
595 | |||
596 | // don't fire event on the overview to prevent eternal loop |
|
596 | // don't fire event on the overview to prevent eternal loop | |
597 | overview.setSelection(cur_ranges, true); |
|
597 | overview.setSelection(cur_ranges, true); | |
598 |
|
598 | |||
599 | } |
|
599 | } | |
600 |
|
600 | |||
601 | /** |
|
601 | /** | |
602 | * plot only selected items from overview |
|
602 | * plot only selected items from overview | |
603 | * @param ranges |
|
603 | * @param ranges | |
604 | * @returns |
|
604 | * @returns | |
605 | */ |
|
605 | */ | |
606 | function plotselected(ranges,cur_data) { |
|
606 | function plotselected(ranges,cur_data) { | |
607 | //updates the data for new plot |
|
607 | //updates the data for new plot | |
608 | var data = getDataAccordingToRanges(ranges); |
|
608 | var data = getDataAccordingToRanges(ranges); | |
609 | generateCheckboxes(data); |
|
609 | generateCheckboxes(data); | |
610 |
|
610 | |||
611 | var new_options = YAHOO.lang.merge(plot_options, { |
|
611 | var new_options = YAHOO.lang.merge(plot_options, { | |
612 | xaxis: { |
|
612 | xaxis: { | |
613 | min: ranges.xaxis.from, |
|
613 | min: ranges.xaxis.from, | |
614 | max: ranges.xaxis.to, |
|
614 | max: ranges.xaxis.to, | |
615 | mode:"time", |
|
615 | mode:"time", | |
616 | timeformat: "%d/%m", |
|
616 | timeformat: "%d/%m", | |
617 | }, |
|
617 | }, | |
618 | }); |
|
618 | }); | |
619 | // do the zooming |
|
619 | // do the zooming | |
620 | plot = YAHOO.widget.Flot(plotContainer, data, new_options); |
|
620 | plot = YAHOO.widget.Flot(plotContainer, data, new_options); | |
621 |
|
621 | |||
622 | plot.subscribe("plotselected", plotselected); |
|
622 | plot.subscribe("plotselected", plotselected); | |
623 |
|
623 | |||
624 | //resubscribe plothover |
|
624 | //resubscribe plothover | |
625 | plot.subscribe("plothover", plothover); |
|
625 | plot.subscribe("plothover", plothover); | |
626 |
|
626 | |||
627 | // don't fire event on the overview to prevent eternal loop |
|
627 | // don't fire event on the overview to prevent eternal loop | |
628 | overview.setSelection(ranges, true); |
|
628 | overview.setSelection(ranges, true); | |
629 |
|
629 | |||
630 | //resubscribe choiced |
|
630 | //resubscribe choiced | |
631 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]); |
|
631 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]); | |
632 | } |
|
632 | } | |
633 |
|
633 | |||
634 | var previousPoint = null; |
|
634 | var previousPoint = null; | |
635 |
|
635 | |||
636 | function plothover(o) { |
|
636 | function plothover(o) { | |
637 | var pos = o.pos; |
|
637 | var pos = o.pos; | |
638 | var item = o.item; |
|
638 | var item = o.item; | |
639 |
|
639 | |||
640 | //YUD.get("x").innerHTML = pos.x.toFixed(2); |
|
640 | //YUD.get("x").innerHTML = pos.x.toFixed(2); | |
641 | //YUD.get("y").innerHTML = pos.y.toFixed(2); |
|
641 | //YUD.get("y").innerHTML = pos.y.toFixed(2); | |
642 | if (item) { |
|
642 | if (item) { | |
643 | if (previousPoint != item.datapoint) { |
|
643 | if (previousPoint != item.datapoint) { | |
644 | previousPoint = item.datapoint; |
|
644 | previousPoint = item.datapoint; | |
645 |
|
645 | |||
646 | var tooltip = YUD.get("tooltip"); |
|
646 | var tooltip = YUD.get("tooltip"); | |
647 | if(tooltip) { |
|
647 | if(tooltip) { | |
648 | tooltip.parentNode.removeChild(tooltip); |
|
648 | tooltip.parentNode.removeChild(tooltip); | |
649 | } |
|
649 | } | |
650 | var x = item.datapoint.x.toFixed(2); |
|
650 | var x = item.datapoint.x.toFixed(2); | |
651 | var y = item.datapoint.y.toFixed(2); |
|
651 | var y = item.datapoint.y.toFixed(2); | |
652 |
|
652 | |||
653 | if (!item.series.label){ |
|
653 | if (!item.series.label){ | |
654 | item.series.label = 'commits'; |
|
654 | item.series.label = 'commits'; | |
655 | } |
|
655 | } | |
656 | var d = new Date(x*1000); |
|
656 | var d = new Date(x*1000); | |
657 | var fd = d.toDateString() |
|
657 | var fd = d.toDateString() | |
658 | var nr_commits = parseInt(y); |
|
658 | var nr_commits = parseInt(y); | |
659 |
|
659 | |||
660 | var cur_data = dataset[item.series.label].data[item.dataIndex]; |
|
660 | var cur_data = dataset[item.series.label].data[item.dataIndex]; | |
661 | var added = cur_data.added; |
|
661 | var added = cur_data.added; | |
662 | var changed = cur_data.changed; |
|
662 | var changed = cur_data.changed; | |
663 | var removed = cur_data.removed; |
|
663 | var removed = cur_data.removed; | |
664 |
|
664 | |||
665 | var nr_commits_suffix = " ${_('commits')} "; |
|
665 | var nr_commits_suffix = " ${_('commits')} "; | |
666 | var added_suffix = " ${_('files added')} "; |
|
666 | var added_suffix = " ${_('files added')} "; | |
667 | var changed_suffix = " ${_('files changed')} "; |
|
667 | var changed_suffix = " ${_('files changed')} "; | |
668 | var removed_suffix = " ${_('files removed')} "; |
|
668 | var removed_suffix = " ${_('files removed')} "; | |
669 |
|
669 | |||
670 |
|
670 | |||
671 | if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";} |
|
671 | if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";} | |
672 | if(added==1){added_suffix=" ${_('file added')} ";} |
|
672 | if(added==1){added_suffix=" ${_('file added')} ";} | |
673 | if(changed==1){changed_suffix=" ${_('file changed')} ";} |
|
673 | if(changed==1){changed_suffix=" ${_('file changed')} ";} | |
674 | if(removed==1){removed_suffix=" ${_('file removed')} ";} |
|
674 | if(removed==1){removed_suffix=" ${_('file removed')} ";} | |
675 |
|
675 | |||
676 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd |
|
676 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd | |
677 | +'<br/>'+ |
|
677 | +'<br/>'+ | |
678 | nr_commits + nr_commits_suffix+'<br/>'+ |
|
678 | nr_commits + nr_commits_suffix+'<br/>'+ | |
679 | added + added_suffix +'<br/>'+ |
|
679 | added + added_suffix +'<br/>'+ | |
680 | changed + changed_suffix + '<br/>'+ |
|
680 | changed + changed_suffix + '<br/>'+ | |
681 | removed + removed_suffix + '<br/>'); |
|
681 | removed + removed_suffix + '<br/>'); | |
682 | } |
|
682 | } | |
683 | } |
|
683 | } | |
684 | else { |
|
684 | else { | |
685 | var tooltip = YUD.get("tooltip"); |
|
685 | var tooltip = YUD.get("tooltip"); | |
686 |
|
686 | |||
687 | if(tooltip) { |
|
687 | if(tooltip) { | |
688 | tooltip.parentNode.removeChild(tooltip); |
|
688 | tooltip.parentNode.removeChild(tooltip); | |
689 | } |
|
689 | } | |
690 | previousPoint = null; |
|
690 | previousPoint = null; | |
691 | } |
|
691 | } | |
692 | } |
|
692 | } | |
693 |
|
693 | |||
694 | /** |
|
694 | /** | |
695 | * MAIN EXECUTION |
|
695 | * MAIN EXECUTION | |
696 | */ |
|
696 | */ | |
697 |
|
697 | |||
698 | var data = getDataAccordingToRanges(initial_ranges); |
|
698 | var data = getDataAccordingToRanges(initial_ranges); | |
699 | generateCheckboxes(data); |
|
699 | generateCheckboxes(data); | |
700 |
|
700 | |||
701 | //main plot |
|
701 | //main plot | |
702 | var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); |
|
702 | var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); | |
703 |
|
703 | |||
704 | //overview |
|
704 | //overview | |
705 | var overview = YAHOO.widget.Flot(overviewContainer, |
|
705 | var overview = YAHOO.widget.Flot(overviewContainer, | |
706 | overview_dataset, overview_options); |
|
706 | overview_dataset, overview_options); | |
707 |
|
707 | |||
708 | //show initial selection on overview |
|
708 | //show initial selection on overview | |
709 | overview.setSelection(initial_ranges); |
|
709 | overview.setSelection(initial_ranges); | |
710 |
|
710 | |||
711 | plot.subscribe("plotselected", plotselected); |
|
711 | plot.subscribe("plotselected", plotselected); | |
712 | plot.subscribe("plothover", plothover) |
|
712 | plot.subscribe("plothover", plothover) | |
713 |
|
713 | |||
714 | overview.subscribe("plotselected", function (ranges) { |
|
714 | overview.subscribe("plotselected", function (ranges) { | |
715 | plot.setSelection(ranges); |
|
715 | plot.setSelection(ranges); | |
716 | }); |
|
716 | }); | |
717 |
|
717 | |||
718 | // user choices on overview |
|
718 | // user choices on overview | |
719 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]); |
|
719 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]); | |
720 | } |
|
720 | } | |
721 | SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n}); |
|
721 | SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n}); | |
722 | </script> |
|
722 | </script> | |
723 | %endif |
|
723 | %endif | |
724 |
|
724 | |||
725 | </%def> |
|
725 | </%def> |
@@ -1,93 +1,93 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Tags') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Tags') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
10 | <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" value="${_('quick filter...')}"/> | |
11 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
11 | ${h.link_to(_(u'Home'),h.url('/'))} | |
12 | » |
|
12 | » | |
13 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
13 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
14 | » |
|
14 | » | |
15 | ${_('tags')} |
|
15 | ${_('tags')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 | ${self.menu('tags')} |
|
19 | ${self.menu('tags')} | |
20 | </%def> |
|
20 | </%def> | |
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <div class="box"> |
|
22 | <div class="box"> | |
23 | <!-- box / title --> |
|
23 | <!-- box / title --> | |
24 | <div class="title"> |
|
24 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
25 | ${self.breadcrumbs()} | |
26 | </div> |
|
26 | </div> | |
27 | <!-- end box / title --> |
|
27 | <!-- end box / title --> | |
28 | %if c.repo_tags: |
|
28 | %if c.repo_tags: | |
29 | <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;vertical-align: right;text-align: right;"><a href="#" class="ui-btn small">${_('Compare tags')}</a></div> |
|
29 | <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;vertical-align: right;text-align: right;"><a href="#" class="ui-btn small">${_('Compare tags')}</a></div> | |
30 | %endif |
|
30 | %endif | |
31 | <div class="table"> |
|
31 | <div class="table"> | |
32 | <%include file='tags_data.html'/> |
|
32 | <%include file='tags_data.html'/> | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | <script type="text/javascript"> |
|
35 | <script type="text/javascript"> | |
36 | YUE.on('compare_tags','click',function(e){ |
|
36 | YUE.on('compare_tags','click',function(e){ | |
37 | YUE.preventDefault(e); |
|
37 | YUE.preventDefault(e); | |
38 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
38 | var org = YUQ('input[name=compare_org]:checked')[0]; | |
39 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
39 | var other = YUQ('input[name=compare_other]:checked')[0]; | |
40 |
|
40 | |||
41 | if(org && other){ |
|
41 | if(org && other){ | |
42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='tag',org_ref='__ORG__',other_ref_type='tag',other_ref='__OTHER__')}"; |
|
42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='tag',org_ref='__ORG__',other_ref_type='tag',other_ref='__OTHER__')}"; | |
43 | var u = compare_url.replace('__ORG__',org.value) |
|
43 | var u = compare_url.replace('__ORG__',org.value) | |
44 | .replace('__OTHER__',other.value); |
|
44 | .replace('__OTHER__',other.value); | |
45 | window.location=u; |
|
45 | window.location=u; | |
46 | } |
|
46 | } | |
47 | }); |
|
47 | }); | |
48 |
|
48 | |||
49 | // main table sorting |
|
49 | // main table sorting | |
50 | var myColumnDefs = [ |
|
50 | var myColumnDefs = [ | |
51 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
51 | {key:"name",label:"${_('Name')}",sortable:true}, | |
52 | {key:"date",label:"${_('Date')}",sortable:true, |
|
52 | {key:"date",label:"${_('Date')}",sortable:true, | |
53 | sortOptions: { sortFunction: dateSort }}, |
|
53 | sortOptions: { sortFunction: dateSort }}, | |
54 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
54 | {key:"author",label:"${_('Author')}",sortable:true}, | |
55 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
55 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
56 | sortOptions: { sortFunction: revisionSort }}, |
|
56 | sortOptions: { sortFunction: revisionSort }}, | |
57 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
57 | {key:"compare",label:"${_('Compare')}",sortable:false,}, | |
58 | ]; |
|
58 | ]; | |
59 |
|
59 | |||
60 | var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data")); |
|
60 | var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data")); | |
61 |
|
61 | |||
62 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
62 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
63 |
|
63 | |||
64 | myDataSource.responseSchema = { |
|
64 | myDataSource.responseSchema = { | |
65 | fields: [ |
|
65 | fields: [ | |
66 | {key:"name"}, |
|
66 | {key:"name"}, | |
67 | {key:"date"}, |
|
67 | {key:"date"}, | |
68 | {key:"author"}, |
|
68 | {key:"author"}, | |
69 | {key:"revision"}, |
|
69 | {key:"revision"}, | |
70 | {key:"compare"}, |
|
70 | {key:"compare"}, | |
71 | ] |
|
71 | ] | |
72 | }; |
|
72 | }; | |
73 |
|
73 | |||
74 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
74 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
75 | { |
|
75 | { | |
76 | sortedBy:{key:"name",dir:"asc"}, |
|
76 | sortedBy:{key:"name",dir:"asc"}, | |
77 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
77 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
78 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
78 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
79 | MSG_EMPTY:"${_('No records found.')}", |
|
79 | MSG_EMPTY:"${_('No records found.')}", | |
80 | MSG_ERROR:"${_('Data error.')}", |
|
80 | MSG_ERROR:"${_('Data error.')}", | |
81 | MSG_LOADING:"${_('Loading...')}", |
|
81 | MSG_LOADING:"${_('Loading...')}", | |
82 | } |
|
82 | } | |
83 | ); |
|
83 | ); | |
84 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
84 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
85 | tooltip_activate(); |
|
85 | tooltip_activate(); | |
86 | var func = function(node){ |
|
86 | var func = function(node){ | |
87 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
87 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
88 | } |
|
88 | } | |
89 | q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func); |
|
89 | q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func); | |
90 | }); |
|
90 | }); | |
91 |
|
91 | |||
92 | </script> |
|
92 | </script> | |
93 | </%def> |
|
93 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now