Show More
@@ -1,55 +1,55 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Admin journal')} |
|
|
5 | ${_('Admin journal')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | <form id="filter_form"> |
|
10 | 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 | 11 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> |
|
12 | 12 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> |
|
13 | 13 | ${_('Admin journal')} - ${ungettext('%s entry', '%s entries', c.users_log.item_count) % (c.users_log.item_count)} |
|
14 | 14 | </form> |
|
15 | 15 | ${h.end_form()} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="page_nav()"> |
|
19 | 19 | ${self.menu('admin')} |
|
20 | 20 | </%def> |
|
21 | 21 | <%def name="main()"> |
|
22 | 22 | <div class="box"> |
|
23 | 23 | <!-- box / title --> |
|
24 | 24 | <div class="title"> |
|
25 | 25 | ${self.breadcrumbs()} |
|
26 | 26 | </div> |
|
27 | 27 | <!-- end box / title --> |
|
28 | 28 | <div class="table"> |
|
29 | 29 | <div id="user_log"> |
|
30 | 30 | ${c.log_data} |
|
31 | 31 | </div> |
|
32 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | |
|
35 | 35 | <script> |
|
36 | 36 | YUE.on('j_filter','click',function(){ |
|
37 | 37 | var jfilter = YUD.get('j_filter'); |
|
38 | 38 | if(YUD.hasClass(jfilter, 'initial')){ |
|
39 | 39 | jfilter.value = ''; |
|
40 | 40 | } |
|
41 | 41 | }); |
|
42 | 42 | var fix_j_filter_width = function(len){ |
|
43 | 43 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); |
|
44 | 44 | } |
|
45 | 45 | YUE.on('j_filter','keyup',function(){ |
|
46 | 46 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
47 | 47 | }); |
|
48 | 48 | YUE.on('filter_form','submit',function(e){ |
|
49 | 49 | YUE.preventDefault(e) |
|
50 | 50 | var val = YUD.get('j_filter').value; |
|
51 | 51 | window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val); |
|
52 | 52 | }); |
|
53 | 53 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
54 | 54 | </script> |
|
55 | 55 | </%def> |
@@ -1,93 +1,93 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Repositories defaults')} |
|
|
5 | ${_('Repositories defaults')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 | 11 | ${_('defaults')} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | |
|
25 | 25 | <h3>${_('Repositories defaults')}</h3> |
|
26 | 26 | |
|
27 | 27 | ${h.form(url('default', id='defaults'),method='put')} |
|
28 | 28 | <div class="form"> |
|
29 | 29 | <!-- fields --> |
|
30 | 30 | |
|
31 | 31 | <div class="fields"> |
|
32 | 32 | |
|
33 | 33 | <div class="field"> |
|
34 | 34 | <div class="label"> |
|
35 | 35 | <label for="default_repo_type">${_('Type')}:</label> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="input"> |
|
38 | 38 | ${h.select('default_repo_type','hg',c.backends,class_="medium")} |
|
39 | 39 | </div> |
|
40 | 40 | </div> |
|
41 | 41 | |
|
42 | 42 | <div class="field"> |
|
43 | 43 | <div class="label label-checkbox"> |
|
44 | 44 | <label for="default_repo_private">${_('Private repository')}:</label> |
|
45 | 45 | </div> |
|
46 | 46 | <div class="checkboxes"> |
|
47 | 47 | ${h.checkbox('default_repo_private',value="True")} |
|
48 | 48 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
49 | 49 | </div> |
|
50 | 50 | </div> |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | <div class="field"> |
|
54 | 54 | <div class="label label-checkbox"> |
|
55 | 55 | <label for="default_repo_enable_statistics">${_('Enable statistics')}:</label> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="checkboxes"> |
|
58 | 58 | ${h.checkbox('default_repo_enable_statistics',value="True")} |
|
59 | 59 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
60 | 60 | </div> |
|
61 | 61 | </div> |
|
62 | 62 | |
|
63 | 63 | <div class="field"> |
|
64 | 64 | <div class="label label-checkbox"> |
|
65 | 65 | <label for="default_repo_enable_downloads">${_('Enable downloads')}:</label> |
|
66 | 66 | </div> |
|
67 | 67 | <div class="checkboxes"> |
|
68 | 68 | ${h.checkbox('default_repo_enable_downloads',value="True")} |
|
69 | 69 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
70 | 70 | </div> |
|
71 | 71 | </div> |
|
72 | 72 | |
|
73 | 73 | <div class="field"> |
|
74 | 74 | <div class="label label-checkbox"> |
|
75 | 75 | <label for="default_repo_enable_locking">${_('Enable locking')}:</label> |
|
76 | 76 | </div> |
|
77 | 77 | <div class="checkboxes"> |
|
78 | 78 | ${h.checkbox('default_repo_enable_locking',value="True")} |
|
79 | 79 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
80 | 80 | </div> |
|
81 | 81 | </div> |
|
82 | 82 | |
|
83 | 83 | <div class="buttons"> |
|
84 | 84 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
85 | 85 | </div> |
|
86 | 86 | </div> |
|
87 | 87 | </div> |
|
88 | 88 | ${h.end_form()} |
|
89 | 89 | |
|
90 | 90 | ##<h3>${_('Groups defaults')}</h3> |
|
91 | 91 | |
|
92 | 92 | </div> |
|
93 | 93 | </%def> |
@@ -1,95 +1,95 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('LDAP administration')} |
|
|
5 | ${_('LDAP administration')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 | 11 | ${_('ldap')} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | ${h.form(url('ldap_settings'))} |
|
25 | 25 | <div class="form"> |
|
26 | 26 | <div class="fields"> |
|
27 | 27 | |
|
28 | 28 | <h3>${_('Connection settings')}</h3> |
|
29 | 29 | <div class="field"> |
|
30 | 30 | <div class="label label-checkbox"><label for="ldap_active">${_('Enable LDAP')}</label></div> |
|
31 | 31 | <div class="checkboxes"><div class="checkbox">${h.checkbox('ldap_active',True,class_='small')}</div></div> |
|
32 | 32 | </div> |
|
33 | 33 | <div class="field"> |
|
34 | 34 | <div class="label"><label for="ldap_host">${_('Host')}</label></div> |
|
35 | 35 | <div class="input">${h.text('ldap_host',class_='small')}</div> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="field"> |
|
38 | 38 | <div class="label"><label for="ldap_port">${_('Port')}</label></div> |
|
39 | 39 | <div class="input">${h.text('ldap_port',class_='small')}</div> |
|
40 | 40 | </div> |
|
41 | 41 | <div class="field"> |
|
42 | 42 | <div class="label"><label for="ldap_dn_user">${_('Account')}</label></div> |
|
43 | 43 | <div class="input">${h.text('ldap_dn_user',class_='small')}</div> |
|
44 | 44 | </div> |
|
45 | 45 | <div class="field"> |
|
46 | 46 | <div class="label"><label for="ldap_dn_pass">${_('Password')}</label></div> |
|
47 | 47 | <div class="input">${h.password('ldap_dn_pass',class_='small')}</div> |
|
48 | 48 | </div> |
|
49 | 49 | <div class="field"> |
|
50 | 50 | <div class="label"><label for="ldap_tls_kind">${_('Connection security')}</label></div> |
|
51 | 51 | <div class="select">${h.select('ldap_tls_kind',c.tls_kind_cur,c.tls_kind_choices,class_='small')}</div> |
|
52 | 52 | </div> |
|
53 | 53 | <div class="field"> |
|
54 | 54 | <div class="label"><label for="ldap_tls_reqcert">${_('Certificate Checks')}</label></div> |
|
55 | 55 | <div class="select">${h.select('ldap_tls_reqcert',c.tls_reqcert_cur,c.tls_reqcert_choices,class_='small')}</div> |
|
56 | 56 | </div> |
|
57 | 57 | <h3>${_('Search settings')}</h3> |
|
58 | 58 | <div class="field"> |
|
59 | 59 | <div class="label"><label for="ldap_base_dn">${_('Base DN')}</label></div> |
|
60 | 60 | <div class="input">${h.text('ldap_base_dn',class_='small')}</div> |
|
61 | 61 | </div> |
|
62 | 62 | <div class="field"> |
|
63 | 63 | <div class="label"><label for="ldap_filter">${_('LDAP Filter')}</label></div> |
|
64 | 64 | <div class="input">${h.text('ldap_filter',class_='small')}</div> |
|
65 | 65 | </div> |
|
66 | 66 | <div class="field"> |
|
67 | 67 | <div class="label"><label for="ldap_search_scope">${_('LDAP Search Scope')}</label></div> |
|
68 | 68 | <div class="select">${h.select('ldap_search_scope',c.search_scope_cur,c.search_scope_choices,class_='small')}</div> |
|
69 | 69 | </div> |
|
70 | 70 | <h3>${_('Attribute mappings')}</h3> |
|
71 | 71 | <div class="field"> |
|
72 | 72 | <div class="label"><label for="ldap_attr_login">${_('Login Attribute')}</label></div> |
|
73 | 73 | <div class="input">${h.text('ldap_attr_login',class_='small')}</div> |
|
74 | 74 | </div> |
|
75 | 75 | <div class="field"> |
|
76 | 76 | <div class="label"><label for="ldap_attr_firstname">${_('First Name Attribute')}</label></div> |
|
77 | 77 | <div class="input">${h.text('ldap_attr_firstname',class_='small')}</div> |
|
78 | 78 | </div> |
|
79 | 79 | <div class="field"> |
|
80 | 80 | <div class="label"><label for="ldap_attr_lastname">${_('Last Name Attribute')}</label></div> |
|
81 | 81 | <div class="input">${h.text('ldap_attr_lastname',class_='small')}</div> |
|
82 | 82 | </div> |
|
83 | 83 | <div class="field"> |
|
84 | 84 | <div class="label"><label for="ldap_attr_email">${_('E-mail Attribute')}</label></div> |
|
85 | 85 | <div class="input">${h.text('ldap_attr_email',class_='small')}</div> |
|
86 | 86 | </div> |
|
87 | 87 | |
|
88 | 88 | <div class="buttons"> |
|
89 | 89 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
|
92 | 92 | </div> |
|
93 | 93 | ${h.end_form()} |
|
94 | 94 | </div> |
|
95 | 95 | </%def> |
@@ -1,65 +1,65 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('My Notifications')} ${c.rhodecode_user.username} |
|
|
5 | ${_('My Notifications')} ${c.rhodecode_user.username} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${_('My Notifications')} |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="page_nav()"> |
|
13 | 13 | ${self.menu('admin')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="main()"> |
|
17 | 17 | <div class="box"> |
|
18 | 18 | <!-- box / title --> |
|
19 | 19 | <div class="title"> |
|
20 | 20 | ${self.breadcrumbs()} |
|
21 | 21 | ##<ul class="links"> |
|
22 | 22 | ## <li> |
|
23 | 23 | ## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> |
|
24 | 24 | ## </li> |
|
25 | 25 | ##</ul> |
|
26 | 26 | </div> |
|
27 | 27 | |
|
28 | 28 | <div style="padding:14px 18px;text-align: right;float:left"> |
|
29 | 29 | <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span> |
|
30 | 30 | <span id='comment' class="ui-btn"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> |
|
31 | 31 | <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span> |
|
32 | 32 | </div> |
|
33 | 33 | %if c.notifications: |
|
34 | 34 | <div style="padding:14px 18px;text-align: right;float:right"> |
|
35 | 35 | <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span> |
|
36 | 36 | </div> |
|
37 | 37 | %endif |
|
38 | 38 | <div id='notification_data'> |
|
39 | 39 | <%include file='notifications_data.html'/> |
|
40 | 40 | </div> |
|
41 | 41 | </div> |
|
42 | 42 | <script type="text/javascript"> |
|
43 | 43 | var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; |
|
44 | 44 | var run = function(){ |
|
45 | 45 | YUE.on(YUQ('.delete-notification'),'click',function(e){ |
|
46 | 46 | var notification_id = e.currentTarget.id; |
|
47 | 47 | deleteNotification(url_action,notification_id) |
|
48 | 48 | }) |
|
49 | 49 | YUE.on(YUQ('.read-notification'),'click',function(e){ |
|
50 | 50 | var notification_id = e.currentTarget.id; |
|
51 | 51 | readNotification(url_action,notification_id) |
|
52 | 52 | }) |
|
53 | 53 | } |
|
54 | 54 | run() |
|
55 | 55 | YUE.on('mark_all_read','click',function(e){ |
|
56 | 56 | var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}"; |
|
57 | 57 | ypjax(url,'notification_data',function(){run()}); |
|
58 | 58 | }) |
|
59 | 59 | |
|
60 | 60 | var current_filter = "${c.current_filter}"; |
|
61 | 61 | if (YUD.get(current_filter)){ |
|
62 | 62 | YUD.addClass(current_filter, 'active'); |
|
63 | 63 | } |
|
64 | 64 | </script> |
|
65 | 65 | </%def> |
@@ -1,59 +1,59 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Show notification')} ${c.rhodecode_user.username} |
|
|
5 | ${_('Show notification')} ${c.rhodecode_user.username} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Notifications'),h.url('notifications'))} |
|
10 | 10 | » |
|
11 | 11 | ${_('Show notification')} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | ##<ul class="links"> |
|
24 | 24 | ## <li> |
|
25 | 25 | ## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> |
|
26 | 26 | ## </li> |
|
27 | 27 | ##</ul> |
|
28 | 28 | </div> |
|
29 | 29 | <div class="table"> |
|
30 | 30 | <div id="notification_${c.notification.notification_id}"> |
|
31 | 31 | <div class="notification-header"> |
|
32 | 32 | <div class="gravatar"> |
|
33 | 33 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.notification.created_by_user.email),24)}"/> |
|
34 | 34 | </div> |
|
35 | 35 | <div class="desc"> |
|
36 | 36 | ${c.notification.description} |
|
37 | 37 | </div> |
|
38 | 38 | <div class="delete-notifications"> |
|
39 | 39 | <span id="${c.notification.notification_id}" class="delete-notification delete_icon action"></span> |
|
40 | 40 | </div> |
|
41 | 41 | </div> |
|
42 | 42 | <div class="notification-body"> |
|
43 | 43 | <div class="notification-subject">${h.literal(c.notification.subject)}</div> |
|
44 | 44 | %if c.notification.body: |
|
45 | 45 | ${h.rst_w_mentions(c.notification.body)} |
|
46 | 46 | %endif |
|
47 | 47 | </div> |
|
48 | 48 | </div> |
|
49 | 49 | </div> |
|
50 | 50 | </div> |
|
51 | 51 | <script type="text/javascript"> |
|
52 | 52 | var url = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; |
|
53 | 53 | var main = "${url('notifications')}"; |
|
54 | 54 | YUE.on(YUQ('.delete-notification'),'click',function(e){ |
|
55 | 55 | var notification_id = e.currentTarget.id; |
|
56 | 56 | deleteNotification(url,notification_id,[function(){window.location=main}]) |
|
57 | 57 | }) |
|
58 | 58 | </script> |
|
59 | 59 | </%def> |
@@ -1,215 +1,215 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Permissions administration')} |
|
|
5 | ${_('Permissions administration')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 | 11 | ${_('permissions')} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box box-left"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | <h3>${_('Default permissions')}</h3> |
|
25 | 25 | ${h.form(url('permission', id='default'),method='put')} |
|
26 | 26 | <div class="form"> |
|
27 | 27 | <!-- fields --> |
|
28 | 28 | <div class="fields"> |
|
29 | 29 | <div class="field"> |
|
30 | 30 | <div class="label label-checkbox"> |
|
31 | 31 | <label for="anonymous">${_('Anonymous access')}:</label> |
|
32 | 32 | </div> |
|
33 | 33 | <div class="checkboxes"> |
|
34 | 34 | <div class="checkbox"> |
|
35 | 35 | ${h.checkbox('anonymous',True)} |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | </div> |
|
39 | 39 | <div class="field"> |
|
40 | 40 | <div class="label"> |
|
41 | 41 | <label for="default_repo_perm">${_('Repository')}:</label> |
|
42 | 42 | </div> |
|
43 | 43 | <div class="select"> |
|
44 | 44 | ${h.select('default_repo_perm','',c.repo_perms_choices)} |
|
45 | 45 | |
|
46 | 46 | ${h.checkbox('overwrite_default_repo','true')} |
|
47 | 47 | <label for="overwrite_default_repo"> |
|
48 | 48 | <span class="tooltip" |
|
49 | 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 | 50 | ${_('overwrite existing settings')}</span> </label> |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | <div class="field"> |
|
54 | 54 | <div class="label"> |
|
55 | 55 | <label for="default_group_perm">${_('Repository group')}:</label> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="select"> |
|
58 | 58 | ${h.select('default_group_perm','',c.group_perms_choices)} |
|
59 | 59 | ${h.checkbox('overwrite_default_group','true')} |
|
60 | 60 | <label for="overwrite_default_group"> |
|
61 | 61 | <span class="tooltip" |
|
62 | 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 | 63 | ${_('overwrite existing settings')}</span> </label> |
|
64 | 64 | |
|
65 | 65 | </div> |
|
66 | 66 | </div> |
|
67 | 67 | <div class="field"> |
|
68 | 68 | <div class="label"> |
|
69 | 69 | <label for="default_register">${_('Registration')}:</label> |
|
70 | 70 | </div> |
|
71 | 71 | <div class="select"> |
|
72 | 72 | ${h.select('default_register','',c.register_choices)} |
|
73 | 73 | </div> |
|
74 | 74 | </div> |
|
75 | 75 | <div class="field"> |
|
76 | 76 | <div class="label"> |
|
77 | 77 | <label for="default_create">${_('Repository creation')}:</label> |
|
78 | 78 | </div> |
|
79 | 79 | <div class="select"> |
|
80 | 80 | ${h.select('default_create','',c.create_choices)} |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | <div class="field"> |
|
84 | 84 | <div class="label"> |
|
85 | 85 | <label for="default_fork">${_('Repository forking')}:</label> |
|
86 | 86 | </div> |
|
87 | 87 | <div class="select"> |
|
88 | 88 | ${h.select('default_fork','',c.fork_choices)} |
|
89 | 89 | </div> |
|
90 | 90 | </div> |
|
91 | 91 | <div class="buttons"> |
|
92 | 92 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
93 | 93 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
94 | 94 | </div> |
|
95 | 95 | </div> |
|
96 | 96 | </div> |
|
97 | 97 | ${h.end_form()} |
|
98 | 98 | </div> |
|
99 | 99 | |
|
100 | 100 | <div style="min-height:780px" class="box box-right"> |
|
101 | 101 | <!-- box / title --> |
|
102 | 102 | <div class="title"> |
|
103 | 103 | <h5>${_('Default User Permissions')}</h5> |
|
104 | 104 | </div> |
|
105 | 105 | |
|
106 | 106 | ## permissions overview |
|
107 | 107 | <div id="perms" class="table"> |
|
108 | 108 | %for section in sorted(c.perm_user.permissions.keys()): |
|
109 | 109 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
110 | 110 | %if not c.perm_user.permissions[section]: |
|
111 | 111 | <span class="empty_data">${_('Nothing here yet')}</span> |
|
112 | 112 | %else: |
|
113 | 113 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
114 | 114 | <table id="tbl_list_${section}"> |
|
115 | 115 | <thead> |
|
116 | 116 | <tr> |
|
117 | 117 | <th class="left">${_('Name')}</th> |
|
118 | 118 | <th class="left">${_('Permission')}</th> |
|
119 | 119 | <th class="left">${_('Edit Permission')}</th> |
|
120 | 120 | </thead> |
|
121 | 121 | <tbody> |
|
122 | 122 | %for k in c.perm_user.permissions[section]: |
|
123 | 123 | <% |
|
124 | 124 | if section != 'global': |
|
125 | 125 | section_perm = c.perm_user.permissions[section].get(k) |
|
126 | 126 | _perm = section_perm.split('.')[-1] |
|
127 | 127 | else: |
|
128 | 128 | _perm = section_perm = None |
|
129 | 129 | %> |
|
130 | 130 | <tr> |
|
131 | 131 | <td> |
|
132 | 132 | %if section == 'repositories': |
|
133 | 133 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
134 | 134 | %elif section == 'repositories_groups': |
|
135 | 135 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
136 | 136 | %else: |
|
137 | 137 | ${h.get_permission_name(k)} |
|
138 | 138 | %endif |
|
139 | 139 | </td> |
|
140 | 140 | <td> |
|
141 | 141 | %if section == 'global': |
|
142 | 142 | ${h.bool2icon(k.split('.')[-1] != 'none')} |
|
143 | 143 | %else: |
|
144 | 144 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
145 | 145 | %endif |
|
146 | 146 | </td> |
|
147 | 147 | <td> |
|
148 | 148 | %if section == 'repositories': |
|
149 | 149 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
150 | 150 | %elif section == 'repositories_groups': |
|
151 | 151 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
152 | 152 | %else: |
|
153 | 153 | -- |
|
154 | 154 | %endif |
|
155 | 155 | </td> |
|
156 | 156 | </tr> |
|
157 | 157 | %endfor |
|
158 | 158 | </tbody> |
|
159 | 159 | </table> |
|
160 | 160 | </div> |
|
161 | 161 | %endif |
|
162 | 162 | %endfor |
|
163 | 163 | </div> |
|
164 | 164 | </div> |
|
165 | 165 | <div class="box box-left" style="clear:left"> |
|
166 | 166 | <!-- box / title --> |
|
167 | 167 | <div class="title"> |
|
168 | 168 | <h5>${_('Allowed IP addresses')}</h5> |
|
169 | 169 | </div> |
|
170 | 170 | |
|
171 | 171 | <div class="ips_wrap"> |
|
172 | 172 | <table class="noborder"> |
|
173 | 173 | %if c.user_ip_map: |
|
174 | 174 | %for ip in c.user_ip_map: |
|
175 | 175 | <tr> |
|
176 | 176 | <td><div class="ip">${ip.ip_addr}</div></td> |
|
177 | 177 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> |
|
178 | 178 | <td> |
|
179 | 179 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} |
|
180 | 180 | ${h.hidden('del_ip',ip.ip_id)} |
|
181 | 181 | ${h.hidden('default_user', 'True')} |
|
182 | 182 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, |
|
183 | 183 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} |
|
184 | 184 | ${h.end_form()} |
|
185 | 185 | </td> |
|
186 | 186 | </tr> |
|
187 | 187 | %endfor |
|
188 | 188 | %else: |
|
189 | 189 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> |
|
190 | 190 | %endif |
|
191 | 191 | </table> |
|
192 | 192 | </div> |
|
193 | 193 | |
|
194 | 194 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} |
|
195 | 195 | <div class="form"> |
|
196 | 196 | <!-- fields --> |
|
197 | 197 | <div class="fields"> |
|
198 | 198 | <div class="field"> |
|
199 | 199 | <div class="label"> |
|
200 | 200 | <label for="new_ip">${_('New ip address')}:</label> |
|
201 | 201 | </div> |
|
202 | 202 | <div class="input"> |
|
203 | 203 | ${h.hidden('default_user', 'True')} |
|
204 | 204 | ${h.text('new_ip', class_='medium')} |
|
205 | 205 | </div> |
|
206 | 206 | </div> |
|
207 | 207 | <div class="buttons"> |
|
208 | 208 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
209 | 209 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
210 | 210 | </div> |
|
211 | 211 | </div> |
|
212 | 212 | </div> |
|
213 | 213 | ${h.end_form()} |
|
214 | 214 | </div> |
|
215 | 215 | </%def> |
@@ -1,34 +1,34 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Add repository')} |
|
|
5 | ${_('Add repository')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | %if c.rhodecode_user.is_admin: |
|
10 | 10 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
11 | 11 | » |
|
12 | 12 | ${h.link_to(_('Repositories'),h.url('repos'))} |
|
13 | 13 | %else: |
|
14 | 14 | ${_('Admin')} |
|
15 | 15 | » |
|
16 | 16 | ${_('Repositories')} |
|
17 | 17 | %endif |
|
18 | 18 | » |
|
19 | 19 | ${_('add new')} |
|
20 | 20 | </%def> |
|
21 | 21 | |
|
22 | 22 | <%def name="page_nav()"> |
|
23 | 23 | ${self.menu('admin')} |
|
24 | 24 | </%def> |
|
25 | 25 | |
|
26 | 26 | <%def name="main()"> |
|
27 | 27 | <div class="box"> |
|
28 | 28 | <!-- box / title --> |
|
29 | 29 | <div class="title"> |
|
30 | 30 | ${self.breadcrumbs()} |
|
31 | 31 | </div> |
|
32 | 32 | <%include file="repo_add_base.html"/> |
|
33 | 33 | </div> |
|
34 | 34 | </%def> |
@@ -1,374 +1,374 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Edit repository')} ${c.repo_info.repo_name} |
|
|
5 | ${_('Edit repository')} ${c.repo_info.repo_name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} |
|
12 | 12 | » |
|
13 | 13 | ${_('Settings')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('options')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | ${self.context_bar('options')} |
|
22 | 22 | <div class="box box-left"> |
|
23 | 23 | <!-- box / title --> |
|
24 | 24 | <div class="title"> |
|
25 | 25 | ${self.breadcrumbs()} |
|
26 | 26 | </div> |
|
27 | 27 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')} |
|
28 | 28 | <div class="form"> |
|
29 | 29 | <!-- fields --> |
|
30 | 30 | <div class="fields"> |
|
31 | 31 | <div class="field"> |
|
32 | 32 | <div class="label"> |
|
33 | 33 | <label for="repo_name">${_('Name')}:</label> |
|
34 | 34 | </div> |
|
35 | 35 | <div class="input"> |
|
36 | 36 | ${h.text('repo_name',class_="medium")} |
|
37 | 37 | </div> |
|
38 | 38 | </div> |
|
39 | 39 | <div class="field"> |
|
40 | 40 | <div class="label"> |
|
41 | 41 | <label for="clone_uri">${_('Clone uri')}:</label> |
|
42 | 42 | </div> |
|
43 | 43 | <div class="input"> |
|
44 | 44 | ${h.text('clone_uri',class_="medium")} |
|
45 | 45 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
46 | 46 | </div> |
|
47 | 47 | </div> |
|
48 | 48 | <div class="field"> |
|
49 | 49 | <div class="label"> |
|
50 | 50 | <label for="repo_group">${_('Repository group')}:</label> |
|
51 | 51 | </div> |
|
52 | 52 | <div class="input"> |
|
53 | 53 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
54 | 54 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> |
|
55 | 55 | </div> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="field"> |
|
58 | 58 | <div class="label"> |
|
59 | 59 | <label for="repo_type">${_('Type')}:</label> |
|
60 | 60 | </div> |
|
61 | 61 | <div class="input"> |
|
62 | 62 | ${h.select('repo_type','hg',c.backends,class_="medium")} |
|
63 | 63 | </div> |
|
64 | 64 | </div> |
|
65 | 65 | <div class="field"> |
|
66 | 66 | <div class="label"> |
|
67 | 67 | <label for="repo_landing_rev">${_('Landing revision')}:</label> |
|
68 | 68 | </div> |
|
69 | 69 | <div class="input"> |
|
70 | 70 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
71 | 71 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
72 | 72 | </div> |
|
73 | 73 | </div> |
|
74 | 74 | <div class="field"> |
|
75 | 75 | <div class="label label-textarea"> |
|
76 | 76 | <label for="repo_description">${_('Description')}:</label> |
|
77 | 77 | </div> |
|
78 | 78 | <div class="textarea text-area editor"> |
|
79 | 79 | ${h.textarea('repo_description')} |
|
80 | 80 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | |
|
84 | 84 | <div class="field"> |
|
85 | 85 | <div class="label label-checkbox"> |
|
86 | 86 | <label for="repo_private">${_('Private repository')}:</label> |
|
87 | 87 | </div> |
|
88 | 88 | <div class="checkboxes"> |
|
89 | 89 | ${h.checkbox('repo_private',value="True")} |
|
90 | 90 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
91 | 91 | </div> |
|
92 | 92 | </div> |
|
93 | 93 | <div class="field"> |
|
94 | 94 | <div class="label label-checkbox"> |
|
95 | 95 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> |
|
96 | 96 | </div> |
|
97 | 97 | <div class="checkboxes"> |
|
98 | 98 | ${h.checkbox('repo_enable_statistics',value="True")} |
|
99 | 99 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
100 | 100 | </div> |
|
101 | 101 | </div> |
|
102 | 102 | <div class="field"> |
|
103 | 103 | <div class="label label-checkbox"> |
|
104 | 104 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> |
|
105 | 105 | </div> |
|
106 | 106 | <div class="checkboxes"> |
|
107 | 107 | ${h.checkbox('repo_enable_downloads',value="True")} |
|
108 | 108 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
109 | 109 | </div> |
|
110 | 110 | </div> |
|
111 | 111 | <div class="field"> |
|
112 | 112 | <div class="label label-checkbox"> |
|
113 | 113 | <label for="repo_enable_locking">${_('Enable locking')}:</label> |
|
114 | 114 | </div> |
|
115 | 115 | <div class="checkboxes"> |
|
116 | 116 | ${h.checkbox('repo_enable_locking',value="True")} |
|
117 | 117 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
118 | 118 | </div> |
|
119 | 119 | </div> |
|
120 | 120 | <div class="field"> |
|
121 | 121 | <div class="label"> |
|
122 | 122 | <label for="user">${_('Owner')}:</label> |
|
123 | 123 | </div> |
|
124 | 124 | <div class="input input-medium ac"> |
|
125 | 125 | <div class="perm_ac"> |
|
126 | 126 | ${h.text('user',class_='yui-ac-input')} |
|
127 | 127 | <span class="help-block">${_('Change owner of this repository.')}</span> |
|
128 | 128 | <div id="owner_container"></div> |
|
129 | 129 | </div> |
|
130 | 130 | </div> |
|
131 | 131 | </div> |
|
132 | 132 | %if c.visual.repository_fields: |
|
133 | 133 | ## EXTRA FIELDS |
|
134 | 134 | %for field in c.repo_fields: |
|
135 | 135 | <div class="field"> |
|
136 | 136 | <div class="label"> |
|
137 | 137 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
138 | 138 | </div> |
|
139 | 139 | <div class="input input-medium"> |
|
140 | 140 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
141 | 141 | %if field.field_desc: |
|
142 | 142 | <span class="help-block">${field.field_desc}</span> |
|
143 | 143 | %endif |
|
144 | 144 | </div> |
|
145 | 145 | </div> |
|
146 | 146 | %endfor |
|
147 | 147 | %endif |
|
148 | 148 | <div class="field"> |
|
149 | 149 | <div class="label"> |
|
150 | 150 | <label for="input">${_('Permissions')}:</label> |
|
151 | 151 | </div> |
|
152 | 152 | <div class="input"> |
|
153 | 153 | <%include file="repo_edit_perms.html"/> |
|
154 | 154 | </div> |
|
155 | 155 | |
|
156 | 156 | <div class="buttons"> |
|
157 | 157 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
158 | 158 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
159 | 159 | </div> |
|
160 | 160 | </div> |
|
161 | 161 | </div> |
|
162 | 162 | </div> |
|
163 | 163 | ${h.end_form()} |
|
164 | 164 | </div> |
|
165 | 165 | |
|
166 | 166 | <div class="box box-right"> |
|
167 | 167 | <div class="title"> |
|
168 | 168 | <h5>${_('Advanced settings')}</h5> |
|
169 | 169 | </div> |
|
170 | 170 | |
|
171 | 171 | <h3>${_('Statistics')}</h3> |
|
172 | 172 | ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')} |
|
173 | 173 | <div class="form"> |
|
174 | 174 | <div class="fields"> |
|
175 | 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 | 176 | <div class="field" style="border:none;color:#888"> |
|
177 | 177 | <ul> |
|
178 | 178 | <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li> |
|
179 | 179 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> |
|
180 | 180 | </ul> |
|
181 | 181 | </div> |
|
182 | 182 | </div> |
|
183 | 183 | </div> |
|
184 | 184 | ${h.end_form()} |
|
185 | 185 | |
|
186 | 186 | %if c.repo_info.clone_uri: |
|
187 | 187 | <h3>${_('Remote')}</h3> |
|
188 | 188 | ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')} |
|
189 | 189 | <div class="form"> |
|
190 | 190 | <div class="fields"> |
|
191 | 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 | 192 | <div class="field" style="border:none"> |
|
193 | 193 | <ul> |
|
194 | 194 | <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li> |
|
195 | 195 | </ul> |
|
196 | 196 | </div> |
|
197 | 197 | </div> |
|
198 | 198 | </div> |
|
199 | 199 | ${h.end_form()} |
|
200 | 200 | %endif |
|
201 | 201 | |
|
202 | 202 | <h3>${_('Cache')}</h3> |
|
203 | 203 | ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')} |
|
204 | 204 | <div class="form"> |
|
205 | 205 | <div class="fields"> |
|
206 | 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 | 207 | <div class="field" style="border:none;color:#888"> |
|
208 | 208 | <ul> |
|
209 | 209 | <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')} |
|
210 | 210 | </li> |
|
211 | 211 | </ul> |
|
212 | 212 | </div> |
|
213 | 213 | <div class="field" style="border:none;"> |
|
214 | 214 | ${_('List of cached values')} |
|
215 | 215 | <table> |
|
216 | 216 | <tr> |
|
217 | 217 | <th>${_('Prefix')}</th> |
|
218 | 218 | <th>${_('Key')}</th> |
|
219 | 219 | <th>${_('Active')}</th> |
|
220 | 220 | </tr> |
|
221 | 221 | %for cache in c.repo_info.cache_keys: |
|
222 | 222 | <tr> |
|
223 | 223 | <td>${cache.prefix or '-'}</td> |
|
224 | 224 | <td>${cache.cache_key}</td> |
|
225 | 225 | <td>${h.bool2icon(cache.cache_active)}</td> |
|
226 | 226 | </tr> |
|
227 | 227 | %endfor |
|
228 | 228 | </table> |
|
229 | 229 | </div> |
|
230 | 230 | </div> |
|
231 | 231 | </div> |
|
232 | 232 | ${h.end_form()} |
|
233 | 233 | |
|
234 | 234 | <h3>${_('Public journal')}</h3> |
|
235 | 235 | ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')} |
|
236 | 236 | <div class="form"> |
|
237 | 237 | ${h.hidden('auth_token',str(h.get_token()))} |
|
238 | 238 | <div class="field"> |
|
239 | 239 | %if c.in_public_journal: |
|
240 | 240 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")} |
|
241 | 241 | %else: |
|
242 | 242 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")} |
|
243 | 243 | %endif |
|
244 | 244 | </div> |
|
245 | 245 | <div class="field" style="border:none;color:#888"> |
|
246 | 246 | <ul> |
|
247 | 247 | <li>${_('All actions made on this repository will be accessible to everyone in public journal')} |
|
248 | 248 | </li> |
|
249 | 249 | </ul> |
|
250 | 250 | </div> |
|
251 | 251 | </div> |
|
252 | 252 | ${h.end_form()} |
|
253 | 253 | |
|
254 | 254 | <h3>${_('Locking')}</h3> |
|
255 | 255 | ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')} |
|
256 | 256 | <div class="form"> |
|
257 | 257 | <div class="fields"> |
|
258 | 258 | %if c.repo_info.locked[0]: |
|
259 | 259 | ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")} |
|
260 | 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 | 261 | %else: |
|
262 | 262 | ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")} |
|
263 | 263 | ${_('Repository is not locked')} |
|
264 | 264 | %endif |
|
265 | 265 | </div> |
|
266 | 266 | <div class="field" style="border:none;color:#888"> |
|
267 | 267 | <ul> |
|
268 | 268 | <li>${_('Force locking on repository. Works only when anonymous access is disabled')} |
|
269 | 269 | </li> |
|
270 | 270 | </ul> |
|
271 | 271 | </div> |
|
272 | 272 | </div> |
|
273 | 273 | ${h.end_form()} |
|
274 | 274 | |
|
275 | 275 | <h3>${_('Set as fork of')}</h3> |
|
276 | 276 | ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')} |
|
277 | 277 | <div class="form"> |
|
278 | 278 | <div class="fields"> |
|
279 | 279 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} |
|
280 | 280 | ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)} |
|
281 | 281 | </div> |
|
282 | 282 | <div class="field" style="border:none;color:#888"> |
|
283 | 283 | <ul> |
|
284 | 284 | <li>${_('''Manually set this repository as a fork of another from the list''')}</li> |
|
285 | 285 | </ul> |
|
286 | 286 | </div> |
|
287 | 287 | </div> |
|
288 | 288 | ${h.end_form()} |
|
289 | 289 | |
|
290 | 290 | <h3>${_('Delete')}</h3> |
|
291 | 291 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')} |
|
292 | 292 | <div class="form"> |
|
293 | 293 | <div class="fields"> |
|
294 | 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 | 295 | %if c.repo_info.forks.count(): |
|
296 | 296 | - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()} |
|
297 | 297 | <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label> |
|
298 | 298 | <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label> |
|
299 | 299 | %endif |
|
300 | 300 | </div> |
|
301 | 301 | <div class="field" style="border:none;color:#888"> |
|
302 | 302 | <ul> |
|
303 | 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 | 304 | </ul> |
|
305 | 305 | </div> |
|
306 | 306 | </div> |
|
307 | 307 | ${h.end_form()} |
|
308 | 308 | </div> |
|
309 | 309 | |
|
310 | 310 | ##TODO: this should be controlled by the VISUAL setting |
|
311 | 311 | %if c.visual.repository_fields: |
|
312 | 312 | <div class="box box-left" style="clear:left"> |
|
313 | 313 | <!-- box / title --> |
|
314 | 314 | <div class="title"> |
|
315 | 315 | <h5>${_('Extra fields')}</h5> |
|
316 | 316 | </div> |
|
317 | 317 | |
|
318 | 318 | <div class="emails_wrap"> |
|
319 | 319 | <table class="noborder"> |
|
320 | 320 | %for field in c.repo_fields: |
|
321 | 321 | <tr> |
|
322 | 322 | <td>${field.field_label} (${field.field_key})</td> |
|
323 | 323 | <td>${field.field_type}</td> |
|
324 | 324 | <td> |
|
325 | 325 | ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')} |
|
326 | 326 | ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id, |
|
327 | 327 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")} |
|
328 | 328 | ${h.end_form()} |
|
329 | 329 | </td> |
|
330 | 330 | </tr> |
|
331 | 331 | %endfor |
|
332 | 332 | </table> |
|
333 | 333 | </div> |
|
334 | 334 | |
|
335 | 335 | ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')} |
|
336 | 336 | <div class="form"> |
|
337 | 337 | <!-- fields --> |
|
338 | 338 | <div class="fields"> |
|
339 | 339 | <div class="field"> |
|
340 | 340 | <div class="label"> |
|
341 | 341 | <label for="new_field_key">${_('New field key')}:</label> |
|
342 | 342 | </div> |
|
343 | 343 | <div class="input"> |
|
344 | 344 | ${h.text('new_field_key', class_='small')} |
|
345 | 345 | </div> |
|
346 | 346 | </div> |
|
347 | 347 | <div class="field"> |
|
348 | 348 | <div class="label"> |
|
349 | 349 | <label for="new_field_label">${_('New field label')}:</label> |
|
350 | 350 | </div> |
|
351 | 351 | <div class="input"> |
|
352 | 352 | ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} |
|
353 | 353 | </div> |
|
354 | 354 | </div> |
|
355 | 355 | |
|
356 | 356 | <div class="field"> |
|
357 | 357 | <div class="label"> |
|
358 | 358 | <label for="new_field_desc">${_('New field description')}:</label> |
|
359 | 359 | </div> |
|
360 | 360 | <div class="input"> |
|
361 | 361 | ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))} |
|
362 | 362 | </div> |
|
363 | 363 | </div> |
|
364 | 364 | |
|
365 | 365 | <div class="buttons"> |
|
366 | 366 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
367 | 367 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
368 | 368 | </div> |
|
369 | 369 | </div> |
|
370 | 370 | </div> |
|
371 | 371 | ${h.end_form()} |
|
372 | 372 | </div> |
|
373 | 373 | %endif |
|
374 | 374 | </%def> |
@@ -1,142 +1,142 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Repositories administration')} |
|
|
5 | ${_('Repositories administration')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 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 | 10 | </%def> |
|
11 | 11 | <%def name="page_nav()"> |
|
12 | 12 | ${self.menu('admin')} |
|
13 | 13 | </%def> |
|
14 | 14 | <%def name="main()"> |
|
15 | 15 | <div class="box"> |
|
16 | 16 | |
|
17 | 17 | <div class="title"> |
|
18 | 18 | ${self.breadcrumbs()} |
|
19 | 19 | <ul class="links"> |
|
20 | 20 | <li> |
|
21 | 21 | <span>${h.link_to(_(u'Add repository'),h.url('new_repo'))}</span> |
|
22 | 22 | </li> |
|
23 | 23 | </ul> |
|
24 | 24 | </div> |
|
25 | 25 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> |
|
26 | 26 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
27 | 27 | |
|
28 | 28 | |
|
29 | 29 | </div> |
|
30 | 30 | <script> |
|
31 | 31 | var url = "${h.url('formatted_users', format='json')}"; |
|
32 | 32 | var data = ${c.data|n}; |
|
33 | 33 | var myDataSource = new YAHOO.util.DataSource(data); |
|
34 | 34 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
35 | 35 | |
|
36 | 36 | myDataSource.responseSchema = { |
|
37 | 37 | resultsList: "records", |
|
38 | 38 | fields: [ |
|
39 | 39 | {key:"menu"}, |
|
40 | 40 | {key:"raw_name"}, |
|
41 | 41 | {key:"name"}, |
|
42 | 42 | {key:"desc"}, |
|
43 | 43 | {key:"last_changeset"}, |
|
44 | 44 | {key:"owner"}, |
|
45 | 45 | {key:"action"}, |
|
46 | 46 | ] |
|
47 | 47 | }; |
|
48 | 48 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
49 | 49 | // This is the filter function |
|
50 | 50 | var data = res.results || [], |
|
51 | 51 | filtered = [], |
|
52 | 52 | i,l; |
|
53 | 53 | |
|
54 | 54 | if (req) { |
|
55 | 55 | req = req.toLowerCase(); |
|
56 | 56 | for (i = 0; i<data.length; i++) { |
|
57 | 57 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
58 | 58 | if (pos != -1) { |
|
59 | 59 | filtered.push(data[i]); |
|
60 | 60 | } |
|
61 | 61 | } |
|
62 | 62 | res.results = filtered; |
|
63 | 63 | } |
|
64 | 64 | YUD.get('repo_count').innerHTML = res.results.length; |
|
65 | 65 | return res; |
|
66 | 66 | } |
|
67 | 67 | |
|
68 | 68 | // main table sorting |
|
69 | 69 | var myColumnDefs = [ |
|
70 | 70 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
71 | 71 | {key:"name",label:"${_('Name')}",sortable:true, |
|
72 | 72 | sortOptions: { sortFunction: nameSort }}, |
|
73 | 73 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
74 | 74 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
75 | 75 | sortOptions: { sortFunction: revisionSort }}, |
|
76 | 76 | {key:"owner",label:"${_('Owner')}",sortable:true}, |
|
77 | 77 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
78 | 78 | ]; |
|
79 | 79 | |
|
80 | 80 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
|
81 | 81 | sortedBy:{key:"name",dir:"asc"}, |
|
82 | 82 | paginator: new YAHOO.widget.Paginator({ |
|
83 | 83 | rowsPerPage: 25, |
|
84 | 84 | alwaysVisible: false, |
|
85 | 85 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
86 | 86 | pageLinks: 5, |
|
87 | 87 | containerClass: 'pagination-wh', |
|
88 | 88 | currentPageClass: 'pager_curpage', |
|
89 | 89 | pageLinkClass: 'pager_link', |
|
90 | 90 | nextPageLinkLabel: '>', |
|
91 | 91 | previousPageLinkLabel: '<', |
|
92 | 92 | firstPageLinkLabel: '<<', |
|
93 | 93 | lastPageLinkLabel: '>>', |
|
94 | 94 | containers:['user-paginator'] |
|
95 | 95 | }), |
|
96 | 96 | |
|
97 | 97 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
98 | 98 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
99 | 99 | MSG_EMPTY:"${_('No records found.')}", |
|
100 | 100 | MSG_ERROR:"${_('Data error.')}", |
|
101 | 101 | MSG_LOADING:"${_('Loading...')}", |
|
102 | 102 | } |
|
103 | 103 | ); |
|
104 | 104 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
105 | 105 | tooltip_activate(); |
|
106 | 106 | quick_repo_menu(); |
|
107 | 107 | }); |
|
108 | 108 | |
|
109 | 109 | var filterTimeout = null; |
|
110 | 110 | |
|
111 | 111 | updateFilter = function () { |
|
112 | 112 | // Reset timeout |
|
113 | 113 | filterTimeout = null; |
|
114 | 114 | |
|
115 | 115 | // Reset sort |
|
116 | 116 | var state = myDataTable.getState(); |
|
117 | 117 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
118 | 118 | |
|
119 | 119 | // Get filtered data |
|
120 | 120 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
121 | 121 | success : myDataTable.onDataReturnInitializeTable, |
|
122 | 122 | failure : myDataTable.onDataReturnInitializeTable, |
|
123 | 123 | scope : myDataTable, |
|
124 | 124 | argument: state |
|
125 | 125 | }); |
|
126 | 126 | |
|
127 | 127 | }; |
|
128 | 128 | YUE.on('q_filter','click',function(){ |
|
129 | 129 | if(!YUD.hasClass('q_filter', 'loaded')){ |
|
130 | 130 | YUD.get('q_filter').value = ''; |
|
131 | 131 | //TODO: load here full list later to do search within groups |
|
132 | 132 | YUD.addClass('q_filter', 'loaded'); |
|
133 | 133 | } |
|
134 | 134 | }); |
|
135 | 135 | |
|
136 | 136 | YUE.on('q_filter','keyup',function (e) { |
|
137 | 137 | clearTimeout(filterTimeout); |
|
138 | 138 | filterTimeout = setTimeout(updateFilter,600); |
|
139 | 139 | }); |
|
140 | 140 | </script> |
|
141 | 141 | |
|
142 | 142 | </%def> |
@@ -1,22 +1,22 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | <%def name="title()"> |
|
4 |
${_('Repository group')} |
|
|
4 | ${_('Repository group')} · ${c.rhodecode_name} | |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs()"> |
|
8 | 8 | <span class="groups_breadcrumbs"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | %if c.group.parent_group: |
|
11 | 11 | » ${h.link_to(c.group.parent_group.name,h.url('repos_group_home',group_name=c.group.parent_group.group_name))} |
|
12 | 12 | %endif |
|
13 | 13 | » "${c.group.name}" ${_('with')} |
|
14 | 14 | </span> |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | <%def name="page_nav()"> |
|
18 | 18 | ${self.menu('home')} |
|
19 | 19 | </%def> |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <%include file="/index_base.html" args="parent=self,short_repo_names=True"/> |
|
22 | 22 | </%def> |
@@ -1,64 +1,64 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Add repos group')} |
|
|
5 | ${_('Add repos group')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | 9 | » |
|
10 | 10 | ${h.link_to(_('Repos groups'),h.url('repos_groups'))} |
|
11 | 11 | » |
|
12 | 12 | ${_('add new repos group')} |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="page_nav()"> |
|
16 | 16 | ${self.menu('admin')} |
|
17 | 17 | </%def> |
|
18 | 18 | |
|
19 | 19 | <%def name="main()"> |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | <!-- end box / title --> |
|
26 | 26 | ${h.form(url('repos_groups'))} |
|
27 | 27 | <div class="form"> |
|
28 | 28 | <!-- fields --> |
|
29 | 29 | <div class="fields"> |
|
30 | 30 | <div class="field"> |
|
31 | 31 | <div class="label"> |
|
32 | 32 | <label for="group_name">${_('Group name')}:</label> |
|
33 | 33 | </div> |
|
34 | 34 | <div class="input"> |
|
35 | 35 | ${h.text('group_name',class_='medium')} |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | |
|
39 | 39 | <div class="field"> |
|
40 | 40 | <div class="label label-textarea"> |
|
41 | 41 | <label for="group_description">${_('Description')}:</label> |
|
42 | 42 | </div> |
|
43 | 43 | <div class="textarea text-area editor"> |
|
44 | 44 | ${h.textarea('group_description',cols=23,rows=5,class_="medium")} |
|
45 | 45 | </div> |
|
46 | 46 | </div> |
|
47 | 47 | |
|
48 | 48 | <div class="field"> |
|
49 | 49 | <div class="label"> |
|
50 | 50 | <label for="group_parent_id">${_('Group parent')}:</label> |
|
51 | 51 | </div> |
|
52 | 52 | <div class="input"> |
|
53 | 53 | ${h.select('group_parent_id',request.GET.get('parent_group'),c.repo_groups,class_="medium")} |
|
54 | 54 | </div> |
|
55 | 55 | </div> |
|
56 | 56 | |
|
57 | 57 | <div class="buttons"> |
|
58 | 58 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
59 | 59 | </div> |
|
60 | 60 | </div> |
|
61 | 61 | </div> |
|
62 | 62 | ${h.end_form()} |
|
63 | 63 | </div> |
|
64 | 64 | </%def> |
@@ -1,86 +1,86 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Edit repos group')} ${c.repos_group.name} |
|
|
5 | ${_('Edit repos group')} ${c.repos_group.name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | 9 | » |
|
10 | 10 | ${h.link_to(_('Repos groups'),h.url('repos_groups'))} |
|
11 | 11 | » |
|
12 | 12 | ${_('edit repos group')} "${c.repos_group.name}" |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="page_nav()"> |
|
16 | 16 | ${self.menu('admin')} |
|
17 | 17 | </%def> |
|
18 | 18 | |
|
19 | 19 | <%def name="main()"> |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | <ul class="links"> |
|
25 | 25 | <li> |
|
26 | 26 | <span>${h.link_to(_(u'Add child group'),h.url('new_repos_group', parent_group=c.repos_group.group_id))}</span> |
|
27 | 27 | </li> |
|
28 | 28 | </ul> |
|
29 | 29 | </div> |
|
30 | 30 | <!-- end box / title --> |
|
31 | 31 | ${h.form(url('repos_group',group_name=c.repos_group.group_name),method='put')} |
|
32 | 32 | <div class="form"> |
|
33 | 33 | <!-- fields --> |
|
34 | 34 | <div class="fields"> |
|
35 | 35 | <div class="field"> |
|
36 | 36 | <div class="label"> |
|
37 | 37 | <label for="group_name">${_('Group name')}:</label> |
|
38 | 38 | </div> |
|
39 | 39 | <div class="input"> |
|
40 | 40 | ${h.text('group_name',class_='medium')} |
|
41 | 41 | </div> |
|
42 | 42 | </div> |
|
43 | 43 | |
|
44 | 44 | <div class="field"> |
|
45 | 45 | <div class="label label-textarea"> |
|
46 | 46 | <label for="group_description">${_('Description')}:</label> |
|
47 | 47 | </div> |
|
48 | 48 | <div class="textarea text-area editor"> |
|
49 | 49 | ${h.textarea('group_description',cols=23,rows=5,class_="medium")} |
|
50 | 50 | </div> |
|
51 | 51 | </div> |
|
52 | 52 | |
|
53 | 53 | <div class="field"> |
|
54 | 54 | <div class="label"> |
|
55 | 55 | <label for="group_parent_id">${_('Group parent')}:</label> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="input"> |
|
58 | 58 | ${h.select('group_parent_id','',c.repo_groups,class_="medium")} |
|
59 | 59 | </div> |
|
60 | 60 | </div> |
|
61 | 61 | <div class="field"> |
|
62 | 62 | <div class="label"> |
|
63 | 63 | <label for="input">${_('Permissions')}:</label> |
|
64 | 64 | </div> |
|
65 | 65 | <div class="input"> |
|
66 | 66 | <%include file="repos_group_edit_perms.html"/> |
|
67 | 67 | </div> |
|
68 | 68 | </div> |
|
69 | 69 | <div class="field"> |
|
70 | 70 | <div class="label label-checkbox"> |
|
71 | 71 | <label for="enable_locking">${_('Enable locking')}:</label> |
|
72 | 72 | </div> |
|
73 | 73 | <div class="checkboxes"> |
|
74 | 74 | ${h.checkbox('enable_locking',value="True")} |
|
75 | 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 | 76 | </div> |
|
77 | 77 | </div> |
|
78 | 78 | <div class="buttons"> |
|
79 | 79 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
80 | 80 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | </div> |
|
84 | 84 | ${h.end_form()} |
|
85 | 85 | </div> |
|
86 | 86 | </%def> |
@@ -1,78 +1,78 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Repository groups administration')} |
|
|
5 | ${_('Repository groups administration')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
11 | 11 | » |
|
12 | 12 | ${_('repository groups')} |
|
13 | 13 | </%def> |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | <%def name="main()"> |
|
18 | 18 | <div class="box"> |
|
19 | 19 | <!-- box / title --> |
|
20 | 20 | <div class="title"> |
|
21 | 21 | ${self.breadcrumbs()} |
|
22 | 22 | <ul class="links"> |
|
23 | 23 | <li> |
|
24 | 24 | %if h.HasPermissionAny('hg.admin')(): |
|
25 | 25 | <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span> |
|
26 | 26 | %endif |
|
27 | 27 | </li> |
|
28 | 28 | </ul> |
|
29 | 29 | </div> |
|
30 | 30 | <!-- end box / title --> |
|
31 | 31 | <div class="table"> |
|
32 | 32 | % if c.groups: |
|
33 | 33 | <table class="table_disp"> |
|
34 | 34 | |
|
35 | 35 | <thead> |
|
36 | 36 | <tr> |
|
37 | 37 | <th class="left"><a href="#">${_('Group name')}</a></th> |
|
38 | 38 | <th class="left"><a href="#">${_('Description')}</a></th> |
|
39 | 39 | <th class="left"><a href="#">${_('Number of toplevel repositories')}</a></th> |
|
40 | 40 | <th class="left" colspan="2">${_('action')}</th> |
|
41 | 41 | </tr> |
|
42 | 42 | </thead> |
|
43 | 43 | |
|
44 | 44 | ## REPO GROUPS |
|
45 | 45 | |
|
46 | 46 | % for gr in c.groups: |
|
47 | 47 | <% gr_cn = gr.repositories.count() %> |
|
48 | 48 | <tr> |
|
49 | 49 | <td> |
|
50 | 50 | <div style="white-space: nowrap"> |
|
51 | 51 | <img class="icon" alt="${_('Repository group')}" src="${h.url('/images/icons/database_link.png')}"/> |
|
52 | 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 | 53 | </div> |
|
54 | 54 | </td> |
|
55 | 55 | <td>${gr.group_description}</td> |
|
56 | 56 | <td><b>${gr_cn}</b></td> |
|
57 | 57 | <td> |
|
58 | 58 | <a href="${h.url('edit_repos_group',group_name=gr.group_name)}" title="${_('edit')}"> |
|
59 | 59 | ${h.submit('edit_%s' % gr.group_name,_('edit'),class_="edit_icon action_button")} |
|
60 | 60 | </a> |
|
61 | 61 | </td> |
|
62 | 62 | <td> |
|
63 | 63 | ${h.form(url('repos_group', group_name=gr.group_name),method='delete')} |
|
64 | 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 | 65 | ${h.end_form()} |
|
66 | 66 | </td> |
|
67 | 67 | </tr> |
|
68 | 68 | % endfor |
|
69 | 69 | |
|
70 | 70 | </table> |
|
71 | 71 | % else: |
|
72 | 72 | ${_('There are no repository groups yet')} |
|
73 | 73 | % endif |
|
74 | 74 | |
|
75 | 75 | </div> |
|
76 | 76 | </div> |
|
77 | 77 | |
|
78 | 78 | </%def> |
@@ -1,96 +1,96 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Settings administration')} |
|
|
5 | ${_('Settings administration')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} » ${_('Settings')} |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="page_nav()"> |
|
13 | 13 | ${self.menu('admin')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="main()"> |
|
17 | 17 | <div class="box"> |
|
18 | 18 | <!-- box / title --> |
|
19 | 19 | <div class="title"> |
|
20 | 20 | ${self.breadcrumbs()} |
|
21 | 21 | </div> |
|
22 | 22 | <!-- end box / title --> |
|
23 | 23 | |
|
24 | 24 | <h3>${_('Built in hooks - read only')}</h3> |
|
25 | 25 | <div class="form"> |
|
26 | 26 | <div class="fields"> |
|
27 | 27 | % for hook in c.hooks: |
|
28 | 28 | <div class="field"> |
|
29 | 29 | <div class="label label"> |
|
30 | 30 | <label for="${hook.ui_key}">${hook.ui_key}</label> |
|
31 | 31 | </div> |
|
32 | 32 | <div class="input" style="margin-left:280px"> |
|
33 | 33 | ${h.text(hook.ui_key,hook.ui_value,size=60,readonly="readonly")} |
|
34 | 34 | </div> |
|
35 | 35 | </div> |
|
36 | 36 | % endfor |
|
37 | 37 | </div> |
|
38 | 38 | </div> |
|
39 | 39 | |
|
40 | 40 | <h3>${_('Custom hooks')}</h3> |
|
41 | 41 | ${h.form(url('admin_setting', setting_id='hooks'),method='put')} |
|
42 | 42 | <div class="form"> |
|
43 | 43 | <div class="fields"> |
|
44 | 44 | |
|
45 | 45 | % for hook in c.custom_hooks: |
|
46 | 46 | <div class="field" id="${'id%s' % hook.ui_id }"> |
|
47 | 47 | <div class="label label"> |
|
48 | 48 | <label for="${hook.ui_key}">${hook.ui_key}</label> |
|
49 | 49 | </div> |
|
50 | 50 | <div class="input" style="margin-left:280px"> |
|
51 | 51 | ${h.hidden('hook_ui_key',hook.ui_key)} |
|
52 | 52 | ${h.hidden('hook_ui_value',hook.ui_value)} |
|
53 | 53 | ${h.text('hook_ui_value_new',hook.ui_value,size=60)} |
|
54 | 54 | <span class="delete_icon action_button" |
|
55 | 55 | onclick="ajaxActionHook(${hook.ui_id},'${'id%s' % hook.ui_id }')"> |
|
56 | 56 | ${_('remove')} |
|
57 | 57 | </span> |
|
58 | 58 | </div> |
|
59 | 59 | </div> |
|
60 | 60 | % endfor |
|
61 | 61 | |
|
62 | 62 | <div class="field"> |
|
63 | 63 | <div class="input" style="margin-left:-180px;position: absolute;"> |
|
64 | 64 | <div class="input"> |
|
65 | 65 | ${h.text('new_hook_ui_key',size=30)} |
|
66 | 66 | </div> |
|
67 | 67 | </div> |
|
68 | 68 | <div class="input" style="margin-left:280px"> |
|
69 | 69 | ${h.text('new_hook_ui_value',size=60)} |
|
70 | 70 | </div> |
|
71 | 71 | </div> |
|
72 | 72 | <div class="buttons" style="margin-left:280px"> |
|
73 | 73 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
74 | 74 | </div> |
|
75 | 75 | </div> |
|
76 | 76 | </div> |
|
77 | 77 | ${h.end_form()} |
|
78 | 78 | </div> |
|
79 | 79 | <script type="text/javascript"> |
|
80 | 80 | function ajaxActionHook(hook_id,field_id) { |
|
81 | 81 | var sUrl = "${h.url('admin_setting', setting_id='hooks')}"; |
|
82 | 82 | var callback = { |
|
83 | 83 | success: function (o) { |
|
84 | 84 | var elem = YUD.get(""+field_id); |
|
85 | 85 | elem.parentNode.removeChild(elem); |
|
86 | 86 | }, |
|
87 | 87 | failure: function (o) { |
|
88 | 88 | alert("${_('Failed to remove hook')}"); |
|
89 | 89 | }, |
|
90 | 90 | }; |
|
91 | 91 | var postData = '_method=delete&hook_id=' + hook_id; |
|
92 | 92 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); |
|
93 | 93 | }; |
|
94 | 94 | </script> |
|
95 | 95 | |
|
96 | 96 | </%def> |
@@ -1,347 +1,347 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Settings administration')} |
|
|
5 | ${_('Settings administration')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 | 11 | ${_('settings')} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | <!-- end box / title --> |
|
25 | 25 | |
|
26 | 26 | <h3>${_('Remap and rescan repositories')}</h3> |
|
27 | 27 | ${h.form(url('admin_setting', setting_id='mapping'),method='put')} |
|
28 | 28 | <div class="form"> |
|
29 | 29 | <!-- fields --> |
|
30 | 30 | |
|
31 | 31 | <div class="fields"> |
|
32 | 32 | <div class="field"> |
|
33 | 33 | <div class="label label-checkbox"> |
|
34 | 34 | <label for="destroy">${_('Rescan option')}:</label> |
|
35 | 35 | </div> |
|
36 | 36 | <div class="checkboxes"> |
|
37 | 37 | <div class="checkbox"> |
|
38 | 38 | ${h.checkbox('destroy',True)} |
|
39 | 39 | <label for="destroy"> |
|
40 | 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 | 41 | ${_('Destroy old data')}</span> </label> |
|
42 | 42 | </div> |
|
43 | 43 | <span class="help-block">${_('Rescan repositories location for new repositories. Also deletes obsolete if `destroy` flag is checked ')}</span> |
|
44 | 44 | </div> |
|
45 | 45 | </div> |
|
46 | 46 | |
|
47 | 47 | <div class="buttons"> |
|
48 | 48 | ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")} |
|
49 | 49 | </div> |
|
50 | 50 | </div> |
|
51 | 51 | </div> |
|
52 | 52 | ${h.end_form()} |
|
53 | 53 | |
|
54 | 54 | <h3>${_('Whoosh indexing')}</h3> |
|
55 | 55 | ${h.form(url('admin_setting', setting_id='whoosh'),method='put')} |
|
56 | 56 | <div class="form"> |
|
57 | 57 | <!-- fields --> |
|
58 | 58 | |
|
59 | 59 | <div class="fields"> |
|
60 | 60 | <div class="field"> |
|
61 | 61 | <div class="label label-checkbox"> |
|
62 | 62 | <label>${_('Index build option')}:</label> |
|
63 | 63 | </div> |
|
64 | 64 | <div class="checkboxes"> |
|
65 | 65 | <div class="checkbox"> |
|
66 | 66 | ${h.checkbox('full_index',True)} |
|
67 | 67 | <label for="full_index">${_('Build from scratch')}</label> |
|
68 | 68 | </div> |
|
69 | 69 | </div> |
|
70 | 70 | </div> |
|
71 | 71 | |
|
72 | 72 | <div class="buttons"> |
|
73 | 73 | ${h.submit('reindex',_('Reindex'),class_="ui-btn large")} |
|
74 | 74 | </div> |
|
75 | 75 | </div> |
|
76 | 76 | </div> |
|
77 | 77 | ${h.end_form()} |
|
78 | 78 | |
|
79 | 79 | <h3>${_('Global application settings')}</h3> |
|
80 | 80 | ${h.form(url('admin_setting', setting_id='global'),method='put')} |
|
81 | 81 | <div class="form"> |
|
82 | 82 | <!-- fields --> |
|
83 | 83 | |
|
84 | 84 | <div class="fields"> |
|
85 | 85 | |
|
86 | 86 | <div class="field"> |
|
87 | 87 | <div class="label"> |
|
88 | 88 | <label for="rhodecode_title">${_('Site branding')}:</label> |
|
89 | 89 | </div> |
|
90 | 90 | <div class="input"> |
|
91 | 91 | ${h.text('rhodecode_title',size=30)} |
|
92 | 92 | </div> |
|
93 | 93 | </div> |
|
94 | 94 | |
|
95 | 95 | <div class="field"> |
|
96 | 96 | <div class="label"> |
|
97 | 97 | <label for="rhodecode_realm">${_('HTTP authentication realm')}:</label> |
|
98 | 98 | </div> |
|
99 | 99 | <div class="input"> |
|
100 | 100 | ${h.text('rhodecode_realm',size=30)} |
|
101 | 101 | </div> |
|
102 | 102 | </div> |
|
103 | 103 | |
|
104 | 104 | <div class="field"> |
|
105 | 105 | <div class="label"> |
|
106 | 106 | <label for="rhodecode_ga_code">${_('Google Analytics code')}:</label> |
|
107 | 107 | </div> |
|
108 | 108 | <div class="input"> |
|
109 | 109 | ${h.text('rhodecode_ga_code',size=30)} |
|
110 | 110 | </div> |
|
111 | 111 | </div> |
|
112 | 112 | |
|
113 | 113 | <div class="buttons"> |
|
114 | 114 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
115 | 115 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
116 | 116 | </div> |
|
117 | 117 | </div> |
|
118 | 118 | </div> |
|
119 | 119 | ${h.end_form()} |
|
120 | 120 | |
|
121 | 121 | <h3>${_('Visualisation settings')}</h3> |
|
122 | 122 | ${h.form(url('admin_setting', setting_id='visual'),method='put')} |
|
123 | 123 | <div class="form"> |
|
124 | 124 | <!-- fields --> |
|
125 | 125 | |
|
126 | 126 | <div class="fields"> |
|
127 | 127 | <div class="field"> |
|
128 | 128 | <div class="label label-checkbox"> |
|
129 | 129 | <label>${_('General')}:</label> |
|
130 | 130 | </div> |
|
131 | 131 | <div class="checkboxes"> |
|
132 | 132 | <div class="checkbox"> |
|
133 | 133 | ${h.checkbox('rhodecode_lightweight_dashboard','True')} |
|
134 | 134 | <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> |
|
135 | 135 | </div> |
|
136 | 136 | </div> |
|
137 | 137 | <div class="checkboxes"> |
|
138 | 138 | <div class="checkbox"> |
|
139 | 139 | ${h.checkbox('rhodecode_repository_fields','True')} |
|
140 | 140 | <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label> |
|
141 | 141 | </div> |
|
142 | 142 | </div> |
|
143 | 143 | </div> |
|
144 | 144 | |
|
145 | 145 | <div class="field"> |
|
146 | 146 | <div class="label label-checkbox"> |
|
147 | 147 | <label>${_('Icons')}:</label> |
|
148 | 148 | </div> |
|
149 | 149 | <div class="checkboxes"> |
|
150 | 150 | <div class="checkbox"> |
|
151 | 151 | ${h.checkbox('rhodecode_show_public_icon','True')} |
|
152 | 152 | <label for="rhodecode_show_public_icon">${_('Show public repo icon on repositories')}</label> |
|
153 | 153 | </div> |
|
154 | 154 | <div class="checkbox"> |
|
155 | 155 | ${h.checkbox('rhodecode_show_private_icon','True')} |
|
156 | 156 | <label for="rhodecode_show_private_icon">${_('Show private repo icon on repositories')}</label> |
|
157 | 157 | </div> |
|
158 | 158 | </div> |
|
159 | 159 | </div> |
|
160 | 160 | |
|
161 | 161 | <div class="field"> |
|
162 | 162 | <div class="label label-checkbox"> |
|
163 | 163 | <label>${_('Meta-Tagging')}:</label> |
|
164 | 164 | </div> |
|
165 | 165 | <div class="checkboxes"> |
|
166 | 166 | <div class="checkbox"> |
|
167 | 167 | ${h.checkbox('rhodecode_stylify_metatags','True')} |
|
168 | 168 | <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label> |
|
169 | 169 | </div> |
|
170 | 170 | <div style="padding-left: 20px;"> |
|
171 | 171 | <ul> <!-- Fix style here --> |
|
172 | 172 | <li>[featured] <span class="metatag" tag="featured">featured</span></li> |
|
173 | 173 | <li>[stale] <span class="metatag" tag="stale">stale</span></li> |
|
174 | 174 | <li>[dead] <span class="metatag" tag="dead">dead</span></li> |
|
175 | 175 | <li>[lang => lang] <span class="metatag" tag="lang" >lang</span></li> |
|
176 | 176 | <li>[license => License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li> |
|
177 | 177 | <li>[requires => Repo] <span class="metatag" tag="requires" >requires => <a href="#" >Repo</a></span></li> |
|
178 | 178 | <li>[recommends => Repo] <span class="metatag" tag="recommends" >recommends => <a href="#" >Repo</a></span></li> |
|
179 | 179 | <li>[see => URI] <span class="metatag" tag="see">see => <a href="#">URI</a> </span></li> |
|
180 | 180 | </ul> |
|
181 | 181 | </div> |
|
182 | 182 | </div> |
|
183 | 183 | </div> |
|
184 | 184 | |
|
185 | 185 | <div class="buttons"> |
|
186 | 186 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
187 | 187 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
188 | 188 | </div> |
|
189 | 189 | |
|
190 | 190 | </div> |
|
191 | 191 | </div> |
|
192 | 192 | ${h.end_form()} |
|
193 | 193 | |
|
194 | 194 | |
|
195 | 195 | <h3>${_('VCS settings')}</h3> |
|
196 | 196 | ${h.form(url('admin_setting', setting_id='vcs'),method='put')} |
|
197 | 197 | <div class="form"> |
|
198 | 198 | <!-- fields --> |
|
199 | 199 | |
|
200 | 200 | <div class="fields"> |
|
201 | 201 | |
|
202 | 202 | <div class="field"> |
|
203 | 203 | <div class="label label-checkbox"> |
|
204 | 204 | <label>${_('Web')}:</label> |
|
205 | 205 | </div> |
|
206 | 206 | <div class="checkboxes"> |
|
207 | 207 | <div class="checkbox"> |
|
208 | 208 | ${h.checkbox('web_push_ssl', 'True')} |
|
209 | 209 | <label for="web_push_ssl">${_('Require SSL for vcs operations')}</label> |
|
210 | 210 | </div> |
|
211 | 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 | 212 | </div> |
|
213 | 213 | </div> |
|
214 | 214 | |
|
215 | 215 | <div class="field"> |
|
216 | 216 | <div class="label label-checkbox"> |
|
217 | 217 | <label>${_('Hooks')}:</label> |
|
218 | 218 | </div> |
|
219 | 219 | <div class="checkboxes"> |
|
220 | 220 | <div class="checkbox"> |
|
221 | 221 | ${h.checkbox('hooks_changegroup_update','True')} |
|
222 | 222 | <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label> |
|
223 | 223 | </div> |
|
224 | 224 | <div class="checkbox"> |
|
225 | 225 | ${h.checkbox('hooks_changegroup_repo_size','True')} |
|
226 | 226 | <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label> |
|
227 | 227 | </div> |
|
228 | 228 | <div class="checkbox"> |
|
229 | 229 | ${h.checkbox('hooks_changegroup_push_logger','True')} |
|
230 | 230 | <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label> |
|
231 | 231 | </div> |
|
232 | 232 | <div class="checkbox"> |
|
233 | 233 | ${h.checkbox('hooks_outgoing_pull_logger','True')} |
|
234 | 234 | <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label> |
|
235 | 235 | </div> |
|
236 | 236 | </div> |
|
237 | 237 | <div class="input" style="margin-top:10px"> |
|
238 | 238 | ${h.link_to(_('Advanced setup'),url('admin_edit_setting',setting_id='hooks'))} |
|
239 | 239 | </div> |
|
240 | 240 | </div> |
|
241 | 241 | <div class="field"> |
|
242 | 242 | <div class="label label-checkbox"> |
|
243 | 243 | <label>${_('Mercurial Extensions')}:</label> |
|
244 | 244 | </div> |
|
245 | 245 | <div class="checkboxes"> |
|
246 | 246 | <div class="checkbox"> |
|
247 | 247 | ${h.checkbox('extensions_largefiles','True')} |
|
248 | 248 | <label for="extensions_largefiles">${_('Enable largefiles extension')}</label> |
|
249 | 249 | </div> |
|
250 | 250 | <div class="checkbox"> |
|
251 | 251 | ${h.checkbox('extensions_hgsubversion','True')} |
|
252 | 252 | <label for="extensions_hgsubversion">${_('Enable hgsubversion extension')}</label> |
|
253 | 253 | </div> |
|
254 | 254 | <span class="help-block">${_('Requires hgsubversion library installed. Allows cloning from svn remote locations')}</span> |
|
255 | 255 | ##<div class="checkbox"> |
|
256 | 256 | ## ${h.checkbox('extensions_hggit','True')} |
|
257 | 257 | ## <label for="extensions_hggit">${_('Enable hg-git extension')}</label> |
|
258 | 258 | ##</div> |
|
259 | 259 | ##<span class="help-block">${_('Requires hg-git library installed. Allows cloning from git remote locations')}</span> |
|
260 | 260 | </div> |
|
261 | 261 | </div> |
|
262 | 262 | <div class="field"> |
|
263 | 263 | <div class="label"> |
|
264 | 264 | <label for="paths_root_path">${_('Repositories location')}:</label> |
|
265 | 265 | </div> |
|
266 | 266 | <div class="input"> |
|
267 | 267 | ${h.text('paths_root_path',size=30,readonly="readonly")} |
|
268 | 268 | <span id="path_unlock" class="tooltip" |
|
269 | 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 | 270 | ${_('unlock')} |
|
271 | 271 | </span> |
|
272 | 272 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> |
|
273 | 273 | </div> |
|
274 | 274 | </div> |
|
275 | 275 | |
|
276 | 276 | <div class="buttons"> |
|
277 | 277 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
278 | 278 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
279 | 279 | </div> |
|
280 | 280 | </div> |
|
281 | 281 | </div> |
|
282 | 282 | ${h.end_form()} |
|
283 | 283 | |
|
284 | 284 | <script type="text/javascript"> |
|
285 | 285 | YAHOO.util.Event.onDOMReady(function(){ |
|
286 | 286 | YAHOO.util.Event.addListener('path_unlock','click',function(){ |
|
287 | 287 | YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly'); |
|
288 | 288 | }); |
|
289 | 289 | }); |
|
290 | 290 | </script> |
|
291 | 291 | |
|
292 | 292 | <h3>${_('Test Email')}</h3> |
|
293 | 293 | ${h.form(url('admin_setting', setting_id='email'),method='put')} |
|
294 | 294 | <div class="form"> |
|
295 | 295 | <!-- fields --> |
|
296 | 296 | |
|
297 | 297 | <div class="fields"> |
|
298 | 298 | <div class="field"> |
|
299 | 299 | <div class="label"> |
|
300 | 300 | <label for="test_email">${_('Email to')}:</label> |
|
301 | 301 | </div> |
|
302 | 302 | <div class="input"> |
|
303 | 303 | ${h.text('test_email',size=30)} |
|
304 | 304 | </div> |
|
305 | 305 | </div> |
|
306 | 306 | |
|
307 | 307 | <div class="buttons"> |
|
308 | 308 | ${h.submit('send',_('Send'),class_="ui-btn large")} |
|
309 | 309 | </div> |
|
310 | 310 | </div> |
|
311 | 311 | </div> |
|
312 | 312 | ${h.end_form()} |
|
313 | 313 | |
|
314 | 314 | <h3>${_('System Info and Packages')}</h3> |
|
315 | 315 | <div class="form"> |
|
316 | 316 | <div> |
|
317 | 317 | <h5 id="expand_modules" style="cursor: pointer">↓ ${_('Show')} ↓</h5> |
|
318 | 318 | </div> |
|
319 | 319 | <div id="expand_modules_table" style="display:none"> |
|
320 | 320 | <h5>Python - ${c.py_version}</h5> |
|
321 | 321 | <h5>System - ${c.platform}</h5> |
|
322 | 322 | |
|
323 | 323 | <table class="table" style="margin:0px 0px 0px 20px"> |
|
324 | 324 | <colgroup> |
|
325 | 325 | <col style="width:220px"> |
|
326 | 326 | </colgroup> |
|
327 | 327 | <tbody> |
|
328 | 328 | %for key, value in c.modules: |
|
329 | 329 | <tr> |
|
330 | 330 | <th style="text-align: right;padding-right:5px;">${key}</th> |
|
331 | 331 | <td>${value}</td> |
|
332 | 332 | </tr> |
|
333 | 333 | %endfor |
|
334 | 334 | </tbody> |
|
335 | 335 | </table> |
|
336 | 336 | </div> |
|
337 | 337 | </div> |
|
338 | 338 | |
|
339 | 339 | <script type="text/javascript"> |
|
340 | 340 | YUE.on('expand_modules','click',function(e){ |
|
341 | 341 | YUD.setStyle('expand_modules_table','display',''); |
|
342 | 342 | YUD.setStyle('expand_modules','display','none'); |
|
343 | 343 | }) |
|
344 | 344 | </script> |
|
345 | 345 | |
|
346 | 346 | </div> |
|
347 | 347 | </%def> |
@@ -1,100 +1,100 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Add user')} |
|
|
5 | ${_('Add user')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | 9 | » |
|
10 | 10 | ${h.link_to(_('Users'),h.url('users'))} |
|
11 | 11 | » |
|
12 | 12 | ${_('add new user')} |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="page_nav()"> |
|
16 | 16 | ${self.menu('admin')} |
|
17 | 17 | </%def> |
|
18 | 18 | |
|
19 | 19 | <%def name="main()"> |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | <!-- end box / title --> |
|
26 | 26 | ${h.form(url('users'))} |
|
27 | 27 | <div class="form"> |
|
28 | 28 | <!-- fields --> |
|
29 | 29 | <div class="fields"> |
|
30 | 30 | <div class="field"> |
|
31 | 31 | <div class="label"> |
|
32 | 32 | <label for="username">${_('Username')}:</label> |
|
33 | 33 | </div> |
|
34 | 34 | <div class="input"> |
|
35 | 35 | ${h.text('username',class_='small')} |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | |
|
39 | 39 | <div class="field"> |
|
40 | 40 | <div class="label"> |
|
41 | 41 | <label for="password">${_('Password')}:</label> |
|
42 | 42 | </div> |
|
43 | 43 | <div class="input"> |
|
44 | 44 | ${h.password('password',class_='small')} |
|
45 | 45 | </div> |
|
46 | 46 | </div> |
|
47 | 47 | |
|
48 | 48 | <div class="field"> |
|
49 | 49 | <div class="label"> |
|
50 | 50 | <label for="password_confirmation">${_('Password confirmation')}:</label> |
|
51 | 51 | </div> |
|
52 | 52 | <div class="input"> |
|
53 | 53 | ${h.password('password_confirmation',class_="small",autocomplete="off")} |
|
54 | 54 | </div> |
|
55 | 55 | </div> |
|
56 | 56 | |
|
57 | 57 | <div class="field"> |
|
58 | 58 | <div class="label"> |
|
59 | 59 | <label for="firstname">${_('First Name')}:</label> |
|
60 | 60 | </div> |
|
61 | 61 | <div class="input"> |
|
62 | 62 | ${h.text('firstname',class_='small')} |
|
63 | 63 | </div> |
|
64 | 64 | </div> |
|
65 | 65 | |
|
66 | 66 | <div class="field"> |
|
67 | 67 | <div class="label"> |
|
68 | 68 | <label for="lastname">${_('Last Name')}:</label> |
|
69 | 69 | </div> |
|
70 | 70 | <div class="input"> |
|
71 | 71 | ${h.text('lastname',class_='small')} |
|
72 | 72 | </div> |
|
73 | 73 | </div> |
|
74 | 74 | |
|
75 | 75 | <div class="field"> |
|
76 | 76 | <div class="label"> |
|
77 | 77 | <label for="email">${_('Email')}:</label> |
|
78 | 78 | </div> |
|
79 | 79 | <div class="input"> |
|
80 | 80 | ${h.text('email',class_='small')} |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | |
|
84 | 84 | <div class="field"> |
|
85 | 85 | <div class="label label-checkbox"> |
|
86 | 86 | <label for="active">${_('Active')}:</label> |
|
87 | 87 | </div> |
|
88 | 88 | <div class="checkboxes"> |
|
89 | 89 | ${h.checkbox('active',value=True,checked='checked')} |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
|
92 | 92 | |
|
93 | 93 | <div class="buttons"> |
|
94 | 94 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
95 | 95 | </div> |
|
96 | 96 | </div> |
|
97 | 97 | </div> |
|
98 | 98 | ${h.end_form()} |
|
99 | 99 | </div> |
|
100 | 100 | </%def> |
@@ -1,343 +1,343 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Edit user')} ${c.user.username} |
|
|
5 | ${_('Edit user')} ${c.user.username} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.link_to(_('Users'),h.url('users'))} |
|
12 | 12 | » |
|
13 | 13 | ${_('edit')} "${c.user.username}" |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('admin')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div class="box box-left"> |
|
22 | 22 | <!-- box / title --> |
|
23 | 23 | <div class="title"> |
|
24 | 24 | ${self.breadcrumbs()} |
|
25 | 25 | </div> |
|
26 | 26 | <!-- end box / title --> |
|
27 | 27 | ${h.form(url('update_user', id=c.user.user_id),method='put')} |
|
28 | 28 | <div class="form"> |
|
29 | 29 | <div class="field"> |
|
30 | 30 | <div class="gravatar_box"> |
|
31 | 31 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> |
|
32 | 32 | <p> |
|
33 | 33 | %if c.use_gravatar: |
|
34 | 34 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> |
|
35 | 35 | <br/>${_('Using')} ${c.user.email} |
|
36 | 36 | %else: |
|
37 | 37 | <br/>${c.user.email} |
|
38 | 38 | %endif |
|
39 | 39 | </div> |
|
40 | 40 | </div> |
|
41 | 41 | <div class="field"> |
|
42 | 42 | <div class="label"> |
|
43 | 43 | <label>${_('API key')}:</label> ${c.user.api_key} |
|
44 | 44 | </div> |
|
45 | 45 | </div> |
|
46 | 46 | ##show current ip just if we show ourself |
|
47 | 47 | %if c.rhodecode_user.username == c.user.username: |
|
48 | 48 | <div class="field"> |
|
49 | 49 | <div class="label"> |
|
50 | 50 | <label>${_('Current IP')}:</label> ${c.perm_user.ip_addr or "?"} |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | %endif |
|
54 | 54 | <div class="fields"> |
|
55 | 55 | <div class="field"> |
|
56 | 56 | <div class="label"> |
|
57 | 57 | <label for="username">${_('Username')}:</label> |
|
58 | 58 | </div> |
|
59 | 59 | <div class="input"> |
|
60 | 60 | %if c.ldap_dn: |
|
61 | 61 | ${h.text('username',class_='medium disabled', readonly="readonly")} |
|
62 | 62 | %else: |
|
63 | 63 | ${h.text('username',class_='medium')} |
|
64 | 64 | %endif: |
|
65 | 65 | </div> |
|
66 | 66 | </div> |
|
67 | 67 | |
|
68 | 68 | <div class="field"> |
|
69 | 69 | <div class="label"> |
|
70 | 70 | <label for="ldap_dn">${_('LDAP DN')}:</label> |
|
71 | 71 | </div> |
|
72 | 72 | <div class="input"> |
|
73 | 73 | ${h.text('ldap_dn',class_='medium disabled',readonly="readonly")} |
|
74 | 74 | </div> |
|
75 | 75 | </div> |
|
76 | 76 | |
|
77 | 77 | <div class="field"> |
|
78 | 78 | <div class="label"> |
|
79 | 79 | <label for="new_password">${_('New password')}:</label> |
|
80 | 80 | </div> |
|
81 | 81 | <div class="input"> |
|
82 | 82 | ${h.password('new_password',class_='medium',autocomplete="off")} |
|
83 | 83 | </div> |
|
84 | 84 | </div> |
|
85 | 85 | |
|
86 | 86 | <div class="field"> |
|
87 | 87 | <div class="label"> |
|
88 | 88 | <label for="password_confirmation">${_('New password confirmation')}:</label> |
|
89 | 89 | </div> |
|
90 | 90 | <div class="input"> |
|
91 | 91 | ${h.password('password_confirmation',class_="medium",autocomplete="off")} |
|
92 | 92 | </div> |
|
93 | 93 | </div> |
|
94 | 94 | |
|
95 | 95 | <div class="field"> |
|
96 | 96 | <div class="label"> |
|
97 | 97 | <label for="firstname">${_('First Name')}:</label> |
|
98 | 98 | </div> |
|
99 | 99 | <div class="input"> |
|
100 | 100 | ${h.text('firstname',class_='medium')} |
|
101 | 101 | </div> |
|
102 | 102 | </div> |
|
103 | 103 | |
|
104 | 104 | <div class="field"> |
|
105 | 105 | <div class="label"> |
|
106 | 106 | <label for="lastname">${_('Last Name')}:</label> |
|
107 | 107 | </div> |
|
108 | 108 | <div class="input"> |
|
109 | 109 | ${h.text('lastname',class_='medium')} |
|
110 | 110 | </div> |
|
111 | 111 | </div> |
|
112 | 112 | |
|
113 | 113 | <div class="field"> |
|
114 | 114 | <div class="label"> |
|
115 | 115 | <label for="email">${_('Email')}:</label> |
|
116 | 116 | </div> |
|
117 | 117 | <div class="input"> |
|
118 | 118 | ${h.text('email',class_='medium')} |
|
119 | 119 | </div> |
|
120 | 120 | </div> |
|
121 | 121 | |
|
122 | 122 | <div class="field"> |
|
123 | 123 | <div class="label label-checkbox"> |
|
124 | 124 | <label for="active">${_('Active')}:</label> |
|
125 | 125 | </div> |
|
126 | 126 | <div class="checkboxes"> |
|
127 | 127 | ${h.checkbox('active',value=True)} |
|
128 | 128 | </div> |
|
129 | 129 | </div> |
|
130 | 130 | |
|
131 | 131 | <div class="field"> |
|
132 | 132 | <div class="label label-checkbox"> |
|
133 | 133 | <label for="admin">${_('Admin')}:</label> |
|
134 | 134 | </div> |
|
135 | 135 | <div class="checkboxes"> |
|
136 | 136 | ${h.checkbox('admin',value=True)} |
|
137 | 137 | </div> |
|
138 | 138 | </div> |
|
139 | 139 | <div class="buttons"> |
|
140 | 140 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
141 | 141 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
142 | 142 | </div> |
|
143 | 143 | </div> |
|
144 | 144 | </div> |
|
145 | 145 | ${h.end_form()} |
|
146 | 146 | </div> |
|
147 | 147 | <div style="min-height:780px" class="box box-right"> |
|
148 | 148 | <!-- box / title --> |
|
149 | 149 | <div class="title"> |
|
150 | 150 | <h5>${_('Permissions')}</h5> |
|
151 | 151 | </div> |
|
152 | 152 | ${h.form(url('user_perm', id=c.user.user_id),method='put')} |
|
153 | 153 | <div class="form"> |
|
154 | 154 | <!-- fields --> |
|
155 | 155 | <div class="fields"> |
|
156 | 156 | <div class="field"> |
|
157 | 157 | <div class="label label-checkbox"> |
|
158 | 158 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> |
|
159 | 159 | </div> |
|
160 | 160 | <div class="checkboxes"> |
|
161 | 161 | ${h.checkbox('inherit_default_permissions',value=True)} |
|
162 | 162 | </div> |
|
163 | 163 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' |
|
164 | 164 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> |
|
165 | 165 | </div> |
|
166 | 166 | <div id="inherit_overlay" style="${'opacity:0.3' if c.user.inherit_default_permissions else ''}" > |
|
167 | 167 | <div class="field"> |
|
168 | 168 | <div class="label label-checkbox"> |
|
169 | 169 | <label for="create_repo_perm">${_('Create repositories')}:</label> |
|
170 | 170 | </div> |
|
171 | 171 | <div class="checkboxes"> |
|
172 | 172 | ${h.checkbox('create_repo_perm',value=True)} |
|
173 | 173 | </div> |
|
174 | 174 | </div> |
|
175 | 175 | <div class="field"> |
|
176 | 176 | <div class="label label-checkbox"> |
|
177 | 177 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> |
|
178 | 178 | </div> |
|
179 | 179 | <div class="checkboxes"> |
|
180 | 180 | ${h.checkbox('fork_repo_perm',value=True)} |
|
181 | 181 | </div> |
|
182 | 182 | </div> |
|
183 | 183 | </div> |
|
184 | 184 | <div class="buttons"> |
|
185 | 185 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
186 | 186 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
187 | 187 | </div> |
|
188 | 188 | </div> |
|
189 | 189 | </div> |
|
190 | 190 | ${h.end_form()} |
|
191 | 191 | |
|
192 | 192 | ## permissions overview |
|
193 | 193 | <div id="perms" class="table"> |
|
194 | 194 | %for section in sorted(c.perm_user.permissions.keys()): |
|
195 | 195 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
196 | 196 | %if not c.perm_user.permissions[section]: |
|
197 | 197 | <span class="empty_data">${_('Nothing here yet')}</span> |
|
198 | 198 | %else: |
|
199 | 199 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
200 | 200 | <table id="tbl_list_${section}"> |
|
201 | 201 | <thead> |
|
202 | 202 | <tr> |
|
203 | 203 | <th class="left">${_('Name')}</th> |
|
204 | 204 | <th class="left">${_('Permission')}</th> |
|
205 | 205 | <th class="left">${_('Edit Permission')}</th> |
|
206 | 206 | </thead> |
|
207 | 207 | <tbody> |
|
208 | 208 | %for k in c.perm_user.permissions[section]: |
|
209 | 209 | <% |
|
210 | 210 | if section != 'global': |
|
211 | 211 | section_perm = c.perm_user.permissions[section].get(k) |
|
212 | 212 | _perm = section_perm.split('.')[-1] |
|
213 | 213 | else: |
|
214 | 214 | _perm = section_perm = None |
|
215 | 215 | %> |
|
216 | 216 | <tr> |
|
217 | 217 | <td> |
|
218 | 218 | %if section == 'repositories': |
|
219 | 219 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
220 | 220 | %elif section == 'repositories_groups': |
|
221 | 221 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
222 | 222 | %else: |
|
223 | 223 | ${h.get_permission_name(k)} |
|
224 | 224 | %endif |
|
225 | 225 | </td> |
|
226 | 226 | <td> |
|
227 | 227 | %if section == 'global': |
|
228 | 228 | ${h.bool2icon(k.split('.')[-1] != 'none')} |
|
229 | 229 | %else: |
|
230 | 230 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
231 | 231 | %endif |
|
232 | 232 | </td> |
|
233 | 233 | <td> |
|
234 | 234 | %if section == 'repositories': |
|
235 | 235 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
236 | 236 | %elif section == 'repositories_groups': |
|
237 | 237 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
238 | 238 | %else: |
|
239 | 239 | -- |
|
240 | 240 | %endif |
|
241 | 241 | </td> |
|
242 | 242 | </tr> |
|
243 | 243 | %endfor |
|
244 | 244 | </tbody> |
|
245 | 245 | </table> |
|
246 | 246 | </div> |
|
247 | 247 | %endif |
|
248 | 248 | %endfor |
|
249 | 249 | </div> |
|
250 | 250 | </div> |
|
251 | 251 | <div class="box box-left" style="clear:left"> |
|
252 | 252 | <!-- box / title --> |
|
253 | 253 | <div class="title"> |
|
254 | 254 | <h5>${_('Email addresses')}</h5> |
|
255 | 255 | </div> |
|
256 | 256 | |
|
257 | 257 | <div class="emails_wrap"> |
|
258 | 258 | <table class="noborder"> |
|
259 | 259 | %for em in c.user_email_map: |
|
260 | 260 | <tr> |
|
261 | 261 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(em.user.email,16)}"/> </div></td> |
|
262 | 262 | <td><div class="email">${em.email}</div></td> |
|
263 | 263 | <td> |
|
264 | 264 | ${h.form(url('user_emails_delete', id=c.user.user_id),method='delete')} |
|
265 | 265 | ${h.hidden('del_email',em.email_id)} |
|
266 | 266 | ${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id, |
|
267 | 267 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this email: %s') % em.email+"');")} |
|
268 | 268 | ${h.end_form()} |
|
269 | 269 | </td> |
|
270 | 270 | </tr> |
|
271 | 271 | %endfor |
|
272 | 272 | </table> |
|
273 | 273 | </div> |
|
274 | 274 | |
|
275 | 275 | ${h.form(url('user_emails', id=c.user.user_id),method='put')} |
|
276 | 276 | <div class="form"> |
|
277 | 277 | <!-- fields --> |
|
278 | 278 | <div class="fields"> |
|
279 | 279 | <div class="field"> |
|
280 | 280 | <div class="label"> |
|
281 | 281 | <label for="new_email">${_('New email address')}:</label> |
|
282 | 282 | </div> |
|
283 | 283 | <div class="input"> |
|
284 | 284 | ${h.text('new_email', class_='medium')} |
|
285 | 285 | </div> |
|
286 | 286 | </div> |
|
287 | 287 | <div class="buttons"> |
|
288 | 288 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
289 | 289 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
290 | 290 | </div> |
|
291 | 291 | </div> |
|
292 | 292 | </div> |
|
293 | 293 | ${h.end_form()} |
|
294 | 294 | </div> |
|
295 | 295 | <div class="box box-left" style="clear:left"> |
|
296 | 296 | <!-- box / title --> |
|
297 | 297 | <div class="title"> |
|
298 | 298 | <h5>${_('Allowed IP addresses')}</h5> |
|
299 | 299 | </div> |
|
300 | 300 | |
|
301 | 301 | <div class="ips_wrap"> |
|
302 | 302 | <table class="noborder"> |
|
303 | 303 | %if c.user_ip_map: |
|
304 | 304 | %for ip in c.user_ip_map: |
|
305 | 305 | <tr> |
|
306 | 306 | <td><div class="ip">${ip.ip_addr}</div></td> |
|
307 | 307 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> |
|
308 | 308 | <td> |
|
309 | 309 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} |
|
310 | 310 | ${h.hidden('del_ip',ip.ip_id)} |
|
311 | 311 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, |
|
312 | 312 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} |
|
313 | 313 | ${h.end_form()} |
|
314 | 314 | </td> |
|
315 | 315 | </tr> |
|
316 | 316 | %endfor |
|
317 | 317 | %else: |
|
318 | 318 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> |
|
319 | 319 | %endif |
|
320 | 320 | </table> |
|
321 | 321 | </div> |
|
322 | 322 | |
|
323 | 323 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} |
|
324 | 324 | <div class="form"> |
|
325 | 325 | <!-- fields --> |
|
326 | 326 | <div class="fields"> |
|
327 | 327 | <div class="field"> |
|
328 | 328 | <div class="label"> |
|
329 | 329 | <label for="new_ip">${_('New ip address')}:</label> |
|
330 | 330 | </div> |
|
331 | 331 | <div class="input"> |
|
332 | 332 | ${h.text('new_ip', class_='medium')} |
|
333 | 333 | </div> |
|
334 | 334 | </div> |
|
335 | 335 | <div class="buttons"> |
|
336 | 336 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
337 | 337 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
338 | 338 | </div> |
|
339 | 339 | </div> |
|
340 | 340 | </div> |
|
341 | 341 | ${h.end_form()} |
|
342 | 342 | </div> |
|
343 | 343 | </%def> |
@@ -1,284 +1,284 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('My account')} ${c.rhodecode_user.username} |
|
|
5 | ${_('My account')} ${c.rhodecode_user.username} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${_('My Account')} |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="page_nav()"> |
|
13 | 13 | ${self.menu('admin')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="main()"> |
|
17 | 17 | |
|
18 | 18 | <div class="box box-left"> |
|
19 | 19 | <!-- box / title --> |
|
20 | 20 | <div class="title"> |
|
21 | 21 | ${self.breadcrumbs()} |
|
22 | 22 | </div> |
|
23 | 23 | <!-- end box / title --> |
|
24 | 24 | ${c.form|n} |
|
25 | 25 | </div> |
|
26 | 26 | |
|
27 | 27 | <div class="box box-right"> |
|
28 | 28 | <!-- box / title --> |
|
29 | 29 | <div class="title"> |
|
30 | 30 | <h5> |
|
31 | 31 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> |
|
32 | 32 | </h5> |
|
33 | 33 | <ul class="links" style="color:#DADADA"> |
|
34 | 34 | <li> |
|
35 | 35 | <span><a id="show_perms" class="link-white current" href="#perms">${_('My permissions')}</a> </span> |
|
36 | 36 | </li> |
|
37 | 37 | <li> |
|
38 | 38 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> |
|
39 | 39 | </li> |
|
40 | 40 | <li> |
|
41 | 41 | <span><a id="show_pullrequests" class="link-white" href="#pullrequests">${_('My pull requests')}</a> </span> |
|
42 | 42 | </li> |
|
43 | 43 | </ul> |
|
44 | 44 | </div> |
|
45 | 45 | <!-- end box / title --> |
|
46 | 46 | <div id="perms_container"> |
|
47 | 47 | <div id="perms" class="table"> |
|
48 | 48 | %for section in sorted(c.rhodecode_user.permissions.keys()): |
|
49 | 49 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
50 | 50 | |
|
51 | 51 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
52 | 52 | <table id="tbl_list_${section}"> |
|
53 | 53 | <thead> |
|
54 | 54 | <tr> |
|
55 | 55 | <th class="left">${_('Name')}</th> |
|
56 | 56 | <th class="left">${_('Permission')}</th> |
|
57 | 57 | </thead> |
|
58 | 58 | <tbody> |
|
59 | 59 | %for k in c.rhodecode_user.permissions[section]: |
|
60 | 60 | <% |
|
61 | 61 | if section != 'global': |
|
62 | 62 | section_perm = c.rhodecode_user.permissions[section].get(k) |
|
63 | 63 | _perm = section_perm.split('.')[-1] |
|
64 | 64 | else: |
|
65 | 65 | _perm = section_perm = None |
|
66 | 66 | %> |
|
67 | 67 | %if _perm not in ['none']: |
|
68 | 68 | <tr> |
|
69 | 69 | <td> |
|
70 | 70 | %if section == 'repositories': |
|
71 | 71 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
72 | 72 | %elif section == 'repositories_groups': |
|
73 | 73 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
74 | 74 | %else: |
|
75 | 75 | ${k} |
|
76 | 76 | %endif |
|
77 | 77 | </td> |
|
78 | 78 | <td> |
|
79 | 79 | %if section == 'global': |
|
80 | 80 | ${h.bool2icon(True)} |
|
81 | 81 | %else: |
|
82 | 82 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
83 | 83 | %endif |
|
84 | 84 | </td> |
|
85 | 85 | </tr> |
|
86 | 86 | %endif |
|
87 | 87 | %endfor |
|
88 | 88 | </tbody> |
|
89 | 89 | </table> |
|
90 | 90 | </div> |
|
91 | 91 | %endfor |
|
92 | 92 | </div> |
|
93 | 93 | </div> |
|
94 | 94 | <div id="my_container" style="display:none"> |
|
95 | 95 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> |
|
96 | 96 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
97 | 97 | </div> |
|
98 | 98 | <div id="pullrequests_container" class="table" style="display:none"> |
|
99 | 99 | ## loaded via AJAX |
|
100 | 100 | ${_('Loading...')} |
|
101 | 101 | </div> |
|
102 | 102 | </div> |
|
103 | 103 | |
|
104 | 104 | <script type="text/javascript"> |
|
105 | 105 | pyroutes.register('admin_settings_my_pullrequests', "${url('admin_settings_my_pullrequests')}", []); |
|
106 | 106 | |
|
107 | 107 | var show_perms = function(e){ |
|
108 | 108 | YUD.addClass('show_perms', 'current'); |
|
109 | 109 | YUD.removeClass('show_my','current'); |
|
110 | 110 | YUD.removeClass('show_pullrequests','current'); |
|
111 | 111 | |
|
112 | 112 | YUD.setStyle('my_container','display','none'); |
|
113 | 113 | YUD.setStyle('pullrequests_container','display','none'); |
|
114 | 114 | YUD.setStyle('perms_container','display',''); |
|
115 | 115 | YUD.setStyle('q_filter','display','none'); |
|
116 | 116 | } |
|
117 | 117 | YUE.on('show_perms','click',function(e){ |
|
118 | 118 | show_perms(); |
|
119 | 119 | }) |
|
120 | 120 | |
|
121 | 121 | var show_my = function(e){ |
|
122 | 122 | YUD.addClass('show_my', 'current'); |
|
123 | 123 | YUD.removeClass('show_perms','current'); |
|
124 | 124 | YUD.removeClass('show_pullrequests','current'); |
|
125 | 125 | |
|
126 | 126 | YUD.setStyle('perms_container','display','none'); |
|
127 | 127 | YUD.setStyle('pullrequests_container','display','none'); |
|
128 | 128 | YUD.setStyle('my_container','display',''); |
|
129 | 129 | YUD.setStyle('q_filter','display',''); |
|
130 | 130 | if(!YUD.hasClass('show_my', 'loaded')){ |
|
131 | 131 | table_renderer(${c.data |n}); |
|
132 | 132 | YUD.addClass('show_my', 'loaded'); |
|
133 | 133 | } |
|
134 | 134 | } |
|
135 | 135 | YUE.on('show_my','click',function(e){ |
|
136 | 136 | show_my(e); |
|
137 | 137 | }) |
|
138 | 138 | |
|
139 | 139 | var show_pullrequests = function(e){ |
|
140 | 140 | YUD.addClass('show_pullrequests', 'current'); |
|
141 | 141 | YUD.removeClass('show_my','current'); |
|
142 | 142 | YUD.removeClass('show_perms','current'); |
|
143 | 143 | |
|
144 | 144 | YUD.setStyle('my_container','display','none'); |
|
145 | 145 | YUD.setStyle('perms_container','display','none'); |
|
146 | 146 | YUD.setStyle('pullrequests_container','display',''); |
|
147 | 147 | YUD.setStyle('q_filter','display','none'); |
|
148 | 148 | |
|
149 | 149 | var url = pyroutes.url('admin_settings_my_pullrequests'); |
|
150 | 150 | if(YUD.get('show_closed') && YUD.get('show_closed').checked) { |
|
151 | 151 | var url = pyroutes.url('admin_settings_my_pullrequests', {'pr_show_closed': '1'}); |
|
152 | 152 | } |
|
153 | 153 | ypjax(url, 'pullrequests_container', function(){ |
|
154 | 154 | YUE.on('show_closed','change',function (e) { |
|
155 | 155 | show_pullrequests(e); |
|
156 | 156 | }); |
|
157 | 157 | }); |
|
158 | 158 | } |
|
159 | 159 | YUE.on('show_pullrequests','click',function(e){ |
|
160 | 160 | show_pullrequests(e) |
|
161 | 161 | }) |
|
162 | 162 | |
|
163 | 163 | var tabs = { |
|
164 | 164 | 'perms': show_perms, |
|
165 | 165 | 'my': show_my, |
|
166 | 166 | 'pullrequests': show_pullrequests |
|
167 | 167 | } |
|
168 | 168 | var url = location.href.split('#'); |
|
169 | 169 | if (url[1]) { |
|
170 | 170 | //We have a hash |
|
171 | 171 | var tabHash = url[1]; |
|
172 | 172 | var func = tabs[tabHash] |
|
173 | 173 | if (func){ |
|
174 | 174 | func(); |
|
175 | 175 | } |
|
176 | 176 | } |
|
177 | 177 | |
|
178 | 178 | function table_renderer(data){ |
|
179 | 179 | var myDataSource = new YAHOO.util.DataSource(data); |
|
180 | 180 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
181 | 181 | |
|
182 | 182 | myDataSource.responseSchema = { |
|
183 | 183 | resultsList: "records", |
|
184 | 184 | fields: [ |
|
185 | 185 | {key:"menu"}, |
|
186 | 186 | {key:"raw_name"}, |
|
187 | 187 | {key:"name"}, |
|
188 | 188 | {key:"last_changeset"}, |
|
189 | 189 | {key:"action"}, |
|
190 | 190 | ] |
|
191 | 191 | }; |
|
192 | 192 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
193 | 193 | // This is the filter function |
|
194 | 194 | var data = res.results || [], |
|
195 | 195 | filtered = [], |
|
196 | 196 | i,l; |
|
197 | 197 | |
|
198 | 198 | if (req) { |
|
199 | 199 | req = req.toLowerCase(); |
|
200 | 200 | for (i = 0; i<data.length; i++) { |
|
201 | 201 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
202 | 202 | if (pos != -1) { |
|
203 | 203 | filtered.push(data[i]); |
|
204 | 204 | } |
|
205 | 205 | } |
|
206 | 206 | res.results = filtered; |
|
207 | 207 | } |
|
208 | 208 | return res; |
|
209 | 209 | } |
|
210 | 210 | |
|
211 | 211 | // main table sorting |
|
212 | 212 | var myColumnDefs = [ |
|
213 | 213 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
214 | 214 | {key:"name",label:"${_('Name')}",sortable:true, |
|
215 | 215 | sortOptions: { sortFunction: nameSort }}, |
|
216 | 216 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
217 | 217 | sortOptions: { sortFunction: revisionSort }}, |
|
218 | 218 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
219 | 219 | ]; |
|
220 | 220 | |
|
221 | 221 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
|
222 | 222 | sortedBy:{key:"name",dir:"asc"}, |
|
223 | 223 | paginator: new YAHOO.widget.Paginator({ |
|
224 | 224 | rowsPerPage: 50, |
|
225 | 225 | alwaysVisible: false, |
|
226 | 226 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
227 | 227 | pageLinks: 5, |
|
228 | 228 | containerClass: 'pagination-wh', |
|
229 | 229 | currentPageClass: 'pager_curpage', |
|
230 | 230 | pageLinkClass: 'pager_link', |
|
231 | 231 | nextPageLinkLabel: '>', |
|
232 | 232 | previousPageLinkLabel: '<', |
|
233 | 233 | firstPageLinkLabel: '<<', |
|
234 | 234 | lastPageLinkLabel: '>>', |
|
235 | 235 | containers:['user-paginator'] |
|
236 | 236 | }), |
|
237 | 237 | |
|
238 | 238 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
239 | 239 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
240 | 240 | MSG_EMPTY:"${_('No records found.')}", |
|
241 | 241 | MSG_ERROR:"${_('Data error.')}", |
|
242 | 242 | MSG_LOADING:"${_('Loading...')}", |
|
243 | 243 | } |
|
244 | 244 | ); |
|
245 | 245 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
246 | 246 | tooltip_activate(); |
|
247 | 247 | quick_repo_menu(); |
|
248 | 248 | }); |
|
249 | 249 | |
|
250 | 250 | var filterTimeout = null; |
|
251 | 251 | |
|
252 | 252 | updateFilter = function() { |
|
253 | 253 | // Reset timeout |
|
254 | 254 | filterTimeout = null; |
|
255 | 255 | |
|
256 | 256 | // Reset sort |
|
257 | 257 | var state = myDataTable.getState(); |
|
258 | 258 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
259 | 259 | |
|
260 | 260 | // Get filtered data |
|
261 | 261 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
262 | 262 | success : myDataTable.onDataReturnInitializeTable, |
|
263 | 263 | failure : myDataTable.onDataReturnInitializeTable, |
|
264 | 264 | scope : myDataTable, |
|
265 | 265 | argument: state |
|
266 | 266 | }); |
|
267 | 267 | |
|
268 | 268 | }; |
|
269 | 269 | YUE.on('q_filter','click',function(){ |
|
270 | 270 | if(!YUD.hasClass('q_filter', 'loaded')){ |
|
271 | 271 | YUD.get('q_filter').value = ''; |
|
272 | 272 | //TODO: load here full list later to do search within groups |
|
273 | 273 | YUD.addClass('q_filter', 'loaded'); |
|
274 | 274 | } |
|
275 | 275 | }); |
|
276 | 276 | |
|
277 | 277 | YUE.on('q_filter','keyup',function (e) { |
|
278 | 278 | clearTimeout(filterTimeout); |
|
279 | 279 | filterTimeout = setTimeout(updateFilter,600); |
|
280 | 280 | }); |
|
281 | 281 | |
|
282 | 282 | } |
|
283 | 283 | </script> |
|
284 | 284 | </%def> |
@@ -1,147 +1,147 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Users administration')} |
|
|
5 | ${_('Users administration')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 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 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="page_nav()"> |
|
13 | 13 | ${self.menu('admin')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="main()"> |
|
17 | 17 | <div class="box"> |
|
18 | 18 | <!-- box / title --> |
|
19 | 19 | <div class="title"> |
|
20 | 20 | ${self.breadcrumbs()} |
|
21 | 21 | <ul class="links"> |
|
22 | 22 | <li> |
|
23 | 23 | <span>${h.link_to(_(u'Add new user'),h.url('new_user'))}</span> |
|
24 | 24 | </li> |
|
25 | 25 | </ul> |
|
26 | 26 | </div> |
|
27 | 27 | <!-- end box / title --> |
|
28 | 28 | <div class="table yui-skin-sam" id="users_list_wrap"></div> |
|
29 | 29 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
30 | 30 | </div> |
|
31 | 31 | |
|
32 | 32 | <script> |
|
33 | 33 | var url = "${h.url('formatted_users', format='json')}"; |
|
34 | 34 | var data = ${c.data|n}; |
|
35 | 35 | var myDataSource = new YAHOO.util.DataSource(data); |
|
36 | 36 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
37 | 37 | |
|
38 | 38 | myDataSource.responseSchema = { |
|
39 | 39 | resultsList: "records", |
|
40 | 40 | fields: [ |
|
41 | 41 | {key: "gravatar"}, |
|
42 | 42 | {key: "raw_username"}, |
|
43 | 43 | {key: "username"}, |
|
44 | 44 | {key: "firstname"}, |
|
45 | 45 | {key: "lastname"}, |
|
46 | 46 | {key: "last_login"}, |
|
47 | 47 | {key: "last_login_raw"}, |
|
48 | 48 | {key: "active"}, |
|
49 | 49 | {key: "admin"}, |
|
50 | 50 | {key: "ldap"}, |
|
51 | 51 | {key: "action"}, |
|
52 | 52 | ] |
|
53 | 53 | }; |
|
54 | 54 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
55 | 55 | // This is the filter function |
|
56 | 56 | var data = res.results || [], |
|
57 | 57 | filtered = [], |
|
58 | 58 | i,l; |
|
59 | 59 | |
|
60 | 60 | if (req) { |
|
61 | 61 | req = req.toLowerCase(); |
|
62 | 62 | for (i = 0; i<data.length; i++) { |
|
63 | 63 | var pos = data[i].raw_username.toLowerCase().indexOf(req) |
|
64 | 64 | if (pos != -1) { |
|
65 | 65 | filtered.push(data[i]); |
|
66 | 66 | } |
|
67 | 67 | } |
|
68 | 68 | res.results = filtered; |
|
69 | 69 | } |
|
70 | 70 | YUD.get('user_count').innerHTML = res.results.length; |
|
71 | 71 | return res; |
|
72 | 72 | } |
|
73 | 73 | |
|
74 | 74 | // main table sorting |
|
75 | 75 | var myColumnDefs = [ |
|
76 | 76 | {key:"gravatar",label:"",sortable:false,}, |
|
77 | 77 | {key:"username",label:"${_('username')}",sortable:true, |
|
78 | 78 | sortOptions: { sortFunction: linkSort } |
|
79 | 79 | }, |
|
80 | 80 | {key:"firstname",label:"${_('firstname')}",sortable:true,}, |
|
81 | 81 | {key:"lastname",label:"${_('lastname')}",sortable:true,}, |
|
82 | 82 | {key:"last_login",label:"${_('last login')}",sortable:true, |
|
83 | 83 | sortOptions: { sortFunction: lastLoginSort }}, |
|
84 | 84 | {key:"active",label:"${_('active')}",sortable:true,}, |
|
85 | 85 | {key:"admin",label:"${_('admin')}",sortable:true,}, |
|
86 | 86 | {key:"ldap",label:"${_('ldap')}",sortable:true,}, |
|
87 | 87 | {key:"action",label:"${_('action')}",sortable:false}, |
|
88 | 88 | ]; |
|
89 | 89 | |
|
90 | 90 | var myDataTable = new YAHOO.widget.DataTable("users_list_wrap", myColumnDefs, myDataSource,{ |
|
91 | 91 | sortedBy:{key:"username",dir:"asc"}, |
|
92 | 92 | paginator: new YAHOO.widget.Paginator({ |
|
93 | 93 | rowsPerPage: 15, |
|
94 | 94 | alwaysVisible: false, |
|
95 | 95 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
96 | 96 | pageLinks: 5, |
|
97 | 97 | containerClass: 'pagination-wh', |
|
98 | 98 | currentPageClass: 'pager_curpage', |
|
99 | 99 | pageLinkClass: 'pager_link', |
|
100 | 100 | nextPageLinkLabel: '>', |
|
101 | 101 | previousPageLinkLabel: '<', |
|
102 | 102 | firstPageLinkLabel: '<<', |
|
103 | 103 | lastPageLinkLabel: '>>', |
|
104 | 104 | containers:['user-paginator'] |
|
105 | 105 | }), |
|
106 | 106 | |
|
107 | 107 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
108 | 108 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
109 | 109 | MSG_EMPTY:"${_('No records found.')}", |
|
110 | 110 | MSG_ERROR:"${_('Data error.')}", |
|
111 | 111 | MSG_LOADING:"${_('Loading...')}", |
|
112 | 112 | } |
|
113 | 113 | ); |
|
114 | 114 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
115 | 115 | |
|
116 | 116 | }); |
|
117 | 117 | |
|
118 | 118 | var filterTimeout = null; |
|
119 | 119 | |
|
120 | 120 | updateFilter = function () { |
|
121 | 121 | // Reset timeout |
|
122 | 122 | filterTimeout = null; |
|
123 | 123 | |
|
124 | 124 | // Reset sort |
|
125 | 125 | var state = myDataTable.getState(); |
|
126 | 126 | state.sortedBy = {key:'username', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
127 | 127 | |
|
128 | 128 | // Get filtered data |
|
129 | 129 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
130 | 130 | success : myDataTable.onDataReturnInitializeTable, |
|
131 | 131 | failure : myDataTable.onDataReturnInitializeTable, |
|
132 | 132 | scope : myDataTable, |
|
133 | 133 | argument: state |
|
134 | 134 | }); |
|
135 | 135 | |
|
136 | 136 | }; |
|
137 | 137 | YUE.on('q_filter','click',function(){ |
|
138 | 138 | YUD.get('q_filter').value = ''; |
|
139 | 139 | }); |
|
140 | 140 | |
|
141 | 141 | YUE.on('q_filter','keyup',function (e) { |
|
142 | 142 | clearTimeout(filterTimeout); |
|
143 | 143 | filterTimeout = setTimeout(updateFilter,600); |
|
144 | 144 | }); |
|
145 | 145 | </script> |
|
146 | 146 | |
|
147 | 147 | </%def> |
@@ -1,55 +1,55 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Add user group')} |
|
|
5 | ${_('Add user group')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | 9 | » |
|
10 | 10 | ${h.link_to(_('User groups'),h.url('users_groups'))} |
|
11 | 11 | » |
|
12 | 12 | ${_('add new user group')} |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="page_nav()"> |
|
16 | 16 | ${self.menu('admin')} |
|
17 | 17 | </%def> |
|
18 | 18 | |
|
19 | 19 | <%def name="main()"> |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | <!-- end box / title --> |
|
26 | 26 | ${h.form(url('users_groups'))} |
|
27 | 27 | <div class="form"> |
|
28 | 28 | <!-- fields --> |
|
29 | 29 | <div class="fields"> |
|
30 | 30 | <div class="field"> |
|
31 | 31 | <div class="label"> |
|
32 | 32 | <label for="users_group_name">${_('Group name')}:</label> |
|
33 | 33 | </div> |
|
34 | 34 | <div class="input"> |
|
35 | 35 | ${h.text('users_group_name',class_='small')} |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | |
|
39 | 39 | <div class="field"> |
|
40 | 40 | <div class="label label-checkbox"> |
|
41 | 41 | <label for="users_group_active">${_('Active')}:</label> |
|
42 | 42 | </div> |
|
43 | 43 | <div class="checkboxes"> |
|
44 | 44 | ${h.checkbox('users_group_active',value=True, checked='checked')} |
|
45 | 45 | </div> |
|
46 | 46 | </div> |
|
47 | 47 | |
|
48 | 48 | <div class="buttons"> |
|
49 | 49 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
50 | 50 | </div> |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | ${h.end_form()} |
|
54 | 54 | </div> |
|
55 | 55 | </%def> |
@@ -1,228 +1,228 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 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 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.link_to(_('UserGroups'),h.url('users_groups'))} |
|
12 | 12 | » |
|
13 | 13 | ${_('edit')} "${c.users_group.users_group_name}" |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('admin')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div class="box box-left"> |
|
22 | 22 | <!-- box / title --> |
|
23 | 23 | <div class="title"> |
|
24 | 24 | ${self.breadcrumbs()} |
|
25 | 25 | </div> |
|
26 | 26 | <!-- end box / title --> |
|
27 | 27 | ${h.form(url('users_group', id=c.users_group.users_group_id),method='put', id='edit_users_group')} |
|
28 | 28 | <div class="form"> |
|
29 | 29 | <!-- fields --> |
|
30 | 30 | <div class="fields"> |
|
31 | 31 | <div class="field"> |
|
32 | 32 | <div class="label"> |
|
33 | 33 | <label for="users_group_name">${_('Group name')}:</label> |
|
34 | 34 | </div> |
|
35 | 35 | <div class="input"> |
|
36 | 36 | ${h.text('users_group_name',class_='small')} |
|
37 | 37 | </div> |
|
38 | 38 | </div> |
|
39 | 39 | |
|
40 | 40 | <div class="field"> |
|
41 | 41 | <div class="label label-checkbox"> |
|
42 | 42 | <label for="users_group_active">${_('Active')}:</label> |
|
43 | 43 | </div> |
|
44 | 44 | <div class="checkboxes"> |
|
45 | 45 | ${h.checkbox('users_group_active',value=True)} |
|
46 | 46 | </div> |
|
47 | 47 | </div> |
|
48 | 48 | <div class="field"> |
|
49 | 49 | <div class="label"> |
|
50 | 50 | <label for="users_group_active">${_('Members')}:</label> |
|
51 | 51 | </div> |
|
52 | 52 | <div class="select"> |
|
53 | 53 | <table> |
|
54 | 54 | <tr> |
|
55 | 55 | <td> |
|
56 | 56 | <div> |
|
57 | 57 | <div style="float:left"> |
|
58 | 58 | <div class="text" style="padding: 0px 0px 6px;">${_('Choosen group members')}</div> |
|
59 | 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 | 60 | <div id="remove_all_elements" style="cursor:pointer;text-align:center"> |
|
61 | 61 | ${_('Remove all elements')} |
|
62 | 62 | <img alt="remove" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_right.png')}"/> |
|
63 | 63 | </div> |
|
64 | 64 | </div> |
|
65 | 65 | <div style="float:left;width:20px;padding-top:50px"> |
|
66 | 66 | <img alt="add" id="add_element" |
|
67 | 67 | style="padding:2px;cursor:pointer" |
|
68 | 68 | src="${h.url('/images/icons/arrow_left.png')}"/> |
|
69 | 69 | <br /> |
|
70 | 70 | <img alt="remove" id="remove_element" |
|
71 | 71 | style="padding:2px;cursor:pointer" |
|
72 | 72 | src="${h.url('/images/icons/arrow_right.png')}"/> |
|
73 | 73 | </div> |
|
74 | 74 | <div style="float:left"> |
|
75 | 75 | <div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div> |
|
76 | 76 | ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")} |
|
77 | 77 | <div id="add_all_elements" style="cursor:pointer;text-align:center"> |
|
78 | 78 | <img alt="add" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_left.png')}"/> |
|
79 | 79 | ${_('Add all elements')} |
|
80 | 80 | </div> |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | </td> |
|
84 | 84 | </tr> |
|
85 | 85 | </table> |
|
86 | 86 | </div> |
|
87 | 87 | |
|
88 | 88 | </div> |
|
89 | 89 | <div class="buttons"> |
|
90 | 90 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
91 | 91 | </div> |
|
92 | 92 | </div> |
|
93 | 93 | </div> |
|
94 | 94 | ${h.end_form()} |
|
95 | 95 | </div> |
|
96 | 96 | |
|
97 | 97 | <div class="box box-right"> |
|
98 | 98 | <!-- box / title --> |
|
99 | 99 | <div class="title"> |
|
100 | 100 | <h5>${_('Permissions')}</h5> |
|
101 | 101 | </div> |
|
102 | 102 | ${h.form(url('users_group_perm', id=c.users_group.users_group_id), method='put')} |
|
103 | 103 | <div class="form"> |
|
104 | 104 | <!-- fields --> |
|
105 | 105 | <div class="fields"> |
|
106 | 106 | <div class="field"> |
|
107 | 107 | <div class="label label-checkbox"> |
|
108 | 108 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> |
|
109 | 109 | </div> |
|
110 | 110 | <div class="checkboxes"> |
|
111 | 111 | ${h.checkbox('inherit_default_permissions',value=True)} |
|
112 | 112 | </div> |
|
113 | 113 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' |
|
114 | 114 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> |
|
115 | 115 | </div> |
|
116 | 116 | <div id="inherit_overlay" style="${'opacity:0.3' if c.users_group.inherit_default_permissions else ''}" > |
|
117 | 117 | <div class="field"> |
|
118 | 118 | <div class="label label-checkbox"> |
|
119 | 119 | <label for="create_repo_perm">${_('Create repositories')}:</label> |
|
120 | 120 | </div> |
|
121 | 121 | <div class="checkboxes"> |
|
122 | 122 | ${h.checkbox('create_repo_perm',value=True)} |
|
123 | 123 | </div> |
|
124 | 124 | </div> |
|
125 | 125 | <div class="field"> |
|
126 | 126 | <div class="label label-checkbox"> |
|
127 | 127 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> |
|
128 | 128 | </div> |
|
129 | 129 | <div class="checkboxes"> |
|
130 | 130 | ${h.checkbox('fork_repo_perm',value=True)} |
|
131 | 131 | </div> |
|
132 | 132 | </div> |
|
133 | 133 | </div> |
|
134 | 134 | <div class="buttons"> |
|
135 | 135 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
136 | 136 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
137 | 137 | </div> |
|
138 | 138 | </div> |
|
139 | 139 | </div> |
|
140 | 140 | ${h.end_form()} |
|
141 | 141 | </div> |
|
142 | 142 | |
|
143 | 143 | <div class="box box-right"> |
|
144 | 144 | <!-- box / title --> |
|
145 | 145 | <div class="title"> |
|
146 | 146 | <h5>${_('Group members')}</h5> |
|
147 | 147 | </div> |
|
148 | 148 | |
|
149 | 149 | <div class="group_members_wrap"> |
|
150 | 150 | % if c.group_members_obj: |
|
151 | 151 | <ul class="group_members"> |
|
152 | 152 | %for user in c.group_members_obj: |
|
153 | 153 | <li> |
|
154 | 154 | <div class="group_member"> |
|
155 | 155 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/> </div> |
|
156 | 156 | <div>${h.link_to(user.username, h.url('edit_user',id=user.user_id))}</div> |
|
157 | 157 | <div>${user.full_name}</div> |
|
158 | 158 | </div> |
|
159 | 159 | </li> |
|
160 | 160 | %endfor |
|
161 | 161 | </ul> |
|
162 | 162 | %else: |
|
163 | 163 | <span class="empty_data">${_('No members yet')}</span> |
|
164 | 164 | %endif |
|
165 | 165 | </div> |
|
166 | 166 | </div> |
|
167 | 167 | |
|
168 | 168 | <div class="box box-left"> |
|
169 | 169 | <!-- box / title --> |
|
170 | 170 | <div class="title"> |
|
171 | 171 | <h5>${_('Permissions defined for this group')}</h5> |
|
172 | 172 | </div> |
|
173 | 173 | ## permissions overview |
|
174 | 174 | <div id="perms" class="table"> |
|
175 | 175 | %for section in sorted(c.users_group.permissions.keys()): |
|
176 | 176 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
177 | 177 | %if not c.users_group.permissions: |
|
178 | 178 | <span class="empty_data">${_('No permissions set yet')}</span> |
|
179 | 179 | %else: |
|
180 | 180 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
181 | 181 | <table id="tbl_list_repository"> |
|
182 | 182 | <thead> |
|
183 | 183 | <tr> |
|
184 | 184 | <th class="left">${_('Name')}</th> |
|
185 | 185 | <th class="left">${_('Permission')}</th> |
|
186 | 186 | <th class="left">${_('Edit Permission')}</th> |
|
187 | 187 | </thead> |
|
188 | 188 | <tbody> |
|
189 | 189 | %for k in c.users_group.permissions[section]: |
|
190 | 190 | <% |
|
191 | 191 | section_perm = c.users_group.permissions[section].get(k) |
|
192 | 192 | _perm = section_perm.split('.')[-1] |
|
193 | 193 | %> |
|
194 | 194 | <tr> |
|
195 | 195 | <td> |
|
196 | 196 | %if section == 'repositories': |
|
197 | 197 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
198 | 198 | %elif section == 'repositories_groups': |
|
199 | 199 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
200 | 200 | %endif |
|
201 | 201 | </td> |
|
202 | 202 | <td> |
|
203 | 203 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
204 | 204 | </td> |
|
205 | 205 | <td> |
|
206 | 206 | %if section == 'repositories': |
|
207 | 207 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
208 | 208 | %elif section == 'repositories_groups': |
|
209 | 209 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
210 | 210 | %else: |
|
211 | 211 | -- |
|
212 | 212 | %endif |
|
213 | 213 | </td> |
|
214 | 214 | </tr> |
|
215 | 215 | %endfor |
|
216 | 216 | </tbody> |
|
217 | 217 | </table> |
|
218 | 218 | </div> |
|
219 | 219 | %endif |
|
220 | 220 | %endfor |
|
221 | 221 | </div> |
|
222 | 222 | </div> |
|
223 | 223 | |
|
224 | 224 | |
|
225 | 225 | <script type="text/javascript"> |
|
226 | 226 | MultiSelectWidget('users_group_members','available_members','edit_users_group'); |
|
227 | 227 | </script> |
|
228 | 228 | </%def> |
@@ -1,55 +1,55 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('User groups administration')} |
|
|
5 | ${_('User groups administration')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 | 11 | ${_('user groups')} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | <ul class="links"> |
|
24 | 24 | <li> |
|
25 | 25 | <span>${h.link_to(_(u'Add new user group'),h.url('new_users_group'))}</span> |
|
26 | 26 | </li> |
|
27 | 27 | |
|
28 | 28 | </ul> |
|
29 | 29 | </div> |
|
30 | 30 | <!-- end box / title --> |
|
31 | 31 | <div class="table"> |
|
32 | 32 | <table class="table_disp"> |
|
33 | 33 | <tr class="header"> |
|
34 | 34 | <th class="left">${_('group name')}</th> |
|
35 | 35 | <th class="left">${_('members')}</th> |
|
36 | 36 | <th class="left">${_('active')}</th> |
|
37 | 37 | <th class="left">${_('action')}</th> |
|
38 | 38 | </tr> |
|
39 | 39 | %for cnt,u_group in enumerate(c.users_groups_list): |
|
40 | 40 | <tr class="parity${cnt%2}"> |
|
41 | 41 | <td>${h.link_to(u_group.users_group_name,h.url('edit_users_group', id=u_group.users_group_id))}</td> |
|
42 | 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 | 43 | <td>${h.bool2icon(u_group.users_group_active)}</td> |
|
44 | 44 | <td> |
|
45 | 45 | ${h.form(url('users_group', id=u_group.users_group_id),method='delete')} |
|
46 | 46 | ${h.submit('remove_',_('delete'),id="remove_group_%s" % u_group.users_group_id, |
|
47 | 47 | class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user group: %s') % u_group.users_group_name+"');")} |
|
48 | 48 | ${h.end_form()} |
|
49 | 49 | </td> |
|
50 | 50 | </tr> |
|
51 | 51 | %endfor |
|
52 | 52 | </table> |
|
53 | 53 | </div> |
|
54 | 54 | </div> |
|
55 | 55 | </%def> |
@@ -1,75 +1,75 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('%s Bookmarks') % c.repo_name} |
|
|
5 | ${_('%s Bookmarks') % c.repo_name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
11 | 11 | ${_('Bookmarks')} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('bookmarks')} |
|
16 | 16 | </%def> |
|
17 | 17 | <%def name="main()"> |
|
18 | 18 | <div class="box"> |
|
19 | 19 | ${self.context_bar('switch-to')} |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | <!-- end box / title --> |
|
25 | 25 | <div class="table"> |
|
26 | 26 | <%include file='bookmarks_data.html'/> |
|
27 | 27 | </div> |
|
28 | 28 | </div> |
|
29 | 29 | <script type="text/javascript"> |
|
30 | 30 | |
|
31 | 31 | // main table sorting |
|
32 | 32 | var myColumnDefs = [ |
|
33 | 33 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
34 | 34 | {key:"date",label:"${_('Date')}",sortable:true, |
|
35 | 35 | sortOptions: { sortFunction: dateSort }}, |
|
36 | 36 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
37 | 37 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
38 | 38 | sortOptions: { sortFunction: revisionSort }}, |
|
39 | 39 | ]; |
|
40 | 40 | |
|
41 | 41 | var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data")); |
|
42 | 42 | |
|
43 | 43 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
44 | 44 | |
|
45 | 45 | myDataSource.responseSchema = { |
|
46 | 46 | fields: [ |
|
47 | 47 | {key:"name"}, |
|
48 | 48 | {key:"date"}, |
|
49 | 49 | {key:"author"}, |
|
50 | 50 | {key:"revision"}, |
|
51 | 51 | ] |
|
52 | 52 | }; |
|
53 | 53 | |
|
54 | 54 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
55 | 55 | { |
|
56 | 56 | sortedBy:{key:"name",dir:"asc"}, |
|
57 | 57 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
58 | 58 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
59 | 59 | MSG_EMPTY:"${_('No records found.')}", |
|
60 | 60 | MSG_ERROR:"${_('Data error.')}", |
|
61 | 61 | MSG_LOADING:"${_('Loading...')}", |
|
62 | 62 | } |
|
63 | 63 | ); |
|
64 | 64 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
65 | 65 | tooltip_activate(); |
|
66 | 66 | var func = function(node){ |
|
67 | 67 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
68 | 68 | } |
|
69 | 69 | q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func); |
|
70 | 70 | }); |
|
71 | 71 | |
|
72 | 72 | </script> |
|
73 | 73 | |
|
74 | 74 | |
|
75 | 75 | </%def> |
@@ -1,90 +1,90 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('%s Branches') % c.repo_name} |
|
|
5 | ${_('%s Branches') % c.repo_name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
10 | 10 | ${_('Branches')} |
|
11 | 11 | </%def> |
|
12 | 12 | |
|
13 | 13 | <%def name="page_nav()"> |
|
14 | 14 | ${self.menu('branches')} |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | <%def name="main()"> |
|
18 | 18 | ${self.context_bar('switch-to')} |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | <!-- end box / title --> |
|
25 | 25 | %if c.repo_branches: |
|
26 | 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 | 27 | %endif |
|
28 | 28 | <div class="table"> |
|
29 | 29 | <%include file='branches_data.html'/> |
|
30 | 30 | </div> |
|
31 | 31 | </div> |
|
32 | 32 | <script type="text/javascript"> |
|
33 | 33 | YUE.on('compare_branches','click',function(e){ |
|
34 | 34 | YUE.preventDefault(e); |
|
35 | 35 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
36 | 36 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
37 | 37 | |
|
38 | 38 | if(org && other){ |
|
39 | 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 | 40 | var u = compare_url.replace('__ORG__',org.value) |
|
41 | 41 | .replace('__OTHER__',other.value); |
|
42 | 42 | window.location=u; |
|
43 | 43 | } |
|
44 | 44 | }); |
|
45 | 45 | // main table sorting |
|
46 | 46 | var myColumnDefs = [ |
|
47 | 47 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
48 | 48 | {key:"date",label:"${_('Date')}",sortable:true, |
|
49 | 49 | sortOptions: { sortFunction: dateSort }}, |
|
50 | 50 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
51 | 51 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
52 | 52 | sortOptions: { sortFunction: revisionSort }}, |
|
53 | 53 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
54 | 54 | ]; |
|
55 | 55 | |
|
56 | 56 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); |
|
57 | 57 | |
|
58 | 58 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
59 | 59 | |
|
60 | 60 | myDataSource.responseSchema = { |
|
61 | 61 | fields: [ |
|
62 | 62 | {key:"name"}, |
|
63 | 63 | {key:"date"}, |
|
64 | 64 | {key:"author"}, |
|
65 | 65 | {key:"revision"}, |
|
66 | 66 | {key:"compare"}, |
|
67 | 67 | ] |
|
68 | 68 | }; |
|
69 | 69 | |
|
70 | 70 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
71 | 71 | { |
|
72 | 72 | sortedBy:{key:"name",dir:"asc"}, |
|
73 | 73 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
74 | 74 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
75 | 75 | MSG_EMPTY:"${_('No records found.')}", |
|
76 | 76 | MSG_ERROR:"${_('Data error.')}", |
|
77 | 77 | MSG_LOADING:"${_('Loading...')}", |
|
78 | 78 | } |
|
79 | 79 | ); |
|
80 | 80 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
81 | 81 | tooltip_activate(); |
|
82 | 82 | var func = function(node){ |
|
83 | 83 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
84 | 84 | } |
|
85 | 85 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); |
|
86 | 86 | }); |
|
87 | 87 | |
|
88 | 88 | </script> |
|
89 | 89 | |
|
90 | 90 | </%def> |
@@ -1,262 +1,262 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | <%inherit file="/base/base.html"/> |
|
4 | 4 | |
|
5 | 5 | <%def name="title()"> |
|
6 |
${_('%s Changelog') % c.repo_name} |
|
|
6 | ${_('%s Changelog') % c.repo_name} · ${c.rhodecode_name} | |
|
7 | 7 | </%def> |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
|
11 | 11 | ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('changelog')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | ${self.context_bar('changelog')} |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | <div class="table"> |
|
26 | 26 | % if c.pagination: |
|
27 | 27 | <div id="graph"> |
|
28 | 28 | <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;"> |
|
29 | 29 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> |
|
30 | 30 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> |
|
31 | 31 | |
|
32 | 32 | %if c.rhodecode_db_repo.fork: |
|
33 | 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 | 34 | %endif |
|
35 | 35 | %if h.is_hg(c.rhodecode_repo): |
|
36 | 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 | 37 | %endif |
|
38 | 38 | </div> |
|
39 | 39 | <div class="container_header"> |
|
40 | 40 | ${h.form(h.url.current(),method='get')} |
|
41 | 41 | <div style="float:left"> |
|
42 | 42 | ${h.submit('set',_('Show'),class_="ui-btn")} |
|
43 | 43 | ${h.text('size',size=1,value=c.size)} |
|
44 | 44 | ${_('revisions')} |
|
45 | 45 | </div> |
|
46 | 46 | ${h.end_form()} |
|
47 | 47 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
48 | 48 | </div> |
|
49 | 49 | <div id="graph_nodes"> |
|
50 | 50 | <canvas id="graph_canvas"></canvas> |
|
51 | 51 | </div> |
|
52 | 52 | <div id="graph_content"> |
|
53 | 53 | |
|
54 | 54 | <table id="changesets"> |
|
55 | 55 | <tbody> |
|
56 | 56 | %for cnt,cs in enumerate(c.pagination): |
|
57 | 57 | <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
58 | 58 | <td class="checkbox"> |
|
59 | 59 | ${h.checkbox(cs.raw_id,class_="changeset_range")} |
|
60 | 60 | </td> |
|
61 | 61 | <td class="author"> |
|
62 | 62 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> |
|
63 | 63 | <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span> |
|
64 | 64 | </td> |
|
65 | 65 | <td class="hash"> |
|
66 | 66 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"> |
|
67 | 67 | <span class="changeset_hash">${h.show_id(cs)}</span> |
|
68 | 68 | </a> |
|
69 | 69 | </td> |
|
70 | 70 | <td class="date"> |
|
71 | 71 | <div class="date">${h.age(cs.date,True)}</div> |
|
72 | 72 | </td> |
|
73 | 73 | <td class="mid"> |
|
74 | 74 | <div class="log-container"> |
|
75 | 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 | 76 | <div class="expand"><span class="expandtext">↓ ${_('Show more')} ↓</span></div> |
|
77 | 77 | <div class="extra-container"> |
|
78 | 78 | %if c.comments.get(cs.raw_id,[]): |
|
79 | 79 | <div class="comments-container"> |
|
80 | 80 | <div class="comments-cnt" title="${('comments')}"> |
|
81 | 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 | 82 | ${len(c.comments[cs.raw_id])} |
|
83 | 83 | </a> |
|
84 | 84 | </div> |
|
85 | 85 | </div> |
|
86 | 86 | %endif |
|
87 | 87 | %if h.is_hg(c.rhodecode_repo): |
|
88 | 88 | %for book in cs.bookmarks: |
|
89 | 89 | <div class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
90 | 90 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
91 | 91 | </div> |
|
92 | 92 | %endfor |
|
93 | 93 | %endif |
|
94 | 94 | %for tag in cs.tags: |
|
95 | 95 | <div class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
96 | 96 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
97 | 97 | </div> |
|
98 | 98 | %endfor |
|
99 | 99 | %if (not c.branch_name) and cs.branch: |
|
100 | 100 | <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
101 | 101 | ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))} |
|
102 | 102 | </div> |
|
103 | 103 | %endif |
|
104 | 104 | </div> |
|
105 | 105 | </div> |
|
106 | 106 | </td> |
|
107 | 107 | </tr> |
|
108 | 108 | %endfor |
|
109 | 109 | </tbody> |
|
110 | 110 | </table> |
|
111 | 111 | |
|
112 | 112 | <div class="pagination-wh pagination-left"> |
|
113 | 113 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
114 | 114 | </div> |
|
115 | 115 | </div> |
|
116 | 116 | </div> |
|
117 | 117 | |
|
118 | 118 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
|
119 | 119 | <script type="text/javascript"> |
|
120 | 120 | YAHOO.util.Event.onDOMReady(function(){ |
|
121 | 121 | |
|
122 | 122 | //Monitor range checkboxes and build a link to changesets |
|
123 | 123 | //ranges |
|
124 | 124 | var checkboxes = YUD.getElementsByClassName('changeset_range'); |
|
125 | 125 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
|
126 | 126 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; |
|
127 | 127 | |
|
128 | 128 | var checkbox_checker = function(e){ |
|
129 | 129 | var checked_checkboxes = []; |
|
130 | 130 | for (pos in checkboxes){ |
|
131 | 131 | if(checkboxes[pos].checked){ |
|
132 | 132 | checked_checkboxes.push(checkboxes[pos]); |
|
133 | 133 | } |
|
134 | 134 | } |
|
135 | 135 | if(YUD.get('open_new_pr')){ |
|
136 | 136 | if(checked_checkboxes.length>1){ |
|
137 | 137 | YUD.setStyle('open_new_pr','display','none'); |
|
138 | 138 | } else { |
|
139 | 139 | YUD.setStyle('open_new_pr','display',''); |
|
140 | 140 | if(checked_checkboxes.length>0){ |
|
141 | 141 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; |
|
142 | 142 | }else{ |
|
143 | 143 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; |
|
144 | 144 | } |
|
145 | 145 | } |
|
146 | 146 | } |
|
147 | 147 | |
|
148 | 148 | if(checked_checkboxes.length>0){ |
|
149 | 149 | var rev_end = checked_checkboxes[0].name; |
|
150 | 150 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
|
151 | 151 | var url = url_tmpl.replace('__REVRANGE__', |
|
152 | 152 | rev_start+'...'+rev_end); |
|
153 | 153 | |
|
154 | 154 | var link = (rev_start == rev_end) |
|
155 | 155 | ? _TM['Show selected change __S'] |
|
156 | 156 | : _TM['Show selected changes __S -> __E']; |
|
157 | 157 | |
|
158 | 158 | link = link.replace('__S',rev_start.substr(0,6)); |
|
159 | 159 | link = link.replace('__E',rev_end.substr(0,6)); |
|
160 | 160 | YUD.get('rev_range_container').href = url; |
|
161 | 161 | YUD.get('rev_range_container').innerHTML = link; |
|
162 | 162 | YUD.setStyle('rev_range_container','display',''); |
|
163 | 163 | YUD.setStyle('rev_range_clear','display',''); |
|
164 | 164 | |
|
165 | 165 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); |
|
166 | 166 | YUD.setStyle('compare_fork','display','none'); |
|
167 | 167 | }else{ |
|
168 | 168 | YUD.setStyle('rev_range_container','display','none'); |
|
169 | 169 | YUD.setStyle('rev_range_clear','display','none'); |
|
170 | 170 | if (checkboxes){ |
|
171 | 171 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_end={0}'.format(checkboxes[0].name); |
|
172 | 172 | } |
|
173 | 173 | YUD.setStyle('compare_fork','display',''); |
|
174 | 174 | } |
|
175 | 175 | }; |
|
176 | 176 | YUE.onDOMReady(checkbox_checker); |
|
177 | 177 | YUE.on(checkboxes,'click', checkbox_checker); |
|
178 | 178 | |
|
179 | 179 | YUE.on('rev_range_clear','click',function(e){ |
|
180 | 180 | for (var i=0; i<checkboxes.length; i++){ |
|
181 | 181 | var cb = checkboxes[i]; |
|
182 | 182 | cb.checked = false; |
|
183 | 183 | } |
|
184 | 184 | checkbox_checker(); |
|
185 | 185 | YUE.preventDefault(e); |
|
186 | 186 | }); |
|
187 | 187 | |
|
188 | 188 | var msgs = YUQ('.message'); |
|
189 | 189 | // get first element height |
|
190 | 190 | var el = YUQ('#graph_content .container')[0]; |
|
191 | 191 | var row_h = el.clientHeight; |
|
192 | 192 | for(var i=0;i<msgs.length;i++){ |
|
193 | 193 | var m = msgs[i]; |
|
194 | 194 | |
|
195 | 195 | var h = m.clientHeight; |
|
196 | 196 | var pad = YUD.getStyle(m,'padding'); |
|
197 | 197 | if(h > row_h){ |
|
198 | 198 | var offset = row_h - (h+12); |
|
199 | 199 | YUD.setStyle(m.nextElementSibling,'display','block'); |
|
200 | 200 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
|
201 | 201 | }; |
|
202 | 202 | } |
|
203 | 203 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
204 | 204 | var elem = e.currentTarget.parentNode.parentNode; |
|
205 | 205 | YUD.setStyle(e.currentTarget,'display','none'); |
|
206 | 206 | YUD.setStyle(elem,'height','auto'); |
|
207 | 207 | |
|
208 | 208 | //redraw the graph, line_count and jsdata are global vars |
|
209 | 209 | set_canvas(100); |
|
210 | 210 | |
|
211 | 211 | var r = new BranchRenderer(); |
|
212 | 212 | r.render(jsdata,100,line_count); |
|
213 | 213 | |
|
214 | 214 | }); |
|
215 | 215 | |
|
216 | 216 | // change branch filter |
|
217 | 217 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
218 | 218 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
|
219 | 219 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
|
220 | 220 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
|
221 | 221 | var url = url.replace('__BRANCH__',selected_branch); |
|
222 | 222 | if(selected_branch != ''){ |
|
223 | 223 | window.location = url; |
|
224 | 224 | }else{ |
|
225 | 225 | window.location = url_main; |
|
226 | 226 | } |
|
227 | 227 | |
|
228 | 228 | }); |
|
229 | 229 | |
|
230 | 230 | function set_canvas(width) { |
|
231 | 231 | var c = document.getElementById('graph_nodes'); |
|
232 | 232 | var t = document.getElementById('graph_content'); |
|
233 | 233 | canvas = document.getElementById('graph_canvas'); |
|
234 | 234 | var div_h = t.clientHeight; |
|
235 | 235 | canvas.setAttribute('height',div_h); |
|
236 | 236 | canvas.setAttribute('width',width); |
|
237 | 237 | }; |
|
238 | 238 | var heads = 1; |
|
239 | 239 | var line_count = 0; |
|
240 | 240 | var jsdata = ${c.jsdata|n}; |
|
241 | 241 | |
|
242 | 242 | for (var i=0;i<jsdata.length;i++) { |
|
243 | 243 | var in_l = jsdata[i][2]; |
|
244 | 244 | for (var j in in_l) { |
|
245 | 245 | var m = in_l[j][1]; |
|
246 | 246 | if (m > line_count) |
|
247 | 247 | line_count = m; |
|
248 | 248 | } |
|
249 | 249 | } |
|
250 | 250 | set_canvas(100); |
|
251 | 251 | |
|
252 | 252 | var r = new BranchRenderer(); |
|
253 | 253 | r.render(jsdata,100,line_count); |
|
254 | 254 | |
|
255 | 255 | }); |
|
256 | 256 | </script> |
|
257 | 257 | %else: |
|
258 | 258 | ${_('There are no changes yet')} |
|
259 | 259 | %endif |
|
260 | 260 | </div> |
|
261 | 261 | </div> |
|
262 | 262 | </%def> |
@@ -1,199 +1,199 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | <%inherit file="/base/base.html"/> |
|
4 | 4 | |
|
5 | 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 | 7 | </%def> |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | ${_('changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> |
|
11 | 11 | </%def> |
|
12 | 12 | |
|
13 | 13 | <%def name="page_nav()"> |
|
14 | 14 | ${self.menu('changelog')} |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | <%def name="main()"> |
|
18 | 18 | ${self.context_bar('changelog')} |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | <script> |
|
25 | 25 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
26 | 26 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
27 | 27 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; |
|
28 | 28 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
29 | 29 | </script> |
|
30 | 30 | <div class="table"> |
|
31 | 31 | <div class="diffblock"> |
|
32 | 32 | <div class="parents"> |
|
33 | 33 | %if c.changeset.parents: |
|
34 | 34 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): |
|
35 | 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 | 36 | <br> |
|
37 | 37 | %endfor |
|
38 | 38 | %else: |
|
39 | 39 | <span>${_('No parents')}</span> |
|
40 | 40 | %endif |
|
41 | 41 | </div> |
|
42 | 42 | <div class="children"> |
|
43 | 43 | %if c.changeset.children: |
|
44 | 44 | %for n, p_cs in enumerate(reversed(c.changeset.children)): |
|
45 | 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 | 46 | <br> |
|
47 | 47 | %endfor |
|
48 | 48 | %else: |
|
49 | 49 | <span>${_('No children')}</span> |
|
50 | 50 | %endif |
|
51 | 51 | </div> |
|
52 | 52 | <div class="code-header banner"> |
|
53 | 53 | |
|
54 | 54 | <div class="hash"> |
|
55 | 55 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
56 | 56 | </div> |
|
57 | 57 | <div class="date"> |
|
58 | 58 | ${h.fmt_date(c.changeset.date)} |
|
59 | 59 | </div> |
|
60 | 60 | <div class="changeset-status-container"> |
|
61 | 61 | %if c.statuses: |
|
62 | 62 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> |
|
63 | 63 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> |
|
64 | 64 | %endif |
|
65 | 65 | </div> |
|
66 | 66 | <div class="diff-actions"> |
|
67 | 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 | 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 | 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 | 70 | ${c.ignorews_url(request.GET)} |
|
71 | 71 | ${c.context_url(request.GET)} |
|
72 | 72 | </div> |
|
73 | 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 | 74 | </div> |
|
75 | 75 | </div> |
|
76 | 76 | <div id="changeset_content"> |
|
77 | 77 | <div class="container"> |
|
78 | 78 | <div class="left"> |
|
79 | 79 | <div class="author"> |
|
80 | 80 | <div class="gravatar"> |
|
81 | 81 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> |
|
82 | 82 | </div> |
|
83 | 83 | <span>${h.person(c.changeset.author)}</span><br/> |
|
84 | 84 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> |
|
85 | 85 | </div> |
|
86 | 86 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> |
|
87 | 87 | </div> |
|
88 | 88 | <div class="right"> |
|
89 | 89 | <div class="changes"> |
|
90 | 90 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: |
|
91 | 91 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> |
|
92 | 92 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> |
|
93 | 93 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> |
|
94 | 94 | % else: |
|
95 | 95 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
96 | 96 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
97 | 97 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
98 | 98 | % endif |
|
99 | 99 | </div> |
|
100 | 100 | |
|
101 | 101 | <span class="logtags"> |
|
102 | 102 | %if len(c.changeset.parents)>1: |
|
103 | 103 | <span class="merge">${_('merge')}</span> |
|
104 | 104 | %endif |
|
105 | 105 | %if c.changeset.branch: |
|
106 | 106 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> |
|
107 | 107 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} |
|
108 | 108 | </span> |
|
109 | 109 | %endif |
|
110 | 110 | %for tag in c.changeset.tags: |
|
111 | 111 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
112 | 112 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> |
|
113 | 113 | %endfor |
|
114 | 114 | </span> |
|
115 | 115 | </div> |
|
116 | 116 | </div> |
|
117 | 117 | <span> |
|
118 | 118 | % if c.limited_diff: |
|
119 | 119 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: |
|
120 | 120 | % else: |
|
121 | 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 | 122 | %endif |
|
123 | 123 | </span> |
|
124 | 124 | <div class="cs_files"> |
|
125 | 125 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): |
|
126 | 126 | <div class="cs_${change}"> |
|
127 | 127 | <div class="node"> |
|
128 | 128 | <a href="#${FID}">${h.safe_unicode(path)}</a> |
|
129 | 129 | </div> |
|
130 | 130 | <div class="changes">${h.fancy_file_stats(stats)}</div> |
|
131 | 131 | </div> |
|
132 | 132 | %endfor |
|
133 | 133 | % if c.limited_diff: |
|
134 | 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 | 135 | % endif |
|
136 | 136 | </div> |
|
137 | 137 | </div> |
|
138 | 138 | |
|
139 | 139 | </div> |
|
140 | 140 | |
|
141 | 141 | ## diff block |
|
142 | 142 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
143 | 143 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} |
|
144 | 144 | |
|
145 | 145 | % if c.limited_diff: |
|
146 | 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 | 147 | % endif |
|
148 | 148 | |
|
149 | 149 | ## template for inline comment form |
|
150 | 150 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
151 | 151 | ${comment.comment_inline_form()} |
|
152 | 152 | |
|
153 | 153 | ## render comments and inlines |
|
154 | 154 | ${comment.generate_comments()} |
|
155 | 155 | |
|
156 | 156 | ## main comment form and it status |
|
157 | 157 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), |
|
158 | 158 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} |
|
159 | 159 | |
|
160 | 160 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
161 | 161 | <script type="text/javascript"> |
|
162 | 162 | YUE.onDOMReady(function(){ |
|
163 | 163 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
164 | 164 | var show = 'none'; |
|
165 | 165 | var target = e.currentTarget; |
|
166 | 166 | if(target == null){ |
|
167 | 167 | target = this; |
|
168 | 168 | } |
|
169 | 169 | if(target.checked){ |
|
170 | 170 | var show = '' |
|
171 | 171 | } |
|
172 | 172 | var boxid = YUD.getAttribute(target,'id_for'); |
|
173 | 173 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
174 | 174 | for(c in comments){ |
|
175 | 175 | YUD.setStyle(comments[c],'display',show); |
|
176 | 176 | } |
|
177 | 177 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
178 | 178 | for(c in btns){ |
|
179 | 179 | YUD.setStyle(btns[c],'display',show); |
|
180 | 180 | } |
|
181 | 181 | }) |
|
182 | 182 | |
|
183 | 183 | YUE.on(YUQ('.line'),'click',function(e){ |
|
184 | 184 | var tr = e.currentTarget; |
|
185 | 185 | if(tr == null){ |
|
186 | 186 | tr = this; |
|
187 | 187 | } |
|
188 | 188 | injectInlineForm(tr); |
|
189 | 189 | }); |
|
190 | 190 | |
|
191 | 191 | // inject comments into they proper positions |
|
192 | 192 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
193 | 193 | renderInlineComments(file_comments); |
|
194 | 194 | }) |
|
195 | 195 | |
|
196 | 196 | </script> |
|
197 | 197 | |
|
198 | 198 | </div> |
|
199 | 199 | </%def> |
@@ -1,122 +1,122 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 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 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | 12 | » |
|
13 | 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 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('changelog')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div class="box"> |
|
22 | 22 | <!-- box / title --> |
|
23 | 23 | <div class="title"> |
|
24 | 24 | ${self.breadcrumbs()} |
|
25 | 25 | </div> |
|
26 | 26 | <div class="table"> |
|
27 | 27 | <div id="body" class="diffblock"> |
|
28 | 28 | <div class="code-header cv"> |
|
29 | 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 | 30 | <div> |
|
31 | 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 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | <div id="changeset_compare_view_content"> |
|
36 | 36 | <div class="container"> |
|
37 | 37 | <table class="compare_view_commits noborder"> |
|
38 | 38 | %for cnt,cs in enumerate(c.cs_ranges): |
|
39 | 39 | <tr> |
|
40 | 40 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td> |
|
41 | 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 | 42 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
43 | 43 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
|
44 | 44 | <td> |
|
45 | 45 | %if c.statuses: |
|
46 | 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 | 47 | %endif |
|
48 | 48 | </td> |
|
49 | 49 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> |
|
50 | 50 | </tr> |
|
51 | 51 | %endfor |
|
52 | 52 | </table> |
|
53 | 53 | </div> |
|
54 | 54 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
|
55 | 55 | <div class="cs_files"> |
|
56 | 56 | %for cs in c.cs_ranges: |
|
57 | 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 | 58 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems(): |
|
59 | 59 | <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div> |
|
60 | 60 | %endfor |
|
61 | 61 | %endfor |
|
62 | 62 | </div> |
|
63 | 63 | </div> |
|
64 | 64 | |
|
65 | 65 | </div> |
|
66 | 66 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
67 | 67 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
68 | 68 | %for cs in c.cs_ranges: |
|
69 | 69 | ##${comment.comment_inline_form(cs)} |
|
70 | 70 | ## diff block |
|
71 | 71 | <div class="h3"> |
|
72 | 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 | 73 | <div class="gravatar"> |
|
74 | 74 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/> |
|
75 | 75 | </div> |
|
76 | 76 | <div class="right"> |
|
77 | 77 | <span class="logtags"> |
|
78 | 78 | %if len(cs.parents)>1: |
|
79 | 79 | <span class="merge">${_('merge')}</span> |
|
80 | 80 | %endif |
|
81 | 81 | %if cs.branch: |
|
82 | 82 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
83 | 83 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
84 | 84 | </span> |
|
85 | 85 | %endif |
|
86 | 86 | %if h.is_hg(c.rhodecode_repo): |
|
87 | 87 | %for book in cs.bookmarks: |
|
88 | 88 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
89 | 89 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
90 | 90 | </span> |
|
91 | 91 | %endfor |
|
92 | 92 | %endif |
|
93 | 93 | %for tag in cs.tags: |
|
94 | 94 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
95 | 95 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
96 | 96 | %endfor |
|
97 | 97 | </span> |
|
98 | 98 | </div> |
|
99 | 99 | </div> |
|
100 | 100 | ${diff_block.diff_block(c.changes[cs.raw_id])} |
|
101 | 101 | ##${comment.comments(cs)} |
|
102 | 102 | |
|
103 | 103 | %endfor |
|
104 | 104 | <script type="text/javascript"> |
|
105 | 105 | |
|
106 | 106 | YUE.onDOMReady(function(){ |
|
107 | 107 | |
|
108 | 108 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
109 | 109 | var act = e.currentTarget.nextElementSibling; |
|
110 | 110 | |
|
111 | 111 | if(YUD.hasClass(act,'active')){ |
|
112 | 112 | YUD.removeClass(act,'active'); |
|
113 | 113 | YUD.setStyle(act,'display','none'); |
|
114 | 114 | }else{ |
|
115 | 115 | YUD.addClass(act,'active'); |
|
116 | 116 | YUD.setStyle(act,'display',''); |
|
117 | 117 | } |
|
118 | 118 | }); |
|
119 | 119 | }) |
|
120 | 120 | </script> |
|
121 | 121 | </div> |
|
122 | 122 | </%def> |
@@ -1,93 +1,93 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 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 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
12 | 12 | » |
|
13 | 13 | ${_('compare')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('changelog')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div class="box"> |
|
22 | 22 | <!-- box / title --> |
|
23 | 23 | <div class="title"> |
|
24 | 24 | ${self.breadcrumbs()} |
|
25 | 25 | </div> |
|
26 | 26 | <div class="table"> |
|
27 | 27 | <div id="body" class="diffblock"> |
|
28 | 28 | <div class="code-header cv"> |
|
29 | 29 | <h3 class="code-header-title">${_('Compare View')}</h3> |
|
30 | 30 | <div> |
|
31 | 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 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | <div id="changeset_compare_view_content"> |
|
36 | 36 | ##CS |
|
37 | 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 | 38 | <%include file="compare_cs.html" /> |
|
39 | 39 | |
|
40 | 40 | ## FILES |
|
41 | 41 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
42 | 42 | |
|
43 | 43 | % if c.limited_diff: |
|
44 | 44 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
45 | 45 | % else: |
|
46 | 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 | 47 | %endif |
|
48 | 48 | |
|
49 | 49 | </div> |
|
50 | 50 | <div class="cs_files"> |
|
51 | 51 | %if not c.files: |
|
52 | 52 | <span class="empty_data">${_('No files')}</span> |
|
53 | 53 | %endif |
|
54 | 54 | %for fid, change, f, stat in c.files: |
|
55 | 55 | <div class="cs_${change}"> |
|
56 | 56 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div> |
|
57 | 57 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
58 | 58 | </div> |
|
59 | 59 | %endfor |
|
60 | 60 | </div> |
|
61 | 61 | % if c.limited_diff: |
|
62 | 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 | 63 | % endif |
|
64 | 64 | </div> |
|
65 | 65 | </div> |
|
66 | 66 | |
|
67 | 67 | ## diff block |
|
68 | 68 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
69 | 69 | %for fid, change, f, stat in c.files: |
|
70 | 70 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
71 | 71 | %endfor |
|
72 | 72 | % if c.limited_diff: |
|
73 | 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 | 74 | % endif |
|
75 | 75 | <script type="text/javascript"> |
|
76 | 76 | |
|
77 | 77 | YUE.onDOMReady(function(){ |
|
78 | 78 | |
|
79 | 79 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
80 | 80 | var act = e.currentTarget.nextElementSibling; |
|
81 | 81 | |
|
82 | 82 | if(YUD.hasClass(act,'active')){ |
|
83 | 83 | YUD.removeClass(act,'active'); |
|
84 | 84 | YUD.setStyle(act,'display','none'); |
|
85 | 85 | }else{ |
|
86 | 86 | YUD.addClass(act,'active'); |
|
87 | 87 | YUD.setStyle(act,'display',''); |
|
88 | 88 | } |
|
89 | 89 | }); |
|
90 | 90 | }) |
|
91 | 91 | </script> |
|
92 | 92 | </div> |
|
93 | 93 | </%def> |
@@ -1,47 +1,47 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 |
${_('%s File |
|
|
4 | ${_('%s File Diff') % c.repo_name} · ${c.rhodecode_name} | |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | 9 | » |
|
10 | 10 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
11 | 11 | » |
|
12 | 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 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="page_nav()"> |
|
16 | 16 | ${self.menu('files')} |
|
17 | 17 | </%def> |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | <div> |
|
25 | 25 | ## diff block |
|
26 | 26 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
27 | 27 | ${diff_block.diff_block(c.changes)} |
|
28 | 28 | </div> |
|
29 | 29 | </div> |
|
30 | 30 | <script> |
|
31 | 31 | YUE.onDOMReady(function(){ |
|
32 | 32 | |
|
33 | 33 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
34 | 34 | var act = e.currentTarget.nextElementSibling; |
|
35 | 35 | |
|
36 | 36 | if(YUD.hasClass(act,'active')){ |
|
37 | 37 | YUD.removeClass(act,'active'); |
|
38 | 38 | YUD.setStyle(act,'display','none'); |
|
39 | 39 | }else{ |
|
40 | 40 | YUD.addClass(act,'active'); |
|
41 | 41 | YUD.setStyle(act,'display',''); |
|
42 | 42 | } |
|
43 | 43 | }); |
|
44 | 44 | |
|
45 | 45 | }) |
|
46 | 46 | </script> |
|
47 | 47 | </%def> |
@@ -1,158 +1,163 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | <%def name="title()"> | |
|
4 |
${_('%s |
|
|
3 | <%def name="title(*args)"> | |
|
4 | ${_('%s Files') % c.repo_name} | |
|
5 | %if hasattr(c,'file'): | |
|
6 | · ${c.file.path or '\\'} | |
|
7 | %endif | |
|
8 | · ${c.rhodecode_name} | |
|
5 | 9 | </%def> |
|
6 | 10 | |
|
7 | 11 | <%def name="breadcrumbs_links()"> |
|
8 | 12 | ${_('Files')} |
|
9 | 13 | %if c.file: |
|
10 |
@ |
|
|
14 | @ ${h.show_id(c.changeset)} | |
|
11 | 15 | %endif |
|
12 | 16 | </%def> |
|
13 | 17 | |
|
14 | 18 | <%def name="page_nav()"> |
|
15 | 19 | ${self.menu('files')} |
|
16 | 20 | </%def> |
|
17 | 21 | |
|
18 | 22 | <%def name="main()"> |
|
19 | 23 | ${self.context_bar('files')} |
|
20 | 24 | <div class="box"> |
|
21 | 25 | <!-- box / title --> |
|
22 | 26 | <div class="title"> |
|
23 | 27 | ${self.breadcrumbs()} |
|
24 | 28 | <ul class="links"> |
|
25 | 29 | <li> |
|
26 | 30 | <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span> |
|
27 | 31 | </li> |
|
28 | 32 | </ul> |
|
29 | 33 | </div> |
|
30 | 34 | <div class="table"> |
|
31 | 35 | <div id="files_data"> |
|
32 | 36 | <%include file='files_ypjax.html'/> |
|
33 | 37 | </div> |
|
34 | 38 | </div> |
|
35 | 39 | </div> |
|
36 | 40 | |
|
37 | 41 | <script type="text/javascript"> |
|
38 | 42 | var CACHE = {}; |
|
39 | 43 | var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s |
|
40 | 44 | //used to construct links from the search list |
|
41 | 45 | var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
42 | 46 | //send the nodelist request to this url |
|
43 | 47 | var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
44 | 48 | // send the node history requst to this url |
|
45 | 49 | var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
46 | 50 | |
|
47 | 51 | var ypjax_links = function(){ |
|
48 | 52 | YUE.on(YUQ('.ypjax-link'), 'click',function(e){ |
|
49 | 53 | |
|
50 | 54 | //don't do ypjax on middle click |
|
51 | 55 | if(e.which == 2 || !History.enabled){ |
|
52 | 56 | return true; |
|
53 | 57 | } |
|
54 | 58 | |
|
55 | 59 | var el = e.currentTarget; |
|
56 | 60 | var url = el.href; |
|
57 | 61 | |
|
58 | 62 | var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}'; |
|
59 | 63 | _base_url = _base_url.replace('//','/') |
|
60 | 64 | |
|
61 | 65 | //extract rev and the f_path from url. |
|
62 | 66 | parts = url.split(_base_url) |
|
63 | 67 | if(parts.length != 2){ |
|
64 | 68 | return false; |
|
65 | 69 | } |
|
66 | 70 | |
|
67 | 71 | var parts2 = parts[1].split('/'); |
|
68 |
|
|
|
69 |
|
|
|
72 | var rev = parts2.shift(); // pop the first element which is the revision | |
|
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 | 78 | var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path); |
|
74 | 79 | var _url_base = url_base.replace('__REV__',rev); |
|
75 | 80 | |
|
76 | 81 | // Change our States and save some data for handling events |
|
77 | 82 | var data = {url:url,title:title, url_base:_url_base, |
|
78 | 83 | node_list_url:_node_list_url, rev:rev, f_path:f_path}; |
|
79 | 84 | History.pushState(data, title, url); |
|
80 | 85 | |
|
81 | 86 | //now we're sure that we can do ypjax things |
|
82 | 87 | YUE.preventDefault(e); |
|
83 | 88 | return false; |
|
84 | 89 | }); |
|
85 | 90 | } |
|
86 | 91 | |
|
87 | 92 | var callbacks = function(State){ |
|
88 | 93 | ypjax_links(); |
|
89 | 94 | tooltip_activate(); |
|
90 | 95 | fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); |
|
91 | 96 | |
|
92 | 97 | if(YUD.get('hlcode')){ |
|
93 | 98 | YUE.on('hlcode', 'mouseup', getSelectionLink); |
|
94 | 99 | } |
|
95 | 100 | //console.log(State); |
|
96 | 101 | if(YUD.get('load_node_history')){ |
|
97 | 102 | //remove all listeners due to problems of history state |
|
98 | 103 | YUE.removeListener('load_node_history', 'click'); |
|
99 | 104 | YUE.on('load_node_history', 'click', function(e){ |
|
100 | 105 | var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path); |
|
101 | 106 | ypjax(_url, 'node_history', function(o){ |
|
102 | 107 | tooltip_activate(); |
|
103 | 108 | }) |
|
104 | 109 | }); |
|
105 | 110 | } |
|
106 | 111 | // Inform Google Analytics of the change |
|
107 | 112 | if ( typeof window.pageTracker !== 'undefined' ) { |
|
108 | 113 | window.pageTracker._trackPageview(State.url); |
|
109 | 114 | } |
|
110 | 115 | } |
|
111 | 116 | |
|
112 | 117 | YUE.onDOMReady(function(){ |
|
113 | 118 | ypjax_links(); |
|
114 | 119 | var container = 'files_data'; |
|
115 | 120 | //Bind to StateChange Event |
|
116 | 121 | History.Adapter.bind(window,'statechange',function(){ |
|
117 | 122 | var State = History.getState(); |
|
118 | 123 | cache_key = State.url; |
|
119 | 124 | //check if we have this request in cache maybe ? |
|
120 | 125 | var _cache_obj = CACHE[cache_key]; |
|
121 | 126 | var _cur_time = new Date().getTime(); |
|
122 | 127 | // get from cache if it's there and not yet expired ! |
|
123 | 128 | if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){ |
|
124 | 129 | YUD.get(container).innerHTML=_cache_obj[1]; |
|
125 | 130 | YUD.setStyle(container,'opacity','1.0'); |
|
126 | 131 | |
|
127 | 132 | //callbacks after ypjax call |
|
128 | 133 | callbacks(State); |
|
129 | 134 | } |
|
130 | 135 | else{ |
|
131 | 136 | ypjax(State.url,container,function(o){ |
|
132 | 137 | //callbacks after ypjax call |
|
133 | 138 | callbacks(State); |
|
134 | 139 | if (o !== undefined){ |
|
135 | 140 | //store our request in cache |
|
136 | 141 | var _expire_on = new Date().getTime()+CACHE_EXPIRE; |
|
137 | 142 | CACHE[cache_key] = [_expire_on, o.responseText]; |
|
138 | 143 | } |
|
139 | 144 | }); |
|
140 | 145 | } |
|
141 | 146 | }); |
|
142 | 147 | |
|
143 | 148 | // init the search filter |
|
144 | 149 | var _State = { |
|
145 | 150 | url: "${h.url.current()}", |
|
146 | 151 | data: { |
|
147 | 152 | node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"), |
|
148 | 153 | url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"), |
|
149 | 154 | rev:"${c.changeset.raw_id}", |
|
150 | 155 | f_path: "${h.safe_unicode(c.file.path)}" |
|
151 | 156 | } |
|
152 | 157 | } |
|
153 | 158 | fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); |
|
154 | 159 | }); |
|
155 | 160 | |
|
156 | 161 | </script> |
|
157 | 162 | |
|
158 | 163 | </%def> |
@@ -1,92 +1,92 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 |
${_('%s |
|
|
4 | ${_('%s Files Add') % c.repo_name} · ${c.rhodecode_name} | |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="js_extra()"> |
|
8 | 8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
9 | 9 | </%def> |
|
10 | 10 | <%def name="css_extra()"> |
|
11 | 11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="breadcrumbs_links()"> |
|
15 | 15 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
16 | 16 | » |
|
17 | 17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
18 | 18 | » |
|
19 | 19 | ${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} |
|
20 | 20 | </%def> |
|
21 | 21 | |
|
22 | 22 | <%def name="page_nav()"> |
|
23 | 23 | ${self.menu('files')} |
|
24 | 24 | </%def> |
|
25 | 25 | <%def name="main()"> |
|
26 | 26 | <div class="box"> |
|
27 | 27 | <!-- box / title --> |
|
28 | 28 | <div class="title"> |
|
29 | 29 | ${self.breadcrumbs()} |
|
30 | 30 | <ul class="links"> |
|
31 | 31 | <li> |
|
32 | 32 | <span style="text-transform: uppercase;"> |
|
33 | 33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
34 | 34 | </li> |
|
35 | 35 | </ul> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="table"> |
|
38 | 38 | <div id="files_data"> |
|
39 | 39 | ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")} |
|
40 | 40 | <h3>${_('Add new file')}</h3> |
|
41 | 41 | <div class="form"> |
|
42 | 42 | <div class="fields"> |
|
43 | 43 | <div id="filename_container" class="field file"> |
|
44 | 44 | <div class="label"> |
|
45 | 45 | <label for="filename">${_('File Name')}:</label> |
|
46 | 46 | </div> |
|
47 | 47 | <div class="input"> |
|
48 | 48 | <input type="text" value="" size="30" name="filename" id="filename"> |
|
49 | 49 | ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> |
|
50 | 50 | </div> |
|
51 | 51 | </div> |
|
52 | 52 | <div id="upload_file_container" class="field" style="display:none"> |
|
53 | 53 | <div class="label"> |
|
54 | 54 | <label for="upload_file_container">${_('Upload file')}</label> |
|
55 | 55 | </div> |
|
56 | 56 | <div class="file"> |
|
57 | 57 | <input type="file" size="30" name="upload_file" id="upload_file"> |
|
58 | 58 | ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span> |
|
59 | 59 | </div> |
|
60 | 60 | </div> |
|
61 | 61 | <div class="field"> |
|
62 | 62 | <div class="label"> |
|
63 | 63 | <label for="location">${_('Location')}</label> |
|
64 | 64 | </div> |
|
65 | 65 | <div class="input"> |
|
66 | 66 | <input type="text" value="${c.f_path}" size="30" name="location" id="location"> |
|
67 | 67 | ${_('use / to separate directories')} |
|
68 | 68 | </div> |
|
69 | 69 | </div> |
|
70 | 70 | </div> |
|
71 | 71 | </div> |
|
72 | 72 | <div id="body" class="codeblock"> |
|
73 | 73 | <div id="editor_container"> |
|
74 | 74 | <pre id="editor_pre"></pre> |
|
75 | 75 | <textarea id="editor" name="content" style="display:none"></textarea> |
|
76 | 76 | </div> |
|
77 | 77 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
|
78 | 78 | <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> |
|
79 | 79 | </div> |
|
80 | 80 | <div style="text-align: l;padding-top: 5px"> |
|
81 | 81 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
82 | 82 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
83 | 83 | </div> |
|
84 | 84 | ${h.end_form()} |
|
85 | 85 | <script type="text/javascript"> |
|
86 | 86 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}"; |
|
87 | 87 | initCodeMirror('editor',reset_url); |
|
88 | 88 | </script> |
|
89 | 89 | </div> |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
|
92 | 92 | </%def> |
@@ -1,78 +1,78 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 |
${_('%s Edit |
|
|
4 | ${_('%s Files Edit') % c.repo_name} · ${c.rhodecode_name} | |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="js_extra()"> |
|
8 | 8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
9 | 9 | </%def> |
|
10 | 10 | <%def name="css_extra()"> |
|
11 | 11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="breadcrumbs_links()"> |
|
15 | 15 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
16 | 16 | » |
|
17 | 17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
18 | 18 | » |
|
19 | 19 | ${_('edit file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} |
|
20 | 20 | </%def> |
|
21 | 21 | |
|
22 | 22 | <%def name="page_nav()"> |
|
23 | 23 | ${self.menu('files')} |
|
24 | 24 | </%def> |
|
25 | 25 | <%def name="main()"> |
|
26 | 26 | <div class="box"> |
|
27 | 27 | <!-- box / title --> |
|
28 | 28 | <div class="title"> |
|
29 | 29 | ${self.breadcrumbs()} |
|
30 | 30 | <ul class="links"> |
|
31 | 31 | <li> |
|
32 | 32 | <span style="text-transform: uppercase;"> |
|
33 | 33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
34 | 34 | </li> |
|
35 | 35 | </ul> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="table"> |
|
38 | 38 | <div id="files_data"> |
|
39 | 39 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> |
|
40 | 40 | ${h.form(h.url.current(),method='post',id='eform')} |
|
41 | 41 | <div id="body" class="codeblock"> |
|
42 | 42 | <div class="code-header"> |
|
43 | 43 | <div class="stats"> |
|
44 | 44 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> |
|
45 | 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 | 46 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> |
|
47 | 47 | <div class="left item last">${c.file.mimetype}</div> |
|
48 | 48 | <div class="buttons"> |
|
49 | 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 | 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 | 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 | 52 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
53 | 53 | % if not c.file.is_binary: |
|
54 | 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 | 55 | % endif |
|
56 | 56 | % endif |
|
57 | 57 | </div> |
|
58 | 58 | </div> |
|
59 | 59 | <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> |
|
60 | 60 | </div> |
|
61 | 61 | <pre id="editor_pre"></pre> |
|
62 | 62 | <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea> |
|
63 | 63 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
|
64 | 64 | <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> |
|
65 | 65 | </div> |
|
66 | 66 | <div style="text-align: left;padding-top: 5px"> |
|
67 | 67 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
68 | 68 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
69 | 69 | </div> |
|
70 | 70 | ${h.end_form()} |
|
71 | 71 | <script type="text/javascript"> |
|
72 | 72 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}"; |
|
73 | 73 | initCodeMirror('editor',reset_url); |
|
74 | 74 | </script> |
|
75 | 75 | </div> |
|
76 | 76 | </div> |
|
77 | 77 | </div> |
|
78 | 78 | </%def> |
@@ -1,29 +1,29 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('%s Followers') % c.repo_name} |
|
|
5 | ${_('%s Followers') % c.repo_name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${_('Followers')} |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="page_nav()"> |
|
13 | 13 | ${self.menu('followers')} |
|
14 | 14 | </%def> |
|
15 | 15 | <%def name="main()"> |
|
16 | 16 | ${self.context_bar('followers')} |
|
17 | 17 | <div class="box"> |
|
18 | 18 | <!-- box / title --> |
|
19 | 19 | <div class="title"> |
|
20 | 20 | ${self.breadcrumbs()} |
|
21 | 21 | </div> |
|
22 | 22 | <!-- end box / title --> |
|
23 | 23 | <div class="table"> |
|
24 | 24 | <div id="followers"> |
|
25 | 25 | ${c.followers_data} |
|
26 | 26 | </div> |
|
27 | 27 | </div> |
|
28 | 28 | </div> |
|
29 | 29 | </%def> |
@@ -1,100 +1,100 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('%s Fork') % c.repo_name} |
|
|
5 | ${_('%s Fork') % c.repo_name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
12 | 12 | » |
|
13 | 13 | ${_('fork')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="main()"> |
|
17 | 17 | ${self.context_bar('showforks')} |
|
18 | 18 | <div class="box"> |
|
19 | 19 | <!-- box / title --> |
|
20 | 20 | <div class="title"> |
|
21 | 21 | ${self.breadcrumbs()} |
|
22 | 22 | </div> |
|
23 | 23 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} |
|
24 | 24 | <div class="form"> |
|
25 | 25 | <!-- fields --> |
|
26 | 26 | <div class="fields"> |
|
27 | 27 | <div class="field"> |
|
28 | 28 | <div class="label"> |
|
29 | 29 | <label for="repo_name">${_('Fork name')}:</label> |
|
30 | 30 | </div> |
|
31 | 31 | <div class="input"> |
|
32 | 32 | ${h.text('repo_name',class_="small")} |
|
33 | 33 | ${h.hidden('repo_type',c.repo_info.repo_type)} |
|
34 | 34 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="field"> |
|
38 | 38 | <div class="label"> |
|
39 | 39 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
40 | 40 | </div> |
|
41 | 41 | <div class="input"> |
|
42 | 42 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} |
|
43 | 43 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
44 | 44 | </div> |
|
45 | 45 | </div> |
|
46 | 46 | <div class="field"> |
|
47 | 47 | <div class="label"> |
|
48 | 48 | <label for="repo_group">${_('Repository group')}:</label> |
|
49 | 49 | </div> |
|
50 | 50 | <div class="input"> |
|
51 | 51 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
52 | 52 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> |
|
53 | 53 | </div> |
|
54 | 54 | </div> |
|
55 | 55 | <div class="field"> |
|
56 | 56 | <div class="label label-textarea"> |
|
57 | 57 | <label for="description">${_('Description')}:</label> |
|
58 | 58 | </div> |
|
59 | 59 | <div class="textarea text-area editor"> |
|
60 | 60 | ${h.textarea('description',cols=23,rows=5)} |
|
61 | 61 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
62 | 62 | </div> |
|
63 | 63 | </div> |
|
64 | 64 | <div class="field"> |
|
65 | 65 | <div class="label label-checkbox"> |
|
66 | 66 | <label for="private">${_('Private')}:</label> |
|
67 | 67 | </div> |
|
68 | 68 | <div class="checkboxes"> |
|
69 | 69 | ${h.checkbox('private',value="True")} |
|
70 | 70 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
71 | 71 | </div> |
|
72 | 72 | </div> |
|
73 | 73 | <div class="field"> |
|
74 | 74 | <div class="label label-checkbox"> |
|
75 | 75 | <label for="private">${_('Copy permissions')}:</label> |
|
76 | 76 | </div> |
|
77 | 77 | <div class="checkboxes"> |
|
78 | 78 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
79 | 79 | <span class="help-block">${_('Copy permissions from forked repository')}</span> |
|
80 | 80 | </div> |
|
81 | 81 | </div> |
|
82 | 82 | %if c.can_update: |
|
83 | 83 | <div class="field"> |
|
84 | 84 | <div class="label label-checkbox"> |
|
85 | 85 | <label for="private">${_('Update after clone')}:</label> |
|
86 | 86 | </div> |
|
87 | 87 | <div class="checkboxes"> |
|
88 | 88 | ${h.checkbox('update_after_clone',value="True")} |
|
89 | 89 | <span class="help-block">${_('Checkout source after making a clone')}</span> |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
|
92 | 92 | %endif |
|
93 | 93 | <div class="buttons"> |
|
94 | 94 | ${h.submit('',_('Fork this repository'),class_="ui-btn large")} |
|
95 | 95 | </div> |
|
96 | 96 | </div> |
|
97 | 97 | </div> |
|
98 | 98 | ${h.end_form()} |
|
99 | 99 | </div> |
|
100 | 100 | </%def> |
@@ -1,26 +1,26 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('%s Forks') % c.repo_name} |
|
|
5 | ${_('%s Forks') % c.repo_name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${_('Forks')} |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="main()"> |
|
13 | 13 | ${self.context_bar('showforks')} |
|
14 | 14 | <div class="box"> |
|
15 | 15 | <!-- box / title --> |
|
16 | 16 | <div class="title"> |
|
17 | 17 | ${self.breadcrumbs()} |
|
18 | 18 | </div> |
|
19 | 19 | <!-- end box / title --> |
|
20 | 20 | <div class="table"> |
|
21 | 21 | <div id="forks"> |
|
22 | 22 | ${c.forks_data} |
|
23 | 23 | </div> |
|
24 | 24 | </div> |
|
25 | 25 | </div> |
|
26 | 26 | </%def> |
@@ -1,8 +1,8 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="base/base.html"/> |
|
3 |
<%def name="title()">${_('Dashboard')} |
|
|
3 | <%def name="title()">${_('Dashboard')} · ${c.rhodecode_name}</%def> | |
|
4 | 4 | <%def name="breadcrumbs()"></%def> |
|
5 | 5 | <%def name="page_nav()">${self.menu('home')}</%def> |
|
6 | 6 | <%def name="main()"> |
|
7 | 7 | <%include file="index_base.html" args="parent=self"/> |
|
8 | 8 | </%def> |
@@ -1,367 +1,367 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | <%def name="title()"> |
|
4 |
${_('Journal')} |
|
|
4 | ${_('Journal')} · ${c.rhodecode_name} | |
|
5 | 5 | </%def> |
|
6 | 6 | <%def name="breadcrumbs()"> |
|
7 | 7 | <h5> |
|
8 | 8 | <form id="filter_form"> |
|
9 | 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 | 10 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> |
|
11 | 11 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> |
|
12 | 12 | ${_('journal')} - ${ungettext('%s entry', '%s entries', c.journal_pager.item_count) % (c.journal_pager.item_count)} |
|
13 | 13 | </form> |
|
14 | 14 | ${h.end_form()} |
|
15 | 15 | </h5> |
|
16 | 16 | </%def> |
|
17 | 17 | <%def name="page_nav()"> |
|
18 | 18 | ${self.menu('journal')} |
|
19 | 19 | </%def> |
|
20 | 20 | <%def name="head_extra()"> |
|
21 | 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 | 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 | 23 | </%def> |
|
24 | 24 | <%def name="main()"> |
|
25 | 25 | |
|
26 | 26 | <div class="box box-left"> |
|
27 | 27 | <!-- box / title --> |
|
28 | 28 | <div class="title"> |
|
29 | 29 | ${self.breadcrumbs()} |
|
30 | 30 | <ul class="links"> |
|
31 | 31 | <li> |
|
32 | 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 | 33 | </li> |
|
34 | 34 | <li> |
|
35 | 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 | 36 | </li> |
|
37 | 37 | </ul> |
|
38 | 38 | </div> |
|
39 | 39 | <div id="journal">${c.journal_data}</div> |
|
40 | 40 | </div> |
|
41 | 41 | <div class="box box-right"> |
|
42 | 42 | <!-- box / title --> |
|
43 | 43 | |
|
44 | 44 | <div class="title"> |
|
45 | 45 | <h5> |
|
46 | 46 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> |
|
47 | 47 | <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> |
|
48 | 48 | </h5> |
|
49 | 49 | <ul class="links" style="color:#DADADA"> |
|
50 | 50 | <li> |
|
51 | 51 | <span><a id="show_watched" class="link-white current" href="#watched">${_('Watched')}</a> </span> |
|
52 | 52 | </li> |
|
53 | 53 | <li> |
|
54 | 54 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> |
|
55 | 55 | </li> |
|
56 | 56 | </ul> |
|
57 | 57 | </div> |
|
58 | 58 | |
|
59 | 59 | <!-- end box / title --> |
|
60 | 60 | <div id="my_container" style="display:none"> |
|
61 | 61 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> |
|
62 | 62 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
63 | 63 | </div> |
|
64 | 64 | |
|
65 | 65 | <div id="watched_container"> |
|
66 | 66 | <div class="table yui-skin-sam" id="watched_repos_list_wrap"></div> |
|
67 | 67 | <div id="watched-user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
68 | 68 | </div> |
|
69 | 69 | </div> |
|
70 | 70 | |
|
71 | 71 | <script type="text/javascript"> |
|
72 | 72 | |
|
73 | 73 | YUE.on('j_filter','click',function(){ |
|
74 | 74 | var jfilter = YUD.get('j_filter'); |
|
75 | 75 | if(YUD.hasClass(jfilter, 'initial')){ |
|
76 | 76 | jfilter.value = ''; |
|
77 | 77 | } |
|
78 | 78 | }); |
|
79 | 79 | var fix_j_filter_width = function(len){ |
|
80 | 80 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); |
|
81 | 81 | } |
|
82 | 82 | YUE.on('j_filter','keyup',function(){ |
|
83 | 83 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
84 | 84 | }); |
|
85 | 85 | YUE.on('filter_form','submit',function(e){ |
|
86 | 86 | YUE.preventDefault(e) |
|
87 | 87 | var val = YUD.get('j_filter').value; |
|
88 | 88 | window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val); |
|
89 | 89 | }); |
|
90 | 90 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
91 | 91 | |
|
92 | 92 | YUE.on('refresh','click',function(e){ |
|
93 | 93 | ypjax("${h.url.current(filter=c.search_term)}","journal",function(){ |
|
94 | 94 | show_more_event(); |
|
95 | 95 | tooltip_activate(); |
|
96 | 96 | show_changeset_tooltip(); |
|
97 | 97 | }); |
|
98 | 98 | YUE.preventDefault(e); |
|
99 | 99 | }); |
|
100 | 100 | |
|
101 | 101 | var show_my = function(e){ |
|
102 | 102 | YUD.setStyle('watched_container','display','none'); |
|
103 | 103 | YUD.setStyle('my_container','display',''); |
|
104 | 104 | YUD.setStyle('q_filter','display',''); |
|
105 | 105 | YUD.setStyle('q_filter_watched','display','none'); |
|
106 | 106 | |
|
107 | 107 | YUD.addClass('show_my', 'current'); |
|
108 | 108 | YUD.removeClass('show_watched','current'); |
|
109 | 109 | |
|
110 | 110 | if(!YUD.hasClass('show_my', 'loaded')){ |
|
111 | 111 | table_renderer(${c.data |n}); |
|
112 | 112 | YUD.addClass('show_my', 'loaded'); |
|
113 | 113 | } |
|
114 | 114 | } |
|
115 | 115 | YUE.on('show_my','click',function(e){ |
|
116 | 116 | show_my(e); |
|
117 | 117 | }) |
|
118 | 118 | var show_watched = function(e){ |
|
119 | 119 | YUD.setStyle('my_container','display','none'); |
|
120 | 120 | YUD.setStyle('watched_container','display',''); |
|
121 | 121 | YUD.setStyle('q_filter_watched','display',''); |
|
122 | 122 | YUD.setStyle('q_filter','display','none'); |
|
123 | 123 | |
|
124 | 124 | YUD.addClass('show_watched', 'current'); |
|
125 | 125 | YUD.removeClass('show_my','current'); |
|
126 | 126 | if(!YUD.hasClass('show_watched', 'loaded')){ |
|
127 | 127 | watched_renderer(${c.watched_data |n}); |
|
128 | 128 | YUD.addClass('show_watched', 'loaded'); |
|
129 | 129 | } |
|
130 | 130 | |
|
131 | 131 | return |
|
132 | 132 | var nodes = YUQ('#watched_container .watched_repo a'); |
|
133 | 133 | var target = 'q_filter'; |
|
134 | 134 | var func = function(node){ |
|
135 | 135 | return node.parentNode.parentNode; |
|
136 | 136 | } |
|
137 | 137 | q_filter(target,nodes,func); |
|
138 | 138 | } |
|
139 | 139 | YUE.on('show_watched','click',function(e){ |
|
140 | 140 | show_watched(e); |
|
141 | 141 | }) |
|
142 | 142 | //init watched |
|
143 | 143 | show_watched(); |
|
144 | 144 | |
|
145 | 145 | var tabs = { |
|
146 | 146 | 'watched': show_watched, |
|
147 | 147 | 'my': show_my, |
|
148 | 148 | } |
|
149 | 149 | var url = location.href.split('#'); |
|
150 | 150 | if (url[1]) { |
|
151 | 151 | //We have a hash |
|
152 | 152 | var tabHash = url[1]; |
|
153 | 153 | var func = tabs[tabHash] |
|
154 | 154 | if (func){ |
|
155 | 155 | func(); |
|
156 | 156 | } |
|
157 | 157 | } |
|
158 | 158 | function watched_renderer(data){ |
|
159 | 159 | var myDataSource = new YAHOO.util.DataSource(data); |
|
160 | 160 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
161 | 161 | |
|
162 | 162 | myDataSource.responseSchema = { |
|
163 | 163 | resultsList: "records", |
|
164 | 164 | fields: [ |
|
165 | 165 | {key:"menu"}, |
|
166 | 166 | {key:"raw_name"}, |
|
167 | 167 | {key:"name"}, |
|
168 | 168 | {key:"last_changeset"}, |
|
169 | 169 | {key:"action"}, |
|
170 | 170 | ] |
|
171 | 171 | }; |
|
172 | 172 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
173 | 173 | // This is the filter function |
|
174 | 174 | var data = res.results || [], |
|
175 | 175 | filtered = [], |
|
176 | 176 | i,l; |
|
177 | 177 | |
|
178 | 178 | if (req) { |
|
179 | 179 | req = req.toLowerCase(); |
|
180 | 180 | for (i = 0; i<data.length; i++) { |
|
181 | 181 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
182 | 182 | if (pos != -1) { |
|
183 | 183 | filtered.push(data[i]); |
|
184 | 184 | } |
|
185 | 185 | } |
|
186 | 186 | res.results = filtered; |
|
187 | 187 | } |
|
188 | 188 | return res; |
|
189 | 189 | } |
|
190 | 190 | // main table sorting |
|
191 | 191 | var myColumnDefs = [ |
|
192 | 192 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
193 | 193 | {key:"name",label:"${_('Name')}",sortable:true, |
|
194 | 194 | sortOptions: { sortFunction: nameSort }}, |
|
195 | 195 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
196 | 196 | sortOptions: { sortFunction: revisionSort }}, |
|
197 | 197 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
198 | 198 | ]; |
|
199 | 199 | |
|
200 | 200 | var myDataTable = new YAHOO.widget.DataTable("watched_repos_list_wrap", myColumnDefs, myDataSource,{ |
|
201 | 201 | sortedBy:{key:"name",dir:"asc"}, |
|
202 | 202 | paginator: new YAHOO.widget.Paginator({ |
|
203 | 203 | rowsPerPage: 25, |
|
204 | 204 | alwaysVisible: false, |
|
205 | 205 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
206 | 206 | pageLinks: 5, |
|
207 | 207 | containerClass: 'pagination-wh', |
|
208 | 208 | currentPageClass: 'pager_curpage', |
|
209 | 209 | pageLinkClass: 'pager_link', |
|
210 | 210 | nextPageLinkLabel: '>', |
|
211 | 211 | previousPageLinkLabel: '<', |
|
212 | 212 | firstPageLinkLabel: '<<', |
|
213 | 213 | lastPageLinkLabel: '>>', |
|
214 | 214 | containers:['watched-user-paginator'] |
|
215 | 215 | }), |
|
216 | 216 | |
|
217 | 217 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
218 | 218 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
219 | 219 | MSG_EMPTY:"${_('No records found.')}", |
|
220 | 220 | MSG_ERROR:"${_('Data error.')}", |
|
221 | 221 | MSG_LOADING:"${_('Loading...')}", |
|
222 | 222 | } |
|
223 | 223 | ); |
|
224 | 224 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
225 | 225 | tooltip_activate(); |
|
226 | 226 | quick_repo_menu(); |
|
227 | 227 | }); |
|
228 | 228 | |
|
229 | 229 | var filterTimeout = null; |
|
230 | 230 | |
|
231 | 231 | updateFilter = function () { |
|
232 | 232 | // Reset timeout |
|
233 | 233 | filterTimeout = null; |
|
234 | 234 | |
|
235 | 235 | // Reset sort |
|
236 | 236 | var state = myDataTable.getState(); |
|
237 | 237 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
238 | 238 | |
|
239 | 239 | // Get filtered data |
|
240 | 240 | myDataSource.sendRequest(YUD.get('q_filter_watched').value,{ |
|
241 | 241 | success : myDataTable.onDataReturnInitializeTable, |
|
242 | 242 | failure : myDataTable.onDataReturnInitializeTable, |
|
243 | 243 | scope : myDataTable, |
|
244 | 244 | argument: state |
|
245 | 245 | }); |
|
246 | 246 | |
|
247 | 247 | }; |
|
248 | 248 | YUE.on('q_filter_watched','click',function(){ |
|
249 | 249 | if(!YUD.hasClass('q_filter_watched', 'loaded')){ |
|
250 | 250 | YUD.get('q_filter_watched').value = ''; |
|
251 | 251 | //TODO: load here full list later to do search within groups |
|
252 | 252 | YUD.addClass('q_filter_watched', 'loaded'); |
|
253 | 253 | } |
|
254 | 254 | }); |
|
255 | 255 | |
|
256 | 256 | YUE.on('q_filter_watched','keyup',function (e) { |
|
257 | 257 | clearTimeout(filterTimeout); |
|
258 | 258 | filterTimeout = setTimeout(updateFilter,600); |
|
259 | 259 | }); |
|
260 | 260 | } |
|
261 | 261 | |
|
262 | 262 | function table_renderer(data){ |
|
263 | 263 | var myDataSource = new YAHOO.util.DataSource(data); |
|
264 | 264 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
265 | 265 | |
|
266 | 266 | myDataSource.responseSchema = { |
|
267 | 267 | resultsList: "records", |
|
268 | 268 | fields: [ |
|
269 | 269 | {key:"menu"}, |
|
270 | 270 | {key:"raw_name"}, |
|
271 | 271 | {key:"name"}, |
|
272 | 272 | {key:"last_changeset"}, |
|
273 | 273 | {key:"action"}, |
|
274 | 274 | ] |
|
275 | 275 | }; |
|
276 | 276 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
277 | 277 | // This is the filter function |
|
278 | 278 | var data = res.results || [], |
|
279 | 279 | filtered = [], |
|
280 | 280 | i,l; |
|
281 | 281 | |
|
282 | 282 | if (req) { |
|
283 | 283 | req = req.toLowerCase(); |
|
284 | 284 | for (i = 0; i<data.length; i++) { |
|
285 | 285 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
286 | 286 | if (pos != -1) { |
|
287 | 287 | filtered.push(data[i]); |
|
288 | 288 | } |
|
289 | 289 | } |
|
290 | 290 | res.results = filtered; |
|
291 | 291 | } |
|
292 | 292 | return res; |
|
293 | 293 | } |
|
294 | 294 | // main table sorting |
|
295 | 295 | var myColumnDefs = [ |
|
296 | 296 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
297 | 297 | {key:"name",label:"${_('Name')}",sortable:true, |
|
298 | 298 | sortOptions: { sortFunction: nameSort }}, |
|
299 | 299 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
300 | 300 | sortOptions: { sortFunction: revisionSort }}, |
|
301 | 301 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
302 | 302 | ]; |
|
303 | 303 | |
|
304 | 304 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
|
305 | 305 | sortedBy:{key:"name",dir:"asc"}, |
|
306 | 306 | paginator: new YAHOO.widget.Paginator({ |
|
307 | 307 | rowsPerPage: 25, |
|
308 | 308 | alwaysVisible: false, |
|
309 | 309 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
310 | 310 | pageLinks: 5, |
|
311 | 311 | containerClass: 'pagination-wh', |
|
312 | 312 | currentPageClass: 'pager_curpage', |
|
313 | 313 | pageLinkClass: 'pager_link', |
|
314 | 314 | nextPageLinkLabel: '>', |
|
315 | 315 | previousPageLinkLabel: '<', |
|
316 | 316 | firstPageLinkLabel: '<<', |
|
317 | 317 | lastPageLinkLabel: '>>', |
|
318 | 318 | containers:['user-paginator'] |
|
319 | 319 | }), |
|
320 | 320 | |
|
321 | 321 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
322 | 322 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
323 | 323 | MSG_EMPTY:"${_('No records found.')}", |
|
324 | 324 | MSG_ERROR:"${_('Data error.')}", |
|
325 | 325 | MSG_LOADING:"${_('Loading...')}", |
|
326 | 326 | } |
|
327 | 327 | ); |
|
328 | 328 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
329 | 329 | tooltip_activate(); |
|
330 | 330 | quick_repo_menu(); |
|
331 | 331 | }); |
|
332 | 332 | |
|
333 | 333 | var filterTimeout = null; |
|
334 | 334 | |
|
335 | 335 | updateFilter = function () { |
|
336 | 336 | // Reset timeout |
|
337 | 337 | filterTimeout = null; |
|
338 | 338 | |
|
339 | 339 | // Reset sort |
|
340 | 340 | var state = myDataTable.getState(); |
|
341 | 341 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
342 | 342 | |
|
343 | 343 | // Get filtered data |
|
344 | 344 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
345 | 345 | success : myDataTable.onDataReturnInitializeTable, |
|
346 | 346 | failure : myDataTable.onDataReturnInitializeTable, |
|
347 | 347 | scope : myDataTable, |
|
348 | 348 | argument: state |
|
349 | 349 | }); |
|
350 | 350 | |
|
351 | 351 | }; |
|
352 | 352 | YUE.on('q_filter','click',function(){ |
|
353 | 353 | if(!YUD.hasClass('q_filter', 'loaded')){ |
|
354 | 354 | YUD.get('q_filter').value = ''; |
|
355 | 355 | //TODO: load here full list later to do search within groups |
|
356 | 356 | YUD.addClass('q_filter', 'loaded'); |
|
357 | 357 | } |
|
358 | 358 | }); |
|
359 | 359 | |
|
360 | 360 | YUE.on('q_filter','keyup',function (e) { |
|
361 | 361 | clearTimeout(filterTimeout); |
|
362 | 362 | filterTimeout = setTimeout(updateFilter,600); |
|
363 | 363 | }); |
|
364 | 364 | } |
|
365 | 365 | |
|
366 | 366 | </script> |
|
367 | 367 | </%def> |
@@ -1,32 +1,32 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | <%def name="title()"> |
|
4 |
${_('Journal')} |
|
|
4 | ${_('Public Journal')} · ${c.rhodecode_name} | |
|
5 | 5 | </%def> |
|
6 | 6 | <%def name="breadcrumbs()"> |
|
7 | 7 | ${c.rhodecode_name} |
|
8 | 8 | </%def> |
|
9 | 9 | <%def name="page_nav()"> |
|
10 | 10 | ${self.menu('journal')} |
|
11 | 11 | </%def> |
|
12 | 12 | <%def name="head_extra()"> |
|
13 | 13 | <link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" /> |
|
14 | 14 | <link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" /> |
|
15 | 15 | </%def> |
|
16 | 16 | <%def name="main()"> |
|
17 | 17 | |
|
18 | 18 | <div class="box"> |
|
19 | 19 | <!-- box / title --> |
|
20 | 20 | <div class="title"> |
|
21 | 21 | <h5>${_('Public Journal')}</h5> |
|
22 | 22 | <ul class="links"> |
|
23 | 23 | <li> |
|
24 | 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 | 25 | </li> |
|
26 | 26 | </ul> |
|
27 | 27 | </div> |
|
28 | 28 | |
|
29 | 29 | <div id="journal">${c.journal_data}</div> |
|
30 | 30 | </div> |
|
31 | 31 | |
|
32 | 32 | </%def> |
@@ -1,77 +1,77 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="base/root.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_(' |
|
|
5 | ${_('Log In')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <div id="login"> |
|
9 | 9 | <div class="flash_msg"> |
|
10 | 10 | <% messages = h.flash.pop_messages() %> |
|
11 | 11 | % if messages: |
|
12 | 12 | <ul id="flash-messages"> |
|
13 | 13 | % for message in messages: |
|
14 | 14 | <li class="${message.category}_msg">${message}</li> |
|
15 | 15 | % endfor |
|
16 | 16 | </ul> |
|
17 | 17 | % endif |
|
18 | 18 | </div> |
|
19 | 19 | <!-- login --> |
|
20 | 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 | 22 | </div> |
|
23 | 23 | <div class="inner"> |
|
24 | 24 | ${h.form(h.url.current(came_from=c.came_from))} |
|
25 | 25 | <div class="form"> |
|
26 | 26 | <!-- fields --> |
|
27 | 27 | |
|
28 | 28 | <div class="fields"> |
|
29 | 29 | <div class="field"> |
|
30 | 30 | <div class="label"> |
|
31 | 31 | <label for="username">${_('Username')}:</label> |
|
32 | 32 | </div> |
|
33 | 33 | <div class="input"> |
|
34 | 34 | ${h.text('username',class_='focus large')} |
|
35 | 35 | </div> |
|
36 | 36 | |
|
37 | 37 | </div> |
|
38 | 38 | <div class="field"> |
|
39 | 39 | <div class="label"> |
|
40 | 40 | <label for="password">${_('Password')}:</label> |
|
41 | 41 | </div> |
|
42 | 42 | <div class="input"> |
|
43 | 43 | ${h.password('password',class_='focus large')} |
|
44 | 44 | </div> |
|
45 | 45 | |
|
46 | 46 | </div> |
|
47 | 47 | <div class="field"> |
|
48 | 48 | <div class="checkbox"> |
|
49 | 49 | <input type="checkbox" id="remember" name="remember" /> |
|
50 | 50 | <label for="remember">${_('Remember me')}</label> |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | <div class="buttons"> |
|
54 | 54 | ${h.submit('sign_in',_('Sign In'),class_="ui-btn large")} |
|
55 | 55 | </div> |
|
56 | 56 | </div> |
|
57 | 57 | <!-- end fields --> |
|
58 | 58 | <!-- links --> |
|
59 | 59 | <div class="links"> |
|
60 | 60 | ${h.link_to(_('Forgot your password ?'),h.url('reset_password'))} |
|
61 | 61 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
62 | 62 | / |
|
63 | 63 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
64 | 64 | %endif |
|
65 | 65 | </div> |
|
66 | 66 | |
|
67 | 67 | <!-- end links --> |
|
68 | 68 | </div> |
|
69 | 69 | ${h.end_form()} |
|
70 | 70 | <script type="text/javascript"> |
|
71 | 71 | YUE.onDOMReady(function(){ |
|
72 | 72 | YUD.get('username').focus(); |
|
73 | 73 | }) |
|
74 | 74 | </script> |
|
75 | 75 | </div> |
|
76 | 76 | <!-- end login --> |
|
77 | 77 | </div> |
@@ -1,43 +1,43 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="base/root.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_(' |
|
|
5 | ${_('Password Reset')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <div id="register"> |
|
9 | 9 | |
|
10 | 10 | <div class="title top-left-rounded-corner top-right-rounded-corner"> |
|
11 | 11 | <h5>${_('Reset your password to')} ${c.rhodecode_name}</h5> |
|
12 | 12 | </div> |
|
13 | 13 | <div class="inner"> |
|
14 | 14 | ${h.form(url('password_reset'))} |
|
15 | 15 | <div class="form"> |
|
16 | 16 | <!-- fields --> |
|
17 | 17 | <div class="fields"> |
|
18 | 18 | |
|
19 | 19 | <div class="field"> |
|
20 | 20 | <div class="label"> |
|
21 | 21 | <label for="email">${_('Email address')}:</label> |
|
22 | 22 | </div> |
|
23 | 23 | <div class="input"> |
|
24 | 24 | ${h.text('email')} |
|
25 | 25 | </div> |
|
26 | 26 | </div> |
|
27 | 27 | |
|
28 | 28 | <div class="buttons"> |
|
29 | 29 | <div class="nohighlight"> |
|
30 | 30 | ${h.submit('send',_('Reset my password'),class_="ui-btn large")} |
|
31 | 31 | <div class="activation_msg">${_('Password reset link will be send to matching email address')}</div> |
|
32 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | </div> |
|
36 | 36 | ${h.end_form()} |
|
37 | 37 | <script type="text/javascript"> |
|
38 | 38 | YUE.onDOMReady(function(){ |
|
39 | 39 | YUD.get('email').focus(); |
|
40 | 40 | }) |
|
41 | 41 | </script> |
|
42 | 42 | </div> |
|
43 | 43 | </div> |
@@ -1,248 +1,248 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 |
${ |
|
|
4 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} · ${c.rhodecode_name} | |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | 9 | » |
|
10 | 10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
11 | 11 | » |
|
12 | 12 | ${_('Pull request #%s') % c.pull_request.pull_request_id} |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="main()"> |
|
16 | 16 | ${self.context_bar('showpullrequest')} |
|
17 | 17 | <div class="box"> |
|
18 | 18 | <!-- box / title --> |
|
19 | 19 | <div class="title"> |
|
20 | 20 | ${self.breadcrumbs()} |
|
21 | 21 | </div> |
|
22 | 22 | %if c.pull_request.is_closed(): |
|
23 | 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 | 24 | %endif |
|
25 | 25 | <h3> |
|
26 | 26 | %if c.pull_request.is_closed(): |
|
27 | 27 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> |
|
28 | 28 | %endif |
|
29 | 29 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(c.pull_request.last_review_status))}" /> |
|
30 | 30 | ${_('Title')}: ${c.pull_request.title}</h3> |
|
31 | 31 | |
|
32 | 32 | <div class="form"> |
|
33 | 33 | <div id="summary" class="fields"> |
|
34 | 34 | <div class="field"> |
|
35 | 35 | <div class="label-summary"> |
|
36 | 36 | <label>${_('Review status')}:</label> |
|
37 | 37 | </div> |
|
38 | 38 | <div class="input"> |
|
39 | 39 | <div class="changeset-status-container" style="float:none;clear:both"> |
|
40 | 40 | %if c.current_changeset_status: |
|
41 | 41 | <div title="${_('Pull request status')}" class="changeset-status-lbl">${h.changeset_status_lbl(c.current_changeset_status)}</div> |
|
42 | 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 | 43 | %endif |
|
44 | 44 | </div> |
|
45 | 45 | </div> |
|
46 | 46 | </div> |
|
47 | 47 | <div class="field"> |
|
48 | 48 | <div class="label-summary"> |
|
49 | 49 | <label>${_('Still not reviewed by')}:</label> |
|
50 | 50 | </div> |
|
51 | 51 | <div class="input"> |
|
52 | 52 | % if len(c.pull_request_pending_reviewers) > 0: |
|
53 | 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 | 54 | %else: |
|
55 | 55 | <div>${_('pull request was reviewed by all reviewers')}</div> |
|
56 | 56 | %endif |
|
57 | 57 | </div> |
|
58 | 58 | </div> |
|
59 | 59 | <div class="field"> |
|
60 | 60 | <div class="label-summary"> |
|
61 | 61 | <label>${_('Origin repository')}:</label> |
|
62 | 62 | </div> |
|
63 | 63 | <div class="input"> |
|
64 | 64 | <div> |
|
65 | 65 | ##%if h.is_hg(c.pull_request.org_repo): |
|
66 | 66 | ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
67 | 67 | ##%elif h.is_git(c.pull_request.org_repo): |
|
68 | 68 | ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
69 | 69 | ##%endif |
|
70 | 70 | <span class="spantag">${c.pull_request.org_ref_parts[0]}: ${c.pull_request.org_ref_parts[1]}</span> |
|
71 | 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 | 72 | </div> |
|
73 | 73 | </div> |
|
74 | 74 | </div> |
|
75 | 75 | <div class="field"> |
|
76 | 76 | <div class="label-summary"> |
|
77 | 77 | <label>${_('Summary')}:</label> |
|
78 | 78 | </div> |
|
79 | 79 | <div class="input"> |
|
80 | 80 | <div style="white-space:pre-wrap">${h.literal(c.pull_request.description)}</div> |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | <div class="field"> |
|
84 | 84 | <div class="label-summary"> |
|
85 | 85 | <label>${_('Created on')}:</label> |
|
86 | 86 | </div> |
|
87 | 87 | <div class="input"> |
|
88 | 88 | <div>${h.fmt_date(c.pull_request.created_on)}</div> |
|
89 | 89 | </div> |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
|
92 | 92 | </div> |
|
93 | 93 | |
|
94 | 94 | <div style="overflow: auto;"> |
|
95 | 95 | ##DIFF |
|
96 | 96 | <div class="table" style="float:left;clear:none"> |
|
97 | 97 | <div id="body" class="diffblock"> |
|
98 | 98 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> |
|
99 | 99 | </div> |
|
100 | 100 | <div id="changeset_compare_view_content"> |
|
101 | 101 | ##CS |
|
102 | 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 | 103 | <%include file="/compare/compare_cs.html" /> |
|
104 | 104 | |
|
105 | 105 | ## FILES |
|
106 | 106 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
107 | 107 | |
|
108 | 108 | % if c.limited_diff: |
|
109 | 109 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
110 | 110 | % else: |
|
111 | 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 | 112 | %endif |
|
113 | 113 | |
|
114 | 114 | </div> |
|
115 | 115 | <div class="cs_files"> |
|
116 | 116 | %if not c.files: |
|
117 | 117 | <span class="empty_data">${_('No files')}</span> |
|
118 | 118 | %endif |
|
119 | 119 | %for fid, change, f, stat in c.files: |
|
120 | 120 | <div class="cs_${change}"> |
|
121 | 121 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> |
|
122 | 122 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
123 | 123 | </div> |
|
124 | 124 | %endfor |
|
125 | 125 | </div> |
|
126 | 126 | % if c.limited_diff: |
|
127 | 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 | 128 | % endif |
|
129 | 129 | </div> |
|
130 | 130 | </div> |
|
131 | 131 | ## REVIEWERS |
|
132 | 132 | <div style="float:left; border-left:1px dashed #eee"> |
|
133 | 133 | <h4>${_('Pull request reviewers')}</h4> |
|
134 | 134 | <div id="reviewers" style="padding:0px 0px 5px 10px"> |
|
135 | 135 | ## members goes here ! |
|
136 | 136 | <div class="group_members_wrap" style="min-height:45px"> |
|
137 | 137 | <ul id="review_members" class="group_members"> |
|
138 | 138 | %for member,status in c.pull_request_reviewers: |
|
139 | 139 | <li id="reviewer_${member.user_id}"> |
|
140 | 140 | <div class="reviewers_member"> |
|
141 | 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 | 142 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> |
|
143 | 143 | </div> |
|
144 | 144 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
145 | 145 | <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div> |
|
146 | 146 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
147 | 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 | 148 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> |
|
149 | 149 | %endif |
|
150 | 150 | </div> |
|
151 | 151 | </li> |
|
152 | 152 | %endfor |
|
153 | 153 | </ul> |
|
154 | 154 | </div> |
|
155 | 155 | %if not c.pull_request.is_closed(): |
|
156 | 156 | <div class='ac'> |
|
157 | 157 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id: |
|
158 | 158 | <div class="reviewer_ac"> |
|
159 | 159 | ${h.text('user', class_='yui-ac-input')} |
|
160 | 160 | <span class="help-block">${_('Add or remove reviewer to this pull request.')}</span> |
|
161 | 161 | <div id="reviewers_container"></div> |
|
162 | 162 | </div> |
|
163 | 163 | <div style="padding:0px 10px"> |
|
164 | 164 | <span id="update_pull_request" class="ui-btn xsmall">${_('Save changes')}</span> |
|
165 | 165 | </div> |
|
166 | 166 | %endif |
|
167 | 167 | </div> |
|
168 | 168 | %endif |
|
169 | 169 | </div> |
|
170 | 170 | </div> |
|
171 | 171 | </div> |
|
172 | 172 | <script> |
|
173 | 173 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
174 | 174 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
175 | 175 | // TODO: switch this to pyroutes |
|
176 | 176 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; |
|
177 | 177 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
178 | 178 | |
|
179 | 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 | 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 | 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 | 183 | </script> |
|
184 | 184 | |
|
185 | 185 | ## diff block |
|
186 | 186 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
187 | 187 | %for fid, change, f, stat in c.files: |
|
188 | 188 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
189 | 189 | %endfor |
|
190 | 190 | % if c.limited_diff: |
|
191 | 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 | 192 | % endif |
|
193 | 193 | |
|
194 | 194 | |
|
195 | 195 | ## template for inline comment form |
|
196 | 196 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
197 | 197 | ${comment.comment_inline_form()} |
|
198 | 198 | |
|
199 | 199 | ## render comments and inlines |
|
200 | 200 | ${comment.generate_comments(include_pr=True)} |
|
201 | 201 | |
|
202 | 202 | % if not c.pull_request.is_closed(): |
|
203 | 203 | ## main comment form and it status |
|
204 | 204 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, |
|
205 | 205 | pull_request_id=c.pull_request.pull_request_id), |
|
206 | 206 | c.current_changeset_status, |
|
207 | 207 | close_btn=True, change_status=c.allowed_to_change_status)} |
|
208 | 208 | %endif |
|
209 | 209 | |
|
210 | 210 | <script type="text/javascript"> |
|
211 | 211 | YUE.onDOMReady(function(){ |
|
212 | 212 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
213 | 213 | |
|
214 | 214 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
215 | 215 | var show = 'none'; |
|
216 | 216 | var target = e.currentTarget; |
|
217 | 217 | if(target.checked){ |
|
218 | 218 | var show = '' |
|
219 | 219 | } |
|
220 | 220 | var boxid = YUD.getAttribute(target,'id_for'); |
|
221 | 221 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
222 | 222 | for(c in comments){ |
|
223 | 223 | YUD.setStyle(comments[c],'display',show); |
|
224 | 224 | } |
|
225 | 225 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
226 | 226 | for(c in btns){ |
|
227 | 227 | YUD.setStyle(btns[c],'display',show); |
|
228 | 228 | } |
|
229 | 229 | }) |
|
230 | 230 | |
|
231 | 231 | YUE.on(YUQ('.line'),'click',function(e){ |
|
232 | 232 | var tr = e.currentTarget; |
|
233 | 233 | injectInlineForm(tr); |
|
234 | 234 | }); |
|
235 | 235 | |
|
236 | 236 | // inject comments into they proper positions |
|
237 | 237 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
238 | 238 | renderInlineComments(file_comments); |
|
239 | 239 | |
|
240 | 240 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ |
|
241 | 241 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
242 | 242 | }) |
|
243 | 243 | }) |
|
244 | 244 | </script> |
|
245 | 245 | |
|
246 | 246 | </div> |
|
247 | 247 | |
|
248 | 248 | </%def> |
@@ -1,38 +1,38 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | ${c.repo_name} ${_('all pull requests')} | |
|
4 | ${_('%s Pull Requests') % c.repo_name} · ${c.rhodecode_name} | |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${_('Pull requests')} |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | 11 | <%def name="main()"> |
|
12 | 12 | ${self.context_bar('showpullrequest')} |
|
13 | 13 | <div class="box"> |
|
14 | 14 | <!-- box / title --> |
|
15 | 15 | <div class="title"> |
|
16 | 16 | ${self.breadcrumbs()} |
|
17 | 17 | </div> |
|
18 | 18 | |
|
19 | 19 | %for pr in c.pull_requests: |
|
20 | 20 | <div> |
|
21 | 21 | <h4 style="border:0px;padding:0px"> |
|
22 | 22 | %if pr.is_closed(): |
|
23 | 23 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> |
|
24 | 24 | %endif |
|
25 | 25 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(pr.last_review_status))}" /> |
|
26 | 26 | <a href="${h.url('pullrequest_show',repo_name=c.repo_name,pull_request_id=pr.pull_request_id)}"> |
|
27 | 27 | ${_('Pull request #%s opened by %s on %s') % (pr.pull_request_id, pr.author.full_name, h.fmt_date(pr.created_on))} |
|
28 | 28 | </a> |
|
29 | 29 | </h4> |
|
30 | 30 | <h5 style="border:0px;padding-bottom:0px">${_('Title')}: ${pr.title}</h5> |
|
31 | 31 | <div style="padding:0px 24px">${pr.description}</div> |
|
32 | 32 | <div style="border-bottom: 1px solid #DDD;margin:10px 20px;padding-bottom:10px"></div> |
|
33 | 33 | </div> |
|
34 | 34 | %endfor |
|
35 | 35 | |
|
36 | 36 | </div> |
|
37 | 37 | |
|
38 | 38 | </%def> |
@@ -1,91 +1,91 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="base/root.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('Sign Up')} |
|
|
5 | ${_('Sign Up')} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <div id="register"> |
|
9 | 9 | |
|
10 | 10 | <div class="title top-left-rounded-corner top-right-rounded-corner"> |
|
11 | 11 | <h5>${_('Sign Up to')} ${c.rhodecode_name}</h5> |
|
12 | 12 | </div> |
|
13 | 13 | <div class="inner"> |
|
14 | 14 | ${h.form(url('register'))} |
|
15 | 15 | <div class="form"> |
|
16 | 16 | <!-- fields --> |
|
17 | 17 | <div class="fields"> |
|
18 | 18 | <div class="field"> |
|
19 | 19 | <div class="label"> |
|
20 | 20 | <label for="username">${_('Username')}:</label> |
|
21 | 21 | </div> |
|
22 | 22 | <div class="input"> |
|
23 | 23 | ${h.text('username',class_="medium")} |
|
24 | 24 | </div> |
|
25 | 25 | </div> |
|
26 | 26 | |
|
27 | 27 | <div class="field"> |
|
28 | 28 | <div class="label"> |
|
29 | 29 | <label for="password">${_('Password')}:</label> |
|
30 | 30 | </div> |
|
31 | 31 | <div class="input"> |
|
32 | 32 | ${h.password('password',class_="medium")} |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | |
|
36 | 36 | <div class="field"> |
|
37 | 37 | <div class="label"> |
|
38 | 38 | <label for="password">${_('Re-enter password')}:</label> |
|
39 | 39 | </div> |
|
40 | 40 | <div class="input"> |
|
41 | 41 | ${h.password('password_confirmation',class_="medium")} |
|
42 | 42 | </div> |
|
43 | 43 | </div> |
|
44 | 44 | |
|
45 | 45 | <div class="field"> |
|
46 | 46 | <div class="label"> |
|
47 | 47 | <label for="firstname">${_('First Name')}:</label> |
|
48 | 48 | </div> |
|
49 | 49 | <div class="input"> |
|
50 | 50 | ${h.text('firstname',class_="medium")} |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | |
|
54 | 54 | <div class="field"> |
|
55 | 55 | <div class="label"> |
|
56 | 56 | <label for="lastname">${_('Last Name')}:</label> |
|
57 | 57 | </div> |
|
58 | 58 | <div class="input"> |
|
59 | 59 | ${h.text('lastname',class_="medium")} |
|
60 | 60 | </div> |
|
61 | 61 | </div> |
|
62 | 62 | |
|
63 | 63 | <div class="field"> |
|
64 | 64 | <div class="label"> |
|
65 | 65 | <label for="email">${_('Email')}:</label> |
|
66 | 66 | </div> |
|
67 | 67 | <div class="input"> |
|
68 | 68 | ${h.text('email',class_="medium")} |
|
69 | 69 | </div> |
|
70 | 70 | </div> |
|
71 | 71 | |
|
72 | 72 | <div class="buttons"> |
|
73 | 73 | <div class="nohighlight"> |
|
74 | 74 | ${h.submit('sign_up',_('Sign Up'),class_="ui-btn large")} |
|
75 | 75 | %if c.auto_active: |
|
76 | 76 | <div class="activation_msg">${_('Your account will be activated right after registration')}</div> |
|
77 | 77 | %else: |
|
78 | 78 | <div class="activation_msg">${_('Your account must wait for activation by administrator')}</div> |
|
79 | 79 | %endif |
|
80 | 80 | </div> |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | </div> |
|
84 | 84 | ${h.end_form()} |
|
85 | 85 | <script type="text/javascript"> |
|
86 | 86 | YUE.onDOMReady(function(){ |
|
87 | 87 | YUD.get('username').focus(); |
|
88 | 88 | }) |
|
89 | 89 | </script> |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
@@ -1,87 +1,87 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | %if c.repo_name: |
|
6 |
${_('Search repository')} ${c.repo_name} |
|
|
6 | ${_('Search repository')} ${c.repo_name} · ${c.rhodecode_name} | |
|
7 | 7 | %else: |
|
8 | 8 | ${_('Search in all repositories')} |
|
9 | 9 | %endif |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="breadcrumbs_links()"> |
|
13 | 13 | %if c.repo_name: |
|
14 | 14 | ${_('Search')} |
|
15 | 15 | %else: |
|
16 | 16 | ${_('Search in all repositories')} |
|
17 | 17 | %endif |
|
18 | 18 | %if c.cur_query: |
|
19 | 19 | » |
|
20 | 20 | ${c.cur_query} |
|
21 | 21 | %endif |
|
22 | 22 | </%def> |
|
23 | 23 | |
|
24 | 24 | <%def name="page_nav()"> |
|
25 | 25 | %if c.repo_name: |
|
26 | 26 | ${self.menu('options')} |
|
27 | 27 | %else: |
|
28 | 28 | ${self.menu('search')} |
|
29 | 29 | %endif |
|
30 | 30 | </%def> |
|
31 | 31 | <%def name="main()"> |
|
32 | 32 | ${self.context_bar('options')} |
|
33 | 33 | <div class="box"> |
|
34 | 34 | <!-- box / title --> |
|
35 | 35 | <div class="title"> |
|
36 | 36 | ${self.breadcrumbs()} |
|
37 | 37 | </div> |
|
38 | 38 | <!-- end box / title --> |
|
39 | 39 | %if c.repo_name: |
|
40 | 40 | ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')} |
|
41 | 41 | %else: |
|
42 | 42 | ${h.form(h.url('search'),method='get')} |
|
43 | 43 | %endif |
|
44 | 44 | <div class="form"> |
|
45 | 45 | <div class="fields"> |
|
46 | 46 | <div class="field field-first field-noborder"> |
|
47 | 47 | <div class="label"> |
|
48 | 48 | <label for="q">${_('Search term')}</label> |
|
49 | 49 | </div> |
|
50 | 50 | <div class="input">${h.text('q',c.cur_query,class_="small")} |
|
51 | 51 | <div class="button highlight"> |
|
52 | 52 | <input type="submit" value="${_('Search')}" class="ui-button"/> |
|
53 | 53 | </div> |
|
54 | 54 | </div> |
|
55 | 55 | <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> |
|
56 | 56 | </div> |
|
57 | 57 | |
|
58 | 58 | <div class="field"> |
|
59 | 59 | <div class="label"> |
|
60 | 60 | <label for="type">${_('Search in')}</label> |
|
61 | 61 | </div> |
|
62 | 62 | <div class="select"> |
|
63 | 63 | ${h.select('type',c.cur_type,[('content',_('File contents')), |
|
64 | 64 | ('commit',_('Commit messages')), |
|
65 | 65 | ('path',_('File names')), |
|
66 | 66 | ##('repository',_('Repository names')), |
|
67 | 67 | ])} |
|
68 | 68 | </div> |
|
69 | 69 | </div> |
|
70 | 70 | |
|
71 | 71 | </div> |
|
72 | 72 | </div> |
|
73 | 73 | ${h.end_form()} |
|
74 | 74 | <div class="search"> |
|
75 | 75 | %if c.cur_type == 'content': |
|
76 | 76 | <%include file='search_content.html'/> |
|
77 | 77 | %elif c.cur_type == 'path': |
|
78 | 78 | <%include file='search_path.html'/> |
|
79 | 79 | %elif c.cur_type == 'commit': |
|
80 | 80 | <%include file='search_commit.html'/> |
|
81 | 81 | %elif c.cur_type == 'repository': |
|
82 | 82 | <%include file='search_repository.html'/> |
|
83 | 83 | %endif |
|
84 | 84 | </div> |
|
85 | 85 | </div> |
|
86 | 86 | |
|
87 | 87 | </%def> |
@@ -1,146 +1,146 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('%s Settings') % c.repo_name} |
|
|
5 | ${_('%s Settings') % c.repo_name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} |
|
12 | 12 | » |
|
13 | 13 | ${_('Settings')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('settings')} |
|
18 | 18 | </%def> |
|
19 | 19 | <%def name="main()"> |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')} |
|
26 | 26 | <div class="form"> |
|
27 | 27 | <!-- fields --> |
|
28 | 28 | <div class="fields"> |
|
29 | 29 | <div class="field"> |
|
30 | 30 | <div class="label"> |
|
31 | 31 | <label for="repo_name">${_('Name')}:</label> |
|
32 | 32 | </div> |
|
33 | 33 | <div class="input input-medium"> |
|
34 | 34 | ${h.text('repo_name',class_="small")} |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="field"> |
|
38 | 38 | <div class="label"> |
|
39 | 39 | <label for="clone_uri">${_('Clone uri')}:</label> |
|
40 | 40 | </div> |
|
41 | 41 | <div class="input"> |
|
42 | 42 | ${h.text('clone_uri',class_="medium")} |
|
43 | 43 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
44 | 44 | </div> |
|
45 | 45 | </div> |
|
46 | 46 | <div class="field"> |
|
47 | 47 | <div class="label"> |
|
48 | 48 | <label for="repo_group">${_('Repository group')}:</label> |
|
49 | 49 | </div> |
|
50 | 50 | <div class="input"> |
|
51 | 51 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
52 | 52 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> |
|
53 | 53 | </div> |
|
54 | 54 | </div> |
|
55 | 55 | <div class="field"> |
|
56 | 56 | <div class="label"> |
|
57 | 57 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
58 | 58 | </div> |
|
59 | 59 | <div class="input"> |
|
60 | 60 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
61 | 61 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
62 | 62 | </div> |
|
63 | 63 | </div> |
|
64 | 64 | <div class="field"> |
|
65 | 65 | <div class="label label-textarea"> |
|
66 | 66 | <label for="repo_description">${_('Description')}:</label> |
|
67 | 67 | </div> |
|
68 | 68 | <div class="textarea text-area editor"> |
|
69 | 69 | ${h.textarea('repo_description')} |
|
70 | 70 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
71 | 71 | </div> |
|
72 | 72 | </div> |
|
73 | 73 | |
|
74 | 74 | <div class="field"> |
|
75 | 75 | <div class="label label-checkbox"> |
|
76 | 76 | <label for="repo_private">${_('Private repository')}:</label> |
|
77 | 77 | </div> |
|
78 | 78 | <div class="checkboxes"> |
|
79 | 79 | ${h.checkbox('repo_private',value="True")} |
|
80 | 80 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | %if c.visual.repository_fields: |
|
84 | 84 | ## EXTRA FIELDS |
|
85 | 85 | %for field in c.repo_fields: |
|
86 | 86 | <div class="field"> |
|
87 | 87 | <div class="label"> |
|
88 | 88 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
89 | 89 | </div> |
|
90 | 90 | <div class="input input-medium"> |
|
91 | 91 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
92 | 92 | %if field.field_desc: |
|
93 | 93 | <span class="help-block">${field.field_desc}</span> |
|
94 | 94 | %endif |
|
95 | 95 | </div> |
|
96 | 96 | </div> |
|
97 | 97 | %endfor |
|
98 | 98 | %endif |
|
99 | 99 | |
|
100 | 100 | <div class="field"> |
|
101 | 101 | <div class="label"> |
|
102 | 102 | <label for="">${_('Permissions')}:</label> |
|
103 | 103 | </div> |
|
104 | 104 | <div class="input"> |
|
105 | 105 | <%include file="../admin/repos/repo_edit_perms.html"/> |
|
106 | 106 | </div> |
|
107 | 107 | </div> |
|
108 | 108 | |
|
109 | 109 | <div class="buttons"> |
|
110 | 110 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
111 | 111 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
112 | 112 | </div> |
|
113 | 113 | |
|
114 | 114 | </div> |
|
115 | 115 | ${h.end_form()} |
|
116 | 116 | </div> |
|
117 | 117 | |
|
118 | 118 | <h3>${_('Delete repository')}</h3> |
|
119 | 119 | <div class="form"> |
|
120 | 120 | <!-- fields --> |
|
121 | 121 | <div class="fields"> |
|
122 | 122 | |
|
123 | 123 | <div class="field"> |
|
124 | 124 | <div class="label"> |
|
125 | 125 | <label for="">${_('Remove repo')}:</label> |
|
126 | 126 | </div> |
|
127 | 127 | <div class="checkboxes"> |
|
128 | 128 | ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')} |
|
129 | 129 | <div class=""> |
|
130 | 130 | <div class="fields"> |
|
131 | 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 | 132 | </div> |
|
133 | 133 | <div class="field" style="border:none;color:#888"> |
|
134 | 134 | <ul> |
|
135 | 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 | 136 | </ul> |
|
137 | 137 | </div> |
|
138 | 138 | </div> |
|
139 | 139 | ${h.end_form()} |
|
140 | 140 | </div> |
|
141 | 141 | </div> |
|
142 | 142 | </div> |
|
143 | 143 | </div> |
|
144 | 144 | |
|
145 | 145 | </div> |
|
146 | 146 | </%def> |
@@ -1,36 +1,36 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('%s |
|
|
5 | ${_('%s Lightweight Changelog') % c.repo_name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 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 | 13 | ${c.file_history} |
|
14 | 14 | %else: |
|
15 |
${_(' |
|
|
15 | ${_('Lightweight Changelog')} | |
|
16 | 16 | %endif |
|
17 | 17 | </%def> |
|
18 | 18 | |
|
19 | 19 | <%def name="page_nav()"> |
|
20 | 20 | ${self.menu('shortlog')} |
|
21 | 21 | </%def> |
|
22 | 22 | <%def name="main()"> |
|
23 | 23 | ${self.context_bar('options')} |
|
24 | 24 | <div class="box"> |
|
25 | 25 | <!-- box / title --> |
|
26 | 26 | <div class="title"> |
|
27 | 27 | ${self.breadcrumbs()} |
|
28 | 28 | </div> |
|
29 | 29 | <!-- end box / title --> |
|
30 | 30 | <div class="table"> |
|
31 | 31 | <div id="shortlog_data"> |
|
32 | 32 | ${c.shortlog_data} |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | </div> |
|
36 | 36 | </%def> |
@@ -1,739 +1,739 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 |
${_('%s Summary') % c.repo_name} |
|
|
4 | ${_('%s Summary') % c.repo_name} · ${c.rhodecode_name} | |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${_('Summary')} |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | 11 | <%def name="page_nav()"> |
|
12 | 12 | ${self.menu('summary')} |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="head_extra()"> |
|
16 | 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 | 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 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | ${self.context_bar('summary')} |
|
22 | 22 | <% |
|
23 | 23 | summary = lambda n:{False:'summary-short'}.get(n) |
|
24 | 24 | %> |
|
25 | 25 | %if c.show_stats: |
|
26 | 26 | <div class="box box-left"> |
|
27 | 27 | %else: |
|
28 | 28 | <div class="box"> |
|
29 | 29 | %endif |
|
30 | 30 | <!-- box / title --> |
|
31 | 31 | <div class="title"> |
|
32 | 32 | ${self.breadcrumbs()} |
|
33 | 33 | </div> |
|
34 | 34 | <!-- end box / title --> |
|
35 | 35 | <div class="form"> |
|
36 | 36 | <div id="summary" class="fields"> |
|
37 | 37 | |
|
38 | 38 | <div class="field"> |
|
39 | 39 | <div class="label-summary"> |
|
40 | 40 | <label>${_('Name')}:</label> |
|
41 | 41 | </div> |
|
42 | 42 | <div class="input ${summary(c.show_stats)}"> |
|
43 | 43 | |
|
44 | 44 | ## locking icon |
|
45 | 45 | %if c.rhodecode_db_repo.enable_locking: |
|
46 | 46 | %if c.rhodecode_db_repo.locked[0]: |
|
47 | 47 | <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span> |
|
48 | 48 | %else: |
|
49 | 49 | <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span> |
|
50 | 50 | %endif |
|
51 | 51 | %endif |
|
52 | 52 | ##REPO TYPE |
|
53 | 53 | %if h.is_hg(c.dbrepo): |
|
54 | 54 | <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
55 | 55 | %endif |
|
56 | 56 | %if h.is_git(c.dbrepo): |
|
57 | 57 | <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
58 | 58 | %endif |
|
59 | 59 | |
|
60 | 60 | ##PUBLIC/PRIVATE |
|
61 | 61 | %if c.dbrepo.private: |
|
62 | 62 | <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
|
63 | 63 | %else: |
|
64 | 64 | <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
|
65 | 65 | %endif |
|
66 | 66 | |
|
67 | 67 | ##REPO NAME |
|
68 | 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 | 70 | ##FORK |
|
71 | 71 | %if c.dbrepo.fork: |
|
72 | 72 | <div style="margin-top:5px;clear:both"> |
|
73 | 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 | 74 | ${_('Fork of')} ${c.dbrepo.fork.repo_name} |
|
75 | 75 | </a> |
|
76 | 76 | </div> |
|
77 | 77 | %endif |
|
78 | 78 | ##REMOTE |
|
79 | 79 | %if c.dbrepo.clone_uri: |
|
80 | 80 | <div style="margin-top:5px;clear:both"> |
|
81 | 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 | 82 | ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)} |
|
83 | 83 | </a> |
|
84 | 84 | </div> |
|
85 | 85 | %endif |
|
86 | 86 | </div> |
|
87 | 87 | </div> |
|
88 | 88 | |
|
89 | 89 | <div class="field"> |
|
90 | 90 | <div class="label-summary"> |
|
91 | 91 | <label>${_('Description')}:</label> |
|
92 | 92 | </div> |
|
93 | 93 | %if c.visual.stylify_metatags: |
|
94 | 94 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div> |
|
95 | 95 | %else: |
|
96 | 96 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div> |
|
97 | 97 | %endif |
|
98 | 98 | </div> |
|
99 | 99 | |
|
100 | 100 | <div class="field"> |
|
101 | 101 | <div class="label-summary"> |
|
102 | 102 | <label>${_('Contact')}:</label> |
|
103 | 103 | </div> |
|
104 | 104 | <div class="input ${summary(c.show_stats)}"> |
|
105 | 105 | <div class="gravatar"> |
|
106 | 106 | <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/> |
|
107 | 107 | </div> |
|
108 | 108 | ${_('Username')}: ${c.dbrepo.user.username}<br/> |
|
109 | 109 | ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/> |
|
110 | 110 | ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a> |
|
111 | 111 | </div> |
|
112 | 112 | </div> |
|
113 | 113 | |
|
114 | 114 | <div class="field"> |
|
115 | 115 | <div class="label-summary"> |
|
116 | 116 | <label>${_('Clone url')}:</label> |
|
117 | 117 | </div> |
|
118 | 118 | <div class="input ${summary(c.show_stats)}"> |
|
119 | 119 | <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> |
|
120 | 120 | <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> |
|
121 | 121 | <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> |
|
122 | 122 | <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> |
|
123 | 123 | </div> |
|
124 | 124 | </div> |
|
125 | 125 | |
|
126 | 126 | <div class="field"> |
|
127 | 127 | <div class="label-summary"> |
|
128 | 128 | <label>${_('Trending files')}:</label> |
|
129 | 129 | </div> |
|
130 | 130 | <div class="input ${summary(c.show_stats)}"> |
|
131 | 131 | %if c.show_stats: |
|
132 | 132 | <div id="lang_stats"></div> |
|
133 | 133 | %else: |
|
134 | 134 | ${_('Statistics are disabled for this repository')} |
|
135 | 135 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
136 | 136 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
137 | 137 | %endif |
|
138 | 138 | %endif |
|
139 | 139 | </div> |
|
140 | 140 | </div> |
|
141 | 141 | |
|
142 | 142 | <div class="field"> |
|
143 | 143 | <div class="label-summary"> |
|
144 | 144 | <label>${_('Download')}:</label> |
|
145 | 145 | </div> |
|
146 | 146 | <div class="input ${summary(c.show_stats)}"> |
|
147 | 147 | %if len(c.rhodecode_repo.revisions) == 0: |
|
148 | 148 | ${_('There are no downloads yet')} |
|
149 | 149 | %elif c.enable_downloads is False: |
|
150 | 150 | ${_('Downloads are disabled for this repository')} |
|
151 | 151 | %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
|
152 | 152 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
153 | 153 | %endif |
|
154 | 154 | %else: |
|
155 | 155 | ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)} |
|
156 | 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 | 157 | <span style="vertical-align: bottom"> |
|
158 | 158 | <input id="archive_subrepos" type="checkbox" name="subrepos" /> |
|
159 | 159 | <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label> |
|
160 | 160 | </span> |
|
161 | 161 | %endif |
|
162 | 162 | </div> |
|
163 | 163 | </div> |
|
164 | 164 | </div> |
|
165 | 165 | <div id="summary-menu-stats"> |
|
166 | 166 | <ul> |
|
167 | 167 | <li> |
|
168 | 168 | <a class="followers" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> |
|
169 | 169 | ${_('Followers')} |
|
170 | 170 | <span style="float:right" id="current_followers_count">${c.repository_followers}</span> |
|
171 | 171 | </a> |
|
172 | 172 | </li> |
|
173 | 173 | <li> |
|
174 | 174 | <a class="forks" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> |
|
175 | 175 | ${_('Forks')} |
|
176 | 176 | <span style="float:right">${c.repository_forks}</span> |
|
177 | 177 | </a> |
|
178 | 178 | </li> |
|
179 | 179 | |
|
180 | 180 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
181 | 181 | <li> |
|
182 | 182 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): |
|
183 | 183 | ${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')} |
|
184 | 184 | %else: |
|
185 | 185 | ${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')} |
|
186 | 186 | %endif |
|
187 | 187 | </li> |
|
188 | 188 | %endif |
|
189 | 189 | |
|
190 | 190 | <li> |
|
191 | 191 | %if c.rhodecode_user.username != 'default': |
|
192 | 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 | 193 | %else: |
|
194 | 194 | ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='feed')} |
|
195 | 195 | %endif |
|
196 | 196 | </li> |
|
197 | 197 | |
|
198 | 198 | %if c.rhodecode_user.username != 'default': |
|
199 | 199 | <li class="repo_size"> |
|
200 | 200 | <a href="#" class="repo-size" onclick="javascript:showRepoSize('repo_size_2','${c.dbrepo.repo_name}','${str(h.get_token())}')">Repository Size</a> |
|
201 | 201 | <span id="repo_size_2"></span> |
|
202 | 202 | </li> |
|
203 | 203 | %endif |
|
204 | 204 | </ul> |
|
205 | 205 | </div> |
|
206 | 206 | </div> |
|
207 | 207 | </div> |
|
208 | 208 | |
|
209 | 209 | %if c.show_stats: |
|
210 | 210 | <div class="box box-right" style="min-height:455px"> |
|
211 | 211 | <!-- box / title --> |
|
212 | 212 | <div class="title"> |
|
213 | 213 | <h5>${_('Commit activity by day / author')}</h5> |
|
214 | 214 | </div> |
|
215 | 215 | |
|
216 | 216 | <div class="graph"> |
|
217 | 217 | <div style="padding:0 10px 10px 17px;"> |
|
218 | 218 | %if c.no_data: |
|
219 | 219 | ${c.no_data_msg} |
|
220 | 220 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
221 | 221 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
222 | 222 | %endif |
|
223 | 223 | %else: |
|
224 | 224 | ${_('Stats gathered: ')} ${c.stats_percentage}% |
|
225 | 225 | %endif |
|
226 | 226 | </div> |
|
227 | 227 | <div id="commit_history" style="width:450px;height:300px;float:left"></div> |
|
228 | 228 | <div style="clear: both;height: 10px"></div> |
|
229 | 229 | <div id="overview" style="width:450px;height:100px;float:left"></div> |
|
230 | 230 | |
|
231 | 231 | <div id="legend_data" style="clear:both;margin-top:10px;"> |
|
232 | 232 | <div id="legend_container"></div> |
|
233 | 233 | <div id="legend_choices"> |
|
234 | 234 | <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table> |
|
235 | 235 | </div> |
|
236 | 236 | </div> |
|
237 | 237 | </div> |
|
238 | 238 | </div> |
|
239 | 239 | %endif |
|
240 | 240 | |
|
241 | 241 | <div class="box"> |
|
242 | 242 | <div class="title"> |
|
243 | 243 | <div class="breadcrumbs"> |
|
244 | 244 | %if c.repo_changesets: |
|
245 | 245 | ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))} |
|
246 | 246 | %else: |
|
247 | 247 | ${_('Quick start')} |
|
248 | 248 | %endif |
|
249 | 249 | </div> |
|
250 | 250 | </div> |
|
251 | 251 | <div class="table"> |
|
252 | 252 | <div id="shortlog_data"> |
|
253 | 253 | <%include file='../shortlog/shortlog_data.html'/> |
|
254 | 254 | </div> |
|
255 | 255 | </div> |
|
256 | 256 | </div> |
|
257 | 257 | |
|
258 | 258 | %if c.readme_data: |
|
259 | 259 | <div id="readme" class="anchor"> |
|
260 | 260 | <div class="box" style="background-color: #FAFAFA"> |
|
261 | 261 | <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}"> |
|
262 | 262 | <div class="breadcrumbs"> |
|
263 | 263 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> |
|
264 | 264 | <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">¶</a> |
|
265 | 265 | </div> |
|
266 | 266 | </div> |
|
267 | 267 | <div class="readme"> |
|
268 | 268 | <div class="readme_box"> |
|
269 | 269 | ${c.readme_data|n} |
|
270 | 270 | </div> |
|
271 | 271 | </div> |
|
272 | 272 | </div> |
|
273 | 273 | </div> |
|
274 | 274 | %endif |
|
275 | 275 | |
|
276 | 276 | <script type="text/javascript"> |
|
277 | 277 | var clone_url = 'clone_url'; |
|
278 | 278 | YUE.on(clone_url,'click',function(e){ |
|
279 | 279 | if(YUD.hasClass(clone_url,'selected')){ |
|
280 | 280 | return |
|
281 | 281 | } |
|
282 | 282 | else{ |
|
283 | 283 | YUD.addClass(clone_url,'selected'); |
|
284 | 284 | YUD.get(clone_url).select(); |
|
285 | 285 | } |
|
286 | 286 | }) |
|
287 | 287 | |
|
288 | 288 | YUE.on('clone_by_name','click',function(e){ |
|
289 | 289 | // show url by name and hide name button |
|
290 | 290 | YUD.setStyle('clone_url','display',''); |
|
291 | 291 | YUD.setStyle('clone_by_name','display','none'); |
|
292 | 292 | |
|
293 | 293 | // hide url by id and show name button |
|
294 | 294 | YUD.setStyle('clone_by_id','display',''); |
|
295 | 295 | YUD.setStyle('clone_url_id','display','none'); |
|
296 | 296 | |
|
297 | 297 | }) |
|
298 | 298 | YUE.on('clone_by_id','click',function(e){ |
|
299 | 299 | |
|
300 | 300 | // show url by id and hide id button |
|
301 | 301 | YUD.setStyle('clone_by_id','display','none'); |
|
302 | 302 | YUD.setStyle('clone_url_id','display',''); |
|
303 | 303 | |
|
304 | 304 | // hide url by name and show id button |
|
305 | 305 | YUD.setStyle('clone_by_name','display',''); |
|
306 | 306 | YUD.setStyle('clone_url','display','none'); |
|
307 | 307 | }) |
|
308 | 308 | |
|
309 | 309 | |
|
310 | 310 | var tmpl_links = {}; |
|
311 | 311 | %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): |
|
312 | 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 | 313 | %endfor |
|
314 | 314 | |
|
315 | 315 | YUE.on(['download_options','archive_subrepos'],'change',function(e){ |
|
316 | 316 | var sm = YUD.get('download_options'); |
|
317 | 317 | var new_cs = sm.options[sm.selectedIndex]; |
|
318 | 318 | |
|
319 | 319 | for(k in tmpl_links){ |
|
320 | 320 | var s = YUD.get(k+'_link'); |
|
321 | 321 | if(s){ |
|
322 | 322 | var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}"; |
|
323 | 323 | title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text); |
|
324 | 324 | title_tmpl = title_tmpl.replace('__CS_EXT__',k); |
|
325 | 325 | |
|
326 | 326 | var url = tmpl_links[k].replace('__CS__',new_cs.value); |
|
327 | 327 | var subrepos = YUD.get('archive_subrepos').checked; |
|
328 | 328 | url = url.replace('__SUB__',subrepos); |
|
329 | 329 | url = url.replace('__NAME__',title_tmpl); |
|
330 | 330 | s.innerHTML = url |
|
331 | 331 | } |
|
332 | 332 | } |
|
333 | 333 | }); |
|
334 | 334 | </script> |
|
335 | 335 | %if c.show_stats: |
|
336 | 336 | <script type="text/javascript"> |
|
337 | 337 | var data = ${c.trending_languages|n}; |
|
338 | 338 | var total = 0; |
|
339 | 339 | var no_data = true; |
|
340 | 340 | var tbl = document.createElement('table'); |
|
341 | 341 | tbl.setAttribute('class','trending_language_tbl'); |
|
342 | 342 | var cnt = 0; |
|
343 | 343 | for (var i=0;i<data.length;i++){ |
|
344 | 344 | total+= data[i][1].count; |
|
345 | 345 | } |
|
346 | 346 | for (var i=0;i<data.length;i++){ |
|
347 | 347 | cnt += 1; |
|
348 | 348 | no_data = false; |
|
349 | 349 | |
|
350 | 350 | var hide = cnt>2; |
|
351 | 351 | var tr = document.createElement('tr'); |
|
352 | 352 | if (hide){ |
|
353 | 353 | tr.setAttribute('style','display:none'); |
|
354 | 354 | tr.setAttribute('class','stats_hidden'); |
|
355 | 355 | } |
|
356 | 356 | var k = data[i][0]; |
|
357 | 357 | var obj = data[i][1]; |
|
358 | 358 | var percentage = Math.round((obj.count/total*100),2); |
|
359 | 359 | |
|
360 | 360 | var td1 = document.createElement('td'); |
|
361 | 361 | td1.width = 150; |
|
362 | 362 | var trending_language_label = document.createElement('div'); |
|
363 | 363 | trending_language_label.innerHTML = obj.desc+" ("+k+")"; |
|
364 | 364 | td1.appendChild(trending_language_label); |
|
365 | 365 | |
|
366 | 366 | var td2 = document.createElement('td'); |
|
367 | 367 | td2.setAttribute('style','padding-right:14px !important'); |
|
368 | 368 | var trending_language = document.createElement('div'); |
|
369 | 369 | var nr_files = obj.count+" ${_('files')}"; |
|
370 | 370 | |
|
371 | 371 | trending_language.title = k+" "+nr_files; |
|
372 | 372 | |
|
373 | 373 | if (percentage>22){ |
|
374 | 374 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>"; |
|
375 | 375 | } |
|
376 | 376 | else{ |
|
377 | 377 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>"; |
|
378 | 378 | } |
|
379 | 379 | |
|
380 | 380 | trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner'); |
|
381 | 381 | trending_language.style.width=percentage+"%"; |
|
382 | 382 | td2.appendChild(trending_language); |
|
383 | 383 | |
|
384 | 384 | tr.appendChild(td1); |
|
385 | 385 | tr.appendChild(td2); |
|
386 | 386 | tbl.appendChild(tr); |
|
387 | 387 | if(cnt == 3){ |
|
388 | 388 | var show_more = document.createElement('tr'); |
|
389 | 389 | var td = document.createElement('td'); |
|
390 | 390 | lnk = document.createElement('a'); |
|
391 | 391 | |
|
392 | 392 | lnk.href='#'; |
|
393 | 393 | lnk.innerHTML = "${_('show more')}"; |
|
394 | 394 | lnk.id='code_stats_show_more'; |
|
395 | 395 | td.appendChild(lnk); |
|
396 | 396 | |
|
397 | 397 | show_more.appendChild(td); |
|
398 | 398 | show_more.appendChild(document.createElement('td')); |
|
399 | 399 | tbl.appendChild(show_more); |
|
400 | 400 | } |
|
401 | 401 | |
|
402 | 402 | } |
|
403 | 403 | |
|
404 | 404 | YUD.get('lang_stats').appendChild(tbl); |
|
405 | 405 | YUE.on('code_stats_show_more','click',function(){ |
|
406 | 406 | l = YUD.getElementsByClassName('stats_hidden') |
|
407 | 407 | for (e in l){ |
|
408 | 408 | YUD.setStyle(l[e],'display',''); |
|
409 | 409 | }; |
|
410 | 410 | YUD.setStyle(YUD.get('code_stats_show_more'), |
|
411 | 411 | 'display','none'); |
|
412 | 412 | }); |
|
413 | 413 | </script> |
|
414 | 414 | <script type="text/javascript"> |
|
415 | 415 | /** |
|
416 | 416 | * Plots summary graph |
|
417 | 417 | * |
|
418 | 418 | * @class SummaryPlot |
|
419 | 419 | * @param {from} initial from for detailed graph |
|
420 | 420 | * @param {to} initial to for detailed graph |
|
421 | 421 | * @param {dataset} |
|
422 | 422 | * @param {overview_dataset} |
|
423 | 423 | */ |
|
424 | 424 | function SummaryPlot(from,to,dataset,overview_dataset) { |
|
425 | 425 | var initial_ranges = { |
|
426 | 426 | "xaxis":{ |
|
427 | 427 | "from":from, |
|
428 | 428 | "to":to, |
|
429 | 429 | }, |
|
430 | 430 | }; |
|
431 | 431 | var dataset = dataset; |
|
432 | 432 | var overview_dataset = [overview_dataset]; |
|
433 | 433 | var choiceContainer = YUD.get("legend_choices"); |
|
434 | 434 | var choiceContainerTable = YUD.get("legend_choices_tables"); |
|
435 | 435 | var plotContainer = YUD.get('commit_history'); |
|
436 | 436 | var overviewContainer = YUD.get('overview'); |
|
437 | 437 | |
|
438 | 438 | var plot_options = { |
|
439 | 439 | bars: {show:true,align:'center',lineWidth:4}, |
|
440 | 440 | legend: {show:true, container:"legend_container"}, |
|
441 | 441 | points: {show:true,radius:0,fill:false}, |
|
442 | 442 | yaxis: {tickDecimals:0,}, |
|
443 | 443 | xaxis: { |
|
444 | 444 | mode: "time", |
|
445 | 445 | timeformat: "%d/%m", |
|
446 | 446 | min:from, |
|
447 | 447 | max:to, |
|
448 | 448 | }, |
|
449 | 449 | grid: { |
|
450 | 450 | hoverable: true, |
|
451 | 451 | clickable: true, |
|
452 | 452 | autoHighlight:true, |
|
453 | 453 | color: "#999" |
|
454 | 454 | }, |
|
455 | 455 | //selection: {mode: "x"} |
|
456 | 456 | }; |
|
457 | 457 | var overview_options = { |
|
458 | 458 | legend:{show:false}, |
|
459 | 459 | bars: {show:true,barWidth: 2,}, |
|
460 | 460 | shadowSize: 0, |
|
461 | 461 | xaxis: {mode: "time", timeformat: "%d/%m/%y",}, |
|
462 | 462 | yaxis: {ticks: 3, min: 0,tickDecimals:0,}, |
|
463 | 463 | grid: {color: "#999",}, |
|
464 | 464 | selection: {mode: "x"} |
|
465 | 465 | }; |
|
466 | 466 | |
|
467 | 467 | /** |
|
468 | 468 | *get dummy data needed in few places |
|
469 | 469 | */ |
|
470 | 470 | function getDummyData(label){ |
|
471 | 471 | return {"label":label, |
|
472 | 472 | "data":[{"time":0, |
|
473 | 473 | "commits":0, |
|
474 | 474 | "added":0, |
|
475 | 475 | "changed":0, |
|
476 | 476 | "removed":0, |
|
477 | 477 | }], |
|
478 | 478 | "schema":["commits"], |
|
479 | 479 | "color":'#ffffff', |
|
480 | 480 | } |
|
481 | 481 | } |
|
482 | 482 | |
|
483 | 483 | /** |
|
484 | 484 | * generate checkboxes accordindly to data |
|
485 | 485 | * @param keys |
|
486 | 486 | * @returns |
|
487 | 487 | */ |
|
488 | 488 | function generateCheckboxes(data) { |
|
489 | 489 | //append checkboxes |
|
490 | 490 | var i = 0; |
|
491 | 491 | choiceContainerTable.innerHTML = ''; |
|
492 | 492 | for(var pos in data) { |
|
493 | 493 | |
|
494 | 494 | data[pos].color = i; |
|
495 | 495 | i++; |
|
496 | 496 | if(data[pos].label != ''){ |
|
497 | 497 | choiceContainerTable.innerHTML += |
|
498 | 498 | '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \ |
|
499 | 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 | 505 | * ToolTip show |
|
506 | 506 | */ |
|
507 | 507 | function showTooltip(x, y, contents) { |
|
508 | 508 | var div=document.getElementById('tooltip'); |
|
509 | 509 | if(!div) { |
|
510 | 510 | div = document.createElement('div'); |
|
511 | 511 | div.id="tooltip"; |
|
512 | 512 | div.style.position="absolute"; |
|
513 | 513 | div.style.border='1px solid #fdd'; |
|
514 | 514 | div.style.padding='2px'; |
|
515 | 515 | div.style.backgroundColor='#fee'; |
|
516 | 516 | document.body.appendChild(div); |
|
517 | 517 | } |
|
518 | 518 | YUD.setStyle(div, 'opacity', 0); |
|
519 | 519 | div.innerHTML = contents; |
|
520 | 520 | div.style.top=(y + 5) + "px"; |
|
521 | 521 | div.style.left=(x + 5) + "px"; |
|
522 | 522 | |
|
523 | 523 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); |
|
524 | 524 | anim.animate(); |
|
525 | 525 | } |
|
526 | 526 | |
|
527 | 527 | /** |
|
528 | 528 | * This function will detect if selected period has some changesets |
|
529 | 529 | for this user if it does this data is then pushed for displaying |
|
530 | 530 | Additionally it will only display users that are selected by the checkbox |
|
531 | 531 | */ |
|
532 | 532 | function getDataAccordingToRanges(ranges) { |
|
533 | 533 | |
|
534 | 534 | var data = []; |
|
535 | 535 | var new_dataset = {}; |
|
536 | 536 | var keys = []; |
|
537 | 537 | var max_commits = 0; |
|
538 | 538 | for(var key in dataset){ |
|
539 | 539 | |
|
540 | 540 | for(var ds in dataset[key].data){ |
|
541 | 541 | commit_data = dataset[key].data[ds]; |
|
542 | 542 | if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){ |
|
543 | 543 | |
|
544 | 544 | if(new_dataset[key] === undefined){ |
|
545 | 545 | new_dataset[key] = {data:[],schema:["commits"],label:key}; |
|
546 | 546 | } |
|
547 | 547 | new_dataset[key].data.push(commit_data); |
|
548 | 548 | } |
|
549 | 549 | } |
|
550 | 550 | if (new_dataset[key] !== undefined){ |
|
551 | 551 | data.push(new_dataset[key]); |
|
552 | 552 | } |
|
553 | 553 | } |
|
554 | 554 | |
|
555 | 555 | if (data.length > 0){ |
|
556 | 556 | return data; |
|
557 | 557 | } |
|
558 | 558 | else{ |
|
559 | 559 | //just return dummy data for graph to plot itself |
|
560 | 560 | return [getDummyData('')]; |
|
561 | 561 | } |
|
562 | 562 | } |
|
563 | 563 | |
|
564 | 564 | /** |
|
565 | 565 | * redraw using new checkbox data |
|
566 | 566 | */ |
|
567 | 567 | function plotchoiced(e,args){ |
|
568 | 568 | var cur_data = args[0]; |
|
569 | 569 | var cur_ranges = args[1]; |
|
570 | 570 | |
|
571 | 571 | var new_data = []; |
|
572 | 572 | var inputs = choiceContainer.getElementsByTagName("input"); |
|
573 | 573 | |
|
574 | 574 | //show only checked labels |
|
575 | 575 | for(var i=0; i<inputs.length; i++) { |
|
576 | 576 | var checkbox_key = inputs[i].name; |
|
577 | 577 | |
|
578 | 578 | if(inputs[i].checked){ |
|
579 | 579 | for(var d in cur_data){ |
|
580 | 580 | if(cur_data[d].label == checkbox_key){ |
|
581 | 581 | new_data.push(cur_data[d]); |
|
582 | 582 | } |
|
583 | 583 | } |
|
584 | 584 | } |
|
585 | 585 | else{ |
|
586 | 586 | //push dummy data to not hide the label |
|
587 | 587 | new_data.push(getDummyData(checkbox_key)); |
|
588 | 588 | } |
|
589 | 589 | } |
|
590 | 590 | |
|
591 | 591 | var new_options = YAHOO.lang.merge(plot_options, { |
|
592 | 592 | xaxis: { |
|
593 | 593 | min: cur_ranges.xaxis.from, |
|
594 | 594 | max: cur_ranges.xaxis.to, |
|
595 | 595 | mode:"time", |
|
596 | 596 | timeformat: "%d/%m", |
|
597 | 597 | }, |
|
598 | 598 | }); |
|
599 | 599 | if (!new_data){ |
|
600 | 600 | new_data = [[0,1]]; |
|
601 | 601 | } |
|
602 | 602 | // do the zooming |
|
603 | 603 | plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); |
|
604 | 604 | |
|
605 | 605 | plot.subscribe("plotselected", plotselected); |
|
606 | 606 | |
|
607 | 607 | //resubscribe plothover |
|
608 | 608 | plot.subscribe("plothover", plothover); |
|
609 | 609 | |
|
610 | 610 | // don't fire event on the overview to prevent eternal loop |
|
611 | 611 | overview.setSelection(cur_ranges, true); |
|
612 | 612 | |
|
613 | 613 | } |
|
614 | 614 | |
|
615 | 615 | /** |
|
616 | 616 | * plot only selected items from overview |
|
617 | 617 | * @param ranges |
|
618 | 618 | * @returns |
|
619 | 619 | */ |
|
620 | 620 | function plotselected(ranges,cur_data) { |
|
621 | 621 | //updates the data for new plot |
|
622 | 622 | var data = getDataAccordingToRanges(ranges); |
|
623 | 623 | generateCheckboxes(data); |
|
624 | 624 | |
|
625 | 625 | var new_options = YAHOO.lang.merge(plot_options, { |
|
626 | 626 | xaxis: { |
|
627 | 627 | min: ranges.xaxis.from, |
|
628 | 628 | max: ranges.xaxis.to, |
|
629 | 629 | mode:"time", |
|
630 | 630 | timeformat: "%d/%m", |
|
631 | 631 | }, |
|
632 | 632 | }); |
|
633 | 633 | // do the zooming |
|
634 | 634 | plot = YAHOO.widget.Flot(plotContainer, data, new_options); |
|
635 | 635 | |
|
636 | 636 | plot.subscribe("plotselected", plotselected); |
|
637 | 637 | |
|
638 | 638 | //resubscribe plothover |
|
639 | 639 | plot.subscribe("plothover", plothover); |
|
640 | 640 | |
|
641 | 641 | // don't fire event on the overview to prevent eternal loop |
|
642 | 642 | overview.setSelection(ranges, true); |
|
643 | 643 | |
|
644 | 644 | //resubscribe choiced |
|
645 | 645 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]); |
|
646 | 646 | } |
|
647 | 647 | |
|
648 | 648 | var previousPoint = null; |
|
649 | 649 | |
|
650 | 650 | function plothover(o) { |
|
651 | 651 | var pos = o.pos; |
|
652 | 652 | var item = o.item; |
|
653 | 653 | |
|
654 | 654 | //YUD.get("x").innerHTML = pos.x.toFixed(2); |
|
655 | 655 | //YUD.get("y").innerHTML = pos.y.toFixed(2); |
|
656 | 656 | if (item) { |
|
657 | 657 | if (previousPoint != item.datapoint) { |
|
658 | 658 | previousPoint = item.datapoint; |
|
659 | 659 | |
|
660 | 660 | var tooltip = YUD.get("tooltip"); |
|
661 | 661 | if(tooltip) { |
|
662 | 662 | tooltip.parentNode.removeChild(tooltip); |
|
663 | 663 | } |
|
664 | 664 | var x = item.datapoint.x.toFixed(2); |
|
665 | 665 | var y = item.datapoint.y.toFixed(2); |
|
666 | 666 | |
|
667 | 667 | if (!item.series.label){ |
|
668 | 668 | item.series.label = 'commits'; |
|
669 | 669 | } |
|
670 | 670 | var d = new Date(x*1000); |
|
671 | 671 | var fd = d.toDateString() |
|
672 | 672 | var nr_commits = parseInt(y); |
|
673 | 673 | |
|
674 | 674 | var cur_data = dataset[item.series.label].data[item.dataIndex]; |
|
675 | 675 | var added = cur_data.added; |
|
676 | 676 | var changed = cur_data.changed; |
|
677 | 677 | var removed = cur_data.removed; |
|
678 | 678 | |
|
679 | 679 | var nr_commits_suffix = " ${_('commits')} "; |
|
680 | 680 | var added_suffix = " ${_('files added')} "; |
|
681 | 681 | var changed_suffix = " ${_('files changed')} "; |
|
682 | 682 | var removed_suffix = " ${_('files removed')} "; |
|
683 | 683 | |
|
684 | 684 | |
|
685 | 685 | if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";} |
|
686 | 686 | if(added==1){added_suffix=" ${_('file added')} ";} |
|
687 | 687 | if(changed==1){changed_suffix=" ${_('file changed')} ";} |
|
688 | 688 | if(removed==1){removed_suffix=" ${_('file removed')} ";} |
|
689 | 689 | |
|
690 | 690 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd |
|
691 | 691 | +'<br/>'+ |
|
692 | 692 | nr_commits + nr_commits_suffix+'<br/>'+ |
|
693 | 693 | added + added_suffix +'<br/>'+ |
|
694 | 694 | changed + changed_suffix + '<br/>'+ |
|
695 | 695 | removed + removed_suffix + '<br/>'); |
|
696 | 696 | } |
|
697 | 697 | } |
|
698 | 698 | else { |
|
699 | 699 | var tooltip = YUD.get("tooltip"); |
|
700 | 700 | |
|
701 | 701 | if(tooltip) { |
|
702 | 702 | tooltip.parentNode.removeChild(tooltip); |
|
703 | 703 | } |
|
704 | 704 | previousPoint = null; |
|
705 | 705 | } |
|
706 | 706 | } |
|
707 | 707 | |
|
708 | 708 | /** |
|
709 | 709 | * MAIN EXECUTION |
|
710 | 710 | */ |
|
711 | 711 | |
|
712 | 712 | var data = getDataAccordingToRanges(initial_ranges); |
|
713 | 713 | generateCheckboxes(data); |
|
714 | 714 | |
|
715 | 715 | //main plot |
|
716 | 716 | var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); |
|
717 | 717 | |
|
718 | 718 | //overview |
|
719 | 719 | var overview = YAHOO.widget.Flot(overviewContainer, |
|
720 | 720 | overview_dataset, overview_options); |
|
721 | 721 | |
|
722 | 722 | //show initial selection on overview |
|
723 | 723 | overview.setSelection(initial_ranges); |
|
724 | 724 | |
|
725 | 725 | plot.subscribe("plotselected", plotselected); |
|
726 | 726 | plot.subscribe("plothover", plothover) |
|
727 | 727 | |
|
728 | 728 | overview.subscribe("plotselected", function (ranges) { |
|
729 | 729 | plot.setSelection(ranges); |
|
730 | 730 | }); |
|
731 | 731 | |
|
732 | 732 | // user choices on overview |
|
733 | 733 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]); |
|
734 | 734 | } |
|
735 | 735 | SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n}); |
|
736 | 736 | </script> |
|
737 | 737 | %endif |
|
738 | 738 | |
|
739 | 739 | </%def> |
@@ -1,90 +1,90 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 |
${_('%s Tags') % c.repo_name} |
|
|
5 | ${_('%s Tags') % c.repo_name} · ${c.rhodecode_name} | |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
11 | 11 | ${_('Tags')} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('tags')} |
|
16 | 16 | </%def> |
|
17 | 17 | <%def name="main()"> |
|
18 | 18 | ${self.context_bar('switch-to')} |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | <!-- end box / title --> |
|
25 | 25 | %if c.repo_tags: |
|
26 | 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 | 27 | %endif |
|
28 | 28 | <div class="table"> |
|
29 | 29 | <%include file='tags_data.html'/> |
|
30 | 30 | </div> |
|
31 | 31 | </div> |
|
32 | 32 | <script type="text/javascript"> |
|
33 | 33 | YUE.on('compare_tags','click',function(e){ |
|
34 | 34 | YUE.preventDefault(e); |
|
35 | 35 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
36 | 36 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
37 | 37 | |
|
38 | 38 | if(org && other){ |
|
39 | 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 | 40 | var u = compare_url.replace('__ORG__',org.value) |
|
41 | 41 | .replace('__OTHER__',other.value); |
|
42 | 42 | window.location=u; |
|
43 | 43 | } |
|
44 | 44 | }); |
|
45 | 45 | |
|
46 | 46 | // main table sorting |
|
47 | 47 | var myColumnDefs = [ |
|
48 | 48 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
49 | 49 | {key:"date",label:"${_('Date')}",sortable:true, |
|
50 | 50 | sortOptions: { sortFunction: dateSort }}, |
|
51 | 51 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
52 | 52 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
53 | 53 | sortOptions: { sortFunction: revisionSort }}, |
|
54 | 54 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
55 | 55 | ]; |
|
56 | 56 | |
|
57 | 57 | var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data")); |
|
58 | 58 | |
|
59 | 59 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
60 | 60 | |
|
61 | 61 | myDataSource.responseSchema = { |
|
62 | 62 | fields: [ |
|
63 | 63 | {key:"name"}, |
|
64 | 64 | {key:"date"}, |
|
65 | 65 | {key:"author"}, |
|
66 | 66 | {key:"revision"}, |
|
67 | 67 | {key:"compare"}, |
|
68 | 68 | ] |
|
69 | 69 | }; |
|
70 | 70 | |
|
71 | 71 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
72 | 72 | { |
|
73 | 73 | sortedBy:{key:"name",dir:"asc"}, |
|
74 | 74 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
75 | 75 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
76 | 76 | MSG_EMPTY:"${_('No records found.')}", |
|
77 | 77 | MSG_ERROR:"${_('Data error.')}", |
|
78 | 78 | MSG_LOADING:"${_('Loading...')}", |
|
79 | 79 | } |
|
80 | 80 | ); |
|
81 | 81 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
82 | 82 | tooltip_activate(); |
|
83 | 83 | var func = function(node){ |
|
84 | 84 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
85 | 85 | } |
|
86 | 86 | q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func); |
|
87 | 87 | }); |
|
88 | 88 | |
|
89 | 89 | </script> |
|
90 | 90 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now