Show More
@@ -1,55 +1,55 | |||||
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 |
${_('Admin journal')} |
|
5 | ${_('Admin journal')} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | <form id="filter_form"> |
|
9 | <form id="filter_form"> | |
10 | <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('journal filter...')}"/> |
|
10 | <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('journal filter...')}"/> | |
11 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> |
|
11 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> | |
12 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> |
|
12 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> | |
13 | ${_('Admin journal')} - ${ungettext('%s entry', '%s entries', c.users_log.item_count) % (c.users_log.item_count)} |
|
13 | ${_('Admin journal')} - ${ungettext('%s entry', '%s entries', c.users_log.item_count) % (c.users_log.item_count)} | |
14 | </form> |
|
14 | </form> | |
15 | ${h.end_form()} |
|
15 | ${h.end_form()} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 | ${self.menu('admin')} |
|
19 | ${self.menu('admin')} | |
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 | <div id="user_log"> |
|
29 | <div id="user_log"> | |
30 | ${c.log_data} |
|
30 | ${c.log_data} | |
31 | </div> |
|
31 | </div> | |
32 | </div> |
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 |
|
34 | |||
35 | <script> |
|
35 | <script> | |
36 | YUE.on('j_filter','click',function(){ |
|
36 | YUE.on('j_filter','click',function(){ | |
37 | var jfilter = YUD.get('j_filter'); |
|
37 | var jfilter = YUD.get('j_filter'); | |
38 | if(YUD.hasClass(jfilter, 'initial')){ |
|
38 | if(YUD.hasClass(jfilter, 'initial')){ | |
39 | jfilter.value = ''; |
|
39 | jfilter.value = ''; | |
40 | } |
|
40 | } | |
41 | }); |
|
41 | }); | |
42 | var fix_j_filter_width = function(len){ |
|
42 | var fix_j_filter_width = function(len){ | |
43 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); |
|
43 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); | |
44 | } |
|
44 | } | |
45 | YUE.on('j_filter','keyup',function(){ |
|
45 | YUE.on('j_filter','keyup',function(){ | |
46 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
46 | fix_j_filter_width(YUD.get('j_filter').value.length); | |
47 | }); |
|
47 | }); | |
48 | YUE.on('filter_form','submit',function(e){ |
|
48 | YUE.on('filter_form','submit',function(e){ | |
49 | YUE.preventDefault(e) |
|
49 | YUE.preventDefault(e) | |
50 | var val = YUD.get('j_filter').value; |
|
50 | var val = YUD.get('j_filter').value; | |
51 | window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val); |
|
51 | window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val); | |
52 | }); |
|
52 | }); | |
53 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
53 | fix_j_filter_width(YUD.get('j_filter').value.length); | |
54 | </script> |
|
54 | </script> | |
55 | </%def> |
|
55 | </%def> |
@@ -1,93 +1,93 | |||||
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')} |
|
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 | ${_('defaults')} |
|
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 | |||||
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')} |
|
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 | ${_('ldap')} |
|
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,65 +1,65 | |||||
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 |
${_('My Notifications')} ${c.rhodecode_user.username} |
|
5 | ${_('My Notifications')} ${c.rhodecode_user.username} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${_('My Notifications')} |
|
9 | ${_('My Notifications')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
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 | ##<ul class="links"> |
|
21 | ##<ul class="links"> | |
22 | ## <li> |
|
22 | ## <li> | |
23 | ## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> |
|
23 | ## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> | |
24 | ## </li> |
|
24 | ## </li> | |
25 | ##</ul> |
|
25 | ##</ul> | |
26 | </div> |
|
26 | </div> | |
27 |
|
27 | |||
28 | <div style="padding:14px 18px;text-align: right;float:left"> |
|
28 | <div style="padding:14px 18px;text-align: right;float:left"> | |
29 | <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span> |
|
29 | <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span> | |
30 | <span id='comment' class="ui-btn"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> |
|
30 | <span id='comment' class="ui-btn"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> | |
31 | <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span> |
|
31 | <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span> | |
32 | </div> |
|
32 | </div> | |
33 | %if c.notifications: |
|
33 | %if c.notifications: | |
34 | <div style="padding:14px 18px;text-align: right;float:right"> |
|
34 | <div style="padding:14px 18px;text-align: right;float:right"> | |
35 | <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span> |
|
35 | <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span> | |
36 | </div> |
|
36 | </div> | |
37 | %endif |
|
37 | %endif | |
38 | <div id='notification_data'> |
|
38 | <div id='notification_data'> | |
39 | <%include file='notifications_data.html'/> |
|
39 | <%include file='notifications_data.html'/> | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 | <script type="text/javascript"> |
|
42 | <script type="text/javascript"> | |
43 | var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; |
|
43 | var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; | |
44 | var run = function(){ |
|
44 | var run = function(){ | |
45 | YUE.on(YUQ('.delete-notification'),'click',function(e){ |
|
45 | YUE.on(YUQ('.delete-notification'),'click',function(e){ | |
46 | var notification_id = e.currentTarget.id; |
|
46 | var notification_id = e.currentTarget.id; | |
47 | deleteNotification(url_action,notification_id) |
|
47 | deleteNotification(url_action,notification_id) | |
48 | }) |
|
48 | }) | |
49 | YUE.on(YUQ('.read-notification'),'click',function(e){ |
|
49 | YUE.on(YUQ('.read-notification'),'click',function(e){ | |
50 | var notification_id = e.currentTarget.id; |
|
50 | var notification_id = e.currentTarget.id; | |
51 | readNotification(url_action,notification_id) |
|
51 | readNotification(url_action,notification_id) | |
52 | }) |
|
52 | }) | |
53 | } |
|
53 | } | |
54 | run() |
|
54 | run() | |
55 | YUE.on('mark_all_read','click',function(e){ |
|
55 | YUE.on('mark_all_read','click',function(e){ | |
56 | var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}"; |
|
56 | var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}"; | |
57 | ypjax(url,'notification_data',function(){run()}); |
|
57 | ypjax(url,'notification_data',function(){run()}); | |
58 | }) |
|
58 | }) | |
59 |
|
59 | |||
60 | var current_filter = "${c.current_filter}"; |
|
60 | var current_filter = "${c.current_filter}"; | |
61 | if (YUD.get(current_filter)){ |
|
61 | if (YUD.get(current_filter)){ | |
62 | YUD.addClass(current_filter, 'active'); |
|
62 | YUD.addClass(current_filter, 'active'); | |
63 | } |
|
63 | } | |
64 | </script> |
|
64 | </script> | |
65 | </%def> |
|
65 | </%def> |
@@ -1,59 +1,59 | |||||
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 |
${_('Show notification')} ${c.rhodecode_user.username} |
|
5 | ${_('Show notification')} ${c.rhodecode_user.username} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Notifications'),h.url('notifications'))} |
|
9 | ${h.link_to(_('Notifications'),h.url('notifications'))} | |
10 | » |
|
10 | » | |
11 | ${_('Show notification')} |
|
11 | ${_('Show notification')} | |
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 | ##<ul class="links"> |
|
23 | ##<ul class="links"> | |
24 | ## <li> |
|
24 | ## <li> | |
25 | ## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> |
|
25 | ## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> | |
26 | ## </li> |
|
26 | ## </li> | |
27 | ##</ul> |
|
27 | ##</ul> | |
28 | </div> |
|
28 | </div> | |
29 | <div class="table"> |
|
29 | <div class="table"> | |
30 | <div id="notification_${c.notification.notification_id}"> |
|
30 | <div id="notification_${c.notification.notification_id}"> | |
31 | <div class="notification-header"> |
|
31 | <div class="notification-header"> | |
32 | <div class="gravatar"> |
|
32 | <div class="gravatar"> | |
33 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.notification.created_by_user.email),24)}"/> |
|
33 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.notification.created_by_user.email),24)}"/> | |
34 | </div> |
|
34 | </div> | |
35 | <div class="desc"> |
|
35 | <div class="desc"> | |
36 | ${c.notification.description} |
|
36 | ${c.notification.description} | |
37 | </div> |
|
37 | </div> | |
38 | <div class="delete-notifications"> |
|
38 | <div class="delete-notifications"> | |
39 | <span id="${c.notification.notification_id}" class="delete-notification delete_icon action"></span> |
|
39 | <span id="${c.notification.notification_id}" class="delete-notification delete_icon action"></span> | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 | <div class="notification-body"> |
|
42 | <div class="notification-body"> | |
43 | <div class="notification-subject">${h.literal(c.notification.subject)}</div> |
|
43 | <div class="notification-subject">${h.literal(c.notification.subject)}</div> | |
44 | %if c.notification.body: |
|
44 | %if c.notification.body: | |
45 | ${h.rst_w_mentions(c.notification.body)} |
|
45 | ${h.rst_w_mentions(c.notification.body)} | |
46 | %endif |
|
46 | %endif | |
47 | </div> |
|
47 | </div> | |
48 | </div> |
|
48 | </div> | |
49 | </div> |
|
49 | </div> | |
50 | </div> |
|
50 | </div> | |
51 | <script type="text/javascript"> |
|
51 | <script type="text/javascript"> | |
52 | var url = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; |
|
52 | var url = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; | |
53 | var main = "${url('notifications')}"; |
|
53 | var main = "${url('notifications')}"; | |
54 | YUE.on(YUQ('.delete-notification'),'click',function(e){ |
|
54 | YUE.on(YUQ('.delete-notification'),'click',function(e){ | |
55 | var notification_id = e.currentTarget.id; |
|
55 | var notification_id = e.currentTarget.id; | |
56 | deleteNotification(url,notification_id,[function(){window.location=main}]) |
|
56 | deleteNotification(url,notification_id,[function(){window.location=main}]) | |
57 | }) |
|
57 | }) | |
58 | </script> |
|
58 | </script> | |
59 | </%def> |
|
59 | </%def> |
@@ -1,215 +1,215 | |||||
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')} |
|
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 | ${_('permissions')} |
|
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 repository groups 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 repository groups 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,34 +1,34 | |||||
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 |
${_('Add repository')} |
|
5 | ${_('Add repository')} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | %if c.rhodecode_user.is_admin: |
|
9 | %if c.rhodecode_user.is_admin: | |
10 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(_('Repositories'),h.url('repos'))} |
|
12 | ${h.link_to(_('Repositories'),h.url('repos'))} | |
13 | %else: |
|
13 | %else: | |
14 | ${_('Admin')} |
|
14 | ${_('Admin')} | |
15 | » |
|
15 | » | |
16 | ${_('Repositories')} |
|
16 | ${_('Repositories')} | |
17 | %endif |
|
17 | %endif | |
18 | » |
|
18 | » | |
19 | ${_('add new')} |
|
19 | ${_('add new')} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="page_nav()"> |
|
22 | <%def name="page_nav()"> | |
23 | ${self.menu('admin')} |
|
23 | ${self.menu('admin')} | |
24 | </%def> |
|
24 | </%def> | |
25 |
|
25 | |||
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 | <%include file="repo_add_base.html"/> |
|
32 | <%include file="repo_add_base.html"/> | |
33 | </div> |
|
33 | </div> | |
34 | </%def> |
|
34 | </%def> |
@@ -1,374 +1,374 | |||||
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} |
|
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_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} |
|
11 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} | |
12 | » |
|
12 | » | |
13 | ${_('Settings')} |
|
13 | ${_('Settings')} | |
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 | ${self.context_bar('options')} |
|
21 | ${self.context_bar('options')} | |
22 | <div class="box box-left"> |
|
22 | <div class="box box-left"> | |
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 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')} |
|
27 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')} | |
28 | <div class="form"> |
|
28 | <div class="form"> | |
29 | <!-- fields --> |
|
29 | <!-- fields --> | |
30 | <div class="fields"> |
|
30 | <div class="fields"> | |
31 | <div class="field"> |
|
31 | <div class="field"> | |
32 | <div class="label"> |
|
32 | <div class="label"> | |
33 | <label for="repo_name">${_('Name')}:</label> |
|
33 | <label for="repo_name">${_('Name')}:</label> | |
34 | </div> |
|
34 | </div> | |
35 | <div class="input"> |
|
35 | <div class="input"> | |
36 | ${h.text('repo_name',class_="medium")} |
|
36 | ${h.text('repo_name',class_="medium")} | |
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="clone_uri">${_('Clone uri')}:</label> |
|
41 | <label for="clone_uri">${_('Clone uri')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 | <div class="input"> |
|
43 | <div class="input"> | |
44 | ${h.text('clone_uri',class_="medium")} |
|
44 | ${h.text('clone_uri',class_="medium")} | |
45 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
45 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</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">${_('Optional select a group to put this repository into.')}</span> |
|
54 | <span class="help-block">${_('Optional 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"> |
|
58 | <div class="label"> | |
59 | <label for="repo_type">${_('Type')}:</label> |
|
59 | <label for="repo_type">${_('Type')}:</label> | |
60 | </div> |
|
60 | </div> | |
61 | <div class="input"> |
|
61 | <div class="input"> | |
62 | ${h.select('repo_type','hg',c.backends,class_="medium")} |
|
62 | ${h.select('repo_type','hg',c.backends,class_="medium")} | |
63 | </div> |
|
63 | </div> | |
64 | </div> |
|
64 | </div> | |
65 | <div class="field"> |
|
65 | <div class="field"> | |
66 | <div class="label"> |
|
66 | <div class="label"> | |
67 | <label for="repo_landing_rev">${_('Landing revision')}:</label> |
|
67 | <label for="repo_landing_rev">${_('Landing revision')}:</label> | |
68 | </div> |
|
68 | </div> | |
69 | <div class="input"> |
|
69 | <div class="input"> | |
70 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
70 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} | |
71 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
71 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
72 | </div> |
|
72 | </div> | |
73 | </div> |
|
73 | </div> | |
74 | <div class="field"> |
|
74 | <div class="field"> | |
75 | <div class="label label-textarea"> |
|
75 | <div class="label label-textarea"> | |
76 | <label for="repo_description">${_('Description')}:</label> |
|
76 | <label for="repo_description">${_('Description')}:</label> | |
77 | </div> |
|
77 | </div> | |
78 | <div class="textarea text-area editor"> |
|
78 | <div class="textarea text-area editor"> | |
79 | ${h.textarea('repo_description')} |
|
79 | ${h.textarea('repo_description')} | |
80 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
80 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 |
|
83 | |||
84 | <div class="field"> |
|
84 | <div class="field"> | |
85 | <div class="label label-checkbox"> |
|
85 | <div class="label label-checkbox"> | |
86 | <label for="repo_private">${_('Private repository')}:</label> |
|
86 | <label for="repo_private">${_('Private repository')}:</label> | |
87 | </div> |
|
87 | </div> | |
88 | <div class="checkboxes"> |
|
88 | <div class="checkboxes"> | |
89 | ${h.checkbox('repo_private',value="True")} |
|
89 | ${h.checkbox('repo_private',value="True")} | |
90 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
90 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 | <div class="field"> |
|
93 | <div class="field"> | |
94 | <div class="label label-checkbox"> |
|
94 | <div class="label label-checkbox"> | |
95 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> |
|
95 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> | |
96 | </div> |
|
96 | </div> | |
97 | <div class="checkboxes"> |
|
97 | <div class="checkboxes"> | |
98 | ${h.checkbox('repo_enable_statistics',value="True")} |
|
98 | ${h.checkbox('repo_enable_statistics',value="True")} | |
99 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
99 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> | |
100 | </div> |
|
100 | </div> | |
101 | </div> |
|
101 | </div> | |
102 | <div class="field"> |
|
102 | <div class="field"> | |
103 | <div class="label label-checkbox"> |
|
103 | <div class="label label-checkbox"> | |
104 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> |
|
104 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> | |
105 | </div> |
|
105 | </div> | |
106 | <div class="checkboxes"> |
|
106 | <div class="checkboxes"> | |
107 | ${h.checkbox('repo_enable_downloads',value="True")} |
|
107 | ${h.checkbox('repo_enable_downloads',value="True")} | |
108 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
108 | <span class="help-block">${_('Enable download menu on summary page.')}</span> | |
109 | </div> |
|
109 | </div> | |
110 | </div> |
|
110 | </div> | |
111 | <div class="field"> |
|
111 | <div class="field"> | |
112 | <div class="label label-checkbox"> |
|
112 | <div class="label label-checkbox"> | |
113 | <label for="repo_enable_locking">${_('Enable locking')}:</label> |
|
113 | <label for="repo_enable_locking">${_('Enable locking')}:</label> | |
114 | </div> |
|
114 | </div> | |
115 | <div class="checkboxes"> |
|
115 | <div class="checkboxes"> | |
116 | ${h.checkbox('repo_enable_locking',value="True")} |
|
116 | ${h.checkbox('repo_enable_locking',value="True")} | |
117 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
117 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> | |
118 | </div> |
|
118 | </div> | |
119 | </div> |
|
119 | </div> | |
120 | <div class="field"> |
|
120 | <div class="field"> | |
121 | <div class="label"> |
|
121 | <div class="label"> | |
122 | <label for="user">${_('Owner')}:</label> |
|
122 | <label for="user">${_('Owner')}:</label> | |
123 | </div> |
|
123 | </div> | |
124 | <div class="input input-medium ac"> |
|
124 | <div class="input input-medium ac"> | |
125 | <div class="perm_ac"> |
|
125 | <div class="perm_ac"> | |
126 | ${h.text('user',class_='yui-ac-input')} |
|
126 | ${h.text('user',class_='yui-ac-input')} | |
127 | <span class="help-block">${_('Change owner of this repository.')}</span> |
|
127 | <span class="help-block">${_('Change owner of this repository.')}</span> | |
128 | <div id="owner_container"></div> |
|
128 | <div id="owner_container"></div> | |
129 | </div> |
|
129 | </div> | |
130 | </div> |
|
130 | </div> | |
131 | </div> |
|
131 | </div> | |
132 | %if c.visual.repository_fields: |
|
132 | %if c.visual.repository_fields: | |
133 | ## EXTRA FIELDS |
|
133 | ## EXTRA FIELDS | |
134 | %for field in c.repo_fields: |
|
134 | %for field in c.repo_fields: | |
135 | <div class="field"> |
|
135 | <div class="field"> | |
136 | <div class="label"> |
|
136 | <div class="label"> | |
137 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
137 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> | |
138 | </div> |
|
138 | </div> | |
139 | <div class="input input-medium"> |
|
139 | <div class="input input-medium"> | |
140 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
140 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} | |
141 | %if field.field_desc: |
|
141 | %if field.field_desc: | |
142 | <span class="help-block">${field.field_desc}</span> |
|
142 | <span class="help-block">${field.field_desc}</span> | |
143 | %endif |
|
143 | %endif | |
144 | </div> |
|
144 | </div> | |
145 | </div> |
|
145 | </div> | |
146 | %endfor |
|
146 | %endfor | |
147 | %endif |
|
147 | %endif | |
148 | <div class="field"> |
|
148 | <div class="field"> | |
149 | <div class="label"> |
|
149 | <div class="label"> | |
150 | <label for="input">${_('Permissions')}:</label> |
|
150 | <label for="input">${_('Permissions')}:</label> | |
151 | </div> |
|
151 | </div> | |
152 | <div class="input"> |
|
152 | <div class="input"> | |
153 | <%include file="repo_edit_perms.html"/> |
|
153 | <%include file="repo_edit_perms.html"/> | |
154 | </div> |
|
154 | </div> | |
155 |
|
155 | |||
156 | <div class="buttons"> |
|
156 | <div class="buttons"> | |
157 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
157 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
158 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
158 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
159 | </div> |
|
159 | </div> | |
160 | </div> |
|
160 | </div> | |
161 | </div> |
|
161 | </div> | |
162 | </div> |
|
162 | </div> | |
163 | ${h.end_form()} |
|
163 | ${h.end_form()} | |
164 | </div> |
|
164 | </div> | |
165 |
|
165 | |||
166 | <div class="box box-right"> |
|
166 | <div class="box box-right"> | |
167 | <div class="title"> |
|
167 | <div class="title"> | |
168 | <h5>${_('Advanced settings')}</h5> |
|
168 | <h5>${_('Advanced settings')}</h5> | |
169 | </div> |
|
169 | </div> | |
170 |
|
170 | |||
171 | <h3>${_('Statistics')}</h3> |
|
171 | <h3>${_('Statistics')}</h3> | |
172 | ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')} |
|
172 | ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')} | |
173 | <div class="form"> |
|
173 | <div class="form"> | |
174 | <div class="fields"> |
|
174 | <div class="fields"> | |
175 | ${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 | ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")} | |
176 | <div class="field" style="border:none;color:#888"> |
|
176 | <div class="field" style="border:none;color:#888"> | |
177 | <ul> |
|
177 | <ul> | |
178 | <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li> |
|
178 | <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li> | |
179 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> |
|
179 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> | |
180 | </ul> |
|
180 | </ul> | |
181 | </div> |
|
181 | </div> | |
182 | </div> |
|
182 | </div> | |
183 | </div> |
|
183 | </div> | |
184 | ${h.end_form()} |
|
184 | ${h.end_form()} | |
185 |
|
185 | |||
186 | %if c.repo_info.clone_uri: |
|
186 | %if c.repo_info.clone_uri: | |
187 | <h3>${_('Remote')}</h3> |
|
187 | <h3>${_('Remote')}</h3> | |
188 | ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')} |
|
188 | ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')} | |
189 | <div class="form"> |
|
189 | <div class="form"> | |
190 | <div class="fields"> |
|
190 | <div class="fields"> | |
191 | ${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 | ${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')+"');")} | |
192 | <div class="field" style="border:none"> |
|
192 | <div class="field" style="border:none"> | |
193 | <ul> |
|
193 | <ul> | |
194 | <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li> |
|
194 | <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li> | |
195 | </ul> |
|
195 | </ul> | |
196 | </div> |
|
196 | </div> | |
197 | </div> |
|
197 | </div> | |
198 | </div> |
|
198 | </div> | |
199 | ${h.end_form()} |
|
199 | ${h.end_form()} | |
200 | %endif |
|
200 | %endif | |
201 |
|
201 | |||
202 | <h3>${_('Cache')}</h3> |
|
202 | <h3>${_('Cache')}</h3> | |
203 | ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')} |
|
203 | ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')} | |
204 | <div class="form"> |
|
204 | <div class="form"> | |
205 | <div class="fields"> |
|
205 | <div class="fields"> | |
206 | ${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 | ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")} | |
207 | <div class="field" style="border:none;color:#888"> |
|
207 | <div class="field" style="border:none;color:#888"> | |
208 | <ul> |
|
208 | <ul> | |
209 | <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')} |
|
209 | <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')} | |
210 | </li> |
|
210 | </li> | |
211 | </ul> |
|
211 | </ul> | |
212 | </div> |
|
212 | </div> | |
213 | <div class="field" style="border:none;"> |
|
213 | <div class="field" style="border:none;"> | |
214 | ${_('List of cached values')} |
|
214 | ${_('List of cached values')} | |
215 | <table> |
|
215 | <table> | |
216 | <tr> |
|
216 | <tr> | |
217 | <th>${_('Prefix')}</th> |
|
217 | <th>${_('Prefix')}</th> | |
218 | <th>${_('Key')}</th> |
|
218 | <th>${_('Key')}</th> | |
219 | <th>${_('Active')}</th> |
|
219 | <th>${_('Active')}</th> | |
220 | </tr> |
|
220 | </tr> | |
221 | %for cache in c.repo_info.cache_keys: |
|
221 | %for cache in c.repo_info.cache_keys: | |
222 | <tr> |
|
222 | <tr> | |
223 | <td>${cache.prefix or '-'}</td> |
|
223 | <td>${cache.prefix or '-'}</td> | |
224 | <td>${cache.cache_key}</td> |
|
224 | <td>${cache.cache_key}</td> | |
225 | <td>${h.bool2icon(cache.cache_active)}</td> |
|
225 | <td>${h.bool2icon(cache.cache_active)}</td> | |
226 | </tr> |
|
226 | </tr> | |
227 | %endfor |
|
227 | %endfor | |
228 | </table> |
|
228 | </table> | |
229 | </div> |
|
229 | </div> | |
230 | </div> |
|
230 | </div> | |
231 | </div> |
|
231 | </div> | |
232 | ${h.end_form()} |
|
232 | ${h.end_form()} | |
233 |
|
233 | |||
234 | <h3>${_('Public journal')}</h3> |
|
234 | <h3>${_('Public journal')}</h3> | |
235 | ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')} |
|
235 | ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')} | |
236 | <div class="form"> |
|
236 | <div class="form"> | |
237 | ${h.hidden('auth_token',str(h.get_token()))} |
|
237 | ${h.hidden('auth_token',str(h.get_token()))} | |
238 | <div class="field"> |
|
238 | <div class="field"> | |
239 | %if c.in_public_journal: |
|
239 | %if c.in_public_journal: | |
240 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")} |
|
240 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")} | |
241 | %else: |
|
241 | %else: | |
242 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")} |
|
242 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")} | |
243 | %endif |
|
243 | %endif | |
244 | </div> |
|
244 | </div> | |
245 | <div class="field" style="border:none;color:#888"> |
|
245 | <div class="field" style="border:none;color:#888"> | |
246 | <ul> |
|
246 | <ul> | |
247 | <li>${_('All actions made on this repository will be accessible to everyone in public journal')} |
|
247 | <li>${_('All actions made on this repository will be accessible to everyone in public journal')} | |
248 | </li> |
|
248 | </li> | |
249 | </ul> |
|
249 | </ul> | |
250 | </div> |
|
250 | </div> | |
251 | </div> |
|
251 | </div> | |
252 | ${h.end_form()} |
|
252 | ${h.end_form()} | |
253 |
|
253 | |||
254 | <h3>${_('Locking')}</h3> |
|
254 | <h3>${_('Locking')}</h3> | |
255 | ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')} |
|
255 | ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')} | |
256 | <div class="form"> |
|
256 | <div class="form"> | |
257 | <div class="fields"> |
|
257 | <div class="fields"> | |
258 | %if c.repo_info.locked[0]: |
|
258 | %if c.repo_info.locked[0]: | |
259 | ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")} |
|
259 | ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")} | |
260 | ${'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 | ${'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])))} | |
261 | %else: |
|
261 | %else: | |
262 | ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")} |
|
262 | ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")} | |
263 | ${_('Repository is not locked')} |
|
263 | ${_('Repository is not locked')} | |
264 | %endif |
|
264 | %endif | |
265 | </div> |
|
265 | </div> | |
266 | <div class="field" style="border:none;color:#888"> |
|
266 | <div class="field" style="border:none;color:#888"> | |
267 | <ul> |
|
267 | <ul> | |
268 | <li>${_('Force locking on repository. Works only when anonymous access is disabled')} |
|
268 | <li>${_('Force locking on repository. Works only when anonymous access is disabled')} | |
269 | </li> |
|
269 | </li> | |
270 | </ul> |
|
270 | </ul> | |
271 | </div> |
|
271 | </div> | |
272 | </div> |
|
272 | </div> | |
273 | ${h.end_form()} |
|
273 | ${h.end_form()} | |
274 |
|
274 | |||
275 | <h3>${_('Set as fork of')}</h3> |
|
275 | <h3>${_('Set as fork of')}</h3> | |
276 | ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')} |
|
276 | ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')} | |
277 | <div class="form"> |
|
277 | <div class="form"> | |
278 | <div class="fields"> |
|
278 | <div class="fields"> | |
279 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} |
|
279 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} | |
280 | ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)} |
|
280 | ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)} | |
281 | </div> |
|
281 | </div> | |
282 | <div class="field" style="border:none;color:#888"> |
|
282 | <div class="field" style="border:none;color:#888"> | |
283 | <ul> |
|
283 | <ul> | |
284 | <li>${_('''Manually set this repository as a fork of another from the list''')}</li> |
|
284 | <li>${_('''Manually set this repository as a fork of another from the list''')}</li> | |
285 | </ul> |
|
285 | </ul> | |
286 | </div> |
|
286 | </div> | |
287 | </div> |
|
287 | </div> | |
288 | ${h.end_form()} |
|
288 | ${h.end_form()} | |
289 |
|
289 | |||
290 | <h3>${_('Delete')}</h3> |
|
290 | <h3>${_('Delete')}</h3> | |
291 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')} |
|
291 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')} | |
292 | <div class="form"> |
|
292 | <div class="form"> | |
293 | <div class="fields"> |
|
293 | <div class="fields"> | |
294 | ${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 | ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")} | |
295 | %if c.repo_info.forks.count(): |
|
295 | %if c.repo_info.forks.count(): | |
296 | - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()} |
|
296 | - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()} | |
297 | <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label> |
|
297 | <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label> | |
298 | <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label> |
|
298 | <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label> | |
299 | %endif |
|
299 | %endif | |
300 | </div> |
|
300 | </div> | |
301 | <div class="field" style="border:none;color:#888"> |
|
301 | <div class="field" style="border:none;color:#888"> | |
302 | <ul> |
|
302 | <ul> | |
303 | <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 | <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> | |
304 | </ul> |
|
304 | </ul> | |
305 | </div> |
|
305 | </div> | |
306 | </div> |
|
306 | </div> | |
307 | ${h.end_form()} |
|
307 | ${h.end_form()} | |
308 | </div> |
|
308 | </div> | |
309 |
|
309 | |||
310 | ##TODO: this should be controlled by the VISUAL setting |
|
310 | ##TODO: this should be controlled by the VISUAL setting | |
311 | %if c.visual.repository_fields: |
|
311 | %if c.visual.repository_fields: | |
312 | <div class="box box-left" style="clear:left"> |
|
312 | <div class="box box-left" style="clear:left"> | |
313 | <!-- box / title --> |
|
313 | <!-- box / title --> | |
314 | <div class="title"> |
|
314 | <div class="title"> | |
315 | <h5>${_('Extra fields')}</h5> |
|
315 | <h5>${_('Extra fields')}</h5> | |
316 | </div> |
|
316 | </div> | |
317 |
|
317 | |||
318 | <div class="emails_wrap"> |
|
318 | <div class="emails_wrap"> | |
319 | <table class="noborder"> |
|
319 | <table class="noborder"> | |
320 | %for field in c.repo_fields: |
|
320 | %for field in c.repo_fields: | |
321 | <tr> |
|
321 | <tr> | |
322 | <td>${field.field_label} (${field.field_key})</td> |
|
322 | <td>${field.field_label} (${field.field_key})</td> | |
323 | <td>${field.field_type}</td> |
|
323 | <td>${field.field_type}</td> | |
324 | <td> |
|
324 | <td> | |
325 | ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')} |
|
325 | ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')} | |
326 | ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id, |
|
326 | ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id, | |
327 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")} |
|
327 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")} | |
328 | ${h.end_form()} |
|
328 | ${h.end_form()} | |
329 | </td> |
|
329 | </td> | |
330 | </tr> |
|
330 | </tr> | |
331 | %endfor |
|
331 | %endfor | |
332 | </table> |
|
332 | </table> | |
333 | </div> |
|
333 | </div> | |
334 |
|
334 | |||
335 | ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')} |
|
335 | ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')} | |
336 | <div class="form"> |
|
336 | <div class="form"> | |
337 | <!-- fields --> |
|
337 | <!-- fields --> | |
338 | <div class="fields"> |
|
338 | <div class="fields"> | |
339 | <div class="field"> |
|
339 | <div class="field"> | |
340 | <div class="label"> |
|
340 | <div class="label"> | |
341 | <label for="new_field_key">${_('New field key')}:</label> |
|
341 | <label for="new_field_key">${_('New field key')}:</label> | |
342 | </div> |
|
342 | </div> | |
343 | <div class="input"> |
|
343 | <div class="input"> | |
344 | ${h.text('new_field_key', class_='small')} |
|
344 | ${h.text('new_field_key', class_='small')} | |
345 | </div> |
|
345 | </div> | |
346 | </div> |
|
346 | </div> | |
347 | <div class="field"> |
|
347 | <div class="field"> | |
348 | <div class="label"> |
|
348 | <div class="label"> | |
349 | <label for="new_field_label">${_('New field label')}:</label> |
|
349 | <label for="new_field_label">${_('New field label')}:</label> | |
350 | </div> |
|
350 | </div> | |
351 | <div class="input"> |
|
351 | <div class="input"> | |
352 | ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} |
|
352 | ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} | |
353 | </div> |
|
353 | </div> | |
354 | </div> |
|
354 | </div> | |
355 |
|
355 | |||
356 | <div class="field"> |
|
356 | <div class="field"> | |
357 | <div class="label"> |
|
357 | <div class="label"> | |
358 | <label for="new_field_desc">${_('New field description')}:</label> |
|
358 | <label for="new_field_desc">${_('New field description')}:</label> | |
359 | </div> |
|
359 | </div> | |
360 | <div class="input"> |
|
360 | <div class="input"> | |
361 | ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))} |
|
361 | ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))} | |
362 | </div> |
|
362 | </div> | |
363 | </div> |
|
363 | </div> | |
364 |
|
364 | |||
365 | <div class="buttons"> |
|
365 | <div class="buttons"> | |
366 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
366 | ${h.submit('save',_('Add'),class_="ui-btn large")} | |
367 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
367 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
368 | </div> |
|
368 | </div> | |
369 | </div> |
|
369 | </div> | |
370 | </div> |
|
370 | </div> | |
371 | ${h.end_form()} |
|
371 | ${h.end_form()} | |
372 | </div> |
|
372 | </div> | |
373 | %endif |
|
373 | %endif | |
374 | </%def> |
|
374 | </%def> |
@@ -1,142 +1,142 | |||||
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 administration')} |
|
5 | ${_('Repositories administration')} · ${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" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} » <span id="repo_count">0</span> ${_('repositories')} |
|
9 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} » <span id="repo_count">0</span> ${_('repositories')} | |
10 | </%def> |
|
10 | </%def> | |
11 | <%def name="page_nav()"> |
|
11 | <%def name="page_nav()"> | |
12 | ${self.menu('admin')} |
|
12 | ${self.menu('admin')} | |
13 | </%def> |
|
13 | </%def> | |
14 | <%def name="main()"> |
|
14 | <%def name="main()"> | |
15 | <div class="box"> |
|
15 | <div class="box"> | |
16 |
|
16 | |||
17 | <div class="title"> |
|
17 | <div class="title"> | |
18 | ${self.breadcrumbs()} |
|
18 | ${self.breadcrumbs()} | |
19 | <ul class="links"> |
|
19 | <ul class="links"> | |
20 | <li> |
|
20 | <li> | |
21 | <span>${h.link_to(_(u'Add repository'),h.url('new_repo'))}</span> |
|
21 | <span>${h.link_to(_(u'Add repository'),h.url('new_repo'))}</span> | |
22 | </li> |
|
22 | </li> | |
23 | </ul> |
|
23 | </ul> | |
24 | </div> |
|
24 | </div> | |
25 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> |
|
25 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> | |
26 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
26 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
27 |
|
27 | |||
28 |
|
28 | |||
29 | </div> |
|
29 | </div> | |
30 | <script> |
|
30 | <script> | |
31 | var url = "${h.url('formatted_users', format='json')}"; |
|
31 | var url = "${h.url('formatted_users', format='json')}"; | |
32 | var data = ${c.data|n}; |
|
32 | var data = ${c.data|n}; | |
33 | var myDataSource = new YAHOO.util.DataSource(data); |
|
33 | var myDataSource = new YAHOO.util.DataSource(data); | |
34 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
34 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
35 |
|
35 | |||
36 | myDataSource.responseSchema = { |
|
36 | myDataSource.responseSchema = { | |
37 | resultsList: "records", |
|
37 | resultsList: "records", | |
38 | fields: [ |
|
38 | fields: [ | |
39 | {key:"menu"}, |
|
39 | {key:"menu"}, | |
40 | {key:"raw_name"}, |
|
40 | {key:"raw_name"}, | |
41 | {key:"name"}, |
|
41 | {key:"name"}, | |
42 | {key:"desc"}, |
|
42 | {key:"desc"}, | |
43 | {key:"last_changeset"}, |
|
43 | {key:"last_changeset"}, | |
44 | {key:"owner"}, |
|
44 | {key:"owner"}, | |
45 | {key:"action"}, |
|
45 | {key:"action"}, | |
46 | ] |
|
46 | ] | |
47 | }; |
|
47 | }; | |
48 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
48 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
49 | // This is the filter function |
|
49 | // This is the filter function | |
50 | var data = res.results || [], |
|
50 | var data = res.results || [], | |
51 | filtered = [], |
|
51 | filtered = [], | |
52 | i,l; |
|
52 | i,l; | |
53 |
|
53 | |||
54 | if (req) { |
|
54 | if (req) { | |
55 | req = req.toLowerCase(); |
|
55 | req = req.toLowerCase(); | |
56 | for (i = 0; i<data.length; i++) { |
|
56 | for (i = 0; i<data.length; i++) { | |
57 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
57 | var pos = data[i].raw_name.toLowerCase().indexOf(req) | |
58 | if (pos != -1) { |
|
58 | if (pos != -1) { | |
59 | filtered.push(data[i]); |
|
59 | filtered.push(data[i]); | |
60 | } |
|
60 | } | |
61 | } |
|
61 | } | |
62 | res.results = filtered; |
|
62 | res.results = filtered; | |
63 | } |
|
63 | } | |
64 | YUD.get('repo_count').innerHTML = res.results.length; |
|
64 | YUD.get('repo_count').innerHTML = res.results.length; | |
65 | return res; |
|
65 | return res; | |
66 | } |
|
66 | } | |
67 |
|
67 | |||
68 | // main table sorting |
|
68 | // main table sorting | |
69 | var myColumnDefs = [ |
|
69 | var myColumnDefs = [ | |
70 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
70 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
71 | {key:"name",label:"${_('Name')}",sortable:true, |
|
71 | {key:"name",label:"${_('Name')}",sortable:true, | |
72 | sortOptions: { sortFunction: nameSort }}, |
|
72 | sortOptions: { sortFunction: nameSort }}, | |
73 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
73 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
74 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
74 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, | |
75 | sortOptions: { sortFunction: revisionSort }}, |
|
75 | sortOptions: { sortFunction: revisionSort }}, | |
76 | {key:"owner",label:"${_('Owner')}",sortable:true}, |
|
76 | {key:"owner",label:"${_('Owner')}",sortable:true}, | |
77 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
77 | {key:"action",label:"${_('Action')}",sortable:false}, | |
78 | ]; |
|
78 | ]; | |
79 |
|
79 | |||
80 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
|
80 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ | |
81 | sortedBy:{key:"name",dir:"asc"}, |
|
81 | sortedBy:{key:"name",dir:"asc"}, | |
82 | paginator: new YAHOO.widget.Paginator({ |
|
82 | paginator: new YAHOO.widget.Paginator({ | |
83 | rowsPerPage: 25, |
|
83 | rowsPerPage: 25, | |
84 | alwaysVisible: false, |
|
84 | alwaysVisible: false, | |
85 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
85 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
86 | pageLinks: 5, |
|
86 | pageLinks: 5, | |
87 | containerClass: 'pagination-wh', |
|
87 | containerClass: 'pagination-wh', | |
88 | currentPageClass: 'pager_curpage', |
|
88 | currentPageClass: 'pager_curpage', | |
89 | pageLinkClass: 'pager_link', |
|
89 | pageLinkClass: 'pager_link', | |
90 | nextPageLinkLabel: '>', |
|
90 | nextPageLinkLabel: '>', | |
91 | previousPageLinkLabel: '<', |
|
91 | previousPageLinkLabel: '<', | |
92 | firstPageLinkLabel: '<<', |
|
92 | firstPageLinkLabel: '<<', | |
93 | lastPageLinkLabel: '>>', |
|
93 | lastPageLinkLabel: '>>', | |
94 | containers:['user-paginator'] |
|
94 | containers:['user-paginator'] | |
95 | }), |
|
95 | }), | |
96 |
|
96 | |||
97 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
97 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
98 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
98 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
99 | MSG_EMPTY:"${_('No records found.')}", |
|
99 | MSG_EMPTY:"${_('No records found.')}", | |
100 | MSG_ERROR:"${_('Data error.')}", |
|
100 | MSG_ERROR:"${_('Data error.')}", | |
101 | MSG_LOADING:"${_('Loading...')}", |
|
101 | MSG_LOADING:"${_('Loading...')}", | |
102 | } |
|
102 | } | |
103 | ); |
|
103 | ); | |
104 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
104 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
105 | tooltip_activate(); |
|
105 | tooltip_activate(); | |
106 | quick_repo_menu(); |
|
106 | quick_repo_menu(); | |
107 | }); |
|
107 | }); | |
108 |
|
108 | |||
109 | var filterTimeout = null; |
|
109 | var filterTimeout = null; | |
110 |
|
110 | |||
111 | updateFilter = function () { |
|
111 | updateFilter = function () { | |
112 | // Reset timeout |
|
112 | // Reset timeout | |
113 | filterTimeout = null; |
|
113 | filterTimeout = null; | |
114 |
|
114 | |||
115 | // Reset sort |
|
115 | // Reset sort | |
116 | var state = myDataTable.getState(); |
|
116 | var state = myDataTable.getState(); | |
117 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
117 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
118 |
|
118 | |||
119 | // Get filtered data |
|
119 | // Get filtered data | |
120 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
120 | myDataSource.sendRequest(YUD.get('q_filter').value,{ | |
121 | success : myDataTable.onDataReturnInitializeTable, |
|
121 | success : myDataTable.onDataReturnInitializeTable, | |
122 | failure : myDataTable.onDataReturnInitializeTable, |
|
122 | failure : myDataTable.onDataReturnInitializeTable, | |
123 | scope : myDataTable, |
|
123 | scope : myDataTable, | |
124 | argument: state |
|
124 | argument: state | |
125 | }); |
|
125 | }); | |
126 |
|
126 | |||
127 | }; |
|
127 | }; | |
128 | YUE.on('q_filter','click',function(){ |
|
128 | YUE.on('q_filter','click',function(){ | |
129 | if(!YUD.hasClass('q_filter', 'loaded')){ |
|
129 | if(!YUD.hasClass('q_filter', 'loaded')){ | |
130 | YUD.get('q_filter').value = ''; |
|
130 | YUD.get('q_filter').value = ''; | |
131 | //TODO: load here full list later to do search within groups |
|
131 | //TODO: load here full list later to do search within groups | |
132 | YUD.addClass('q_filter', 'loaded'); |
|
132 | YUD.addClass('q_filter', 'loaded'); | |
133 | } |
|
133 | } | |
134 | }); |
|
134 | }); | |
135 |
|
135 | |||
136 | YUE.on('q_filter','keyup',function (e) { |
|
136 | YUE.on('q_filter','keyup',function (e) { | |
137 | clearTimeout(filterTimeout); |
|
137 | clearTimeout(filterTimeout); | |
138 | filterTimeout = setTimeout(updateFilter,600); |
|
138 | filterTimeout = setTimeout(updateFilter,600); | |
139 | }); |
|
139 | }); | |
140 | </script> |
|
140 | </script> | |
141 |
|
141 | |||
142 | </%def> |
|
142 | </%def> |
@@ -1,22 +1,22 | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 |
${_('Repository group')} |
|
4 | ${_('Repository group')} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs()"> |
|
7 | <%def name="breadcrumbs()"> | |
8 | <span class="groups_breadcrumbs"> |
|
8 | <span class="groups_breadcrumbs"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
10 | %if c.group.parent_group: |
|
10 | %if c.group.parent_group: | |
11 | » ${h.link_to(c.group.parent_group.name,h.url('repos_group_home',group_name=c.group.parent_group.group_name))} |
|
11 | » ${h.link_to(c.group.parent_group.name,h.url('repos_group_home',group_name=c.group.parent_group.group_name))} | |
12 | %endif |
|
12 | %endif | |
13 | » "${c.group.name}" ${_('with')} |
|
13 | » "${c.group.name}" ${_('with')} | |
14 | </span> |
|
14 | </span> | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="page_nav()"> |
|
17 | <%def name="page_nav()"> | |
18 | ${self.menu('home')} |
|
18 | ${self.menu('home')} | |
19 | </%def> |
|
19 | </%def> | |
20 | <%def name="main()"> |
|
20 | <%def name="main()"> | |
21 | <%include file="/index_base.html" args="parent=self,short_repo_names=True"/> |
|
21 | <%include file="/index_base.html" args="parent=self,short_repo_names=True"/> | |
22 | </%def> |
|
22 | </%def> |
@@ -1,64 +1,64 | |||||
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 |
${_('Add repos group')} |
|
5 | ${_('Add repos group')} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(_('Repos groups'),h.url('repos_groups'))} |
|
10 | ${h.link_to(_('Repos groups'),h.url('repos_groups'))} | |
11 | » |
|
11 | » | |
12 | ${_('add new repos group')} |
|
12 | ${_('add new repos group')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
16 | ${self.menu('admin')} |
|
16 | ${self.menu('admin')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
24 | </div> |
|
24 | </div> | |
25 | <!-- end box / title --> |
|
25 | <!-- end box / title --> | |
26 | ${h.form(url('repos_groups'))} |
|
26 | ${h.form(url('repos_groups'))} | |
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="group_name">${_('Group name')}:</label> |
|
32 | <label for="group_name">${_('Group name')}:</label> | |
33 | </div> |
|
33 | </div> | |
34 | <div class="input"> |
|
34 | <div class="input"> | |
35 | ${h.text('group_name',class_='medium')} |
|
35 | ${h.text('group_name',class_='medium')} | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 |
|
38 | |||
39 | <div class="field"> |
|
39 | <div class="field"> | |
40 | <div class="label label-textarea"> |
|
40 | <div class="label label-textarea"> | |
41 | <label for="group_description">${_('Description')}:</label> |
|
41 | <label for="group_description">${_('Description')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 | <div class="textarea text-area editor"> |
|
43 | <div class="textarea text-area editor"> | |
44 | ${h.textarea('group_description',cols=23,rows=5,class_="medium")} |
|
44 | ${h.textarea('group_description',cols=23,rows=5,class_="medium")} | |
45 | </div> |
|
45 | </div> | |
46 | </div> |
|
46 | </div> | |
47 |
|
47 | |||
48 | <div class="field"> |
|
48 | <div class="field"> | |
49 | <div class="label"> |
|
49 | <div class="label"> | |
50 | <label for="group_parent_id">${_('Group parent')}:</label> |
|
50 | <label for="group_parent_id">${_('Group parent')}:</label> | |
51 | </div> |
|
51 | </div> | |
52 | <div class="input"> |
|
52 | <div class="input"> | |
53 | ${h.select('group_parent_id',request.GET.get('parent_group'),c.repo_groups,class_="medium")} |
|
53 | ${h.select('group_parent_id',request.GET.get('parent_group'),c.repo_groups,class_="medium")} | |
54 | </div> |
|
54 | </div> | |
55 | </div> |
|
55 | </div> | |
56 |
|
56 | |||
57 | <div class="buttons"> |
|
57 | <div class="buttons"> | |
58 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
58 | ${h.submit('save',_('save'),class_="ui-btn large")} | |
59 | </div> |
|
59 | </div> | |
60 | </div> |
|
60 | </div> | |
61 | </div> |
|
61 | </div> | |
62 | ${h.end_form()} |
|
62 | ${h.end_form()} | |
63 | </div> |
|
63 | </div> | |
64 | </%def> |
|
64 | </%def> |
@@ -1,86 +1,86 | |||||
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 repos group')} ${c.repos_group.name} |
|
5 | ${_('Edit repos group')} ${c.repos_group.name} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(_('Repos groups'),h.url('repos_groups'))} |
|
10 | ${h.link_to(_('Repos groups'),h.url('repos_groups'))} | |
11 | » |
|
11 | » | |
12 | ${_('edit repos group')} "${c.repos_group.name}" |
|
12 | ${_('edit repos group')} "${c.repos_group.name}" | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
16 | ${self.menu('admin')} |
|
16 | ${self.menu('admin')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
24 | <ul class="links"> |
|
24 | <ul class="links"> | |
25 | <li> |
|
25 | <li> | |
26 | <span>${h.link_to(_(u'Add child group'),h.url('new_repos_group', parent_group=c.repos_group.group_id))}</span> |
|
26 | <span>${h.link_to(_(u'Add child group'),h.url('new_repos_group', parent_group=c.repos_group.group_id))}</span> | |
27 | </li> |
|
27 | </li> | |
28 | </ul> |
|
28 | </ul> | |
29 | </div> |
|
29 | </div> | |
30 | <!-- end box / title --> |
|
30 | <!-- end box / title --> | |
31 | ${h.form(url('repos_group',group_name=c.repos_group.group_name),method='put')} |
|
31 | ${h.form(url('repos_group',group_name=c.repos_group.group_name),method='put')} | |
32 | <div class="form"> |
|
32 | <div class="form"> | |
33 | <!-- fields --> |
|
33 | <!-- fields --> | |
34 | <div class="fields"> |
|
34 | <div class="fields"> | |
35 | <div class="field"> |
|
35 | <div class="field"> | |
36 | <div class="label"> |
|
36 | <div class="label"> | |
37 | <label for="group_name">${_('Group name')}:</label> |
|
37 | <label for="group_name">${_('Group name')}:</label> | |
38 | </div> |
|
38 | </div> | |
39 | <div class="input"> |
|
39 | <div class="input"> | |
40 | ${h.text('group_name',class_='medium')} |
|
40 | ${h.text('group_name',class_='medium')} | |
41 | </div> |
|
41 | </div> | |
42 | </div> |
|
42 | </div> | |
43 |
|
43 | |||
44 | <div class="field"> |
|
44 | <div class="field"> | |
45 | <div class="label label-textarea"> |
|
45 | <div class="label label-textarea"> | |
46 | <label for="group_description">${_('Description')}:</label> |
|
46 | <label for="group_description">${_('Description')}:</label> | |
47 | </div> |
|
47 | </div> | |
48 | <div class="textarea text-area editor"> |
|
48 | <div class="textarea text-area editor"> | |
49 | ${h.textarea('group_description',cols=23,rows=5,class_="medium")} |
|
49 | ${h.textarea('group_description',cols=23,rows=5,class_="medium")} | |
50 | </div> |
|
50 | </div> | |
51 | </div> |
|
51 | </div> | |
52 |
|
52 | |||
53 | <div class="field"> |
|
53 | <div class="field"> | |
54 | <div class="label"> |
|
54 | <div class="label"> | |
55 | <label for="group_parent_id">${_('Group parent')}:</label> |
|
55 | <label for="group_parent_id">${_('Group parent')}:</label> | |
56 | </div> |
|
56 | </div> | |
57 | <div class="input"> |
|
57 | <div class="input"> | |
58 | ${h.select('group_parent_id','',c.repo_groups,class_="medium")} |
|
58 | ${h.select('group_parent_id','',c.repo_groups,class_="medium")} | |
59 | </div> |
|
59 | </div> | |
60 | </div> |
|
60 | </div> | |
61 | <div class="field"> |
|
61 | <div class="field"> | |
62 | <div class="label"> |
|
62 | <div class="label"> | |
63 | <label for="input">${_('Permissions')}:</label> |
|
63 | <label for="input">${_('Permissions')}:</label> | |
64 | </div> |
|
64 | </div> | |
65 | <div class="input"> |
|
65 | <div class="input"> | |
66 | <%include file="repos_group_edit_perms.html"/> |
|
66 | <%include file="repos_group_edit_perms.html"/> | |
67 | </div> |
|
67 | </div> | |
68 | </div> |
|
68 | </div> | |
69 | <div class="field"> |
|
69 | <div class="field"> | |
70 | <div class="label label-checkbox"> |
|
70 | <div class="label label-checkbox"> | |
71 | <label for="enable_locking">${_('Enable locking')}:</label> |
|
71 | <label for="enable_locking">${_('Enable locking')}:</label> | |
72 | </div> |
|
72 | </div> | |
73 | <div class="checkboxes"> |
|
73 | <div class="checkboxes"> | |
74 | ${h.checkbox('enable_locking',value="True")} |
|
74 | ${h.checkbox('enable_locking',value="True")} | |
75 | <span class="help-block">${_('Enable lock-by-pulling on group. This option will be applied to all other groups and repositories inside')}</span> |
|
75 | <span class="help-block">${_('Enable lock-by-pulling on group. This option will be applied to all other groups and repositories inside')}</span> | |
76 | </div> |
|
76 | </div> | |
77 | </div> |
|
77 | </div> | |
78 | <div class="buttons"> |
|
78 | <div class="buttons"> | |
79 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
79 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
80 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
80 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | </div> |
|
83 | </div> | |
84 | ${h.end_form()} |
|
84 | ${h.end_form()} | |
85 | </div> |
|
85 | </div> | |
86 | </%def> |
|
86 | </%def> |
@@ -1,78 +1,78 | |||||
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 |
${_('Repository groups administration')} |
|
5 | ${_('Repository 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 | » |
|
11 | » | |
12 | ${_('repository groups')} |
|
12 | ${_('repository groups')} | |
13 | </%def> |
|
13 | </%def> | |
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 | ${self.menu('admin')} |
|
15 | ${self.menu('admin')} | |
16 | </%def> |
|
16 | </%def> | |
17 | <%def name="main()"> |
|
17 | <%def name="main()"> | |
18 | <div class="box"> |
|
18 | <div class="box"> | |
19 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
20 | <div class="title"> |
|
20 | <div class="title"> | |
21 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
22 | <ul class="links"> |
|
22 | <ul class="links"> | |
23 | <li> |
|
23 | <li> | |
24 | %if h.HasPermissionAny('hg.admin')(): |
|
24 | %if h.HasPermissionAny('hg.admin')(): | |
25 | <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> | |
26 | %endif |
|
26 | %endif | |
27 | </li> |
|
27 | </li> | |
28 | </ul> |
|
28 | </ul> | |
29 | </div> |
|
29 | </div> | |
30 | <!-- end box / title --> |
|
30 | <!-- end box / title --> | |
31 | <div class="table"> |
|
31 | <div class="table"> | |
32 | % if c.groups: |
|
32 | % if c.groups: | |
33 | <table class="table_disp"> |
|
33 | <table class="table_disp"> | |
34 |
|
34 | |||
35 | <thead> |
|
35 | <thead> | |
36 | <tr> |
|
36 | <tr> | |
37 | <th class="left"><a href="#">${_('Group name')}</a></th> |
|
37 | <th class="left"><a href="#">${_('Group name')}</a></th> | |
38 | <th class="left"><a href="#">${_('Description')}</a></th> |
|
38 | <th class="left"><a href="#">${_('Description')}</a></th> | |
39 | <th class="left"><a href="#">${_('Number of toplevel repositories')}</a></th> |
|
39 | <th class="left"><a href="#">${_('Number of toplevel repositories')}</a></th> | |
40 | <th class="left" colspan="2">${_('action')}</th> |
|
40 | <th class="left" colspan="2">${_('action')}</th> | |
41 | </tr> |
|
41 | </tr> | |
42 | </thead> |
|
42 | </thead> | |
43 |
|
43 | |||
44 | ## REPO GROUPS |
|
44 | ## REPO GROUPS | |
45 |
|
45 | |||
46 | % for gr in c.groups: |
|
46 | % for gr in c.groups: | |
47 | <% gr_cn = gr.repositories.count() %> |
|
47 | <% gr_cn = gr.repositories.count() %> | |
48 | <tr> |
|
48 | <tr> | |
49 | <td> |
|
49 | <td> | |
50 | <div style="white-space: nowrap"> |
|
50 | <div style="white-space: nowrap"> | |
51 | <img class="icon" alt="${_('Repository group')}" src="${h.url('/images/icons/database_link.png')}"/> |
|
51 | <img class="icon" alt="${_('Repository group')}" src="${h.url('/images/icons/database_link.png')}"/> | |
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))} |
|
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))} | |
53 | </div> |
|
53 | </div> | |
54 | </td> |
|
54 | </td> | |
55 | <td>${gr.group_description}</td> |
|
55 | <td>${gr.group_description}</td> | |
56 | <td><b>${gr_cn}</b></td> |
|
56 | <td><b>${gr_cn}</b></td> | |
57 | <td> |
|
57 | <td> | |
58 | <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')}"> | |
59 | ${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")} | |
60 | </a> |
|
60 | </a> | |
61 | </td> |
|
61 | </td> | |
62 | <td> |
|
62 | <td> | |
63 | ${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')} | |
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)+"');")} |
|
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)+"');")} | |
65 | ${h.end_form()} |
|
65 | ${h.end_form()} | |
66 | </td> |
|
66 | </td> | |
67 | </tr> |
|
67 | </tr> | |
68 | % endfor |
|
68 | % endfor | |
69 |
|
69 | |||
70 | </table> |
|
70 | </table> | |
71 | % else: |
|
71 | % else: | |
72 | ${_('There are no repository groups yet')} |
|
72 | ${_('There are no repository groups yet')} | |
73 | % endif |
|
73 | % endif | |
74 |
|
74 | |||
75 | </div> |
|
75 | </div> | |
76 | </div> |
|
76 | </div> | |
77 |
|
77 | |||
78 | </%def> |
|
78 | </%def> |
@@ -1,96 +1,96 | |||||
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')} |
|
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'))} » ${_('Settings')} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} » ${_('Settings')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
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 | <!-- end box / title --> |
|
22 | <!-- end box / title --> | |
23 |
|
23 | |||
24 | <h3>${_('Built in hooks - read only')}</h3> |
|
24 | <h3>${_('Built in hooks - read only')}</h3> | |
25 | <div class="form"> |
|
25 | <div class="form"> | |
26 | <div class="fields"> |
|
26 | <div class="fields"> | |
27 | % for hook in c.hooks: |
|
27 | % for hook in c.hooks: | |
28 | <div class="field"> |
|
28 | <div class="field"> | |
29 | <div class="label label"> |
|
29 | <div class="label label"> | |
30 | <label for="${hook.ui_key}">${hook.ui_key}</label> |
|
30 | <label for="${hook.ui_key}">${hook.ui_key}</label> | |
31 | </div> |
|
31 | </div> | |
32 | <div class="input" style="margin-left:280px"> |
|
32 | <div class="input" style="margin-left:280px"> | |
33 | ${h.text(hook.ui_key,hook.ui_value,size=60,readonly="readonly")} |
|
33 | ${h.text(hook.ui_key,hook.ui_value,size=60,readonly="readonly")} | |
34 | </div> |
|
34 | </div> | |
35 | </div> |
|
35 | </div> | |
36 | % endfor |
|
36 | % endfor | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 |
|
39 | |||
40 | <h3>${_('Custom hooks')}</h3> |
|
40 | <h3>${_('Custom hooks')}</h3> | |
41 | ${h.form(url('admin_setting', setting_id='hooks'),method='put')} |
|
41 | ${h.form(url('admin_setting', setting_id='hooks'),method='put')} | |
42 | <div class="form"> |
|
42 | <div class="form"> | |
43 | <div class="fields"> |
|
43 | <div class="fields"> | |
44 |
|
44 | |||
45 | % for hook in c.custom_hooks: |
|
45 | % for hook in c.custom_hooks: | |
46 | <div class="field" id="${'id%s' % hook.ui_id }"> |
|
46 | <div class="field" id="${'id%s' % hook.ui_id }"> | |
47 | <div class="label label"> |
|
47 | <div class="label label"> | |
48 | <label for="${hook.ui_key}">${hook.ui_key}</label> |
|
48 | <label for="${hook.ui_key}">${hook.ui_key}</label> | |
49 | </div> |
|
49 | </div> | |
50 | <div class="input" style="margin-left:280px"> |
|
50 | <div class="input" style="margin-left:280px"> | |
51 | ${h.hidden('hook_ui_key',hook.ui_key)} |
|
51 | ${h.hidden('hook_ui_key',hook.ui_key)} | |
52 | ${h.hidden('hook_ui_value',hook.ui_value)} |
|
52 | ${h.hidden('hook_ui_value',hook.ui_value)} | |
53 | ${h.text('hook_ui_value_new',hook.ui_value,size=60)} |
|
53 | ${h.text('hook_ui_value_new',hook.ui_value,size=60)} | |
54 | <span class="delete_icon action_button" |
|
54 | <span class="delete_icon action_button" | |
55 | onclick="ajaxActionHook(${hook.ui_id},'${'id%s' % hook.ui_id }')"> |
|
55 | onclick="ajaxActionHook(${hook.ui_id},'${'id%s' % hook.ui_id }')"> | |
56 | ${_('remove')} |
|
56 | ${_('remove')} | |
57 | </span> |
|
57 | </span> | |
58 | </div> |
|
58 | </div> | |
59 | </div> |
|
59 | </div> | |
60 | % endfor |
|
60 | % endfor | |
61 |
|
61 | |||
62 | <div class="field"> |
|
62 | <div class="field"> | |
63 | <div class="input" style="margin-left:-180px;position: absolute;"> |
|
63 | <div class="input" style="margin-left:-180px;position: absolute;"> | |
64 | <div class="input"> |
|
64 | <div class="input"> | |
65 | ${h.text('new_hook_ui_key',size=30)} |
|
65 | ${h.text('new_hook_ui_key',size=30)} | |
66 | </div> |
|
66 | </div> | |
67 | </div> |
|
67 | </div> | |
68 | <div class="input" style="margin-left:280px"> |
|
68 | <div class="input" style="margin-left:280px"> | |
69 | ${h.text('new_hook_ui_value',size=60)} |
|
69 | ${h.text('new_hook_ui_value',size=60)} | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 | <div class="buttons" style="margin-left:280px"> |
|
72 | <div class="buttons" style="margin-left:280px"> | |
73 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
73 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
74 | </div> |
|
74 | </div> | |
75 | </div> |
|
75 | </div> | |
76 | </div> |
|
76 | </div> | |
77 | ${h.end_form()} |
|
77 | ${h.end_form()} | |
78 | </div> |
|
78 | </div> | |
79 | <script type="text/javascript"> |
|
79 | <script type="text/javascript"> | |
80 | function ajaxActionHook(hook_id,field_id) { |
|
80 | function ajaxActionHook(hook_id,field_id) { | |
81 | var sUrl = "${h.url('admin_setting', setting_id='hooks')}"; |
|
81 | var sUrl = "${h.url('admin_setting', setting_id='hooks')}"; | |
82 | var callback = { |
|
82 | var callback = { | |
83 | success: function (o) { |
|
83 | success: function (o) { | |
84 | var elem = YUD.get(""+field_id); |
|
84 | var elem = YUD.get(""+field_id); | |
85 | elem.parentNode.removeChild(elem); |
|
85 | elem.parentNode.removeChild(elem); | |
86 | }, |
|
86 | }, | |
87 | failure: function (o) { |
|
87 | failure: function (o) { | |
88 | alert("${_('Failed to remove hook')}"); |
|
88 | alert("${_('Failed to remove hook')}"); | |
89 | }, |
|
89 | }, | |
90 | }; |
|
90 | }; | |
91 | var postData = '_method=delete&hook_id=' + hook_id; |
|
91 | var postData = '_method=delete&hook_id=' + hook_id; | |
92 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); |
|
92 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); | |
93 | }; |
|
93 | }; | |
94 | </script> |
|
94 | </script> | |
95 |
|
95 | |||
96 | </%def> |
|
96 | </%def> |
@@ -1,347 +1,347 | |||||
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')} |
|
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 | » |
|
10 | » | |
11 | ${_('settings')} |
|
11 | ${_('settings')} | |
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 | <!-- end box / title --> |
|
24 | <!-- end box / title --> | |
25 |
|
25 | |||
26 | <h3>${_('Remap and rescan repositories')}</h3> |
|
26 | <h3>${_('Remap and rescan repositories')}</h3> | |
27 | ${h.form(url('admin_setting', setting_id='mapping'),method='put')} |
|
27 | ${h.form(url('admin_setting', setting_id='mapping'),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 | <div class="field"> |
|
32 | <div class="field"> | |
33 | <div class="label label-checkbox"> |
|
33 | <div class="label label-checkbox"> | |
34 | <label for="destroy">${_('Rescan option')}:</label> |
|
34 | <label for="destroy">${_('Rescan option')}:</label> | |
35 | </div> |
|
35 | </div> | |
36 | <div class="checkboxes"> |
|
36 | <div class="checkboxes"> | |
37 | <div class="checkbox"> |
|
37 | <div class="checkbox"> | |
38 | ${h.checkbox('destroy',True)} |
|
38 | ${h.checkbox('destroy',True)} | |
39 | <label for="destroy"> |
|
39 | <label for="destroy"> | |
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.'))}"> |
|
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.'))}"> | |
41 | ${_('Destroy old data')}</span> </label> |
|
41 | ${_('Destroy old data')}</span> </label> | |
42 | </div> |
|
42 | </div> | |
43 | <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> | |
44 | </div> |
|
44 | </div> | |
45 | </div> |
|
45 | </div> | |
46 |
|
46 | |||
47 | <div class="buttons"> |
|
47 | <div class="buttons"> | |
48 | ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")} |
|
48 | ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")} | |
49 | </div> |
|
49 | </div> | |
50 | </div> |
|
50 | </div> | |
51 | </div> |
|
51 | </div> | |
52 | ${h.end_form()} |
|
52 | ${h.end_form()} | |
53 |
|
53 | |||
54 | <h3>${_('Whoosh indexing')}</h3> |
|
54 | <h3>${_('Whoosh indexing')}</h3> | |
55 | ${h.form(url('admin_setting', setting_id='whoosh'),method='put')} |
|
55 | ${h.form(url('admin_setting', setting_id='whoosh'),method='put')} | |
56 | <div class="form"> |
|
56 | <div class="form"> | |
57 | <!-- fields --> |
|
57 | <!-- fields --> | |
58 |
|
58 | |||
59 | <div class="fields"> |
|
59 | <div class="fields"> | |
60 | <div class="field"> |
|
60 | <div class="field"> | |
61 | <div class="label label-checkbox"> |
|
61 | <div class="label label-checkbox"> | |
62 | <label>${_('Index build option')}:</label> |
|
62 | <label>${_('Index build option')}:</label> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="checkboxes"> |
|
64 | <div class="checkboxes"> | |
65 | <div class="checkbox"> |
|
65 | <div class="checkbox"> | |
66 | ${h.checkbox('full_index',True)} |
|
66 | ${h.checkbox('full_index',True)} | |
67 | <label for="full_index">${_('Build from scratch')}</label> |
|
67 | <label for="full_index">${_('Build from scratch')}</label> | |
68 | </div> |
|
68 | </div> | |
69 | </div> |
|
69 | </div> | |
70 | </div> |
|
70 | </div> | |
71 |
|
71 | |||
72 | <div class="buttons"> |
|
72 | <div class="buttons"> | |
73 | ${h.submit('reindex',_('Reindex'),class_="ui-btn large")} |
|
73 | ${h.submit('reindex',_('Reindex'),class_="ui-btn large")} | |
74 | </div> |
|
74 | </div> | |
75 | </div> |
|
75 | </div> | |
76 | </div> |
|
76 | </div> | |
77 | ${h.end_form()} |
|
77 | ${h.end_form()} | |
78 |
|
78 | |||
79 | <h3>${_('Global application settings')}</h3> |
|
79 | <h3>${_('Global application settings')}</h3> | |
80 | ${h.form(url('admin_setting', setting_id='global'),method='put')} |
|
80 | ${h.form(url('admin_setting', setting_id='global'),method='put')} | |
81 | <div class="form"> |
|
81 | <div class="form"> | |
82 | <!-- fields --> |
|
82 | <!-- fields --> | |
83 |
|
83 | |||
84 | <div class="fields"> |
|
84 | <div class="fields"> | |
85 |
|
85 | |||
86 | <div class="field"> |
|
86 | <div class="field"> | |
87 | <div class="label"> |
|
87 | <div class="label"> | |
88 | <label for="rhodecode_title">${_('Site branding')}:</label> |
|
88 | <label for="rhodecode_title">${_('Site branding')}:</label> | |
89 | </div> |
|
89 | </div> | |
90 | <div class="input"> |
|
90 | <div class="input"> | |
91 | ${h.text('rhodecode_title',size=30)} |
|
91 | ${h.text('rhodecode_title',size=30)} | |
92 | </div> |
|
92 | </div> | |
93 | </div> |
|
93 | </div> | |
94 |
|
94 | |||
95 | <div class="field"> |
|
95 | <div class="field"> | |
96 | <div class="label"> |
|
96 | <div class="label"> | |
97 | <label for="rhodecode_realm">${_('HTTP authentication realm')}:</label> |
|
97 | <label for="rhodecode_realm">${_('HTTP authentication realm')}:</label> | |
98 | </div> |
|
98 | </div> | |
99 | <div class="input"> |
|
99 | <div class="input"> | |
100 | ${h.text('rhodecode_realm',size=30)} |
|
100 | ${h.text('rhodecode_realm',size=30)} | |
101 | </div> |
|
101 | </div> | |
102 | </div> |
|
102 | </div> | |
103 |
|
103 | |||
104 | <div class="field"> |
|
104 | <div class="field"> | |
105 | <div class="label"> |
|
105 | <div class="label"> | |
106 | <label for="rhodecode_ga_code">${_('Google Analytics code')}:</label> |
|
106 | <label for="rhodecode_ga_code">${_('Google Analytics code')}:</label> | |
107 | </div> |
|
107 | </div> | |
108 | <div class="input"> |
|
108 | <div class="input"> | |
109 | ${h.text('rhodecode_ga_code',size=30)} |
|
109 | ${h.text('rhodecode_ga_code',size=30)} | |
110 | </div> |
|
110 | </div> | |
111 | </div> |
|
111 | </div> | |
112 |
|
112 | |||
113 | <div class="buttons"> |
|
113 | <div class="buttons"> | |
114 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
114 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
115 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
115 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
116 | </div> |
|
116 | </div> | |
117 | </div> |
|
117 | </div> | |
118 | </div> |
|
118 | </div> | |
119 | ${h.end_form()} |
|
119 | ${h.end_form()} | |
120 |
|
120 | |||
121 | <h3>${_('Visualisation settings')}</h3> |
|
121 | <h3>${_('Visualisation settings')}</h3> | |
122 | ${h.form(url('admin_setting', setting_id='visual'),method='put')} |
|
122 | ${h.form(url('admin_setting', setting_id='visual'),method='put')} | |
123 | <div class="form"> |
|
123 | <div class="form"> | |
124 | <!-- fields --> |
|
124 | <!-- fields --> | |
125 |
|
125 | |||
126 | <div class="fields"> |
|
126 | <div class="fields"> | |
127 | <div class="field"> |
|
127 | <div class="field"> | |
128 | <div class="label label-checkbox"> |
|
128 | <div class="label label-checkbox"> | |
129 | <label>${_('General')}:</label> |
|
129 | <label>${_('General')}:</label> | |
130 | </div> |
|
130 | </div> | |
131 | <div class="checkboxes"> |
|
131 | <div class="checkboxes"> | |
132 | <div class="checkbox"> |
|
132 | <div class="checkbox"> | |
133 | ${h.checkbox('rhodecode_lightweight_dashboard','True')} |
|
133 | ${h.checkbox('rhodecode_lightweight_dashboard','True')} | |
134 | <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> |
|
134 | <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> | |
135 | </div> |
|
135 | </div> | |
136 | </div> |
|
136 | </div> | |
137 | <div class="checkboxes"> |
|
137 | <div class="checkboxes"> | |
138 | <div class="checkbox"> |
|
138 | <div class="checkbox"> | |
139 | ${h.checkbox('rhodecode_repository_fields','True')} |
|
139 | ${h.checkbox('rhodecode_repository_fields','True')} | |
140 | <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label> |
|
140 | <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label> | |
141 | </div> |
|
141 | </div> | |
142 | </div> |
|
142 | </div> | |
143 | </div> |
|
143 | </div> | |
144 |
|
144 | |||
145 | <div class="field"> |
|
145 | <div class="field"> | |
146 | <div class="label label-checkbox"> |
|
146 | <div class="label label-checkbox"> | |
147 | <label>${_('Icons')}:</label> |
|
147 | <label>${_('Icons')}:</label> | |
148 | </div> |
|
148 | </div> | |
149 | <div class="checkboxes"> |
|
149 | <div class="checkboxes"> | |
150 | <div class="checkbox"> |
|
150 | <div class="checkbox"> | |
151 | ${h.checkbox('rhodecode_show_public_icon','True')} |
|
151 | ${h.checkbox('rhodecode_show_public_icon','True')} | |
152 | <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> | |
153 | </div> |
|
153 | </div> | |
154 | <div class="checkbox"> |
|
154 | <div class="checkbox"> | |
155 | ${h.checkbox('rhodecode_show_private_icon','True')} |
|
155 | ${h.checkbox('rhodecode_show_private_icon','True')} | |
156 | <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> | |
157 | </div> |
|
157 | </div> | |
158 | </div> |
|
158 | </div> | |
159 | </div> |
|
159 | </div> | |
160 |
|
160 | |||
161 | <div class="field"> |
|
161 | <div class="field"> | |
162 | <div class="label label-checkbox"> |
|
162 | <div class="label label-checkbox"> | |
163 | <label>${_('Meta-Tagging')}:</label> |
|
163 | <label>${_('Meta-Tagging')}:</label> | |
164 | </div> |
|
164 | </div> | |
165 | <div class="checkboxes"> |
|
165 | <div class="checkboxes"> | |
166 | <div class="checkbox"> |
|
166 | <div class="checkbox"> | |
167 | ${h.checkbox('rhodecode_stylify_metatags','True')} |
|
167 | ${h.checkbox('rhodecode_stylify_metatags','True')} | |
168 | <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label> |
|
168 | <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label> | |
169 | </div> |
|
169 | </div> | |
170 | <div style="padding-left: 20px;"> |
|
170 | <div style="padding-left: 20px;"> | |
171 | <ul> <!-- Fix style here --> |
|
171 | <ul> <!-- Fix style here --> | |
172 | <li>[featured] <span class="metatag" tag="featured">featured</span></li> |
|
172 | <li>[featured] <span class="metatag" tag="featured">featured</span></li> | |
173 | <li>[stale] <span class="metatag" tag="stale">stale</span></li> |
|
173 | <li>[stale] <span class="metatag" tag="stale">stale</span></li> | |
174 | <li>[dead] <span class="metatag" tag="dead">dead</span></li> |
|
174 | <li>[dead] <span class="metatag" tag="dead">dead</span></li> | |
175 | <li>[lang => lang] <span class="metatag" tag="lang" >lang</span></li> |
|
175 | <li>[lang => lang] <span class="metatag" tag="lang" >lang</span></li> | |
176 | <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> | |
177 | <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> | |
178 | <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> | |
179 | <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> | |
180 | </ul> |
|
180 | </ul> | |
181 | </div> |
|
181 | </div> | |
182 | </div> |
|
182 | </div> | |
183 | </div> |
|
183 | </div> | |
184 |
|
184 | |||
185 | <div class="buttons"> |
|
185 | <div class="buttons"> | |
186 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
186 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
187 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
187 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
188 | </div> |
|
188 | </div> | |
189 |
|
189 | |||
190 | </div> |
|
190 | </div> | |
191 | </div> |
|
191 | </div> | |
192 | ${h.end_form()} |
|
192 | ${h.end_form()} | |
193 |
|
193 | |||
194 |
|
194 | |||
195 | <h3>${_('VCS settings')}</h3> |
|
195 | <h3>${_('VCS settings')}</h3> | |
196 | ${h.form(url('admin_setting', setting_id='vcs'),method='put')} |
|
196 | ${h.form(url('admin_setting', setting_id='vcs'),method='put')} | |
197 | <div class="form"> |
|
197 | <div class="form"> | |
198 | <!-- fields --> |
|
198 | <!-- fields --> | |
199 |
|
199 | |||
200 | <div class="fields"> |
|
200 | <div class="fields"> | |
201 |
|
201 | |||
202 | <div class="field"> |
|
202 | <div class="field"> | |
203 | <div class="label label-checkbox"> |
|
203 | <div class="label label-checkbox"> | |
204 | <label>${_('Web')}:</label> |
|
204 | <label>${_('Web')}:</label> | |
205 | </div> |
|
205 | </div> | |
206 | <div class="checkboxes"> |
|
206 | <div class="checkboxes"> | |
207 | <div class="checkbox"> |
|
207 | <div class="checkbox"> | |
208 | ${h.checkbox('web_push_ssl', 'True')} |
|
208 | ${h.checkbox('web_push_ssl', 'True')} | |
209 | <label for="web_push_ssl">${_('Require SSL for vcs operations')}</label> |
|
209 | <label for="web_push_ssl">${_('Require SSL for vcs operations')}</label> | |
210 | </div> |
|
210 | </div> | |
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> |
|
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> | |
212 | </div> |
|
212 | </div> | |
213 | </div> |
|
213 | </div> | |
214 |
|
214 | |||
215 | <div class="field"> |
|
215 | <div class="field"> | |
216 | <div class="label label-checkbox"> |
|
216 | <div class="label label-checkbox"> | |
217 | <label>${_('Hooks')}:</label> |
|
217 | <label>${_('Hooks')}:</label> | |
218 | </div> |
|
218 | </div> | |
219 | <div class="checkboxes"> |
|
219 | <div class="checkboxes"> | |
220 | <div class="checkbox"> |
|
220 | <div class="checkbox"> | |
221 | ${h.checkbox('hooks_changegroup_update','True')} |
|
221 | ${h.checkbox('hooks_changegroup_update','True')} | |
222 | <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> | |
223 | </div> |
|
223 | </div> | |
224 | <div class="checkbox"> |
|
224 | <div class="checkbox"> | |
225 | ${h.checkbox('hooks_changegroup_repo_size','True')} |
|
225 | ${h.checkbox('hooks_changegroup_repo_size','True')} | |
226 | <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> | |
227 | </div> |
|
227 | </div> | |
228 | <div class="checkbox"> |
|
228 | <div class="checkbox"> | |
229 | ${h.checkbox('hooks_changegroup_push_logger','True')} |
|
229 | ${h.checkbox('hooks_changegroup_push_logger','True')} | |
230 | <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label> |
|
230 | <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label> | |
231 | </div> |
|
231 | </div> | |
232 | <div class="checkbox"> |
|
232 | <div class="checkbox"> | |
233 | ${h.checkbox('hooks_outgoing_pull_logger','True')} |
|
233 | ${h.checkbox('hooks_outgoing_pull_logger','True')} | |
234 | <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label> |
|
234 | <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label> | |
235 | </div> |
|
235 | </div> | |
236 | </div> |
|
236 | </div> | |
237 | <div class="input" style="margin-top:10px"> |
|
237 | <div class="input" style="margin-top:10px"> | |
238 | ${h.link_to(_('Advanced setup'),url('admin_edit_setting',setting_id='hooks'))} |
|
238 | ${h.link_to(_('Advanced setup'),url('admin_edit_setting',setting_id='hooks'))} | |
239 | </div> |
|
239 | </div> | |
240 | </div> |
|
240 | </div> | |
241 | <div class="field"> |
|
241 | <div class="field"> | |
242 | <div class="label label-checkbox"> |
|
242 | <div class="label label-checkbox"> | |
243 | <label>${_('Mercurial Extensions')}:</label> |
|
243 | <label>${_('Mercurial Extensions')}:</label> | |
244 | </div> |
|
244 | </div> | |
245 | <div class="checkboxes"> |
|
245 | <div class="checkboxes"> | |
246 | <div class="checkbox"> |
|
246 | <div class="checkbox"> | |
247 | ${h.checkbox('extensions_largefiles','True')} |
|
247 | ${h.checkbox('extensions_largefiles','True')} | |
248 | <label for="extensions_largefiles">${_('Enable largefiles extension')}</label> |
|
248 | <label for="extensions_largefiles">${_('Enable largefiles extension')}</label> | |
249 | </div> |
|
249 | </div> | |
250 | <div class="checkbox"> |
|
250 | <div class="checkbox"> | |
251 | ${h.checkbox('extensions_hgsubversion','True')} |
|
251 | ${h.checkbox('extensions_hgsubversion','True')} | |
252 | <label for="extensions_hgsubversion">${_('Enable hgsubversion extension')}</label> |
|
252 | <label for="extensions_hgsubversion">${_('Enable hgsubversion extension')}</label> | |
253 | </div> |
|
253 | </div> | |
254 | <span class="help-block">${_('Requires hgsubversion library installed. Allows cloning from svn remote locations')}</span> |
|
254 | <span class="help-block">${_('Requires hgsubversion library installed. Allows cloning from svn remote locations')}</span> | |
255 | ##<div class="checkbox"> |
|
255 | ##<div class="checkbox"> | |
256 | ## ${h.checkbox('extensions_hggit','True')} |
|
256 | ## ${h.checkbox('extensions_hggit','True')} | |
257 | ## <label for="extensions_hggit">${_('Enable hg-git extension')}</label> |
|
257 | ## <label for="extensions_hggit">${_('Enable hg-git extension')}</label> | |
258 | ##</div> |
|
258 | ##</div> | |
259 | ##<span class="help-block">${_('Requires hg-git library installed. Allows cloning from git remote locations')}</span> |
|
259 | ##<span class="help-block">${_('Requires hg-git library installed. Allows cloning from git remote locations')}</span> | |
260 | </div> |
|
260 | </div> | |
261 | </div> |
|
261 | </div> | |
262 | <div class="field"> |
|
262 | <div class="field"> | |
263 | <div class="label"> |
|
263 | <div class="label"> | |
264 | <label for="paths_root_path">${_('Repositories location')}:</label> |
|
264 | <label for="paths_root_path">${_('Repositories location')}:</label> | |
265 | </div> |
|
265 | </div> | |
266 | <div class="input"> |
|
266 | <div class="input"> | |
267 | ${h.text('paths_root_path',size=30,readonly="readonly")} |
|
267 | ${h.text('paths_root_path',size=30,readonly="readonly")} | |
268 | <span id="path_unlock" class="tooltip" |
|
268 | <span id="path_unlock" class="tooltip" | |
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.'))}"> |
|
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.'))}"> | |
270 | ${_('unlock')} |
|
270 | ${_('unlock')} | |
271 | </span> |
|
271 | </span> | |
272 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> |
|
272 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> | |
273 | </div> |
|
273 | </div> | |
274 | </div> |
|
274 | </div> | |
275 |
|
275 | |||
276 | <div class="buttons"> |
|
276 | <div class="buttons"> | |
277 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
277 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
278 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
278 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
279 | </div> |
|
279 | </div> | |
280 | </div> |
|
280 | </div> | |
281 | </div> |
|
281 | </div> | |
282 | ${h.end_form()} |
|
282 | ${h.end_form()} | |
283 |
|
283 | |||
284 | <script type="text/javascript"> |
|
284 | <script type="text/javascript"> | |
285 | YAHOO.util.Event.onDOMReady(function(){ |
|
285 | YAHOO.util.Event.onDOMReady(function(){ | |
286 | YAHOO.util.Event.addListener('path_unlock','click',function(){ |
|
286 | YAHOO.util.Event.addListener('path_unlock','click',function(){ | |
287 | YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly'); |
|
287 | YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly'); | |
288 | }); |
|
288 | }); | |
289 | }); |
|
289 | }); | |
290 | </script> |
|
290 | </script> | |
291 |
|
291 | |||
292 | <h3>${_('Test Email')}</h3> |
|
292 | <h3>${_('Test Email')}</h3> | |
293 | ${h.form(url('admin_setting', setting_id='email'),method='put')} |
|
293 | ${h.form(url('admin_setting', setting_id='email'),method='put')} | |
294 | <div class="form"> |
|
294 | <div class="form"> | |
295 | <!-- fields --> |
|
295 | <!-- fields --> | |
296 |
|
296 | |||
297 | <div class="fields"> |
|
297 | <div class="fields"> | |
298 | <div class="field"> |
|
298 | <div class="field"> | |
299 | <div class="label"> |
|
299 | <div class="label"> | |
300 | <label for="test_email">${_('Email to')}:</label> |
|
300 | <label for="test_email">${_('Email to')}:</label> | |
301 | </div> |
|
301 | </div> | |
302 | <div class="input"> |
|
302 | <div class="input"> | |
303 | ${h.text('test_email',size=30)} |
|
303 | ${h.text('test_email',size=30)} | |
304 | </div> |
|
304 | </div> | |
305 | </div> |
|
305 | </div> | |
306 |
|
306 | |||
307 | <div class="buttons"> |
|
307 | <div class="buttons"> | |
308 | ${h.submit('send',_('Send'),class_="ui-btn large")} |
|
308 | ${h.submit('send',_('Send'),class_="ui-btn large")} | |
309 | </div> |
|
309 | </div> | |
310 | </div> |
|
310 | </div> | |
311 | </div> |
|
311 | </div> | |
312 | ${h.end_form()} |
|
312 | ${h.end_form()} | |
313 |
|
313 | |||
314 | <h3>${_('System Info and Packages')}</h3> |
|
314 | <h3>${_('System Info and Packages')}</h3> | |
315 | <div class="form"> |
|
315 | <div class="form"> | |
316 | <div> |
|
316 | <div> | |
317 | <h5 id="expand_modules" style="cursor: pointer">↓ ${_('Show')} ↓</h5> |
|
317 | <h5 id="expand_modules" style="cursor: pointer">↓ ${_('Show')} ↓</h5> | |
318 | </div> |
|
318 | </div> | |
319 | <div id="expand_modules_table" style="display:none"> |
|
319 | <div id="expand_modules_table" style="display:none"> | |
320 | <h5>Python - ${c.py_version}</h5> |
|
320 | <h5>Python - ${c.py_version}</h5> | |
321 | <h5>System - ${c.platform}</h5> |
|
321 | <h5>System - ${c.platform}</h5> | |
322 |
|
322 | |||
323 | <table class="table" style="margin:0px 0px 0px 20px"> |
|
323 | <table class="table" style="margin:0px 0px 0px 20px"> | |
324 | <colgroup> |
|
324 | <colgroup> | |
325 | <col style="width:220px"> |
|
325 | <col style="width:220px"> | |
326 | </colgroup> |
|
326 | </colgroup> | |
327 | <tbody> |
|
327 | <tbody> | |
328 | %for key, value in c.modules: |
|
328 | %for key, value in c.modules: | |
329 | <tr> |
|
329 | <tr> | |
330 | <th style="text-align: right;padding-right:5px;">${key}</th> |
|
330 | <th style="text-align: right;padding-right:5px;">${key}</th> | |
331 | <td>${value}</td> |
|
331 | <td>${value}</td> | |
332 | </tr> |
|
332 | </tr> | |
333 | %endfor |
|
333 | %endfor | |
334 | </tbody> |
|
334 | </tbody> | |
335 | </table> |
|
335 | </table> | |
336 | </div> |
|
336 | </div> | |
337 | </div> |
|
337 | </div> | |
338 |
|
338 | |||
339 | <script type="text/javascript"> |
|
339 | <script type="text/javascript"> | |
340 | YUE.on('expand_modules','click',function(e){ |
|
340 | YUE.on('expand_modules','click',function(e){ | |
341 | YUD.setStyle('expand_modules_table','display',''); |
|
341 | YUD.setStyle('expand_modules_table','display',''); | |
342 | YUD.setStyle('expand_modules','display','none'); |
|
342 | YUD.setStyle('expand_modules','display','none'); | |
343 | }) |
|
343 | }) | |
344 | </script> |
|
344 | </script> | |
345 |
|
345 | |||
346 | </div> |
|
346 | </div> | |
347 | </%def> |
|
347 | </%def> |
@@ -1,100 +1,100 | |||||
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 |
${_('Add user')} |
|
5 | ${_('Add user')} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(_('Users'),h.url('users'))} |
|
10 | ${h.link_to(_('Users'),h.url('users'))} | |
11 | » |
|
11 | » | |
12 | ${_('add new user')} |
|
12 | ${_('add new user')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
16 | ${self.menu('admin')} |
|
16 | ${self.menu('admin')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
24 | </div> |
|
24 | </div> | |
25 | <!-- end box / title --> |
|
25 | <!-- end box / title --> | |
26 | ${h.form(url('users'))} |
|
26 | ${h.form(url('users'))} | |
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="username">${_('Username')}:</label> |
|
32 | <label for="username">${_('Username')}:</label> | |
33 | </div> |
|
33 | </div> | |
34 | <div class="input"> |
|
34 | <div class="input"> | |
35 | ${h.text('username',class_='small')} |
|
35 | ${h.text('username',class_='small')} | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 |
|
38 | |||
39 | <div class="field"> |
|
39 | <div class="field"> | |
40 | <div class="label"> |
|
40 | <div class="label"> | |
41 | <label for="password">${_('Password')}:</label> |
|
41 | <label for="password">${_('Password')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 | <div class="input"> |
|
43 | <div class="input"> | |
44 | ${h.password('password',class_='small')} |
|
44 | ${h.password('password',class_='small')} | |
45 | </div> |
|
45 | </div> | |
46 | </div> |
|
46 | </div> | |
47 |
|
47 | |||
48 | <div class="field"> |
|
48 | <div class="field"> | |
49 | <div class="label"> |
|
49 | <div class="label"> | |
50 | <label for="password_confirmation">${_('Password confirmation')}:</label> |
|
50 | <label for="password_confirmation">${_('Password confirmation')}:</label> | |
51 | </div> |
|
51 | </div> | |
52 | <div class="input"> |
|
52 | <div class="input"> | |
53 | ${h.password('password_confirmation',class_="small",autocomplete="off")} |
|
53 | ${h.password('password_confirmation',class_="small",autocomplete="off")} | |
54 | </div> |
|
54 | </div> | |
55 | </div> |
|
55 | </div> | |
56 |
|
56 | |||
57 | <div class="field"> |
|
57 | <div class="field"> | |
58 | <div class="label"> |
|
58 | <div class="label"> | |
59 | <label for="firstname">${_('First Name')}:</label> |
|
59 | <label for="firstname">${_('First Name')}:</label> | |
60 | </div> |
|
60 | </div> | |
61 | <div class="input"> |
|
61 | <div class="input"> | |
62 | ${h.text('firstname',class_='small')} |
|
62 | ${h.text('firstname',class_='small')} | |
63 | </div> |
|
63 | </div> | |
64 | </div> |
|
64 | </div> | |
65 |
|
65 | |||
66 | <div class="field"> |
|
66 | <div class="field"> | |
67 | <div class="label"> |
|
67 | <div class="label"> | |
68 | <label for="lastname">${_('Last Name')}:</label> |
|
68 | <label for="lastname">${_('Last Name')}:</label> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="input"> |
|
70 | <div class="input"> | |
71 | ${h.text('lastname',class_='small')} |
|
71 | ${h.text('lastname',class_='small')} | |
72 | </div> |
|
72 | </div> | |
73 | </div> |
|
73 | </div> | |
74 |
|
74 | |||
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label"> |
|
76 | <div class="label"> | |
77 | <label for="email">${_('Email')}:</label> |
|
77 | <label for="email">${_('Email')}:</label> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="input"> |
|
79 | <div class="input"> | |
80 | ${h.text('email',class_='small')} |
|
80 | ${h.text('email',class_='small')} | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 |
|
83 | |||
84 | <div class="field"> |
|
84 | <div class="field"> | |
85 | <div class="label label-checkbox"> |
|
85 | <div class="label label-checkbox"> | |
86 | <label for="active">${_('Active')}:</label> |
|
86 | <label for="active">${_('Active')}:</label> | |
87 | </div> |
|
87 | </div> | |
88 | <div class="checkboxes"> |
|
88 | <div class="checkboxes"> | |
89 | ${h.checkbox('active',value=True,checked='checked')} |
|
89 | ${h.checkbox('active',value=True,checked='checked')} | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 |
|
92 | |||
93 | <div class="buttons"> |
|
93 | <div class="buttons"> | |
94 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
94 | ${h.submit('save',_('save'),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,343 +1,343 | |||||
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 user')} ${c.user.username} |
|
5 | ${_('Edit user')} ${c.user.username} · ${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 | ${h.link_to(_('Users'),h.url('users'))} |
|
11 | ${h.link_to(_('Users'),h.url('users'))} | |
12 | » |
|
12 | » | |
13 | ${_('edit')} "${c.user.username}" |
|
13 | ${_('edit')} "${c.user.username}" | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('admin')} |
|
17 | ${self.menu('admin')} | |
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 | <!-- end box / title --> |
|
26 | <!-- end box / title --> | |
27 | ${h.form(url('update_user', id=c.user.user_id),method='put')} |
|
27 | ${h.form(url('update_user', id=c.user.user_id),method='put')} | |
28 | <div class="form"> |
|
28 | <div class="form"> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="gravatar_box"> |
|
30 | <div class="gravatar_box"> | |
31 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> |
|
31 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> | |
32 | <p> |
|
32 | <p> | |
33 | %if c.use_gravatar: |
|
33 | %if c.use_gravatar: | |
34 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> |
|
34 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> | |
35 | <br/>${_('Using')} ${c.user.email} |
|
35 | <br/>${_('Using')} ${c.user.email} | |
36 | %else: |
|
36 | %else: | |
37 | <br/>${c.user.email} |
|
37 | <br/>${c.user.email} | |
38 | %endif |
|
38 | %endif | |
39 | </div> |
|
39 | </div> | |
40 | </div> |
|
40 | </div> | |
41 | <div class="field"> |
|
41 | <div class="field"> | |
42 | <div class="label"> |
|
42 | <div class="label"> | |
43 | <label>${_('API key')}:</label> ${c.user.api_key} |
|
43 | <label>${_('API key')}:</label> ${c.user.api_key} | |
44 | </div> |
|
44 | </div> | |
45 | </div> |
|
45 | </div> | |
46 | ##show current ip just if we show ourself |
|
46 | ##show current ip just if we show ourself | |
47 | %if c.rhodecode_user.username == c.user.username: |
|
47 | %if c.rhodecode_user.username == c.user.username: | |
48 | <div class="field"> |
|
48 | <div class="field"> | |
49 | <div class="label"> |
|
49 | <div class="label"> | |
50 | <label>${_('Current IP')}:</label> ${c.perm_user.ip_addr or "?"} |
|
50 | <label>${_('Current IP')}:</label> ${c.perm_user.ip_addr or "?"} | |
51 | </div> |
|
51 | </div> | |
52 | </div> |
|
52 | </div> | |
53 | %endif |
|
53 | %endif | |
54 | <div class="fields"> |
|
54 | <div class="fields"> | |
55 | <div class="field"> |
|
55 | <div class="field"> | |
56 | <div class="label"> |
|
56 | <div class="label"> | |
57 | <label for="username">${_('Username')}:</label> |
|
57 | <label for="username">${_('Username')}:</label> | |
58 | </div> |
|
58 | </div> | |
59 | <div class="input"> |
|
59 | <div class="input"> | |
60 | %if c.ldap_dn: |
|
60 | %if c.ldap_dn: | |
61 | ${h.text('username',class_='medium disabled', readonly="readonly")} |
|
61 | ${h.text('username',class_='medium disabled', readonly="readonly")} | |
62 | %else: |
|
62 | %else: | |
63 | ${h.text('username',class_='medium')} |
|
63 | ${h.text('username',class_='medium')} | |
64 | %endif: |
|
64 | %endif: | |
65 | </div> |
|
65 | </div> | |
66 | </div> |
|
66 | </div> | |
67 |
|
67 | |||
68 | <div class="field"> |
|
68 | <div class="field"> | |
69 | <div class="label"> |
|
69 | <div class="label"> | |
70 | <label for="ldap_dn">${_('LDAP DN')}:</label> |
|
70 | <label for="ldap_dn">${_('LDAP DN')}:</label> | |
71 | </div> |
|
71 | </div> | |
72 | <div class="input"> |
|
72 | <div class="input"> | |
73 | ${h.text('ldap_dn',class_='medium disabled',readonly="readonly")} |
|
73 | ${h.text('ldap_dn',class_='medium disabled',readonly="readonly")} | |
74 | </div> |
|
74 | </div> | |
75 | </div> |
|
75 | </div> | |
76 |
|
76 | |||
77 | <div class="field"> |
|
77 | <div class="field"> | |
78 | <div class="label"> |
|
78 | <div class="label"> | |
79 | <label for="new_password">${_('New password')}:</label> |
|
79 | <label for="new_password">${_('New password')}:</label> | |
80 | </div> |
|
80 | </div> | |
81 | <div class="input"> |
|
81 | <div class="input"> | |
82 | ${h.password('new_password',class_='medium',autocomplete="off")} |
|
82 | ${h.password('new_password',class_='medium',autocomplete="off")} | |
83 | </div> |
|
83 | </div> | |
84 | </div> |
|
84 | </div> | |
85 |
|
85 | |||
86 | <div class="field"> |
|
86 | <div class="field"> | |
87 | <div class="label"> |
|
87 | <div class="label"> | |
88 | <label for="password_confirmation">${_('New password confirmation')}:</label> |
|
88 | <label for="password_confirmation">${_('New password confirmation')}:</label> | |
89 | </div> |
|
89 | </div> | |
90 | <div class="input"> |
|
90 | <div class="input"> | |
91 | ${h.password('password_confirmation',class_="medium",autocomplete="off")} |
|
91 | ${h.password('password_confirmation',class_="medium",autocomplete="off")} | |
92 | </div> |
|
92 | </div> | |
93 | </div> |
|
93 | </div> | |
94 |
|
94 | |||
95 | <div class="field"> |
|
95 | <div class="field"> | |
96 | <div class="label"> |
|
96 | <div class="label"> | |
97 | <label for="firstname">${_('First Name')}:</label> |
|
97 | <label for="firstname">${_('First Name')}:</label> | |
98 | </div> |
|
98 | </div> | |
99 | <div class="input"> |
|
99 | <div class="input"> | |
100 | ${h.text('firstname',class_='medium')} |
|
100 | ${h.text('firstname',class_='medium')} | |
101 | </div> |
|
101 | </div> | |
102 | </div> |
|
102 | </div> | |
103 |
|
103 | |||
104 | <div class="field"> |
|
104 | <div class="field"> | |
105 | <div class="label"> |
|
105 | <div class="label"> | |
106 | <label for="lastname">${_('Last Name')}:</label> |
|
106 | <label for="lastname">${_('Last Name')}:</label> | |
107 | </div> |
|
107 | </div> | |
108 | <div class="input"> |
|
108 | <div class="input"> | |
109 | ${h.text('lastname',class_='medium')} |
|
109 | ${h.text('lastname',class_='medium')} | |
110 | </div> |
|
110 | </div> | |
111 | </div> |
|
111 | </div> | |
112 |
|
112 | |||
113 | <div class="field"> |
|
113 | <div class="field"> | |
114 | <div class="label"> |
|
114 | <div class="label"> | |
115 | <label for="email">${_('Email')}:</label> |
|
115 | <label for="email">${_('Email')}:</label> | |
116 | </div> |
|
116 | </div> | |
117 | <div class="input"> |
|
117 | <div class="input"> | |
118 | ${h.text('email',class_='medium')} |
|
118 | ${h.text('email',class_='medium')} | |
119 | </div> |
|
119 | </div> | |
120 | </div> |
|
120 | </div> | |
121 |
|
121 | |||
122 | <div class="field"> |
|
122 | <div class="field"> | |
123 | <div class="label label-checkbox"> |
|
123 | <div class="label label-checkbox"> | |
124 | <label for="active">${_('Active')}:</label> |
|
124 | <label for="active">${_('Active')}:</label> | |
125 | </div> |
|
125 | </div> | |
126 | <div class="checkboxes"> |
|
126 | <div class="checkboxes"> | |
127 | ${h.checkbox('active',value=True)} |
|
127 | ${h.checkbox('active',value=True)} | |
128 | </div> |
|
128 | </div> | |
129 | </div> |
|
129 | </div> | |
130 |
|
130 | |||
131 | <div class="field"> |
|
131 | <div class="field"> | |
132 | <div class="label label-checkbox"> |
|
132 | <div class="label label-checkbox"> | |
133 | <label for="admin">${_('Admin')}:</label> |
|
133 | <label for="admin">${_('Admin')}:</label> | |
134 | </div> |
|
134 | </div> | |
135 | <div class="checkboxes"> |
|
135 | <div class="checkboxes"> | |
136 | ${h.checkbox('admin',value=True)} |
|
136 | ${h.checkbox('admin',value=True)} | |
137 | </div> |
|
137 | </div> | |
138 | </div> |
|
138 | </div> | |
139 | <div class="buttons"> |
|
139 | <div class="buttons"> | |
140 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
140 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
141 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
141 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
142 | </div> |
|
142 | </div> | |
143 | </div> |
|
143 | </div> | |
144 | </div> |
|
144 | </div> | |
145 | ${h.end_form()} |
|
145 | ${h.end_form()} | |
146 | </div> |
|
146 | </div> | |
147 | <div style="min-height:780px" class="box box-right"> |
|
147 | <div style="min-height:780px" class="box box-right"> | |
148 | <!-- box / title --> |
|
148 | <!-- box / title --> | |
149 | <div class="title"> |
|
149 | <div class="title"> | |
150 | <h5>${_('Permissions')}</h5> |
|
150 | <h5>${_('Permissions')}</h5> | |
151 | </div> |
|
151 | </div> | |
152 | ${h.form(url('user_perm', id=c.user.user_id),method='put')} |
|
152 | ${h.form(url('user_perm', id=c.user.user_id),method='put')} | |
153 | <div class="form"> |
|
153 | <div class="form"> | |
154 | <!-- fields --> |
|
154 | <!-- fields --> | |
155 | <div class="fields"> |
|
155 | <div class="fields"> | |
156 | <div class="field"> |
|
156 | <div class="field"> | |
157 | <div class="label label-checkbox"> |
|
157 | <div class="label label-checkbox"> | |
158 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> |
|
158 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> | |
159 | </div> |
|
159 | </div> | |
160 | <div class="checkboxes"> |
|
160 | <div class="checkboxes"> | |
161 | ${h.checkbox('inherit_default_permissions',value=True)} |
|
161 | ${h.checkbox('inherit_default_permissions',value=True)} | |
162 | </div> |
|
162 | </div> | |
163 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' |
|
163 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' | |
164 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> |
|
164 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> | |
165 | </div> |
|
165 | </div> | |
166 | <div id="inherit_overlay" style="${'opacity:0.3' if c.user.inherit_default_permissions else ''}" > |
|
166 | <div id="inherit_overlay" style="${'opacity:0.3' if c.user.inherit_default_permissions else ''}" > | |
167 | <div class="field"> |
|
167 | <div class="field"> | |
168 | <div class="label label-checkbox"> |
|
168 | <div class="label label-checkbox"> | |
169 | <label for="create_repo_perm">${_('Create repositories')}:</label> |
|
169 | <label for="create_repo_perm">${_('Create repositories')}:</label> | |
170 | </div> |
|
170 | </div> | |
171 | <div class="checkboxes"> |
|
171 | <div class="checkboxes"> | |
172 | ${h.checkbox('create_repo_perm',value=True)} |
|
172 | ${h.checkbox('create_repo_perm',value=True)} | |
173 | </div> |
|
173 | </div> | |
174 | </div> |
|
174 | </div> | |
175 | <div class="field"> |
|
175 | <div class="field"> | |
176 | <div class="label label-checkbox"> |
|
176 | <div class="label label-checkbox"> | |
177 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> |
|
177 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> | |
178 | </div> |
|
178 | </div> | |
179 | <div class="checkboxes"> |
|
179 | <div class="checkboxes"> | |
180 | ${h.checkbox('fork_repo_perm',value=True)} |
|
180 | ${h.checkbox('fork_repo_perm',value=True)} | |
181 | </div> |
|
181 | </div> | |
182 | </div> |
|
182 | </div> | |
183 | </div> |
|
183 | </div> | |
184 | <div class="buttons"> |
|
184 | <div class="buttons"> | |
185 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
185 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
186 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
186 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
187 | </div> |
|
187 | </div> | |
188 | </div> |
|
188 | </div> | |
189 | </div> |
|
189 | </div> | |
190 | ${h.end_form()} |
|
190 | ${h.end_form()} | |
191 |
|
191 | |||
192 | ## permissions overview |
|
192 | ## permissions overview | |
193 | <div id="perms" class="table"> |
|
193 | <div id="perms" class="table"> | |
194 | %for section in sorted(c.perm_user.permissions.keys()): |
|
194 | %for section in sorted(c.perm_user.permissions.keys()): | |
195 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
195 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
196 | %if not c.perm_user.permissions[section]: |
|
196 | %if not c.perm_user.permissions[section]: | |
197 | <span class="empty_data">${_('Nothing here yet')}</span> |
|
197 | <span class="empty_data">${_('Nothing here yet')}</span> | |
198 | %else: |
|
198 | %else: | |
199 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
199 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
200 | <table id="tbl_list_${section}"> |
|
200 | <table id="tbl_list_${section}"> | |
201 | <thead> |
|
201 | <thead> | |
202 | <tr> |
|
202 | <tr> | |
203 | <th class="left">${_('Name')}</th> |
|
203 | <th class="left">${_('Name')}</th> | |
204 | <th class="left">${_('Permission')}</th> |
|
204 | <th class="left">${_('Permission')}</th> | |
205 | <th class="left">${_('Edit Permission')}</th> |
|
205 | <th class="left">${_('Edit Permission')}</th> | |
206 | </thead> |
|
206 | </thead> | |
207 | <tbody> |
|
207 | <tbody> | |
208 | %for k in c.perm_user.permissions[section]: |
|
208 | %for k in c.perm_user.permissions[section]: | |
209 | <% |
|
209 | <% | |
210 | if section != 'global': |
|
210 | if section != 'global': | |
211 | section_perm = c.perm_user.permissions[section].get(k) |
|
211 | section_perm = c.perm_user.permissions[section].get(k) | |
212 | _perm = section_perm.split('.')[-1] |
|
212 | _perm = section_perm.split('.')[-1] | |
213 | else: |
|
213 | else: | |
214 | _perm = section_perm = None |
|
214 | _perm = section_perm = None | |
215 | %> |
|
215 | %> | |
216 | <tr> |
|
216 | <tr> | |
217 | <td> |
|
217 | <td> | |
218 | %if section == 'repositories': |
|
218 | %if section == 'repositories': | |
219 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
219 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
220 | %elif section == 'repositories_groups': |
|
220 | %elif section == 'repositories_groups': | |
221 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
221 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
222 | %else: |
|
222 | %else: | |
223 | ${h.get_permission_name(k)} |
|
223 | ${h.get_permission_name(k)} | |
224 | %endif |
|
224 | %endif | |
225 | </td> |
|
225 | </td> | |
226 | <td> |
|
226 | <td> | |
227 | %if section == 'global': |
|
227 | %if section == 'global': | |
228 | ${h.bool2icon(k.split('.')[-1] != 'none')} |
|
228 | ${h.bool2icon(k.split('.')[-1] != 'none')} | |
229 | %else: |
|
229 | %else: | |
230 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
230 | <span class="perm_tag ${_perm}">${section_perm}</span> | |
231 | %endif |
|
231 | %endif | |
232 | </td> |
|
232 | </td> | |
233 | <td> |
|
233 | <td> | |
234 | %if section == 'repositories': |
|
234 | %if section == 'repositories': | |
235 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
235 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
236 | %elif section == 'repositories_groups': |
|
236 | %elif section == 'repositories_groups': | |
237 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
237 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
238 | %else: |
|
238 | %else: | |
239 | -- |
|
239 | -- | |
240 | %endif |
|
240 | %endif | |
241 | </td> |
|
241 | </td> | |
242 | </tr> |
|
242 | </tr> | |
243 | %endfor |
|
243 | %endfor | |
244 | </tbody> |
|
244 | </tbody> | |
245 | </table> |
|
245 | </table> | |
246 | </div> |
|
246 | </div> | |
247 | %endif |
|
247 | %endif | |
248 | %endfor |
|
248 | %endfor | |
249 | </div> |
|
249 | </div> | |
250 | </div> |
|
250 | </div> | |
251 | <div class="box box-left" style="clear:left"> |
|
251 | <div class="box box-left" style="clear:left"> | |
252 | <!-- box / title --> |
|
252 | <!-- box / title --> | |
253 | <div class="title"> |
|
253 | <div class="title"> | |
254 | <h5>${_('Email addresses')}</h5> |
|
254 | <h5>${_('Email addresses')}</h5> | |
255 | </div> |
|
255 | </div> | |
256 |
|
256 | |||
257 | <div class="emails_wrap"> |
|
257 | <div class="emails_wrap"> | |
258 | <table class="noborder"> |
|
258 | <table class="noborder"> | |
259 | %for em in c.user_email_map: |
|
259 | %for em in c.user_email_map: | |
260 | <tr> |
|
260 | <tr> | |
261 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(em.user.email,16)}"/> </div></td> |
|
261 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(em.user.email,16)}"/> </div></td> | |
262 | <td><div class="email">${em.email}</div></td> |
|
262 | <td><div class="email">${em.email}</div></td> | |
263 | <td> |
|
263 | <td> | |
264 | ${h.form(url('user_emails_delete', id=c.user.user_id),method='delete')} |
|
264 | ${h.form(url('user_emails_delete', id=c.user.user_id),method='delete')} | |
265 | ${h.hidden('del_email',em.email_id)} |
|
265 | ${h.hidden('del_email',em.email_id)} | |
266 | ${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id, |
|
266 | ${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id, | |
267 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this email: %s') % em.email+"');")} |
|
267 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this email: %s') % em.email+"');")} | |
268 | ${h.end_form()} |
|
268 | ${h.end_form()} | |
269 | </td> |
|
269 | </td> | |
270 | </tr> |
|
270 | </tr> | |
271 | %endfor |
|
271 | %endfor | |
272 | </table> |
|
272 | </table> | |
273 | </div> |
|
273 | </div> | |
274 |
|
274 | |||
275 | ${h.form(url('user_emails', id=c.user.user_id),method='put')} |
|
275 | ${h.form(url('user_emails', id=c.user.user_id),method='put')} | |
276 | <div class="form"> |
|
276 | <div class="form"> | |
277 | <!-- fields --> |
|
277 | <!-- fields --> | |
278 | <div class="fields"> |
|
278 | <div class="fields"> | |
279 | <div class="field"> |
|
279 | <div class="field"> | |
280 | <div class="label"> |
|
280 | <div class="label"> | |
281 | <label for="new_email">${_('New email address')}:</label> |
|
281 | <label for="new_email">${_('New email address')}:</label> | |
282 | </div> |
|
282 | </div> | |
283 | <div class="input"> |
|
283 | <div class="input"> | |
284 | ${h.text('new_email', class_='medium')} |
|
284 | ${h.text('new_email', class_='medium')} | |
285 | </div> |
|
285 | </div> | |
286 | </div> |
|
286 | </div> | |
287 | <div class="buttons"> |
|
287 | <div class="buttons"> | |
288 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
288 | ${h.submit('save',_('Add'),class_="ui-btn large")} | |
289 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
289 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
290 | </div> |
|
290 | </div> | |
291 | </div> |
|
291 | </div> | |
292 | </div> |
|
292 | </div> | |
293 | ${h.end_form()} |
|
293 | ${h.end_form()} | |
294 | </div> |
|
294 | </div> | |
295 | <div class="box box-left" style="clear:left"> |
|
295 | <div class="box box-left" style="clear:left"> | |
296 | <!-- box / title --> |
|
296 | <!-- box / title --> | |
297 | <div class="title"> |
|
297 | <div class="title"> | |
298 | <h5>${_('Allowed IP addresses')}</h5> |
|
298 | <h5>${_('Allowed IP addresses')}</h5> | |
299 | </div> |
|
299 | </div> | |
300 |
|
300 | |||
301 | <div class="ips_wrap"> |
|
301 | <div class="ips_wrap"> | |
302 | <table class="noborder"> |
|
302 | <table class="noborder"> | |
303 | %if c.user_ip_map: |
|
303 | %if c.user_ip_map: | |
304 | %for ip in c.user_ip_map: |
|
304 | %for ip in c.user_ip_map: | |
305 | <tr> |
|
305 | <tr> | |
306 | <td><div class="ip">${ip.ip_addr}</div></td> |
|
306 | <td><div class="ip">${ip.ip_addr}</div></td> | |
307 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> |
|
307 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> | |
308 | <td> |
|
308 | <td> | |
309 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} |
|
309 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} | |
310 | ${h.hidden('del_ip',ip.ip_id)} |
|
310 | ${h.hidden('del_ip',ip.ip_id)} | |
311 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, |
|
311 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, | |
312 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} |
|
312 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} | |
313 | ${h.end_form()} |
|
313 | ${h.end_form()} | |
314 | </td> |
|
314 | </td> | |
315 | </tr> |
|
315 | </tr> | |
316 | %endfor |
|
316 | %endfor | |
317 | %else: |
|
317 | %else: | |
318 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> |
|
318 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> | |
319 | %endif |
|
319 | %endif | |
320 | </table> |
|
320 | </table> | |
321 | </div> |
|
321 | </div> | |
322 |
|
322 | |||
323 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} |
|
323 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} | |
324 | <div class="form"> |
|
324 | <div class="form"> | |
325 | <!-- fields --> |
|
325 | <!-- fields --> | |
326 | <div class="fields"> |
|
326 | <div class="fields"> | |
327 | <div class="field"> |
|
327 | <div class="field"> | |
328 | <div class="label"> |
|
328 | <div class="label"> | |
329 | <label for="new_ip">${_('New ip address')}:</label> |
|
329 | <label for="new_ip">${_('New ip address')}:</label> | |
330 | </div> |
|
330 | </div> | |
331 | <div class="input"> |
|
331 | <div class="input"> | |
332 | ${h.text('new_ip', class_='medium')} |
|
332 | ${h.text('new_ip', class_='medium')} | |
333 | </div> |
|
333 | </div> | |
334 | </div> |
|
334 | </div> | |
335 | <div class="buttons"> |
|
335 | <div class="buttons"> | |
336 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
336 | ${h.submit('save',_('Add'),class_="ui-btn large")} | |
337 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
337 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
338 | </div> |
|
338 | </div> | |
339 | </div> |
|
339 | </div> | |
340 | </div> |
|
340 | </div> | |
341 | ${h.end_form()} |
|
341 | ${h.end_form()} | |
342 | </div> |
|
342 | </div> | |
343 | </%def> |
|
343 | </%def> |
@@ -1,284 +1,284 | |||||
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 |
${_('My account')} ${c.rhodecode_user.username} |
|
5 | ${_('My account')} ${c.rhodecode_user.username} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${_('My Account')} |
|
9 | ${_('My Account')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 |
|
17 | |||
18 | <div class="box box-left"> |
|
18 | <div class="box box-left"> | |
19 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
20 | <div class="title"> |
|
20 | <div class="title"> | |
21 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
22 | </div> |
|
22 | </div> | |
23 | <!-- end box / title --> |
|
23 | <!-- end box / title --> | |
24 | ${c.form|n} |
|
24 | ${c.form|n} | |
25 | </div> |
|
25 | </div> | |
26 |
|
26 | |||
27 | <div class="box box-right"> |
|
27 | <div class="box box-right"> | |
28 | <!-- box / title --> |
|
28 | <!-- box / title --> | |
29 | <div class="title"> |
|
29 | <div class="title"> | |
30 | <h5> |
|
30 | <h5> | |
31 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> |
|
31 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> | |
32 | </h5> |
|
32 | </h5> | |
33 | <ul class="links" style="color:#DADADA"> |
|
33 | <ul class="links" style="color:#DADADA"> | |
34 | <li> |
|
34 | <li> | |
35 | <span><a id="show_perms" class="link-white current" href="#perms">${_('My permissions')}</a> </span> |
|
35 | <span><a id="show_perms" class="link-white current" href="#perms">${_('My permissions')}</a> </span> | |
36 | </li> |
|
36 | </li> | |
37 | <li> |
|
37 | <li> | |
38 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> |
|
38 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> | |
39 | </li> |
|
39 | </li> | |
40 | <li> |
|
40 | <li> | |
41 | <span><a id="show_pullrequests" class="link-white" href="#pullrequests">${_('My pull requests')}</a> </span> |
|
41 | <span><a id="show_pullrequests" class="link-white" href="#pullrequests">${_('My pull requests')}</a> </span> | |
42 | </li> |
|
42 | </li> | |
43 | </ul> |
|
43 | </ul> | |
44 | </div> |
|
44 | </div> | |
45 | <!-- end box / title --> |
|
45 | <!-- end box / title --> | |
46 | <div id="perms_container"> |
|
46 | <div id="perms_container"> | |
47 | <div id="perms" class="table"> |
|
47 | <div id="perms" class="table"> | |
48 | %for section in sorted(c.rhodecode_user.permissions.keys()): |
|
48 | %for section in sorted(c.rhodecode_user.permissions.keys()): | |
49 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
49 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
50 |
|
50 | |||
51 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
51 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
52 | <table id="tbl_list_${section}"> |
|
52 | <table id="tbl_list_${section}"> | |
53 | <thead> |
|
53 | <thead> | |
54 | <tr> |
|
54 | <tr> | |
55 | <th class="left">${_('Name')}</th> |
|
55 | <th class="left">${_('Name')}</th> | |
56 | <th class="left">${_('Permission')}</th> |
|
56 | <th class="left">${_('Permission')}</th> | |
57 | </thead> |
|
57 | </thead> | |
58 | <tbody> |
|
58 | <tbody> | |
59 | %for k in c.rhodecode_user.permissions[section]: |
|
59 | %for k in c.rhodecode_user.permissions[section]: | |
60 | <% |
|
60 | <% | |
61 | if section != 'global': |
|
61 | if section != 'global': | |
62 | section_perm = c.rhodecode_user.permissions[section].get(k) |
|
62 | section_perm = c.rhodecode_user.permissions[section].get(k) | |
63 | _perm = section_perm.split('.')[-1] |
|
63 | _perm = section_perm.split('.')[-1] | |
64 | else: |
|
64 | else: | |
65 | _perm = section_perm = None |
|
65 | _perm = section_perm = None | |
66 | %> |
|
66 | %> | |
67 | %if _perm not in ['none']: |
|
67 | %if _perm not in ['none']: | |
68 | <tr> |
|
68 | <tr> | |
69 | <td> |
|
69 | <td> | |
70 | %if section == 'repositories': |
|
70 | %if section == 'repositories': | |
71 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
71 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
72 | %elif section == 'repositories_groups': |
|
72 | %elif section == 'repositories_groups': | |
73 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
73 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
74 | %else: |
|
74 | %else: | |
75 | ${k} |
|
75 | ${k} | |
76 | %endif |
|
76 | %endif | |
77 | </td> |
|
77 | </td> | |
78 | <td> |
|
78 | <td> | |
79 | %if section == 'global': |
|
79 | %if section == 'global': | |
80 | ${h.bool2icon(True)} |
|
80 | ${h.bool2icon(True)} | |
81 | %else: |
|
81 | %else: | |
82 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
82 | <span class="perm_tag ${_perm}">${section_perm}</span> | |
83 | %endif |
|
83 | %endif | |
84 | </td> |
|
84 | </td> | |
85 | </tr> |
|
85 | </tr> | |
86 | %endif |
|
86 | %endif | |
87 | %endfor |
|
87 | %endfor | |
88 | </tbody> |
|
88 | </tbody> | |
89 | </table> |
|
89 | </table> | |
90 | </div> |
|
90 | </div> | |
91 | %endfor |
|
91 | %endfor | |
92 | </div> |
|
92 | </div> | |
93 | </div> |
|
93 | </div> | |
94 | <div id="my_container" style="display:none"> |
|
94 | <div id="my_container" style="display:none"> | |
95 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> |
|
95 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> | |
96 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
96 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
97 | </div> |
|
97 | </div> | |
98 | <div id="pullrequests_container" class="table" style="display:none"> |
|
98 | <div id="pullrequests_container" class="table" style="display:none"> | |
99 | ## loaded via AJAX |
|
99 | ## loaded via AJAX | |
100 | ${_('Loading...')} |
|
100 | ${_('Loading...')} | |
101 | </div> |
|
101 | </div> | |
102 | </div> |
|
102 | </div> | |
103 |
|
103 | |||
104 | <script type="text/javascript"> |
|
104 | <script type="text/javascript"> | |
105 | pyroutes.register('admin_settings_my_pullrequests', "${url('admin_settings_my_pullrequests')}", []); |
|
105 | pyroutes.register('admin_settings_my_pullrequests', "${url('admin_settings_my_pullrequests')}", []); | |
106 |
|
106 | |||
107 | var show_perms = function(e){ |
|
107 | var show_perms = function(e){ | |
108 | YUD.addClass('show_perms', 'current'); |
|
108 | YUD.addClass('show_perms', 'current'); | |
109 | YUD.removeClass('show_my','current'); |
|
109 | YUD.removeClass('show_my','current'); | |
110 | YUD.removeClass('show_pullrequests','current'); |
|
110 | YUD.removeClass('show_pullrequests','current'); | |
111 |
|
111 | |||
112 | YUD.setStyle('my_container','display','none'); |
|
112 | YUD.setStyle('my_container','display','none'); | |
113 | YUD.setStyle('pullrequests_container','display','none'); |
|
113 | YUD.setStyle('pullrequests_container','display','none'); | |
114 | YUD.setStyle('perms_container','display',''); |
|
114 | YUD.setStyle('perms_container','display',''); | |
115 | YUD.setStyle('q_filter','display','none'); |
|
115 | YUD.setStyle('q_filter','display','none'); | |
116 | } |
|
116 | } | |
117 | YUE.on('show_perms','click',function(e){ |
|
117 | YUE.on('show_perms','click',function(e){ | |
118 | show_perms(); |
|
118 | show_perms(); | |
119 | }) |
|
119 | }) | |
120 |
|
120 | |||
121 | var show_my = function(e){ |
|
121 | var show_my = function(e){ | |
122 | YUD.addClass('show_my', 'current'); |
|
122 | YUD.addClass('show_my', 'current'); | |
123 | YUD.removeClass('show_perms','current'); |
|
123 | YUD.removeClass('show_perms','current'); | |
124 | YUD.removeClass('show_pullrequests','current'); |
|
124 | YUD.removeClass('show_pullrequests','current'); | |
125 |
|
125 | |||
126 | YUD.setStyle('perms_container','display','none'); |
|
126 | YUD.setStyle('perms_container','display','none'); | |
127 | YUD.setStyle('pullrequests_container','display','none'); |
|
127 | YUD.setStyle('pullrequests_container','display','none'); | |
128 | YUD.setStyle('my_container','display',''); |
|
128 | YUD.setStyle('my_container','display',''); | |
129 | YUD.setStyle('q_filter','display',''); |
|
129 | YUD.setStyle('q_filter','display',''); | |
130 | if(!YUD.hasClass('show_my', 'loaded')){ |
|
130 | if(!YUD.hasClass('show_my', 'loaded')){ | |
131 | table_renderer(${c.data |n}); |
|
131 | table_renderer(${c.data |n}); | |
132 | YUD.addClass('show_my', 'loaded'); |
|
132 | YUD.addClass('show_my', 'loaded'); | |
133 | } |
|
133 | } | |
134 | } |
|
134 | } | |
135 | YUE.on('show_my','click',function(e){ |
|
135 | YUE.on('show_my','click',function(e){ | |
136 | show_my(e); |
|
136 | show_my(e); | |
137 | }) |
|
137 | }) | |
138 |
|
138 | |||
139 | var show_pullrequests = function(e){ |
|
139 | var show_pullrequests = function(e){ | |
140 | YUD.addClass('show_pullrequests', 'current'); |
|
140 | YUD.addClass('show_pullrequests', 'current'); | |
141 | YUD.removeClass('show_my','current'); |
|
141 | YUD.removeClass('show_my','current'); | |
142 | YUD.removeClass('show_perms','current'); |
|
142 | YUD.removeClass('show_perms','current'); | |
143 |
|
143 | |||
144 | YUD.setStyle('my_container','display','none'); |
|
144 | YUD.setStyle('my_container','display','none'); | |
145 | YUD.setStyle('perms_container','display','none'); |
|
145 | YUD.setStyle('perms_container','display','none'); | |
146 | YUD.setStyle('pullrequests_container','display',''); |
|
146 | YUD.setStyle('pullrequests_container','display',''); | |
147 | YUD.setStyle('q_filter','display','none'); |
|
147 | YUD.setStyle('q_filter','display','none'); | |
148 |
|
148 | |||
149 | var url = pyroutes.url('admin_settings_my_pullrequests'); |
|
149 | var url = pyroutes.url('admin_settings_my_pullrequests'); | |
150 | if(YUD.get('show_closed') && YUD.get('show_closed').checked) { |
|
150 | if(YUD.get('show_closed') && YUD.get('show_closed').checked) { | |
151 | var url = pyroutes.url('admin_settings_my_pullrequests', {'pr_show_closed': '1'}); |
|
151 | var url = pyroutes.url('admin_settings_my_pullrequests', {'pr_show_closed': '1'}); | |
152 | } |
|
152 | } | |
153 | ypjax(url, 'pullrequests_container', function(){ |
|
153 | ypjax(url, 'pullrequests_container', function(){ | |
154 | YUE.on('show_closed','change',function (e) { |
|
154 | YUE.on('show_closed','change',function (e) { | |
155 | show_pullrequests(e); |
|
155 | show_pullrequests(e); | |
156 | }); |
|
156 | }); | |
157 | }); |
|
157 | }); | |
158 | } |
|
158 | } | |
159 | YUE.on('show_pullrequests','click',function(e){ |
|
159 | YUE.on('show_pullrequests','click',function(e){ | |
160 | show_pullrequests(e) |
|
160 | show_pullrequests(e) | |
161 | }) |
|
161 | }) | |
162 |
|
162 | |||
163 | var tabs = { |
|
163 | var tabs = { | |
164 | 'perms': show_perms, |
|
164 | 'perms': show_perms, | |
165 | 'my': show_my, |
|
165 | 'my': show_my, | |
166 | 'pullrequests': show_pullrequests |
|
166 | 'pullrequests': show_pullrequests | |
167 | } |
|
167 | } | |
168 | var url = location.href.split('#'); |
|
168 | var url = location.href.split('#'); | |
169 | if (url[1]) { |
|
169 | if (url[1]) { | |
170 | //We have a hash |
|
170 | //We have a hash | |
171 | var tabHash = url[1]; |
|
171 | var tabHash = url[1]; | |
172 | var func = tabs[tabHash] |
|
172 | var func = tabs[tabHash] | |
173 | if (func){ |
|
173 | if (func){ | |
174 | func(); |
|
174 | func(); | |
175 | } |
|
175 | } | |
176 | } |
|
176 | } | |
177 |
|
177 | |||
178 | function table_renderer(data){ |
|
178 | function table_renderer(data){ | |
179 | var myDataSource = new YAHOO.util.DataSource(data); |
|
179 | var myDataSource = new YAHOO.util.DataSource(data); | |
180 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
180 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
181 |
|
181 | |||
182 | myDataSource.responseSchema = { |
|
182 | myDataSource.responseSchema = { | |
183 | resultsList: "records", |
|
183 | resultsList: "records", | |
184 | fields: [ |
|
184 | fields: [ | |
185 | {key:"menu"}, |
|
185 | {key:"menu"}, | |
186 | {key:"raw_name"}, |
|
186 | {key:"raw_name"}, | |
187 | {key:"name"}, |
|
187 | {key:"name"}, | |
188 | {key:"last_changeset"}, |
|
188 | {key:"last_changeset"}, | |
189 | {key:"action"}, |
|
189 | {key:"action"}, | |
190 | ] |
|
190 | ] | |
191 | }; |
|
191 | }; | |
192 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
192 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
193 | // This is the filter function |
|
193 | // This is the filter function | |
194 | var data = res.results || [], |
|
194 | var data = res.results || [], | |
195 | filtered = [], |
|
195 | filtered = [], | |
196 | i,l; |
|
196 | i,l; | |
197 |
|
197 | |||
198 | if (req) { |
|
198 | if (req) { | |
199 | req = req.toLowerCase(); |
|
199 | req = req.toLowerCase(); | |
200 | for (i = 0; i<data.length; i++) { |
|
200 | for (i = 0; i<data.length; i++) { | |
201 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
201 | var pos = data[i].raw_name.toLowerCase().indexOf(req) | |
202 | if (pos != -1) { |
|
202 | if (pos != -1) { | |
203 | filtered.push(data[i]); |
|
203 | filtered.push(data[i]); | |
204 | } |
|
204 | } | |
205 | } |
|
205 | } | |
206 | res.results = filtered; |
|
206 | res.results = filtered; | |
207 | } |
|
207 | } | |
208 | return res; |
|
208 | return res; | |
209 | } |
|
209 | } | |
210 |
|
210 | |||
211 | // main table sorting |
|
211 | // main table sorting | |
212 | var myColumnDefs = [ |
|
212 | var myColumnDefs = [ | |
213 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
213 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
214 | {key:"name",label:"${_('Name')}",sortable:true, |
|
214 | {key:"name",label:"${_('Name')}",sortable:true, | |
215 | sortOptions: { sortFunction: nameSort }}, |
|
215 | sortOptions: { sortFunction: nameSort }}, | |
216 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
216 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, | |
217 | sortOptions: { sortFunction: revisionSort }}, |
|
217 | sortOptions: { sortFunction: revisionSort }}, | |
218 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
218 | {key:"action",label:"${_('Action')}",sortable:false}, | |
219 | ]; |
|
219 | ]; | |
220 |
|
220 | |||
221 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
|
221 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ | |
222 | sortedBy:{key:"name",dir:"asc"}, |
|
222 | sortedBy:{key:"name",dir:"asc"}, | |
223 | paginator: new YAHOO.widget.Paginator({ |
|
223 | paginator: new YAHOO.widget.Paginator({ | |
224 | rowsPerPage: 50, |
|
224 | rowsPerPage: 50, | |
225 | alwaysVisible: false, |
|
225 | alwaysVisible: false, | |
226 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
226 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
227 | pageLinks: 5, |
|
227 | pageLinks: 5, | |
228 | containerClass: 'pagination-wh', |
|
228 | containerClass: 'pagination-wh', | |
229 | currentPageClass: 'pager_curpage', |
|
229 | currentPageClass: 'pager_curpage', | |
230 | pageLinkClass: 'pager_link', |
|
230 | pageLinkClass: 'pager_link', | |
231 | nextPageLinkLabel: '>', |
|
231 | nextPageLinkLabel: '>', | |
232 | previousPageLinkLabel: '<', |
|
232 | previousPageLinkLabel: '<', | |
233 | firstPageLinkLabel: '<<', |
|
233 | firstPageLinkLabel: '<<', | |
234 | lastPageLinkLabel: '>>', |
|
234 | lastPageLinkLabel: '>>', | |
235 | containers:['user-paginator'] |
|
235 | containers:['user-paginator'] | |
236 | }), |
|
236 | }), | |
237 |
|
237 | |||
238 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
238 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
239 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
239 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
240 | MSG_EMPTY:"${_('No records found.')}", |
|
240 | MSG_EMPTY:"${_('No records found.')}", | |
241 | MSG_ERROR:"${_('Data error.')}", |
|
241 | MSG_ERROR:"${_('Data error.')}", | |
242 | MSG_LOADING:"${_('Loading...')}", |
|
242 | MSG_LOADING:"${_('Loading...')}", | |
243 | } |
|
243 | } | |
244 | ); |
|
244 | ); | |
245 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
245 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
246 | tooltip_activate(); |
|
246 | tooltip_activate(); | |
247 | quick_repo_menu(); |
|
247 | quick_repo_menu(); | |
248 | }); |
|
248 | }); | |
249 |
|
249 | |||
250 | var filterTimeout = null; |
|
250 | var filterTimeout = null; | |
251 |
|
251 | |||
252 | updateFilter = function() { |
|
252 | updateFilter = function() { | |
253 | // Reset timeout |
|
253 | // Reset timeout | |
254 | filterTimeout = null; |
|
254 | filterTimeout = null; | |
255 |
|
255 | |||
256 | // Reset sort |
|
256 | // Reset sort | |
257 | var state = myDataTable.getState(); |
|
257 | var state = myDataTable.getState(); | |
258 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
258 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
259 |
|
259 | |||
260 | // Get filtered data |
|
260 | // Get filtered data | |
261 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
261 | myDataSource.sendRequest(YUD.get('q_filter').value,{ | |
262 | success : myDataTable.onDataReturnInitializeTable, |
|
262 | success : myDataTable.onDataReturnInitializeTable, | |
263 | failure : myDataTable.onDataReturnInitializeTable, |
|
263 | failure : myDataTable.onDataReturnInitializeTable, | |
264 | scope : myDataTable, |
|
264 | scope : myDataTable, | |
265 | argument: state |
|
265 | argument: state | |
266 | }); |
|
266 | }); | |
267 |
|
267 | |||
268 | }; |
|
268 | }; | |
269 | YUE.on('q_filter','click',function(){ |
|
269 | YUE.on('q_filter','click',function(){ | |
270 | if(!YUD.hasClass('q_filter', 'loaded')){ |
|
270 | if(!YUD.hasClass('q_filter', 'loaded')){ | |
271 | YUD.get('q_filter').value = ''; |
|
271 | YUD.get('q_filter').value = ''; | |
272 | //TODO: load here full list later to do search within groups |
|
272 | //TODO: load here full list later to do search within groups | |
273 | YUD.addClass('q_filter', 'loaded'); |
|
273 | YUD.addClass('q_filter', 'loaded'); | |
274 | } |
|
274 | } | |
275 | }); |
|
275 | }); | |
276 |
|
276 | |||
277 | YUE.on('q_filter','keyup',function (e) { |
|
277 | YUE.on('q_filter','keyup',function (e) { | |
278 | clearTimeout(filterTimeout); |
|
278 | clearTimeout(filterTimeout); | |
279 | filterTimeout = setTimeout(updateFilter,600); |
|
279 | filterTimeout = setTimeout(updateFilter,600); | |
280 | }); |
|
280 | }); | |
281 |
|
281 | |||
282 | } |
|
282 | } | |
283 | </script> |
|
283 | </script> | |
284 | </%def> |
|
284 | </%def> |
@@ -1,147 +1,147 | |||||
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 administration')} |
|
5 | ${_('Users administration')} · ${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" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} » <span id="user_count">0</span> ${_('users')} |
|
9 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} » <span id="user_count">0</span> ${_('users')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
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 | <ul class="links"> |
|
21 | <ul class="links"> | |
22 | <li> |
|
22 | <li> | |
23 | <span>${h.link_to(_(u'Add new user'),h.url('new_user'))}</span> |
|
23 | <span>${h.link_to(_(u'Add new user'),h.url('new_user'))}</span> | |
24 | </li> |
|
24 | </li> | |
25 | </ul> |
|
25 | </ul> | |
26 | </div> |
|
26 | </div> | |
27 | <!-- end box / title --> |
|
27 | <!-- end box / title --> | |
28 | <div class="table yui-skin-sam" id="users_list_wrap"></div> |
|
28 | <div class="table yui-skin-sam" id="users_list_wrap"></div> | |
29 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
29 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
30 | </div> |
|
30 | </div> | |
31 |
|
31 | |||
32 | <script> |
|
32 | <script> | |
33 | var url = "${h.url('formatted_users', format='json')}"; |
|
33 | var url = "${h.url('formatted_users', format='json')}"; | |
34 | var data = ${c.data|n}; |
|
34 | var data = ${c.data|n}; | |
35 | var myDataSource = new YAHOO.util.DataSource(data); |
|
35 | var myDataSource = new YAHOO.util.DataSource(data); | |
36 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
36 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
37 |
|
37 | |||
38 | myDataSource.responseSchema = { |
|
38 | myDataSource.responseSchema = { | |
39 | resultsList: "records", |
|
39 | resultsList: "records", | |
40 | fields: [ |
|
40 | fields: [ | |
41 | {key: "gravatar"}, |
|
41 | {key: "gravatar"}, | |
42 | {key: "raw_username"}, |
|
42 | {key: "raw_username"}, | |
43 | {key: "username"}, |
|
43 | {key: "username"}, | |
44 | {key: "firstname"}, |
|
44 | {key: "firstname"}, | |
45 | {key: "lastname"}, |
|
45 | {key: "lastname"}, | |
46 | {key: "last_login"}, |
|
46 | {key: "last_login"}, | |
47 | {key: "last_login_raw"}, |
|
47 | {key: "last_login_raw"}, | |
48 | {key: "active"}, |
|
48 | {key: "active"}, | |
49 | {key: "admin"}, |
|
49 | {key: "admin"}, | |
50 | {key: "ldap"}, |
|
50 | {key: "ldap"}, | |
51 | {key: "action"}, |
|
51 | {key: "action"}, | |
52 | ] |
|
52 | ] | |
53 | }; |
|
53 | }; | |
54 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
54 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
55 | // This is the filter function |
|
55 | // This is the filter function | |
56 | var data = res.results || [], |
|
56 | var data = res.results || [], | |
57 | filtered = [], |
|
57 | filtered = [], | |
58 | i,l; |
|
58 | i,l; | |
59 |
|
59 | |||
60 | if (req) { |
|
60 | if (req) { | |
61 | req = req.toLowerCase(); |
|
61 | req = req.toLowerCase(); | |
62 | for (i = 0; i<data.length; i++) { |
|
62 | for (i = 0; i<data.length; i++) { | |
63 | var pos = data[i].raw_username.toLowerCase().indexOf(req) |
|
63 | var pos = data[i].raw_username.toLowerCase().indexOf(req) | |
64 | if (pos != -1) { |
|
64 | if (pos != -1) { | |
65 | filtered.push(data[i]); |
|
65 | filtered.push(data[i]); | |
66 | } |
|
66 | } | |
67 | } |
|
67 | } | |
68 | res.results = filtered; |
|
68 | res.results = filtered; | |
69 | } |
|
69 | } | |
70 | YUD.get('user_count').innerHTML = res.results.length; |
|
70 | YUD.get('user_count').innerHTML = res.results.length; | |
71 | return res; |
|
71 | return res; | |
72 | } |
|
72 | } | |
73 |
|
73 | |||
74 | // main table sorting |
|
74 | // main table sorting | |
75 | var myColumnDefs = [ |
|
75 | var myColumnDefs = [ | |
76 | {key:"gravatar",label:"",sortable:false,}, |
|
76 | {key:"gravatar",label:"",sortable:false,}, | |
77 | {key:"username",label:"${_('username')}",sortable:true, |
|
77 | {key:"username",label:"${_('username')}",sortable:true, | |
78 | sortOptions: { sortFunction: linkSort } |
|
78 | sortOptions: { sortFunction: linkSort } | |
79 | }, |
|
79 | }, | |
80 | {key:"firstname",label:"${_('firstname')}",sortable:true,}, |
|
80 | {key:"firstname",label:"${_('firstname')}",sortable:true,}, | |
81 | {key:"lastname",label:"${_('lastname')}",sortable:true,}, |
|
81 | {key:"lastname",label:"${_('lastname')}",sortable:true,}, | |
82 | {key:"last_login",label:"${_('last login')}",sortable:true, |
|
82 | {key:"last_login",label:"${_('last login')}",sortable:true, | |
83 | sortOptions: { sortFunction: lastLoginSort }}, |
|
83 | sortOptions: { sortFunction: lastLoginSort }}, | |
84 | {key:"active",label:"${_('active')}",sortable:true,}, |
|
84 | {key:"active",label:"${_('active')}",sortable:true,}, | |
85 | {key:"admin",label:"${_('admin')}",sortable:true,}, |
|
85 | {key:"admin",label:"${_('admin')}",sortable:true,}, | |
86 | {key:"ldap",label:"${_('ldap')}",sortable:true,}, |
|
86 | {key:"ldap",label:"${_('ldap')}",sortable:true,}, | |
87 | {key:"action",label:"${_('action')}",sortable:false}, |
|
87 | {key:"action",label:"${_('action')}",sortable:false}, | |
88 | ]; |
|
88 | ]; | |
89 |
|
89 | |||
90 | var myDataTable = new YAHOO.widget.DataTable("users_list_wrap", myColumnDefs, myDataSource,{ |
|
90 | var myDataTable = new YAHOO.widget.DataTable("users_list_wrap", myColumnDefs, myDataSource,{ | |
91 | sortedBy:{key:"username",dir:"asc"}, |
|
91 | sortedBy:{key:"username",dir:"asc"}, | |
92 | paginator: new YAHOO.widget.Paginator({ |
|
92 | paginator: new YAHOO.widget.Paginator({ | |
93 | rowsPerPage: 15, |
|
93 | rowsPerPage: 15, | |
94 | alwaysVisible: false, |
|
94 | alwaysVisible: false, | |
95 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
95 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
96 | pageLinks: 5, |
|
96 | pageLinks: 5, | |
97 | containerClass: 'pagination-wh', |
|
97 | containerClass: 'pagination-wh', | |
98 | currentPageClass: 'pager_curpage', |
|
98 | currentPageClass: 'pager_curpage', | |
99 | pageLinkClass: 'pager_link', |
|
99 | pageLinkClass: 'pager_link', | |
100 | nextPageLinkLabel: '>', |
|
100 | nextPageLinkLabel: '>', | |
101 | previousPageLinkLabel: '<', |
|
101 | previousPageLinkLabel: '<', | |
102 | firstPageLinkLabel: '<<', |
|
102 | firstPageLinkLabel: '<<', | |
103 | lastPageLinkLabel: '>>', |
|
103 | lastPageLinkLabel: '>>', | |
104 | containers:['user-paginator'] |
|
104 | containers:['user-paginator'] | |
105 | }), |
|
105 | }), | |
106 |
|
106 | |||
107 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
107 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
108 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
108 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
109 | MSG_EMPTY:"${_('No records found.')}", |
|
109 | MSG_EMPTY:"${_('No records found.')}", | |
110 | MSG_ERROR:"${_('Data error.')}", |
|
110 | MSG_ERROR:"${_('Data error.')}", | |
111 | MSG_LOADING:"${_('Loading...')}", |
|
111 | MSG_LOADING:"${_('Loading...')}", | |
112 | } |
|
112 | } | |
113 | ); |
|
113 | ); | |
114 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
114 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
115 |
|
115 | |||
116 | }); |
|
116 | }); | |
117 |
|
117 | |||
118 | var filterTimeout = null; |
|
118 | var filterTimeout = null; | |
119 |
|
119 | |||
120 | updateFilter = function () { |
|
120 | updateFilter = function () { | |
121 | // Reset timeout |
|
121 | // Reset timeout | |
122 | filterTimeout = null; |
|
122 | filterTimeout = null; | |
123 |
|
123 | |||
124 | // Reset sort |
|
124 | // Reset sort | |
125 | var state = myDataTable.getState(); |
|
125 | var state = myDataTable.getState(); | |
126 | state.sortedBy = {key:'username', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
126 | state.sortedBy = {key:'username', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
127 |
|
127 | |||
128 | // Get filtered data |
|
128 | // Get filtered data | |
129 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
129 | myDataSource.sendRequest(YUD.get('q_filter').value,{ | |
130 | success : myDataTable.onDataReturnInitializeTable, |
|
130 | success : myDataTable.onDataReturnInitializeTable, | |
131 | failure : myDataTable.onDataReturnInitializeTable, |
|
131 | failure : myDataTable.onDataReturnInitializeTable, | |
132 | scope : myDataTable, |
|
132 | scope : myDataTable, | |
133 | argument: state |
|
133 | argument: state | |
134 | }); |
|
134 | }); | |
135 |
|
135 | |||
136 | }; |
|
136 | }; | |
137 | YUE.on('q_filter','click',function(){ |
|
137 | YUE.on('q_filter','click',function(){ | |
138 | YUD.get('q_filter').value = ''; |
|
138 | YUD.get('q_filter').value = ''; | |
139 | }); |
|
139 | }); | |
140 |
|
140 | |||
141 | YUE.on('q_filter','keyup',function (e) { |
|
141 | YUE.on('q_filter','keyup',function (e) { | |
142 | clearTimeout(filterTimeout); |
|
142 | clearTimeout(filterTimeout); | |
143 | filterTimeout = setTimeout(updateFilter,600); |
|
143 | filterTimeout = setTimeout(updateFilter,600); | |
144 | }); |
|
144 | }); | |
145 | </script> |
|
145 | </script> | |
146 |
|
146 | |||
147 | </%def> |
|
147 | </%def> |
@@ -1,55 +1,55 | |||||
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 |
${_('Add user group')} |
|
5 | ${_('Add user group')} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(_('User groups'),h.url('users_groups'))} |
|
10 | ${h.link_to(_('User groups'),h.url('users_groups'))} | |
11 | » |
|
11 | » | |
12 | ${_('add new user group')} |
|
12 | ${_('add new user group')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
16 | ${self.menu('admin')} |
|
16 | ${self.menu('admin')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
24 | </div> |
|
24 | </div> | |
25 | <!-- end box / title --> |
|
25 | <!-- end box / title --> | |
26 | ${h.form(url('users_groups'))} |
|
26 | ${h.form(url('users_groups'))} | |
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="users_group_name">${_('Group name')}:</label> |
|
32 | <label for="users_group_name">${_('Group name')}:</label> | |
33 | </div> |
|
33 | </div> | |
34 | <div class="input"> |
|
34 | <div class="input"> | |
35 | ${h.text('users_group_name',class_='small')} |
|
35 | ${h.text('users_group_name',class_='small')} | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 |
|
38 | |||
39 | <div class="field"> |
|
39 | <div class="field"> | |
40 | <div class="label label-checkbox"> |
|
40 | <div class="label label-checkbox"> | |
41 | <label for="users_group_active">${_('Active')}:</label> |
|
41 | <label for="users_group_active">${_('Active')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 | <div class="checkboxes"> |
|
43 | <div class="checkboxes"> | |
44 | ${h.checkbox('users_group_active',value=True, checked='checked')} |
|
44 | ${h.checkbox('users_group_active',value=True, checked='checked')} | |
45 | </div> |
|
45 | </div> | |
46 | </div> |
|
46 | </div> | |
47 |
|
47 | |||
48 | <div class="buttons"> |
|
48 | <div class="buttons"> | |
49 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
49 | ${h.submit('save',_('save'),class_="ui-btn large")} | |
50 | </div> |
|
50 | </div> | |
51 | </div> |
|
51 | </div> | |
52 | </div> |
|
52 | </div> | |
53 | ${h.end_form()} |
|
53 | ${h.end_form()} | |
54 | </div> |
|
54 | </div> | |
55 | </%def> |
|
55 | </%def> |
@@ -1,228 +1,228 | |||||
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 user group')} ${c.users_group.users_group_name} |
|
5 | ${_('Edit user group')} ${c.users_group.users_group_name} · ${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 | ${h.link_to(_('UserGroups'),h.url('users_groups'))} |
|
11 | ${h.link_to(_('UserGroups'),h.url('users_groups'))} | |
12 | » |
|
12 | » | |
13 | ${_('edit')} "${c.users_group.users_group_name}" |
|
13 | ${_('edit')} "${c.users_group.users_group_name}" | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('admin')} |
|
17 | ${self.menu('admin')} | |
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 | <!-- end box / title --> |
|
26 | <!-- end box / title --> | |
27 | ${h.form(url('users_group', id=c.users_group.users_group_id),method='put', id='edit_users_group')} |
|
27 | ${h.form(url('users_group', id=c.users_group.users_group_id),method='put', id='edit_users_group')} | |
28 | <div class="form"> |
|
28 | <div class="form"> | |
29 | <!-- fields --> |
|
29 | <!-- fields --> | |
30 | <div class="fields"> |
|
30 | <div class="fields"> | |
31 | <div class="field"> |
|
31 | <div class="field"> | |
32 | <div class="label"> |
|
32 | <div class="label"> | |
33 | <label for="users_group_name">${_('Group name')}:</label> |
|
33 | <label for="users_group_name">${_('Group name')}:</label> | |
34 | </div> |
|
34 | </div> | |
35 | <div class="input"> |
|
35 | <div class="input"> | |
36 | ${h.text('users_group_name',class_='small')} |
|
36 | ${h.text('users_group_name',class_='small')} | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 |
|
39 | |||
40 | <div class="field"> |
|
40 | <div class="field"> | |
41 | <div class="label label-checkbox"> |
|
41 | <div class="label label-checkbox"> | |
42 | <label for="users_group_active">${_('Active')}:</label> |
|
42 | <label for="users_group_active">${_('Active')}:</label> | |
43 | </div> |
|
43 | </div> | |
44 | <div class="checkboxes"> |
|
44 | <div class="checkboxes"> | |
45 | ${h.checkbox('users_group_active',value=True)} |
|
45 | ${h.checkbox('users_group_active',value=True)} | |
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="users_group_active">${_('Members')}:</label> |
|
50 | <label for="users_group_active">${_('Members')}:</label> | |
51 | </div> |
|
51 | </div> | |
52 | <div class="select"> |
|
52 | <div class="select"> | |
53 | <table> |
|
53 | <table> | |
54 | <tr> |
|
54 | <tr> | |
55 | <td> |
|
55 | <td> | |
56 | <div> |
|
56 | <div> | |
57 | <div style="float:left"> |
|
57 | <div style="float:left"> | |
58 | <div class="text" style="padding: 0px 0px 6px;">${_('Choosen group members')}</div> |
|
58 | <div class="text" style="padding: 0px 0px 6px;">${_('Choosen group members')}</div> | |
59 | ${h.select('users_group_members',[x[0] for x in c.group_members],c.group_members,multiple=True,size=8,style="min-width:210px")} |
|
59 | ${h.select('users_group_members',[x[0] for x in c.group_members],c.group_members,multiple=True,size=8,style="min-width:210px")} | |
60 | <div id="remove_all_elements" style="cursor:pointer;text-align:center"> |
|
60 | <div id="remove_all_elements" style="cursor:pointer;text-align:center"> | |
61 | ${_('Remove all elements')} |
|
61 | ${_('Remove all elements')} | |
62 | <img alt="remove" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_right.png')}"/> |
|
62 | <img alt="remove" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_right.png')}"/> | |
63 | </div> |
|
63 | </div> | |
64 | </div> |
|
64 | </div> | |
65 | <div style="float:left;width:20px;padding-top:50px"> |
|
65 | <div style="float:left;width:20px;padding-top:50px"> | |
66 | <img alt="add" id="add_element" |
|
66 | <img alt="add" id="add_element" | |
67 | style="padding:2px;cursor:pointer" |
|
67 | style="padding:2px;cursor:pointer" | |
68 | src="${h.url('/images/icons/arrow_left.png')}"/> |
|
68 | src="${h.url('/images/icons/arrow_left.png')}"/> | |
69 | <br /> |
|
69 | <br /> | |
70 | <img alt="remove" id="remove_element" |
|
70 | <img alt="remove" id="remove_element" | |
71 | style="padding:2px;cursor:pointer" |
|
71 | style="padding:2px;cursor:pointer" | |
72 | src="${h.url('/images/icons/arrow_right.png')}"/> |
|
72 | src="${h.url('/images/icons/arrow_right.png')}"/> | |
73 | </div> |
|
73 | </div> | |
74 | <div style="float:left"> |
|
74 | <div style="float:left"> | |
75 | <div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div> |
|
75 | <div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div> | |
76 | ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")} |
|
76 | ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")} | |
77 | <div id="add_all_elements" style="cursor:pointer;text-align:center"> |
|
77 | <div id="add_all_elements" style="cursor:pointer;text-align:center"> | |
78 | <img alt="add" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_left.png')}"/> |
|
78 | <img alt="add" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_left.png')}"/> | |
79 | ${_('Add all elements')} |
|
79 | ${_('Add all elements')} | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | </td> |
|
83 | </td> | |
84 | </tr> |
|
84 | </tr> | |
85 | </table> |
|
85 | </table> | |
86 | </div> |
|
86 | </div> | |
87 |
|
87 | |||
88 | </div> |
|
88 | </div> | |
89 | <div class="buttons"> |
|
89 | <div class="buttons"> | |
90 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
90 | ${h.submit('save',_('save'),class_="ui-btn large")} | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 | </div> |
|
93 | </div> | |
94 | ${h.end_form()} |
|
94 | ${h.end_form()} | |
95 | </div> |
|
95 | </div> | |
96 |
|
96 | |||
97 | <div class="box box-right"> |
|
97 | <div class="box box-right"> | |
98 | <!-- box / title --> |
|
98 | <!-- box / title --> | |
99 | <div class="title"> |
|
99 | <div class="title"> | |
100 | <h5>${_('Permissions')}</h5> |
|
100 | <h5>${_('Permissions')}</h5> | |
101 | </div> |
|
101 | </div> | |
102 | ${h.form(url('users_group_perm', id=c.users_group.users_group_id), method='put')} |
|
102 | ${h.form(url('users_group_perm', id=c.users_group.users_group_id), method='put')} | |
103 | <div class="form"> |
|
103 | <div class="form"> | |
104 | <!-- fields --> |
|
104 | <!-- fields --> | |
105 | <div class="fields"> |
|
105 | <div class="fields"> | |
106 | <div class="field"> |
|
106 | <div class="field"> | |
107 | <div class="label label-checkbox"> |
|
107 | <div class="label label-checkbox"> | |
108 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> |
|
108 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> | |
109 | </div> |
|
109 | </div> | |
110 | <div class="checkboxes"> |
|
110 | <div class="checkboxes"> | |
111 | ${h.checkbox('inherit_default_permissions',value=True)} |
|
111 | ${h.checkbox('inherit_default_permissions',value=True)} | |
112 | </div> |
|
112 | </div> | |
113 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' |
|
113 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' | |
114 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> |
|
114 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> | |
115 | </div> |
|
115 | </div> | |
116 | <div id="inherit_overlay" style="${'opacity:0.3' if c.users_group.inherit_default_permissions else ''}" > |
|
116 | <div id="inherit_overlay" style="${'opacity:0.3' if c.users_group.inherit_default_permissions else ''}" > | |
117 | <div class="field"> |
|
117 | <div class="field"> | |
118 | <div class="label label-checkbox"> |
|
118 | <div class="label label-checkbox"> | |
119 | <label for="create_repo_perm">${_('Create repositories')}:</label> |
|
119 | <label for="create_repo_perm">${_('Create repositories')}:</label> | |
120 | </div> |
|
120 | </div> | |
121 | <div class="checkboxes"> |
|
121 | <div class="checkboxes"> | |
122 | ${h.checkbox('create_repo_perm',value=True)} |
|
122 | ${h.checkbox('create_repo_perm',value=True)} | |
123 | </div> |
|
123 | </div> | |
124 | </div> |
|
124 | </div> | |
125 | <div class="field"> |
|
125 | <div class="field"> | |
126 | <div class="label label-checkbox"> |
|
126 | <div class="label label-checkbox"> | |
127 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> |
|
127 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> | |
128 | </div> |
|
128 | </div> | |
129 | <div class="checkboxes"> |
|
129 | <div class="checkboxes"> | |
130 | ${h.checkbox('fork_repo_perm',value=True)} |
|
130 | ${h.checkbox('fork_repo_perm',value=True)} | |
131 | </div> |
|
131 | </div> | |
132 | </div> |
|
132 | </div> | |
133 | </div> |
|
133 | </div> | |
134 | <div class="buttons"> |
|
134 | <div class="buttons"> | |
135 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
135 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
136 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
136 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
137 | </div> |
|
137 | </div> | |
138 | </div> |
|
138 | </div> | |
139 | </div> |
|
139 | </div> | |
140 | ${h.end_form()} |
|
140 | ${h.end_form()} | |
141 | </div> |
|
141 | </div> | |
142 |
|
142 | |||
143 | <div class="box box-right"> |
|
143 | <div class="box box-right"> | |
144 | <!-- box / title --> |
|
144 | <!-- box / title --> | |
145 | <div class="title"> |
|
145 | <div class="title"> | |
146 | <h5>${_('Group members')}</h5> |
|
146 | <h5>${_('Group members')}</h5> | |
147 | </div> |
|
147 | </div> | |
148 |
|
148 | |||
149 | <div class="group_members_wrap"> |
|
149 | <div class="group_members_wrap"> | |
150 | % if c.group_members_obj: |
|
150 | % if c.group_members_obj: | |
151 | <ul class="group_members"> |
|
151 | <ul class="group_members"> | |
152 | %for user in c.group_members_obj: |
|
152 | %for user in c.group_members_obj: | |
153 | <li> |
|
153 | <li> | |
154 | <div class="group_member"> |
|
154 | <div class="group_member"> | |
155 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/> </div> |
|
155 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/> </div> | |
156 | <div>${h.link_to(user.username, h.url('edit_user',id=user.user_id))}</div> |
|
156 | <div>${h.link_to(user.username, h.url('edit_user',id=user.user_id))}</div> | |
157 | <div>${user.full_name}</div> |
|
157 | <div>${user.full_name}</div> | |
158 | </div> |
|
158 | </div> | |
159 | </li> |
|
159 | </li> | |
160 | %endfor |
|
160 | %endfor | |
161 | </ul> |
|
161 | </ul> | |
162 | %else: |
|
162 | %else: | |
163 | <span class="empty_data">${_('No members yet')}</span> |
|
163 | <span class="empty_data">${_('No members yet')}</span> | |
164 | %endif |
|
164 | %endif | |
165 | </div> |
|
165 | </div> | |
166 | </div> |
|
166 | </div> | |
167 |
|
167 | |||
168 | <div class="box box-left"> |
|
168 | <div class="box box-left"> | |
169 | <!-- box / title --> |
|
169 | <!-- box / title --> | |
170 | <div class="title"> |
|
170 | <div class="title"> | |
171 | <h5>${_('Permissions defined for this group')}</h5> |
|
171 | <h5>${_('Permissions defined for this group')}</h5> | |
172 | </div> |
|
172 | </div> | |
173 | ## permissions overview |
|
173 | ## permissions overview | |
174 | <div id="perms" class="table"> |
|
174 | <div id="perms" class="table"> | |
175 | %for section in sorted(c.users_group.permissions.keys()): |
|
175 | %for section in sorted(c.users_group.permissions.keys()): | |
176 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
176 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
177 | %if not c.users_group.permissions: |
|
177 | %if not c.users_group.permissions: | |
178 | <span class="empty_data">${_('No permissions set yet')}</span> |
|
178 | <span class="empty_data">${_('No permissions set yet')}</span> | |
179 | %else: |
|
179 | %else: | |
180 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
180 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
181 | <table id="tbl_list_repository"> |
|
181 | <table id="tbl_list_repository"> | |
182 | <thead> |
|
182 | <thead> | |
183 | <tr> |
|
183 | <tr> | |
184 | <th class="left">${_('Name')}</th> |
|
184 | <th class="left">${_('Name')}</th> | |
185 | <th class="left">${_('Permission')}</th> |
|
185 | <th class="left">${_('Permission')}</th> | |
186 | <th class="left">${_('Edit Permission')}</th> |
|
186 | <th class="left">${_('Edit Permission')}</th> | |
187 | </thead> |
|
187 | </thead> | |
188 | <tbody> |
|
188 | <tbody> | |
189 | %for k in c.users_group.permissions[section]: |
|
189 | %for k in c.users_group.permissions[section]: | |
190 | <% |
|
190 | <% | |
191 | section_perm = c.users_group.permissions[section].get(k) |
|
191 | section_perm = c.users_group.permissions[section].get(k) | |
192 | _perm = section_perm.split('.')[-1] |
|
192 | _perm = section_perm.split('.')[-1] | |
193 | %> |
|
193 | %> | |
194 | <tr> |
|
194 | <tr> | |
195 | <td> |
|
195 | <td> | |
196 | %if section == 'repositories': |
|
196 | %if section == 'repositories': | |
197 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
197 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
198 | %elif section == 'repositories_groups': |
|
198 | %elif section == 'repositories_groups': | |
199 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
199 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
200 | %endif |
|
200 | %endif | |
201 | </td> |
|
201 | </td> | |
202 | <td> |
|
202 | <td> | |
203 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
203 | <span class="perm_tag ${_perm}">${section_perm}</span> | |
204 | </td> |
|
204 | </td> | |
205 | <td> |
|
205 | <td> | |
206 | %if section == 'repositories': |
|
206 | %if section == 'repositories': | |
207 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
207 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
208 | %elif section == 'repositories_groups': |
|
208 | %elif section == 'repositories_groups': | |
209 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
209 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
210 | %else: |
|
210 | %else: | |
211 | -- |
|
211 | -- | |
212 | %endif |
|
212 | %endif | |
213 | </td> |
|
213 | </td> | |
214 | </tr> |
|
214 | </tr> | |
215 | %endfor |
|
215 | %endfor | |
216 | </tbody> |
|
216 | </tbody> | |
217 | </table> |
|
217 | </table> | |
218 | </div> |
|
218 | </div> | |
219 | %endif |
|
219 | %endif | |
220 | %endfor |
|
220 | %endfor | |
221 | </div> |
|
221 | </div> | |
222 | </div> |
|
222 | </div> | |
223 |
|
223 | |||
224 |
|
224 | |||
225 | <script type="text/javascript"> |
|
225 | <script type="text/javascript"> | |
226 | MultiSelectWidget('users_group_members','available_members','edit_users_group'); |
|
226 | MultiSelectWidget('users_group_members','available_members','edit_users_group'); | |
227 | </script> |
|
227 | </script> | |
228 | </%def> |
|
228 | </%def> |
@@ -1,55 +1,55 | |||||
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 |
${_('User groups administration')} |
|
5 | ${_('User 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 | » |
|
10 | » | |
11 | ${_('user groups')} |
|
11 | ${_('user groups')} | |
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 | <ul class="links"> |
|
23 | <ul class="links"> | |
24 | <li> |
|
24 | <li> | |
25 | <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> | |
26 | </li> |
|
26 | </li> | |
27 |
|
27 | |||
28 | </ul> |
|
28 | </ul> | |
29 | </div> |
|
29 | </div> | |
30 | <!-- end box / title --> |
|
30 | <!-- end box / title --> | |
31 | <div class="table"> |
|
31 | <div class="table"> | |
32 | <table class="table_disp"> |
|
32 | <table class="table_disp"> | |
33 | <tr class="header"> |
|
33 | <tr class="header"> | |
34 | <th class="left">${_('group name')}</th> |
|
34 | <th class="left">${_('group name')}</th> | |
35 | <th class="left">${_('members')}</th> |
|
35 | <th class="left">${_('members')}</th> | |
36 | <th class="left">${_('active')}</th> |
|
36 | <th class="left">${_('active')}</th> | |
37 | <th class="left">${_('action')}</th> |
|
37 | <th class="left">${_('action')}</th> | |
38 | </tr> |
|
38 | </tr> | |
39 | %for cnt,u_group in enumerate(c.users_groups_list): |
|
39 | %for cnt,u_group in enumerate(c.users_groups_list): | |
40 | <tr class="parity${cnt%2}"> |
|
40 | <tr class="parity${cnt%2}"> | |
41 | <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> | |
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> |
|
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> | |
43 | <td>${h.bool2icon(u_group.users_group_active)}</td> |
|
43 | <td>${h.bool2icon(u_group.users_group_active)}</td> | |
44 | <td> |
|
44 | <td> | |
45 | ${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')} | |
46 | ${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, | |
47 | class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user group: %s') % u_group.users_group_name+"');")} |
|
47 | class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user group: %s') % u_group.users_group_name+"');")} | |
48 | ${h.end_form()} |
|
48 | ${h.end_form()} | |
49 | </td> |
|
49 | </td> | |
50 | </tr> |
|
50 | </tr> | |
51 | %endfor |
|
51 | %endfor | |
52 | </table> |
|
52 | </table> | |
53 | </div> |
|
53 | </div> | |
54 | </div> |
|
54 | </div> | |
55 | </%def> |
|
55 | </%def> |
@@ -1,75 +1,75 | |||||
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} |
|
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 | ${_('Bookmarks')} |
|
11 | ${_('Bookmarks')} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 | ${self.menu('bookmarks')} |
|
15 | ${self.menu('bookmarks')} | |
16 | </%def> |
|
16 | </%def> | |
17 | <%def name="main()"> |
|
17 | <%def name="main()"> | |
18 | <div class="box"> |
|
18 | <div class="box"> | |
19 | ${self.context_bar('switch-to')} |
|
19 | ${self.context_bar('switch-to')} | |
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 | <!-- end box / title --> |
|
24 | <!-- end box / title --> | |
25 | <div class="table"> |
|
25 | <div class="table"> | |
26 | <%include file='bookmarks_data.html'/> |
|
26 | <%include file='bookmarks_data.html'/> | |
27 | </div> |
|
27 | </div> | |
28 | </div> |
|
28 | </div> | |
29 | <script type="text/javascript"> |
|
29 | <script type="text/javascript"> | |
30 |
|
30 | |||
31 | // main table sorting |
|
31 | // main table sorting | |
32 | var myColumnDefs = [ |
|
32 | var myColumnDefs = [ | |
33 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
33 | {key:"name",label:"${_('Name')}",sortable:true}, | |
34 | {key:"date",label:"${_('Date')}",sortable:true, |
|
34 | {key:"date",label:"${_('Date')}",sortable:true, | |
35 | sortOptions: { sortFunction: dateSort }}, |
|
35 | sortOptions: { sortFunction: dateSort }}, | |
36 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
36 | {key:"author",label:"${_('Author')}",sortable:true}, | |
37 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
37 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
38 | sortOptions: { sortFunction: revisionSort }}, |
|
38 | sortOptions: { sortFunction: revisionSort }}, | |
39 | ]; |
|
39 | ]; | |
40 |
|
40 | |||
41 | var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data")); |
|
41 | var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data")); | |
42 |
|
42 | |||
43 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
43 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
44 |
|
44 | |||
45 | myDataSource.responseSchema = { |
|
45 | myDataSource.responseSchema = { | |
46 | fields: [ |
|
46 | fields: [ | |
47 | {key:"name"}, |
|
47 | {key:"name"}, | |
48 | {key:"date"}, |
|
48 | {key:"date"}, | |
49 | {key:"author"}, |
|
49 | {key:"author"}, | |
50 | {key:"revision"}, |
|
50 | {key:"revision"}, | |
51 | ] |
|
51 | ] | |
52 | }; |
|
52 | }; | |
53 |
|
53 | |||
54 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
54 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
55 | { |
|
55 | { | |
56 | sortedBy:{key:"name",dir:"asc"}, |
|
56 | sortedBy:{key:"name",dir:"asc"}, | |
57 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
57 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
58 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
58 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
59 | MSG_EMPTY:"${_('No records found.')}", |
|
59 | MSG_EMPTY:"${_('No records found.')}", | |
60 | MSG_ERROR:"${_('Data error.')}", |
|
60 | MSG_ERROR:"${_('Data error.')}", | |
61 | MSG_LOADING:"${_('Loading...')}", |
|
61 | MSG_LOADING:"${_('Loading...')}", | |
62 | } |
|
62 | } | |
63 | ); |
|
63 | ); | |
64 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
64 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
65 | tooltip_activate(); |
|
65 | tooltip_activate(); | |
66 | var func = function(node){ |
|
66 | var func = function(node){ | |
67 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
67 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
68 | } |
|
68 | } | |
69 | q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func); |
|
69 | q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func); | |
70 | }); |
|
70 | }); | |
71 |
|
71 | |||
72 | </script> |
|
72 | </script> | |
73 |
|
73 | |||
74 |
|
74 | |||
75 | </%def> |
|
75 | </%def> |
@@ -1,90 +1,90 | |||||
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} |
|
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 | ${_('Branches')} |
|
10 | ${_('Branches')} | |
11 | </%def> |
|
11 | </%def> | |
12 |
|
12 | |||
13 | <%def name="page_nav()"> |
|
13 | <%def name="page_nav()"> | |
14 | ${self.menu('branches')} |
|
14 | ${self.menu('branches')} | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="main()"> |
|
17 | <%def name="main()"> | |
18 | ${self.context_bar('switch-to')} |
|
18 | ${self.context_bar('switch-to')} | |
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 | <!-- end box / title --> |
|
24 | <!-- end box / title --> | |
25 | %if c.repo_branches: |
|
25 | %if c.repo_branches: | |
26 | <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div> |
|
26 | <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div> | |
27 | %endif |
|
27 | %endif | |
28 | <div class="table"> |
|
28 | <div class="table"> | |
29 | <%include file='branches_data.html'/> |
|
29 | <%include file='branches_data.html'/> | |
30 | </div> |
|
30 | </div> | |
31 | </div> |
|
31 | </div> | |
32 | <script type="text/javascript"> |
|
32 | <script type="text/javascript"> | |
33 | YUE.on('compare_branches','click',function(e){ |
|
33 | YUE.on('compare_branches','click',function(e){ | |
34 | YUE.preventDefault(e); |
|
34 | YUE.preventDefault(e); | |
35 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
35 | var org = YUQ('input[name=compare_org]:checked')[0]; | |
36 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
36 | var other = YUQ('input[name=compare_other]:checked')[0]; | |
37 |
|
37 | |||
38 | if(org && other){ |
|
38 | if(org && other){ | |
39 | 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__')}"; |
|
39 | 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__')}"; | |
40 | var u = compare_url.replace('__ORG__',org.value) |
|
40 | var u = compare_url.replace('__ORG__',org.value) | |
41 | .replace('__OTHER__',other.value); |
|
41 | .replace('__OTHER__',other.value); | |
42 | window.location=u; |
|
42 | window.location=u; | |
43 | } |
|
43 | } | |
44 | }); |
|
44 | }); | |
45 | // main table sorting |
|
45 | // main table sorting | |
46 | var myColumnDefs = [ |
|
46 | var myColumnDefs = [ | |
47 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
47 | {key:"name",label:"${_('Name')}",sortable:true}, | |
48 | {key:"date",label:"${_('Date')}",sortable:true, |
|
48 | {key:"date",label:"${_('Date')}",sortable:true, | |
49 | sortOptions: { sortFunction: dateSort }}, |
|
49 | sortOptions: { sortFunction: dateSort }}, | |
50 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
50 | {key:"author",label:"${_('Author')}",sortable:true}, | |
51 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
51 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
52 | sortOptions: { sortFunction: revisionSort }}, |
|
52 | sortOptions: { sortFunction: revisionSort }}, | |
53 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
53 | {key:"compare",label:"${_('Compare')}",sortable:false,}, | |
54 | ]; |
|
54 | ]; | |
55 |
|
55 | |||
56 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); |
|
56 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); | |
57 |
|
57 | |||
58 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
58 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
59 |
|
59 | |||
60 | myDataSource.responseSchema = { |
|
60 | myDataSource.responseSchema = { | |
61 | fields: [ |
|
61 | fields: [ | |
62 | {key:"name"}, |
|
62 | {key:"name"}, | |
63 | {key:"date"}, |
|
63 | {key:"date"}, | |
64 | {key:"author"}, |
|
64 | {key:"author"}, | |
65 | {key:"revision"}, |
|
65 | {key:"revision"}, | |
66 | {key:"compare"}, |
|
66 | {key:"compare"}, | |
67 | ] |
|
67 | ] | |
68 | }; |
|
68 | }; | |
69 |
|
69 | |||
70 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
70 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
71 | { |
|
71 | { | |
72 | sortedBy:{key:"name",dir:"asc"}, |
|
72 | sortedBy:{key:"name",dir:"asc"}, | |
73 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
73 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
74 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
74 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
75 | MSG_EMPTY:"${_('No records found.')}", |
|
75 | MSG_EMPTY:"${_('No records found.')}", | |
76 | MSG_ERROR:"${_('Data error.')}", |
|
76 | MSG_ERROR:"${_('Data error.')}", | |
77 | MSG_LOADING:"${_('Loading...')}", |
|
77 | MSG_LOADING:"${_('Loading...')}", | |
78 | } |
|
78 | } | |
79 | ); |
|
79 | ); | |
80 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
80 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
81 | tooltip_activate(); |
|
81 | tooltip_activate(); | |
82 | var func = function(node){ |
|
82 | var func = function(node){ | |
83 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
83 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
84 | } |
|
84 | } | |
85 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); |
|
85 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); | |
86 | }); |
|
86 | }); | |
87 |
|
87 | |||
88 | </script> |
|
88 | </script> | |
89 |
|
89 | |||
90 | </%def> |
|
90 | </%def> |
@@ -1,262 +1,262 | |||||
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} |
|
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 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
|
10 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> | |
11 | ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} |
|
11 | ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 | ${self.menu('changelog')} |
|
15 | ${self.menu('changelog')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
19 | ${self.context_bar('changelog')} |
|
19 | ${self.context_bar('changelog')} | |
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 | <div class="table"> |
|
25 | <div class="table"> | |
26 | % if c.pagination: |
|
26 | % if c.pagination: | |
27 | <div id="graph"> |
|
27 | <div id="graph"> | |
28 | <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;"> |
|
28 | <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;"> | |
29 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> |
|
29 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> | |
30 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> |
|
30 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> | |
31 |
|
31 | |||
32 | %if c.rhodecode_db_repo.fork: |
|
32 | %if c.rhodecode_db_repo.fork: | |
33 | <a id="compare_fork" 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',merge=1)}" class="ui-btn small">${_('Compare fork with parent')}</a> |
|
33 | <a id="compare_fork" 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',merge=1)}" class="ui-btn small">${_('Compare fork with parent')}</a> | |
34 | %endif |
|
34 | %endif | |
35 | %if h.is_hg(c.rhodecode_repo): |
|
35 | %if h.is_hg(c.rhodecode_repo): | |
36 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a> |
|
36 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a> | |
37 | %endif |
|
37 | %endif | |
38 | </div> |
|
38 | </div> | |
39 | <div class="container_header"> |
|
39 | <div class="container_header"> | |
40 | ${h.form(h.url.current(),method='get')} |
|
40 | ${h.form(h.url.current(),method='get')} | |
41 | <div style="float:left"> |
|
41 | <div style="float:left"> | |
42 | ${h.submit('set',_('Show'),class_="ui-btn")} |
|
42 | ${h.submit('set',_('Show'),class_="ui-btn")} | |
43 | ${h.text('size',size=1,value=c.size)} |
|
43 | ${h.text('size',size=1,value=c.size)} | |
44 | ${_('revisions')} |
|
44 | ${_('revisions')} | |
45 | </div> |
|
45 | </div> | |
46 | ${h.end_form()} |
|
46 | ${h.end_form()} | |
47 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
47 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> | |
48 | </div> |
|
48 | </div> | |
49 | <div id="graph_nodes"> |
|
49 | <div id="graph_nodes"> | |
50 | <canvas id="graph_canvas"></canvas> |
|
50 | <canvas id="graph_canvas"></canvas> | |
51 | </div> |
|
51 | </div> | |
52 | <div id="graph_content"> |
|
52 | <div id="graph_content"> | |
53 |
|
53 | |||
54 | <table id="changesets"> |
|
54 | <table id="changesets"> | |
55 | <tbody> |
|
55 | <tbody> | |
56 | %for cnt,cs in enumerate(c.pagination): |
|
56 | %for cnt,cs in enumerate(c.pagination): | |
57 | <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
57 | <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> | |
58 | <td class="checkbox"> |
|
58 | <td class="checkbox"> | |
59 | ${h.checkbox(cs.raw_id,class_="changeset_range")} |
|
59 | ${h.checkbox(cs.raw_id,class_="changeset_range")} | |
60 | </td> |
|
60 | </td> | |
61 | <td class="author"> |
|
61 | <td class="author"> | |
62 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> |
|
62 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> | |
63 | <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span> |
|
63 | <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span> | |
64 | </td> |
|
64 | </td> | |
65 | <td class="hash"> |
|
65 | <td class="hash"> | |
66 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"> |
|
66 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"> | |
67 | <span class="changeset_hash">${h.show_id(cs)}</span> |
|
67 | <span class="changeset_hash">${h.show_id(cs)}</span> | |
68 | </a> |
|
68 | </a> | |
69 | </td> |
|
69 | </td> | |
70 | <td class="date"> |
|
70 | <td class="date"> | |
71 | <div class="date">${h.age(cs.date,True)}</div> |
|
71 | <div class="date">${h.age(cs.date,True)}</div> | |
72 | </td> |
|
72 | </td> | |
73 | <td class="mid"> |
|
73 | <td class="mid"> | |
74 | <div class="log-container"> |
|
74 | <div class="log-container"> | |
75 | <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> |
|
75 | <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> | |
76 | <div class="expand"><span class="expandtext">↓ ${_('Show more')} ↓</span></div> |
|
76 | <div class="expand"><span class="expandtext">↓ ${_('Show more')} ↓</span></div> | |
77 | <div class="extra-container"> |
|
77 | <div class="extra-container"> | |
78 | %if c.comments.get(cs.raw_id,[]): |
|
78 | %if c.comments.get(cs.raw_id,[]): | |
79 | <div class="comments-container"> |
|
79 | <div class="comments-container"> | |
80 | <div class="comments-cnt" title="${('comments')}"> |
|
80 | <div class="comments-cnt" title="${('comments')}"> | |
81 | <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)}"> |
|
81 | <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 | ${len(c.comments[cs.raw_id])} |
|
82 | ${len(c.comments[cs.raw_id])} | |
83 | </a> |
|
83 | </a> | |
84 | </div> |
|
84 | </div> | |
85 | </div> |
|
85 | </div> | |
86 | %endif |
|
86 | %endif | |
87 | %if h.is_hg(c.rhodecode_repo): |
|
87 | %if h.is_hg(c.rhodecode_repo): | |
88 | %for book in cs.bookmarks: |
|
88 | %for book in cs.bookmarks: | |
89 | <div class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
89 | <div class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
90 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
90 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
91 | </div> |
|
91 | </div> | |
92 | %endfor |
|
92 | %endfor | |
93 | %endif |
|
93 | %endif | |
94 | %for tag in cs.tags: |
|
94 | %for tag in cs.tags: | |
95 | <div class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
95 | <div class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
96 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
96 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
97 | </div> |
|
97 | </div> | |
98 | %endfor |
|
98 | %endfor | |
99 | %if (not c.branch_name) and cs.branch: |
|
99 | %if (not c.branch_name) and cs.branch: | |
100 | <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
100 | <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | |
101 | ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))} |
|
101 | ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))} | |
102 | </div> |
|
102 | </div> | |
103 | %endif |
|
103 | %endif | |
104 | </div> |
|
104 | </div> | |
105 | </div> |
|
105 | </div> | |
106 | </td> |
|
106 | </td> | |
107 | </tr> |
|
107 | </tr> | |
108 | %endfor |
|
108 | %endfor | |
109 | </tbody> |
|
109 | </tbody> | |
110 | </table> |
|
110 | </table> | |
111 |
|
111 | |||
112 | <div class="pagination-wh pagination-left"> |
|
112 | <div class="pagination-wh pagination-left"> | |
113 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
113 | ${c.pagination.pager('$link_previous ~2~ $link_next')} | |
114 | </div> |
|
114 | </div> | |
115 | </div> |
|
115 | </div> | |
116 | </div> |
|
116 | </div> | |
117 |
|
117 | |||
118 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
|
118 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> | |
119 | <script type="text/javascript"> |
|
119 | <script type="text/javascript"> | |
120 | YAHOO.util.Event.onDOMReady(function(){ |
|
120 | YAHOO.util.Event.onDOMReady(function(){ | |
121 |
|
121 | |||
122 | //Monitor range checkboxes and build a link to changesets |
|
122 | //Monitor range checkboxes and build a link to changesets | |
123 | //ranges |
|
123 | //ranges | |
124 | var checkboxes = YUD.getElementsByClassName('changeset_range'); |
|
124 | var checkboxes = YUD.getElementsByClassName('changeset_range'); | |
125 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
|
125 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; | |
126 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; |
|
126 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; | |
127 |
|
127 | |||
128 | var checkbox_checker = function(e){ |
|
128 | var checkbox_checker = function(e){ | |
129 | var checked_checkboxes = []; |
|
129 | var checked_checkboxes = []; | |
130 | for (pos in checkboxes){ |
|
130 | for (pos in checkboxes){ | |
131 | if(checkboxes[pos].checked){ |
|
131 | if(checkboxes[pos].checked){ | |
132 | checked_checkboxes.push(checkboxes[pos]); |
|
132 | checked_checkboxes.push(checkboxes[pos]); | |
133 | } |
|
133 | } | |
134 | } |
|
134 | } | |
135 | if(YUD.get('open_new_pr')){ |
|
135 | if(YUD.get('open_new_pr')){ | |
136 | if(checked_checkboxes.length>1){ |
|
136 | if(checked_checkboxes.length>1){ | |
137 | YUD.setStyle('open_new_pr','display','none'); |
|
137 | YUD.setStyle('open_new_pr','display','none'); | |
138 | } else { |
|
138 | } else { | |
139 | YUD.setStyle('open_new_pr','display',''); |
|
139 | YUD.setStyle('open_new_pr','display',''); | |
140 | if(checked_checkboxes.length>0){ |
|
140 | if(checked_checkboxes.length>0){ | |
141 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; |
|
141 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; | |
142 | }else{ |
|
142 | }else{ | |
143 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; |
|
143 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; | |
144 | } |
|
144 | } | |
145 | } |
|
145 | } | |
146 | } |
|
146 | } | |
147 |
|
147 | |||
148 | if(checked_checkboxes.length>0){ |
|
148 | if(checked_checkboxes.length>0){ | |
149 | var rev_end = checked_checkboxes[0].name; |
|
149 | var rev_end = checked_checkboxes[0].name; | |
150 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
|
150 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; | |
151 | var url = url_tmpl.replace('__REVRANGE__', |
|
151 | var url = url_tmpl.replace('__REVRANGE__', | |
152 | rev_start+'...'+rev_end); |
|
152 | rev_start+'...'+rev_end); | |
153 |
|
153 | |||
154 | var link = (rev_start == rev_end) |
|
154 | var link = (rev_start == rev_end) | |
155 | ? _TM['Show selected change __S'] |
|
155 | ? _TM['Show selected change __S'] | |
156 | : _TM['Show selected changes __S -> __E']; |
|
156 | : _TM['Show selected changes __S -> __E']; | |
157 |
|
157 | |||
158 | link = link.replace('__S',rev_start.substr(0,6)); |
|
158 | link = link.replace('__S',rev_start.substr(0,6)); | |
159 | link = link.replace('__E',rev_end.substr(0,6)); |
|
159 | link = link.replace('__E',rev_end.substr(0,6)); | |
160 | YUD.get('rev_range_container').href = url; |
|
160 | YUD.get('rev_range_container').href = url; | |
161 | YUD.get('rev_range_container').innerHTML = link; |
|
161 | YUD.get('rev_range_container').innerHTML = link; | |
162 | YUD.setStyle('rev_range_container','display',''); |
|
162 | YUD.setStyle('rev_range_container','display',''); | |
163 | YUD.setStyle('rev_range_clear','display',''); |
|
163 | YUD.setStyle('rev_range_clear','display',''); | |
164 |
|
164 | |||
165 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); |
|
165 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); | |
166 | YUD.setStyle('compare_fork','display','none'); |
|
166 | YUD.setStyle('compare_fork','display','none'); | |
167 | }else{ |
|
167 | }else{ | |
168 | YUD.setStyle('rev_range_container','display','none'); |
|
168 | YUD.setStyle('rev_range_container','display','none'); | |
169 | YUD.setStyle('rev_range_clear','display','none'); |
|
169 | YUD.setStyle('rev_range_clear','display','none'); | |
170 | if (checkboxes){ |
|
170 | if (checkboxes){ | |
171 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_end={0}'.format(checkboxes[0].name); |
|
171 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_end={0}'.format(checkboxes[0].name); | |
172 | } |
|
172 | } | |
173 | YUD.setStyle('compare_fork','display',''); |
|
173 | YUD.setStyle('compare_fork','display',''); | |
174 | } |
|
174 | } | |
175 | }; |
|
175 | }; | |
176 | YUE.onDOMReady(checkbox_checker); |
|
176 | YUE.onDOMReady(checkbox_checker); | |
177 | YUE.on(checkboxes,'click', checkbox_checker); |
|
177 | YUE.on(checkboxes,'click', checkbox_checker); | |
178 |
|
178 | |||
179 | YUE.on('rev_range_clear','click',function(e){ |
|
179 | YUE.on('rev_range_clear','click',function(e){ | |
180 | for (var i=0; i<checkboxes.length; i++){ |
|
180 | for (var i=0; i<checkboxes.length; i++){ | |
181 | var cb = checkboxes[i]; |
|
181 | var cb = checkboxes[i]; | |
182 | cb.checked = false; |
|
182 | cb.checked = false; | |
183 | } |
|
183 | } | |
184 | checkbox_checker(); |
|
184 | checkbox_checker(); | |
185 | YUE.preventDefault(e); |
|
185 | YUE.preventDefault(e); | |
186 | }); |
|
186 | }); | |
187 |
|
187 | |||
188 | var msgs = YUQ('.message'); |
|
188 | var msgs = YUQ('.message'); | |
189 | // get first element height |
|
189 | // get first element height | |
190 | var el = YUQ('#graph_content .container')[0]; |
|
190 | var el = YUQ('#graph_content .container')[0]; | |
191 | var row_h = el.clientHeight; |
|
191 | var row_h = el.clientHeight; | |
192 | for(var i=0;i<msgs.length;i++){ |
|
192 | for(var i=0;i<msgs.length;i++){ | |
193 | var m = msgs[i]; |
|
193 | var m = msgs[i]; | |
194 |
|
194 | |||
195 | var h = m.clientHeight; |
|
195 | var h = m.clientHeight; | |
196 | var pad = YUD.getStyle(m,'padding'); |
|
196 | var pad = YUD.getStyle(m,'padding'); | |
197 | if(h > row_h){ |
|
197 | if(h > row_h){ | |
198 | var offset = row_h - (h+12); |
|
198 | var offset = row_h - (h+12); | |
199 | YUD.setStyle(m.nextElementSibling,'display','block'); |
|
199 | YUD.setStyle(m.nextElementSibling,'display','block'); | |
200 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
|
200 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); | |
201 | }; |
|
201 | }; | |
202 | } |
|
202 | } | |
203 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
203 | YUE.on(YUQ('.expand'),'click',function(e){ | |
204 | var elem = e.currentTarget.parentNode.parentNode; |
|
204 | var elem = e.currentTarget.parentNode.parentNode; | |
205 | YUD.setStyle(e.currentTarget,'display','none'); |
|
205 | YUD.setStyle(e.currentTarget,'display','none'); | |
206 | YUD.setStyle(elem,'height','auto'); |
|
206 | YUD.setStyle(elem,'height','auto'); | |
207 |
|
207 | |||
208 | //redraw the graph, line_count and jsdata are global vars |
|
208 | //redraw the graph, line_count and jsdata are global vars | |
209 | set_canvas(100); |
|
209 | set_canvas(100); | |
210 |
|
210 | |||
211 | var r = new BranchRenderer(); |
|
211 | var r = new BranchRenderer(); | |
212 | r.render(jsdata,100,line_count); |
|
212 | r.render(jsdata,100,line_count); | |
213 |
|
213 | |||
214 | }); |
|
214 | }); | |
215 |
|
215 | |||
216 | // change branch filter |
|
216 | // change branch filter | |
217 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
217 | YUE.on(YUD.get('branch_filter'),'change',function(e){ | |
218 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
|
218 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; | |
219 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
|
219 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; | |
220 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
|
220 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; | |
221 | var url = url.replace('__BRANCH__',selected_branch); |
|
221 | var url = url.replace('__BRANCH__',selected_branch); | |
222 | if(selected_branch != ''){ |
|
222 | if(selected_branch != ''){ | |
223 | window.location = url; |
|
223 | window.location = url; | |
224 | }else{ |
|
224 | }else{ | |
225 | window.location = url_main; |
|
225 | window.location = url_main; | |
226 | } |
|
226 | } | |
227 |
|
227 | |||
228 | }); |
|
228 | }); | |
229 |
|
229 | |||
230 | function set_canvas(width) { |
|
230 | function set_canvas(width) { | |
231 | var c = document.getElementById('graph_nodes'); |
|
231 | var c = document.getElementById('graph_nodes'); | |
232 | var t = document.getElementById('graph_content'); |
|
232 | var t = document.getElementById('graph_content'); | |
233 | canvas = document.getElementById('graph_canvas'); |
|
233 | canvas = document.getElementById('graph_canvas'); | |
234 | var div_h = t.clientHeight; |
|
234 | var div_h = t.clientHeight; | |
235 | canvas.setAttribute('height',div_h); |
|
235 | canvas.setAttribute('height',div_h); | |
236 | canvas.setAttribute('width',width); |
|
236 | canvas.setAttribute('width',width); | |
237 | }; |
|
237 | }; | |
238 | var heads = 1; |
|
238 | var heads = 1; | |
239 | var line_count = 0; |
|
239 | var line_count = 0; | |
240 | var jsdata = ${c.jsdata|n}; |
|
240 | var jsdata = ${c.jsdata|n}; | |
241 |
|
241 | |||
242 | for (var i=0;i<jsdata.length;i++) { |
|
242 | for (var i=0;i<jsdata.length;i++) { | |
243 | var in_l = jsdata[i][2]; |
|
243 | var in_l = jsdata[i][2]; | |
244 | for (var j in in_l) { |
|
244 | for (var j in in_l) { | |
245 | var m = in_l[j][1]; |
|
245 | var m = in_l[j][1]; | |
246 | if (m > line_count) |
|
246 | if (m > line_count) | |
247 | line_count = m; |
|
247 | line_count = m; | |
248 | } |
|
248 | } | |
249 | } |
|
249 | } | |
250 | set_canvas(100); |
|
250 | set_canvas(100); | |
251 |
|
251 | |||
252 | var r = new BranchRenderer(); |
|
252 | var r = new BranchRenderer(); | |
253 | r.render(jsdata,100,line_count); |
|
253 | r.render(jsdata,100,line_count); | |
254 |
|
254 | |||
255 | }); |
|
255 | }); | |
256 | </script> |
|
256 | </script> | |
257 | %else: |
|
257 | %else: | |
258 | ${_('There are no changes yet')} |
|
258 | ${_('There are no changes yet')} | |
259 | %endif |
|
259 | %endif | |
260 | </div> |
|
260 | </div> | |
261 | </div> |
|
261 | </div> | |
262 | </%def> |
|
262 | </%def> |
@@ -1,199 +1,199 | |||||
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} - |
|
6 | ${_('%s Changeset') % c.repo_name} - ${h.show_id(c.changeset)} · ${c.rhodecode_name} | |
7 | </%def> |
|
7 | </%def> | |
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | ${_('changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> |
|
10 | ${_('changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> | |
11 | </%def> |
|
11 | </%def> | |
12 |
|
12 | |||
13 | <%def name="page_nav()"> |
|
13 | <%def name="page_nav()"> | |
14 | ${self.menu('changelog')} |
|
14 | ${self.menu('changelog')} | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="main()"> |
|
17 | <%def name="main()"> | |
18 | ${self.context_bar('changelog')} |
|
18 | ${self.context_bar('changelog')} | |
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 | <script> |
|
24 | <script> | |
25 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
25 | var _USERS_AC_DATA = ${c.users_array|n}; | |
26 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
26 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
27 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; |
|
27 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; | |
28 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
28 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
29 | </script> |
|
29 | </script> | |
30 | <div class="table"> |
|
30 | <div class="table"> | |
31 | <div class="diffblock"> |
|
31 | <div class="diffblock"> | |
32 | <div class="parents"> |
|
32 | <div class="parents"> | |
33 | %if c.changeset.parents: |
|
33 | %if c.changeset.parents: | |
34 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): |
|
34 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): | |
35 | <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> |
|
35 | <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> | |
36 | <br> |
|
36 | <br> | |
37 | %endfor |
|
37 | %endfor | |
38 | %else: |
|
38 | %else: | |
39 | <span>${_('No parents')}</span> |
|
39 | <span>${_('No parents')}</span> | |
40 | %endif |
|
40 | %endif | |
41 | </div> |
|
41 | </div> | |
42 | <div class="children"> |
|
42 | <div class="children"> | |
43 | %if c.changeset.children: |
|
43 | %if c.changeset.children: | |
44 | %for n, p_cs in enumerate(reversed(c.changeset.children)): |
|
44 | %for n, p_cs in enumerate(reversed(c.changeset.children)): | |
45 | <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> |
|
45 | <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> | |
46 | <br> |
|
46 | <br> | |
47 | %endfor |
|
47 | %endfor | |
48 | %else: |
|
48 | %else: | |
49 | <span>${_('No children')}</span> |
|
49 | <span>${_('No children')}</span> | |
50 | %endif |
|
50 | %endif | |
51 | </div> |
|
51 | </div> | |
52 | <div class="code-header banner"> |
|
52 | <div class="code-header banner"> | |
53 |
|
53 | |||
54 | <div class="hash"> |
|
54 | <div class="hash"> | |
55 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
55 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} | |
56 | </div> |
|
56 | </div> | |
57 | <div class="date"> |
|
57 | <div class="date"> | |
58 | ${h.fmt_date(c.changeset.date)} |
|
58 | ${h.fmt_date(c.changeset.date)} | |
59 | </div> |
|
59 | </div> | |
60 | <div class="changeset-status-container"> |
|
60 | <div class="changeset-status-container"> | |
61 | %if c.statuses: |
|
61 | %if c.statuses: | |
62 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> |
|
62 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> | |
63 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> |
|
63 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> | |
64 | %endif |
|
64 | %endif | |
65 | </div> |
|
65 | </div> | |
66 | <div class="diff-actions"> |
|
66 | <div class="diff-actions"> | |
67 | <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> |
|
67 | <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> | |
68 | <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> |
|
68 | <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> | |
69 | <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> |
|
69 | <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> | |
70 | ${c.ignorews_url(request.GET)} |
|
70 | ${c.ignorews_url(request.GET)} | |
71 | ${c.context_url(request.GET)} |
|
71 | ${c.context_url(request.GET)} | |
72 | </div> |
|
72 | </div> | |
73 | <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> |
|
73 | <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> | |
74 | </div> |
|
74 | </div> | |
75 | </div> |
|
75 | </div> | |
76 | <div id="changeset_content"> |
|
76 | <div id="changeset_content"> | |
77 | <div class="container"> |
|
77 | <div class="container"> | |
78 | <div class="left"> |
|
78 | <div class="left"> | |
79 | <div class="author"> |
|
79 | <div class="author"> | |
80 | <div class="gravatar"> |
|
80 | <div class="gravatar"> | |
81 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> |
|
81 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> | |
82 | </div> |
|
82 | </div> | |
83 | <span>${h.person(c.changeset.author)}</span><br/> |
|
83 | <span>${h.person(c.changeset.author)}</span><br/> | |
84 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> |
|
84 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> | |
85 | </div> |
|
85 | </div> | |
86 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> |
|
86 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> | |
87 | </div> |
|
87 | </div> | |
88 | <div class="right"> |
|
88 | <div class="right"> | |
89 | <div class="changes"> |
|
89 | <div class="changes"> | |
90 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: |
|
90 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: | |
91 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> |
|
91 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> | |
92 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> |
|
92 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> | |
93 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> |
|
93 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> | |
94 | % else: |
|
94 | % else: | |
95 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
95 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
96 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
96 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
97 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
97 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
98 | % endif |
|
98 | % endif | |
99 | </div> |
|
99 | </div> | |
100 |
|
100 | |||
101 | <span class="logtags"> |
|
101 | <span class="logtags"> | |
102 | %if len(c.changeset.parents)>1: |
|
102 | %if len(c.changeset.parents)>1: | |
103 | <span class="merge">${_('merge')}</span> |
|
103 | <span class="merge">${_('merge')}</span> | |
104 | %endif |
|
104 | %endif | |
105 | %if c.changeset.branch: |
|
105 | %if c.changeset.branch: | |
106 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> |
|
106 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> | |
107 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} |
|
107 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} | |
108 | </span> |
|
108 | </span> | |
109 | %endif |
|
109 | %endif | |
110 | %for tag in c.changeset.tags: |
|
110 | %for tag in c.changeset.tags: | |
111 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
111 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
112 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> |
|
112 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> | |
113 | %endfor |
|
113 | %endfor | |
114 | </span> |
|
114 | </span> | |
115 | </div> |
|
115 | </div> | |
116 | </div> |
|
116 | </div> | |
117 | <span> |
|
117 | <span> | |
118 | % if c.limited_diff: |
|
118 | % if c.limited_diff: | |
119 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: |
|
119 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: | |
120 | % else: |
|
120 | % else: | |
121 | ${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)}: |
|
121 | ${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)}: | |
122 | %endif |
|
122 | %endif | |
123 | </span> |
|
123 | </span> | |
124 | <div class="cs_files"> |
|
124 | <div class="cs_files"> | |
125 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): |
|
125 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): | |
126 | <div class="cs_${change}"> |
|
126 | <div class="cs_${change}"> | |
127 | <div class="node"> |
|
127 | <div class="node"> | |
128 | <a href="#${FID}">${h.safe_unicode(path)}</a> |
|
128 | <a href="#${FID}">${h.safe_unicode(path)}</a> | |
129 | </div> |
|
129 | </div> | |
130 | <div class="changes">${h.fancy_file_stats(stats)}</div> |
|
130 | <div class="changes">${h.fancy_file_stats(stats)}</div> | |
131 | </div> |
|
131 | </div> | |
132 | %endfor |
|
132 | %endfor | |
133 | % if c.limited_diff: |
|
133 | % if c.limited_diff: | |
134 | <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> |
|
134 | <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> | |
135 | % endif |
|
135 | % endif | |
136 | </div> |
|
136 | </div> | |
137 | </div> |
|
137 | </div> | |
138 |
|
138 | |||
139 | </div> |
|
139 | </div> | |
140 |
|
140 | |||
141 | ## diff block |
|
141 | ## diff block | |
142 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
142 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
143 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} |
|
143 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} | |
144 |
|
144 | |||
145 | % if c.limited_diff: |
|
145 | % if c.limited_diff: | |
146 | <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> |
|
146 | <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> | |
147 | % endif |
|
147 | % endif | |
148 |
|
148 | |||
149 | ## template for inline comment form |
|
149 | ## template for inline comment form | |
150 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
150 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
151 | ${comment.comment_inline_form()} |
|
151 | ${comment.comment_inline_form()} | |
152 |
|
152 | |||
153 | ## render comments and inlines |
|
153 | ## render comments and inlines | |
154 | ${comment.generate_comments()} |
|
154 | ${comment.generate_comments()} | |
155 |
|
155 | |||
156 | ## main comment form and it status |
|
156 | ## main comment form and it status | |
157 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), |
|
157 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), | |
158 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} |
|
158 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} | |
159 |
|
159 | |||
160 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
160 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS | |
161 | <script type="text/javascript"> |
|
161 | <script type="text/javascript"> | |
162 | YUE.onDOMReady(function(){ |
|
162 | YUE.onDOMReady(function(){ | |
163 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
163 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ | |
164 | var show = 'none'; |
|
164 | var show = 'none'; | |
165 | var target = e.currentTarget; |
|
165 | var target = e.currentTarget; | |
166 | if(target == null){ |
|
166 | if(target == null){ | |
167 | target = this; |
|
167 | target = this; | |
168 | } |
|
168 | } | |
169 | if(target.checked){ |
|
169 | if(target.checked){ | |
170 | var show = '' |
|
170 | var show = '' | |
171 | } |
|
171 | } | |
172 | var boxid = YUD.getAttribute(target,'id_for'); |
|
172 | var boxid = YUD.getAttribute(target,'id_for'); | |
173 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
173 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); | |
174 | for(c in comments){ |
|
174 | for(c in comments){ | |
175 | YUD.setStyle(comments[c],'display',show); |
|
175 | YUD.setStyle(comments[c],'display',show); | |
176 | } |
|
176 | } | |
177 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
177 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); | |
178 | for(c in btns){ |
|
178 | for(c in btns){ | |
179 | YUD.setStyle(btns[c],'display',show); |
|
179 | YUD.setStyle(btns[c],'display',show); | |
180 | } |
|
180 | } | |
181 | }) |
|
181 | }) | |
182 |
|
182 | |||
183 | YUE.on(YUQ('.line'),'click',function(e){ |
|
183 | YUE.on(YUQ('.line'),'click',function(e){ | |
184 | var tr = e.currentTarget; |
|
184 | var tr = e.currentTarget; | |
185 | if(tr == null){ |
|
185 | if(tr == null){ | |
186 | tr = this; |
|
186 | tr = this; | |
187 | } |
|
187 | } | |
188 | injectInlineForm(tr); |
|
188 | injectInlineForm(tr); | |
189 | }); |
|
189 | }); | |
190 |
|
190 | |||
191 | // inject comments into they proper positions |
|
191 | // inject comments into they proper positions | |
192 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
192 | var file_comments = YUQ('.inline-comment-placeholder'); | |
193 | renderInlineComments(file_comments); |
|
193 | renderInlineComments(file_comments); | |
194 | }) |
|
194 | }) | |
195 |
|
195 | |||
196 | </script> |
|
196 | </script> | |
197 |
|
197 | |||
198 | </div> |
|
198 | </div> | |
199 | </%def> |
|
199 | </%def> |
@@ -1,122 +1,122 | |||||
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 Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
|
5 | ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} · ${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.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
12 | » |
|
12 | » | |
13 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
|
13 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} | |
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')} / ${h.link_to(_('Show combined compare'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id))}</h3> |
|
29 | <h3 class="code-header-title">${_('Compare View')} / ${h.link_to(_('Show combined compare'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id))}</h3> | |
30 | <div> |
|
30 | <div> | |
31 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
|
31 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} | |
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 | <div class="container"> |
|
36 | <div class="container"> | |
37 | <table class="compare_view_commits noborder"> |
|
37 | <table class="compare_view_commits noborder"> | |
38 | %for cnt,cs in enumerate(c.cs_ranges): |
|
38 | %for cnt,cs in enumerate(c.cs_ranges): | |
39 | <tr> |
|
39 | <tr> | |
40 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td> |
|
40 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td> | |
41 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> |
|
41 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> | |
42 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
42 | <td><div class="author">${h.person(cs.author)}</div></td> | |
43 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
|
43 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> | |
44 | <td> |
|
44 | <td> | |
45 | %if c.statuses: |
|
45 | %if c.statuses: | |
46 | <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div> |
|
46 | <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div> | |
47 | %endif |
|
47 | %endif | |
48 | </td> |
|
48 | </td> | |
49 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> |
|
49 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> | |
50 | </tr> |
|
50 | </tr> | |
51 | %endfor |
|
51 | %endfor | |
52 | </table> |
|
52 | </table> | |
53 | </div> |
|
53 | </div> | |
54 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
|
54 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> | |
55 | <div class="cs_files"> |
|
55 | <div class="cs_files"> | |
56 | %for cs in c.cs_ranges: |
|
56 | %for cs in c.cs_ranges: | |
57 | <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
57 | <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> | |
58 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems(): |
|
58 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems(): | |
59 | <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div> |
|
59 | <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div> | |
60 | %endfor |
|
60 | %endfor | |
61 | %endfor |
|
61 | %endfor | |
62 | </div> |
|
62 | </div> | |
63 | </div> |
|
63 | </div> | |
64 |
|
64 | |||
65 | </div> |
|
65 | </div> | |
66 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
66 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
67 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
67 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
68 | %for cs in c.cs_ranges: |
|
68 | %for cs in c.cs_ranges: | |
69 | ##${comment.comment_inline_form(cs)} |
|
69 | ##${comment.comment_inline_form(cs)} | |
70 | ## diff block |
|
70 | ## diff block | |
71 | <div class="h3"> |
|
71 | <div class="h3"> | |
72 | <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a> |
|
72 | <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a> | |
73 | <div class="gravatar"> |
|
73 | <div class="gravatar"> | |
74 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/> |
|
74 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/> | |
75 | </div> |
|
75 | </div> | |
76 | <div class="right"> |
|
76 | <div class="right"> | |
77 | <span class="logtags"> |
|
77 | <span class="logtags"> | |
78 | %if len(cs.parents)>1: |
|
78 | %if len(cs.parents)>1: | |
79 | <span class="merge">${_('merge')}</span> |
|
79 | <span class="merge">${_('merge')}</span> | |
80 | %endif |
|
80 | %endif | |
81 | %if cs.branch: |
|
81 | %if cs.branch: | |
82 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
82 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | |
83 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
83 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
84 | </span> |
|
84 | </span> | |
85 | %endif |
|
85 | %endif | |
86 | %if h.is_hg(c.rhodecode_repo): |
|
86 | %if h.is_hg(c.rhodecode_repo): | |
87 | %for book in cs.bookmarks: |
|
87 | %for book in cs.bookmarks: | |
88 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
88 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
89 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
89 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
90 | </span> |
|
90 | </span> | |
91 | %endfor |
|
91 | %endfor | |
92 | %endif |
|
92 | %endif | |
93 | %for tag in cs.tags: |
|
93 | %for tag in cs.tags: | |
94 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
94 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
95 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
95 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> | |
96 | %endfor |
|
96 | %endfor | |
97 | </span> |
|
97 | </span> | |
98 | </div> |
|
98 | </div> | |
99 | </div> |
|
99 | </div> | |
100 | ${diff_block.diff_block(c.changes[cs.raw_id])} |
|
100 | ${diff_block.diff_block(c.changes[cs.raw_id])} | |
101 | ##${comment.comments(cs)} |
|
101 | ##${comment.comments(cs)} | |
102 |
|
102 | |||
103 | %endfor |
|
103 | %endfor | |
104 | <script type="text/javascript"> |
|
104 | <script type="text/javascript"> | |
105 |
|
105 | |||
106 | YUE.onDOMReady(function(){ |
|
106 | YUE.onDOMReady(function(){ | |
107 |
|
107 | |||
108 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
108 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ | |
109 | var act = e.currentTarget.nextElementSibling; |
|
109 | var act = e.currentTarget.nextElementSibling; | |
110 |
|
110 | |||
111 | if(YUD.hasClass(act,'active')){ |
|
111 | if(YUD.hasClass(act,'active')){ | |
112 | YUD.removeClass(act,'active'); |
|
112 | YUD.removeClass(act,'active'); | |
113 | YUD.setStyle(act,'display','none'); |
|
113 | YUD.setStyle(act,'display','none'); | |
114 | }else{ |
|
114 | }else{ | |
115 | YUD.addClass(act,'active'); |
|
115 | YUD.addClass(act,'active'); | |
116 | YUD.setStyle(act,'display',''); |
|
116 | YUD.setStyle(act,'display',''); | |
117 | } |
|
117 | } | |
118 | }); |
|
118 | }); | |
119 | }) |
|
119 | }) | |
120 | </script> |
|
120 | </script> | |
121 | </div> |
|
121 | </div> | |
122 | </%def> |
|
122 | </%def> |
@@ -1,93 +1,93 | |||||
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 |
${ |
|
5 | ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} · ${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.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
12 | » |
|
12 | » | |
13 | ${_('compare')} |
|
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,47 +1,47 | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 |
${_('%s File |
|
4 | ${_('%s File Diff') % 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('summary_home',repo_name=c.repo_name))} |
|
10 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
11 | » |
|
11 | » | |
12 | ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} → r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)} |
|
12 | ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} → r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
16 | ${self.menu('files')} |
|
16 | ${self.menu('files')} | |
17 | </%def> |
|
17 | </%def> | |
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 | <div> |
|
24 | <div> | |
25 | ## diff block |
|
25 | ## diff block | |
26 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
26 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
27 | ${diff_block.diff_block(c.changes)} |
|
27 | ${diff_block.diff_block(c.changes)} | |
28 | </div> |
|
28 | </div> | |
29 | </div> |
|
29 | </div> | |
30 | <script> |
|
30 | <script> | |
31 | YUE.onDOMReady(function(){ |
|
31 | YUE.onDOMReady(function(){ | |
32 |
|
32 | |||
33 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
33 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ | |
34 | var act = e.currentTarget.nextElementSibling; |
|
34 | var act = e.currentTarget.nextElementSibling; | |
35 |
|
35 | |||
36 | if(YUD.hasClass(act,'active')){ |
|
36 | if(YUD.hasClass(act,'active')){ | |
37 | YUD.removeClass(act,'active'); |
|
37 | YUD.removeClass(act,'active'); | |
38 | YUD.setStyle(act,'display','none'); |
|
38 | YUD.setStyle(act,'display','none'); | |
39 | }else{ |
|
39 | }else{ | |
40 | YUD.addClass(act,'active'); |
|
40 | YUD.addClass(act,'active'); | |
41 | YUD.setStyle(act,'display',''); |
|
41 | YUD.setStyle(act,'display',''); | |
42 | } |
|
42 | } | |
43 | }); |
|
43 | }); | |
44 |
|
44 | |||
45 | }) |
|
45 | }) | |
46 | </script> |
|
46 | </script> | |
47 | </%def> |
|
47 | </%def> |
@@ -1,158 +1,163 | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title(*args)"> | |
4 |
${_('%s |
|
4 | ${_('%s Files') % c.repo_name} | |
|
5 | %if hasattr(c,'file'): | |||
|
6 | · ${c.file.path or '\\'} | |||
|
7 | %endif | |||
|
8 | · ${c.rhodecode_name} | |||
5 | </%def> |
|
9 | </%def> | |
6 |
|
10 | |||
7 | <%def name="breadcrumbs_links()"> |
|
11 | <%def name="breadcrumbs_links()"> | |
8 | ${_('Files')} |
|
12 | ${_('Files')} | |
9 | %if c.file: |
|
13 | %if c.file: | |
10 |
@ |
|
14 | @ ${h.show_id(c.changeset)} | |
11 | %endif |
|
15 | %endif | |
12 | </%def> |
|
16 | </%def> | |
13 |
|
17 | |||
14 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
15 | ${self.menu('files')} |
|
19 | ${self.menu('files')} | |
16 | </%def> |
|
20 | </%def> | |
17 |
|
21 | |||
18 | <%def name="main()"> |
|
22 | <%def name="main()"> | |
19 | ${self.context_bar('files')} |
|
23 | ${self.context_bar('files')} | |
20 | <div class="box"> |
|
24 | <div class="box"> | |
21 | <!-- box / title --> |
|
25 | <!-- box / title --> | |
22 | <div class="title"> |
|
26 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
27 | ${self.breadcrumbs()} | |
24 | <ul class="links"> |
|
28 | <ul class="links"> | |
25 | <li> |
|
29 | <li> | |
26 | <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span> |
|
30 | <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span> | |
27 | </li> |
|
31 | </li> | |
28 | </ul> |
|
32 | </ul> | |
29 | </div> |
|
33 | </div> | |
30 | <div class="table"> |
|
34 | <div class="table"> | |
31 | <div id="files_data"> |
|
35 | <div id="files_data"> | |
32 | <%include file='files_ypjax.html'/> |
|
36 | <%include file='files_ypjax.html'/> | |
33 | </div> |
|
37 | </div> | |
34 | </div> |
|
38 | </div> | |
35 | </div> |
|
39 | </div> | |
36 |
|
40 | |||
37 | <script type="text/javascript"> |
|
41 | <script type="text/javascript"> | |
38 | var CACHE = {}; |
|
42 | var CACHE = {}; | |
39 | var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s |
|
43 | var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s | |
40 | //used to construct links from the search list |
|
44 | //used to construct links from the search list | |
41 | var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
45 | var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; | |
42 | //send the nodelist request to this url |
|
46 | //send the nodelist request to this url | |
43 | var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
47 | var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; | |
44 | // send the node history requst to this url |
|
48 | // send the node history requst to this url | |
45 | var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
49 | var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; | |
46 |
|
50 | |||
47 | var ypjax_links = function(){ |
|
51 | var ypjax_links = function(){ | |
48 | YUE.on(YUQ('.ypjax-link'), 'click',function(e){ |
|
52 | YUE.on(YUQ('.ypjax-link'), 'click',function(e){ | |
49 |
|
53 | |||
50 | //don't do ypjax on middle click |
|
54 | //don't do ypjax on middle click | |
51 | if(e.which == 2 || !History.enabled){ |
|
55 | if(e.which == 2 || !History.enabled){ | |
52 | return true; |
|
56 | return true; | |
53 | } |
|
57 | } | |
54 |
|
58 | |||
55 | var el = e.currentTarget; |
|
59 | var el = e.currentTarget; | |
56 | var url = el.href; |
|
60 | var url = el.href; | |
57 |
|
61 | |||
58 | var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}'; |
|
62 | var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}'; | |
59 | _base_url = _base_url.replace('//','/') |
|
63 | _base_url = _base_url.replace('//','/') | |
60 |
|
64 | |||
61 | //extract rev and the f_path from url. |
|
65 | //extract rev and the f_path from url. | |
62 | parts = url.split(_base_url) |
|
66 | parts = url.split(_base_url) | |
63 | if(parts.length != 2){ |
|
67 | if(parts.length != 2){ | |
64 | return false; |
|
68 | return false; | |
65 | } |
|
69 | } | |
66 |
|
70 | |||
67 | var parts2 = parts[1].split('/'); |
|
71 | var parts2 = parts[1].split('/'); | |
68 |
|
|
72 | var rev = parts2.shift(); // pop the first element which is the revision | |
69 |
|
|
73 | var f_path = parts2.join('/'); | |
70 |
|
74 | |||
71 | var title = "${_('%s files') % c.repo_name}" + " - " + f_path; |
|
75 | //page title make this consistent with title() mako function on top | |
|
76 | var title = "${_('%s Files') % c.repo_name}" + " · " + (f_path || '\\') + " · " + "${c.rhodecode_name}"; | |||
72 |
|
77 | |||
73 | var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path); |
|
78 | var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path); | |
74 | var _url_base = url_base.replace('__REV__',rev); |
|
79 | var _url_base = url_base.replace('__REV__',rev); | |
75 |
|
80 | |||
76 | // Change our States and save some data for handling events |
|
81 | // Change our States and save some data for handling events | |
77 | var data = {url:url,title:title, url_base:_url_base, |
|
82 | var data = {url:url,title:title, url_base:_url_base, | |
78 | node_list_url:_node_list_url, rev:rev, f_path:f_path}; |
|
83 | node_list_url:_node_list_url, rev:rev, f_path:f_path}; | |
79 | History.pushState(data, title, url); |
|
84 | History.pushState(data, title, url); | |
80 |
|
85 | |||
81 | //now we're sure that we can do ypjax things |
|
86 | //now we're sure that we can do ypjax things | |
82 | YUE.preventDefault(e); |
|
87 | YUE.preventDefault(e); | |
83 | return false; |
|
88 | return false; | |
84 | }); |
|
89 | }); | |
85 | } |
|
90 | } | |
86 |
|
91 | |||
87 | var callbacks = function(State){ |
|
92 | var callbacks = function(State){ | |
88 | ypjax_links(); |
|
93 | ypjax_links(); | |
89 | tooltip_activate(); |
|
94 | tooltip_activate(); | |
90 | fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); |
|
95 | fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); | |
91 |
|
96 | |||
92 | if(YUD.get('hlcode')){ |
|
97 | if(YUD.get('hlcode')){ | |
93 | YUE.on('hlcode', 'mouseup', getSelectionLink); |
|
98 | YUE.on('hlcode', 'mouseup', getSelectionLink); | |
94 | } |
|
99 | } | |
95 | //console.log(State); |
|
100 | //console.log(State); | |
96 | if(YUD.get('load_node_history')){ |
|
101 | if(YUD.get('load_node_history')){ | |
97 | //remove all listeners due to problems of history state |
|
102 | //remove all listeners due to problems of history state | |
98 | YUE.removeListener('load_node_history', 'click'); |
|
103 | YUE.removeListener('load_node_history', 'click'); | |
99 | YUE.on('load_node_history', 'click', function(e){ |
|
104 | YUE.on('load_node_history', 'click', function(e){ | |
100 | var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path); |
|
105 | var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path); | |
101 | ypjax(_url, 'node_history', function(o){ |
|
106 | ypjax(_url, 'node_history', function(o){ | |
102 | tooltip_activate(); |
|
107 | tooltip_activate(); | |
103 | }) |
|
108 | }) | |
104 | }); |
|
109 | }); | |
105 | } |
|
110 | } | |
106 | // Inform Google Analytics of the change |
|
111 | // Inform Google Analytics of the change | |
107 | if ( typeof window.pageTracker !== 'undefined' ) { |
|
112 | if ( typeof window.pageTracker !== 'undefined' ) { | |
108 | window.pageTracker._trackPageview(State.url); |
|
113 | window.pageTracker._trackPageview(State.url); | |
109 | } |
|
114 | } | |
110 | } |
|
115 | } | |
111 |
|
116 | |||
112 | YUE.onDOMReady(function(){ |
|
117 | YUE.onDOMReady(function(){ | |
113 | ypjax_links(); |
|
118 | ypjax_links(); | |
114 | var container = 'files_data'; |
|
119 | var container = 'files_data'; | |
115 | //Bind to StateChange Event |
|
120 | //Bind to StateChange Event | |
116 | History.Adapter.bind(window,'statechange',function(){ |
|
121 | History.Adapter.bind(window,'statechange',function(){ | |
117 | var State = History.getState(); |
|
122 | var State = History.getState(); | |
118 | cache_key = State.url; |
|
123 | cache_key = State.url; | |
119 | //check if we have this request in cache maybe ? |
|
124 | //check if we have this request in cache maybe ? | |
120 | var _cache_obj = CACHE[cache_key]; |
|
125 | var _cache_obj = CACHE[cache_key]; | |
121 | var _cur_time = new Date().getTime(); |
|
126 | var _cur_time = new Date().getTime(); | |
122 | // get from cache if it's there and not yet expired ! |
|
127 | // get from cache if it's there and not yet expired ! | |
123 | if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){ |
|
128 | if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){ | |
124 | YUD.get(container).innerHTML=_cache_obj[1]; |
|
129 | YUD.get(container).innerHTML=_cache_obj[1]; | |
125 | YUD.setStyle(container,'opacity','1.0'); |
|
130 | YUD.setStyle(container,'opacity','1.0'); | |
126 |
|
131 | |||
127 | //callbacks after ypjax call |
|
132 | //callbacks after ypjax call | |
128 | callbacks(State); |
|
133 | callbacks(State); | |
129 | } |
|
134 | } | |
130 | else{ |
|
135 | else{ | |
131 | ypjax(State.url,container,function(o){ |
|
136 | ypjax(State.url,container,function(o){ | |
132 | //callbacks after ypjax call |
|
137 | //callbacks after ypjax call | |
133 | callbacks(State); |
|
138 | callbacks(State); | |
134 | if (o !== undefined){ |
|
139 | if (o !== undefined){ | |
135 | //store our request in cache |
|
140 | //store our request in cache | |
136 | var _expire_on = new Date().getTime()+CACHE_EXPIRE; |
|
141 | var _expire_on = new Date().getTime()+CACHE_EXPIRE; | |
137 | CACHE[cache_key] = [_expire_on, o.responseText]; |
|
142 | CACHE[cache_key] = [_expire_on, o.responseText]; | |
138 | } |
|
143 | } | |
139 | }); |
|
144 | }); | |
140 | } |
|
145 | } | |
141 | }); |
|
146 | }); | |
142 |
|
147 | |||
143 | // init the search filter |
|
148 | // init the search filter | |
144 | var _State = { |
|
149 | var _State = { | |
145 | url: "${h.url.current()}", |
|
150 | url: "${h.url.current()}", | |
146 | data: { |
|
151 | data: { | |
147 | node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"), |
|
152 | node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"), | |
148 | url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"), |
|
153 | url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"), | |
149 | rev:"${c.changeset.raw_id}", |
|
154 | rev:"${c.changeset.raw_id}", | |
150 | f_path: "${h.safe_unicode(c.file.path)}" |
|
155 | f_path: "${h.safe_unicode(c.file.path)}" | |
151 | } |
|
156 | } | |
152 | } |
|
157 | } | |
153 | fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); |
|
158 | fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); | |
154 | }); |
|
159 | }); | |
155 |
|
160 | |||
156 | </script> |
|
161 | </script> | |
157 |
|
162 | |||
158 | </%def> |
|
163 | </%def> |
@@ -1,92 +1,92 | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 |
${_('%s |
|
4 | ${_('%s Files Add') % c.repo_name} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="js_extra()"> |
|
7 | <%def name="js_extra()"> | |
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="css_extra()"> |
|
10 | <%def name="css_extra()"> | |
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="breadcrumbs_links()"> |
|
14 | <%def name="breadcrumbs_links()"> | |
15 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
15 | ${h.link_to(_(u'Home'),h.url('/'))} | |
16 | » |
|
16 | » | |
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
18 | » |
|
18 | » | |
19 | ${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} |
|
19 | ${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="page_nav()"> |
|
22 | <%def name="page_nav()"> | |
23 | ${self.menu('files')} |
|
23 | ${self.menu('files')} | |
24 | </%def> |
|
24 | </%def> | |
25 | <%def name="main()"> |
|
25 | <%def name="main()"> | |
26 | <div class="box"> |
|
26 | <div class="box"> | |
27 | <!-- box / title --> |
|
27 | <!-- box / title --> | |
28 | <div class="title"> |
|
28 | <div class="title"> | |
29 | ${self.breadcrumbs()} |
|
29 | ${self.breadcrumbs()} | |
30 | <ul class="links"> |
|
30 | <ul class="links"> | |
31 | <li> |
|
31 | <li> | |
32 | <span style="text-transform: uppercase;"> |
|
32 | <span style="text-transform: uppercase;"> | |
33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> | |
34 | </li> |
|
34 | </li> | |
35 | </ul> |
|
35 | </ul> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="table"> |
|
37 | <div class="table"> | |
38 | <div id="files_data"> |
|
38 | <div id="files_data"> | |
39 | ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")} |
|
39 | ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")} | |
40 | <h3>${_('Add new file')}</h3> |
|
40 | <h3>${_('Add new file')}</h3> | |
41 | <div class="form"> |
|
41 | <div class="form"> | |
42 | <div class="fields"> |
|
42 | <div class="fields"> | |
43 | <div id="filename_container" class="field file"> |
|
43 | <div id="filename_container" class="field file"> | |
44 | <div class="label"> |
|
44 | <div class="label"> | |
45 | <label for="filename">${_('File Name')}:</label> |
|
45 | <label for="filename">${_('File Name')}:</label> | |
46 | </div> |
|
46 | </div> | |
47 | <div class="input"> |
|
47 | <div class="input"> | |
48 | <input type="text" value="" size="30" name="filename" id="filename"> |
|
48 | <input type="text" value="" size="30" name="filename" id="filename"> | |
49 | ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> |
|
49 | ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> | |
50 | </div> |
|
50 | </div> | |
51 | </div> |
|
51 | </div> | |
52 | <div id="upload_file_container" class="field" style="display:none"> |
|
52 | <div id="upload_file_container" class="field" style="display:none"> | |
53 | <div class="label"> |
|
53 | <div class="label"> | |
54 | <label for="upload_file_container">${_('Upload file')}</label> |
|
54 | <label for="upload_file_container">${_('Upload file')}</label> | |
55 | </div> |
|
55 | </div> | |
56 | <div class="file"> |
|
56 | <div class="file"> | |
57 | <input type="file" size="30" name="upload_file" id="upload_file"> |
|
57 | <input type="file" size="30" name="upload_file" id="upload_file"> | |
58 | ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span> |
|
58 | ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span> | |
59 | </div> |
|
59 | </div> | |
60 | </div> |
|
60 | </div> | |
61 | <div class="field"> |
|
61 | <div class="field"> | |
62 | <div class="label"> |
|
62 | <div class="label"> | |
63 | <label for="location">${_('Location')}</label> |
|
63 | <label for="location">${_('Location')}</label> | |
64 | </div> |
|
64 | </div> | |
65 | <div class="input"> |
|
65 | <div class="input"> | |
66 | <input type="text" value="${c.f_path}" size="30" name="location" id="location"> |
|
66 | <input type="text" value="${c.f_path}" size="30" name="location" id="location"> | |
67 | ${_('use / to separate directories')} |
|
67 | ${_('use / to separate directories')} | |
68 | </div> |
|
68 | </div> | |
69 | </div> |
|
69 | </div> | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 | <div id="body" class="codeblock"> |
|
72 | <div id="body" class="codeblock"> | |
73 | <div id="editor_container"> |
|
73 | <div id="editor_container"> | |
74 | <pre id="editor_pre"></pre> |
|
74 | <pre id="editor_pre"></pre> | |
75 | <textarea id="editor" name="content" style="display:none"></textarea> |
|
75 | <textarea id="editor" name="content" style="display:none"></textarea> | |
76 | </div> |
|
76 | </div> | |
77 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
|
77 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> | |
78 | <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> |
|
78 | <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> | |
79 | </div> |
|
79 | </div> | |
80 | <div style="text-align: l;padding-top: 5px"> |
|
80 | <div style="text-align: l;padding-top: 5px"> | |
81 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
81 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} | |
82 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
82 | ${h.reset('reset',_('Reset'),class_="ui-btn")} | |
83 | </div> |
|
83 | </div> | |
84 | ${h.end_form()} |
|
84 | ${h.end_form()} | |
85 | <script type="text/javascript"> |
|
85 | <script type="text/javascript"> | |
86 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}"; |
|
86 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}"; | |
87 | initCodeMirror('editor',reset_url); |
|
87 | initCodeMirror('editor',reset_url); | |
88 | </script> |
|
88 | </script> | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | </%def> |
|
92 | </%def> |
@@ -1,78 +1,78 | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 |
${_('%s Edit |
|
4 | ${_('%s Files Edit') % c.repo_name} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="js_extra()"> |
|
7 | <%def name="js_extra()"> | |
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="css_extra()"> |
|
10 | <%def name="css_extra()"> | |
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="breadcrumbs_links()"> |
|
14 | <%def name="breadcrumbs_links()"> | |
15 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
15 | ${h.link_to(_(u'Home'),h.url('/'))} | |
16 | » |
|
16 | » | |
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
18 | » |
|
18 | » | |
19 | ${_('edit file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} |
|
19 | ${_('edit file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="page_nav()"> |
|
22 | <%def name="page_nav()"> | |
23 | ${self.menu('files')} |
|
23 | ${self.menu('files')} | |
24 | </%def> |
|
24 | </%def> | |
25 | <%def name="main()"> |
|
25 | <%def name="main()"> | |
26 | <div class="box"> |
|
26 | <div class="box"> | |
27 | <!-- box / title --> |
|
27 | <!-- box / title --> | |
28 | <div class="title"> |
|
28 | <div class="title"> | |
29 | ${self.breadcrumbs()} |
|
29 | ${self.breadcrumbs()} | |
30 | <ul class="links"> |
|
30 | <ul class="links"> | |
31 | <li> |
|
31 | <li> | |
32 | <span style="text-transform: uppercase;"> |
|
32 | <span style="text-transform: uppercase;"> | |
33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> | |
34 | </li> |
|
34 | </li> | |
35 | </ul> |
|
35 | </ul> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="table"> |
|
37 | <div class="table"> | |
38 | <div id="files_data"> |
|
38 | <div id="files_data"> | |
39 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> |
|
39 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> | |
40 | ${h.form(h.url.current(),method='post',id='eform')} |
|
40 | ${h.form(h.url.current(),method='post',id='eform')} | |
41 | <div id="body" class="codeblock"> |
|
41 | <div id="body" class="codeblock"> | |
42 | <div class="code-header"> |
|
42 | <div class="code-header"> | |
43 | <div class="stats"> |
|
43 | <div class="stats"> | |
44 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> |
|
44 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> | |
45 | <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div> |
|
45 | <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div> | |
46 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> |
|
46 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> | |
47 | <div class="left item last">${c.file.mimetype}</div> |
|
47 | <div class="left item last">${c.file.mimetype}</div> | |
48 | <div class="buttons"> |
|
48 | <div class="buttons"> | |
49 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
49 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
50 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
50 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
51 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
51 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
52 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
52 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
53 | % if not c.file.is_binary: |
|
53 | % if not c.file.is_binary: | |
54 | ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
54 | ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
55 | % endif |
|
55 | % endif | |
56 | % endif |
|
56 | % endif | |
57 | </div> |
|
57 | </div> | |
58 | </div> |
|
58 | </div> | |
59 | <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> |
|
59 | <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> | |
60 | </div> |
|
60 | </div> | |
61 | <pre id="editor_pre"></pre> |
|
61 | <pre id="editor_pre"></pre> | |
62 | <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea> |
|
62 | <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea> | |
63 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
|
63 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> | |
64 | <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> |
|
64 | <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> | |
65 | </div> |
|
65 | </div> | |
66 | <div style="text-align: left;padding-top: 5px"> |
|
66 | <div style="text-align: left;padding-top: 5px"> | |
67 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
67 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} | |
68 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
68 | ${h.reset('reset',_('Reset'),class_="ui-btn")} | |
69 | </div> |
|
69 | </div> | |
70 | ${h.end_form()} |
|
70 | ${h.end_form()} | |
71 | <script type="text/javascript"> |
|
71 | <script type="text/javascript"> | |
72 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}"; |
|
72 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}"; | |
73 | initCodeMirror('editor',reset_url); |
|
73 | initCodeMirror('editor',reset_url); | |
74 | </script> |
|
74 | </script> | |
75 | </div> |
|
75 | </div> | |
76 | </div> |
|
76 | </div> | |
77 | </div> |
|
77 | </div> | |
78 | </%def> |
|
78 | </%def> |
@@ -1,29 +1,29 | |||||
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} |
|
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 | ${_('Followers')} |
|
9 | ${_('Followers')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 | ${self.menu('followers')} |
|
13 | ${self.menu('followers')} | |
14 | </%def> |
|
14 | </%def> | |
15 | <%def name="main()"> |
|
15 | <%def name="main()"> | |
16 | ${self.context_bar('followers')} |
|
16 | ${self.context_bar('followers')} | |
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 | <!-- end box / title --> |
|
22 | <!-- end box / title --> | |
23 | <div class="table"> |
|
23 | <div class="table"> | |
24 | <div id="followers"> |
|
24 | <div id="followers"> | |
25 | ${c.followers_data} |
|
25 | ${c.followers_data} | |
26 | </div> |
|
26 | </div> | |
27 | </div> |
|
27 | </div> | |
28 | </div> |
|
28 | </div> | |
29 | </%def> |
|
29 | </%def> |
@@ -1,100 +1,100 | |||||
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} |
|
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.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
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="main()"> |
|
16 | <%def name="main()"> | |
17 | ${self.context_bar('showforks')} |
|
17 | ${self.context_bar('showforks')} | |
18 | <div class="box"> |
|
18 | <div class="box"> | |
19 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
20 | <div class="title"> |
|
20 | <div class="title"> | |
21 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
22 | </div> |
|
22 | </div> | |
23 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} |
|
23 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} | |
24 | <div class="form"> |
|
24 | <div class="form"> | |
25 | <!-- fields --> |
|
25 | <!-- fields --> | |
26 | <div class="fields"> |
|
26 | <div class="fields"> | |
27 | <div class="field"> |
|
27 | <div class="field"> | |
28 | <div class="label"> |
|
28 | <div class="label"> | |
29 | <label for="repo_name">${_('Fork name')}:</label> |
|
29 | <label for="repo_name">${_('Fork name')}:</label> | |
30 | </div> |
|
30 | </div> | |
31 | <div class="input"> |
|
31 | <div class="input"> | |
32 | ${h.text('repo_name',class_="small")} |
|
32 | ${h.text('repo_name',class_="small")} | |
33 | ${h.hidden('repo_type',c.repo_info.repo_type)} |
|
33 | ${h.hidden('repo_type',c.repo_info.repo_type)} | |
34 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} |
|
34 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} | |
35 | </div> |
|
35 | </div> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="field"> |
|
37 | <div class="field"> | |
38 | <div class="label"> |
|
38 | <div class="label"> | |
39 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
39 | <label for="landing_rev">${_('Landing revision')}:</label> | |
40 | </div> |
|
40 | </div> | |
41 | <div class="input"> |
|
41 | <div class="input"> | |
42 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} |
|
42 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} | |
43 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
43 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
44 | </div> |
|
44 | </div> | |
45 | </div> |
|
45 | </div> | |
46 | <div class="field"> |
|
46 | <div class="field"> | |
47 | <div class="label"> |
|
47 | <div class="label"> | |
48 | <label for="repo_group">${_('Repository group')}:</label> |
|
48 | <label for="repo_group">${_('Repository group')}:</label> | |
49 | </div> |
|
49 | </div> | |
50 | <div class="input"> |
|
50 | <div class="input"> | |
51 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
51 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
52 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> |
|
52 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> | |
53 | </div> |
|
53 | </div> | |
54 | </div> |
|
54 | </div> | |
55 | <div class="field"> |
|
55 | <div class="field"> | |
56 | <div class="label label-textarea"> |
|
56 | <div class="label label-textarea"> | |
57 | <label for="description">${_('Description')}:</label> |
|
57 | <label for="description">${_('Description')}:</label> | |
58 | </div> |
|
58 | </div> | |
59 | <div class="textarea text-area editor"> |
|
59 | <div class="textarea text-area editor"> | |
60 | ${h.textarea('description',cols=23,rows=5)} |
|
60 | ${h.textarea('description',cols=23,rows=5)} | |
61 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
61 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
62 | </div> |
|
62 | </div> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="field"> |
|
64 | <div class="field"> | |
65 | <div class="label label-checkbox"> |
|
65 | <div class="label label-checkbox"> | |
66 | <label for="private">${_('Private')}:</label> |
|
66 | <label for="private">${_('Private')}:</label> | |
67 | </div> |
|
67 | </div> | |
68 | <div class="checkboxes"> |
|
68 | <div class="checkboxes"> | |
69 | ${h.checkbox('private',value="True")} |
|
69 | ${h.checkbox('private',value="True")} | |
70 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
70 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 | <div class="field"> |
|
73 | <div class="field"> | |
74 | <div class="label label-checkbox"> |
|
74 | <div class="label label-checkbox"> | |
75 | <label for="private">${_('Copy permissions')}:</label> |
|
75 | <label for="private">${_('Copy permissions')}:</label> | |
76 | </div> |
|
76 | </div> | |
77 | <div class="checkboxes"> |
|
77 | <div class="checkboxes"> | |
78 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
78 | ${h.checkbox('copy_permissions',value="True", checked="checked")} | |
79 | <span class="help-block">${_('Copy permissions from forked repository')}</span> |
|
79 | <span class="help-block">${_('Copy permissions from forked repository')}</span> | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 | %if c.can_update: |
|
82 | %if c.can_update: | |
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label label-checkbox"> |
|
84 | <div class="label label-checkbox"> | |
85 | <label for="private">${_('Update after clone')}:</label> |
|
85 | <label for="private">${_('Update after clone')}:</label> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="checkboxes"> |
|
87 | <div class="checkboxes"> | |
88 | ${h.checkbox('update_after_clone',value="True")} |
|
88 | ${h.checkbox('update_after_clone',value="True")} | |
89 | <span class="help-block">${_('Checkout source after making a clone')}</span> |
|
89 | <span class="help-block">${_('Checkout source after making a clone')}</span> | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | %endif |
|
92 | %endif | |
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,26 +1,26 | |||||
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} |
|
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 | ${_('Forks')} |
|
9 | ${_('Forks')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="main()"> |
|
12 | <%def name="main()"> | |
13 | ${self.context_bar('showforks')} |
|
13 | ${self.context_bar('showforks')} | |
14 | <div class="box"> |
|
14 | <div class="box"> | |
15 | <!-- box / title --> |
|
15 | <!-- box / title --> | |
16 | <div class="title"> |
|
16 | <div class="title"> | |
17 | ${self.breadcrumbs()} |
|
17 | ${self.breadcrumbs()} | |
18 | </div> |
|
18 | </div> | |
19 | <!-- end box / title --> |
|
19 | <!-- end box / title --> | |
20 | <div class="table"> |
|
20 | <div class="table"> | |
21 | <div id="forks"> |
|
21 | <div id="forks"> | |
22 | ${c.forks_data} |
|
22 | ${c.forks_data} | |
23 | </div> |
|
23 | </div> | |
24 | </div> |
|
24 | </div> | |
25 | </div> |
|
25 | </div> | |
26 | </%def> |
|
26 | </%def> |
@@ -1,8 +1,8 | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base/base.html"/> |
|
2 | <%inherit file="base/base.html"/> | |
3 |
<%def name="title()">${_('Dashboard')} |
|
3 | <%def name="title()">${_('Dashboard')} · ${c.rhodecode_name}</%def> | |
4 | <%def name="breadcrumbs()"></%def> |
|
4 | <%def name="breadcrumbs()"></%def> | |
5 | <%def name="page_nav()">${self.menu('home')}</%def> |
|
5 | <%def name="page_nav()">${self.menu('home')}</%def> | |
6 | <%def name="main()"> |
|
6 | <%def name="main()"> | |
7 | <%include file="index_base.html" args="parent=self"/> |
|
7 | <%include file="index_base.html" args="parent=self"/> | |
8 | </%def> |
|
8 | </%def> |
@@ -1,367 +1,367 | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 |
${_('Journal')} |
|
4 | ${_('Journal')} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 | <%def name="breadcrumbs()"> |
|
6 | <%def name="breadcrumbs()"> | |
7 | <h5> |
|
7 | <h5> | |
8 | <form id="filter_form"> |
|
8 | <form id="filter_form"> | |
9 | <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/> |
|
9 | <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/> | |
10 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> |
|
10 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> | |
11 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> |
|
11 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> | |
12 | ${_('journal')} - ${ungettext('%s entry', '%s entries', c.journal_pager.item_count) % (c.journal_pager.item_count)} |
|
12 | ${_('journal')} - ${ungettext('%s entry', '%s entries', c.journal_pager.item_count) % (c.journal_pager.item_count)} | |
13 | </form> |
|
13 | </form> | |
14 | ${h.end_form()} |
|
14 | ${h.end_form()} | |
15 | </h5> |
|
15 | </h5> | |
16 | </%def> |
|
16 | </%def> | |
17 | <%def name="page_nav()"> |
|
17 | <%def name="page_nav()"> | |
18 | ${self.menu('journal')} |
|
18 | ${self.menu('journal')} | |
19 | </%def> |
|
19 | </%def> | |
20 | <%def name="head_extra()"> |
|
20 | <%def name="head_extra()"> | |
21 | <link href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" /> |
|
21 | <link href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" /> | |
22 | <link href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" /> |
|
22 | <link href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" /> | |
23 | </%def> |
|
23 | </%def> | |
24 | <%def name="main()"> |
|
24 | <%def name="main()"> | |
25 |
|
25 | |||
26 | <div class="box box-left"> |
|
26 | <div class="box box-left"> | |
27 | <!-- box / title --> |
|
27 | <!-- box / title --> | |
28 | <div class="title"> |
|
28 | <div class="title"> | |
29 | ${self.breadcrumbs()} |
|
29 | ${self.breadcrumbs()} | |
30 | <ul class="links"> |
|
30 | <ul class="links"> | |
31 | <li> |
|
31 | <li> | |
32 | <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/></a></span> |
|
32 | <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/></a></span> | |
33 | </li> |
|
33 | </li> | |
34 | <li> |
|
34 | <li> | |
35 | <span><a href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}"><img class="icon" title="${_('ATOM feed')}" alt="${_('ATOM feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span> |
|
35 | <span><a href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}"><img class="icon" title="${_('ATOM feed')}" alt="${_('ATOM feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span> | |
36 | </li> |
|
36 | </li> | |
37 | </ul> |
|
37 | </ul> | |
38 | </div> |
|
38 | </div> | |
39 | <div id="journal">${c.journal_data}</div> |
|
39 | <div id="journal">${c.journal_data}</div> | |
40 | </div> |
|
40 | </div> | |
41 | <div class="box box-right"> |
|
41 | <div class="box box-right"> | |
42 | <!-- box / title --> |
|
42 | <!-- box / title --> | |
43 |
|
43 | |||
44 | <div class="title"> |
|
44 | <div class="title"> | |
45 | <h5> |
|
45 | <h5> | |
46 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> |
|
46 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> | |
47 | <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> |
|
47 | <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> | |
48 | </h5> |
|
48 | </h5> | |
49 | <ul class="links" style="color:#DADADA"> |
|
49 | <ul class="links" style="color:#DADADA"> | |
50 | <li> |
|
50 | <li> | |
51 | <span><a id="show_watched" class="link-white current" href="#watched">${_('Watched')}</a> </span> |
|
51 | <span><a id="show_watched" class="link-white current" href="#watched">${_('Watched')}</a> </span> | |
52 | </li> |
|
52 | </li> | |
53 | <li> |
|
53 | <li> | |
54 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> |
|
54 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> | |
55 | </li> |
|
55 | </li> | |
56 | </ul> |
|
56 | </ul> | |
57 | </div> |
|
57 | </div> | |
58 |
|
58 | |||
59 | <!-- end box / title --> |
|
59 | <!-- end box / title --> | |
60 | <div id="my_container" style="display:none"> |
|
60 | <div id="my_container" style="display:none"> | |
61 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> |
|
61 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> | |
62 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
62 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
63 | </div> |
|
63 | </div> | |
64 |
|
64 | |||
65 | <div id="watched_container"> |
|
65 | <div id="watched_container"> | |
66 | <div class="table yui-skin-sam" id="watched_repos_list_wrap"></div> |
|
66 | <div class="table yui-skin-sam" id="watched_repos_list_wrap"></div> | |
67 | <div id="watched-user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
67 | <div id="watched-user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
68 | </div> |
|
68 | </div> | |
69 | </div> |
|
69 | </div> | |
70 |
|
70 | |||
71 | <script type="text/javascript"> |
|
71 | <script type="text/javascript"> | |
72 |
|
72 | |||
73 | YUE.on('j_filter','click',function(){ |
|
73 | YUE.on('j_filter','click',function(){ | |
74 | var jfilter = YUD.get('j_filter'); |
|
74 | var jfilter = YUD.get('j_filter'); | |
75 | if(YUD.hasClass(jfilter, 'initial')){ |
|
75 | if(YUD.hasClass(jfilter, 'initial')){ | |
76 | jfilter.value = ''; |
|
76 | jfilter.value = ''; | |
77 | } |
|
77 | } | |
78 | }); |
|
78 | }); | |
79 | var fix_j_filter_width = function(len){ |
|
79 | var fix_j_filter_width = function(len){ | |
80 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); |
|
80 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); | |
81 | } |
|
81 | } | |
82 | YUE.on('j_filter','keyup',function(){ |
|
82 | YUE.on('j_filter','keyup',function(){ | |
83 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
83 | fix_j_filter_width(YUD.get('j_filter').value.length); | |
84 | }); |
|
84 | }); | |
85 | YUE.on('filter_form','submit',function(e){ |
|
85 | YUE.on('filter_form','submit',function(e){ | |
86 | YUE.preventDefault(e) |
|
86 | YUE.preventDefault(e) | |
87 | var val = YUD.get('j_filter').value; |
|
87 | var val = YUD.get('j_filter').value; | |
88 | window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val); |
|
88 | window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val); | |
89 | }); |
|
89 | }); | |
90 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
90 | fix_j_filter_width(YUD.get('j_filter').value.length); | |
91 |
|
91 | |||
92 | YUE.on('refresh','click',function(e){ |
|
92 | YUE.on('refresh','click',function(e){ | |
93 | ypjax("${h.url.current(filter=c.search_term)}","journal",function(){ |
|
93 | ypjax("${h.url.current(filter=c.search_term)}","journal",function(){ | |
94 | show_more_event(); |
|
94 | show_more_event(); | |
95 | tooltip_activate(); |
|
95 | tooltip_activate(); | |
96 | show_changeset_tooltip(); |
|
96 | show_changeset_tooltip(); | |
97 | }); |
|
97 | }); | |
98 | YUE.preventDefault(e); |
|
98 | YUE.preventDefault(e); | |
99 | }); |
|
99 | }); | |
100 |
|
100 | |||
101 | var show_my = function(e){ |
|
101 | var show_my = function(e){ | |
102 | YUD.setStyle('watched_container','display','none'); |
|
102 | YUD.setStyle('watched_container','display','none'); | |
103 | YUD.setStyle('my_container','display',''); |
|
103 | YUD.setStyle('my_container','display',''); | |
104 | YUD.setStyle('q_filter','display',''); |
|
104 | YUD.setStyle('q_filter','display',''); | |
105 | YUD.setStyle('q_filter_watched','display','none'); |
|
105 | YUD.setStyle('q_filter_watched','display','none'); | |
106 |
|
106 | |||
107 | YUD.addClass('show_my', 'current'); |
|
107 | YUD.addClass('show_my', 'current'); | |
108 | YUD.removeClass('show_watched','current'); |
|
108 | YUD.removeClass('show_watched','current'); | |
109 |
|
109 | |||
110 | if(!YUD.hasClass('show_my', 'loaded')){ |
|
110 | if(!YUD.hasClass('show_my', 'loaded')){ | |
111 | table_renderer(${c.data |n}); |
|
111 | table_renderer(${c.data |n}); | |
112 | YUD.addClass('show_my', 'loaded'); |
|
112 | YUD.addClass('show_my', 'loaded'); | |
113 | } |
|
113 | } | |
114 | } |
|
114 | } | |
115 | YUE.on('show_my','click',function(e){ |
|
115 | YUE.on('show_my','click',function(e){ | |
116 | show_my(e); |
|
116 | show_my(e); | |
117 | }) |
|
117 | }) | |
118 | var show_watched = function(e){ |
|
118 | var show_watched = function(e){ | |
119 | YUD.setStyle('my_container','display','none'); |
|
119 | YUD.setStyle('my_container','display','none'); | |
120 | YUD.setStyle('watched_container','display',''); |
|
120 | YUD.setStyle('watched_container','display',''); | |
121 | YUD.setStyle('q_filter_watched','display',''); |
|
121 | YUD.setStyle('q_filter_watched','display',''); | |
122 | YUD.setStyle('q_filter','display','none'); |
|
122 | YUD.setStyle('q_filter','display','none'); | |
123 |
|
123 | |||
124 | YUD.addClass('show_watched', 'current'); |
|
124 | YUD.addClass('show_watched', 'current'); | |
125 | YUD.removeClass('show_my','current'); |
|
125 | YUD.removeClass('show_my','current'); | |
126 | if(!YUD.hasClass('show_watched', 'loaded')){ |
|
126 | if(!YUD.hasClass('show_watched', 'loaded')){ | |
127 | watched_renderer(${c.watched_data |n}); |
|
127 | watched_renderer(${c.watched_data |n}); | |
128 | YUD.addClass('show_watched', 'loaded'); |
|
128 | YUD.addClass('show_watched', 'loaded'); | |
129 | } |
|
129 | } | |
130 |
|
130 | |||
131 | return |
|
131 | return | |
132 | var nodes = YUQ('#watched_container .watched_repo a'); |
|
132 | var nodes = YUQ('#watched_container .watched_repo a'); | |
133 | var target = 'q_filter'; |
|
133 | var target = 'q_filter'; | |
134 | var func = function(node){ |
|
134 | var func = function(node){ | |
135 | return node.parentNode.parentNode; |
|
135 | return node.parentNode.parentNode; | |
136 | } |
|
136 | } | |
137 | q_filter(target,nodes,func); |
|
137 | q_filter(target,nodes,func); | |
138 | } |
|
138 | } | |
139 | YUE.on('show_watched','click',function(e){ |
|
139 | YUE.on('show_watched','click',function(e){ | |
140 | show_watched(e); |
|
140 | show_watched(e); | |
141 | }) |
|
141 | }) | |
142 | //init watched |
|
142 | //init watched | |
143 | show_watched(); |
|
143 | show_watched(); | |
144 |
|
144 | |||
145 | var tabs = { |
|
145 | var tabs = { | |
146 | 'watched': show_watched, |
|
146 | 'watched': show_watched, | |
147 | 'my': show_my, |
|
147 | 'my': show_my, | |
148 | } |
|
148 | } | |
149 | var url = location.href.split('#'); |
|
149 | var url = location.href.split('#'); | |
150 | if (url[1]) { |
|
150 | if (url[1]) { | |
151 | //We have a hash |
|
151 | //We have a hash | |
152 | var tabHash = url[1]; |
|
152 | var tabHash = url[1]; | |
153 | var func = tabs[tabHash] |
|
153 | var func = tabs[tabHash] | |
154 | if (func){ |
|
154 | if (func){ | |
155 | func(); |
|
155 | func(); | |
156 | } |
|
156 | } | |
157 | } |
|
157 | } | |
158 | function watched_renderer(data){ |
|
158 | function watched_renderer(data){ | |
159 | var myDataSource = new YAHOO.util.DataSource(data); |
|
159 | var myDataSource = new YAHOO.util.DataSource(data); | |
160 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
160 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
161 |
|
161 | |||
162 | myDataSource.responseSchema = { |
|
162 | myDataSource.responseSchema = { | |
163 | resultsList: "records", |
|
163 | resultsList: "records", | |
164 | fields: [ |
|
164 | fields: [ | |
165 | {key:"menu"}, |
|
165 | {key:"menu"}, | |
166 | {key:"raw_name"}, |
|
166 | {key:"raw_name"}, | |
167 | {key:"name"}, |
|
167 | {key:"name"}, | |
168 | {key:"last_changeset"}, |
|
168 | {key:"last_changeset"}, | |
169 | {key:"action"}, |
|
169 | {key:"action"}, | |
170 | ] |
|
170 | ] | |
171 | }; |
|
171 | }; | |
172 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
172 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
173 | // This is the filter function |
|
173 | // This is the filter function | |
174 | var data = res.results || [], |
|
174 | var data = res.results || [], | |
175 | filtered = [], |
|
175 | filtered = [], | |
176 | i,l; |
|
176 | i,l; | |
177 |
|
177 | |||
178 | if (req) { |
|
178 | if (req) { | |
179 | req = req.toLowerCase(); |
|
179 | req = req.toLowerCase(); | |
180 | for (i = 0; i<data.length; i++) { |
|
180 | for (i = 0; i<data.length; i++) { | |
181 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
181 | var pos = data[i].raw_name.toLowerCase().indexOf(req) | |
182 | if (pos != -1) { |
|
182 | if (pos != -1) { | |
183 | filtered.push(data[i]); |
|
183 | filtered.push(data[i]); | |
184 | } |
|
184 | } | |
185 | } |
|
185 | } | |
186 | res.results = filtered; |
|
186 | res.results = filtered; | |
187 | } |
|
187 | } | |
188 | return res; |
|
188 | return res; | |
189 | } |
|
189 | } | |
190 | // main table sorting |
|
190 | // main table sorting | |
191 | var myColumnDefs = [ |
|
191 | var myColumnDefs = [ | |
192 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
192 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
193 | {key:"name",label:"${_('Name')}",sortable:true, |
|
193 | {key:"name",label:"${_('Name')}",sortable:true, | |
194 | sortOptions: { sortFunction: nameSort }}, |
|
194 | sortOptions: { sortFunction: nameSort }}, | |
195 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
195 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, | |
196 | sortOptions: { sortFunction: revisionSort }}, |
|
196 | sortOptions: { sortFunction: revisionSort }}, | |
197 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
197 | {key:"action",label:"${_('Action')}",sortable:false}, | |
198 | ]; |
|
198 | ]; | |
199 |
|
199 | |||
200 | var myDataTable = new YAHOO.widget.DataTable("watched_repos_list_wrap", myColumnDefs, myDataSource,{ |
|
200 | var myDataTable = new YAHOO.widget.DataTable("watched_repos_list_wrap", myColumnDefs, myDataSource,{ | |
201 | sortedBy:{key:"name",dir:"asc"}, |
|
201 | sortedBy:{key:"name",dir:"asc"}, | |
202 | paginator: new YAHOO.widget.Paginator({ |
|
202 | paginator: new YAHOO.widget.Paginator({ | |
203 | rowsPerPage: 25, |
|
203 | rowsPerPage: 25, | |
204 | alwaysVisible: false, |
|
204 | alwaysVisible: false, | |
205 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
205 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
206 | pageLinks: 5, |
|
206 | pageLinks: 5, | |
207 | containerClass: 'pagination-wh', |
|
207 | containerClass: 'pagination-wh', | |
208 | currentPageClass: 'pager_curpage', |
|
208 | currentPageClass: 'pager_curpage', | |
209 | pageLinkClass: 'pager_link', |
|
209 | pageLinkClass: 'pager_link', | |
210 | nextPageLinkLabel: '>', |
|
210 | nextPageLinkLabel: '>', | |
211 | previousPageLinkLabel: '<', |
|
211 | previousPageLinkLabel: '<', | |
212 | firstPageLinkLabel: '<<', |
|
212 | firstPageLinkLabel: '<<', | |
213 | lastPageLinkLabel: '>>', |
|
213 | lastPageLinkLabel: '>>', | |
214 | containers:['watched-user-paginator'] |
|
214 | containers:['watched-user-paginator'] | |
215 | }), |
|
215 | }), | |
216 |
|
216 | |||
217 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
217 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
218 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
218 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
219 | MSG_EMPTY:"${_('No records found.')}", |
|
219 | MSG_EMPTY:"${_('No records found.')}", | |
220 | MSG_ERROR:"${_('Data error.')}", |
|
220 | MSG_ERROR:"${_('Data error.')}", | |
221 | MSG_LOADING:"${_('Loading...')}", |
|
221 | MSG_LOADING:"${_('Loading...')}", | |
222 | } |
|
222 | } | |
223 | ); |
|
223 | ); | |
224 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
224 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
225 | tooltip_activate(); |
|
225 | tooltip_activate(); | |
226 | quick_repo_menu(); |
|
226 | quick_repo_menu(); | |
227 | }); |
|
227 | }); | |
228 |
|
228 | |||
229 | var filterTimeout = null; |
|
229 | var filterTimeout = null; | |
230 |
|
230 | |||
231 | updateFilter = function () { |
|
231 | updateFilter = function () { | |
232 | // Reset timeout |
|
232 | // Reset timeout | |
233 | filterTimeout = null; |
|
233 | filterTimeout = null; | |
234 |
|
234 | |||
235 | // Reset sort |
|
235 | // Reset sort | |
236 | var state = myDataTable.getState(); |
|
236 | var state = myDataTable.getState(); | |
237 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
237 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
238 |
|
238 | |||
239 | // Get filtered data |
|
239 | // Get filtered data | |
240 | myDataSource.sendRequest(YUD.get('q_filter_watched').value,{ |
|
240 | myDataSource.sendRequest(YUD.get('q_filter_watched').value,{ | |
241 | success : myDataTable.onDataReturnInitializeTable, |
|
241 | success : myDataTable.onDataReturnInitializeTable, | |
242 | failure : myDataTable.onDataReturnInitializeTable, |
|
242 | failure : myDataTable.onDataReturnInitializeTable, | |
243 | scope : myDataTable, |
|
243 | scope : myDataTable, | |
244 | argument: state |
|
244 | argument: state | |
245 | }); |
|
245 | }); | |
246 |
|
246 | |||
247 | }; |
|
247 | }; | |
248 | YUE.on('q_filter_watched','click',function(){ |
|
248 | YUE.on('q_filter_watched','click',function(){ | |
249 | if(!YUD.hasClass('q_filter_watched', 'loaded')){ |
|
249 | if(!YUD.hasClass('q_filter_watched', 'loaded')){ | |
250 | YUD.get('q_filter_watched').value = ''; |
|
250 | YUD.get('q_filter_watched').value = ''; | |
251 | //TODO: load here full list later to do search within groups |
|
251 | //TODO: load here full list later to do search within groups | |
252 | YUD.addClass('q_filter_watched', 'loaded'); |
|
252 | YUD.addClass('q_filter_watched', 'loaded'); | |
253 | } |
|
253 | } | |
254 | }); |
|
254 | }); | |
255 |
|
255 | |||
256 | YUE.on('q_filter_watched','keyup',function (e) { |
|
256 | YUE.on('q_filter_watched','keyup',function (e) { | |
257 | clearTimeout(filterTimeout); |
|
257 | clearTimeout(filterTimeout); | |
258 | filterTimeout = setTimeout(updateFilter,600); |
|
258 | filterTimeout = setTimeout(updateFilter,600); | |
259 | }); |
|
259 | }); | |
260 | } |
|
260 | } | |
261 |
|
261 | |||
262 | function table_renderer(data){ |
|
262 | function table_renderer(data){ | |
263 | var myDataSource = new YAHOO.util.DataSource(data); |
|
263 | var myDataSource = new YAHOO.util.DataSource(data); | |
264 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
264 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
265 |
|
265 | |||
266 | myDataSource.responseSchema = { |
|
266 | myDataSource.responseSchema = { | |
267 | resultsList: "records", |
|
267 | resultsList: "records", | |
268 | fields: [ |
|
268 | fields: [ | |
269 | {key:"menu"}, |
|
269 | {key:"menu"}, | |
270 | {key:"raw_name"}, |
|
270 | {key:"raw_name"}, | |
271 | {key:"name"}, |
|
271 | {key:"name"}, | |
272 | {key:"last_changeset"}, |
|
272 | {key:"last_changeset"}, | |
273 | {key:"action"}, |
|
273 | {key:"action"}, | |
274 | ] |
|
274 | ] | |
275 | }; |
|
275 | }; | |
276 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
276 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
277 | // This is the filter function |
|
277 | // This is the filter function | |
278 | var data = res.results || [], |
|
278 | var data = res.results || [], | |
279 | filtered = [], |
|
279 | filtered = [], | |
280 | i,l; |
|
280 | i,l; | |
281 |
|
281 | |||
282 | if (req) { |
|
282 | if (req) { | |
283 | req = req.toLowerCase(); |
|
283 | req = req.toLowerCase(); | |
284 | for (i = 0; i<data.length; i++) { |
|
284 | for (i = 0; i<data.length; i++) { | |
285 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
285 | var pos = data[i].raw_name.toLowerCase().indexOf(req) | |
286 | if (pos != -1) { |
|
286 | if (pos != -1) { | |
287 | filtered.push(data[i]); |
|
287 | filtered.push(data[i]); | |
288 | } |
|
288 | } | |
289 | } |
|
289 | } | |
290 | res.results = filtered; |
|
290 | res.results = filtered; | |
291 | } |
|
291 | } | |
292 | return res; |
|
292 | return res; | |
293 | } |
|
293 | } | |
294 | // main table sorting |
|
294 | // main table sorting | |
295 | var myColumnDefs = [ |
|
295 | var myColumnDefs = [ | |
296 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
296 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
297 | {key:"name",label:"${_('Name')}",sortable:true, |
|
297 | {key:"name",label:"${_('Name')}",sortable:true, | |
298 | sortOptions: { sortFunction: nameSort }}, |
|
298 | sortOptions: { sortFunction: nameSort }}, | |
299 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
299 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, | |
300 | sortOptions: { sortFunction: revisionSort }}, |
|
300 | sortOptions: { sortFunction: revisionSort }}, | |
301 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
301 | {key:"action",label:"${_('Action')}",sortable:false}, | |
302 | ]; |
|
302 | ]; | |
303 |
|
303 | |||
304 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
|
304 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ | |
305 | sortedBy:{key:"name",dir:"asc"}, |
|
305 | sortedBy:{key:"name",dir:"asc"}, | |
306 | paginator: new YAHOO.widget.Paginator({ |
|
306 | paginator: new YAHOO.widget.Paginator({ | |
307 | rowsPerPage: 25, |
|
307 | rowsPerPage: 25, | |
308 | alwaysVisible: false, |
|
308 | alwaysVisible: false, | |
309 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
309 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
310 | pageLinks: 5, |
|
310 | pageLinks: 5, | |
311 | containerClass: 'pagination-wh', |
|
311 | containerClass: 'pagination-wh', | |
312 | currentPageClass: 'pager_curpage', |
|
312 | currentPageClass: 'pager_curpage', | |
313 | pageLinkClass: 'pager_link', |
|
313 | pageLinkClass: 'pager_link', | |
314 | nextPageLinkLabel: '>', |
|
314 | nextPageLinkLabel: '>', | |
315 | previousPageLinkLabel: '<', |
|
315 | previousPageLinkLabel: '<', | |
316 | firstPageLinkLabel: '<<', |
|
316 | firstPageLinkLabel: '<<', | |
317 | lastPageLinkLabel: '>>', |
|
317 | lastPageLinkLabel: '>>', | |
318 | containers:['user-paginator'] |
|
318 | containers:['user-paginator'] | |
319 | }), |
|
319 | }), | |
320 |
|
320 | |||
321 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
321 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
322 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
322 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
323 | MSG_EMPTY:"${_('No records found.')}", |
|
323 | MSG_EMPTY:"${_('No records found.')}", | |
324 | MSG_ERROR:"${_('Data error.')}", |
|
324 | MSG_ERROR:"${_('Data error.')}", | |
325 | MSG_LOADING:"${_('Loading...')}", |
|
325 | MSG_LOADING:"${_('Loading...')}", | |
326 | } |
|
326 | } | |
327 | ); |
|
327 | ); | |
328 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
328 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
329 | tooltip_activate(); |
|
329 | tooltip_activate(); | |
330 | quick_repo_menu(); |
|
330 | quick_repo_menu(); | |
331 | }); |
|
331 | }); | |
332 |
|
332 | |||
333 | var filterTimeout = null; |
|
333 | var filterTimeout = null; | |
334 |
|
334 | |||
335 | updateFilter = function () { |
|
335 | updateFilter = function () { | |
336 | // Reset timeout |
|
336 | // Reset timeout | |
337 | filterTimeout = null; |
|
337 | filterTimeout = null; | |
338 |
|
338 | |||
339 | // Reset sort |
|
339 | // Reset sort | |
340 | var state = myDataTable.getState(); |
|
340 | var state = myDataTable.getState(); | |
341 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
341 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
342 |
|
342 | |||
343 | // Get filtered data |
|
343 | // Get filtered data | |
344 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
344 | myDataSource.sendRequest(YUD.get('q_filter').value,{ | |
345 | success : myDataTable.onDataReturnInitializeTable, |
|
345 | success : myDataTable.onDataReturnInitializeTable, | |
346 | failure : myDataTable.onDataReturnInitializeTable, |
|
346 | failure : myDataTable.onDataReturnInitializeTable, | |
347 | scope : myDataTable, |
|
347 | scope : myDataTable, | |
348 | argument: state |
|
348 | argument: state | |
349 | }); |
|
349 | }); | |
350 |
|
350 | |||
351 | }; |
|
351 | }; | |
352 | YUE.on('q_filter','click',function(){ |
|
352 | YUE.on('q_filter','click',function(){ | |
353 | if(!YUD.hasClass('q_filter', 'loaded')){ |
|
353 | if(!YUD.hasClass('q_filter', 'loaded')){ | |
354 | YUD.get('q_filter').value = ''; |
|
354 | YUD.get('q_filter').value = ''; | |
355 | //TODO: load here full list later to do search within groups |
|
355 | //TODO: load here full list later to do search within groups | |
356 | YUD.addClass('q_filter', 'loaded'); |
|
356 | YUD.addClass('q_filter', 'loaded'); | |
357 | } |
|
357 | } | |
358 | }); |
|
358 | }); | |
359 |
|
359 | |||
360 | YUE.on('q_filter','keyup',function (e) { |
|
360 | YUE.on('q_filter','keyup',function (e) { | |
361 | clearTimeout(filterTimeout); |
|
361 | clearTimeout(filterTimeout); | |
362 | filterTimeout = setTimeout(updateFilter,600); |
|
362 | filterTimeout = setTimeout(updateFilter,600); | |
363 | }); |
|
363 | }); | |
364 | } |
|
364 | } | |
365 |
|
365 | |||
366 | </script> |
|
366 | </script> | |
367 | </%def> |
|
367 | </%def> |
@@ -1,32 +1,32 | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 |
${_('Journal')} |
|
4 | ${_('Public Journal')} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 | <%def name="breadcrumbs()"> |
|
6 | <%def name="breadcrumbs()"> | |
7 | ${c.rhodecode_name} |
|
7 | ${c.rhodecode_name} | |
8 | </%def> |
|
8 | </%def> | |
9 | <%def name="page_nav()"> |
|
9 | <%def name="page_nav()"> | |
10 | ${self.menu('journal')} |
|
10 | ${self.menu('journal')} | |
11 | </%def> |
|
11 | </%def> | |
12 | <%def name="head_extra()"> |
|
12 | <%def name="head_extra()"> | |
13 | <link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" /> |
|
13 | <link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" /> | |
14 | <link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" /> |
|
14 | <link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" /> | |
15 | </%def> |
|
15 | </%def> | |
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 |
|
17 | |||
18 | <div class="box"> |
|
18 | <div class="box"> | |
19 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
20 | <div class="title"> |
|
20 | <div class="title"> | |
21 | <h5>${_('Public Journal')}</h5> |
|
21 | <h5>${_('Public Journal')}</h5> | |
22 | <ul class="links"> |
|
22 | <ul class="links"> | |
23 | <li> |
|
23 | <li> | |
24 | <span><a href="${h.url('public_journal_atom')}"><img class="icon" title="${_('ATOM feed')}" alt="${_('ATOM feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span> |
|
24 | <span><a href="${h.url('public_journal_atom')}"><img class="icon" title="${_('ATOM feed')}" alt="${_('ATOM feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span> | |
25 | </li> |
|
25 | </li> | |
26 | </ul> |
|
26 | </ul> | |
27 | </div> |
|
27 | </div> | |
28 |
|
28 | |||
29 | <div id="journal">${c.journal_data}</div> |
|
29 | <div id="journal">${c.journal_data}</div> | |
30 | </div> |
|
30 | </div> | |
31 |
|
31 | |||
32 | </%def> |
|
32 | </%def> |
@@ -1,77 +1,77 | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base/root.html"/> |
|
2 | <%inherit file="base/root.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 |
${_(' |
|
5 | ${_('Log In')} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <div id="login"> |
|
8 | <div id="login"> | |
9 | <div class="flash_msg"> |
|
9 | <div class="flash_msg"> | |
10 | <% messages = h.flash.pop_messages() %> |
|
10 | <% messages = h.flash.pop_messages() %> | |
11 | % if messages: |
|
11 | % if messages: | |
12 | <ul id="flash-messages"> |
|
12 | <ul id="flash-messages"> | |
13 | % for message in messages: |
|
13 | % for message in messages: | |
14 | <li class="${message.category}_msg">${message}</li> |
|
14 | <li class="${message.category}_msg">${message}</li> | |
15 | % endfor |
|
15 | % endfor | |
16 | </ul> |
|
16 | </ul> | |
17 | % endif |
|
17 | % endif | |
18 | </div> |
|
18 | </div> | |
19 | <!-- login --> |
|
19 | <!-- login --> | |
20 | <div class="title top-left-rounded-corner top-right-rounded-corner"> |
|
20 | <div class="title top-left-rounded-corner top-right-rounded-corner"> | |
21 |
<h5>${_(' |
|
21 | <h5>${_('Log In to %s') % c.rhodecode_name}</h5> | |
22 | </div> |
|
22 | </div> | |
23 | <div class="inner"> |
|
23 | <div class="inner"> | |
24 | ${h.form(h.url.current(came_from=c.came_from))} |
|
24 | ${h.form(h.url.current(came_from=c.came_from))} | |
25 | <div class="form"> |
|
25 | <div class="form"> | |
26 | <!-- fields --> |
|
26 | <!-- fields --> | |
27 |
|
27 | |||
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="username">${_('Username')}:</label> |
|
31 | <label for="username">${_('Username')}:</label> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="input"> |
|
33 | <div class="input"> | |
34 | ${h.text('username',class_='focus large')} |
|
34 | ${h.text('username',class_='focus large')} | |
35 | </div> |
|
35 | </div> | |
36 |
|
36 | |||
37 | </div> |
|
37 | </div> | |
38 | <div class="field"> |
|
38 | <div class="field"> | |
39 | <div class="label"> |
|
39 | <div class="label"> | |
40 | <label for="password">${_('Password')}:</label> |
|
40 | <label for="password">${_('Password')}:</label> | |
41 | </div> |
|
41 | </div> | |
42 | <div class="input"> |
|
42 | <div class="input"> | |
43 | ${h.password('password',class_='focus large')} |
|
43 | ${h.password('password',class_='focus large')} | |
44 | </div> |
|
44 | </div> | |
45 |
|
45 | |||
46 | </div> |
|
46 | </div> | |
47 | <div class="field"> |
|
47 | <div class="field"> | |
48 | <div class="checkbox"> |
|
48 | <div class="checkbox"> | |
49 | <input type="checkbox" id="remember" name="remember" /> |
|
49 | <input type="checkbox" id="remember" name="remember" /> | |
50 | <label for="remember">${_('Remember me')}</label> |
|
50 | <label for="remember">${_('Remember me')}</label> | |
51 | </div> |
|
51 | </div> | |
52 | </div> |
|
52 | </div> | |
53 | <div class="buttons"> |
|
53 | <div class="buttons"> | |
54 | ${h.submit('sign_in',_('Sign In'),class_="ui-btn large")} |
|
54 | ${h.submit('sign_in',_('Sign In'),class_="ui-btn large")} | |
55 | </div> |
|
55 | </div> | |
56 | </div> |
|
56 | </div> | |
57 | <!-- end fields --> |
|
57 | <!-- end fields --> | |
58 | <!-- links --> |
|
58 | <!-- links --> | |
59 | <div class="links"> |
|
59 | <div class="links"> | |
60 | ${h.link_to(_('Forgot your password ?'),h.url('reset_password'))} |
|
60 | ${h.link_to(_('Forgot your password ?'),h.url('reset_password'))} | |
61 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
61 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): | |
62 | / |
|
62 | / | |
63 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
63 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} | |
64 | %endif |
|
64 | %endif | |
65 | </div> |
|
65 | </div> | |
66 |
|
66 | |||
67 | <!-- end links --> |
|
67 | <!-- end links --> | |
68 | </div> |
|
68 | </div> | |
69 | ${h.end_form()} |
|
69 | ${h.end_form()} | |
70 | <script type="text/javascript"> |
|
70 | <script type="text/javascript"> | |
71 | YUE.onDOMReady(function(){ |
|
71 | YUE.onDOMReady(function(){ | |
72 | YUD.get('username').focus(); |
|
72 | YUD.get('username').focus(); | |
73 | }) |
|
73 | }) | |
74 | </script> |
|
74 | </script> | |
75 | </div> |
|
75 | </div> | |
76 | <!-- end login --> |
|
76 | <!-- end login --> | |
77 | </div> |
|
77 | </div> |
@@ -1,43 +1,43 | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base/root.html"/> |
|
2 | <%inherit file="base/root.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 |
${_(' |
|
5 | ${_('Password Reset')} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <div id="register"> |
|
8 | <div id="register"> | |
9 |
|
9 | |||
10 | <div class="title top-left-rounded-corner top-right-rounded-corner"> |
|
10 | <div class="title top-left-rounded-corner top-right-rounded-corner"> | |
11 | <h5>${_('Reset your password to')} ${c.rhodecode_name}</h5> |
|
11 | <h5>${_('Reset your password to')} ${c.rhodecode_name}</h5> | |
12 | </div> |
|
12 | </div> | |
13 | <div class="inner"> |
|
13 | <div class="inner"> | |
14 | ${h.form(url('password_reset'))} |
|
14 | ${h.form(url('password_reset'))} | |
15 | <div class="form"> |
|
15 | <div class="form"> | |
16 | <!-- fields --> |
|
16 | <!-- fields --> | |
17 | <div class="fields"> |
|
17 | <div class="fields"> | |
18 |
|
18 | |||
19 | <div class="field"> |
|
19 | <div class="field"> | |
20 | <div class="label"> |
|
20 | <div class="label"> | |
21 | <label for="email">${_('Email address')}:</label> |
|
21 | <label for="email">${_('Email address')}:</label> | |
22 | </div> |
|
22 | </div> | |
23 | <div class="input"> |
|
23 | <div class="input"> | |
24 | ${h.text('email')} |
|
24 | ${h.text('email')} | |
25 | </div> |
|
25 | </div> | |
26 | </div> |
|
26 | </div> | |
27 |
|
27 | |||
28 | <div class="buttons"> |
|
28 | <div class="buttons"> | |
29 | <div class="nohighlight"> |
|
29 | <div class="nohighlight"> | |
30 | ${h.submit('send',_('Reset my password'),class_="ui-btn large")} |
|
30 | ${h.submit('send',_('Reset my password'),class_="ui-btn large")} | |
31 | <div class="activation_msg">${_('Password reset link will be send to matching email address')}</div> |
|
31 | <div class="activation_msg">${_('Password reset link will be send to matching email address')}</div> | |
32 | </div> |
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | </div> |
|
35 | </div> | |
36 | ${h.end_form()} |
|
36 | ${h.end_form()} | |
37 | <script type="text/javascript"> |
|
37 | <script type="text/javascript"> | |
38 | YUE.onDOMReady(function(){ |
|
38 | YUE.onDOMReady(function(){ | |
39 | YUD.get('email').focus(); |
|
39 | YUD.get('email').focus(); | |
40 | }) |
|
40 | }) | |
41 | </script> |
|
41 | </script> | |
42 | </div> |
|
42 | </div> | |
43 | </div> |
|
43 | </div> |
@@ -1,248 +1,248 | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 |
${ |
|
4 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} · ${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.rhodecode_db_repo.groups_and_repo)} |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
11 | » |
|
11 | » | |
12 | ${_('Pull request #%s') % c.pull_request.pull_request_id} |
|
12 | ${_('Pull request #%s') % c.pull_request.pull_request_id} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="main()"> |
|
15 | <%def name="main()"> | |
16 | ${self.context_bar('showpullrequest')} |
|
16 | ${self.context_bar('showpullrequest')} | |
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 | %if c.pull_request.is_closed(): |
|
22 | %if c.pull_request.is_closed(): | |
23 | <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div> |
|
23 | <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div> | |
24 | %endif |
|
24 | %endif | |
25 | <h3> |
|
25 | <h3> | |
26 | %if c.pull_request.is_closed(): |
|
26 | %if c.pull_request.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(c.pull_request.last_review_status))}" /> |
|
29 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(c.pull_request.last_review_status))}" /> | |
30 | ${_('Title')}: ${c.pull_request.title}</h3> |
|
30 | ${_('Title')}: ${c.pull_request.title}</h3> | |
31 |
|
31 | |||
32 | <div class="form"> |
|
32 | <div class="form"> | |
33 | <div id="summary" class="fields"> |
|
33 | <div id="summary" class="fields"> | |
34 | <div class="field"> |
|
34 | <div class="field"> | |
35 | <div class="label-summary"> |
|
35 | <div class="label-summary"> | |
36 | <label>${_('Review status')}:</label> |
|
36 | <label>${_('Review status')}:</label> | |
37 | </div> |
|
37 | </div> | |
38 | <div class="input"> |
|
38 | <div class="input"> | |
39 | <div class="changeset-status-container" style="float:none;clear:both"> |
|
39 | <div class="changeset-status-container" style="float:none;clear:both"> | |
40 | %if c.current_changeset_status: |
|
40 | %if c.current_changeset_status: | |
41 | <div title="${_('Pull request status')}" class="changeset-status-lbl">${h.changeset_status_lbl(c.current_changeset_status)}</div> |
|
41 | <div title="${_('Pull request status')}" class="changeset-status-lbl">${h.changeset_status_lbl(c.current_changeset_status)}</div> | |
42 | <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div> |
|
42 | <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div> | |
43 | %endif |
|
43 | %endif | |
44 | </div> |
|
44 | </div> | |
45 | </div> |
|
45 | </div> | |
46 | </div> |
|
46 | </div> | |
47 | <div class="field"> |
|
47 | <div class="field"> | |
48 | <div class="label-summary"> |
|
48 | <div class="label-summary"> | |
49 | <label>${_('Still not reviewed by')}:</label> |
|
49 | <label>${_('Still not reviewed by')}:</label> | |
50 | </div> |
|
50 | </div> | |
51 | <div class="input"> |
|
51 | <div class="input"> | |
52 | % if len(c.pull_request_pending_reviewers) > 0: |
|
52 | % if len(c.pull_request_pending_reviewers) > 0: | |
53 | <div class="tooltip" title="${h.tooltip(','.join([x.username for x in c.pull_request_pending_reviewers]))}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div> |
|
53 | <div class="tooltip" title="${h.tooltip(','.join([x.username for x in c.pull_request_pending_reviewers]))}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div> | |
54 | %else: |
|
54 | %else: | |
55 | <div>${_('pull request was reviewed by all reviewers')}</div> |
|
55 | <div>${_('pull request was reviewed by all reviewers')}</div> | |
56 | %endif |
|
56 | %endif | |
57 | </div> |
|
57 | </div> | |
58 | </div> |
|
58 | </div> | |
59 | <div class="field"> |
|
59 | <div class="field"> | |
60 | <div class="label-summary"> |
|
60 | <div class="label-summary"> | |
61 | <label>${_('Origin repository')}:</label> |
|
61 | <label>${_('Origin repository')}:</label> | |
62 | </div> |
|
62 | </div> | |
63 | <div class="input"> |
|
63 | <div class="input"> | |
64 | <div> |
|
64 | <div> | |
65 | ##%if h.is_hg(c.pull_request.org_repo): |
|
65 | ##%if h.is_hg(c.pull_request.org_repo): | |
66 | ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
66 | ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> | |
67 | ##%elif h.is_git(c.pull_request.org_repo): |
|
67 | ##%elif h.is_git(c.pull_request.org_repo): | |
68 | ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
68 | ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> | |
69 | ##%endif |
|
69 | ##%endif | |
70 | <span class="spantag">${c.pull_request.org_ref_parts[0]}: ${c.pull_request.org_ref_parts[1]}</span> |
|
70 | <span class="spantag">${c.pull_request.org_ref_parts[0]}: ${c.pull_request.org_ref_parts[1]}</span> | |
71 | <span><a href="${h.url('summary_home', repo_name=c.pull_request.org_repo.repo_name)}">${c.pull_request.org_repo.clone_url()}</a></span> |
|
71 | <span><a href="${h.url('summary_home', repo_name=c.pull_request.org_repo.repo_name)}">${c.pull_request.org_repo.clone_url()}</a></span> | |
72 | </div> |
|
72 | </div> | |
73 | </div> |
|
73 | </div> | |
74 | </div> |
|
74 | </div> | |
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label-summary"> |
|
76 | <div class="label-summary"> | |
77 | <label>${_('Summary')}:</label> |
|
77 | <label>${_('Summary')}:</label> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="input"> |
|
79 | <div class="input"> | |
80 | <div style="white-space:pre-wrap">${h.literal(c.pull_request.description)}</div> |
|
80 | <div style="white-space:pre-wrap">${h.literal(c.pull_request.description)}</div> | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label-summary"> |
|
84 | <div class="label-summary"> | |
85 | <label>${_('Created on')}:</label> |
|
85 | <label>${_('Created on')}:</label> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="input"> |
|
87 | <div class="input"> | |
88 | <div>${h.fmt_date(c.pull_request.created_on)}</div> |
|
88 | <div>${h.fmt_date(c.pull_request.created_on)}</div> | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 |
|
93 | |||
94 | <div style="overflow: auto;"> |
|
94 | <div style="overflow: auto;"> | |
95 | ##DIFF |
|
95 | ##DIFF | |
96 | <div class="table" style="float:left;clear:none"> |
|
96 | <div class="table" style="float:left;clear:none"> | |
97 | <div id="body" class="diffblock"> |
|
97 | <div id="body" class="diffblock"> | |
98 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> |
|
98 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> | |
99 | </div> |
|
99 | </div> | |
100 | <div id="changeset_compare_view_content"> |
|
100 | <div id="changeset_compare_view_content"> | |
101 | ##CS |
|
101 | ##CS | |
102 | <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> |
|
102 | <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> | |
103 | <%include file="/compare/compare_cs.html" /> |
|
103 | <%include file="/compare/compare_cs.html" /> | |
104 |
|
104 | |||
105 | ## FILES |
|
105 | ## FILES | |
106 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
106 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> | |
107 |
|
107 | |||
108 | % if c.limited_diff: |
|
108 | % if c.limited_diff: | |
109 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
109 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} | |
110 | % else: |
|
110 | % else: | |
111 | ${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)}: |
|
111 | ${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)}: | |
112 | %endif |
|
112 | %endif | |
113 |
|
113 | |||
114 | </div> |
|
114 | </div> | |
115 | <div class="cs_files"> |
|
115 | <div class="cs_files"> | |
116 | %if not c.files: |
|
116 | %if not c.files: | |
117 | <span class="empty_data">${_('No files')}</span> |
|
117 | <span class="empty_data">${_('No files')}</span> | |
118 | %endif |
|
118 | %endif | |
119 | %for fid, change, f, stat in c.files: |
|
119 | %for fid, change, f, stat in c.files: | |
120 | <div class="cs_${change}"> |
|
120 | <div class="cs_${change}"> | |
121 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> |
|
121 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> | |
122 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
122 | <div class="changes">${h.fancy_file_stats(stat)}</div> | |
123 | </div> |
|
123 | </div> | |
124 | %endfor |
|
124 | %endfor | |
125 | </div> |
|
125 | </div> | |
126 | % if c.limited_diff: |
|
126 | % if c.limited_diff: | |
127 | <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> |
|
127 | <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> | |
128 | % endif |
|
128 | % endif | |
129 | </div> |
|
129 | </div> | |
130 | </div> |
|
130 | </div> | |
131 | ## REVIEWERS |
|
131 | ## REVIEWERS | |
132 | <div style="float:left; border-left:1px dashed #eee"> |
|
132 | <div style="float:left; border-left:1px dashed #eee"> | |
133 | <h4>${_('Pull request reviewers')}</h4> |
|
133 | <h4>${_('Pull request reviewers')}</h4> | |
134 | <div id="reviewers" style="padding:0px 0px 5px 10px"> |
|
134 | <div id="reviewers" style="padding:0px 0px 5px 10px"> | |
135 | ## members goes here ! |
|
135 | ## members goes here ! | |
136 | <div class="group_members_wrap" style="min-height:45px"> |
|
136 | <div class="group_members_wrap" style="min-height:45px"> | |
137 | <ul id="review_members" class="group_members"> |
|
137 | <ul id="review_members" class="group_members"> | |
138 | %for member,status in c.pull_request_reviewers: |
|
138 | %for member,status in c.pull_request_reviewers: | |
139 | <li id="reviewer_${member.user_id}"> |
|
139 | <li id="reviewer_${member.user_id}"> | |
140 | <div class="reviewers_member"> |
|
140 | <div class="reviewers_member"> | |
141 | <div style="float:left;padding:0px 3px 0px 0px" class="tooltip" title="${h.tooltip(h.changeset_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> |
|
141 | <div style="float:left;padding:0px 3px 0px 0px" class="tooltip" title="${h.tooltip(h.changeset_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> | |
142 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> |
|
142 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> | |
143 | </div> |
|
143 | </div> | |
144 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
144 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> | |
145 | <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div> |
|
145 | <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div> | |
146 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
146 | <input type="hidden" value="${member.user_id}" name="review_members" /> | |
147 | %if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.user_id == c.rhodecode_user.user_id): |
|
147 | %if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.user_id == c.rhodecode_user.user_id): | |
148 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> |
|
148 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> | |
149 | %endif |
|
149 | %endif | |
150 | </div> |
|
150 | </div> | |
151 | </li> |
|
151 | </li> | |
152 | %endfor |
|
152 | %endfor | |
153 | </ul> |
|
153 | </ul> | |
154 | </div> |
|
154 | </div> | |
155 | %if not c.pull_request.is_closed(): |
|
155 | %if not c.pull_request.is_closed(): | |
156 | <div class='ac'> |
|
156 | <div class='ac'> | |
157 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id: |
|
157 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id: | |
158 | <div class="reviewer_ac"> |
|
158 | <div class="reviewer_ac"> | |
159 | ${h.text('user', class_='yui-ac-input')} |
|
159 | ${h.text('user', class_='yui-ac-input')} | |
160 | <span class="help-block">${_('Add or remove reviewer to this pull request.')}</span> |
|
160 | <span class="help-block">${_('Add or remove reviewer to this pull request.')}</span> | |
161 | <div id="reviewers_container"></div> |
|
161 | <div id="reviewers_container"></div> | |
162 | </div> |
|
162 | </div> | |
163 | <div style="padding:0px 10px"> |
|
163 | <div style="padding:0px 10px"> | |
164 | <span id="update_pull_request" class="ui-btn xsmall">${_('Save changes')}</span> |
|
164 | <span id="update_pull_request" class="ui-btn xsmall">${_('Save changes')}</span> | |
165 | </div> |
|
165 | </div> | |
166 | %endif |
|
166 | %endif | |
167 | </div> |
|
167 | </div> | |
168 | %endif |
|
168 | %endif | |
169 | </div> |
|
169 | </div> | |
170 | </div> |
|
170 | </div> | |
171 | </div> |
|
171 | </div> | |
172 | <script> |
|
172 | <script> | |
173 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
173 | var _USERS_AC_DATA = ${c.users_array|n}; | |
174 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
174 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
175 | // TODO: switch this to pyroutes |
|
175 | // TODO: switch this to pyroutes | |
176 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; |
|
176 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; | |
177 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
177 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
178 |
|
178 | |||
179 | pyroutes.register('pullrequest_comment', "${url('pullrequest_comment',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); |
|
179 | pyroutes.register('pullrequest_comment', "${url('pullrequest_comment',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); | |
180 | pyroutes.register('pullrequest_comment_delete', "${url('pullrequest_comment_delete',repo_name='%(repo_name)s',comment_id='%(comment_id)s')}", ['repo_name', 'comment_id']); |
|
180 | pyroutes.register('pullrequest_comment_delete', "${url('pullrequest_comment_delete',repo_name='%(repo_name)s',comment_id='%(comment_id)s')}", ['repo_name', 'comment_id']); | |
181 | pyroutes.register('pullrequest_update', "${url('pullrequest_update',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); |
|
181 | pyroutes.register('pullrequest_update', "${url('pullrequest_update',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); | |
182 |
|
182 | |||
183 | </script> |
|
183 | </script> | |
184 |
|
184 | |||
185 | ## diff block |
|
185 | ## diff block | |
186 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
186 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
187 | %for fid, change, f, stat in c.files: |
|
187 | %for fid, change, f, stat in c.files: | |
188 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
188 | ${diff_block.diff_block_simple([c.changes[fid]])} | |
189 | %endfor |
|
189 | %endfor | |
190 | % if c.limited_diff: |
|
190 | % if c.limited_diff: | |
191 | <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> |
|
191 | <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> | |
192 | % endif |
|
192 | % endif | |
193 |
|
193 | |||
194 |
|
194 | |||
195 | ## template for inline comment form |
|
195 | ## template for inline comment form | |
196 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
196 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
197 | ${comment.comment_inline_form()} |
|
197 | ${comment.comment_inline_form()} | |
198 |
|
198 | |||
199 | ## render comments and inlines |
|
199 | ## render comments and inlines | |
200 | ${comment.generate_comments(include_pr=True)} |
|
200 | ${comment.generate_comments(include_pr=True)} | |
201 |
|
201 | |||
202 | % if not c.pull_request.is_closed(): |
|
202 | % if not c.pull_request.is_closed(): | |
203 | ## main comment form and it status |
|
203 | ## main comment form and it status | |
204 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, |
|
204 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, | |
205 | pull_request_id=c.pull_request.pull_request_id), |
|
205 | pull_request_id=c.pull_request.pull_request_id), | |
206 | c.current_changeset_status, |
|
206 | c.current_changeset_status, | |
207 | close_btn=True, change_status=c.allowed_to_change_status)} |
|
207 | close_btn=True, change_status=c.allowed_to_change_status)} | |
208 | %endif |
|
208 | %endif | |
209 |
|
209 | |||
210 | <script type="text/javascript"> |
|
210 | <script type="text/javascript"> | |
211 | YUE.onDOMReady(function(){ |
|
211 | YUE.onDOMReady(function(){ | |
212 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
212 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); | |
213 |
|
213 | |||
214 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
214 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ | |
215 | var show = 'none'; |
|
215 | var show = 'none'; | |
216 | var target = e.currentTarget; |
|
216 | var target = e.currentTarget; | |
217 | if(target.checked){ |
|
217 | if(target.checked){ | |
218 | var show = '' |
|
218 | var show = '' | |
219 | } |
|
219 | } | |
220 | var boxid = YUD.getAttribute(target,'id_for'); |
|
220 | var boxid = YUD.getAttribute(target,'id_for'); | |
221 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
221 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); | |
222 | for(c in comments){ |
|
222 | for(c in comments){ | |
223 | YUD.setStyle(comments[c],'display',show); |
|
223 | YUD.setStyle(comments[c],'display',show); | |
224 | } |
|
224 | } | |
225 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
225 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); | |
226 | for(c in btns){ |
|
226 | for(c in btns){ | |
227 | YUD.setStyle(btns[c],'display',show); |
|
227 | YUD.setStyle(btns[c],'display',show); | |
228 | } |
|
228 | } | |
229 | }) |
|
229 | }) | |
230 |
|
230 | |||
231 | YUE.on(YUQ('.line'),'click',function(e){ |
|
231 | YUE.on(YUQ('.line'),'click',function(e){ | |
232 | var tr = e.currentTarget; |
|
232 | var tr = e.currentTarget; | |
233 | injectInlineForm(tr); |
|
233 | injectInlineForm(tr); | |
234 | }); |
|
234 | }); | |
235 |
|
235 | |||
236 | // inject comments into they proper positions |
|
236 | // inject comments into they proper positions | |
237 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
237 | var file_comments = YUQ('.inline-comment-placeholder'); | |
238 | renderInlineComments(file_comments); |
|
238 | renderInlineComments(file_comments); | |
239 |
|
239 | |||
240 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ |
|
240 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ | |
241 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
241 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
242 | }) |
|
242 | }) | |
243 | }) |
|
243 | }) | |
244 | </script> |
|
244 | </script> | |
245 |
|
245 | |||
246 | </div> |
|
246 | </div> | |
247 |
|
247 | |||
248 | </%def> |
|
248 | </%def> |
@@ -1,38 +1,38 | |||||
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 | ${_('%s Pull Requests') % c.repo_name} · ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${_('Pull requests')} |
|
8 | ${_('Pull requests')} | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="main()"> |
|
11 | <%def name="main()"> | |
12 | ${self.context_bar('showpullrequest')} |
|
12 | ${self.context_bar('showpullrequest')} | |
13 | <div class="box"> |
|
13 | <div class="box"> | |
14 | <!-- box / title --> |
|
14 | <!-- box / title --> | |
15 | <div class="title"> |
|
15 | <div class="title"> | |
16 | ${self.breadcrumbs()} |
|
16 | ${self.breadcrumbs()} | |
17 | </div> |
|
17 | </div> | |
18 |
|
18 | |||
19 | %for pr in c.pull_requests: |
|
19 | %for pr in c.pull_requests: | |
20 | <div> |
|
20 | <div> | |
21 | <h4 style="border:0px;padding:0px"> |
|
21 | <h4 style="border:0px;padding:0px"> | |
22 | %if pr.is_closed(): |
|
22 | %if pr.is_closed(): | |
23 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> |
|
23 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> | |
24 | %endif |
|
24 | %endif | |
25 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(pr.last_review_status))}" /> |
|
25 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(pr.last_review_status))}" /> | |
26 | <a href="${h.url('pullrequest_show',repo_name=c.repo_name,pull_request_id=pr.pull_request_id)}"> |
|
26 | <a href="${h.url('pullrequest_show',repo_name=c.repo_name,pull_request_id=pr.pull_request_id)}"> | |
27 | ${_('Pull request #%s opened by %s on %s') % (pr.pull_request_id, pr.author.full_name, h.fmt_date(pr.created_on))} |
|
27 | ${_('Pull request #%s opened by %s on %s') % (pr.pull_request_id, pr.author.full_name, h.fmt_date(pr.created_on))} | |
28 | </a> |
|
28 | </a> | |
29 | </h4> |
|
29 | </h4> | |
30 | <h5 style="border:0px;padding-bottom:0px">${_('Title')}: ${pr.title}</h5> |
|
30 | <h5 style="border:0px;padding-bottom:0px">${_('Title')}: ${pr.title}</h5> | |
31 | <div style="padding:0px 24px">${pr.description}</div> |
|
31 | <div style="padding:0px 24px">${pr.description}</div> | |
32 | <div style="border-bottom: 1px solid #DDD;margin:10px 20px;padding-bottom:10px"></div> |
|
32 | <div style="border-bottom: 1px solid #DDD;margin:10px 20px;padding-bottom:10px"></div> | |
33 | </div> |
|
33 | </div> | |
34 | %endfor |
|
34 | %endfor | |
35 |
|
35 | |||
36 | </div> |
|
36 | </div> | |
37 |
|
37 | |||
38 | </%def> |
|
38 | </%def> |
@@ -1,91 +1,91 | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base/root.html"/> |
|
2 | <%inherit file="base/root.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 |
${_('Sign Up')} |
|
5 | ${_('Sign Up')} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <div id="register"> |
|
8 | <div id="register"> | |
9 |
|
9 | |||
10 | <div class="title top-left-rounded-corner top-right-rounded-corner"> |
|
10 | <div class="title top-left-rounded-corner top-right-rounded-corner"> | |
11 | <h5>${_('Sign Up to')} ${c.rhodecode_name}</h5> |
|
11 | <h5>${_('Sign Up to')} ${c.rhodecode_name}</h5> | |
12 | </div> |
|
12 | </div> | |
13 | <div class="inner"> |
|
13 | <div class="inner"> | |
14 | ${h.form(url('register'))} |
|
14 | ${h.form(url('register'))} | |
15 | <div class="form"> |
|
15 | <div class="form"> | |
16 | <!-- fields --> |
|
16 | <!-- fields --> | |
17 | <div class="fields"> |
|
17 | <div class="fields"> | |
18 | <div class="field"> |
|
18 | <div class="field"> | |
19 | <div class="label"> |
|
19 | <div class="label"> | |
20 | <label for="username">${_('Username')}:</label> |
|
20 | <label for="username">${_('Username')}:</label> | |
21 | </div> |
|
21 | </div> | |
22 | <div class="input"> |
|
22 | <div class="input"> | |
23 | ${h.text('username',class_="medium")} |
|
23 | ${h.text('username',class_="medium")} | |
24 | </div> |
|
24 | </div> | |
25 | </div> |
|
25 | </div> | |
26 |
|
26 | |||
27 | <div class="field"> |
|
27 | <div class="field"> | |
28 | <div class="label"> |
|
28 | <div class="label"> | |
29 | <label for="password">${_('Password')}:</label> |
|
29 | <label for="password">${_('Password')}:</label> | |
30 | </div> |
|
30 | </div> | |
31 | <div class="input"> |
|
31 | <div class="input"> | |
32 | ${h.password('password',class_="medium")} |
|
32 | ${h.password('password',class_="medium")} | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 |
|
35 | |||
36 | <div class="field"> |
|
36 | <div class="field"> | |
37 | <div class="label"> |
|
37 | <div class="label"> | |
38 | <label for="password">${_('Re-enter password')}:</label> |
|
38 | <label for="password">${_('Re-enter password')}:</label> | |
39 | </div> |
|
39 | </div> | |
40 | <div class="input"> |
|
40 | <div class="input"> | |
41 | ${h.password('password_confirmation',class_="medium")} |
|
41 | ${h.password('password_confirmation',class_="medium")} | |
42 | </div> |
|
42 | </div> | |
43 | </div> |
|
43 | </div> | |
44 |
|
44 | |||
45 | <div class="field"> |
|
45 | <div class="field"> | |
46 | <div class="label"> |
|
46 | <div class="label"> | |
47 | <label for="firstname">${_('First Name')}:</label> |
|
47 | <label for="firstname">${_('First Name')}:</label> | |
48 | </div> |
|
48 | </div> | |
49 | <div class="input"> |
|
49 | <div class="input"> | |
50 | ${h.text('firstname',class_="medium")} |
|
50 | ${h.text('firstname',class_="medium")} | |
51 | </div> |
|
51 | </div> | |
52 | </div> |
|
52 | </div> | |
53 |
|
53 | |||
54 | <div class="field"> |
|
54 | <div class="field"> | |
55 | <div class="label"> |
|
55 | <div class="label"> | |
56 | <label for="lastname">${_('Last Name')}:</label> |
|
56 | <label for="lastname">${_('Last Name')}:</label> | |
57 | </div> |
|
57 | </div> | |
58 | <div class="input"> |
|
58 | <div class="input"> | |
59 | ${h.text('lastname',class_="medium")} |
|
59 | ${h.text('lastname',class_="medium")} | |
60 | </div> |
|
60 | </div> | |
61 | </div> |
|
61 | </div> | |
62 |
|
62 | |||
63 | <div class="field"> |
|
63 | <div class="field"> | |
64 | <div class="label"> |
|
64 | <div class="label"> | |
65 | <label for="email">${_('Email')}:</label> |
|
65 | <label for="email">${_('Email')}:</label> | |
66 | </div> |
|
66 | </div> | |
67 | <div class="input"> |
|
67 | <div class="input"> | |
68 | ${h.text('email',class_="medium")} |
|
68 | ${h.text('email',class_="medium")} | |
69 | </div> |
|
69 | </div> | |
70 | </div> |
|
70 | </div> | |
71 |
|
71 | |||
72 | <div class="buttons"> |
|
72 | <div class="buttons"> | |
73 | <div class="nohighlight"> |
|
73 | <div class="nohighlight"> | |
74 | ${h.submit('sign_up',_('Sign Up'),class_="ui-btn large")} |
|
74 | ${h.submit('sign_up',_('Sign Up'),class_="ui-btn large")} | |
75 | %if c.auto_active: |
|
75 | %if c.auto_active: | |
76 | <div class="activation_msg">${_('Your account will be activated right after registration')}</div> |
|
76 | <div class="activation_msg">${_('Your account will be activated right after registration')}</div> | |
77 | %else: |
|
77 | %else: | |
78 | <div class="activation_msg">${_('Your account must wait for activation by administrator')}</div> |
|
78 | <div class="activation_msg">${_('Your account must wait for activation by administrator')}</div> | |
79 | %endif |
|
79 | %endif | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | </div> |
|
83 | </div> | |
84 | ${h.end_form()} |
|
84 | ${h.end_form()} | |
85 | <script type="text/javascript"> |
|
85 | <script type="text/javascript"> | |
86 | YUE.onDOMReady(function(){ |
|
86 | YUE.onDOMReady(function(){ | |
87 | YUD.get('username').focus(); |
|
87 | YUD.get('username').focus(); | |
88 | }) |
|
88 | }) | |
89 | </script> |
|
89 | </script> | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> |
@@ -1,87 +1,87 | |||||
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} |
|
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 | ${_('Search')} |
|
14 | ${_('Search')} | |
15 | %else: |
|
15 | %else: | |
16 | ${_('Search in all repositories')} |
|
16 | ${_('Search in all repositories')} | |
17 | %endif |
|
17 | %endif | |
18 | %if c.cur_query: |
|
18 | %if c.cur_query: | |
19 | » |
|
19 | » | |
20 | ${c.cur_query} |
|
20 | ${c.cur_query} | |
21 | %endif |
|
21 | %endif | |
22 | </%def> |
|
22 | </%def> | |
23 |
|
23 | |||
24 | <%def name="page_nav()"> |
|
24 | <%def name="page_nav()"> | |
25 | %if c.repo_name: |
|
25 | %if c.repo_name: | |
26 | ${self.menu('options')} |
|
26 | ${self.menu('options')} | |
27 | %else: |
|
27 | %else: | |
28 | ${self.menu('search')} |
|
28 | ${self.menu('search')} | |
29 | %endif |
|
29 | %endif | |
30 | </%def> |
|
30 | </%def> | |
31 | <%def name="main()"> |
|
31 | <%def name="main()"> | |
32 | ${self.context_bar('options')} |
|
32 | ${self.context_bar('options')} | |
33 | <div class="box"> |
|
33 | <div class="box"> | |
34 | <!-- box / title --> |
|
34 | <!-- box / title --> | |
35 | <div class="title"> |
|
35 | <div class="title"> | |
36 | ${self.breadcrumbs()} |
|
36 | ${self.breadcrumbs()} | |
37 | </div> |
|
37 | </div> | |
38 | <!-- end box / title --> |
|
38 | <!-- end box / title --> | |
39 | %if c.repo_name: |
|
39 | %if c.repo_name: | |
40 | ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')} |
|
40 | ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')} | |
41 | %else: |
|
41 | %else: | |
42 | ${h.form(h.url('search'),method='get')} |
|
42 | ${h.form(h.url('search'),method='get')} | |
43 | %endif |
|
43 | %endif | |
44 | <div class="form"> |
|
44 | <div class="form"> | |
45 | <div class="fields"> |
|
45 | <div class="fields"> | |
46 | <div class="field field-first field-noborder"> |
|
46 | <div class="field field-first field-noborder"> | |
47 | <div class="label"> |
|
47 | <div class="label"> | |
48 | <label for="q">${_('Search term')}</label> |
|
48 | <label for="q">${_('Search term')}</label> | |
49 | </div> |
|
49 | </div> | |
50 | <div class="input">${h.text('q',c.cur_query,class_="small")} |
|
50 | <div class="input">${h.text('q',c.cur_query,class_="small")} | |
51 | <div class="button highlight"> |
|
51 | <div class="button highlight"> | |
52 | <input type="submit" value="${_('Search')}" class="ui-button"/> |
|
52 | <input type="submit" value="${_('Search')}" class="ui-button"/> | |
53 | </div> |
|
53 | </div> | |
54 | </div> |
|
54 | </div> | |
55 | <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> |
|
55 | <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> | |
56 | </div> |
|
56 | </div> | |
57 |
|
57 | |||
58 | <div class="field"> |
|
58 | <div class="field"> | |
59 | <div class="label"> |
|
59 | <div class="label"> | |
60 | <label for="type">${_('Search in')}</label> |
|
60 | <label for="type">${_('Search in')}</label> | |
61 | </div> |
|
61 | </div> | |
62 | <div class="select"> |
|
62 | <div class="select"> | |
63 | ${h.select('type',c.cur_type,[('content',_('File contents')), |
|
63 | ${h.select('type',c.cur_type,[('content',_('File contents')), | |
64 | ('commit',_('Commit messages')), |
|
64 | ('commit',_('Commit messages')), | |
65 | ('path',_('File names')), |
|
65 | ('path',_('File names')), | |
66 | ##('repository',_('Repository names')), |
|
66 | ##('repository',_('Repository names')), | |
67 | ])} |
|
67 | ])} | |
68 | </div> |
|
68 | </div> | |
69 | </div> |
|
69 | </div> | |
70 |
|
70 | |||
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 | ${h.end_form()} |
|
73 | ${h.end_form()} | |
74 | <div class="search"> |
|
74 | <div class="search"> | |
75 | %if c.cur_type == 'content': |
|
75 | %if c.cur_type == 'content': | |
76 | <%include file='search_content.html'/> |
|
76 | <%include file='search_content.html'/> | |
77 | %elif c.cur_type == 'path': |
|
77 | %elif c.cur_type == 'path': | |
78 | <%include file='search_path.html'/> |
|
78 | <%include file='search_path.html'/> | |
79 | %elif c.cur_type == 'commit': |
|
79 | %elif c.cur_type == 'commit': | |
80 | <%include file='search_commit.html'/> |
|
80 | <%include file='search_commit.html'/> | |
81 | %elif c.cur_type == 'repository': |
|
81 | %elif c.cur_type == 'repository': | |
82 | <%include file='search_repository.html'/> |
|
82 | <%include file='search_repository.html'/> | |
83 | %endif |
|
83 | %endif | |
84 | </div> |
|
84 | </div> | |
85 | </div> |
|
85 | </div> | |
86 |
|
86 | |||
87 | </%def> |
|
87 | </%def> |
@@ -1,146 +1,146 | |||||
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 Settings') % c.repo_name} |
|
5 | ${_('%s Settings') % 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.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} | |
12 | » |
|
12 | » | |
13 | ${_('Settings')} |
|
13 | ${_('Settings')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('settings')} |
|
17 | ${self.menu('settings')} | |
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_settings_update', repo_name=c.repo_info.repo_name),method='put')} |
|
25 | ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),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"> |
|
30 | <div class="label"> | |
31 | <label for="repo_name">${_('Name')}:</label> |
|
31 | <label for="repo_name">${_('Name')}:</label> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="input input-medium"> |
|
33 | <div class="input input-medium"> | |
34 | ${h.text('repo_name',class_="small")} |
|
34 | ${h.text('repo_name',class_="small")} | |
35 | </div> |
|
35 | </div> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="field"> |
|
37 | <div class="field"> | |
38 | <div class="label"> |
|
38 | <div class="label"> | |
39 | <label for="clone_uri">${_('Clone uri')}:</label> |
|
39 | <label for="clone_uri">${_('Clone uri')}:</label> | |
40 | </div> |
|
40 | </div> | |
41 | <div class="input"> |
|
41 | <div class="input"> | |
42 | ${h.text('clone_uri',class_="medium")} |
|
42 | ${h.text('clone_uri',class_="medium")} | |
43 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
43 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> | |
44 | </div> |
|
44 | </div> | |
45 | </div> |
|
45 | </div> | |
46 | <div class="field"> |
|
46 | <div class="field"> | |
47 | <div class="label"> |
|
47 | <div class="label"> | |
48 | <label for="repo_group">${_('Repository group')}:</label> |
|
48 | <label for="repo_group">${_('Repository group')}:</label> | |
49 | </div> |
|
49 | </div> | |
50 | <div class="input"> |
|
50 | <div class="input"> | |
51 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
51 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
52 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> |
|
52 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> | |
53 | </div> |
|
53 | </div> | |
54 | </div> |
|
54 | </div> | |
55 | <div class="field"> |
|
55 | <div class="field"> | |
56 | <div class="label"> |
|
56 | <div class="label"> | |
57 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
57 | <label for="landing_rev">${_('Landing revision')}:</label> | |
58 | </div> |
|
58 | </div> | |
59 | <div class="input"> |
|
59 | <div class="input"> | |
60 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
60 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} | |
61 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
61 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
62 | </div> |
|
62 | </div> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="field"> |
|
64 | <div class="field"> | |
65 | <div class="label label-textarea"> |
|
65 | <div class="label label-textarea"> | |
66 | <label for="repo_description">${_('Description')}:</label> |
|
66 | <label for="repo_description">${_('Description')}:</label> | |
67 | </div> |
|
67 | </div> | |
68 | <div class="textarea text-area editor"> |
|
68 | <div class="textarea text-area editor"> | |
69 | ${h.textarea('repo_description')} |
|
69 | ${h.textarea('repo_description')} | |
70 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
70 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 |
|
73 | |||
74 | <div class="field"> |
|
74 | <div class="field"> | |
75 | <div class="label label-checkbox"> |
|
75 | <div class="label label-checkbox"> | |
76 | <label for="repo_private">${_('Private repository')}:</label> |
|
76 | <label for="repo_private">${_('Private repository')}:</label> | |
77 | </div> |
|
77 | </div> | |
78 | <div class="checkboxes"> |
|
78 | <div class="checkboxes"> | |
79 | ${h.checkbox('repo_private',value="True")} |
|
79 | ${h.checkbox('repo_private',value="True")} | |
80 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
80 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | %if c.visual.repository_fields: |
|
83 | %if c.visual.repository_fields: | |
84 | ## EXTRA FIELDS |
|
84 | ## EXTRA FIELDS | |
85 | %for field in c.repo_fields: |
|
85 | %for field in c.repo_fields: | |
86 | <div class="field"> |
|
86 | <div class="field"> | |
87 | <div class="label"> |
|
87 | <div class="label"> | |
88 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
88 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> | |
89 | </div> |
|
89 | </div> | |
90 | <div class="input input-medium"> |
|
90 | <div class="input input-medium"> | |
91 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
91 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} | |
92 | %if field.field_desc: |
|
92 | %if field.field_desc: | |
93 | <span class="help-block">${field.field_desc}</span> |
|
93 | <span class="help-block">${field.field_desc}</span> | |
94 | %endif |
|
94 | %endif | |
95 | </div> |
|
95 | </div> | |
96 | </div> |
|
96 | </div> | |
97 | %endfor |
|
97 | %endfor | |
98 | %endif |
|
98 | %endif | |
99 |
|
99 | |||
100 | <div class="field"> |
|
100 | <div class="field"> | |
101 | <div class="label"> |
|
101 | <div class="label"> | |
102 | <label for="">${_('Permissions')}:</label> |
|
102 | <label for="">${_('Permissions')}:</label> | |
103 | </div> |
|
103 | </div> | |
104 | <div class="input"> |
|
104 | <div class="input"> | |
105 | <%include file="../admin/repos/repo_edit_perms.html"/> |
|
105 | <%include file="../admin/repos/repo_edit_perms.html"/> | |
106 | </div> |
|
106 | </div> | |
107 | </div> |
|
107 | </div> | |
108 |
|
108 | |||
109 | <div class="buttons"> |
|
109 | <div class="buttons"> | |
110 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
110 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
111 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
111 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
112 | </div> |
|
112 | </div> | |
113 |
|
113 | |||
114 | </div> |
|
114 | </div> | |
115 | ${h.end_form()} |
|
115 | ${h.end_form()} | |
116 | </div> |
|
116 | </div> | |
117 |
|
117 | |||
118 | <h3>${_('Delete repository')}</h3> |
|
118 | <h3>${_('Delete repository')}</h3> | |
119 | <div class="form"> |
|
119 | <div class="form"> | |
120 | <!-- fields --> |
|
120 | <!-- fields --> | |
121 | <div class="fields"> |
|
121 | <div class="fields"> | |
122 |
|
122 | |||
123 | <div class="field"> |
|
123 | <div class="field"> | |
124 | <div class="label"> |
|
124 | <div class="label"> | |
125 | <label for="">${_('Remove repo')}:</label> |
|
125 | <label for="">${_('Remove repo')}:</label> | |
126 | </div> |
|
126 | </div> | |
127 | <div class="checkboxes"> |
|
127 | <div class="checkboxes"> | |
128 | ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')} |
|
128 | ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')} | |
129 | <div class=""> |
|
129 | <div class=""> | |
130 | <div class="fields"> |
|
130 | <div class="fields"> | |
131 | ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")} |
|
131 | ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")} | |
132 | </div> |
|
132 | </div> | |
133 | <div class="field" style="border:none;color:#888"> |
|
133 | <div class="field" style="border:none;color:#888"> | |
134 | <ul> |
|
134 | <ul> | |
135 | <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need fully delete it from file system please do it manually')}</li> |
|
135 | <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need fully delete it from file system please do it manually')}</li> | |
136 | </ul> |
|
136 | </ul> | |
137 | </div> |
|
137 | </div> | |
138 | </div> |
|
138 | </div> | |
139 | ${h.end_form()} |
|
139 | ${h.end_form()} | |
140 | </div> |
|
140 | </div> | |
141 | </div> |
|
141 | </div> | |
142 | </div> |
|
142 | </div> | |
143 | </div> |
|
143 | </div> | |
144 |
|
144 | |||
145 | </div> |
|
145 | </div> | |
146 | </%def> |
|
146 | </%def> |
@@ -1,36 +1,36 | |||||
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 |
|
5 | ${_('%s Lightweight Changelog') % 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 | %if c.file_history: |
|
10 | %if c.file_history: | |
11 |
${h.link_to(_(' |
|
11 | ${h.link_to(_('Lightweight Changelog'),h.url('shortlog_home',repo_name=c.repo_name))} | |
12 | » |
|
12 | » | |
13 | ${c.file_history} |
|
13 | ${c.file_history} | |
14 | %else: |
|
14 | %else: | |
15 |
${_(' |
|
15 | ${_('Lightweight Changelog')} | |
16 | %endif |
|
16 | %endif | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="page_nav()"> |
|
19 | <%def name="page_nav()"> | |
20 | ${self.menu('shortlog')} |
|
20 | ${self.menu('shortlog')} | |
21 | </%def> |
|
21 | </%def> | |
22 | <%def name="main()"> |
|
22 | <%def name="main()"> | |
23 | ${self.context_bar('options')} |
|
23 | ${self.context_bar('options')} | |
24 | <div class="box"> |
|
24 | <div class="box"> | |
25 | <!-- box / title --> |
|
25 | <!-- box / title --> | |
26 | <div class="title"> |
|
26 | <div class="title"> | |
27 | ${self.breadcrumbs()} |
|
27 | ${self.breadcrumbs()} | |
28 | </div> |
|
28 | </div> | |
29 | <!-- end box / title --> |
|
29 | <!-- end box / title --> | |
30 | <div class="table"> |
|
30 | <div class="table"> | |
31 | <div id="shortlog_data"> |
|
31 | <div id="shortlog_data"> | |
32 | ${c.shortlog_data} |
|
32 | ${c.shortlog_data} | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | </div> |
|
35 | </div> | |
36 | </%def> |
|
36 | </%def> |
@@ -1,739 +1,739 | |||||
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} |
|
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 | ${_('Summary')} |
|
8 | ${_('Summary')} | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="page_nav()"> |
|
11 | <%def name="page_nav()"> | |
12 | ${self.menu('summary')} |
|
12 | ${self.menu('summary')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="head_extra()"> |
|
15 | <%def name="head_extra()"> | |
16 | <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" /> |
|
16 | <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" /> | |
17 | <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" /> |
|
17 | <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" /> | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="main()"> |
|
20 | <%def name="main()"> | |
21 | ${self.context_bar('summary')} |
|
21 | ${self.context_bar('summary')} | |
22 | <% |
|
22 | <% | |
23 | summary = lambda n:{False:'summary-short'}.get(n) |
|
23 | summary = lambda n:{False:'summary-short'}.get(n) | |
24 | %> |
|
24 | %> | |
25 | %if c.show_stats: |
|
25 | %if c.show_stats: | |
26 | <div class="box box-left"> |
|
26 | <div class="box box-left"> | |
27 | %else: |
|
27 | %else: | |
28 | <div class="box"> |
|
28 | <div class="box"> | |
29 | %endif |
|
29 | %endif | |
30 | <!-- box / title --> |
|
30 | <!-- box / title --> | |
31 | <div class="title"> |
|
31 | <div class="title"> | |
32 | ${self.breadcrumbs()} |
|
32 | ${self.breadcrumbs()} | |
33 | </div> |
|
33 | </div> | |
34 | <!-- end box / title --> |
|
34 | <!-- end box / title --> | |
35 | <div class="form"> |
|
35 | <div class="form"> | |
36 | <div id="summary" class="fields"> |
|
36 | <div id="summary" class="fields"> | |
37 |
|
37 | |||
38 | <div class="field"> |
|
38 | <div class="field"> | |
39 | <div class="label-summary"> |
|
39 | <div class="label-summary"> | |
40 | <label>${_('Name')}:</label> |
|
40 | <label>${_('Name')}:</label> | |
41 | </div> |
|
41 | </div> | |
42 | <div class="input ${summary(c.show_stats)}"> |
|
42 | <div class="input ${summary(c.show_stats)}"> | |
43 |
|
43 | |||
44 | ## locking icon |
|
44 | ## locking icon | |
45 | %if c.rhodecode_db_repo.enable_locking: |
|
45 | %if c.rhodecode_db_repo.enable_locking: | |
46 | %if c.rhodecode_db_repo.locked[0]: |
|
46 | %if c.rhodecode_db_repo.locked[0]: | |
47 | <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span> |
|
47 | <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span> | |
48 | %else: |
|
48 | %else: | |
49 | <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span> |
|
49 | <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span> | |
50 | %endif |
|
50 | %endif | |
51 | %endif |
|
51 | %endif | |
52 | ##REPO TYPE |
|
52 | ##REPO TYPE | |
53 | %if h.is_hg(c.dbrepo): |
|
53 | %if h.is_hg(c.dbrepo): | |
54 | <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
54 | <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> | |
55 | %endif |
|
55 | %endif | |
56 | %if h.is_git(c.dbrepo): |
|
56 | %if h.is_git(c.dbrepo): | |
57 | <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
57 | <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> | |
58 | %endif |
|
58 | %endif | |
59 |
|
59 | |||
60 | ##PUBLIC/PRIVATE |
|
60 | ##PUBLIC/PRIVATE | |
61 | %if c.dbrepo.private: |
|
61 | %if c.dbrepo.private: | |
62 | <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
|
62 | <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> | |
63 | %else: |
|
63 | %else: | |
64 | <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
|
64 | <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> | |
65 | %endif |
|
65 | %endif | |
66 |
|
66 | |||
67 | ##REPO NAME |
|
67 | ##REPO NAME | |
68 | <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span> |
|
68 | <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span> | |
69 |
|
69 | |||
70 | ##FORK |
|
70 | ##FORK | |
71 | %if c.dbrepo.fork: |
|
71 | %if c.dbrepo.fork: | |
72 | <div style="margin-top:5px;clear:both"> |
|
72 | <div style="margin-top:5px;clear:both"> | |
73 | <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')}"/> |
|
73 | <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')}"/> | |
74 | ${_('Fork of')} ${c.dbrepo.fork.repo_name} |
|
74 | ${_('Fork of')} ${c.dbrepo.fork.repo_name} | |
75 | </a> |
|
75 | </a> | |
76 | </div> |
|
76 | </div> | |
77 | %endif |
|
77 | %endif | |
78 | ##REMOTE |
|
78 | ##REMOTE | |
79 | %if c.dbrepo.clone_uri: |
|
79 | %if c.dbrepo.clone_uri: | |
80 | <div style="margin-top:5px;clear:both"> |
|
80 | <div style="margin-top:5px;clear:both"> | |
81 | <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')}"/> |
|
81 | <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')}"/> | |
82 | ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)} |
|
82 | ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)} | |
83 | </a> |
|
83 | </a> | |
84 | </div> |
|
84 | </div> | |
85 | %endif |
|
85 | %endif | |
86 | </div> |
|
86 | </div> | |
87 | </div> |
|
87 | </div> | |
88 |
|
88 | |||
89 | <div class="field"> |
|
89 | <div class="field"> | |
90 | <div class="label-summary"> |
|
90 | <div class="label-summary"> | |
91 | <label>${_('Description')}:</label> |
|
91 | <label>${_('Description')}:</label> | |
92 | </div> |
|
92 | </div> | |
93 | %if c.visual.stylify_metatags: |
|
93 | %if c.visual.stylify_metatags: | |
94 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div> |
|
94 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div> | |
95 | %else: |
|
95 | %else: | |
96 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div> |
|
96 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div> | |
97 | %endif |
|
97 | %endif | |
98 | </div> |
|
98 | </div> | |
99 |
|
99 | |||
100 | <div class="field"> |
|
100 | <div class="field"> | |
101 | <div class="label-summary"> |
|
101 | <div class="label-summary"> | |
102 | <label>${_('Contact')}:</label> |
|
102 | <label>${_('Contact')}:</label> | |
103 | </div> |
|
103 | </div> | |
104 | <div class="input ${summary(c.show_stats)}"> |
|
104 | <div class="input ${summary(c.show_stats)}"> | |
105 | <div class="gravatar"> |
|
105 | <div class="gravatar"> | |
106 | <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/> |
|
106 | <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/> | |
107 | </div> |
|
107 | </div> | |
108 | ${_('Username')}: ${c.dbrepo.user.username}<br/> |
|
108 | ${_('Username')}: ${c.dbrepo.user.username}<br/> | |
109 | ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/> |
|
109 | ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/> | |
110 | ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a> |
|
110 | ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a> | |
111 | </div> |
|
111 | </div> | |
112 | </div> |
|
112 | </div> | |
113 |
|
113 | |||
114 | <div class="field"> |
|
114 | <div class="field"> | |
115 | <div class="label-summary"> |
|
115 | <div class="label-summary"> | |
116 | <label>${_('Clone url')}:</label> |
|
116 | <label>${_('Clone url')}:</label> | |
117 | </div> |
|
117 | </div> | |
118 | <div class="input ${summary(c.show_stats)}"> |
|
118 | <div class="input ${summary(c.show_stats)}"> | |
119 | <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> |
|
119 | <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> | |
120 | <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> |
|
120 | <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> | |
121 | <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> |
|
121 | <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> | |
122 | <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> |
|
122 | <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> | |
123 | </div> |
|
123 | </div> | |
124 | </div> |
|
124 | </div> | |
125 |
|
125 | |||
126 | <div class="field"> |
|
126 | <div class="field"> | |
127 | <div class="label-summary"> |
|
127 | <div class="label-summary"> | |
128 | <label>${_('Trending files')}:</label> |
|
128 | <label>${_('Trending files')}:</label> | |
129 | </div> |
|
129 | </div> | |
130 | <div class="input ${summary(c.show_stats)}"> |
|
130 | <div class="input ${summary(c.show_stats)}"> | |
131 | %if c.show_stats: |
|
131 | %if c.show_stats: | |
132 | <div id="lang_stats"></div> |
|
132 | <div id="lang_stats"></div> | |
133 | %else: |
|
133 | %else: | |
134 | ${_('Statistics are disabled for this repository')} |
|
134 | ${_('Statistics are disabled for this repository')} | |
135 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
135 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): | |
136 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
136 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | |
137 | %endif |
|
137 | %endif | |
138 | %endif |
|
138 | %endif | |
139 | </div> |
|
139 | </div> | |
140 | </div> |
|
140 | </div> | |
141 |
|
141 | |||
142 | <div class="field"> |
|
142 | <div class="field"> | |
143 | <div class="label-summary"> |
|
143 | <div class="label-summary"> | |
144 | <label>${_('Download')}:</label> |
|
144 | <label>${_('Download')}:</label> | |
145 | </div> |
|
145 | </div> | |
146 | <div class="input ${summary(c.show_stats)}"> |
|
146 | <div class="input ${summary(c.show_stats)}"> | |
147 | %if len(c.rhodecode_repo.revisions) == 0: |
|
147 | %if len(c.rhodecode_repo.revisions) == 0: | |
148 | ${_('There are no downloads yet')} |
|
148 | ${_('There are no downloads yet')} | |
149 | %elif c.enable_downloads is False: |
|
149 | %elif c.enable_downloads is False: | |
150 | ${_('Downloads are disabled for this repository')} |
|
150 | ${_('Downloads are disabled for this repository')} | |
151 | %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
|
151 | %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): | |
152 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
152 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | |
153 | %endif |
|
153 | %endif | |
154 | %else: |
|
154 | %else: | |
155 | ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)} |
|
155 | ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)} | |
156 | <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> |
|
156 | <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> | |
157 | <span style="vertical-align: bottom"> |
|
157 | <span style="vertical-align: bottom"> | |
158 | <input id="archive_subrepos" type="checkbox" name="subrepos" /> |
|
158 | <input id="archive_subrepos" type="checkbox" name="subrepos" /> | |
159 | <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label> |
|
159 | <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label> | |
160 | </span> |
|
160 | </span> | |
161 | %endif |
|
161 | %endif | |
162 | </div> |
|
162 | </div> | |
163 | </div> |
|
163 | </div> | |
164 | </div> |
|
164 | </div> | |
165 | <div id="summary-menu-stats"> |
|
165 | <div id="summary-menu-stats"> | |
166 | <ul> |
|
166 | <ul> | |
167 | <li> |
|
167 | <li> | |
168 | <a class="followers" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> |
|
168 | <a class="followers" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> | |
169 | ${_('Followers')} |
|
169 | ${_('Followers')} | |
170 | <span style="float:right" id="current_followers_count">${c.repository_followers}</span> |
|
170 | <span style="float:right" id="current_followers_count">${c.repository_followers}</span> | |
171 | </a> |
|
171 | </a> | |
172 | </li> |
|
172 | </li> | |
173 | <li> |
|
173 | <li> | |
174 | <a class="forks" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> |
|
174 | <a class="forks" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> | |
175 | ${_('Forks')} |
|
175 | ${_('Forks')} | |
176 | <span style="float:right">${c.repository_forks}</span> |
|
176 | <span style="float:right">${c.repository_forks}</span> | |
177 | </a> |
|
177 | </a> | |
178 | </li> |
|
178 | </li> | |
179 |
|
179 | |||
180 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
180 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): | |
181 | <li> |
|
181 | <li> | |
182 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): |
|
182 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): | |
183 | ${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')} |
|
183 | ${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')} | |
184 | %else: |
|
184 | %else: | |
185 | ${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')} |
|
185 | ${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')} | |
186 | %endif |
|
186 | %endif | |
187 | </li> |
|
187 | </li> | |
188 | %endif |
|
188 | %endif | |
189 |
|
189 | |||
190 | <li> |
|
190 | <li> | |
191 | %if c.rhodecode_user.username != 'default': |
|
191 | %if c.rhodecode_user.username != 'default': | |
192 | ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='feed')} |
|
192 | ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='feed')} | |
193 | %else: |
|
193 | %else: | |
194 | ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='feed')} |
|
194 | ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='feed')} | |
195 | %endif |
|
195 | %endif | |
196 | </li> |
|
196 | </li> | |
197 |
|
197 | |||
198 | %if c.rhodecode_user.username != 'default': |
|
198 | %if c.rhodecode_user.username != 'default': | |
199 | <li class="repo_size"> |
|
199 | <li class="repo_size"> | |
200 | <a href="#" class="repo-size" onclick="javascript:showRepoSize('repo_size_2','${c.dbrepo.repo_name}','${str(h.get_token())}')">Repository Size</a> |
|
200 | <a href="#" class="repo-size" onclick="javascript:showRepoSize('repo_size_2','${c.dbrepo.repo_name}','${str(h.get_token())}')">Repository Size</a> | |
201 | <span id="repo_size_2"></span> |
|
201 | <span id="repo_size_2"></span> | |
202 | </li> |
|
202 | </li> | |
203 | %endif |
|
203 | %endif | |
204 | </ul> |
|
204 | </ul> | |
205 | </div> |
|
205 | </div> | |
206 | </div> |
|
206 | </div> | |
207 | </div> |
|
207 | </div> | |
208 |
|
208 | |||
209 | %if c.show_stats: |
|
209 | %if c.show_stats: | |
210 | <div class="box box-right" style="min-height:455px"> |
|
210 | <div class="box box-right" style="min-height:455px"> | |
211 | <!-- box / title --> |
|
211 | <!-- box / title --> | |
212 | <div class="title"> |
|
212 | <div class="title"> | |
213 | <h5>${_('Commit activity by day / author')}</h5> |
|
213 | <h5>${_('Commit activity by day / author')}</h5> | |
214 | </div> |
|
214 | </div> | |
215 |
|
215 | |||
216 | <div class="graph"> |
|
216 | <div class="graph"> | |
217 | <div style="padding:0 10px 10px 17px;"> |
|
217 | <div style="padding:0 10px 10px 17px;"> | |
218 | %if c.no_data: |
|
218 | %if c.no_data: | |
219 | ${c.no_data_msg} |
|
219 | ${c.no_data_msg} | |
220 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
220 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): | |
221 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
221 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | |
222 | %endif |
|
222 | %endif | |
223 | %else: |
|
223 | %else: | |
224 | ${_('Stats gathered: ')} ${c.stats_percentage}% |
|
224 | ${_('Stats gathered: ')} ${c.stats_percentage}% | |
225 | %endif |
|
225 | %endif | |
226 | </div> |
|
226 | </div> | |
227 | <div id="commit_history" style="width:450px;height:300px;float:left"></div> |
|
227 | <div id="commit_history" style="width:450px;height:300px;float:left"></div> | |
228 | <div style="clear: both;height: 10px"></div> |
|
228 | <div style="clear: both;height: 10px"></div> | |
229 | <div id="overview" style="width:450px;height:100px;float:left"></div> |
|
229 | <div id="overview" style="width:450px;height:100px;float:left"></div> | |
230 |
|
230 | |||
231 | <div id="legend_data" style="clear:both;margin-top:10px;"> |
|
231 | <div id="legend_data" style="clear:both;margin-top:10px;"> | |
232 | <div id="legend_container"></div> |
|
232 | <div id="legend_container"></div> | |
233 | <div id="legend_choices"> |
|
233 | <div id="legend_choices"> | |
234 | <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table> |
|
234 | <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table> | |
235 | </div> |
|
235 | </div> | |
236 | </div> |
|
236 | </div> | |
237 | </div> |
|
237 | </div> | |
238 | </div> |
|
238 | </div> | |
239 | %endif |
|
239 | %endif | |
240 |
|
240 | |||
241 | <div class="box"> |
|
241 | <div class="box"> | |
242 | <div class="title"> |
|
242 | <div class="title"> | |
243 | <div class="breadcrumbs"> |
|
243 | <div class="breadcrumbs"> | |
244 | %if c.repo_changesets: |
|
244 | %if c.repo_changesets: | |
245 | ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))} |
|
245 | ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))} | |
246 | %else: |
|
246 | %else: | |
247 | ${_('Quick start')} |
|
247 | ${_('Quick start')} | |
248 | %endif |
|
248 | %endif | |
249 | </div> |
|
249 | </div> | |
250 | </div> |
|
250 | </div> | |
251 | <div class="table"> |
|
251 | <div class="table"> | |
252 | <div id="shortlog_data"> |
|
252 | <div id="shortlog_data"> | |
253 | <%include file='../shortlog/shortlog_data.html'/> |
|
253 | <%include file='../shortlog/shortlog_data.html'/> | |
254 | </div> |
|
254 | </div> | |
255 | </div> |
|
255 | </div> | |
256 | </div> |
|
256 | </div> | |
257 |
|
257 | |||
258 | %if c.readme_data: |
|
258 | %if c.readme_data: | |
259 | <div id="readme" class="anchor"> |
|
259 | <div id="readme" class="anchor"> | |
260 | <div class="box" style="background-color: #FAFAFA"> |
|
260 | <div class="box" style="background-color: #FAFAFA"> | |
261 | <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}"> |
|
261 | <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}"> | |
262 | <div class="breadcrumbs"> |
|
262 | <div class="breadcrumbs"> | |
263 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> |
|
263 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> | |
264 | <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">¶</a> |
|
264 | <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">¶</a> | |
265 | </div> |
|
265 | </div> | |
266 | </div> |
|
266 | </div> | |
267 | <div class="readme"> |
|
267 | <div class="readme"> | |
268 | <div class="readme_box"> |
|
268 | <div class="readme_box"> | |
269 | ${c.readme_data|n} |
|
269 | ${c.readme_data|n} | |
270 | </div> |
|
270 | </div> | |
271 | </div> |
|
271 | </div> | |
272 | </div> |
|
272 | </div> | |
273 | </div> |
|
273 | </div> | |
274 | %endif |
|
274 | %endif | |
275 |
|
275 | |||
276 | <script type="text/javascript"> |
|
276 | <script type="text/javascript"> | |
277 | var clone_url = 'clone_url'; |
|
277 | var clone_url = 'clone_url'; | |
278 | YUE.on(clone_url,'click',function(e){ |
|
278 | YUE.on(clone_url,'click',function(e){ | |
279 | if(YUD.hasClass(clone_url,'selected')){ |
|
279 | if(YUD.hasClass(clone_url,'selected')){ | |
280 | return |
|
280 | return | |
281 | } |
|
281 | } | |
282 | else{ |
|
282 | else{ | |
283 | YUD.addClass(clone_url,'selected'); |
|
283 | YUD.addClass(clone_url,'selected'); | |
284 | YUD.get(clone_url).select(); |
|
284 | YUD.get(clone_url).select(); | |
285 | } |
|
285 | } | |
286 | }) |
|
286 | }) | |
287 |
|
287 | |||
288 | YUE.on('clone_by_name','click',function(e){ |
|
288 | YUE.on('clone_by_name','click',function(e){ | |
289 | // show url by name and hide name button |
|
289 | // show url by name and hide name button | |
290 | YUD.setStyle('clone_url','display',''); |
|
290 | YUD.setStyle('clone_url','display',''); | |
291 | YUD.setStyle('clone_by_name','display','none'); |
|
291 | YUD.setStyle('clone_by_name','display','none'); | |
292 |
|
292 | |||
293 | // hide url by id and show name button |
|
293 | // hide url by id and show name button | |
294 | YUD.setStyle('clone_by_id','display',''); |
|
294 | YUD.setStyle('clone_by_id','display',''); | |
295 | YUD.setStyle('clone_url_id','display','none'); |
|
295 | YUD.setStyle('clone_url_id','display','none'); | |
296 |
|
296 | |||
297 | }) |
|
297 | }) | |
298 | YUE.on('clone_by_id','click',function(e){ |
|
298 | YUE.on('clone_by_id','click',function(e){ | |
299 |
|
299 | |||
300 | // show url by id and hide id button |
|
300 | // show url by id and hide id button | |
301 | YUD.setStyle('clone_by_id','display','none'); |
|
301 | YUD.setStyle('clone_by_id','display','none'); | |
302 | YUD.setStyle('clone_url_id','display',''); |
|
302 | YUD.setStyle('clone_url_id','display',''); | |
303 |
|
303 | |||
304 | // hide url by name and show id button |
|
304 | // hide url by name and show id button | |
305 | YUD.setStyle('clone_by_name','display',''); |
|
305 | YUD.setStyle('clone_by_name','display',''); | |
306 | YUD.setStyle('clone_url','display','none'); |
|
306 | YUD.setStyle('clone_url','display','none'); | |
307 | }) |
|
307 | }) | |
308 |
|
308 | |||
309 |
|
309 | |||
310 | var tmpl_links = {}; |
|
310 | var tmpl_links = {}; | |
311 | %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): |
|
311 | %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): | |
312 | 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')}'; |
|
312 | 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')}'; | |
313 | %endfor |
|
313 | %endfor | |
314 |
|
314 | |||
315 | YUE.on(['download_options','archive_subrepos'],'change',function(e){ |
|
315 | YUE.on(['download_options','archive_subrepos'],'change',function(e){ | |
316 | var sm = YUD.get('download_options'); |
|
316 | var sm = YUD.get('download_options'); | |
317 | var new_cs = sm.options[sm.selectedIndex]; |
|
317 | var new_cs = sm.options[sm.selectedIndex]; | |
318 |
|
318 | |||
319 | for(k in tmpl_links){ |
|
319 | for(k in tmpl_links){ | |
320 | var s = YUD.get(k+'_link'); |
|
320 | var s = YUD.get(k+'_link'); | |
321 | if(s){ |
|
321 | if(s){ | |
322 | var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}"; |
|
322 | var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}"; | |
323 | title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text); |
|
323 | title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text); | |
324 | title_tmpl = title_tmpl.replace('__CS_EXT__',k); |
|
324 | title_tmpl = title_tmpl.replace('__CS_EXT__',k); | |
325 |
|
325 | |||
326 | var url = tmpl_links[k].replace('__CS__',new_cs.value); |
|
326 | var url = tmpl_links[k].replace('__CS__',new_cs.value); | |
327 | var subrepos = YUD.get('archive_subrepos').checked; |
|
327 | var subrepos = YUD.get('archive_subrepos').checked; | |
328 | url = url.replace('__SUB__',subrepos); |
|
328 | url = url.replace('__SUB__',subrepos); | |
329 | url = url.replace('__NAME__',title_tmpl); |
|
329 | url = url.replace('__NAME__',title_tmpl); | |
330 | s.innerHTML = url |
|
330 | s.innerHTML = url | |
331 | } |
|
331 | } | |
332 | } |
|
332 | } | |
333 | }); |
|
333 | }); | |
334 | </script> |
|
334 | </script> | |
335 | %if c.show_stats: |
|
335 | %if c.show_stats: | |
336 | <script type="text/javascript"> |
|
336 | <script type="text/javascript"> | |
337 | var data = ${c.trending_languages|n}; |
|
337 | var data = ${c.trending_languages|n}; | |
338 | var total = 0; |
|
338 | var total = 0; | |
339 | var no_data = true; |
|
339 | var no_data = true; | |
340 | var tbl = document.createElement('table'); |
|
340 | var tbl = document.createElement('table'); | |
341 | tbl.setAttribute('class','trending_language_tbl'); |
|
341 | tbl.setAttribute('class','trending_language_tbl'); | |
342 | var cnt = 0; |
|
342 | var cnt = 0; | |
343 | for (var i=0;i<data.length;i++){ |
|
343 | for (var i=0;i<data.length;i++){ | |
344 | total+= data[i][1].count; |
|
344 | total+= data[i][1].count; | |
345 | } |
|
345 | } | |
346 | for (var i=0;i<data.length;i++){ |
|
346 | for (var i=0;i<data.length;i++){ | |
347 | cnt += 1; |
|
347 | cnt += 1; | |
348 | no_data = false; |
|
348 | no_data = false; | |
349 |
|
349 | |||
350 | var hide = cnt>2; |
|
350 | var hide = cnt>2; | |
351 | var tr = document.createElement('tr'); |
|
351 | var tr = document.createElement('tr'); | |
352 | if (hide){ |
|
352 | if (hide){ | |
353 | tr.setAttribute('style','display:none'); |
|
353 | tr.setAttribute('style','display:none'); | |
354 | tr.setAttribute('class','stats_hidden'); |
|
354 | tr.setAttribute('class','stats_hidden'); | |
355 | } |
|
355 | } | |
356 | var k = data[i][0]; |
|
356 | var k = data[i][0]; | |
357 | var obj = data[i][1]; |
|
357 | var obj = data[i][1]; | |
358 | var percentage = Math.round((obj.count/total*100),2); |
|
358 | var percentage = Math.round((obj.count/total*100),2); | |
359 |
|
359 | |||
360 | var td1 = document.createElement('td'); |
|
360 | var td1 = document.createElement('td'); | |
361 | td1.width = 150; |
|
361 | td1.width = 150; | |
362 | var trending_language_label = document.createElement('div'); |
|
362 | var trending_language_label = document.createElement('div'); | |
363 | trending_language_label.innerHTML = obj.desc+" ("+k+")"; |
|
363 | trending_language_label.innerHTML = obj.desc+" ("+k+")"; | |
364 | td1.appendChild(trending_language_label); |
|
364 | td1.appendChild(trending_language_label); | |
365 |
|
365 | |||
366 | var td2 = document.createElement('td'); |
|
366 | var td2 = document.createElement('td'); | |
367 | td2.setAttribute('style','padding-right:14px !important'); |
|
367 | td2.setAttribute('style','padding-right:14px !important'); | |
368 | var trending_language = document.createElement('div'); |
|
368 | var trending_language = document.createElement('div'); | |
369 | var nr_files = obj.count+" ${_('files')}"; |
|
369 | var nr_files = obj.count+" ${_('files')}"; | |
370 |
|
370 | |||
371 | trending_language.title = k+" "+nr_files; |
|
371 | trending_language.title = k+" "+nr_files; | |
372 |
|
372 | |||
373 | if (percentage>22){ |
|
373 | if (percentage>22){ | |
374 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>"; |
|
374 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>"; | |
375 | } |
|
375 | } | |
376 | else{ |
|
376 | else{ | |
377 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>"; |
|
377 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>"; | |
378 | } |
|
378 | } | |
379 |
|
379 | |||
380 | trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner'); |
|
380 | trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner'); | |
381 | trending_language.style.width=percentage+"%"; |
|
381 | trending_language.style.width=percentage+"%"; | |
382 | td2.appendChild(trending_language); |
|
382 | td2.appendChild(trending_language); | |
383 |
|
383 | |||
384 | tr.appendChild(td1); |
|
384 | tr.appendChild(td1); | |
385 | tr.appendChild(td2); |
|
385 | tr.appendChild(td2); | |
386 | tbl.appendChild(tr); |
|
386 | tbl.appendChild(tr); | |
387 | if(cnt == 3){ |
|
387 | if(cnt == 3){ | |
388 | var show_more = document.createElement('tr'); |
|
388 | var show_more = document.createElement('tr'); | |
389 | var td = document.createElement('td'); |
|
389 | var td = document.createElement('td'); | |
390 | lnk = document.createElement('a'); |
|
390 | lnk = document.createElement('a'); | |
391 |
|
391 | |||
392 | lnk.href='#'; |
|
392 | lnk.href='#'; | |
393 | lnk.innerHTML = "${_('show more')}"; |
|
393 | lnk.innerHTML = "${_('show more')}"; | |
394 | lnk.id='code_stats_show_more'; |
|
394 | lnk.id='code_stats_show_more'; | |
395 | td.appendChild(lnk); |
|
395 | td.appendChild(lnk); | |
396 |
|
396 | |||
397 | show_more.appendChild(td); |
|
397 | show_more.appendChild(td); | |
398 | show_more.appendChild(document.createElement('td')); |
|
398 | show_more.appendChild(document.createElement('td')); | |
399 | tbl.appendChild(show_more); |
|
399 | tbl.appendChild(show_more); | |
400 | } |
|
400 | } | |
401 |
|
401 | |||
402 | } |
|
402 | } | |
403 |
|
403 | |||
404 | YUD.get('lang_stats').appendChild(tbl); |
|
404 | YUD.get('lang_stats').appendChild(tbl); | |
405 | YUE.on('code_stats_show_more','click',function(){ |
|
405 | YUE.on('code_stats_show_more','click',function(){ | |
406 | l = YUD.getElementsByClassName('stats_hidden') |
|
406 | l = YUD.getElementsByClassName('stats_hidden') | |
407 | for (e in l){ |
|
407 | for (e in l){ | |
408 | YUD.setStyle(l[e],'display',''); |
|
408 | YUD.setStyle(l[e],'display',''); | |
409 | }; |
|
409 | }; | |
410 | YUD.setStyle(YUD.get('code_stats_show_more'), |
|
410 | YUD.setStyle(YUD.get('code_stats_show_more'), | |
411 | 'display','none'); |
|
411 | 'display','none'); | |
412 | }); |
|
412 | }); | |
413 | </script> |
|
413 | </script> | |
414 | <script type="text/javascript"> |
|
414 | <script type="text/javascript"> | |
415 | /** |
|
415 | /** | |
416 | * Plots summary graph |
|
416 | * Plots summary graph | |
417 | * |
|
417 | * | |
418 | * @class SummaryPlot |
|
418 | * @class SummaryPlot | |
419 | * @param {from} initial from for detailed graph |
|
419 | * @param {from} initial from for detailed graph | |
420 | * @param {to} initial to for detailed graph |
|
420 | * @param {to} initial to for detailed graph | |
421 | * @param {dataset} |
|
421 | * @param {dataset} | |
422 | * @param {overview_dataset} |
|
422 | * @param {overview_dataset} | |
423 | */ |
|
423 | */ | |
424 | function SummaryPlot(from,to,dataset,overview_dataset) { |
|
424 | function SummaryPlot(from,to,dataset,overview_dataset) { | |
425 | var initial_ranges = { |
|
425 | var initial_ranges = { | |
426 | "xaxis":{ |
|
426 | "xaxis":{ | |
427 | "from":from, |
|
427 | "from":from, | |
428 | "to":to, |
|
428 | "to":to, | |
429 | }, |
|
429 | }, | |
430 | }; |
|
430 | }; | |
431 | var dataset = dataset; |
|
431 | var dataset = dataset; | |
432 | var overview_dataset = [overview_dataset]; |
|
432 | var overview_dataset = [overview_dataset]; | |
433 | var choiceContainer = YUD.get("legend_choices"); |
|
433 | var choiceContainer = YUD.get("legend_choices"); | |
434 | var choiceContainerTable = YUD.get("legend_choices_tables"); |
|
434 | var choiceContainerTable = YUD.get("legend_choices_tables"); | |
435 | var plotContainer = YUD.get('commit_history'); |
|
435 | var plotContainer = YUD.get('commit_history'); | |
436 | var overviewContainer = YUD.get('overview'); |
|
436 | var overviewContainer = YUD.get('overview'); | |
437 |
|
437 | |||
438 | var plot_options = { |
|
438 | var plot_options = { | |
439 | bars: {show:true,align:'center',lineWidth:4}, |
|
439 | bars: {show:true,align:'center',lineWidth:4}, | |
440 | legend: {show:true, container:"legend_container"}, |
|
440 | legend: {show:true, container:"legend_container"}, | |
441 | points: {show:true,radius:0,fill:false}, |
|
441 | points: {show:true,radius:0,fill:false}, | |
442 | yaxis: {tickDecimals:0,}, |
|
442 | yaxis: {tickDecimals:0,}, | |
443 | xaxis: { |
|
443 | xaxis: { | |
444 | mode: "time", |
|
444 | mode: "time", | |
445 | timeformat: "%d/%m", |
|
445 | timeformat: "%d/%m", | |
446 | min:from, |
|
446 | min:from, | |
447 | max:to, |
|
447 | max:to, | |
448 | }, |
|
448 | }, | |
449 | grid: { |
|
449 | grid: { | |
450 | hoverable: true, |
|
450 | hoverable: true, | |
451 | clickable: true, |
|
451 | clickable: true, | |
452 | autoHighlight:true, |
|
452 | autoHighlight:true, | |
453 | color: "#999" |
|
453 | color: "#999" | |
454 | }, |
|
454 | }, | |
455 | //selection: {mode: "x"} |
|
455 | //selection: {mode: "x"} | |
456 | }; |
|
456 | }; | |
457 | var overview_options = { |
|
457 | var overview_options = { | |
458 | legend:{show:false}, |
|
458 | legend:{show:false}, | |
459 | bars: {show:true,barWidth: 2,}, |
|
459 | bars: {show:true,barWidth: 2,}, | |
460 | shadowSize: 0, |
|
460 | shadowSize: 0, | |
461 | xaxis: {mode: "time", timeformat: "%d/%m/%y",}, |
|
461 | xaxis: {mode: "time", timeformat: "%d/%m/%y",}, | |
462 | yaxis: {ticks: 3, min: 0,tickDecimals:0,}, |
|
462 | yaxis: {ticks: 3, min: 0,tickDecimals:0,}, | |
463 | grid: {color: "#999",}, |
|
463 | grid: {color: "#999",}, | |
464 | selection: {mode: "x"} |
|
464 | selection: {mode: "x"} | |
465 | }; |
|
465 | }; | |
466 |
|
466 | |||
467 | /** |
|
467 | /** | |
468 | *get dummy data needed in few places |
|
468 | *get dummy data needed in few places | |
469 | */ |
|
469 | */ | |
470 | function getDummyData(label){ |
|
470 | function getDummyData(label){ | |
471 | return {"label":label, |
|
471 | return {"label":label, | |
472 | "data":[{"time":0, |
|
472 | "data":[{"time":0, | |
473 | "commits":0, |
|
473 | "commits":0, | |
474 | "added":0, |
|
474 | "added":0, | |
475 | "changed":0, |
|
475 | "changed":0, | |
476 | "removed":0, |
|
476 | "removed":0, | |
477 | }], |
|
477 | }], | |
478 | "schema":["commits"], |
|
478 | "schema":["commits"], | |
479 | "color":'#ffffff', |
|
479 | "color":'#ffffff', | |
480 | } |
|
480 | } | |
481 | } |
|
481 | } | |
482 |
|
482 | |||
483 | /** |
|
483 | /** | |
484 | * generate checkboxes accordindly to data |
|
484 | * generate checkboxes accordindly to data | |
485 | * @param keys |
|
485 | * @param keys | |
486 | * @returns |
|
486 | * @returns | |
487 | */ |
|
487 | */ | |
488 | function generateCheckboxes(data) { |
|
488 | function generateCheckboxes(data) { | |
489 | //append checkboxes |
|
489 | //append checkboxes | |
490 | var i = 0; |
|
490 | var i = 0; | |
491 | choiceContainerTable.innerHTML = ''; |
|
491 | choiceContainerTable.innerHTML = ''; | |
492 | for(var pos in data) { |
|
492 | for(var pos in data) { | |
493 |
|
493 | |||
494 | data[pos].color = i; |
|
494 | data[pos].color = i; | |
495 | i++; |
|
495 | i++; | |
496 | if(data[pos].label != ''){ |
|
496 | if(data[pos].label != ''){ | |
497 | choiceContainerTable.innerHTML += |
|
497 | choiceContainerTable.innerHTML += | |
498 | '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \ |
|
498 | '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \ | |
499 | <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label); |
|
499 | <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label); | |
500 | } |
|
500 | } | |
501 | } |
|
501 | } | |
502 | } |
|
502 | } | |
503 |
|
503 | |||
504 | /** |
|
504 | /** | |
505 | * ToolTip show |
|
505 | * ToolTip show | |
506 | */ |
|
506 | */ | |
507 | function showTooltip(x, y, contents) { |
|
507 | function showTooltip(x, y, contents) { | |
508 | var div=document.getElementById('tooltip'); |
|
508 | var div=document.getElementById('tooltip'); | |
509 | if(!div) { |
|
509 | if(!div) { | |
510 | div = document.createElement('div'); |
|
510 | div = document.createElement('div'); | |
511 | div.id="tooltip"; |
|
511 | div.id="tooltip"; | |
512 | div.style.position="absolute"; |
|
512 | div.style.position="absolute"; | |
513 | div.style.border='1px solid #fdd'; |
|
513 | div.style.border='1px solid #fdd'; | |
514 | div.style.padding='2px'; |
|
514 | div.style.padding='2px'; | |
515 | div.style.backgroundColor='#fee'; |
|
515 | div.style.backgroundColor='#fee'; | |
516 | document.body.appendChild(div); |
|
516 | document.body.appendChild(div); | |
517 | } |
|
517 | } | |
518 | YUD.setStyle(div, 'opacity', 0); |
|
518 | YUD.setStyle(div, 'opacity', 0); | |
519 | div.innerHTML = contents; |
|
519 | div.innerHTML = contents; | |
520 | div.style.top=(y + 5) + "px"; |
|
520 | div.style.top=(y + 5) + "px"; | |
521 | div.style.left=(x + 5) + "px"; |
|
521 | div.style.left=(x + 5) + "px"; | |
522 |
|
522 | |||
523 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); |
|
523 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); | |
524 | anim.animate(); |
|
524 | anim.animate(); | |
525 | } |
|
525 | } | |
526 |
|
526 | |||
527 | /** |
|
527 | /** | |
528 | * This function will detect if selected period has some changesets |
|
528 | * This function will detect if selected period has some changesets | |
529 | for this user if it does this data is then pushed for displaying |
|
529 | for this user if it does this data is then pushed for displaying | |
530 | Additionally it will only display users that are selected by the checkbox |
|
530 | Additionally it will only display users that are selected by the checkbox | |
531 | */ |
|
531 | */ | |
532 | function getDataAccordingToRanges(ranges) { |
|
532 | function getDataAccordingToRanges(ranges) { | |
533 |
|
533 | |||
534 | var data = []; |
|
534 | var data = []; | |
535 | var new_dataset = {}; |
|
535 | var new_dataset = {}; | |
536 | var keys = []; |
|
536 | var keys = []; | |
537 | var max_commits = 0; |
|
537 | var max_commits = 0; | |
538 | for(var key in dataset){ |
|
538 | for(var key in dataset){ | |
539 |
|
539 | |||
540 | for(var ds in dataset[key].data){ |
|
540 | for(var ds in dataset[key].data){ | |
541 | commit_data = dataset[key].data[ds]; |
|
541 | commit_data = dataset[key].data[ds]; | |
542 | if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){ |
|
542 | if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){ | |
543 |
|
543 | |||
544 | if(new_dataset[key] === undefined){ |
|
544 | if(new_dataset[key] === undefined){ | |
545 | new_dataset[key] = {data:[],schema:["commits"],label:key}; |
|
545 | new_dataset[key] = {data:[],schema:["commits"],label:key}; | |
546 | } |
|
546 | } | |
547 | new_dataset[key].data.push(commit_data); |
|
547 | new_dataset[key].data.push(commit_data); | |
548 | } |
|
548 | } | |
549 | } |
|
549 | } | |
550 | if (new_dataset[key] !== undefined){ |
|
550 | if (new_dataset[key] !== undefined){ | |
551 | data.push(new_dataset[key]); |
|
551 | data.push(new_dataset[key]); | |
552 | } |
|
552 | } | |
553 | } |
|
553 | } | |
554 |
|
554 | |||
555 | if (data.length > 0){ |
|
555 | if (data.length > 0){ | |
556 | return data; |
|
556 | return data; | |
557 | } |
|
557 | } | |
558 | else{ |
|
558 | else{ | |
559 | //just return dummy data for graph to plot itself |
|
559 | //just return dummy data for graph to plot itself | |
560 | return [getDummyData('')]; |
|
560 | return [getDummyData('')]; | |
561 | } |
|
561 | } | |
562 | } |
|
562 | } | |
563 |
|
563 | |||
564 | /** |
|
564 | /** | |
565 | * redraw using new checkbox data |
|
565 | * redraw using new checkbox data | |
566 | */ |
|
566 | */ | |
567 | function plotchoiced(e,args){ |
|
567 | function plotchoiced(e,args){ | |
568 | var cur_data = args[0]; |
|
568 | var cur_data = args[0]; | |
569 | var cur_ranges = args[1]; |
|
569 | var cur_ranges = args[1]; | |
570 |
|
570 | |||
571 | var new_data = []; |
|
571 | var new_data = []; | |
572 | var inputs = choiceContainer.getElementsByTagName("input"); |
|
572 | var inputs = choiceContainer.getElementsByTagName("input"); | |
573 |
|
573 | |||
574 | //show only checked labels |
|
574 | //show only checked labels | |
575 | for(var i=0; i<inputs.length; i++) { |
|
575 | for(var i=0; i<inputs.length; i++) { | |
576 | var checkbox_key = inputs[i].name; |
|
576 | var checkbox_key = inputs[i].name; | |
577 |
|
577 | |||
578 | if(inputs[i].checked){ |
|
578 | if(inputs[i].checked){ | |
579 | for(var d in cur_data){ |
|
579 | for(var d in cur_data){ | |
580 | if(cur_data[d].label == checkbox_key){ |
|
580 | if(cur_data[d].label == checkbox_key){ | |
581 | new_data.push(cur_data[d]); |
|
581 | new_data.push(cur_data[d]); | |
582 | } |
|
582 | } | |
583 | } |
|
583 | } | |
584 | } |
|
584 | } | |
585 | else{ |
|
585 | else{ | |
586 | //push dummy data to not hide the label |
|
586 | //push dummy data to not hide the label | |
587 | new_data.push(getDummyData(checkbox_key)); |
|
587 | new_data.push(getDummyData(checkbox_key)); | |
588 | } |
|
588 | } | |
589 | } |
|
589 | } | |
590 |
|
590 | |||
591 | var new_options = YAHOO.lang.merge(plot_options, { |
|
591 | var new_options = YAHOO.lang.merge(plot_options, { | |
592 | xaxis: { |
|
592 | xaxis: { | |
593 | min: cur_ranges.xaxis.from, |
|
593 | min: cur_ranges.xaxis.from, | |
594 | max: cur_ranges.xaxis.to, |
|
594 | max: cur_ranges.xaxis.to, | |
595 | mode:"time", |
|
595 | mode:"time", | |
596 | timeformat: "%d/%m", |
|
596 | timeformat: "%d/%m", | |
597 | }, |
|
597 | }, | |
598 | }); |
|
598 | }); | |
599 | if (!new_data){ |
|
599 | if (!new_data){ | |
600 | new_data = [[0,1]]; |
|
600 | new_data = [[0,1]]; | |
601 | } |
|
601 | } | |
602 | // do the zooming |
|
602 | // do the zooming | |
603 | plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); |
|
603 | plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); | |
604 |
|
604 | |||
605 | plot.subscribe("plotselected", plotselected); |
|
605 | plot.subscribe("plotselected", plotselected); | |
606 |
|
606 | |||
607 | //resubscribe plothover |
|
607 | //resubscribe plothover | |
608 | plot.subscribe("plothover", plothover); |
|
608 | plot.subscribe("plothover", plothover); | |
609 |
|
609 | |||
610 | // don't fire event on the overview to prevent eternal loop |
|
610 | // don't fire event on the overview to prevent eternal loop | |
611 | overview.setSelection(cur_ranges, true); |
|
611 | overview.setSelection(cur_ranges, true); | |
612 |
|
612 | |||
613 | } |
|
613 | } | |
614 |
|
614 | |||
615 | /** |
|
615 | /** | |
616 | * plot only selected items from overview |
|
616 | * plot only selected items from overview | |
617 | * @param ranges |
|
617 | * @param ranges | |
618 | * @returns |
|
618 | * @returns | |
619 | */ |
|
619 | */ | |
620 | function plotselected(ranges,cur_data) { |
|
620 | function plotselected(ranges,cur_data) { | |
621 | //updates the data for new plot |
|
621 | //updates the data for new plot | |
622 | var data = getDataAccordingToRanges(ranges); |
|
622 | var data = getDataAccordingToRanges(ranges); | |
623 | generateCheckboxes(data); |
|
623 | generateCheckboxes(data); | |
624 |
|
624 | |||
625 | var new_options = YAHOO.lang.merge(plot_options, { |
|
625 | var new_options = YAHOO.lang.merge(plot_options, { | |
626 | xaxis: { |
|
626 | xaxis: { | |
627 | min: ranges.xaxis.from, |
|
627 | min: ranges.xaxis.from, | |
628 | max: ranges.xaxis.to, |
|
628 | max: ranges.xaxis.to, | |
629 | mode:"time", |
|
629 | mode:"time", | |
630 | timeformat: "%d/%m", |
|
630 | timeformat: "%d/%m", | |
631 | }, |
|
631 | }, | |
632 | }); |
|
632 | }); | |
633 | // do the zooming |
|
633 | // do the zooming | |
634 | plot = YAHOO.widget.Flot(plotContainer, data, new_options); |
|
634 | plot = YAHOO.widget.Flot(plotContainer, data, new_options); | |
635 |
|
635 | |||
636 | plot.subscribe("plotselected", plotselected); |
|
636 | plot.subscribe("plotselected", plotselected); | |
637 |
|
637 | |||
638 | //resubscribe plothover |
|
638 | //resubscribe plothover | |
639 | plot.subscribe("plothover", plothover); |
|
639 | plot.subscribe("plothover", plothover); | |
640 |
|
640 | |||
641 | // don't fire event on the overview to prevent eternal loop |
|
641 | // don't fire event on the overview to prevent eternal loop | |
642 | overview.setSelection(ranges, true); |
|
642 | overview.setSelection(ranges, true); | |
643 |
|
643 | |||
644 | //resubscribe choiced |
|
644 | //resubscribe choiced | |
645 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]); |
|
645 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]); | |
646 | } |
|
646 | } | |
647 |
|
647 | |||
648 | var previousPoint = null; |
|
648 | var previousPoint = null; | |
649 |
|
649 | |||
650 | function plothover(o) { |
|
650 | function plothover(o) { | |
651 | var pos = o.pos; |
|
651 | var pos = o.pos; | |
652 | var item = o.item; |
|
652 | var item = o.item; | |
653 |
|
653 | |||
654 | //YUD.get("x").innerHTML = pos.x.toFixed(2); |
|
654 | //YUD.get("x").innerHTML = pos.x.toFixed(2); | |
655 | //YUD.get("y").innerHTML = pos.y.toFixed(2); |
|
655 | //YUD.get("y").innerHTML = pos.y.toFixed(2); | |
656 | if (item) { |
|
656 | if (item) { | |
657 | if (previousPoint != item.datapoint) { |
|
657 | if (previousPoint != item.datapoint) { | |
658 | previousPoint = item.datapoint; |
|
658 | previousPoint = item.datapoint; | |
659 |
|
659 | |||
660 | var tooltip = YUD.get("tooltip"); |
|
660 | var tooltip = YUD.get("tooltip"); | |
661 | if(tooltip) { |
|
661 | if(tooltip) { | |
662 | tooltip.parentNode.removeChild(tooltip); |
|
662 | tooltip.parentNode.removeChild(tooltip); | |
663 | } |
|
663 | } | |
664 | var x = item.datapoint.x.toFixed(2); |
|
664 | var x = item.datapoint.x.toFixed(2); | |
665 | var y = item.datapoint.y.toFixed(2); |
|
665 | var y = item.datapoint.y.toFixed(2); | |
666 |
|
666 | |||
667 | if (!item.series.label){ |
|
667 | if (!item.series.label){ | |
668 | item.series.label = 'commits'; |
|
668 | item.series.label = 'commits'; | |
669 | } |
|
669 | } | |
670 | var d = new Date(x*1000); |
|
670 | var d = new Date(x*1000); | |
671 | var fd = d.toDateString() |
|
671 | var fd = d.toDateString() | |
672 | var nr_commits = parseInt(y); |
|
672 | var nr_commits = parseInt(y); | |
673 |
|
673 | |||
674 | var cur_data = dataset[item.series.label].data[item.dataIndex]; |
|
674 | var cur_data = dataset[item.series.label].data[item.dataIndex]; | |
675 | var added = cur_data.added; |
|
675 | var added = cur_data.added; | |
676 | var changed = cur_data.changed; |
|
676 | var changed = cur_data.changed; | |
677 | var removed = cur_data.removed; |
|
677 | var removed = cur_data.removed; | |
678 |
|
678 | |||
679 | var nr_commits_suffix = " ${_('commits')} "; |
|
679 | var nr_commits_suffix = " ${_('commits')} "; | |
680 | var added_suffix = " ${_('files added')} "; |
|
680 | var added_suffix = " ${_('files added')} "; | |
681 | var changed_suffix = " ${_('files changed')} "; |
|
681 | var changed_suffix = " ${_('files changed')} "; | |
682 | var removed_suffix = " ${_('files removed')} "; |
|
682 | var removed_suffix = " ${_('files removed')} "; | |
683 |
|
683 | |||
684 |
|
684 | |||
685 | if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";} |
|
685 | if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";} | |
686 | if(added==1){added_suffix=" ${_('file added')} ";} |
|
686 | if(added==1){added_suffix=" ${_('file added')} ";} | |
687 | if(changed==1){changed_suffix=" ${_('file changed')} ";} |
|
687 | if(changed==1){changed_suffix=" ${_('file changed')} ";} | |
688 | if(removed==1){removed_suffix=" ${_('file removed')} ";} |
|
688 | if(removed==1){removed_suffix=" ${_('file removed')} ";} | |
689 |
|
689 | |||
690 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd |
|
690 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd | |
691 | +'<br/>'+ |
|
691 | +'<br/>'+ | |
692 | nr_commits + nr_commits_suffix+'<br/>'+ |
|
692 | nr_commits + nr_commits_suffix+'<br/>'+ | |
693 | added + added_suffix +'<br/>'+ |
|
693 | added + added_suffix +'<br/>'+ | |
694 | changed + changed_suffix + '<br/>'+ |
|
694 | changed + changed_suffix + '<br/>'+ | |
695 | removed + removed_suffix + '<br/>'); |
|
695 | removed + removed_suffix + '<br/>'); | |
696 | } |
|
696 | } | |
697 | } |
|
697 | } | |
698 | else { |
|
698 | else { | |
699 | var tooltip = YUD.get("tooltip"); |
|
699 | var tooltip = YUD.get("tooltip"); | |
700 |
|
700 | |||
701 | if(tooltip) { |
|
701 | if(tooltip) { | |
702 | tooltip.parentNode.removeChild(tooltip); |
|
702 | tooltip.parentNode.removeChild(tooltip); | |
703 | } |
|
703 | } | |
704 | previousPoint = null; |
|
704 | previousPoint = null; | |
705 | } |
|
705 | } | |
706 | } |
|
706 | } | |
707 |
|
707 | |||
708 | /** |
|
708 | /** | |
709 | * MAIN EXECUTION |
|
709 | * MAIN EXECUTION | |
710 | */ |
|
710 | */ | |
711 |
|
711 | |||
712 | var data = getDataAccordingToRanges(initial_ranges); |
|
712 | var data = getDataAccordingToRanges(initial_ranges); | |
713 | generateCheckboxes(data); |
|
713 | generateCheckboxes(data); | |
714 |
|
714 | |||
715 | //main plot |
|
715 | //main plot | |
716 | var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); |
|
716 | var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); | |
717 |
|
717 | |||
718 | //overview |
|
718 | //overview | |
719 | var overview = YAHOO.widget.Flot(overviewContainer, |
|
719 | var overview = YAHOO.widget.Flot(overviewContainer, | |
720 | overview_dataset, overview_options); |
|
720 | overview_dataset, overview_options); | |
721 |
|
721 | |||
722 | //show initial selection on overview |
|
722 | //show initial selection on overview | |
723 | overview.setSelection(initial_ranges); |
|
723 | overview.setSelection(initial_ranges); | |
724 |
|
724 | |||
725 | plot.subscribe("plotselected", plotselected); |
|
725 | plot.subscribe("plotselected", plotselected); | |
726 | plot.subscribe("plothover", plothover) |
|
726 | plot.subscribe("plothover", plothover) | |
727 |
|
727 | |||
728 | overview.subscribe("plotselected", function (ranges) { |
|
728 | overview.subscribe("plotselected", function (ranges) { | |
729 | plot.setSelection(ranges); |
|
729 | plot.setSelection(ranges); | |
730 | }); |
|
730 | }); | |
731 |
|
731 | |||
732 | // user choices on overview |
|
732 | // user choices on overview | |
733 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]); |
|
733 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]); | |
734 | } |
|
734 | } | |
735 | SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n}); |
|
735 | SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n}); | |
736 | </script> |
|
736 | </script> | |
737 | %endif |
|
737 | %endif | |
738 |
|
738 | |||
739 | </%def> |
|
739 | </%def> |
@@ -1,90 +1,90 | |||||
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} |
|
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 | ${_('Tags')} |
|
11 | ${_('Tags')} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 | ${self.menu('tags')} |
|
15 | ${self.menu('tags')} | |
16 | </%def> |
|
16 | </%def> | |
17 | <%def name="main()"> |
|
17 | <%def name="main()"> | |
18 | ${self.context_bar('switch-to')} |
|
18 | ${self.context_bar('switch-to')} | |
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 | <!-- end box / title --> |
|
24 | <!-- end box / title --> | |
25 | %if c.repo_tags: |
|
25 | %if c.repo_tags: | |
26 | <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare tags')}</a></div> |
|
26 | <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare tags')}</a></div> | |
27 | %endif |
|
27 | %endif | |
28 | <div class="table"> |
|
28 | <div class="table"> | |
29 | <%include file='tags_data.html'/> |
|
29 | <%include file='tags_data.html'/> | |
30 | </div> |
|
30 | </div> | |
31 | </div> |
|
31 | </div> | |
32 | <script type="text/javascript"> |
|
32 | <script type="text/javascript"> | |
33 | YUE.on('compare_tags','click',function(e){ |
|
33 | YUE.on('compare_tags','click',function(e){ | |
34 | YUE.preventDefault(e); |
|
34 | YUE.preventDefault(e); | |
35 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
35 | var org = YUQ('input[name=compare_org]:checked')[0]; | |
36 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
36 | var other = YUQ('input[name=compare_other]:checked')[0]; | |
37 |
|
37 | |||
38 | if(org && other){ |
|
38 | if(org && other){ | |
39 | 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__')}"; |
|
39 | 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__')}"; | |
40 | var u = compare_url.replace('__ORG__',org.value) |
|
40 | var u = compare_url.replace('__ORG__',org.value) | |
41 | .replace('__OTHER__',other.value); |
|
41 | .replace('__OTHER__',other.value); | |
42 | window.location=u; |
|
42 | window.location=u; | |
43 | } |
|
43 | } | |
44 | }); |
|
44 | }); | |
45 |
|
45 | |||
46 | // main table sorting |
|
46 | // main table sorting | |
47 | var myColumnDefs = [ |
|
47 | var myColumnDefs = [ | |
48 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
48 | {key:"name",label:"${_('Name')}",sortable:true}, | |
49 | {key:"date",label:"${_('Date')}",sortable:true, |
|
49 | {key:"date",label:"${_('Date')}",sortable:true, | |
50 | sortOptions: { sortFunction: dateSort }}, |
|
50 | sortOptions: { sortFunction: dateSort }}, | |
51 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
51 | {key:"author",label:"${_('Author')}",sortable:true}, | |
52 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
52 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
53 | sortOptions: { sortFunction: revisionSort }}, |
|
53 | sortOptions: { sortFunction: revisionSort }}, | |
54 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
54 | {key:"compare",label:"${_('Compare')}",sortable:false,}, | |
55 | ]; |
|
55 | ]; | |
56 |
|
56 | |||
57 | var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data")); |
|
57 | var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data")); | |
58 |
|
58 | |||
59 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
59 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
60 |
|
60 | |||
61 | myDataSource.responseSchema = { |
|
61 | myDataSource.responseSchema = { | |
62 | fields: [ |
|
62 | fields: [ | |
63 | {key:"name"}, |
|
63 | {key:"name"}, | |
64 | {key:"date"}, |
|
64 | {key:"date"}, | |
65 | {key:"author"}, |
|
65 | {key:"author"}, | |
66 | {key:"revision"}, |
|
66 | {key:"revision"}, | |
67 | {key:"compare"}, |
|
67 | {key:"compare"}, | |
68 | ] |
|
68 | ] | |
69 | }; |
|
69 | }; | |
70 |
|
70 | |||
71 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
71 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
72 | { |
|
72 | { | |
73 | sortedBy:{key:"name",dir:"asc"}, |
|
73 | sortedBy:{key:"name",dir:"asc"}, | |
74 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
74 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
75 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
75 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
76 | MSG_EMPTY:"${_('No records found.')}", |
|
76 | MSG_EMPTY:"${_('No records found.')}", | |
77 | MSG_ERROR:"${_('Data error.')}", |
|
77 | MSG_ERROR:"${_('Data error.')}", | |
78 | MSG_LOADING:"${_('Loading...')}", |
|
78 | MSG_LOADING:"${_('Loading...')}", | |
79 | } |
|
79 | } | |
80 | ); |
|
80 | ); | |
81 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
81 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
82 | tooltip_activate(); |
|
82 | tooltip_activate(); | |
83 | var func = function(node){ |
|
83 | var func = function(node){ | |
84 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
84 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
85 | } |
|
85 | } | |
86 | q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func); |
|
86 | q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func); | |
87 | }); |
|
87 | }); | |
88 |
|
88 | |||
89 | </script> |
|
89 | </script> | |
90 | </%def> |
|
90 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now