##// END OF EJS Templates
html: don't use tabs
Mads Kiilerich -
r3197:b4f40152 beta
parent child Browse files
Show More
@@ -1,18 +1,18 b''
1 1 {% extends "basic/layout.html" %}
2 2
3 3 {% block sidebarlogo %}
4 4 <h3>Support RhodeCode development.</h3>
5 5 <div style="text-align:center">
6 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
7 <input type="hidden" name="cmd" value="_s-xclick">
8 <input type="hidden" name="hosted_button_id" value="8U2LLRPLBKWDU">
9 <input style="border:0px !important" type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif"
10 border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
11 <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
12 </form>
6 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
7 <input type="hidden" name="cmd" value="_s-xclick">
8 <input type="hidden" name="hosted_button_id" value="8U2LLRPLBKWDU">
9 <input style="border:0px !important" type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif"
10 border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
11 <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
12 </form>
13 13 <div style="padding:5px">
14 14 <a href="http://flattr.com/thing/167489/RhodeCode" target="_blank">
15 15 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
16 16 </div>
17 17 </div>
18 18 {% endblock %}}
@@ -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 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 ${self.menu('admin')}
19 ${self.menu('admin')}
20 20 </%def>
21 21 <%def name="main()">
22 22 <div class="box">
23 <!-- box / title -->
24 <div class="title">
25 ${self.breadcrumbs()}
26 </div>
27 <!-- end box / title -->
28 <div class="table">
29 <div id="user_log">
30 ${c.log_data}
31 </div>
32 </div>
23 <!-- box / title -->
24 <div class="title">
25 ${self.breadcrumbs()}
26 </div>
27 <!-- end box / title -->
28 <div class="table">
29 <div id="user_log">
30 ${c.log_data}
31 </div>
32 </div>
33 33 </div>
34 34
35 35 <script>
36 36 YUE.on('j_filter','click',function(){
37 var jfilter = YUD.get('j_filter');
38 if(YUD.hasClass(jfilter, 'initial')){
39 jfilter.value = '';
40 }
37 var jfilter = YUD.get('j_filter');
38 if(YUD.hasClass(jfilter, 'initial')){
39 jfilter.value = '';
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 fix_j_filter_width(YUD.get('j_filter').value.length);
46 fix_j_filter_width(YUD.get('j_filter').value.length);
47 47 });
48 48 YUE.on('filter_form','submit',function(e){
49 YUE.preventDefault(e)
49 YUE.preventDefault(e)
50 50 var val = YUD.get('j_filter').value;
51 window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val);
51 window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val);
52 52 });
53 53 fix_j_filter_width(YUD.get('j_filter').value.length);
54 54 </script>
55 55 </%def>
@@ -1,64 +1,64 b''
1 1 ## -*- coding: utf-8 -*-
2 2 %if c.users_log:
3 3 <table>
4 <tr>
5 <th class="left">${_('Username')}</th>
6 <th class="left">${_('Action')}</th>
7 <th class="left">${_('Repository')}</th>
8 <th class="left">${_('Date')}</th>
9 <th class="left">${_('From IP')}</th>
10 </tr>
4 <tr>
5 <th class="left">${_('Username')}</th>
6 <th class="left">${_('Action')}</th>
7 <th class="left">${_('Repository')}</th>
8 <th class="left">${_('Date')}</th>
9 <th class="left">${_('From IP')}</th>
10 </tr>
11 11
12 %for cnt,l in enumerate(c.users_log):
13 <tr class="parity${cnt%2}">
14 <td>
12 %for cnt,l in enumerate(c.users_log):
13 <tr class="parity${cnt%2}">
14 <td>
15 15 %if l.user is not None:
16 16 ${h.link_to(l.user.username,h.url('edit_user', id=l.user.user_id))}
17 17 %else:
18 18 ${l.username}
19 19 %endif
20 20 </td>
21 <td>${h.action_parser(l)[0]()}
22 <div class="journal_action_params">
21 <td>${h.action_parser(l)[0]()}
22 <div class="journal_action_params">
23 23 ${h.literal(h.action_parser(l)[1]())}
24 24 </div>
25 </td>
26 <td>
27 %if l.repository is not None:
28 ${h.link_to(l.repository.repo_name,h.url('summary_home',repo_name=l.repository.repo_name))}
29 %else:
30 ${l.repository_name}
31 %endif
32 </td>
25 </td>
26 <td>
27 %if l.repository is not None:
28 ${h.link_to(l.repository.repo_name,h.url('summary_home',repo_name=l.repository.repo_name))}
29 %else:
30 ${l.repository_name}
31 %endif
32 </td>
33 33
34 <td>${h.fmt_date(l.action_date)}</td>
35 <td>${l.user_ip}</td>
36 </tr>
37 %endfor
34 <td>${h.fmt_date(l.action_date)}</td>
35 <td>${l.user_ip}</td>
36 </tr>
37 %endfor
38 38 </table>
39 39
40 40 <script type="text/javascript">
41 41 YUE.onDOMReady(function(){
42 42 YUE.delegate("user_log","click",function(e, matchedEl, container){
43 43 ypjax(e.target.href,"user_log",function(){
44 44 show_more_event();
45 45 tooltip_activate();
46 46 show_changeset_tooltip();
47 47 });
48 48 YUE.preventDefault(e);
49 49 },'.pager_link');
50 50
51 51 YUE.delegate("user_log","click",function(e,matchedEl,container){
52 52 var el = e.target;
53 53 YUD.setStyle(YUD.get(el.id.substring(1)),'display','');
54 54 YUD.setStyle(el.parentNode,'display','none');
55 55 },'.show_more');
56 56 });
57 57 </script>
58 58
59 59 <div class="pagination-wh pagination-left">
60 60 ${c.users_log.pager('$link_previous ~2~ $link_next')}
61 61 </div>
62 62 %else:
63 ${_('No actions yet')}
63 ${_('No actions yet')}
64 64 %endif
@@ -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 ${_('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 &raquo;
11 11 ${_('Defaults')}
12 12 </%def>
13 13
14 14 <%def name="page_nav()">
15 ${self.menu('admin')}
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 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 &raquo;
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 <h3>${_('Connection settings')}</h3>
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 <h3>${_('Search settings')}</h3>
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 <h3>${_('Attribute mappings')}</h3>
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 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 ${self.menu('admin')}
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 YUD.addClass(current_filter, 'active');
62 YUD.addClass(current_filter, 'active');
63 63 }
64 64 </script>
65 65 </%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 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 &raquo;
11 11 ${_('Permissions')}
12 12 </%def>
13 13
14 14 <%def name="page_nav()">
15 ${self.menu('admin')}
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 <div class="field">
40 <div class="label">
41 <label for="default_repo_perm">${_('Repository')}:</label>
42 </div>
43 <div class="select">
44 ${h.select('default_repo_perm','',c.repo_perms_choices)}
39 <div class="field">
40 <div class="label">
41 <label for="default_repo_perm">${_('Repository')}:</label>
42 </div>
43 <div class="select">
44 ${h.select('default_repo_perm','',c.repo_perms_choices)}
45 45
46 ${h.checkbox('overwrite_default_repo','true')}
47 <label for="overwrite_default_repo">
48 <span class="tooltip"
49 title="${h.tooltip(_('All default permissions on each repository will be reset to choosen permission, note that all custom default permission on repositories will be lost'))}">
50 ${_('overwrite existing settings')}</span> </label>
51 </div>
52 </div>
53 <div class="field">
54 <div class="label">
55 <label for="default_group_perm">${_('Repository group')}:</label>
56 </div>
57 <div class="select">
58 ${h.select('default_group_perm','',c.group_perms_choices)}
46 ${h.checkbox('overwrite_default_repo','true')}
47 <label for="overwrite_default_repo">
48 <span class="tooltip"
49 title="${h.tooltip(_('All default permissions on each repository will be reset to choosen permission, note that all custom default permission on repositories will be lost'))}">
50 ${_('overwrite existing settings')}</span> </label>
51 </div>
52 </div>
53 <div class="field">
54 <div class="label">
55 <label for="default_group_perm">${_('Repository group')}:</label>
56 </div>
57 <div class="select">
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 repositories group will be lost'))}">
63 63 ${_('overwrite existing settings')}</span> </label>
64 64
65 </div>
66 </div>
67 <div class="field">
68 <div class="label">
69 <label for="default_register">${_('Registration')}:</label>
70 </div>
71 <div class="select">
72 ${h.select('default_register','',c.register_choices)}
73 </div>
74 </div>
65 </div>
66 </div>
67 <div class="field">
68 <div class="label">
69 <label for="default_register">${_('Registration')}:</label>
70 </div>
71 <div class="select">
72 ${h.select('default_register','',c.register_choices)}
73 </div>
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 <div class="select">
80 ${h.select('default_create','',c.create_choices)}
81 </div>
79 <div class="select">
80 ${h.select('default_create','',c.create_choices)}
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 <div class="buttons">
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 </div>
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',id=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,28 +1,28 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Add repository')} - ${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 &raquo;
11 11 ${h.link_to(_('Repositories'),h.url('repos'))}
12 12 &raquo;
13 13 ${_('add new')}
14 14 </%def>
15 15
16 16 <%def name="page_nav()">
17 ${self.menu('admin')}
17 ${self.menu('admin')}
18 18 </%def>
19 19
20 20 <%def name="main()">
21 <div class="box">
22 <!-- box / title -->
23 <div class="title">
24 ${self.breadcrumbs()}
25 </div>
21 <div class="box">
22 <!-- box / title -->
23 <div class="title">
24 ${self.breadcrumbs()}
25 </div>
26 26 <%include file="repo_add_base.html"/>
27 27 </div>
28 28 </%def>
@@ -1,24 +1,24 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Add repository')} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8 <%def name="breadcrumbs_links()">
9 ${_('add new repository')}
9 ${_('add new repository')}
10 10 </%def>
11 11
12 12 <%def name="page_nav()">
13 ${self.menu('admin')}
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 <%include file="repo_add_base.html"/>
23 23 </div>
24 24 </%def>
@@ -1,289 +1,289 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 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(_('Admin'),h.url('admin_home'))}
10 10 &raquo;
11 11 ${h.link_to(_('Repositories'),h.url('repos'))}
12 12 &raquo;
13 13 ${_('edit')} &raquo; ${h.link_to(c.repo_info.just_name,h.url('summary_home',repo_name=c.repo_name))}
14 14 </%def>
15 15
16 16 <%def name="page_nav()">
17 ${self.menu('admin')}
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 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')}
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="repo_name">${_('Name')}:</label>
33 33 </div>
34 34 <div class="input">
35 35 ${h.text('repo_name',class_="medium")}
36 36 </div>
37 37 </div>
38 <div class="field">
39 <div class="label">
40 <label for="clone_uri">${_('Clone uri')}:</label>
41 </div>
42 <div class="input">
43 ${h.text('clone_uri',class_="medium")}
38 <div class="field">
39 <div class="label">
40 <label for="clone_uri">${_('Clone uri')}:</label>
41 </div>
42 <div class="input">
43 ${h.text('clone_uri',class_="medium")}
44 44 <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span>
45 </div>
46 </div>
47 <div class="field">
48 <div class="label">
49 <label for="repo_group">${_('Repository group')}:</label>
50 </div>
51 <div class="input">
52 ${h.select('repo_group','',c.repo_groups,class_="medium")}
45 </div>
46 </div>
47 <div class="field">
48 <div class="label">
49 <label for="repo_group">${_('Repository group')}:</label>
50 </div>
51 <div class="input">
52 ${h.select('repo_group','',c.repo_groups,class_="medium")}
53 53 <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
54 </div>
55 </div>
54 </div>
55 </div>
56 56 <div class="field">
57 57 <div class="label">
58 58 <label for="repo_type">${_('Type')}:</label>
59 59 </div>
60 60 <div class="input">
61 61 ${h.select('repo_type','hg',c.backends,class_="medium")}
62 62 </div>
63 63 </div>
64 64 <div class="field">
65 65 <div class="label">
66 66 <label for="repo_landing_rev">${_('Landing revision')}:</label>
67 67 </div>
68 68 <div class="input">
69 69 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
70 70 <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
71 71 </div>
72 72 </div>
73 73 <div class="field">
74 74 <div class="label label-textarea">
75 75 <label for="repo_description">${_('Description')}:</label>
76 76 </div>
77 77 <div class="textarea text-area editor">
78 78 ${h.textarea('repo_description')}
79 79 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
80 80 </div>
81 81 </div>
82 82
83 83 <div class="field">
84 84 <div class="label label-checkbox">
85 85 <label for="repo_private">${_('Private repository')}:</label>
86 86 </div>
87 87 <div class="checkboxes">
88 88 ${h.checkbox('repo_private',value="True")}
89 89 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
90 90 </div>
91 91 </div>
92 92 <div class="field">
93 93 <div class="label label-checkbox">
94 94 <label for="repo_enable_statistics">${_('Enable statistics')}:</label>
95 95 </div>
96 96 <div class="checkboxes">
97 97 ${h.checkbox('repo_enable_statistics',value="True")}
98 98 <span class="help-block">${_('Enable statistics window on summary page.')}</span>
99 99 </div>
100 100 </div>
101 101 <div class="field">
102 102 <div class="label label-checkbox">
103 103 <label for="repo_enable_downloads">${_('Enable downloads')}:</label>
104 104 </div>
105 105 <div class="checkboxes">
106 106 ${h.checkbox('repo_enable_downloads',value="True")}
107 107 <span class="help-block">${_('Enable download menu on summary page.')}</span>
108 108 </div>
109 109 </div>
110 110 <div class="field">
111 111 <div class="label label-checkbox">
112 112 <label for="repo_enable_locking">${_('Enable locking')}:</label>
113 113 </div>
114 114 <div class="checkboxes">
115 115 ${h.checkbox('repo_enable_locking',value="True")}
116 116 <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span>
117 117 </div>
118 118 </div>
119 119 <div class="field">
120 120 <div class="label">
121 121 <label for="user">${_('Owner')}:</label>
122 122 </div>
123 123 <div class="input input-medium ac">
124 124 <div class="perm_ac">
125 125 ${h.text('user',class_='yui-ac-input')}
126 126 <span class="help-block">${_('Change owner of this repository.')}</span>
127 127 <div id="owner_container"></div>
128 128 </div>
129 129 </div>
130 130 </div>
131 131
132 132 <div class="field">
133 133 <div class="label">
134 134 <label for="input">${_('Permissions')}:</label>
135 135 </div>
136 136 <div class="input">
137 137 <%include file="repo_edit_perms.html"/>
138 138 </div>
139 139
140 140 <div class="buttons">
141 141 ${h.submit('save',_('Save'),class_="ui-btn large")}
142 142 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
143 143 </div>
144 144 </div>
145 145 </div>
146 146 </div>
147 147 ${h.end_form()}
148 148 </div>
149 149
150 150 <div class="box box-right">
151 151 <div class="title">
152 152 <h5>${_('Administration')}</h5>
153 153 </div>
154 154
155 155 <h3>${_('Statistics')}</h3>
156 156 ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')}
157 157 <div class="form">
158 158 <div class="fields">
159 159 ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")}
160 160 <div class="field" style="border:none;color:#888">
161 161 <ul>
162 162 <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li>
163 163 <li>${_('Stats gathered')}: ${c.stats_percentage}%</li>
164 164 </ul>
165 165 </div>
166 166 </div>
167 167 </div>
168 168 ${h.end_form()}
169 169
170 170 %if c.repo_info.clone_uri:
171 171 <h3>${_('Remote')}</h3>
172 172 ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')}
173 173 <div class="form">
174 174 <div class="fields">
175 175 ${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')+"');")}
176 176 <div class="field" style="border:none">
177 177 <ul>
178 178 <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li>
179 179 </ul>
180 180 </div>
181 181 </div>
182 182 </div>
183 183 ${h.end_form()}
184 184 %endif
185 185
186 186 <h3>${_('Cache')}</h3>
187 187 ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')}
188 188 <div class="form">
189 189 <div class="fields">
190 190 ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")}
191 191 <div class="field" style="border:none;color:#888">
192 192 <ul>
193 193 <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')}
194 194 </li>
195 195 </ul>
196 196 </div>
197 197 <div class="field" style="border:none;">
198 198 ${_('List of cached values')}
199 199 <table>
200 200 <tr>
201 201 <th>${_('Prefix')}</th>
202 202 <th>${_('Key')}</th>
203 203 <th>${_('Active')}</th>
204 204 </tr>
205 205 %for cache in c.repo_info.cache_keys:
206 206 <tr>
207 207 <td>${cache.prefix or '-'}</td>
208 208 <td>${cache.cache_key}</td>
209 209 <td>${h.bool2icon(cache.cache_active)}</td>
210 210 </tr>
211 211 %endfor
212 212 </table>
213 213 </div>
214 214 </div>
215 215 </div>
216 216 ${h.end_form()}
217 217
218 218 <h3>${_('Public journal')}</h3>
219 219 ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')}
220 220 <div class="form">
221 221 ${h.hidden('auth_token',str(h.get_token()))}
222 222 <div class="field">
223 223 %if c.in_public_journal:
224 224 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")}
225 225 %else:
226 226 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")}
227 227 %endif
228 228 </div>
229 229 <div class="field" style="border:none;color:#888">
230 230 <ul>
231 231 <li>${_('All actions made on this repository will be accessible to everyone in public journal')}
232 232 </li>
233 233 </ul>
234 234 </div>
235 235 </div>
236 236 ${h.end_form()}
237 237
238 238 <h3>${_('Locking')}</h3>
239 239 ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')}
240 240 <div class="form">
241 241 <div class="fields">
242 242 %if c.repo_info.locked[0]:
243 243 ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")}
244 244 ${'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])))}
245 245 %else:
246 246 ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")}
247 247 ${_('Repository is not locked')}
248 248 %endif
249 249 </div>
250 250 <div class="field" style="border:none;color:#888">
251 251 <ul>
252 252 <li>${_('Force locking on repository. Works only when anonymous access is disabled')}
253 253 </li>
254 254 </ul>
255 255 </div>
256 256 </div>
257 257 ${h.end_form()}
258 258
259 259 <h3>${_('Set as fork of')}</h3>
260 260 ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')}
261 261 <div class="form">
262 262 <div class="fields">
263 263 ${h.select('id_fork_of','',c.repos_list,class_="medium")}
264 264 ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)}
265 265 </div>
266 266 <div class="field" style="border:none;color:#888">
267 267 <ul>
268 268 <li>${_('''Manually set this repository as a fork of another from the list''')}</li>
269 269 </ul>
270 270 </div>
271 271 </div>
272 272 ${h.end_form()}
273 273
274 274 <h3>${_('Delete')}</h3>
275 275 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')}
276 276 <div class="form">
277 277 <div class="fields">
278 278 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
279 279 </div>
280 280 <div class="field" style="border:none;color:#888">
281 281 <ul>
282 282 <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>
283 283 </ul>
284 284 </div>
285 285 </div>
286 286 ${h.end_form()}
287 287 </div>
288 288
289 289 </%def>
@@ -1,128 +1,128 b''
1 1 <table id="permissions_manage" class="noborder">
2 2 <tr>
3 3 <td>${_('none')}</td>
4 4 <td>${_('read')}</td>
5 5 <td>${_('write')}</td>
6 6 <td>${_('admin')}</td>
7 7 <td>${_('member')}</td>
8 8 <td></td>
9 9 </tr>
10 10 ## USERS
11 11 %for r2p in c.repo_info.repo_to_perm:
12 12 %if r2p.user.username =='default' and c.repo_info.private:
13 13 <tr>
14 14 <td colspan="4">
15 15 <span class="private_repo_msg">
16 16 ${_('private repository')}
17 17 </span>
18 18 </td>
19 19 <td class="private_repo_msg"><img style="vertical-align:bottom" src="${h.url('/images/icons/user.png')}"/>${_('default')}</td>
20 20 </tr>
21 21 %else:
22 22 <tr id="id${id(r2p.user.username)}">
23 23 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.none')}</td>
24 24 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.read')}</td>
25 25 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.write')}</td>
26 26 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.admin')}</td>
27 27 <td style="white-space: nowrap;">
28 28 <img class="perm-gravatar" src="${h.gravatar_url(r2p.user.email,14)}"/>${r2p.user.username if r2p.user.username != 'default' else _('default')}
29 29 </td>
30 30 <td>
31 31 %if r2p.user.username !='default':
32 32 <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')">
33 33 ${_('revoke')}
34 34 </span>
35 35 %endif
36 36 </td>
37 37 </tr>
38 38 %endif
39 39 %endfor
40 40
41 41 ## USERS GROUPS
42 42 %for g2p in c.repo_info.users_group_to_perm:
43 43 <tr id="id${id(g2p.users_group.users_group_name)}">
44 44 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.none')}</td>
45 45 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.read')}</td>
46 46 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.write')}</td>
47 47 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.admin')}</td>
48 48 <td style="white-space: nowrap;">
49 49 <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>
50 50 %if h.HasPermissionAny('hg.admin')():
51 51 <a href="${h.url('edit_users_group',id=g2p.users_group.users_group_id)}">${g2p.users_group.users_group_name}</a>
52 52 %else:
53 53 ${g2p.users_group.users_group_name}
54 54 %endif
55 55 </td>
56 56 <td>
57 57 <span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')">
58 58 ${_('revoke')}
59 59 </span>
60 60 </td>
61 61 </tr>
62 62 %endfor
63 63 <%
64 64 _tmpl = h.literal("""' \
65 65 <td><input type="radio" value="repository.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
66 66 <td><input type="radio" value="repository.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
67 67 <td><input type="radio" value="repository.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
68 68 <td><input type="radio" value="repository.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
69 69 <td class="ac"> \
70 70 <div class="perm_ac" id="perm_ac_{0}"> \
71 71 <input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \
72 72 <input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden"> \
73 73 <div id="perm_container_{0}"></div> \
74 74 </div> \
75 75 </td> \
76 76 <td></td>'""")
77 77 %>
78 78 ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl'
79 79 <tr class="new_members last_new_member" id="add_perm_input"></tr>
80 80 <tr>
81 81 <td colspan="6">
82 82 <span id="add_perm" class="add_icon" style="cursor: pointer;">
83 83 ${_('Add another member')}
84 84 </span>
85 85 </td>
86 86 </tr>
87 87 </table>
88 88 <script type="text/javascript">
89 89 function ajaxActionUser(user_id, field_id) {
90 90 var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}";
91 91 var callback = {
92 92 success: function (o) {
93 93 var tr = YUD.get(String(field_id));
94 94 tr.parentNode.removeChild(tr);
95 95 },
96 96 failure: function (o) {
97 97 alert("${_('Failed to remove user')}");
98 98 },
99 99 };
100 100 var postData = '_method=delete&user_id=' + user_id;
101 101 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
102 102 };
103 103
104 104 function ajaxActionUsersGroup(users_group_id,field_id){
105 105 var sUrl = "${h.url('delete_repo_users_group',repo_name=c.repo_name)}";
106 106 var callback = {
107 success:function(o){
108 var tr = YUD.get(String(field_id));
109 tr.parentNode.removeChild(tr);
110 },
107 success:function(o){
108 var tr = YUD.get(String(field_id));
109 tr.parentNode.removeChild(tr);
110 },
111 111 failure:function(o){
112 112 alert("${_('Failed to remove users group')}");
113 113 },
114 114 };
115 115 var postData = '_method=delete&users_group_id='+users_group_id;
116 116 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
117 117 };
118 118
119 119 YUE.onDOMReady(function () {
120 120 if (!YUD.hasClass('perm_new_member_name', 'error')) {
121 121 YUD.setStyle('add_perm_input', 'display', 'none');
122 122 }
123 123 YAHOO.util.Event.addListener('add_perm', 'click', function () {
124 124 addPermAction(${_tmpl}, ${c.users_array|n}, ${c.users_groups_array|n});
125 125 });
126 126 });
127 127
128 128 </script>
@@ -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 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'))} &raquo; <span id="repo_count">0</span> ${_('repositories')}
10 10 </%def>
11 11 <%def name="page_nav()">
12 ${self.menu('admin')}
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 sortOptions: { sortFunction: nameSort }},
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: '&gt;',
91 91 previousPageLinkLabel: '&lt;',
92 92 firstPageLinkLabel: '&lt;&lt;',
93 93 lastPageLinkLabel: '&gt;&gt;',
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 if(!YUD.hasClass('q_filter', 'loaded')){
130 YUD.get('q_filter').value = '';
131 //TODO: load here full list later to do search within groups
132 YUD.addClass('q_filter', 'loaded');
133 }
129 if(!YUD.hasClass('q_filter', 'loaded')){
130 YUD.get('q_filter').value = '';
131 //TODO: load here full list later to do search within groups
132 YUD.addClass('q_filter', 'loaded');
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,120 +1,120 b''
1 1 <table id="permissions_manage" class="noborder">
2 2 <tr>
3 3 <td>${_('none')}</td>
4 4 <td>${_('read')}</td>
5 5 <td>${_('write')}</td>
6 6 <td>${_('admin')}</td>
7 7 <td>${_('member')}</td>
8 8 <td></td>
9 9 </tr>
10 10 ## USERS
11 11 %for r2p in c.repos_group.repo_group_to_perm:
12 12 <tr id="id${id(r2p.user.username)}">
13 13 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.none')}</td>
14 14 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.read')}</td>
15 15 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.write')}</td>
16 16 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.admin')}</td>
17 17 <td style="white-space: nowrap;">
18 18 <img class="perm-gravatar" src="${h.gravatar_url(r2p.user.email,14)}"/>${r2p.user.username if r2p.user.username != 'default' else _('default')}
19 19 </td>
20 20 <td>
21 21 %if r2p.user.username !='default':
22 22 <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')">
23 23 ${_('revoke')}
24 24 </span>
25 25 %endif
26 26 </td>
27 27 </tr>
28 28 %endfor
29 29
30 30 ## USERS GROUPS
31 31 %for g2p in c.repos_group.users_group_to_perm:
32 32 <tr id="id${id(g2p.users_group.users_group_name)}">
33 33 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.none')}</td>
34 34 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.read')}</td>
35 35 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.write')}</td>
36 36 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.admin')}</td>
37 37 <td style="white-space: nowrap;">
38 38 <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>${g2p.users_group.users_group_name}
39 39 </td>
40 40 <td>
41 41 <span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')">
42 42 ${_('revoke')}
43 43 </span>
44 44 </td>
45 45 </tr>
46 46 %endfor
47 47 <%
48 48 _tmpl = h.literal("""' \
49 49 <td><input type="radio" value="group.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
50 50 <td><input type="radio" value="group.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
51 51 <td><input type="radio" value="group.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
52 52 <td><input type="radio" value="group.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
53 53 <td class="ac"> \
54 54 <div class="perm_ac" id="perm_ac_{0}"> \
55 55 <input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \
56 56 <input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden"> \
57 57 <div id="perm_container_{0}"></div> \
58 58 </div> \
59 59 </td> \
60 60 <td></td>'""")
61 61 %>
62 62 ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl'
63 63 <tr class="new_members last_new_member" id="add_perm_input"></tr>
64 64 <tr>
65 65 <td colspan="6">
66 66 <span id="add_perm" class="add_icon" style="cursor: pointer;">
67 67 ${_('Add another member')}
68 68 </span>
69 69 </td>
70 70 </tr>
71 71 <tr>
72 72 <td colspan="6">
73 73 ${h.checkbox('recursive',value="True", label=_('apply to children'))}
74 74 <span class="help-block">${_('Set or revoke permission to all children of that group, including repositories and other groups')}</span>
75 75 </td>
76 76 </tr>
77 77 </table>
78 78 <script type="text/javascript">
79 79 function ajaxActionUser(user_id, field_id) {
80 80 var sUrl = "${h.url('delete_repos_group_user_perm',group_name=c.repos_group.group_name)}";
81 81 var callback = {
82 82 success: function (o) {
83 83 var tr = YUD.get(String(field_id));
84 84 tr.parentNode.removeChild(tr);
85 85 },
86 86 failure: function (o) {
87 87 alert("${_('Failed to remove user')}");
88 88 },
89 89 };
90 90 var recursive = YUD.get('recursive').checked;
91 91 var postData = '_method=delete&recursive={0}&user_id={1}'.format(recursive,user_id);
92 92 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
93 93 };
94 94
95 95 function ajaxActionUsersGroup(users_group_id,field_id){
96 96 var sUrl = "${h.url('delete_repos_group_users_group_perm',group_name=c.repos_group.group_name)}";
97 97 var callback = {
98 98 success:function(o){
99 99 var tr = YUD.get(String(field_id));
100 100 tr.parentNode.removeChild(tr);
101 101 },
102 102 failure:function(o){
103 103 alert("${_('Failed to remove users group')}");
104 104 },
105 105 };
106 106 var recursive = YUD.get('recursive').checked;
107 107 var postData = '_method=delete&recursive={0}&users_group_id={1}'.format(recursive,users_group_id);
108 108 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
109 109 };
110 110
111 111 YUE.onDOMReady(function () {
112 112 if (!YUD.hasClass('perm_new_member_name', 'error')) {
113 113 YUD.setStyle('add_perm_input', 'display', 'none');
114 114 }
115 115 YAHOO.util.Event.addListener('add_perm', 'click', function () {
116 addPermAction(${_tmpl}, ${c.users_array|n}, ${c.users_groups_array|n});
116 addPermAction(${_tmpl}, ${c.users_array|n}, ${c.users_groups_array|n});
117 117 });
118 118 });
119 119
120 120 </script>
@@ -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 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 &raquo;
10 10 ${h.link_to(_('Repos groups'),h.url('repos_groups'))}
11 11 &raquo;
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 NEW 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',id=c.repos_group.group_id),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 <div class="field">
45 <div class="label label-textarea">
46 <label for="group_description">${_('Description')}:</label>
47 </div>
48 <div class="textarea text-area editor">
49 ${h.textarea('group_description',cols=23,rows=5,class_="medium")}
50 </div>
51 </div>
44 <div class="field">
45 <div class="label label-textarea">
46 <label for="group_description">${_('Description')}:</label>
47 </div>
48 <div class="textarea text-area editor">
49 ${h.textarea('group_description',cols=23,rows=5,class_="medium")}
50 </div>
51 </div>
52 52
53 <div class="field">
54 <div class="label">
55 <label for="group_parent_id">${_('Group parent')}:</label>
56 </div>
57 <div class="input">
58 ${h.select('group_parent_id','',c.repo_groups,class_="medium")}
59 </div>
60 </div>
53 <div class="field">
54 <div class="label">
55 <label for="group_parent_id">${_('Group parent')}:</label>
56 </div>
57 <div class="input">
58 ${h.select('group_parent_id','',c.repo_groups,class_="medium")}
59 </div>
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,96 +1,96 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 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'))} &raquo; ${_('Settings')}
10 10 </%def>
11 11
12 12 <%def name="page_nav()">
13 ${self.menu('admin')}
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 <div class="label label">
30 <label for="${hook.ui_key}">${hook.ui_key}</label>
31 </div>
32 <div class="input" style="margin-left:280px">
29 <div class="label label">
30 <label for="${hook.ui_key}">${hook.ui_key}</label>
31 </div>
32 <div class="input" style="margin-left:280px">
33 33 ${h.text(hook.ui_key,hook.ui_value,size=60,readonly="readonly")}
34 </div>
34 </div>
35 35 </div>
36 36 % endfor
37 </div>
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,338 +1,338 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 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'))} &raquo; ${_('Settings')}
10 10 </%def>
11 11
12 12 <%def name="page_nav()">
13 ${self.menu('admin')}
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>${_('Remap and rescan repositories')}</h3>
25 25 ${h.form(url('admin_setting', setting_id='mapping'),method='put')}
26 26 <div class="form">
27 27 <!-- fields -->
28 28
29 29 <div class="fields">
30 <div class="field">
31 <div class="label label-checkbox">
32 <label for="destroy">${_('rescan option')}:</label>
33 </div>
34 <div class="checkboxes">
35 <div class="checkbox">
36 ${h.checkbox('destroy',True)}
37 <label for="destroy">
38 <span class="tooltip" title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}">
39 ${_('destroy old data')}</span> </label>
40 </div>
30 <div class="field">
31 <div class="label label-checkbox">
32 <label for="destroy">${_('rescan option')}:</label>
33 </div>
34 <div class="checkboxes">
35 <div class="checkbox">
36 ${h.checkbox('destroy',True)}
37 <label for="destroy">
38 <span class="tooltip" title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}">
39 ${_('destroy old data')}</span> </label>
40 </div>
41 41 <span class="help-block">${_('Rescan repositories location for new repositories. Also deletes obsolete if `destroy` flag is checked ')}</span>
42 </div>
43 </div>
42 </div>
43 </div>
44 44
45 45 <div class="buttons">
46 46 ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")}
47 47 </div>
48 48 </div>
49 49 </div>
50 50 ${h.end_form()}
51 51
52 52 <h3>${_('Whoosh indexing')}</h3>
53 53 ${h.form(url('admin_setting', setting_id='whoosh'),method='put')}
54 54 <div class="form">
55 55 <!-- fields -->
56 56
57 57 <div class="fields">
58 58 <div class="field">
59 59 <div class="label label-checkbox">
60 60 <label>${_('index build option')}:</label>
61 61 </div>
62 62 <div class="checkboxes">
63 63 <div class="checkbox">
64 64 ${h.checkbox('full_index',True)}
65 65 <label for="full_index">${_('build from scratch')}</label>
66 66 </div>
67 67 </div>
68 68 </div>
69 69
70 70 <div class="buttons">
71 71 ${h.submit('reindex',_('Reindex'),class_="ui-btn large")}
72 72 </div>
73 73 </div>
74 74 </div>
75 75 ${h.end_form()}
76 76
77 77 <h3>${_('Global application settings')}</h3>
78 78 ${h.form(url('admin_setting', setting_id='global'),method='put')}
79 79 <div class="form">
80 80 <!-- fields -->
81 81
82 82 <div class="fields">
83 83
84 84 <div class="field">
85 85 <div class="label">
86 86 <label for="rhodecode_title">${_('Application name')}:</label>
87 87 </div>
88 88 <div class="input">
89 89 ${h.text('rhodecode_title',size=30)}
90 90 </div>
91 91 </div>
92 92
93 93 <div class="field">
94 94 <div class="label">
95 95 <label for="rhodecode_realm">${_('Realm text')}:</label>
96 96 </div>
97 97 <div class="input">
98 98 ${h.text('rhodecode_realm',size=30)}
99 99 </div>
100 100 </div>
101 101
102 102 <div class="field">
103 103 <div class="label">
104 104 <label for="rhodecode_ga_code">${_('GA code')}:</label>
105 105 </div>
106 106 <div class="input">
107 107 ${h.text('rhodecode_ga_code',size=30)}
108 108 </div>
109 109 </div>
110 110
111 111 <div class="buttons">
112 112 ${h.submit('save',_('Save settings'),class_="ui-btn large")}
113 113 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
114 114 </div>
115 115 </div>
116 116 </div>
117 117 ${h.end_form()}
118 118
119 119 <h3>${_('Visualisation settings')}</h3>
120 120 ${h.form(url('admin_setting', setting_id='visual'),method='put')}
121 121 <div class="form">
122 122 <!-- fields -->
123 123
124 124 <div class="fields">
125 125 <div class="field">
126 126 <div class="label label-checkbox">
127 127 <label>${_('General')}:</label>
128 128 </div>
129 129 <div class="checkboxes">
130 130 <div class="checkbox">
131 131 ${h.checkbox('rhodecode_lightweight_dashboard','True')}
132 132 <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label>
133 133 </div>
134 134 </div>
135 135 </div>
136 136
137 137 <div class="field">
138 138 <div class="label label-checkbox">
139 139 <label>${_('Icons')}:</label>
140 140 </div>
141 141 <div class="checkboxes">
142 142 <div class="checkbox">
143 143 ${h.checkbox('rhodecode_show_public_icon','True')}
144 144 <label for="rhodecode_show_public_icon">${_('Show public repo icon on repositories')}</label>
145 145 </div>
146 146 <div class="checkbox">
147 147 ${h.checkbox('rhodecode_show_private_icon','True')}
148 148 <label for="rhodecode_show_private_icon">${_('Show private repo icon on repositories')}</label>
149 149 </div>
150 150 </div>
151 151 </div>
152 152
153 153 <div class="field">
154 154 <div class="label label-checkbox">
155 155 <label>${_('Meta-Tagging')}:</label>
156 156 </div>
157 157 <div class="checkboxes">
158 158 <div class="checkbox">
159 159 ${h.checkbox('rhodecode_stylify_metatags','True')}
160 160 <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label>
161 161 </div>
162 162 <div style="padding-left: 20px;">
163 163 <ul> <!-- Fix style here -->
164 164 <li>[featured] <span class="metatag" tag="featured">featured</span></li>
165 165 <li>[stale] <span class="metatag" tag="stale">stale</span></li>
166 166 <li>[dead] <span class="metatag" tag="dead">dead</span></li>
167 167 <li>[lang =&gt; lang] <span class="metatag" tag="lang" >lang</span></li>
168 168 <li>[license =&gt; License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li>
169 169 <li>[requires =&gt; Repo] <span class="metatag" tag="requires" >requires =&gt; <a href="#" >Repo</a></span></li>
170 170 <li>[recommends =&gt; Repo] <span class="metatag" tag="recommends" >recommends =&gt; <a href="#" >Repo</a></span></li>
171 171 <li>[see =&gt; URI] <span class="metatag" tag="see">see =&gt; <a href="#">URI</a> </span></li>
172 172 </ul>
173 173 </div>
174 174 </div>
175 175 </div>
176 176
177 177 <div class="buttons">
178 178 ${h.submit('save',_('Save settings'),class_="ui-btn large")}
179 179 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
180 180 </div>
181 181
182 182 </div>
183 183 </div>
184 184 ${h.end_form()}
185 185
186 186
187 187 <h3>${_('VCS settings')}</h3>
188 188 ${h.form(url('admin_setting', setting_id='vcs'),method='put')}
189 189 <div class="form">
190 190 <!-- fields -->
191 191
192 192 <div class="fields">
193 193
194 194 <div class="field">
195 195 <div class="label label-checkbox">
196 196 <label>${_('Web')}:</label>
197 197 </div>
198 198 <div class="checkboxes">
199 <div class="checkbox">
200 ${h.checkbox('web_push_ssl', 'True')}
201 <label for="web_push_ssl">${_('require ssl for vcs operations')}</label>
202 </div>
199 <div class="checkbox">
200 ${h.checkbox('web_push_ssl', 'True')}
201 <label for="web_push_ssl">${_('require ssl for vcs operations')}</label>
202 </div>
203 203 <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>
204 </div>
204 </div>
205 205 </div>
206 206
207 207 <div class="field">
208 208 <div class="label label-checkbox">
209 209 <label>${_('Hooks')}:</label>
210 210 </div>
211 211 <div class="checkboxes">
212 <div class="checkbox">
213 ${h.checkbox('hooks_changegroup_update','True')}
214 <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label>
215 </div>
216 <div class="checkbox">
217 ${h.checkbox('hooks_changegroup_repo_size','True')}
218 <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label>
219 </div>
212 <div class="checkbox">
213 ${h.checkbox('hooks_changegroup_update','True')}
214 <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label>
215 </div>
216 <div class="checkbox">
217 ${h.checkbox('hooks_changegroup_repo_size','True')}
218 <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label>
219 </div>
220 220 <div class="checkbox">
221 221 ${h.checkbox('hooks_changegroup_push_logger','True')}
222 222 <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label>
223 223 </div>
224 224 <div class="checkbox">
225 225 ${h.checkbox('hooks_outgoing_pull_logger','True')}
226 226 <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label>
227 227 </div>
228 </div>
228 </div>
229 229 <div class="input" style="margin-top:10px">
230 230 ${h.link_to(_('advanced setup'),url('admin_edit_setting',setting_id='hooks'),class_="ui-btn")}
231 231 </div>
232 232 </div>
233 233 <div class="field">
234 234 <div class="label label-checkbox">
235 235 <label>${_('Mercurial Extensions')}:</label>
236 236 </div>
237 237 <div class="checkboxes">
238 238 <div class="checkbox">
239 239 ${h.checkbox('extensions_largefiles','True')}
240 240 <label for="extensions_hgsubversion">${_('largefiles extensions')}</label>
241 241 </div>
242 242 <div class="checkbox">
243 243 ${h.checkbox('extensions_hgsubversion','True')}
244 244 <label for="extensions_hgsubversion">${_('hgsubversion extensions')}</label>
245 245 </div>
246 246 <span class="help-block">${_('Requires hgsubversion library installed. Allows clonning from svn remote locations')}</span>
247 247 ##<div class="checkbox">
248 248 ## ${h.checkbox('extensions_hggit','True')}
249 249 ## <label for="extensions_hggit">${_('hg-git extensions')}</label>
250 250 ##</div>
251 251 ##<span class="help-block">${_('Requires hg-git library installed. Allows clonning from git remote locations')}</span>
252 252 </div>
253 253 </div>
254 254 <div class="field">
255 255 <div class="label">
256 256 <label for="paths_root_path">${_('Repositories location')}:</label>
257 257 </div>
258 258 <div class="input">
259 259 ${h.text('paths_root_path',size=30,readonly="readonly")}
260 <span id="path_unlock" class="tooltip"
261 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.'))}">
262 ${_('unlock')}</span>
260 <span id="path_unlock" class="tooltip"
261 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.'))}">
262 ${_('unlock')}</span>
263 263 <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span>
264 264 </div>
265 265 </div>
266 266
267 267 <div class="buttons">
268 268 ${h.submit('save',_('Save settings'),class_="ui-btn large")}
269 269 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
270 270 </div>
271 271 </div>
272 272 </div>
273 273 ${h.end_form()}
274 274
275 275 <script type="text/javascript">
276 276 YAHOO.util.Event.onDOMReady(function(){
277 277 YAHOO.util.Event.addListener('path_unlock','click',function(){
278 278 YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly');
279 279 });
280 280 });
281 281 </script>
282 282
283 283 <h3>${_('Test Email')}</h3>
284 284 ${h.form(url('admin_setting', setting_id='email'),method='put')}
285 285 <div class="form">
286 286 <!-- fields -->
287 287
288 288 <div class="fields">
289 289 <div class="field">
290 290 <div class="label">
291 291 <label for="test_email">${_('Email to')}:</label>
292 292 </div>
293 293 <div class="input">
294 294 ${h.text('test_email',size=30)}
295 295 </div>
296 296 </div>
297 297
298 298 <div class="buttons">
299 299 ${h.submit('send',_('Send'),class_="ui-btn large")}
300 300 </div>
301 301 </div>
302 302 </div>
303 303 ${h.end_form()}
304 304
305 305 <h3>${_('System Info and Packages')}</h3>
306 306 <div class="form">
307 307 <div>
308 308 <h5 id="expand_modules" style="cursor: pointer">&darr; ${_('show')} &darr;</h5>
309 309 </div>
310 310 <div id="expand_modules_table" style="display:none">
311 311 <h5>Python - ${c.py_version}</h5>
312 312 <h5>System - ${c.platform}</h5>
313 313
314 314 <table class="table" style="margin:0px 0px 0px 20px">
315 315 <colgroup>
316 316 <col style="width:220px">
317 317 </colgroup>
318 318 <tbody>
319 319 %for key, value in c.modules:
320 320 <tr>
321 321 <th style="text-align: right;padding-right:5px;">${key}</th>
322 322 <td>${value}</td>
323 323 </tr>
324 324 %endfor
325 325 </tbody>
326 326 </table>
327 327 </div>
328 328 </div>
329 329
330 330 <script type="text/javascript">
331 331 YUE.on('expand_modules','click',function(e){
332 YUD.setStyle('expand_modules_table','display','');
333 YUD.setStyle('expand_modules','display','none');
332 YUD.setStyle('expand_modules_table','display','');
333 YUD.setStyle('expand_modules','display','none');
334 334 })
335 335 </script>
336 336
337 337 </div>
338 338 </%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 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 &raquo;
10 10 ${h.link_to(_('Users'),h.url('users'))}
11 11 &raquo;
12 12 ${_('add new user')}
13 13 </%def>
14 14
15 15 <%def name="page_nav()">
16 ${self.menu('admin')}
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 </div>
96 </div>
97 97 </div>
98 98 ${h.end_form()}
99 99 </div>
100 100 </%def>
@@ -1,340 +1,340 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 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 &raquo;
11 11 ${h.link_to(_('Users'),h.url('users'))}
12 12 &raquo;
13 13 ${_('edit')} "${c.user.username}"
14 14 </%def>
15 15
16 16 <%def name="page_nav()">
17 ${self.menu('admin')}
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 <div class="field">
47 47 <div class="label">
48 48 <label>${_('Your IP')}</label> ${c.perm_user.ip_addr or "?"}
49 49 </div>
50 50 </div>
51 51 <div class="fields">
52 52 <div class="field">
53 53 <div class="label">
54 54 <label for="username">${_('Username')}:</label>
55 55 </div>
56 56 <div class="input">
57 57 %if c.ldap_dn:
58 58 ${h.text('username',class_='medium disabled', readonly="readonly")}
59 59 %else:
60 60 ${h.text('username',class_='medium')}
61 61 %endif:
62 62 </div>
63 63 </div>
64 64
65 65 <div class="field">
66 66 <div class="label">
67 67 <label for="ldap_dn">${_('LDAP DN')}:</label>
68 68 </div>
69 69 <div class="input">
70 70 ${h.text('ldap_dn',class_='medium disabled',readonly="readonly")}
71 71 </div>
72 72 </div>
73 73
74 74 <div class="field">
75 75 <div class="label">
76 76 <label for="new_password">${_('New password')}:</label>
77 77 </div>
78 78 <div class="input">
79 79 ${h.password('new_password',class_='medium',autocomplete="off")}
80 80 </div>
81 81 </div>
82 82
83 83 <div class="field">
84 84 <div class="label">
85 85 <label for="password_confirmation">${_('New password confirmation')}:</label>
86 86 </div>
87 87 <div class="input">
88 88 ${h.password('password_confirmation',class_="medium",autocomplete="off")}
89 89 </div>
90 90 </div>
91 91
92 92 <div class="field">
93 93 <div class="label">
94 94 <label for="firstname">${_('First Name')}:</label>
95 95 </div>
96 96 <div class="input">
97 97 ${h.text('firstname',class_='medium')}
98 98 </div>
99 99 </div>
100 100
101 101 <div class="field">
102 102 <div class="label">
103 103 <label for="lastname">${_('Last Name')}:</label>
104 104 </div>
105 105 <div class="input">
106 106 ${h.text('lastname',class_='medium')}
107 107 </div>
108 108 </div>
109 109
110 110 <div class="field">
111 111 <div class="label">
112 112 <label for="email">${_('Email')}:</label>
113 113 </div>
114 114 <div class="input">
115 115 ${h.text('email',class_='medium')}
116 116 </div>
117 117 </div>
118 118
119 119 <div class="field">
120 120 <div class="label label-checkbox">
121 121 <label for="active">${_('Active')}:</label>
122 122 </div>
123 123 <div class="checkboxes">
124 124 ${h.checkbox('active',value=True)}
125 125 </div>
126 126 </div>
127 127
128 128 <div class="field">
129 129 <div class="label label-checkbox">
130 130 <label for="admin">${_('Admin')}:</label>
131 131 </div>
132 132 <div class="checkboxes">
133 133 ${h.checkbox('admin',value=True)}
134 134 </div>
135 135 </div>
136 136 <div class="buttons">
137 137 ${h.submit('save',_('Save'),class_="ui-btn large")}
138 138 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
139 139 </div>
140 </div>
140 </div>
141 141 </div>
142 142 ${h.end_form()}
143 143 </div>
144 144 <div style="min-height:780px" class="box box-right">
145 145 <!-- box / title -->
146 146 <div class="title">
147 147 <h5>${_('Permissions')}</h5>
148 148 </div>
149 149 ${h.form(url('user_perm', id=c.user.user_id),method='put')}
150 150 <div class="form">
151 151 <!-- fields -->
152 152 <div class="fields">
153 153 <div class="field">
154 154 <div class="label label-checkbox">
155 155 <label for="inherit_permissions">${_('Inherit default permissions')}:</label>
156 156 </div>
157 157 <div class="checkboxes">
158 158 ${h.checkbox('inherit_default_permissions',value=True)}
159 159 </div>
160 160 <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. '
161 161 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span>
162 162 </div>
163 163 <div id="inherit_overlay" style="${'opacity:0.3' if c.user.inherit_default_permissions else ''}" >
164 164 <div class="field">
165 165 <div class="label label-checkbox">
166 166 <label for="create_repo_perm">${_('Create repositories')}:</label>
167 167 </div>
168 168 <div class="checkboxes">
169 169 ${h.checkbox('create_repo_perm',value=True)}
170 170 </div>
171 171 </div>
172 172 <div class="field">
173 173 <div class="label label-checkbox">
174 174 <label for="fork_repo_perm">${_('Fork repositories')}:</label>
175 175 </div>
176 176 <div class="checkboxes">
177 177 ${h.checkbox('fork_repo_perm',value=True)}
178 178 </div>
179 179 </div>
180 180 </div>
181 181 <div class="buttons">
182 182 ${h.submit('save',_('Save'),class_="ui-btn large")}
183 183 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
184 184 </div>
185 185 </div>
186 186 </div>
187 187 ${h.end_form()}
188 188
189 189 ## permissions overview
190 190 <div id="perms" class="table">
191 191 %for section in sorted(c.perm_user.permissions.keys()):
192 192 <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div>
193 193 %if not c.perm_user.permissions[section]:
194 194 <span class="empty_data">${_('Nothing here yet')}</span>
195 195 %else:
196 196 <div id='tbl_list_wrap_${section}' class="yui-skin-sam">
197 197 <table id="tbl_list_${section}">
198 198 <thead>
199 199 <tr>
200 200 <th class="left">${_('Name')}</th>
201 201 <th class="left">${_('Permission')}</th>
202 202 <th class="left">${_('Edit Permission')}</th>
203 203 </thead>
204 204 <tbody>
205 205 %for k in c.perm_user.permissions[section]:
206 206 <%
207 207 if section != 'global':
208 208 section_perm = c.perm_user.permissions[section].get(k)
209 209 _perm = section_perm.split('.')[-1]
210 210 else:
211 211 _perm = section_perm = None
212 212 %>
213 213 <tr>
214 214 <td>
215 215 %if section == 'repositories':
216 216 <a href="${h.url('summary_home',repo_name=k)}">${k}</a>
217 217 %elif section == 'repositories_groups':
218 218 <a href="${h.url('repos_group_home',group_name=k)}">${k}</a>
219 219 %else:
220 220 ${h.get_permission_name(k)}
221 221 %endif
222 222 </td>
223 223 <td>
224 224 %if section == 'global':
225 225 ${h.bool2icon(k.split('.')[-1] != 'none')}
226 226 %else:
227 227 <span class="perm_tag ${_perm}">${section_perm}</span>
228 228 %endif
229 229 </td>
230 230 <td>
231 231 %if section == 'repositories':
232 232 <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a>
233 233 %elif section == 'repositories_groups':
234 234 <a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a>
235 235 %else:
236 236 --
237 237 %endif
238 238 </td>
239 239 </tr>
240 240 %endfor
241 241 </tbody>
242 242 </table>
243 243 </div>
244 244 %endif
245 245 %endfor
246 246 </div>
247 247 </div>
248 248 <div class="box box-left" style="clear:left">
249 249 <!-- box / title -->
250 250 <div class="title">
251 251 <h5>${_('Email addresses')}</h5>
252 252 </div>
253 253
254 254 <div class="emails_wrap">
255 255 <table class="noborder">
256 256 %for em in c.user_email_map:
257 257 <tr>
258 258 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(em.user.email,16)}"/> </div></td>
259 259 <td><div class="email">${em.email}</div></td>
260 260 <td>
261 261 ${h.form(url('user_emails_delete', id=c.user.user_id),method='delete')}
262 262 ${h.hidden('del_email',em.email_id)}
263 263 ${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id,
264 264 class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this email: %s') % em.email+"');")}
265 265 ${h.end_form()}
266 266 </td>
267 267 </tr>
268 268 %endfor
269 269 </table>
270 270 </div>
271 271
272 272 ${h.form(url('user_emails', id=c.user.user_id),method='put')}
273 273 <div class="form">
274 274 <!-- fields -->
275 275 <div class="fields">
276 276 <div class="field">
277 277 <div class="label">
278 278 <label for="new_email">${_('New email address')}:</label>
279 279 </div>
280 280 <div class="input">
281 281 ${h.text('new_email', class_='medium')}
282 282 </div>
283 283 </div>
284 284 <div class="buttons">
285 285 ${h.submit('save',_('Add'),class_="ui-btn large")}
286 286 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
287 287 </div>
288 288 </div>
289 289 </div>
290 290 ${h.end_form()}
291 291 </div>
292 292 <div class="box box-left" style="clear:left">
293 293 <!-- box / title -->
294 294 <div class="title">
295 295 <h5>${_('Allowed IP addresses')}</h5>
296 296 </div>
297 297
298 298 <div class="ips_wrap">
299 299 <table class="noborder">
300 300 %if c.user_ip_map:
301 301 %for ip in c.user_ip_map:
302 302 <tr>
303 303 <td><div class="ip">${ip.ip_addr}</div></td>
304 304 <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td>
305 305 <td>
306 306 ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')}
307 307 ${h.hidden('del_ip',ip.ip_id)}
308 308 ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id,
309 309 class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")}
310 310 ${h.end_form()}
311 311 </td>
312 312 </tr>
313 313 %endfor
314 314 %else:
315 315 <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr>
316 316 %endif
317 317 </table>
318 318 </div>
319 319
320 320 ${h.form(url('user_ips', id=c.user.user_id),method='put')}
321 321 <div class="form">
322 322 <!-- fields -->
323 323 <div class="fields">
324 324 <div class="field">
325 325 <div class="label">
326 326 <label for="new_ip">${_('New ip address')}:</label>
327 327 </div>
328 328 <div class="input">
329 329 ${h.text('new_ip', class_='medium')}
330 330 </div>
331 331 </div>
332 332 <div class="buttons">
333 333 ${h.submit('save',_('Add'),class_="ui-btn large")}
334 334 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
335 335 </div>
336 336 </div>
337 337 </div>
338 338 ${h.end_form()}
339 339 </div>
340 340 </%def>
@@ -1,280 +1,280 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 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 ${self.menu('admin')}
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 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
44 44 <li>
45 45 <span>${h.link_to(_('Add repo'),h.url('admin_settings_create_repository'))}</span>
46 46 </li>
47 47 %endif
48 48 </ul>
49 49 </div>
50 50 <!-- end box / title -->
51 51 <div id="perms_container">
52 52 <div id="perms" class="table">
53 53 %for section in sorted(c.rhodecode_user.permissions.keys()):
54 54 <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div>
55 55
56 56 <div id='tbl_list_wrap_${section}' class="yui-skin-sam">
57 57 <table id="tbl_list_${section}">
58 58 <thead>
59 59 <tr>
60 60 <th class="left">${_('Name')}</th>
61 61 <th class="left">${_('Permission')}</th>
62 62 </thead>
63 63 <tbody>
64 64 %for k in c.rhodecode_user.permissions[section]:
65 65 <%
66 66 if section != 'global':
67 67 section_perm = c.rhodecode_user.permissions[section].get(k)
68 68 _perm = section_perm.split('.')[-1]
69 69 else:
70 70 _perm = section_perm = None
71 71 %>
72 72 %if _perm not in ['none']:
73 73 <tr>
74 74 <td>
75 75 %if section == 'repositories':
76 76 <a href="${h.url('summary_home',repo_name=k)}">${k}</a>
77 77 %elif section == 'repositories_groups':
78 78 <a href="${h.url('repos_group_home',group_name=k)}">${k}</a>
79 79 %else:
80 80 ${k}
81 81 %endif
82 82 </td>
83 83 <td>
84 84 %if section == 'global':
85 85 ${h.bool2icon(True)}
86 86 %else:
87 87 <span class="perm_tag ${_perm}">${section_perm}</span>
88 88 %endif
89 89 </td>
90 90 </tr>
91 91 %endif
92 92 %endfor
93 93 </tbody>
94 94 </table>
95 95 </div>
96 96 %endfor
97 97 </div>
98 98 </div>
99 99 <div id="my_container" style="display:none">
100 100 <div class="table yui-skin-sam" id="repos_list_wrap"></div>
101 101 <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
102 102 </div>
103 103 <div id="pullrequests_container" class="table" style="display:none">
104 104 ## loaded via AJAX
105 105 ${_('Loading...')}
106 106 </div>
107 107 </div>
108 108
109 109 <script type="text/javascript">
110 110
111 111 var show_perms = function(e){
112 112 YUD.addClass('show_perms', 'current');
113 113 YUD.removeClass('show_my','current');
114 114 YUD.removeClass('show_pullrequests','current');
115 115
116 116 YUD.setStyle('my_container','display','none');
117 117 YUD.setStyle('pullrequests_container','display','none');
118 118 YUD.setStyle('perms_container','display','');
119 119 YUD.setStyle('q_filter','display','none');
120 120 }
121 121 YUE.on('show_perms','click',function(e){
122 122 show_perms();
123 123 })
124 124
125 125 var show_my = function(e){
126 126 YUD.addClass('show_my', 'current');
127 127 YUD.removeClass('show_perms','current');
128 128 YUD.removeClass('show_pullrequests','current');
129 129
130 130 YUD.setStyle('perms_container','display','none');
131 131 YUD.setStyle('pullrequests_container','display','none');
132 132 YUD.setStyle('my_container','display','');
133 133 YUD.setStyle('q_filter','display','');
134 134 if(!YUD.hasClass('show_my', 'loaded')){
135 table_renderer(${c.data |n});
135 table_renderer(${c.data |n});
136 136 YUD.addClass('show_my', 'loaded');
137 137 }
138 138 }
139 139 YUE.on('show_my','click',function(e){
140 show_my(e);
140 show_my(e);
141 141 })
142 142
143 143 var show_pullrequests = function(e){
144 144 YUD.addClass('show_pullrequests', 'current');
145 145 YUD.removeClass('show_my','current');
146 146 YUD.removeClass('show_perms','current');
147 147
148 148 YUD.setStyle('my_container','display','none');
149 149 YUD.setStyle('perms_container','display','none');
150 150 YUD.setStyle('pullrequests_container','display','');
151 151 YUD.setStyle('q_filter','display','none');
152 152
153 153 var url = "${h.url('admin_settings_my_pullrequests')}";
154 154 ypjax(url, 'pullrequests_container');
155 155 }
156 156 YUE.on('show_pullrequests','click',function(e){
157 show_pullrequests(e)
157 show_pullrequests(e)
158 158 })
159 159
160 160 var tabs = {
161 161 'perms': show_perms,
162 162 'my': show_my,
163 163 'pullrequests': show_pullrequests
164 164 }
165 165 var url = location.href.split('#');
166 166 if (url[1]) {
167 167 //We have a hash
168 168 var tabHash = url[1];
169 169 var func = tabs[tabHash]
170 170 if (func){
171 171 func();
172 172 }
173 173 }
174 174
175 175 function table_renderer(data){
176 var myDataSource = new YAHOO.util.DataSource(data);
177 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
176 var myDataSource = new YAHOO.util.DataSource(data);
177 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
178 178
179 myDataSource.responseSchema = {
180 resultsList: "records",
181 fields: [
182 {key:"menu"},
183 {key:"raw_name"},
184 {key:"name"},
185 {key:"last_changeset"},
186 {key:"action"},
187 ]
188 };
179 myDataSource.responseSchema = {
180 resultsList: "records",
181 fields: [
182 {key:"menu"},
183 {key:"raw_name"},
184 {key:"name"},
185 {key:"last_changeset"},
186 {key:"action"},
187 ]
188 };
189 189 myDataSource.doBeforeCallback = function(req,raw,res,cb) {
190 190 // This is the filter function
191 191 var data = res.results || [],
192 192 filtered = [],
193 193 i,l;
194 194
195 195 if (req) {
196 196 req = req.toLowerCase();
197 197 for (i = 0; i<data.length; i++) {
198 198 var pos = data[i].raw_name.toLowerCase().indexOf(req)
199 199 if (pos != -1) {
200 200 filtered.push(data[i]);
201 201 }
202 202 }
203 203 res.results = filtered;
204 204 }
205 205 return res;
206 206 }
207 207
208 // main table sorting
209 var myColumnDefs = [
210 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
211 {key:"name",label:"${_('Name')}",sortable:true,
212 sortOptions: { sortFunction: nameSort }},
213 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
214 sortOptions: { sortFunction: revisionSort }},
215 {key:"action",label:"${_('Action')}",sortable:false},
216 ];
208 // main table sorting
209 var myColumnDefs = [
210 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
211 {key:"name",label:"${_('Name')}",sortable:true,
212 sortOptions: { sortFunction: nameSort }},
213 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
214 sortOptions: { sortFunction: revisionSort }},
215 {key:"action",label:"${_('Action')}",sortable:false},
216 ];
217 217
218 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{
219 sortedBy:{key:"name",dir:"asc"},
220 paginator: new YAHOO.widget.Paginator({
221 rowsPerPage: 50,
222 alwaysVisible: false,
223 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}",
224 pageLinks: 5,
225 containerClass: 'pagination-wh',
226 currentPageClass: 'pager_curpage',
227 pageLinkClass: 'pager_link',
228 nextPageLinkLabel: '&gt;',
229 previousPageLinkLabel: '&lt;',
230 firstPageLinkLabel: '&lt;&lt;',
231 lastPageLinkLabel: '&gt;&gt;',
232 containers:['user-paginator']
233 }),
218 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{
219 sortedBy:{key:"name",dir:"asc"},
220 paginator: new YAHOO.widget.Paginator({
221 rowsPerPage: 50,
222 alwaysVisible: false,
223 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}",
224 pageLinks: 5,
225 containerClass: 'pagination-wh',
226 currentPageClass: 'pager_curpage',
227 pageLinkClass: 'pager_link',
228 nextPageLinkLabel: '&gt;',
229 previousPageLinkLabel: '&lt;',
230 firstPageLinkLabel: '&lt;&lt;',
231 lastPageLinkLabel: '&gt;&gt;',
232 containers:['user-paginator']
233 }),
234 234
235 MSG_SORTASC:"${_('Click to sort ascending')}",
236 MSG_SORTDESC:"${_('Click to sort descending')}",
237 MSG_EMPTY:"${_('No records found.')}",
238 MSG_ERROR:"${_('Data error.')}",
239 MSG_LOADING:"${_('Loading...')}",
240 }
241 );
242 myDataTable.subscribe('postRenderEvent',function(oArgs) {
243 tooltip_activate();
244 quick_repo_menu();
245 });
235 MSG_SORTASC:"${_('Click to sort ascending')}",
236 MSG_SORTDESC:"${_('Click to sort descending')}",
237 MSG_EMPTY:"${_('No records found.')}",
238 MSG_ERROR:"${_('Data error.')}",
239 MSG_LOADING:"${_('Loading...')}",
240 }
241 );
242 myDataTable.subscribe('postRenderEvent',function(oArgs) {
243 tooltip_activate();
244 quick_repo_menu();
245 });
246 246
247 var filterTimeout = null;
247 var filterTimeout = null;
248 248
249 updateFilter = function() {
250 // Reset timeout
251 filterTimeout = null;
249 updateFilter = function() {
250 // Reset timeout
251 filterTimeout = null;
252 252
253 // Reset sort
254 var state = myDataTable.getState();
255 state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
253 // Reset sort
254 var state = myDataTable.getState();
255 state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
256 256
257 // Get filtered data
258 myDataSource.sendRequest(YUD.get('q_filter').value,{
259 success : myDataTable.onDataReturnInitializeTable,
260 failure : myDataTable.onDataReturnInitializeTable,
261 scope : myDataTable,
262 argument: state
263 });
257 // Get filtered data
258 myDataSource.sendRequest(YUD.get('q_filter').value,{
259 success : myDataTable.onDataReturnInitializeTable,
260 failure : myDataTable.onDataReturnInitializeTable,
261 scope : myDataTable,
262 argument: state
263 });
264 264
265 };
266 YUE.on('q_filter','click',function(){
267 if(!YUD.hasClass('q_filter', 'loaded')){
268 YUD.get('q_filter').value = '';
269 //TODO: load here full list later to do search within groups
270 YUD.addClass('q_filter', 'loaded');
271 }
272 });
265 };
266 YUE.on('q_filter','click',function(){
267 if(!YUD.hasClass('q_filter', 'loaded')){
268 YUD.get('q_filter').value = '';
269 //TODO: load here full list later to do search within groups
270 YUD.addClass('q_filter', 'loaded');
271 }
272 });
273 273
274 YUE.on('q_filter','keyup',function (e) {
275 clearTimeout(filterTimeout);
276 filterTimeout = setTimeout(updateFilter,600);
277 });
278 }
274 YUE.on('q_filter','keyup',function (e) {
275 clearTimeout(filterTimeout);
276 filterTimeout = setTimeout(updateFilter,600);
277 });
278 }
279 279 </script>
280 280 </%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 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'))} &raquo; <span id="user_count">0</span> ${_('users')}
10 10 </%def>
11 11
12 12 <%def name="page_nav()">
13 ${self.menu('admin')}
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 resultsList: "records",
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 var pos = data[i].raw_username.toLowerCase().indexOf(req)
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 sortOptions: { sortFunction: linkSort }
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 sortOptions: { sortFunction: lastLoginSort }},
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: '&gt;',
101 101 previousPageLinkLabel: '&lt;',
102 102 firstPageLinkLabel: '&lt;&lt;',
103 103 lastPageLinkLabel: '&gt;&gt;',
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,228 +1,228 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Edit users 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 &raquo;
11 11 ${h.link_to(_('UsersGroups'),h.url('users_groups'))}
12 12 &raquo;
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 <div class="fields">
31 <div class="field">
32 <div class="label">
33 <label for="users_group_name">${_('Group name')}:</label>
34 </div>
35 <div class="input">
36 ${h.text('users_group_name',class_='small')}
37 </div>
38 </div>
30 <div class="fields">
31 <div class="field">
32 <div class="label">
33 <label for="users_group_name">${_('Group name')}:</label>
34 </div>
35 <div class="input">
36 ${h.text('users_group_name',class_='small')}
37 </div>
38 </div>
39 39
40 <div class="field">
41 <div class="label label-checkbox">
42 <label for="users_group_active">${_('Active')}:</label>
43 </div>
44 <div class="checkboxes">
45 ${h.checkbox('users_group_active',value=True)}
46 </div>
47 </div>
48 <div class="field">
40 <div class="field">
41 <div class="label label-checkbox">
42 <label for="users_group_active">${_('Active')}:</label>
43 </div>
44 <div class="checkboxes">
45 ${h.checkbox('users_group_active',value=True)}
46 </div>
47 </div>
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 <table>
54 <tr>
55 <td>
56 <div>
57 <div style="float:left">
58 <div class="text" style="padding: 0px 0px 6px;">${_('Choosen group members')}</div>
59 ${h.select('users_group_members',[x[0] for x in c.group_members],c.group_members,multiple=True,size=8,style="min-width:210px")}
60 <div id="remove_all_elements" style="cursor:pointer;text-align:center">
61 ${_('Remove all elements')}
62 <img alt="remove" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_right.png')}"/>
63 </div>
64 </div>
65 <div style="float:left;width:20px;padding-top:50px">
66 <img alt="add" id="add_element"
67 style="padding:2px;cursor:pointer"
68 src="${h.url('/images/icons/arrow_left.png')}"/>
69 <br />
70 <img alt="remove" id="remove_element"
71 style="padding:2px;cursor:pointer"
72 src="${h.url('/images/icons/arrow_right.png')}"/>
73 </div>
74 <div style="float:left">
75 <div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div>
76 ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")}
77 <div id="add_all_elements" style="cursor:pointer;text-align:center">
78 <img alt="add" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_left.png')}"/>
79 ${_('Add all elements')}
80 </div>
81 </div>
82 </div>
83 </td>
84 </tr>
85 </table>
53 <table>
54 <tr>
55 <td>
56 <div>
57 <div style="float:left">
58 <div class="text" style="padding: 0px 0px 6px;">${_('Choosen group members')}</div>
59 ${h.select('users_group_members',[x[0] for x in c.group_members],c.group_members,multiple=True,size=8,style="min-width:210px")}
60 <div id="remove_all_elements" style="cursor:pointer;text-align:center">
61 ${_('Remove all elements')}
62 <img alt="remove" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_right.png')}"/>
63 </div>
64 </div>
65 <div style="float:left;width:20px;padding-top:50px">
66 <img alt="add" id="add_element"
67 style="padding:2px;cursor:pointer"
68 src="${h.url('/images/icons/arrow_left.png')}"/>
69 <br />
70 <img alt="remove" id="remove_element"
71 style="padding:2px;cursor:pointer"
72 src="${h.url('/images/icons/arrow_right.png')}"/>
73 </div>
74 <div style="float:left">
75 <div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div>
76 ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")}
77 <div id="add_all_elements" style="cursor:pointer;text-align:center">
78 <img alt="add" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_left.png')}"/>
79 ${_('Add all elements')}
80 </div>
81 </div>
82 </div>
83 </td>
84 </tr>
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',id=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,362 +1,362 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="root.html"/>
3 3
4 4 <!-- HEADER -->
5 5 <div id="header">
6 6 <div id="header-inner" class="title hover">
7 7 <div id="logo">
8 8 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
9 9 </div>
10 10 <!-- MENU -->
11 11 ${self.page_nav()}
12 12 <!-- END MENU -->
13 13 ${self.body()}
14 14 </div>
15 15 </div>
16 16 <!-- END HEADER -->
17 17
18 18 <!-- CONTENT -->
19 19 <div id="content">
20 20 <div class="flash_msg">
21 21 <% messages = h.flash.pop_messages() %>
22 22 % if messages:
23 23 <ul id="flash-messages">
24 24 % for message in messages:
25 25 <li class="${message.category}_msg">${message}</li>
26 26 % endfor
27 27 </ul>
28 28 % endif
29 29 </div>
30 30 <div id="main">
31 31 ${next.main()}
32 32 </div>
33 33 </div>
34 34 <!-- END CONTENT -->
35 35
36 36 <!-- FOOTER -->
37 37 <div id="footer">
38 38 <div id="footer-inner" class="title">
39 39 <div>
40 40 <p class="footer-link">
41 41 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
42 42 </p>
43 <p class="footer-link-right">
44 <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a>
45 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
46 </p>
43 <p class="footer-link-right">
44 <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a>
45 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
46 </p>
47 47 </div>
48 48 </div>
49 49 </div>
50 50 <!-- END FOOTER -->
51 51
52 52 ### MAKO DEFS ###
53 53 <%def name="page_nav()">
54 54 ${self.menu()}
55 55 </%def>
56 56
57 57 <%def name="breadcrumbs()">
58 58 <div class="breadcrumbs">
59 59 ${self.breadcrumbs_links()}
60 60 </div>
61 61 </%def>
62 62
63 63 <%def name="usermenu()">
64 64 <div class="user-menu">
65 65 <div class="container">
66 66 <div class="gravatar" id="quick_login_link">
67 67 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" />
68 68 </div>
69 69 %if c.rhodecode_user.username != 'default' and c.unread_notifications != 0:
70 70 <div class="notifications">
71 71 <a id="notification_counter" href="${h.url('notifications')}">${c.unread_notifications}</a>
72 72 </div>
73 73 %endif
74 74 </div>
75 75 <div id="quick_login" style="display:none">
76 76 %if c.rhodecode_user.username == 'default':
77 77 <h4>${_('Login to your account')}</h4>
78 78 ${h.form(h.url('login_home',came_from=h.url.current()))}
79 79 <div class="form">
80 80 <div class="fields">
81 81 <div class="field">
82 82 <div class="label">
83 83 <label for="username">${_('Username')}:</label>
84 84 </div>
85 85 <div class="input">
86 86 ${h.text('username',class_='focus',size=40)}
87 87 </div>
88 88
89 89 </div>
90 90 <div class="field">
91 91 <div class="label">
92 92 <label for="password">${_('Password')}:</label>
93 93 </div>
94 94 <div class="input">
95 95 ${h.password('password',class_='focus',size=40)}
96 96 </div>
97 97
98 98 </div>
99 99 <div class="buttons">
100 100 <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>
101 101 <div class="register">
102 102 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
103 103 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
104 104 %endif
105 105 </div>
106 106 <div class="submit">
107 107 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
108 108 </div>
109 109 </div>
110 110 </div>
111 111 </div>
112 112 ${h.end_form()}
113 113 %else:
114 114 <div class="links_left">
115 115 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
116 116 <div class="email">${c.rhodecode_user.email}</div>
117 117 <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div>
118 118 <div class="inbox"><a href="${h.url('notifications')}">${_('Inbox')}: ${c.unread_notifications}</a></div>
119 119 </div>
120 120 <div class="links_right">
121 121 <ol class="links">
122 122 <li>${h.link_to(_(u'Home'),h.url('home'))}</li>
123 123 <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li>
124 124 <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li>
125 125 <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li>
126 126 </ol>
127 127 </div>
128 128 %endif
129 129 </div>
130 130 </div>
131 131 </%def>
132 132
133 133 <%def name="menu(current=None)">
134 <%
135 def is_current(selected):
136 if selected == current:
137 return h.literal('class="current"')
138 %>
139 %if current not in ['home','admin']:
140 ##REGULAR MENU
141 <ul id="quick">
142 <!-- repo switcher -->
143 <li>
144 <a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#">
134 <%
135 def is_current(selected):
136 if selected == current:
137 return h.literal('class="current"')
138 %>
139 %if current not in ['home','admin']:
140 ##REGULAR MENU
141 <ul id="quick">
142 <!-- repo switcher -->
143 <li>
144 <a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#">
145 145 <span class="icon">
146 146 <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" />
147 147 </span>
148 148 <span>&darr;</span>
149 </a>
150 <ul id="repo_switcher_list" class="repo_switcher">
149 </a>
150 <ul id="repo_switcher_list" class="repo_switcher">
151 151 <li>
152 152 <a href="#">${_('loading...')}</a>
153 153 </li>
154 </ul>
155 </li>
154 </ul>
155 </li>
156 156
157 <li ${is_current('summary')}>
158 <a class="menu_link" title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
159 <span class="icon">
160 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
161 </span>
162 <span>${_('Summary')}</span>
163 </a>
164 </li>
157 <li ${is_current('summary')}>
158 <a class="menu_link" title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
159 <span class="icon">
160 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
161 </span>
162 <span>${_('Summary')}</span>
163 </a>
164 </li>
165 165 <li ${is_current('changelog')}>
166 166 <a class="menu_link" title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
167 167 <span class="icon">
168 168 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" />
169 169 </span>
170 170 <span>${_('Changelog')}</span>
171 171 </a>
172 172 </li>
173 173
174 174 <li ${is_current('switch_to')}>
175 175 <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#">
176 176 <span class="icon">
177 177 <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" />
178 178 </span>
179 179 <span>${_('Switch to')}</span>
180 180 </a>
181 181 <ul id="switch_to_list" class="switch_to">
182 182 <li><a href="#">${_('loading...')}</a></li>
183 183 </ul>
184 184 </li>
185 185 <li ${is_current('files')}>
186 186 <a class="menu_link" title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
187 187 <span class="icon">
188 188 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" />
189 189 </span>
190 190 <span>${_('Files')}</span>
191 191 </a>
192 192 </li>
193 193
194 194 <li ${is_current('options')}>
195 195 <a class="menu_link" title="${_('Options')}" href="#">
196 196 <span class="icon">
197 197 <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" />
198 198 </span>
199 199 <span>${_('Options')}</span>
200 200 </a>
201 201 <ul>
202 202 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
203 203 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
204 204 <li>${h.link_to(_('repository settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
205 205 %else:
206 206 <li>${h.link_to(_('repository settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
207 207 %endif
208 208 %endif
209 209
210 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
210 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
211 211 %if h.is_hg(c.rhodecode_repo):
212 212 <li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li>
213 213 %endif
214 214 %if c.rhodecode_db_repo.fork:
215 215 <li>${h.link_to(_('compare fork'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref=request.GET.get('branch') or 'default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name),class_='compare_request')}</li>
216 216 %endif
217 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
217 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
218 218
219 219 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
220 220 %if c.rhodecode_db_repo.locked[0]:
221 221 <li>${h.link_to(_('unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
222 222 %else:
223 223 <li>${h.link_to(_('lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
224 224 %endif
225 225 %endif
226 226
227 227 % if h.HasPermissionAll('hg.admin')('access admin main page'):
228 228 <li>
229 229 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
230 230 <%def name="admin_menu()">
231 231 <ul>
232 232 <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li>
233 233 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
234 234 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
235 235 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
236 236 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li>
237 237 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
238 238 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
239 239 <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
240 240 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
241 241 </ul>
242 242 </%def>
243 243 ## ADMIN MENU
244 244 ${admin_menu()}
245 245 </li>
246 246 % endif
247 247 </ul>
248 248 </li>
249 249
250 250 <li>
251 251 <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
252 252 <span class="icon_short">
253 253 <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" />
254 254 </span>
255 255 <span id="current_followers_count" class="short">${c.repository_followers}</span>
256 256 </a>
257 257 </li>
258 258 <li>
259 259 <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
260 260 <span class="icon_short">
261 261 <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" />
262 262 </span>
263 263 <span class="short">${c.repository_forks}</span>
264 264 </a>
265 265 </li>
266 266 <li>
267 267 <a class="menu_link" title="${_('Pull requests')}" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}">
268 268 <span class="icon_short">
269 269 <img src="${h.url('/images/icons/arrow_join.png')}" alt="${_('Pull requests')}" />
270 270 </span>
271 271 <span class="short">${c.repository_pull_requests}</span>
272 272 </a>
273 273 </li>
274 274 ${usermenu()}
275 </ul>
275 </ul>
276 276 <script type="text/javascript">
277 277 YUE.on('repo_switcher','mouseover',function(){
278 278 function qfilter(){
279 279 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
280 280 var target = 'q_filter_rs';
281 281 var func = function(node){
282 282 return node.parentNode;
283 283 }
284 284 q_filter(target,nodes,func);
285 285 }
286 286 var loaded = YUD.hasClass('repo_switcher','loaded');
287 287 if(!loaded){
288 288 YUD.addClass('repo_switcher','loaded');
289 289 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
290 290 function(o){qfilter();},
291 291 function(o){YUD.removeClass('repo_switcher','loaded');}
292 292 ,null);
293 293 }
294 294 return false;
295 295 });
296 296
297 297 YUE.on('branch_tag_switcher','mouseover',function(){
298 298 var loaded = YUD.hasClass('branch_tag_switcher','loaded');
299 299 if(!loaded){
300 300 YUD.addClass('branch_tag_switcher','loaded');
301 301 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list',
302 302 function(o){},
303 303 function(o){YUD.removeClass('branch_tag_switcher','loaded');}
304 304 ,null);
305 305 }
306 306 return false;
307 307 });
308 308 </script>
309 %else:
310 ##ROOT MENU
309 %else:
310 ##ROOT MENU
311 311 <ul id="quick">
312 312 <li>
313 313 <a class="menu_link" title="${_('Home')}" href="${h.url('home')}">
314 314 <span class="icon">
315 315 <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" />
316 316 </span>
317 317 <span>${_('Home')}</span>
318 318 </a>
319 319 </li>
320 320 %if c.rhodecode_user.username != 'default':
321 321 <li>
322 322 <a class="menu_link" title="${_('Journal')}" href="${h.url('journal')}">
323 323 <span class="icon">
324 324 <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" />
325 325 </span>
326 326 <span>${_('Journal')}</span>
327 327 </a>
328 328 </li>
329 329 %else:
330 330 <li>
331 331 <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}">
332 332 <span class="icon">
333 333 <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" />
334 334 </span>
335 335 <span>${_('Public journal')}</span>
336 336 </a>
337 337 </li>
338 338 %endif
339 339 <li>
340 340 <a class="menu_link" title="${_('Search')}" href="${h.url('search')}">
341 341 <span class="icon">
342 342 <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" />
343 343 </span>
344 344 <span>${_('Search')}</span>
345 345 </a>
346 346 </li>
347 347
348 %if h.HasPermissionAll('hg.admin')('access admin main page'):
348 %if h.HasPermissionAll('hg.admin')('access admin main page'):
349 349 <li ${is_current('admin')}>
350 350 <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}">
351 351 <span class="icon">
352 352 <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" />
353 353 </span>
354 354 <span>${_('Admin')}</span>
355 355 </a>
356 356 ${admin_menu()}
357 357 </li>
358 %endif
358 %endif
359 359 ${usermenu()}
360 </ul>
361 %endif
360 </ul>
361 %endif
362 362 </%def>
@@ -1,123 +1,123 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html>
3 3 <html xmlns="http://www.w3.org/1999/xhtml">
4 4 <head>
5 5 <title>${self.title()}</title>
6 6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 7 <meta name="robots" content="index, nofollow"/>
8 8 <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" />
9 9
10 10 ## CSS ###
11 11 <%def name="css()">
12 12 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/>
13 13 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/>
14 14 ## EXTRA FOR CSS
15 15 ${self.css_extra()}
16 16 </%def>
17 17 <%def name="css_extra()">
18 18 </%def>
19 19
20 20 ${self.css()}
21 21
22 22 %if c.ga_code:
23 23 <!-- Analytics -->
24 <script type="text/javascript">
25 var _gaq = _gaq || [];
26 _gaq.push(['_setAccount', '${c.ga_code}']);
27 _gaq.push(['_trackPageview']);
24 <script type="text/javascript">
25 var _gaq = _gaq || [];
26 _gaq.push(['_setAccount', '${c.ga_code}']);
27 _gaq.push(['_trackPageview']);
28 28
29 (function() {
30 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
31 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
32 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
33 })();
34 </script>
35 %endif
29 (function() {
30 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
31 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
32 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
33 })();
34 </script>
35 %endif
36 36
37 37 ## JAVASCRIPT ##
38 38 <%def name="js()">
39 39 <script type="text/javascript">
40 40 //JS translations map
41 41 var TRANSLATION_MAP = {
42 42 'add another comment':'${_("add another comment")}',
43 43 'Stop following this repository':"${_('Stop following this repository')}",
44 44 'Start following this repository':"${_('Start following this repository')}",
45 45 'Group':"${_('Group')}",
46 46 'members':"${_('members')}",
47 47 'loading...':"${_('loading...')}",
48 48 'search truncated': "${_('search truncated')}",
49 49 'no matching files': "${_('no matching files')}",
50 50 'Open new pull request': "${_('Open new pull request')}",
51 51 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}",
52 52 'Show selected changes __S -> __E': "${_('Show selected changes __S -> __E')}",
53 53 'Selection link': "${_('Selection link')}",
54 54 };
55 55 var _TM = TRANSLATION_MAP;
56 56 var TOGGLE_FOLLOW_URL = "${h.url('toggle_following')}";
57 57 var LAZY_CS_URL = "${h.url('changeset_info', repo_name='__NAME__', revision='__REV__')}"
58 58 </script>
59 59 <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script>
60 60 <!--[if lt IE 9]>
61 61 <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script>
62 62 <![endif]-->
63 63 <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script>
64 64 <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script>
65 65 <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script>
66 66 ## EXTRA FOR JS
67 67 ${self.js_extra()}
68 68 <script type="text/javascript">
69 69 (function(window,undefined){
70 70 // Prepare
71 71 var History = window.History; // Note: We are using a capital H instead of a lower h
72 72 if ( !History.enabled ) {
73 73 // History.js is disabled for this browser.
74 74 // This is because we can optionally choose to support HTML4 browsers or not.
75 75 return false;
76 76 }
77 77 })(window);
78 78
79 79 YUE.onDOMReady(function(){
80 80 tooltip_activate();
81 81 show_more_event();
82 82 show_changeset_tooltip();
83 83
84 84 YUE.on('quick_login_link','click',function(e){
85 85 // make sure we don't redirect
86 86 YUE.preventDefault(e);
87 87
88 88 if(YUD.hasClass('quick_login_link','enabled')){
89 89 YUD.setStyle('quick_login','display','none');
90 90 YUD.removeClass('quick_login_link','enabled');
91 91 }
92 92 else{
93 93 YUD.setStyle('quick_login','display','');
94 94 YUD.addClass('quick_login_link','enabled');
95 95 var usr = YUD.get('username');
96 96 if(usr){
97 usr.focus();
97 usr.focus();
98 98 }
99 99 }
100 100 });
101 101 })
102 102 </script>
103 103 </%def>
104 104 <%def name="js_extra()"></%def>
105 105 ${self.js()}
106 106 <%def name="head_extra()"></%def>
107 107 ${self.head_extra()}
108 108 </head>
109 109 <body id="body">
110 110 ## IE hacks
111 111 <!--[if IE 7]>
112 112 <script>YUD.addClass(document.body,'ie7')</script>
113 113 <![endif]-->
114 114 <!--[if IE 8]>
115 115 <script>YUD.addClass(document.body,'ie8')</script>
116 116 <![endif]-->
117 117 <!--[if IE 9]>
118 118 <script>YUD.addClass(document.body,'ie9')</script>
119 119 <![endif]-->
120 120
121 121 ${next.body()}
122 122 </body>
123 123 </html>
@@ -1,33 +1,33 b''
1 1 %if c.repo_bookmarks:
2 2 <div id="table_wrap" class="yui-skin-sam">
3 3 <table id="bookmarks_data">
4 4 <thead>
5 <tr>
5 <tr>
6 6 <th class="left">${_('Name')}</th>
7 7 <th class="left">${_('Date')}</th>
8 8 <th class="left">${_('Author')}</th>
9 9 <th class="left">${_('Revision')}</th>
10 </tr>
10 </tr>
11 11 </thead>
12 %for cnt,book in enumerate(c.repo_bookmarks.items()):
13 <tr class="parity${cnt%2}">
12 %for cnt,book in enumerate(c.repo_bookmarks.items()):
13 <tr class="parity${cnt%2}">
14 14 <td>
15 15 <span class="logbooks">
16 16 <span class="bookbook">${h.link_to(book[0],
17 17 h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span>
18 18 </span>
19 19 </td>
20 20 <td><span class="tooltip" title="${h.tooltip(h.age(book[1].date))}">${h.fmt_date(book[1].date)}</span></td>
21 <td title="${book[1].author}">${h.person(book[1].author)}</td>
22 <td>
21 <td title="${book[1].author}">${h.person(book[1].author)}</td>
22 <td>
23 23 <div>
24 24 <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id)}">r${book[1].revision}:${h.short_id(book[1].raw_id)}</a></pre>
25 25 </div>
26 26 </td>
27 </tr>
28 %endfor
27 </tr>
28 %endfor
29 29 </table>
30 30 </div>
31 31 %else:
32 ${_('There are no bookmarks yet')}
32 ${_('There are no bookmarks yet')}
33 33 %endif
@@ -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 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 ${h.link_to(_(u'Home'),h.url('/'))}
11 11 &raquo;
12 12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
13 13 &raquo;
14 14 ${_('branches')}
15 15 </%def>
16 16
17 17 <%def name="page_nav()">
18 18 ${self.menu('branches')}
19 19 </%def>
20 20
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 %if c.repo_branches:
29 29 <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;vertical-align: right;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div>
30 30 %endif
31 31 <div class="table">
32 32 <%include file='branches_data.html'/>
33 33 </div>
34 34 </div>
35 35 <script type="text/javascript">
36 36 YUE.on('compare_branches','click',function(e){
37 YUE.preventDefault(e);
38 var org = YUQ('input[name=compare_org]:checked')[0];
39 var other = YUQ('input[name=compare_other]:checked')[0];
37 YUE.preventDefault(e);
38 var org = YUQ('input[name=compare_org]:checked')[0];
39 var other = YUQ('input[name=compare_other]:checked')[0];
40 40
41 if(org && other){
42 var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}";
43 var u = compare_url.replace('__ORG__',org.value)
44 .replace('__OTHER__',other.value);
45 window.location=u;
46 }
41 if(org && other){
42 var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}";
43 var u = compare_url.replace('__ORG__',org.value)
44 .replace('__OTHER__',other.value);
45 window.location=u;
46 }
47 47 });
48 48 // main table sorting
49 49 var myColumnDefs = [
50 50 {key:"name",label:"${_('Name')}",sortable:true},
51 51 {key:"date",label:"${_('Date')}",sortable:true,
52 52 sortOptions: { sortFunction: dateSort }},
53 53 {key:"author",label:"${_('Author')}",sortable:true},
54 54 {key:"revision",label:"${_('Revision')}",sortable:true,
55 55 sortOptions: { sortFunction: revisionSort }},
56 56 {key:"compare",label:"${_('Compare')}",sortable:false,},
57 57 ];
58 58
59 59 var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data"));
60 60
61 61 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
62 62
63 63 myDataSource.responseSchema = {
64 64 fields: [
65 65 {key:"name"},
66 66 {key:"date"},
67 67 {key:"author"},
68 68 {key:"revision"},
69 69 {key:"compare"},
70 70 ]
71 71 };
72 72
73 73 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
74 74 {
75 75 sortedBy:{key:"name",dir:"asc"},
76 76 MSG_SORTASC:"${_('Click to sort ascending')}",
77 77 MSG_SORTDESC:"${_('Click to sort descending')}",
78 78 MSG_EMPTY:"${_('No records found.')}",
79 79 MSG_ERROR:"${_('Data error.')}",
80 80 MSG_LOADING:"${_('Loading...')}",
81 81 }
82 82 );
83 83 myDataTable.subscribe('postRenderEvent',function(oArgs) {
84 84 tooltip_activate();
85 85 var func = function(node){
86 86 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
87 87 }
88 88 q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func);
89 89 });
90 90
91 91 </script>
92 92
93 93 </%def>
@@ -1,58 +1,58 b''
1 1 %if c.repo_branches:
2 2 <div id="table_wrap" class="yui-skin-sam">
3 3 <table id="branches_data">
4 4 <thead>
5 5 <tr>
6 6 <th class="left">${_('Name')}</th>
7 7 <th class="left">${_('Date')}</th>
8 8 <th class="left">${_('Author')}</th>
9 9 <th class="left">${_('Revision')}</th>
10 10 <th class="left">${_('Compare')}</th>
11 11 </tr>
12 12 </thead>
13 %for cnt,branch in enumerate(c.repo_branches.items()):
14 <tr class="parity${cnt%2}">
13 %for cnt,branch in enumerate(c.repo_branches.items()):
14 <tr class="parity${cnt%2}">
15 15 <td>
16 16 <span class="logtags">
17 17 <span class="branchtag">${h.link_to(branch[0],
18 18 h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
19 19 </span>
20 20 </td>
21 21 <td><span class="tooltip" title="${h.tooltip(h.age(branch[1].date))}">${h.fmt_date(branch[1].date)}</span></td>
22 22 <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
23 23 <td>
24 24 <div>
25 25 <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
26 26 </div>
27 27 </td>
28 28 <td>
29 29 <input class="branch-compare" type="radio" name="compare_org" value="${branch[0]}"/>
30 30 <input class="branch-compare" type="radio" name="compare_other" value="${branch[0]}"/>
31 31 </td>
32 </tr>
33 %endfor
32 </tr>
33 %endfor
34 34 % if hasattr(c,'repo_closed_branches') and c.repo_closed_branches:
35 35 %for cnt,branch in enumerate(c.repo_closed_branches.items()):
36 36 <tr class="parity${cnt%2}">
37 37 <td>
38 38 <span class="logtags">
39 39 <span class="branchtag">${h.link_to(branch[0]+' [closed]',
40 40 h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
41 41 </span>
42 42 </td>
43 43 <td><span class="tooltip" title="${h.tooltip(h.age(branch[1].date))}">${h.fmt_date(branch[1].date)}</span></td>
44 44 <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
45 45 <td>
46 46 <div>
47 47 <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
48 48 </div>
49 49 </td>
50 50 <td></td>
51 51 </tr>
52 52 %endfor
53 53 %endif
54 54 </table>
55 55 </div>
56 56 %else:
57 57 ${_('There are no branches yet')}
58 58 %endif
@@ -1,306 +1,306 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 <%inherit file="/base/base.html"/>
4 4
5 5 <%def name="title()">
6 6 ${_('%s Changelog') % c.repo_name} - ${c.rhodecode_name}
7 7 </%def>
8 8
9 9 <%def name="breadcrumbs_links()">
10 10 ${h.link_to(_(u'Home'),h.url('/'))}
11 11 &raquo;
12 12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
13 13 &raquo;
14 14 <% size = c.size if c.size <= c.total_cs else c.total_cs %>
15 15 ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
16 16 </%def>
17 17
18 18 <%def name="page_nav()">
19 ${self.menu('changelog')}
19 ${self.menu('changelog')}
20 20 </%def>
21 21
22 22 <%def name="main()">
23 23 <div class="box">
24 24 <!-- box / title -->
25 25 <div class="title">
26 26 ${self.breadcrumbs()}
27 27 </div>
28 28 <div class="table">
29 % if c.pagination:
30 <div id="graph">
31 <div id="graph_nodes">
32 <canvas id="graph_canvas"></canvas>
33 </div>
34 <div id="graph_content">
29 % if c.pagination:
30 <div id="graph">
31 <div id="graph_nodes">
32 <canvas id="graph_canvas"></canvas>
33 </div>
34 <div id="graph_content">
35 35 <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;">
36 36 <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
37 37 <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
38 38
39 39 %if c.rhodecode_db_repo.fork:
40 40 <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref=request.GET.get('branch') or 'default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name)}" class="ui-btn small">${_('Compare fork with parent')}</a>
41 41 %endif
42 42 %if h.is_hg(c.rhodecode_repo):
43 43 <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a>
44 44 %endif
45 45 </div>
46 <div class="container_header">
47 ${h.form(h.url.current(),method='get')}
48 <div class="info_box" style="float:left">
49 ${h.submit('set',_('Show'),class_="ui-btn")}
50 ${h.text('size',size=1,value=c.size)}
51 ${_('revisions')}
52 </div>
53 ${h.end_form()}
46 <div class="container_header">
47 ${h.form(h.url.current(),method='get')}
48 <div class="info_box" style="float:left">
49 ${h.submit('set',_('Show'),class_="ui-btn")}
50 ${h.text('size',size=1,value=c.size)}
51 ${_('revisions')}
52 </div>
53 ${h.end_form()}
54 54 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
55 </div>
55 </div>
56 56
57 %for cnt,cs in enumerate(c.pagination):
58 <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
59 <div class="left">
60 <div>
61 ${h.checkbox(cs.raw_id,class_="changeset_range")}
62 <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span>
63 </div>
64 <div class="author">
65 <div class="gravatar">
66 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/>
67 </div>
68 <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div>
69 </div>
57 %for cnt,cs in enumerate(c.pagination):
58 <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
59 <div class="left">
60 <div>
61 ${h.checkbox(cs.raw_id,class_="changeset_range")}
62 <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span>
63 </div>
64 <div class="author">
65 <div class="gravatar">
66 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/>
67 </div>
68 <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div>
69 </div>
70 70 <div class="date">${h.fmt_date(cs.date)}</div>
71 </div>
72 <div class="mid">
71 </div>
72 <div class="mid">
73 73 <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
74 74 <div class="expand"><span class="expandtext">&darr; ${_('show more')} &darr;</span></div>
75 </div>
76 <div class="right">
77 <div class="changes">
75 </div>
76 <div class="right">
77 <div class="changes">
78 78 <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div>
79 79 <div class="comments-container">
80 80 %if len(c.comments.get(cs.raw_id,[])) > 0:
81 81 <div class="comments-cnt" title="${('comments')}">
82 82 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
83 83 <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div>
84 84 <img src="${h.url('/images/icons/comments.png')}">
85 85 </a>
86 86 </div>
87 87 %endif
88 88 </div>
89 89 <div class="changeset-status-container">
90 90 %if c.statuses.get(cs.raw_id):
91 91 <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div>
92 92 <div class="changeset-status-ico">
93 93 %if c.statuses.get(cs.raw_id)[2]:
94 94 <a class="tooltip" title="${_('Click to open associated pull request')}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a>
95 95 %else:
96 96 <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" />
97 97 %endif
98 98 </div>
99 99 %endif
100 100 </div>
101 </div>
102 %if cs.parents:
103 %for p_cs in reversed(cs.parents):
104 <div class="parent">${_('Parent')}
105 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
106 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
107 </div>
108 %endfor
109 %else:
101 </div>
102 %if cs.parents:
103 %for p_cs in reversed(cs.parents):
104 <div class="parent">${_('Parent')}
105 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
106 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
107 </div>
108 %endfor
109 %else:
110 110 <div class="parent">${_('No parents')}</div>
111 111 %endif
112 112
113 <span class="logtags">
114 %if len(cs.parents)>1:
115 <span class="merge">${_('merge')}</span>
116 %endif
117 %if cs.branch:
118 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
119 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
113 <span class="logtags">
114 %if len(cs.parents)>1:
115 <span class="merge">${_('merge')}</span>
116 %endif
117 %if cs.branch:
118 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
119 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
120 120 </span>
121 %endif
121 %endif
122 122 %if h.is_hg(c.rhodecode_repo):
123 123 %for book in cs.bookmarks:
124 124 <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
125 125 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
126 126 </span>
127 127 %endfor
128 128 %endif
129 %for tag in cs.tags:
130 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
131 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
132 %endfor
133 </span>
134 </div>
135 </div>
129 %for tag in cs.tags:
130 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
131 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
132 %endfor
133 </span>
134 </div>
135 </div>
136 136
137 %endfor
138 <div class="pagination-wh pagination-left">
139 ${c.pagination.pager('$link_previous ~2~ $link_next')}
140 </div>
141 </div>
142 </div>
137 %endfor
138 <div class="pagination-wh pagination-left">
139 ${c.pagination.pager('$link_previous ~2~ $link_next')}
140 </div>
141 </div>
142 </div>
143 143
144 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
145 <script type="text/javascript">
146 YAHOO.util.Event.onDOMReady(function(){
144 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
145 <script type="text/javascript">
146 YAHOO.util.Event.onDOMReady(function(){
147 147
148 148 //Monitor range checkboxes and build a link to changesets
149 149 //ranges
150 150 var checkboxes = YUD.getElementsByClassName('changeset_range');
151 151 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}";
152 152 var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}";
153 153 YUE.on(checkboxes,'click',function(e){
154 var clicked_cb = e.currentTarget;
154 var clicked_cb = e.currentTarget;
155 155 var checked_checkboxes = [];
156 156 for (pos in checkboxes){
157 157 if(checkboxes[pos].checked){
158 158 checked_checkboxes.push(checkboxes[pos]);
159 159 }
160 160 }
161 161 if(YUD.get('open_new_pr')){
162 162 if(checked_checkboxes.length>0){
163 163 // modify open pull request to show we have selected cs
164 164 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
165 165
166 166 }else{
167 167 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
168 168 }
169 169 }
170 170
171 171 if(checked_checkboxes.length>0){
172 var rev_end = checked_checkboxes[0].name;
173 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
172 var rev_end = checked_checkboxes[0].name;
173 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
174 174
175 // now select all checkboxes in the middle.
176 var checked = false;
177 for (var i=0; i<checkboxes.length; i++){
178 var cb = checkboxes[i];
179 var rev = cb.name;
175 // now select all checkboxes in the middle.
176 var checked = false;
177 for (var i=0; i<checkboxes.length; i++){
178 var cb = checkboxes[i];
179 var rev = cb.name;
180 180
181 if (rev == rev_end){
182 checked = true;
183 }
181 if (rev == rev_end){
182 checked = true;
183 }
184 184 if (checked){
185 185 cb.checked = true;
186 186 }
187 187 else{
188 188 cb.checked = false;
189 189 }
190 if (rev == rev_start){
190 if (rev == rev_start){
191 191 checked = false;
192 192 }
193 193
194 }
194 }
195 195
196 196 var url = url_tmpl.replace('__REVRANGE__',
197 rev_start+'...'+rev_end);
197 rev_start+'...'+rev_end);
198 198
199 199 var link = _TM['Show selected changes __S -> __E'];
200 200 link = link.replace('__S',rev_start.substr(0,6));
201 201 link = link.replace('__E',rev_end.substr(0,6));
202 202 YUD.get('rev_range_container').href = url;
203 203 YUD.get('rev_range_container').innerHTML = link;
204 204 YUD.setStyle('rev_range_container','display','');
205 205 YUD.setStyle('rev_range_clear','display','');
206 206
207 207 YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end);
208 208
209 209 }
210 210 else{
211 YUD.setStyle('rev_range_container','display','none');
212 YUD.setStyle('rev_range_clear','display','none');
211 YUD.setStyle('rev_range_container','display','none');
212 YUD.setStyle('rev_range_clear','display','none');
213 213 }
214 214 });
215 215 YUE.on('rev_range_clear','click',function(e){
216 216 for (var i=0; i<checkboxes.length; i++){
217 217 var cb = checkboxes[i];
218 218 cb.checked = false;
219 219 }
220 220 YUE.preventDefault(e);
221 221 })
222 222 var msgs = YUQ('.message');
223 223 // get first element height
224 224 var el = YUQ('#graph_content .container')[0];
225 225 var row_h = el.clientHeight;
226 226 for(var i=0;i<msgs.length;i++){
227 var m = msgs[i];
227 var m = msgs[i];
228 228
229 var h = m.clientHeight;
230 var pad = YUD.getStyle(m,'padding');
231 if(h > row_h){
232 var offset = row_h - (h+12);
233 YUD.setStyle(m.nextElementSibling,'display','block');
234 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
235 };
229 var h = m.clientHeight;
230 var pad = YUD.getStyle(m,'padding');
231 if(h > row_h){
232 var offset = row_h - (h+12);
233 YUD.setStyle(m.nextElementSibling,'display','block');
234 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
235 };
236 236 }
237 237 YUE.on(YUQ('.expand'),'click',function(e){
238 var elem = e.currentTarget.parentNode.parentNode;
239 YUD.setStyle(e.currentTarget,'display','none');
240 YUD.setStyle(elem,'height','auto');
238 var elem = e.currentTarget.parentNode.parentNode;
239 YUD.setStyle(e.currentTarget,'display','none');
240 YUD.setStyle(elem,'height','auto');
241 241
242 //redraw the graph, line_count and jsdata are global vars
242 //redraw the graph, line_count and jsdata are global vars
243 243 set_canvas(100);
244 244
245 245 var r = new BranchRenderer();
246 246 r.render(jsdata,100,line_count);
247 247
248 248 })
249 249
250 250 // Fetch changeset details
251 251 YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){
252 var id = e.currentTarget.id;
253 var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}";
254 var url = url.replace('__CS__',id.replace('changed_total_',''));
255 ypjax(url,id,function(){tooltip_activate()});
252 var id = e.currentTarget.id;
253 var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}";
254 var url = url.replace('__CS__',id.replace('changed_total_',''));
255 ypjax(url,id,function(){tooltip_activate()});
256 256 });
257 257
258 258 // change branch filter
259 259 YUE.on(YUD.get('branch_filter'),'change',function(e){
260 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
261 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}";
262 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}";
263 var url = url.replace('__BRANCH__',selected_branch);
264 if(selected_branch != ''){
265 window.location = url;
266 }else{
267 window.location = url_main;
268 }
260 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
261 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}";
262 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}";
263 var url = url.replace('__BRANCH__',selected_branch);
264 if(selected_branch != ''){
265 window.location = url;
266 }else{
267 window.location = url_main;
268 }
269 269
270 270 });
271 271
272 function set_canvas(width) {
273 var c = document.getElementById('graph_nodes');
274 var t = document.getElementById('graph_content');
275 canvas = document.getElementById('graph_canvas');
276 var div_h = t.clientHeight;
277 c.style.height=div_h+'px';
278 canvas.setAttribute('height',div_h);
279 c.style.height=width+'px';
280 canvas.setAttribute('width',width);
281 };
282 var heads = 1;
283 var line_count = 0;
284 var jsdata = ${c.jsdata|n};
272 function set_canvas(width) {
273 var c = document.getElementById('graph_nodes');
274 var t = document.getElementById('graph_content');
275 canvas = document.getElementById('graph_canvas');
276 var div_h = t.clientHeight;
277 c.style.height=div_h+'px';
278 canvas.setAttribute('height',div_h);
279 c.style.height=width+'px';
280 canvas.setAttribute('width',width);
281 };
282 var heads = 1;
283 var line_count = 0;
284 var jsdata = ${c.jsdata|n};
285 285
286 for (var i=0;i<jsdata.length;i++) {
286 for (var i=0;i<jsdata.length;i++) {
287 287 var in_l = jsdata[i][2];
288 288 for (var j in in_l) {
289 289 var m = in_l[j][1];
290 290 if (m > line_count)
291 291 line_count = m;
292 292 }
293 }
294 set_canvas(100);
293 }
294 set_canvas(100);
295 295
296 var r = new BranchRenderer();
297 r.render(jsdata,100,line_count);
296 var r = new BranchRenderer();
297 r.render(jsdata,100,line_count);
298 298
299 });
300 </script>
301 %else:
302 ${_('There are no changes yet')}
303 %endif
299 });
300 </script>
301 %else:
302 ${_('There are no changes yet')}
303 %endif
304 304 </div>
305 305 </div>
306 306 </%def>
@@ -1,202 +1,202 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 <%inherit file="/base/base.html"/>
4 4
5 5 <%def name="title()">
6 6 ${_('%s Changeset') % c.repo_name} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name}
7 7 </%def>
8 8
9 9 <%def name="breadcrumbs_links()">
10 10 ${h.link_to(_(u'Home'),h.url('/'))}
11 11 &raquo;
12 12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
13 13 &raquo;
14 14 ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span>
15 15 </%def>
16 16
17 17 <%def name="page_nav()">
18 18 ${self.menu('changelog')}
19 19 </%def>
20 20
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 <script>
28 28 var _USERS_AC_DATA = ${c.users_array|n};
29 29 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
30 30 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
31 31 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
32 32 </script>
33 33 <div class="table">
34 <div class="diffblock">
34 <div class="diffblock">
35 35 <div class="parents">
36 36 %if c.changeset.parents:
37 37 %for n, p_cs in enumerate(reversed(c.changeset.parents)):
38 38 <span class="changeset_hash">&laquo; ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span>
39 39 <br>
40 40 %endfor
41 41 %else:
42 42 <span>${_('No parents')}</span>
43 43 %endif
44 44 </div>
45 45 <div class="children">
46 46 %if c.changeset.children:
47 47 %for n, p_cs in enumerate(reversed(c.changeset.children)):
48 48 <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} &raquo;</span>
49 49 <br>
50 50 %endfor
51 51 %else:
52 52 <span>${_('No children')}</span>
53 53 %endif
54 54 </div>
55 <div class="code-header banner">
55 <div class="code-header banner">
56 56
57 57 <div class="hash">
58 58 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
59 59 </div>
60 60 <div class="date">
61 61 ${h.fmt_date(c.changeset.date)}
62 62 </div>
63 63 <div class="changeset-status-container">
64 64 %if c.statuses:
65 65 <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div>
66 66 <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div>
67 67 %endif
68 68 </div>
69 69 <div class="diff-actions">
70 70 <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
71 71 <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a>
72 72 <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a>
73 73 ${c.ignorews_url(request.GET)}
74 74 ${c.context_url(request.GET)}
75 75 </div>
76 76 <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div>
77 77 </div>
78 </div>
79 <div id="changeset_content">
80 <div class="container">
81 <div class="left">
82 <div class="author">
83 <div class="gravatar">
84 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/>
85 </div>
86 <span>${h.person(c.changeset.author)}</span><br/>
87 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
88 </div>
89 <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div>
90 </div>
91 <div class="right">
92 <div class="changes">
78 </div>
79 <div id="changeset_content">
80 <div class="container">
81 <div class="left">
82 <div class="author">
83 <div class="gravatar">
84 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/>
85 </div>
86 <span>${h.person(c.changeset.author)}</span><br/>
87 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
88 </div>
89 <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div>
90 </div>
91 <div class="right">
92 <div class="changes">
93 93 % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff:
94 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
95 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
96 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
97 % else:
94 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
95 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
96 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
97 % else:
98 98 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
99 99 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
100 100 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
101 % endif
102 </div>
101 % endif
102 </div>
103 103
104 <span class="logtags">
104 <span class="logtags">
105 105 %if len(c.changeset.parents)>1:
106 106 <span class="merge">${_('merge')}</span>
107 107 %endif
108 %if c.changeset.branch:
108 %if c.changeset.branch:
109 109 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
110 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
110 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
111 111 </span>
112 112 %endif
113 %for tag in c.changeset.tags:
114 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
115 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
116 %endfor
117 </span>
118 </div>
119 </div>
120 <span>
113 %for tag in c.changeset.tags:
114 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
115 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
116 %endfor
117 </span>
118 </div>
119 </div>
120 <span>
121 121 % if c.limited_diff:
122 122 ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}:
123 123 % else:
124 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}:
125 %endif
124 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}:
125 %endif
126 126 </span>
127 <div class="cs_files">
127 <div class="cs_files">
128 128 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems():
129 129 <div class="cs_${change}">
130 130 <div class="node">
131 131 <a href="#${FID}">${h.safe_unicode(path)}</a>
132 132 </div>
133 133 <div class="changes">${h.fancy_file_stats(stats)}</div>
134 134 </div>
135 135 %endfor
136 136 % if c.limited_diff:
137 137 <h5>${_('Changeset was too big and was cut off...')}</h5>
138 138 % endif
139 </div>
140 </div>
139 </div>
140 </div>
141 141
142 142 </div>
143 143
144 144 ## diff block
145 145 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
146 146 ${diff_block.diff_block(c.changes[c.changeset.raw_id])}
147 147
148 148 % if c.limited_diff:
149 149 <h4>${_('Changeset was too big and was cut off...')}</h4>
150 150 % endif
151 151
152 152 ## template for inline comment form
153 153 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
154 154 ${comment.comment_inline_form()}
155 155
156 156 ## render comments and inlines
157 157 ${comment.generate_comments()}
158 158
159 159 ## main comment form and it status
160 160 ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id),
161 161 h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))}
162 162
163 163 ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
164 164 <script type="text/javascript">
165 165 YUE.onDOMReady(function(){
166 166 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
167 167 var show = 'none';
168 168 var target = e.currentTarget;
169 169 if(target == null){
170 170 target = this;
171 171 }
172 172 if(target.checked){
173 173 var show = ''
174 174 }
175 175 var boxid = YUD.getAttribute(target,'id_for');
176 176 var comments = YUQ('#{0} .inline-comments'.format(boxid));
177 177 for(c in comments){
178 178 YUD.setStyle(comments[c],'display',show);
179 179 }
180 180 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
181 181 for(c in btns){
182 182 YUD.setStyle(btns[c],'display',show);
183 183 }
184 184 })
185 185
186 186 YUE.on(YUQ('.line'),'click',function(e){
187 187 var tr = e.currentTarget;
188 188 if(tr == null){
189 189 tr = this;
190 190 }
191 191 injectInlineForm(tr);
192 192 });
193 193
194 194 // inject comments into they proper positions
195 195 var file_comments = YUQ('.inline-comment-placeholder');
196 196 renderInlineComments(file_comments);
197 197 })
198 198
199 199 </script>
200 200
201 201 </div>
202 202 </%def>
@@ -1,191 +1,191 b''
1 1 ## -*- coding: utf-8 -*-
2 2 ## usage:
3 3 ## <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
4 4 ## ${comment.comment_block(co)}
5 5 ##
6 6 <%def name="comment_block(co)">
7 7 <div class="comment" id="comment-${co.comment_id}" line="${co.line_no}">
8 8 <div class="comment-wrapp">
9 <div class="meta">
9 <div class="meta">
10 10 <div style="float:left"> <img src="${h.gravatar_url(co.author.email, 20)}" /> </div>
11 <div class="user">
12 ${co.author.username}
13 </div>
14 <div class="date">
15 ${h.age(co.modified_at)} <a class="permalink" href="#comment-${co.comment_id}">&para;</a>
16 </div>
11 <div class="user">
12 ${co.author.username}
13 </div>
14 <div class="date">
15 ${h.age(co.modified_at)} <a class="permalink" href="#comment-${co.comment_id}">&para;</a>
16 </div>
17 17 %if co.status_change:
18 18 <div style="float:left" class="changeset-status-container">
19 19 <div style="float:left;padding:0px 2px 0px 2px"><span style="font-size: 18px;">&rsaquo;</span></div>
20 20 <div title="${_('Changeset status')}" class="changeset-status-lbl"> ${co.status_change[0].status_lbl}</div>
21 21 <div class="changeset-status-ico"><img src="${h.url(str('/images/icons/flag_status_%s.png' % co.status_change[0].status))}" /></div>
22 22 </div>
23 23 %endif
24 24
25 25 <div style="float:left;padding:3px 0px 0px 5px">
26 26 <span class="">
27 27 %if co.pull_request:
28 28 <a href="${h.url('pullrequest_show',repo_name=co.pull_request.other_repo.repo_name,pull_request_id=co.pull_request.pull_request_id)}">
29 29 %if co.status_change:
30 30 ${_('Status from pull request %s') % co.pull_request.pull_request_id}
31 31 %else:
32 32 ${_('Comment from pull request %s') % co.pull_request.pull_request_id}
33 33 %endif
34 34 </a>
35 35 %endif
36 36 </span>
37 37 </div>
38 38
39 39 %if h.HasPermissionAny('hg.admin', 'repository.admin')() or co.author.user_id == c.rhodecode_user.user_id:
40 40 <div class="buttons">
41 41 <span onClick="deleteComment(${co.comment_id})" class="delete-comment ui-btn">${_('Delete')}</span>
42 42 </div>
43 43 %endif
44 </div>
45 <div class="text">
46 ${h.rst_w_mentions(co.text)|n}
47 </div>
44 </div>
45 <div class="text">
46 ${h.rst_w_mentions(co.text)|n}
47 </div>
48 48 </div>
49 49 </div>
50 50 </%def>
51 51
52 52
53 53 <%def name="comment_inline_form()">
54 54 <div id='comment-inline-form-template' style="display:none">
55 55 <div class="comment-inline-form ac">
56 56 %if c.rhodecode_user.username != 'default':
57 57 <div class="overlay"><div class="overlay-text">${_('Submitting...')}</div></div>
58 58 ${h.form('#', class_='inline-form')}
59 59 <div class="clearfix">
60 60 <div class="comment-help">${_('Commenting on line {1}.')}
61 61 ${(_('Comments parsed using %s syntax with %s support.') % (
62 62 ('<a href="%s">RST</a>' % h.url('rst_help')),
63 ('<span style="color:#003367" class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user'))
63 ('<span style="color:#003367" class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user'))
64 64 )
65 65 )|n
66 66 }
67 67 </div>
68 68 <div class="mentions-container" id="mentions_container_{1}"></div>
69 69 <textarea id="text_{1}" name="text" class="yui-ac-input"></textarea>
70 70 </div>
71 71 <div class="comment-button">
72 72 <input type="hidden" name="f_path" value="{0}">
73 73 <input type="hidden" name="line" value="{1}">
74 74 ${h.submit('save', _('Comment'), class_='ui-btn save-inline-form')}
75 75 ${h.reset('hide-inline-form', _('Hide'), class_='ui-btn hide-inline-form')}
76 76 </div>
77 77 ${h.end_form()}
78 78 %else:
79 79 ${h.form('')}
80 80 <div class="clearfix">
81 81 <div class="comment-help">
82 82 ${_('You need to be logged in to comment.')} <a href="${h.url('login_home',came_from=h.url.current())}">${_('Login now')}</a>
83 83 </div>
84 84 </div>
85 85 <div class="comment-button">
86 86 ${h.reset('hide-inline-form', _('Hide'), class_='ui-btn hide-inline-form')}
87 87 </div>
88 88 ${h.end_form()}
89 89 %endif
90 90 </div>
91 91 </div>
92 92 </%def>
93 93
94 94
95 95 ## generates inlines taken from c.comments var
96 96 <%def name="inlines()">
97 97 <div class="comments-number">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div>
98 98 %for path, lines in c.inline_comments:
99 99 % for line,comments in lines.iteritems():
100 100 <div style="display:none" class="inline-comment-placeholder" path="${path}" target_id="${h.safeid(h.safe_unicode(path))}">
101 101 %for co in comments:
102 102 ${comment_block(co)}
103 103 %endfor
104 104 </div>
105 105 %endfor
106 106 %endfor
107 107
108 108 </%def>
109 109
110 110 ## generate inline comments and the main ones
111 111 <%def name="generate_comments()">
112 112 <div class="comments">
113 113 <div id="inline-comments-container">
114 114 ## generate inlines for this changeset
115 115 ${inlines()}
116 116 </div>
117 117
118 118 %for co in c.comments:
119 119 <div id="comment-tr-${co.comment_id}">
120 120 ${comment_block(co)}
121 121 </div>
122 122 %endfor
123 123 </div>
124 124 </%def>
125 125
126 126 ## MAIN COMMENT FORM
127 127 <%def name="comments(post_url, cur_status, close_btn=False, change_status=True)">
128 128
129 129 <div class="comments">
130 130 %if c.rhodecode_user.username != 'default':
131 131 <div class="comment-form ac">
132 132 ${h.form(post_url)}
133 133 <strong>${_('Leave a comment')}</strong>
134 134 <div class="clearfix">
135 135 <div class="comment-help">
136 136 ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')),
137 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' %
138 _('Use @username inside this text to send notification to this RhodeCode user')))|n}
137 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' %
138 _('Use @username inside this text to send notification to this RhodeCode user')))|n}
139 139 %if change_status:
140 140 | <label for="show_changeset_status_box" class="tooltip" title="${_('Check this to change current status of code-review for this changeset')}"> ${_('change status')}</label>
141 141 <input style="vertical-align: bottom;margin-bottom:-2px" id="show_changeset_status_box" type="checkbox" name="change_changeset_status" />
142 142 %endif
143 143 </div>
144 144 %if change_status:
145 145 <div id="status_block_container" class="status-block" style="display:none">
146 146 %for status,lbl in c.changeset_statuses:
147 147 <div class="">
148 148 <img src="${h.url('/images/icons/flag_status_%s.png' % status)}" /> <input ${'checked="checked"' if status == cur_status else ''}" type="radio" class="status_change_radio" name="changeset_status" id="${status}" value="${status}">
149 149 <label for="${status}">${lbl}</label>
150 150 </div>
151 151 %endfor
152 152 </div>
153 153 %endif
154 154 <div class="mentions-container" id="mentions_container"></div>
155 155 ${h.textarea('text')}
156 156 </div>
157 157 <div class="comment-button">
158 158 ${h.submit('save', _('Comment'), class_="ui-btn large")}
159 159 %if close_btn and change_status:
160 160 ${h.submit('save_close', _('Comment and close'), class_='ui-btn blue large %s' % ('hidden' if cur_status in ['not_reviewed','under_review'] else ''))}
161 161 %endif
162 162 </div>
163 163 ${h.end_form()}
164 164 </div>
165 165 %endif
166 166 </div>
167 167 <script>
168 168 YUE.onDOMReady(function () {
169 169 MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
170 170
171 171 // changeset status box listener
172 172 YUE.on(YUD.get('show_changeset_status_box'),'change',function(e){
173 173 if(e.currentTarget.checked){
174 174 YUD.setStyle('status_block_container','display','');
175 175 }
176 176 else{
177 177 YUD.setStyle('status_block_container','display','none');
178 178 }
179 179 })
180 180 YUE.on(YUQ('.status_change_radio'), 'change',function(e){
181 var val = e.currentTarget.value;
182 if (val == 'approved' || val == 'rejected') {
183 YUD.removeClass('save_close', 'hidden');
184 }else{
185 YUD.addClass('save_close', 'hidden');
186 }
181 var val = e.currentTarget.value;
182 if (val == 'approved' || val == 'rejected') {
183 YUD.removeClass('save_close', 'hidden');
184 }else{
185 YUD.addClass('save_close', 'hidden');
186 }
187 187 })
188 188
189 189 });
190 190 </script>
191 191 </%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 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 &raquo;
11 11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
12 12 &raquo;
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 <div id="body" class="diffblock">
28 <div class="code-header cv">
29 <h3 class="code-header-title">${_('Compare View')} / ${h.link_to(_('Show combined compare'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id))}</h3>
27 <div id="body" class="diffblock">
28 <div class="code-header cv">
29 <h3 class="code-header-title">${_('Compare View')} / ${h.link_to(_('Show combined compare'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id))}</h3>
30 30 <div>
31 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
32 </div>
33 </div>
34 </div>
35 <div id="changeset_compare_view_content">
36 <div class="container">
37 <table class="compare_view_commits noborder">
31 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
32 </div>
33 </div>
34 </div>
35 <div id="changeset_compare_view_content">
36 <div class="container">
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 </div>
54 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
55 <div class="cs_files">
56 %for cs in c.cs_ranges:
57 <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
58 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems():
59 <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div>
60 %endfor
61 %endfor
62 </div>
63 </div>
53 </div>
54 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
55 <div class="cs_files">
56 %for cs in c.cs_ranges:
57 <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
58 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems():
59 <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div>
60 %endfor
61 %endfor
62 </div>
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,55 +1,55 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html>
3 3 <html xmlns="http://www.w3.org/1999/xhtml">
4 4 <head>
5 5 <title>Error - ${c.error_message}</title>
6 6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 7 <meta name="robots" content="index, nofollow"/>
8 8 <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" />
9 9
10 10 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
11 %if c.redirect_time:
12 <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
13 %endif
11 %if c.redirect_time:
12 <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
13 %endif
14 14
15 15 <!-- stylesheets -->
16 16 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" />
17 <style type="text/css">
18 #main_div{
19 border: 0px solid #000;
20 width: 500px;
21 margin: auto;
22 text-align: center;
23 margin-top: 200px;
24 font-size: 1.6em;
25 }
26 .error_message{
27 text-align: center;
28 color:#003367;
29 font-size: 1.6em;
30 margin:10px;
31 }
32 </style>
17 <style type="text/css">
18 #main_div{
19 border: 0px solid #000;
20 width: 500px;
21 margin: auto;
22 text-align: center;
23 margin-top: 200px;
24 font-size: 1.6em;
25 }
26 .error_message{
27 text-align: center;
28 color:#003367;
29 font-size: 1.6em;
30 margin:10px;
31 }
32 </style>
33 33
34 34 </head>
35 35 <body>
36 36
37 37 <div id="login">
38 38 <div class="table">
39 <div id="main_div">
40 <div style="font-size:2.0em;margin: 10px">${c.rhodecode_name}</div>
41 <h1 class="error_message">${c.error_message}</h1>
39 <div id="main_div">
40 <div style="font-size:2.0em;margin: 10px">${c.rhodecode_name}</div>
41 <h1 class="error_message">${c.error_message}</h1>
42 42
43 <p>${c.error_explanation}</p>
43 <p>${c.error_explanation}</p>
44 44
45 %if c.redirect_time:
46 <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p>
47 %endif
45 %if c.redirect_time:
46 <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p>
47 %endif
48 48
49 </div>
49 </div>
50 50 </div>
51 51 <!-- end login -->
52 52 </div>
53 53 </body>
54 54
55 55 </html>
@@ -1,161 +1,161 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${_('%s files') % 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 &raquo;
10 10 ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))}
11 11 &raquo;
12 12 ${_('files')}
13 13 %if c.file:
14 14 @ r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
15 15 %endif
16 16 </%def>
17 17
18 18 <%def name="page_nav()">
19 19 ${self.menu('files')}
20 20 </%def>
21 21
22 22 <%def name="main()">
23 23 <div class="box">
24 24 <!-- box / title -->
25 25 <div class="title">
26 26 ${self.breadcrumbs()}
27 <ul class="links">
28 <li>
29 <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span>
30 </li>
31 </ul>
27 <ul class="links">
28 <li>
29 <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span>
30 </li>
31 </ul>
32 32 </div>
33 33 <div class="table">
34 <div id="files_data">
35 <%include file='files_ypjax.html'/>
36 </div>
34 <div id="files_data">
35 <%include file='files_ypjax.html'/>
36 </div>
37 37 </div>
38 38 </div>
39 39
40 40 <script type="text/javascript">
41 41 var CACHE = {};
42 42 var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s
43 43 //used to construct links from the search list
44 44 var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
45 45 //send the nodelist request to this url
46 46 var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
47 47 // send the node history requst to this url
48 48 var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
49 49
50 50 var ypjax_links = function(){
51 51 YUE.on(YUQ('.ypjax-link'), 'click',function(e){
52 52
53 //don't do ypjax on middle click
54 if(e.which == 2 || !History.enabled){
55 return true;
56 }
53 //don't do ypjax on middle click
54 if(e.which == 2 || !History.enabled){
55 return true;
56 }
57 57
58 58 var el = e.currentTarget;
59 59 var url = el.href;
60 60
61 61 var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}';
62 62 _base_url = _base_url.replace('//','/')
63 63
64 64 //extract rev and the f_path from url.
65 65 parts = url.split(_base_url)
66 66 if(parts.length != 2){
67 return false;
67 return false;
68 68 }
69 69
70 70 var parts2 = parts[1].split('/');
71 var rev = parts2.shift(); // pop the first element which is the revision
72 var f_path = parts2.join('/');
71 var rev = parts2.shift(); // pop the first element which is the revision
72 var f_path = parts2.join('/');
73 73
74 74 var title = "${_('%s files') % c.repo_name}" + " - " + f_path;
75 75
76 76 var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path);
77 77 var _url_base = url_base.replace('__REV__',rev);
78 78
79 79 // Change our States and save some data for handling events
80 80 var data = {url:url,title:title, url_base:_url_base,
81 81 node_list_url:_node_list_url, rev:rev, f_path:f_path};
82 82 History.pushState(data, title, url);
83 83
84 84 //now we're sure that we can do ypjax things
85 85 YUE.preventDefault(e);
86 86 return false;
87 87 });
88 88 }
89 89
90 90 var callbacks = function(State){
91 91 ypjax_links();
92 92 tooltip_activate();
93 93 fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base);
94 94
95 95 if(YUD.get('hlcode')){
96 YUE.on('hlcode', 'mouseup', getSelectionLink);
96 YUE.on('hlcode', 'mouseup', getSelectionLink);
97 97 }
98 98 //console.log(State);
99 99 if(YUD.get('load_node_history')){
100 100 //remove all listeners due to problems of history state
101 101 YUE.removeListener('load_node_history', 'click');
102 102 YUE.on('load_node_history', 'click', function(e){
103 103 var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path);
104 104 ypjax(_url, 'node_history', function(o){
105 tooltip_activate();
105 tooltip_activate();
106 106 })
107 107 });
108 108 }
109 109 // Inform Google Analytics of the change
110 110 if ( typeof window.pageTracker !== 'undefined' ) {
111 111 window.pageTracker._trackPageview(State.url);
112 112 }
113 113 }
114 114
115 115 YUE.onDOMReady(function(){
116 116 ypjax_links();
117 117 var container = 'files_data';
118 118 //Bind to StateChange Event
119 119 History.Adapter.bind(window,'statechange',function(){
120 120 var State = History.getState();
121 121 cache_key = State.url;
122 122 //check if we have this request in cache maybe ?
123 123 var _cache_obj = CACHE[cache_key];
124 124 var _cur_time = new Date().getTime();
125 125 // get from cache if it's there and not yet expired !
126 126 if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){
127 127 YUD.get(container).innerHTML=_cache_obj[1];
128 128 YUD.setStyle(container,'opacity','1.0');
129 129
130 130 //callbacks after ypjax call
131 131 callbacks(State);
132 132 }
133 133 else{
134 134 ypjax(State.url,container,function(o){
135 //callbacks after ypjax call
136 callbacks(State);
137 if (o !== undefined){
138 //store our request in cache
139 var _expire_on = new Date().getTime()+CACHE_EXPIRE;
135 //callbacks after ypjax call
136 callbacks(State);
137 if (o !== undefined){
138 //store our request in cache
139 var _expire_on = new Date().getTime()+CACHE_EXPIRE;
140 140 CACHE[cache_key] = [_expire_on, o.responseText];
141 141 }
142 142 });
143 143 }
144 144 });
145 145
146 146 // init the search filter
147 147 var _State = {
148 148 url: "${h.url.current()}",
149 149 data: {
150 150 node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"),
151 151 url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"),
152 152 rev:"${c.changeset.raw_id}",
153 153 f_path: "${h.safe_unicode(c.file.path)}"
154 154 }
155 155 }
156 156 fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base);
157 157 });
158 158
159 159 </script>
160 160
161 161 </%def>
@@ -1,92 +1,92 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${_('%s Edit file') % 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 &raquo;
17 17 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
18 18 &raquo;
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 ${self.menu('files')}
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 <div id="files_data">
39 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")}
38 <div id="files_data">
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="location">${_('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 <div id="body" class="codeblock">
73 <div id="editor_container">
72 <div id="body" class="codeblock">
73 <div id="editor_container">
74 74 <pre id="editor_pre"></pre>
75 <textarea id="editor" name="content" style="display:none"></textarea>
75 <textarea id="editor" name="content" style="display:none"></textarea>
76 76 </div>
77 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
78 <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px"></textarea>
79 </div>
80 <div style="text-align: l;padding-top: 5px">
77 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
78 <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px"></textarea>
79 </div>
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 </div>
84 ${h.end_form()}
85 <script type="text/javascript">
86 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}";
87 initCodeMirror('editor',reset_url);
88 </script>
89 </div>
83 </div>
84 ${h.end_form()}
85 <script type="text/javascript">
86 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}";
87 initCodeMirror('editor',reset_url);
88 </script>
89 </div>
90 90 </div>
91 91 </div>
92 92 </%def>
@@ -1,116 +1,116 b''
1 1 <%def name="file_class(node)">
2 %if node.is_file():
3 <%return "browser-file" %>
4 %else:
5 <%return "browser-dir"%>
6 %endif
2 %if node.is_file():
3 <%return "browser-file" %>
4 %else:
5 <%return "browser-dir"%>
6 %endif
7 7 </%def>
8 8 <div id="body" class="browserblock">
9 9 <div class="browser-header">
10 <div class="browser-nav">
11 ${h.form(h.url.current())}
12 <div class="info_box">
13 <span class="rev">${_('view')}@rev</span>
14 <a class="ui-btn ypjax-link" href="${c.url_prev}" title="${_('previous revision')}">&laquo;</a>
15 ${h.text('at_rev',value=c.changeset.revision,size=5)}
16 <a class="ui-btn ypjax-link" href="${c.url_next}" title="${_('next revision')}">&raquo;</a>
17 ## ${h.submit('view',_('view'),class_="ui-btn")}
18 </div>
19 ${h.end_form()}
20 </div>
21 <div class="browser-branch">
22 ${h.checkbox('stay_at_branch',c.changeset.branch,c.changeset.branch==c.branch)}
23 <label>${_('follow current branch')}</label>
24 </div>
10 <div class="browser-nav">
11 ${h.form(h.url.current())}
12 <div class="info_box">
13 <span class="rev">${_('view')}@rev</span>
14 <a class="ui-btn ypjax-link" href="${c.url_prev}" title="${_('previous revision')}">&laquo;</a>
15 ${h.text('at_rev',value=c.changeset.revision,size=5)}
16 <a class="ui-btn ypjax-link" href="${c.url_next}" title="${_('next revision')}">&raquo;</a>
17 ## ${h.submit('view',_('view'),class_="ui-btn")}
18 </div>
19 ${h.end_form()}
20 </div>
21 <div class="browser-branch">
22 ${h.checkbox('stay_at_branch',c.changeset.branch,c.changeset.branch==c.branch)}
23 <label>${_('follow current branch')}</label>
24 </div>
25 25 <div class="browser-search">
26 26 <div id="search_activate_id" class="search_activate">
27 27 <a class="ui-btn" id="filter_activate" href="#">${_('search file list')}</a>
28 28 </div>
29 29 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
30 30 <div id="add_node_id" class="add_node">
31 31 <a class="ui-btn" href="${h.url('files_add_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path)}">${_('add new file')}</a>
32 32 </div>
33 33 % endif
34 34 <div>
35 35 <div id="node_filter_box_loading" style="display:none">${_('Loading file list...')}</div>
36 36 <div id="node_filter_box" style="display:none">
37 37 ${h.files_breadcrumbs(c.repo_name,c.changeset.raw_id,c.file.path)}/<input class="init" type="text" value="type to search..." name="filter" size="25" id="node_filter" autocomplete="off">
38 38 </div>
39 39 </div>
40 40 </div>
41 41 </div>
42 42
43 <div class="browser-body">
44 <table class="code-browser">
45 <thead>
46 <tr>
47 <th>${_('Name')}</th>
48 <th>${_('Size')}</th>
49 <th>${_('Mimetype')}</th>
50 <th>${_('Last Revision')}</th>
51 <th>${_('Last modified')}</th>
52 <th>${_('Last commiter')}</th>
53 </tr>
54 </thead>
43 <div class="browser-body">
44 <table class="code-browser">
45 <thead>
46 <tr>
47 <th>${_('Name')}</th>
48 <th>${_('Size')}</th>
49 <th>${_('Mimetype')}</th>
50 <th>${_('Last Revision')}</th>
51 <th>${_('Last modified')}</th>
52 <th>${_('Last commiter')}</th>
53 </tr>
54 </thead>
55 55
56 56 <tbody id="tbody">
57 %if c.file.parent:
58 <tr class="parity0">
59 <td>
60 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.parent.path),class_="browser-dir ypjax-link")}
61 </td>
62 <td></td>
63 <td></td>
64 <td></td>
65 <td></td>
66 <td></td>
67 </tr>
68 %endif
57 %if c.file.parent:
58 <tr class="parity0">
59 <td>
60 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.parent.path),class_="browser-dir ypjax-link")}
61 </td>
62 <td></td>
63 <td></td>
64 <td></td>
65 <td></td>
66 <td></td>
67 </tr>
68 %endif
69 69
70 %for cnt,node in enumerate(c.file):
71 <tr class="parity${cnt%2}">
72 <td>
70 %for cnt,node in enumerate(c.file):
71 <tr class="parity${cnt%2}">
72 <td>
73 73 %if node.is_submodule():
74 74 ${h.link_to(node.name,node.url or '#',class_="submodule-dir ypjax-link")}
75 75 %else:
76 76 ${h.link_to(node.name, h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=h.safe_unicode(node.path)),class_=file_class(node)+" ypjax-link")}
77 77 %endif:
78 </td>
79 <td>
80 %if node.is_file():
81 ${h.format_byte_size(node.size,binary=True)}
82 %endif
83 </td>
84 <td>
85 %if node.is_file():
86 ${node.mimetype}
87 %endif
88 </td>
89 <td>
90 %if node.is_file():
91 <div class="tooltip" title="${h.tooltip(node.last_changeset.message)}">
92 <pre>${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</pre>
78 </td>
79 <td>
80 %if node.is_file():
81 ${h.format_byte_size(node.size,binary=True)}
82 %endif
83 </td>
84 <td>
85 %if node.is_file():
86 ${node.mimetype}
87 %endif
88 </td>
89 <td>
90 %if node.is_file():
91 <div class="tooltip" title="${h.tooltip(node.last_changeset.message)}">
92 <pre>${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</pre>
93 93 </div>
94 %endif
95 </td>
96 <td>
97 %if node.is_file():
98 <span class="tooltip" title="${h.tooltip(h.fmt_date(node.last_changeset.date))}">
94 %endif
95 </td>
96 <td>
97 %if node.is_file():
98 <span class="tooltip" title="${h.tooltip(h.fmt_date(node.last_changeset.date))}">
99 99 ${h.age(node.last_changeset.date)}</span>
100 %endif
101 </td>
102 <td>
103 %if node.is_file():
104 <span title="${node.last_changeset.author}">
100 %endif
101 </td>
102 <td>
103 %if node.is_file():
104 <span title="${node.last_changeset.author}">
105 105 ${h.person(node.last_changeset.author)}
106 106 </span>
107 %endif
108 </td>
109 </tr>
110 %endfor
107 %endif
108 </td>
109 </tr>
110 %endfor
111 111 </tbody>
112 112 <tbody id="tbody_filtered" style="display:none">
113 113 </tbody>
114 </table>
115 </div>
114 </table>
115 </div>
116 116 </div>
@@ -1,78 +1,78 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${_('%s Edit file') % 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 &raquo;
17 17 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
18 18 &raquo;
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 ${self.menu('files')}
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 <div id="files_data">
39 <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3>
40 ${h.form(h.url.current(),method='post',id='eform')}
41 <div id="body" class="codeblock">
38 <div id="files_data">
39 <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3>
40 ${h.form(h.url.current(),method='post',id='eform')}
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 <pre id="editor_pre"></pre>
62 <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea>
63 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
64 <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px"></textarea>
65 </div>
66 <div style="text-align: left;padding-top: 5px">
61 <pre id="editor_pre"></pre>
62 <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea>
63 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
64 <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px"></textarea>
65 </div>
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 </div>
70 ${h.end_form()}
71 <script type="text/javascript">
72 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}";
73 initCodeMirror('editor',reset_url);
74 </script>
75 </div>
69 </div>
70 ${h.end_form()}
71 <script type="text/javascript">
72 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}";
73 initCodeMirror('editor',reset_url);
74 </script>
75 </div>
76 76 </div>
77 77 </div>
78 78 </%def>
@@ -1,104 +1,104 b''
1 1 <div id="node_history">
2 2 %if c.load_full_history:
3 3 <%include file='files_history_box.html'/>
4 4 %else:
5 5 <div style="padding-bottom:10px">
6 6 <span id="load_node_history" class="ui-btn">${_('Load file history')}</span>
7 7 </div>
8 8 %endif
9 9 </div>
10 10
11 11
12 12 <div id="body" class="codeblock">
13 <div class="code-header">
13 <div class="code-header">
14 14 <div class="stats">
15 15 <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div>
16 16 <div class="left item"><pre class="tooltip" title="${h.tooltip(h.fmt_date(c.file_changeset.date))}">${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))}</pre></div>
17 17 <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div>
18 18 <div class="left item last"><pre>${c.file.mimetype}</pre></div>
19 19 <div class="buttons">
20 20 %if c.annotate:
21 21 ${h.link_to(_('show source'), h.url('files_home', repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
22 22 %else:
23 23 ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
24 24 %endif
25 25 ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
26 26 ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
27 27 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
28 28 % if not c.file.is_binary:
29 29 ${h.link_to(_('edit'),h.url('files_edit_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path),class_="ui-btn")}
30 30 % endif
31 31 % endif
32 32 </div>
33 33 </div>
34 34 <div class="author">
35 35 <div class="gravatar">
36 36 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.file_changeset.author),16)}"/>
37 37 </div>
38 38 <div title="${c.file_changeset.author}" class="user">${h.person(c.file_changeset.author)}</div>
39 39 </div>
40 <div class="commit">${h.urlify_commit(c.file_changeset.message,c.repo_name)}</div>
41 </div>
42 <div class="code-body">
43 %if c.file.is_binary:
44 ${_('Binary file (%s)') % c.file.mimetype}
45 %else:
46 % if c.file.size < c.cut_off_limit:
40 <div class="commit">${h.urlify_commit(c.file_changeset.message,c.repo_name)}</div>
41 </div>
42 <div class="code-body">
43 %if c.file.is_binary:
44 ${_('Binary file (%s)') % c.file.mimetype}
45 %else:
46 % if c.file.size < c.cut_off_limit:
47 47 %if c.annotate:
48 48 ${h.pygmentize_annotation(c.repo_name,c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
49 49 %else:
50 ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
50 ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
51 51 %endif
52 %else:
53 ${_('File is too big to display')} ${h.link_to(_('show as raw'),
54 h.url('files_raw_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path))}
55 %endif
52 %else:
53 ${_('File is too big to display')} ${h.link_to(_('show as raw'),
54 h.url('files_raw_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path))}
55 %endif
56 56 %endif
57 </div>
57 </div>
58 58 </div>
59 59
60 60 <script type="text/javascript">
61 61 YUE.onDOMReady(function(){
62 62 function highlight_lines(lines){
63 63 for(pos in lines){
64 64 YUD.setStyle('L'+lines[pos],'background-color','#FFFFBE');
65 65 }
66 66 }
67 67 page_highlights = location.href.substring(location.href.indexOf('#')+1).split('L');
68 68 if (page_highlights.length == 2){
69 69 highlight_ranges = page_highlights[1].split(",");
70 70
71 71 var h_lines = [];
72 72 for (pos in highlight_ranges){
73 73 var _range = highlight_ranges[pos].split('-');
74 74 if(_range.length == 2){
75 75 var start = parseInt(_range[0]);
76 76 var end = parseInt(_range[1]);
77 77 if (start < end){
78 78 for(var i=start;i<=end;i++){
79 79 h_lines.push(i);
80 80 }
81 81 }
82 82 }
83 83 else{
84 84 h_lines.push(parseInt(highlight_ranges[pos]));
85 85 }
86 86 }
87 87 highlight_lines(h_lines);
88 88
89 89 }
90 90
91 91 // select code link event
92 92 YUE.on('hlcode', 'mouseup', getSelectionLink);
93 93
94 94 //load history of file
95 95 YUE.on('load_node_history', 'click', function(e){
96 96 var _url = node_history_url.replace('__REV__','${c.file_changeset.raw_id}').replace('__FPATH__', '${c.f_path}');
97 97 ypjax(_url, 'node_history', function(o){
98 tooltip_activate();
98 tooltip_activate();
99 99 })
100 100 });
101 101
102 102 });
103 103
104 104 </script>
@@ -1,32 +1,32 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 % for f in c.followers_pager:
4 4 <div>
5 5 <div class="follower_user">
6 6 <div class="gravatar">
7 7 <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/>
8 8 </div>
9 9 <span style="font-size: 20px"> <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname})</span>
10 10 </div>
11 11 <div style="clear:both;padding-top: 10px"></div>
12 12 <div class="follower_date">${_('Started following -')}
13 13 <span class="tooltip" title="${h.tooltip(f.follows_from)}"> ${h.age(f.follows_from)}</span></div>
14 14 <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
15 15 </div>
16 16 % endfor
17 17
18 18 <div class="pagination-wh pagination-left">
19 19 <script type="text/javascript">
20 20 YUE.onDOMReady(function(){
21 21 YUE.delegate("followers","click",function(e, matchedEl, container){
22 22 ypjax(e.target.href,"followers",function(){
23 show_more_event();
24 tooltip_activate();
25 show_changeset_tooltip();
23 show_more_event();
24 tooltip_activate();
25 show_changeset_tooltip();
26 26 });
27 27 YUE.preventDefault(e);
28 28 },'.pager_link');
29 29 });
30 30 </script>
31 31 ${c.followers_pager.pager('$link_previous ~2~ $link_next')}
32 32 </div>
@@ -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 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 &raquo;
11 11 ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))}
12 12 &raquo;
13 13 ${_('fork')}
14 14 </%def>
15 15
16 16 <%def name="page_nav()">
17 ${self.menu('')}
17 ${self.menu('')}
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_fork_create_home',repo_name=c.repo_info.repo_name))}
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">${_('Fork name')}:</label>
32 32 </div>
33 33 <div class="input">
34 34 ${h.text('repo_name',class_="small")}
35 35 ${h.hidden('repo_type',c.repo_info.repo_type)}
36 36 ${h.hidden('fork_parent_id',c.repo_info.repo_id)}
37 37 </div>
38 38 </div>
39 39 <div class="field">
40 40 <div class="label">
41 41 <label for="landing_rev">${_('Landing revision')}:</label>
42 42 </div>
43 43 <div class="input">
44 44 ${h.select('landing_rev','',c.landing_revs,class_="medium")}
45 45 <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</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">${_('Optionaly 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 label-textarea">
59 59 <label for="description">${_('Description')}:</label>
60 60 </div>
61 61 <div class="textarea text-area editor">
62 62 ${h.textarea('description',cols=23,rows=5)}
63 63 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
64 64 </div>
65 65 </div>
66 66 <div class="field">
67 67 <div class="label label-checkbox">
68 68 <label for="private">${_('Private')}:</label>
69 69 </div>
70 70 <div class="checkboxes">
71 71 ${h.checkbox('private',value="True")}
72 72 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
73 73 </div>
74 74 </div>
75 75 <div class="field">
76 76 <div class="label label-checkbox">
77 77 <label for="private">${_('Copy permissions')}:</label>
78 78 </div>
79 79 <div class="checkboxes">
80 80 ${h.checkbox('copy_permissions',value="True", checked="checked")}
81 81 <span class="help-block">${_('Copy permissions from forked repository')}</span>
82 82 </div>
83 83 </div>
84 84 <div class="field">
85 85 <div class="label label-checkbox">
86 86 <label for="private">${_('Update after clone')}:</label>
87 87 </div>
88 88 <div class="checkboxes">
89 89 ${h.checkbox('update_after_clone',value="True")}
90 90 <span class="help-block">${_('Checkout source after making a clone')}</span>
91 91 </div>
92 92 </div>
93 <div class="buttons">
94 ${h.submit('',_('fork this repository'),class_="ui-btn large")}
95 </div>
93 <div class="buttons">
94 ${h.submit('',_('fork this repository'),class_="ui-btn large")}
95 </div>
96 96 </div>
97 97 </div>
98 98 ${h.end_form()}
99 99 </div>
100 100 </%def>
@@ -1,43 +1,43 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 % if c.forks_pager:
4 % for f in c.forks_pager:
5 <div>
6 <div class="fork_user">
7 <div class="gravatar">
8 <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/>
9 </div>
10 <span style="font-size: 20px">
11 <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname}) /
12 ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))}
13 </span>
14 <div style="padding:5px 3px 3px 42px;">${f.description}</div>
15 </div>
16 <div style="clear:both;padding-top: 10px"></div>
17 <div class="follower_date">${_('forked')} -
18 <span class="tooltip" title="${h.tooltip(h.fmt_date(f.created_on))}"> ${h.age(f.created_on)}</span>
4 % for f in c.forks_pager:
5 <div>
6 <div class="fork_user">
7 <div class="gravatar">
8 <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/>
9 </div>
10 <span style="font-size: 20px">
11 <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname}) /
12 ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))}
13 </span>
14 <div style="padding:5px 3px 3px 42px;">${f.description}</div>
15 </div>
16 <div style="clear:both;padding-top: 10px"></div>
17 <div class="follower_date">${_('forked')} -
18 <span class="tooltip" title="${h.tooltip(h.fmt_date(f.created_on))}"> ${h.age(f.created_on)}</span>
19 19 <a title="${_('compare fork with %s' % c.repo_name)}"
20 20 href="${h.url('compare_url',repo_name=f.repo_name,org_ref_type='branch',org_ref='default',other_ref_type='branch',other_ref='default', repo=c.repo_name)}"
21 21 class="ui-btn small">${_('Compare fork')}</a>
22 22 </div>
23 <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
24 </div>
25 % endfor
23 <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
24 </div>
25 % endfor
26 26 <div class="pagination-wh pagination-left">
27 27 <script type="text/javascript">
28 28 YUE.onDOMReady(function(){
29 29 YUE.delegate("forks","click",function(e, matchedEl, container){
30 30 ypjax(e.target.href,"forks",function(){
31 show_more_event();
32 tooltip_activate();
33 show_changeset_tooltip();
31 show_more_event();
32 tooltip_activate();
33 show_changeset_tooltip();
34 34 });
35 35 YUE.preventDefault(e);
36 36 },'.pager_link');
37 37 });
38 38 </script>
39 39 ${c.forks_pager.pager('$link_previous ~2~ $link_next')}
40 40 </div>
41 41 % else:
42 ${_('There are no forks yet')}
42 ${_('There are no forks yet')}
43 43 % endif
@@ -1,337 +1,337 b''
1 1 <%page args="parent" />
2 2 <div class="box">
3 3 <!-- box / title -->
4 4 <div class="title">
5 5 <h5>
6 6 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')}
7 7 </h5>
8 8 %if c.rhodecode_user.username != 'default':
9 9 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
10 10 <ul class="links">
11 11 <li>
12 12 %if c.group:
13 13 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span>
14 14 %else:
15 15 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
16 16 %endif
17 17 </li>
18 18 </ul>
19 19 %endif
20 20 %endif
21 21 </div>
22 22 <!-- end box / title -->
23 23 <div class="table">
24 24 % if c.groups:
25 25 <div id='groups_list_wrap' class="yui-skin-sam">
26 26 <table id="groups_list">
27 27 <thead>
28 28 <tr>
29 29 <th class="left"><a href="#">${_('Group name')}</a></th>
30 30 <th class="left"><a href="#">${_('Description')}</a></th>
31 31 ##<th class="left"><a href="#">${_('Number of repositories')}</a></th>
32 32 </tr>
33 33 </thead>
34 34
35 35 ## REPO GROUPS
36 36 % for gr in c.groups:
37 37 <tr>
38 38 <td>
39 39 <div style="white-space: nowrap">
40 40 <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/>
41 41 ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))}
42 42 </div>
43 43 </td>
44 44 %if c.visual.stylify_metatags:
45 45 <td>${h.urlify_text(h.desc_stylize(gr.group_description))}</td>
46 46 %else:
47 47 <td>${gr.group_description}</td>
48 48 %endif
49 49 ## this is commented out since for multi nested repos can be HEAVY!
50 50 ## in number of executed queries during traversing uncomment at will
51 51 ##<td><b>${gr.repositories_recursive_count}</b></td>
52 52 </tr>
53 53 % endfor
54 54 </table>
55 55 </div>
56 56 <div id="group-user-paginator" style="padding: 0px 0px 0px 0px"></div>
57 57 <div style="height: 20px"></div>
58 58 % endif
59 59 <div id="welcome" style="display:none;text-align:center">
60 60 <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1>
61 61 </div>
62 62 <%cnt=0%>
63 63 <%namespace name="dt" file="/data_table/_dt_elements.html"/>
64 64 % if c.visual.lightweight_dashboard is False:
65 65 ## old full detailed version
66 66 <div id='repos_list_wrap' class="yui-skin-sam">
67 67 <table id="repos_list">
68 68 <thead>
69 69 <tr>
70 70 <th class="left"></th>
71 71 <th class="left">${_('Name')}</th>
72 72 <th class="left">${_('Description')}</th>
73 73 <th class="left">${_('Last change')}</th>
74 74 <th class="left">${_('Tip')}</th>
75 75 <th class="left">${_('Owner')}</th>
76 76 <th class="left">${_('RSS')}</th>
77 77 <th class="left">${_('Atom')}</th>
78 78 </tr>
79 79 </thead>
80 80 <tbody>
81 81 %for cnt,repo in enumerate(c.repos_list):
82 82 <tr class="parity${(cnt+1)%2}">
83 83 ##QUICK MENU
84 84 <td class="quick_repo_menu">
85 85 ${dt.quick_menu(repo['name'])}
86 86 </td>
87 87 ##REPO NAME AND ICONS
88 88 <td class="reponame">
89 89 ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],h.AttributeDict(repo['dbrepo_fork']),pageargs.get('short_repo_names'))}
90 90 </td>
91 91 ##DESCRIPTION
92 92 <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
93 93 %if c.visual.stylify_metatags:
94 94 ${h.urlify_text(h.desc_stylize(h.truncate(repo['description'],60)))}</span>
95 95 %else:
96 96 ${h.truncate(repo['description'],60)}</span>
97 97 %endif
98 98 </td>
99 99 ##LAST CHANGE DATE
100 100 <td>
101 101 ${dt.last_change(repo['last_change'])}
102 102 </td>
103 103 ##LAST REVISION
104 104 <td>
105 105 ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])}
106 106 </td>
107 107 ##
108 108 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
109 109 <td>
110 110 ${dt.rss(repo['name'])}
111 111 </td>
112 112 <td>
113 113 ${dt.atom(repo['name'])}
114 114 </td>
115 115 </tr>
116 116 %endfor
117 117 </tbody>
118 118 </table>
119 119 </div>
120 120 % else:
121 121 ## lightweight version
122 122 <div class="yui-skin-sam" id="repos_list_wrap"></div>
123 123 <div id="user-paginator" style="padding: 0px 0px 0px 0px"></div>
124 124 % endif
125 125 </div>
126 126 </div>
127 127 % if c.visual.lightweight_dashboard is False:
128 128 <script>
129 129 YUD.get('repo_count').innerHTML = ${cnt+1 if cnt else 0};
130 130
131 131 // groups table sorting
132 132 var myColumnDefs = [
133 133 {key:"name",label:"${_('Group name')}",sortable:true,
134 134 sortOptions: { sortFunction: groupNameSort }},
135 135 {key:"desc",label:"${_('Description')}",sortable:true},
136 136 ];
137 137
138 138 var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list"));
139 139
140 140 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
141 141 myDataSource.responseSchema = {
142 142 fields: [
143 143 {key:"name"},
144 144 {key:"desc"},
145 145 ]
146 146 };
147 147
148 148 var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource,{
149 149 sortedBy:{key:"name",dir:"asc"},
150 150 paginator: new YAHOO.widget.Paginator({
151 151 rowsPerPage: 50,
152 152 alwaysVisible: false,
153 153 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}",
154 154 pageLinks: 5,
155 155 containerClass: 'pagination-wh',
156 156 currentPageClass: 'pager_curpage',
157 157 pageLinkClass: 'pager_link',
158 158 nextPageLinkLabel: '&gt;',
159 159 previousPageLinkLabel: '&lt;',
160 160 firstPageLinkLabel: '&lt;&lt;',
161 161 lastPageLinkLabel: '&gt;&gt;',
162 162 containers:['group-user-paginator']
163 163 }),
164 164 MSG_SORTASC:"${_('Click to sort ascending')}",
165 165 MSG_SORTDESC:"${_('Click to sort descending')}"
166 166 });
167 167
168 168 // main table sorting
169 169 var myColumnDefs = [
170 170 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
171 171 {key:"name",label:"${_('Name')}",sortable:true,
172 172 sortOptions: { sortFunction: nameSort }},
173 173 {key:"desc",label:"${_('Description')}",sortable:true},
174 174 {key:"last_change",label:"${_('Last Change')}",sortable:true,
175 175 sortOptions: { sortFunction: ageSort }},
176 176 {key:"tip",label:"${_('Tip')}",sortable:true,
177 sortOptions: { sortFunction: revisionSort }},
177 sortOptions: { sortFunction: revisionSort }},
178 178 {key:"owner",label:"${_('Owner')}",sortable:true},
179 179 {key:"rss",label:"",sortable:false},
180 180 {key:"atom",label:"",sortable:false},
181 181 ];
182 182
183 183 var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list"));
184 184
185 185 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
186 186
187 187 myDataSource.responseSchema = {
188 188 fields: [
189 189 {key:"menu"},
190 190 //{key:"raw_name"},
191 191 {key:"name"},
192 192 {key:"desc"},
193 193 {key:"last_change"},
194 194 {key:"tip"},
195 195 {key:"owner"},
196 196 {key:"rss"},
197 197 {key:"atom"},
198 198 ]
199 199 };
200 200
201 201 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,
202 202 {
203 sortedBy:{key:"name",dir:"asc"},
203 sortedBy:{key:"name",dir:"asc"},
204 204 MSG_SORTASC:"${_('Click to sort ascending')}",
205 205 MSG_SORTDESC:"${_('Click to sort descending')}",
206 206 MSG_EMPTY:"${_('No records found.')}",
207 207 MSG_ERROR:"${_('Data error.')}",
208 208 MSG_LOADING:"${_('Loading...')}",
209 209 }
210 210 );
211 211 myDataTable.subscribe('postRenderEvent',function(oArgs) {
212 212 tooltip_activate();
213 213 quick_repo_menu();
214 214 var func = function(node){
215 215 return node.parentNode.parentNode.parentNode.parentNode;
216 216 }
217 217 q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func);
218 218 });
219 219
220 220 </script>
221 221 % else:
222 222 <script>
223 223 var data = ${c.data|n};
224 224 var myDataSource = new YAHOO.util.DataSource(data);
225 225 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
226 226
227 227 myDataSource.responseSchema = {
228 228 resultsList: "records",
229 229 fields: [
230 230 {key:"menu"},
231 231 {key:"raw_name"},
232 232 {key:"name"},
233 233 {key:"desc"},
234 234 {key:"last_change"},
235 235 {key:"last_changeset"},
236 236 {key:"owner"},
237 237 {key:"rss"},
238 238 {key:"atom"},
239 239 ]
240 240 };
241 241 myDataSource.doBeforeCallback = function(req,raw,res,cb) {
242 242 // This is the filter function
243 243 var data = res.results || [],
244 244 filtered = [],
245 245 i,l;
246 246
247 247 if (req) {
248 248 req = req.toLowerCase();
249 249 for (i = 0; i<data.length; i++) {
250 250 var pos = data[i].raw_name.toLowerCase().indexOf(req)
251 251 if (pos != -1) {
252 252 filtered.push(data[i]);
253 253 }
254 254 }
255 255 res.results = filtered;
256 256 }
257 257 YUD.get('repo_count').innerHTML = res.results.length;
258 258 return res;
259 259 }
260 260
261 261 // main table sorting
262 262 var myColumnDefs = [
263 263 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
264 264 {key:"name",label:"${_('Name')}",sortable:true,
265 265 sortOptions: { sortFunction: nameSort }},
266 266 {key:"desc",label:"${_('Description')}",sortable:true},
267 267 {key:"last_change",label:"${_('Last Change')}",sortable:true,
268 268 sortOptions: { sortFunction: ageSort }},
269 269 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
270 270 sortOptions: { sortFunction: revisionSort }},
271 271 {key:"owner",label:"${_('Owner')}",sortable:true},
272 272 {key:"rss",label:"",sortable:false},
273 273 {key:"atom",label:"",sortable:false},
274 274 ];
275 275
276 276 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{
277 277 sortedBy:{key:"name",dir:"asc"},
278 278 paginator: new YAHOO.widget.Paginator({
279 279 rowsPerPage: ${c.visual.lightweight_dashboard_items},
280 280 alwaysVisible: false,
281 281 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}",
282 282 pageLinks: 5,
283 283 containerClass: 'pagination-wh',
284 284 currentPageClass: 'pager_curpage',
285 285 pageLinkClass: 'pager_link',
286 286 nextPageLinkLabel: '&gt;',
287 287 previousPageLinkLabel: '&lt;',
288 288 firstPageLinkLabel: '&lt;&lt;',
289 289 lastPageLinkLabel: '&gt;&gt;',
290 290 containers:['user-paginator']
291 291 }),
292 292
293 293 MSG_SORTASC:"${_('Click to sort ascending')}",
294 294 MSG_SORTDESC:"${_('Click to sort descending')}",
295 295 MSG_EMPTY:"${_('No records found.')}",
296 296 MSG_ERROR:"${_('Data error.')}",
297 297 MSG_LOADING:"${_('Loading...')}",
298 298 }
299 299 );
300 300 myDataTable.subscribe('postRenderEvent',function(oArgs) {
301 301 tooltip_activate();
302 302 quick_repo_menu();
303 303 });
304 304
305 305 var filterTimeout = null;
306 306
307 307 updateFilter = function () {
308 308 // Reset timeout
309 309 filterTimeout = null;
310 310
311 311 // Reset sort
312 312 var state = myDataTable.getState();
313 313 state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
314 314
315 315 // Get filtered data
316 316 myDataSource.sendRequest(YUD.get('q_filter').value,{
317 317 success : myDataTable.onDataReturnInitializeTable,
318 318 failure : myDataTable.onDataReturnInitializeTable,
319 319 scope : myDataTable,
320 320 argument: state
321 321 });
322 322
323 323 };
324 324 YUE.on('q_filter','click',function(){
325 325 if(!YUD.hasClass('q_filter', 'loaded')){
326 326 YUD.get('q_filter').value = '';
327 327 //TODO: load here full list later to do search within groups
328 328 YUD.addClass('q_filter', 'loaded');
329 329 }
330 330 });
331 331
332 332 YUE.on('q_filter','keyup',function (e) {
333 333 clearTimeout(filterTimeout);
334 334 filterTimeout = setTimeout(updateFilter,600);
335 335 });
336 336 </script>
337 337 % endif
@@ -1,375 +1,375 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3 <%def name="title()">
4 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 ${self.menu('home')}
18 ${self.menu('home')}
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 <!-- box / title -->
28 <div class="title">
27 <!-- box / title -->
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_rss', api_key=c.rhodecode_user.api_key)}"><img class="icon" title="${_('RSS feed')}" alt="${_('RSS feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span>
36 36 </li>
37 37 <li>
38 38 <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/atom.png')}"/></a></span>
39 39 </li>
40 40 </ul>
41 </div>
42 <div id="journal">${c.journal_data}</div>
41 </div>
42 <div id="journal">${c.journal_data}</div>
43 43 </div>
44 44 <div class="box box-right">
45 45 <!-- box / title -->
46 46
47 47 <div class="title">
48 48 <h5>
49 49 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/>
50 50 <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/>
51 51 </h5>
52 52 <ul class="links" style="color:#DADADA">
53 53 <li>
54 54 <span><a id="show_watched" class="link-white current" href="#watched">${_('Watched')}</a> </span>
55 55 </li>
56 56 <li>
57 57 <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span>
58 58 </li>
59 59 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
60 60 <li>
61 61 <span>${h.link_to(_('Add repo'),h.url('admin_settings_create_repository'))}</span>
62 62 </li>
63 63 %endif
64 64 </ul>
65 65 </div>
66 66
67 67 <!-- end box / title -->
68 68 <div id="my_container" style="display:none">
69 69 <div class="table yui-skin-sam" id="repos_list_wrap"></div>
70 70 <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
71 71 </div>
72 72
73 73 <div id="watched_container">
74 74 <div class="table yui-skin-sam" id="watched_repos_list_wrap"></div>
75 75 <div id="watched-user-paginator" style="padding: 0px 0px 0px 20px"></div>
76 76 </div>
77 77 </div>
78 78
79 79 <script type="text/javascript">
80 80
81 81 YUE.on('j_filter','click',function(){
82 82 var jfilter = YUD.get('j_filter');
83 83 if(YUD.hasClass(jfilter, 'initial')){
84 84 jfilter.value = '';
85 85 }
86 86 });
87 87 var fix_j_filter_width = function(len){
88 88 YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px');
89 89 }
90 90 YUE.on('j_filter','keyup',function(){
91 91 fix_j_filter_width(YUD.get('j_filter').value.length);
92 92 });
93 93 YUE.on('filter_form','submit',function(e){
94 94 YUE.preventDefault(e)
95 95 var val = YUD.get('j_filter').value;
96 96 window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val);
97 97 });
98 98 fix_j_filter_width(YUD.get('j_filter').value.length);
99 99
100 100 YUE.on('refresh','click',function(e){
101 101 ypjax("${h.url.current(filter=c.search_term)}","journal",function(){
102 102 show_more_event();
103 103 tooltip_activate();
104 104 show_changeset_tooltip();
105 105 });
106 106 YUE.preventDefault(e);
107 107 });
108 108
109 109 var show_my = function(e){
110 110 YUD.setStyle('watched_container','display','none');
111 111 YUD.setStyle('my_container','display','');
112 112 YUD.setStyle('q_filter','display','');
113 113 YUD.setStyle('q_filter_watched','display','none');
114 114
115 115 YUD.addClass('show_my', 'current');
116 116 YUD.removeClass('show_watched','current');
117 117
118 118 if(!YUD.hasClass('show_my', 'loaded')){
119 119 table_renderer(${c.data |n});
120 120 YUD.addClass('show_my', 'loaded');
121 121 }
122 122 }
123 123 YUE.on('show_my','click',function(e){
124 124 show_my(e);
125 125 })
126 126 var show_watched = function(e){
127 YUD.setStyle('my_container','display','none');
127 YUD.setStyle('my_container','display','none');
128 128 YUD.setStyle('watched_container','display','');
129 129 YUD.setStyle('q_filter_watched','display','');
130 130 YUD.setStyle('q_filter','display','none');
131 131
132 132 YUD.addClass('show_watched', 'current');
133 133 YUD.removeClass('show_my','current');
134 134 if(!YUD.hasClass('show_watched', 'loaded')){
135 watched_renderer(${c.watched_data |n});
135 watched_renderer(${c.watched_data |n});
136 136 YUD.addClass('show_watched', 'loaded');
137 137 }
138 138
139 139 return
140 140 var nodes = YUQ('#watched_container .watched_repo a');
141 141 var target = 'q_filter';
142 142 var func = function(node){
143 143 return node.parentNode.parentNode;
144 144 }
145 145 q_filter(target,nodes,func);
146 146 }
147 147 YUE.on('show_watched','click',function(e){
148 148 show_watched(e);
149 149 })
150 150 //init watched
151 151 show_watched();
152 152
153 153 var tabs = {
154 154 'watched': show_watched,
155 155 'my': show_my,
156 156 }
157 157 var url = location.href.split('#');
158 158 if (url[1]) {
159 159 //We have a hash
160 160 var tabHash = url[1];
161 161 var func = tabs[tabHash]
162 162 if (func){
163 func();
163 func();
164 164 }
165 165 }
166 166 function watched_renderer(data){
167 167 var myDataSource = new YAHOO.util.DataSource(data);
168 168 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
169 169
170 170 myDataSource.responseSchema = {
171 171 resultsList: "records",
172 172 fields: [
173 173 {key:"menu"},
174 174 {key:"raw_name"},
175 175 {key:"name"},
176 176 {key:"last_changeset"},
177 177 {key:"action"},
178 178 ]
179 179 };
180 180 myDataSource.doBeforeCallback = function(req,raw,res,cb) {
181 181 // This is the filter function
182 182 var data = res.results || [],
183 183 filtered = [],
184 184 i,l;
185 185
186 186 if (req) {
187 187 req = req.toLowerCase();
188 188 for (i = 0; i<data.length; i++) {
189 189 var pos = data[i].raw_name.toLowerCase().indexOf(req)
190 190 if (pos != -1) {
191 191 filtered.push(data[i]);
192 192 }
193 193 }
194 194 res.results = filtered;
195 195 }
196 196 return res;
197 197 }
198 198 // main table sorting
199 199 var myColumnDefs = [
200 200 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
201 201 {key:"name",label:"${_('Name')}",sortable:true,
202 202 sortOptions: { sortFunction: nameSort }},
203 203 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
204 204 sortOptions: { sortFunction: revisionSort }},
205 205 {key:"action",label:"${_('Action')}",sortable:false},
206 206 ];
207 207
208 208 var myDataTable = new YAHOO.widget.DataTable("watched_repos_list_wrap", myColumnDefs, myDataSource,{
209 209 sortedBy:{key:"name",dir:"asc"},
210 210 paginator: new YAHOO.widget.Paginator({
211 211 rowsPerPage: 25,
212 212 alwaysVisible: false,
213 213 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}",
214 214 pageLinks: 5,
215 215 containerClass: 'pagination-wh',
216 216 currentPageClass: 'pager_curpage',
217 217 pageLinkClass: 'pager_link',
218 218 nextPageLinkLabel: '&gt;',
219 219 previousPageLinkLabel: '&lt;',
220 220 firstPageLinkLabel: '&lt;&lt;',
221 221 lastPageLinkLabel: '&gt;&gt;',
222 222 containers:['watched-user-paginator']
223 223 }),
224 224
225 225 MSG_SORTASC:"${_('Click to sort ascending')}",
226 226 MSG_SORTDESC:"${_('Click to sort descending')}",
227 227 MSG_EMPTY:"${_('No records found.')}",
228 228 MSG_ERROR:"${_('Data error.')}",
229 229 MSG_LOADING:"${_('Loading...')}",
230 230 }
231 231 );
232 232 myDataTable.subscribe('postRenderEvent',function(oArgs) {
233 233 tooltip_activate();
234 234 quick_repo_menu();
235 235 });
236 236
237 237 var filterTimeout = null;
238 238
239 239 updateFilter = function () {
240 240 // Reset timeout
241 241 filterTimeout = null;
242 242
243 243 // Reset sort
244 244 var state = myDataTable.getState();
245 245 state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
246 246
247 247 // Get filtered data
248 248 myDataSource.sendRequest(YUD.get('q_filter_watched').value,{
249 249 success : myDataTable.onDataReturnInitializeTable,
250 250 failure : myDataTable.onDataReturnInitializeTable,
251 251 scope : myDataTable,
252 252 argument: state
253 253 });
254 254
255 255 };
256 256 YUE.on('q_filter_watched','click',function(){
257 257 if(!YUD.hasClass('q_filter_watched', 'loaded')){
258 258 YUD.get('q_filter_watched').value = '';
259 259 //TODO: load here full list later to do search within groups
260 260 YUD.addClass('q_filter_watched', 'loaded');
261 261 }
262 262 });
263 263
264 264 YUE.on('q_filter_watched','keyup',function (e) {
265 265 clearTimeout(filterTimeout);
266 266 filterTimeout = setTimeout(updateFilter,600);
267 267 });
268 268 }
269 269
270 270 function table_renderer(data){
271 271 var myDataSource = new YAHOO.util.DataSource(data);
272 272 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
273 273
274 274 myDataSource.responseSchema = {
275 275 resultsList: "records",
276 276 fields: [
277 277 {key:"menu"},
278 278 {key:"raw_name"},
279 279 {key:"name"},
280 280 {key:"last_changeset"},
281 281 {key:"action"},
282 282 ]
283 283 };
284 284 myDataSource.doBeforeCallback = function(req,raw,res,cb) {
285 285 // This is the filter function
286 286 var data = res.results || [],
287 287 filtered = [],
288 288 i,l;
289 289
290 290 if (req) {
291 291 req = req.toLowerCase();
292 292 for (i = 0; i<data.length; i++) {
293 293 var pos = data[i].raw_name.toLowerCase().indexOf(req)
294 294 if (pos != -1) {
295 295 filtered.push(data[i]);
296 296 }
297 297 }
298 298 res.results = filtered;
299 299 }
300 300 return res;
301 301 }
302 302 // main table sorting
303 303 var myColumnDefs = [
304 304 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
305 305 {key:"name",label:"${_('Name')}",sortable:true,
306 306 sortOptions: { sortFunction: nameSort }},
307 307 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
308 308 sortOptions: { sortFunction: revisionSort }},
309 309 {key:"action",label:"${_('Action')}",sortable:false},
310 310 ];
311 311
312 312 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{
313 313 sortedBy:{key:"name",dir:"asc"},
314 314 paginator: new YAHOO.widget.Paginator({
315 315 rowsPerPage: 25,
316 316 alwaysVisible: false,
317 317 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}",
318 318 pageLinks: 5,
319 319 containerClass: 'pagination-wh',
320 320 currentPageClass: 'pager_curpage',
321 321 pageLinkClass: 'pager_link',
322 322 nextPageLinkLabel: '&gt;',
323 323 previousPageLinkLabel: '&lt;',
324 324 firstPageLinkLabel: '&lt;&lt;',
325 325 lastPageLinkLabel: '&gt;&gt;',
326 326 containers:['user-paginator']
327 327 }),
328 328
329 329 MSG_SORTASC:"${_('Click to sort ascending')}",
330 330 MSG_SORTDESC:"${_('Click to sort descending')}",
331 331 MSG_EMPTY:"${_('No records found.')}",
332 332 MSG_ERROR:"${_('Data error.')}",
333 333 MSG_LOADING:"${_('Loading...')}",
334 334 }
335 335 );
336 336 myDataTable.subscribe('postRenderEvent',function(oArgs) {
337 337 tooltip_activate();
338 338 quick_repo_menu();
339 339 });
340 340
341 341 var filterTimeout = null;
342 342
343 343 updateFilter = function () {
344 344 // Reset timeout
345 345 filterTimeout = null;
346 346
347 347 // Reset sort
348 348 var state = myDataTable.getState();
349 349 state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
350 350
351 351 // Get filtered data
352 352 myDataSource.sendRequest(YUD.get('q_filter').value,{
353 353 success : myDataTable.onDataReturnInitializeTable,
354 354 failure : myDataTable.onDataReturnInitializeTable,
355 355 scope : myDataTable,
356 356 argument: state
357 357 });
358 358
359 359 };
360 360 YUE.on('q_filter','click',function(){
361 361 if(!YUD.hasClass('q_filter', 'loaded')){
362 362 YUD.get('q_filter').value = '';
363 363 //TODO: load here full list later to do search within groups
364 364 YUD.addClass('q_filter', 'loaded');
365 365 }
366 366 });
367 367
368 368 YUE.on('q_filter','keyup',function (e) {
369 369 clearTimeout(filterTimeout);
370 370 filterTimeout = setTimeout(updateFilter,600);
371 371 });
372 372 }
373 373
374 374 </script>
375 375 </%def>
@@ -1,57 +1,57 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 %if c.journal_day_aggreagate:
4 4 %for day,items in c.journal_day_aggreagate:
5 5 <div class="journal_day">${day}</div>
6 6 % for user,entries in items:
7 <div class="journal_container">
8 <div class="gravatar">
9 <img alt="gravatar" src="${h.gravatar_url(user.email if user else 'anonymous@rhodecode.org',24)}"/>
10 </div>
7 <div class="journal_container">
8 <div class="gravatar">
9 <img alt="gravatar" src="${h.gravatar_url(user.email if user else 'anonymous@rhodecode.org',24)}"/>
10 </div>
11 11 %if user:
12 <div class="journal_user">${user.name} ${user.lastname}</div>
12 <div class="journal_user">${user.name} ${user.lastname}</div>
13 13 %else:
14 14 <div class="journal_user deleted">${entries[0].username}</div>
15 15 %endif
16 <div class="journal_action_container">
17 % for entry in entries:
18 <div class="journal_icon"> ${h.action_parser(entry)[2]()}</div>
19 <div class="journal_action">${h.action_parser(entry)[0]()}</div>
20 <div class="journal_repo">
21 <span class="journal_repo_name">
22 %if entry.repository is not None:
23 ${h.link_to(entry.repository.repo_name,
24 h.url('summary_home',repo_name=entry.repository.repo_name))}
25 %else:
26 ${entry.repository_name}
27 %endif
28 </span>
29 </div>
30 <div class="journal_action_params">${h.literal(h.action_parser(entry)[1]())}</div>
31 <div class="date"><span class="tooltip" title="${h.tooltip(h.fmt_date(entry.action_date))}">${h.age(entry.action_date)}</span></div>
32 %endfor
33 </div>
34 </div>
16 <div class="journal_action_container">
17 % for entry in entries:
18 <div class="journal_icon"> ${h.action_parser(entry)[2]()}</div>
19 <div class="journal_action">${h.action_parser(entry)[0]()}</div>
20 <div class="journal_repo">
21 <span class="journal_repo_name">
22 %if entry.repository is not None:
23 ${h.link_to(entry.repository.repo_name,
24 h.url('summary_home',repo_name=entry.repository.repo_name))}
25 %else:
26 ${entry.repository_name}
27 %endif
28 </span>
29 </div>
30 <div class="journal_action_params">${h.literal(h.action_parser(entry)[1]())}</div>
31 <div class="date"><span class="tooltip" title="${h.tooltip(h.fmt_date(entry.action_date))}">${h.age(entry.action_date)}</span></div>
32 %endfor
33 </div>
34 </div>
35 35 %endfor
36 36 %endfor
37 37
38 38 <div class="pagination-wh pagination-left">
39 39 <script type="text/javascript">
40 40 YUE.onDOMReady(function(){
41 41 YUE.delegate("journal","click",function(e, matchedEl, container){
42 ypjax(e.target.href,"journal",function(){
43 show_more_event();
44 tooltip_activate();
45 show_changeset_tooltip();
46 });
42 ypjax(e.target.href,"journal",function(){
43 show_more_event();
44 tooltip_activate();
45 show_changeset_tooltip();
46 });
47 47 YUE.preventDefault(e);
48 48 },'.pager_link');
49 49 });
50 50 </script>
51 51 ${c.journal_pager.pager('$link_previous ~2~ $link_next')}
52 52 </div>
53 53 %else:
54 54 <div style="padding:5px 0px 10px 10px;">
55 55 ${_('No entries yet')}
56 56 </div>
57 57 %endif
@@ -1,35 +1,35 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3 <%def name="title()">
4 4 ${_('Journal')} - ${c.rhodecode_name}
5 5 </%def>
6 6 <%def name="breadcrumbs()">
7 ${c.rhodecode_name}
7 ${c.rhodecode_name}
8 8 </%def>
9 9 <%def name="page_nav()">
10 ${self.menu('home')}
10 ${self.menu('home')}
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_rss')}"><img class="icon" title="${_('RSS feed')}" alt="${_('RSS feed')}" src="${h.url('/images/icons/atom.png')}"/></a></span>
25 25 </li>
26 26 <li>
27 27 <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>
28 28 </li>
29 29 </ul>
30 30 </div>
31 31
32 32 <div id="journal">${c.journal_data}</div>
33 33 </div>
34 34
35 35 </%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 ${_('Sign 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 21 <h5>${_('Sign In to')} ${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',size=40)}
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',size=40)}
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 YUD.get('username').focus();
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 ${_('Reset your password')} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8 <div id="register">
9 9
10 <div class="title top-left-rounded-corner top-right-rounded-corner">
11 <h5>${_('Reset your password to')} ${c.rhodecode_name}</h5>
12 </div>
13 <div class="inner">
14 ${h.form(url('password_reset'))}
15 <div class="form">
16 <!-- fields -->
17 <div class="fields">
10 <div class="title top-left-rounded-corner top-right-rounded-corner">
11 <h5>${_('Reset your password to')} ${c.rhodecode_name}</h5>
12 </div>
13 <div class="inner">
14 ${h.form(url('password_reset'))}
15 <div class="form">
16 <!-- fields -->
17 <div class="fields">
18 18
19 <div class="field">
20 <div class="label">
21 <label for="email">${_('Email address')}:</label>
22 </div>
23 <div class="input">
24 ${h.text('email')}
25 </div>
26 </div>
19 <div class="field">
20 <div class="label">
21 <label for="email">${_('Email address')}:</label>
22 </div>
23 <div class="input">
24 ${h.text('email')}
25 </div>
26 </div>
27 27
28 <div class="buttons">
29 <div class="nohighlight">
30 ${h.submit('send',_('Reset my password'),class_="ui-btn large")}
31 <div class="activation_msg">${_('Password reset link will be send to matching email address')}</div>
32 </div>
33 </div>
34 </div>
35 </div>
36 ${h.end_form()}
28 <div class="buttons">
29 <div class="nohighlight">
30 ${h.submit('send',_('Reset my password'),class_="ui-btn large")}
31 <div class="activation_msg">${_('Password reset link will be send to matching email address')}</div>
32 </div>
33 </div>
34 </div>
35 </div>
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 </div>
42 </div>
43 43 </div>
@@ -1,204 +1,204 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${c.repo_name} ${_('New pull request')}
5 5 </%def>
6 6
7 7 <%def name="breadcrumbs_links()">
8 8 ${h.link_to(_(u'Home'),h.url('/'))}
9 9 &raquo;
10 10 ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))}
11 11 &raquo;
12 12 ${_('New pull request')}
13 13 </%def>
14 14
15 15 <%def name="main()">
16 16
17 17 <div class="box">
18 18 <!-- box / title -->
19 19 <div class="title">
20 20 ${self.breadcrumbs()}
21 21 </div>
22 22 ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')}
23 23 <div style="float:left;padding:0px 30px 30px 30px">
24 24 <input type="hidden" name="rev_start" value="${request.GET.get('rev_start')}" />
25 25 <input type="hidden" name="rev_end" value="${request.GET.get('rev_end')}" />
26 26
27 27 ##ORG
28 28 <div style="float:left">
29 29 <div class="fork_user">
30 30 <div class="gravatar">
31 31 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_db_repo.user.email,24)}"/>
32 32 </div>
33 33 <span style="font-size: 20px">
34 34 ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref','',c.org_refs,class_='refs')}
35 35 </span>
36 36 <div style="padding:5px 3px 3px 42px;">${c.rhodecode_db_repo.description}</div>
37 37 </div>
38 38 <div style="clear:both;padding-top: 10px"></div>
39 39 </div>
40 40 <div style="float:left;font-size:24px;padding:0px 20px">
41 41 <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/>
42 42 </div>
43 43
44 44 ##OTHER, most Probably the PARENT OF THIS FORK
45 45 <div style="float:left">
46 46 <div class="fork_user">
47 47 <div class="gravatar">
48 48 <img id="other_repo_gravatar" alt="gravatar" src=""/>
49 49 </div>
50 50 <span style="font-size: 20px">
51 51 ${h.select('other_repo',c.default_pull_request ,c.other_repos,class_='refs')}:${h.select('other_ref',c.default_pull_request_rev,c.default_revs,class_='refs')}
52 52 </span>
53 53 <span style="padding:3px">
54 54 <a id="refresh" href="#" class="tooltip" title="${h.tooltip(_('refresh overview'))}">
55 55 <img style="margin:3px" class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/>
56 56 </a>
57 57 </span>
58 58 <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div>
59 59 </div>
60 60 <div style="clear:both;padding-top: 10px"></div>
61 61 </div>
62 62 <div style="clear:both;padding-top: 10px"></div>
63 63 ## overview pulled by ajax
64 64 <div style="float:left" id="pull_request_overview"></div>
65 65 <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none">
66 66 <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a>
67 67 </div>
68 68 </div>
69 69 <div style="float:left; border-left:1px dashed #eee">
70 70 <h4>${_('Pull request reviewers')}</h4>
71 71 <div id="reviewers" style="padding:0px 0px 0px 15px">
72 72 ## members goes here !
73 73 <div class="group_members_wrap">
74 74 <ul id="review_members" class="group_members">
75 75 %for member in c.review_members:
76 76 <li id="reviewer_${member.user_id}">
77 77 <div class="reviewers_member">
78 78 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div>
79 79 <div style="float:left">${member.full_name} (${_('owner')})</div>
80 80 <input type="hidden" value="${member.user_id}" name="review_members" />
81 81 <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span>
82 82 </div>
83 83 </li>
84 84 %endfor
85 85 </ul>
86 86 </div>
87 87
88 88 <div class='ac'>
89 89 <div class="reviewer_ac">
90 90 ${h.text('user', class_='yui-ac-input')}
91 91 <span class="help-block">${_('Add reviewer to this pull request.')}</span>
92 92 <div id="reviewers_container"></div>
93 93 </div>
94 94 </div>
95 95 </div>
96 96 </div>
97 97 <h3>${_('Create new pull request')}</h3>
98 98
99 99 <div class="form">
100 100 <!-- fields -->
101 101
102 102 <div class="fields">
103 103
104 104 <div class="field">
105 105 <div class="label">
106 106 <label for="pullrequest_title">${_('Title')}:</label>
107 107 </div>
108 108 <div class="input">
109 109 ${h.text('pullrequest_title',size=30)}
110 110 </div>
111 111 </div>
112 112
113 113 <div class="field">
114 114 <div class="label label-textarea">
115 115 <label for="pullrequest_desc">${_('description')}:</label>
116 116 </div>
117 117 <div class="textarea text-area editor">
118 118 ${h.textarea('pullrequest_desc',size=30)}
119 119 </div>
120 120 </div>
121 121
122 122 <div class="buttons">
123 123 ${h.submit('save',_('Send pull request'),class_="ui-btn large")}
124 124 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
125 125 </div>
126 126 </div>
127 127 </div>
128 128 ${h.end_form()}
129 129
130 130 </div>
131 131
132 132 <script type="text/javascript">
133 133 var _USERS_AC_DATA = ${c.users_array|n};
134 134 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
135 135 PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
136 136
137 137 var other_repos_info = ${c.other_repos_info|n};
138 138
139 139 var loadPreview = function(){
140 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none');
140 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none');
141 141 var url = "${h.url('compare_url',
142 repo_name='org_repo',
143 org_ref_type='org_ref_type', org_ref='org_ref',
142 repo_name='org_repo',
143 org_ref_type='org_ref_type', org_ref='org_ref',
144 144 other_ref_type='other_ref_type', other_ref='other_ref',
145 145 repo='other_repo',
146 146 as_form=True, bundle=False,
147 147 rev_start=request.GET.get('rev_start',''),
148 148 rev_end=request.GET.get('rev_end',''))}";
149 149
150 150 var select_refs = YUQ('#pull_request_form select.refs')
151 151 var rev_data = {}; // gather the org/other ref and repo here
152 152 for(var i=0;i<select_refs.length;i++){
153 153 var select_ref = select_refs[i];
154 154 var select_ref_data = select_ref.value.split(':');
155 155 var key = null;
156 156 var val = null;
157 157
158 158 if(select_ref_data.length>1){
159 159 key = select_ref.name+"_type";
160 160 val = select_ref_data[0];
161 161 url = url.replace(key,val);
162 162 rev_data[key] = val;
163 163
164 164 key = select_ref.name;
165 165 val = select_ref_data[1];
166 166 url = url.replace(key,val);
167 167 rev_data[key] = val;
168 168
169 169 }else{
170 170 key = select_ref.name;
171 171 val = select_ref.value;
172 172 url = url.replace(key,val);
173 173 rev_data[key] = val;
174 174 }
175 175 }
176 176
177 177 YUE.on('other_repo', 'change', function(e){
178 var repo_name = e.currentTarget.value;
179 // replace the <select> of changed repo
180 YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs'];
178 var repo_name = e.currentTarget.value;
179 // replace the <select> of changed repo
180 YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs'];
181 181 });
182 182
183 183 ypjax(url,'pull_request_overview', function(data){
184 var sel_box = YUQ('#pull_request_form #other_repo')[0];
185 var repo_name = sel_box.options[sel_box.selectedIndex].value;
186 YUD.get('pull_request_overview_url').href = url;
187 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','');
188 YUD.get('other_repo_gravatar').src = other_repos_info[repo_name]['gravatar'];
189 YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description'];
190 YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs'];
191 // select back the revision that was just compared
192 setSelectValue(YUD.get('other_ref'), rev_data['other_ref']);
184 var sel_box = YUQ('#pull_request_form #other_repo')[0];
185 var repo_name = sel_box.options[sel_box.selectedIndex].value;
186 YUD.get('pull_request_overview_url').href = url;
187 YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','');
188 YUD.get('other_repo_gravatar').src = other_repos_info[repo_name]['gravatar'];
189 YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description'];
190 YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs'];
191 // select back the revision that was just compared
192 setSelectValue(YUD.get('other_ref'), rev_data['other_ref']);
193 193 })
194 194 }
195 195 YUE.on('refresh','click',function(e){
196 196 loadPreview()
197 197 })
198 198
199 199 //lazy load overview after 0.5s
200 200 setTimeout(loadPreview, 500)
201 201
202 202 </script>
203 203
204 204 </%def>
@@ -1,228 +1,228 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${c.repo_name} ${_('Pull request #%s') % c.pull_request.pull_request_id}
5 5 </%def>
6 6
7 7 <%def name="breadcrumbs_links()">
8 8 ${h.link_to(_(u'Home'),h.url('/'))}
9 9 &raquo;
10 10 ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))}
11 11 &raquo;
12 12 ${_('Pull request #%s') % c.pull_request.pull_request_id}
13 13 </%def>
14 14
15 15 <%def name="main()">
16 16
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>${_('Title')}: ${c.pull_request.title}</h3>
26 26
27 27 <div class="form">
28 28 <div id="summary" class="fields">
29 29 <div class="field">
30 30 <div class="label-summary">
31 31 <label>${_('Status')}:</label>
32 32 </div>
33 33 <div class="input">
34 34 <div class="changeset-status-container" style="float:none;clear:both">
35 35 %if c.current_changeset_status:
36 36 <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div>
37 37 <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div>
38 38 %endif
39 39 </div>
40 40 </div>
41 41 </div>
42 42 <div class="field">
43 43 <div class="label-summary">
44 44 <label>${_('Still not reviewed by')}:</label>
45 45 </div>
46 46 <div class="input">
47 47 % if len(c.pull_request_pending_reviewers) > 0:
48 48 <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>
49 49 %else:
50 50 <div>${_('pull request was reviewed by all reviewers')}</div>
51 51 %endif
52 52 </div>
53 53 </div>
54 54 <div class="field">
55 55 <div class="label-summary">
56 56 <label>${_('Origin repository')}:</label>
57 57 </div>
58 58 <div class="input">
59 59 <div>
60 60 ##%if h.is_hg(c.pull_request.org_repo):
61 61 ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
62 62 ##%elif h.is_git(c.pull_request.org_repo):
63 63 ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
64 64 ##%endif
65 65 <span class="spantag">${c.pull_request.org_ref_parts[0]}</span>
66 66 :
67 67 <span class="spantag">${c.pull_request.org_ref_parts[1]}</span>
68 68 <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>
69 69 </div>
70 70 </div>
71 71 </div>
72 72 </div>
73 73 </div>
74 74 <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div>
75 75 <div style="padding:4px 4px 10px 20px">
76 76 <div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div>
77 77 </div>
78 78
79 79 <div style="overflow: auto;">
80 80 ##DIFF
81 81 <div class="table" style="float:left;clear:none">
82 82 <div id="body" class="diffblock">
83 83 <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div>
84 84 </div>
85 85 <div id="changeset_compare_view_content">
86 86 ##CS
87 87 <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>
88 88 <%include file="/compare/compare_cs.html" />
89 89
90 90 ## FILES
91 91 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
92 92
93 93 % if c.limited_diff:
94 94 ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
95 95 % else:
96 96 ${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)}:
97 97 %endif
98 98
99 99 </div>
100 100 <div class="cs_files">
101 101 %if not c.files:
102 102 <span class="empty_data">${_('No files')}</span>
103 103 %endif
104 104 %for fid, change, f, stat in c.files:
105 105 <div class="cs_${change}">
106 106 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div>
107 107 <div class="changes">${h.fancy_file_stats(stat)}</div>
108 108 </div>
109 109 %endfor
110 110 </div>
111 111 % if c.limited_diff:
112 112 <h5>${_('Changeset was too big and was cut off...')}</h5>
113 113 % endif
114 114 </div>
115 115 </div>
116 116 ## REVIEWERS
117 117 <div style="float:left; border-left:1px dashed #eee">
118 118 <h4>${_('Pull request reviewers')}</h4>
119 119 <div id="reviewers" style="padding:0px 0px 5px 10px">
120 120 ## members goes here !
121 121 <div class="group_members_wrap" style="min-height:45px">
122 122 <ul id="review_members" class="group_members">
123 123 %for member,status in c.pull_request_reviewers:
124 124 <li id="reviewer_${member.user_id}">
125 125 <div class="reviewers_member">
126 126 <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'))}">
127 127 <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/>
128 128 </div>
129 129 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div>
130 130 <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div>
131 131 <input type="hidden" value="${member.user_id}" name="review_members" />
132 132 %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):
133 133 <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span>
134 134 %endif
135 135 </div>
136 136 </li>
137 137 %endfor
138 138 </ul>
139 139 </div>
140 140 %if not c.pull_request.is_closed():
141 141 <div class='ac'>
142 142 %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id:
143 143 <div class="reviewer_ac">
144 144 ${h.text('user', class_='yui-ac-input')}
145 145 <span class="help-block">${_('Add reviewer to this pull request.')}</span>
146 146 <div id="reviewers_container"></div>
147 147 </div>
148 148 <div style="padding:0px 10px">
149 149 <span id="update_pull_request" class="ui-btn xsmall">${_('save')}</span>
150 150 </div>
151 151 %endif
152 152 </div>
153 153 %endif
154 154 </div>
155 155 </div>
156 156 </div>
157 157 <script>
158 158 var _USERS_AC_DATA = ${c.users_array|n};
159 159 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
160 160 AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}";
161 161 AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
162 162 AJAX_UPDATE_PULLREQUEST = "${url('pullrequest_update',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"
163 163 </script>
164 164
165 165 ## diff block
166 166 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
167 167 %for fid, change, f, stat in c.files:
168 168 ${diff_block.diff_block_simple([c.changes[fid]])}
169 169 %endfor
170 170 % if c.limited_diff:
171 171 <h4>${_('Changeset was too big and was cut off...')}</h4>
172 172 % endif
173 173
174 174
175 175 ## template for inline comment form
176 176 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
177 177 ${comment.comment_inline_form()}
178 178
179 179 ## render comments and inlines
180 180 ${comment.generate_comments()}
181 181
182 182 % if not c.pull_request.is_closed():
183 183 ## main comment form and it status
184 184 ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name,
185 185 pull_request_id=c.pull_request.pull_request_id),
186 186 c.current_changeset_status,
187 187 close_btn=True, change_status=c.allowed_to_change_status)}
188 188 %endif
189 189
190 190 <script type="text/javascript">
191 191 YUE.onDOMReady(function(){
192 PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
192 PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
193 193
194 194 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
195 195 var show = 'none';
196 196 var target = e.currentTarget;
197 197 if(target.checked){
198 198 var show = ''
199 199 }
200 200 var boxid = YUD.getAttribute(target,'id_for');
201 201 var comments = YUQ('#{0} .inline-comments'.format(boxid));
202 202 for(c in comments){
203 203 YUD.setStyle(comments[c],'display',show);
204 204 }
205 205 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
206 206 for(c in btns){
207 207 YUD.setStyle(btns[c],'display',show);
208 208 }
209 209 })
210 210
211 211 YUE.on(YUQ('.line'),'click',function(e){
212 212 var tr = e.currentTarget;
213 213 injectInlineForm(tr);
214 214 });
215 215
216 216 // inject comments into they proper positions
217 217 var file_comments = YUQ('.inline-comment-placeholder');
218 218 renderInlineComments(file_comments);
219 219
220 220 YUE.on(YUD.get('update_pull_request'),'click',function(e){
221 updateReviewers();
221 updateReviewers();
222 222 })
223 223 })
224 224 </script>
225 225
226 226 </div>
227 227
228 228 </%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 5 ${_('Sign Up')} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8 <div id="register">
9 9
10 <div class="title top-left-rounded-corner top-right-rounded-corner">
11 <h5>${_('Sign Up to')} ${c.rhodecode_name}</h5>
12 </div>
13 <div class="inner">
14 ${h.form(url('register'))}
15 <div class="form">
16 <!-- fields -->
17 <div class="fields">
18 <div class="field">
19 <div class="label">
20 <label for="username">${_('Username')}:</label>
21 </div>
22 <div class="input">
23 ${h.text('username',class_="medium")}
24 </div>
25 </div>
10 <div class="title top-left-rounded-corner top-right-rounded-corner">
11 <h5>${_('Sign Up to')} ${c.rhodecode_name}</h5>
12 </div>
13 <div class="inner">
14 ${h.form(url('register'))}
15 <div class="form">
16 <!-- fields -->
17 <div class="fields">
18 <div class="field">
19 <div class="label">
20 <label for="username">${_('Username')}:</label>
21 </div>
22 <div class="input">
23 ${h.text('username',class_="medium")}
24 </div>
25 </div>
26 26
27 <div class="field">
28 <div class="label">
29 <label for="password">${_('Password')}:</label>
30 </div>
31 <div class="input">
32 ${h.password('password',class_="medium")}
33 </div>
34 </div>
27 <div class="field">
28 <div class="label">
29 <label for="password">${_('Password')}:</label>
30 </div>
31 <div class="input">
32 ${h.password('password',class_="medium")}
33 </div>
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 <div class="field">
46 <div class="label">
47 <label for="firstname">${_('First Name')}:</label>
48 </div>
49 <div class="input">
50 ${h.text('firstname',class_="medium")}
51 </div>
52 </div>
45 <div class="field">
46 <div class="label">
47 <label for="firstname">${_('First Name')}:</label>
48 </div>
49 <div class="input">
50 ${h.text('firstname',class_="medium")}
51 </div>
52 </div>
53 53
54 <div class="field">
55 <div class="label">
56 <label for="lastname">${_('Last Name')}:</label>
57 </div>
58 <div class="input">
59 ${h.text('lastname',class_="medium")}
60 </div>
61 </div>
54 <div class="field">
55 <div class="label">
56 <label for="lastname">${_('Last Name')}:</label>
57 </div>
58 <div class="input">
59 ${h.text('lastname',class_="medium")}
60 </div>
61 </div>
62 62
63 <div class="field">
64 <div class="label">
65 <label for="email">${_('Email')}:</label>
66 </div>
67 <div class="input">
68 ${h.text('email',class_="medium")}
69 </div>
70 </div>
63 <div class="field">
64 <div class="label">
65 <label for="email">${_('Email')}:</label>
66 </div>
67 <div class="input">
68 ${h.text('email',class_="medium")}
69 </div>
70 </div>
71 71
72 <div class="buttons">
73 <div class="nohighlight">
74 ${h.submit('sign_up',_('Sign Up'),class_="ui-btn large")}
75 %if c.auto_active:
76 <div class="activation_msg">${_('Your account will be activated right after registration')}</div>
77 %else:
78 <div class="activation_msg">${_('Your account must wait for activation by administrator')}</div>
79 %endif
80 </div>
81 </div>
82 </div>
83 </div>
84 ${h.end_form()}
72 <div class="buttons">
73 <div class="nohighlight">
74 ${h.submit('sign_up',_('Sign Up'),class_="ui-btn large")}
75 %if c.auto_active:
76 <div class="activation_msg">${_('Your account will be activated right after registration')}</div>
77 %else:
78 <div class="activation_msg">${_('Your account must wait for activation by administrator')}</div>
79 %endif
80 </div>
81 </div>
82 </div>
83 </div>
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 </div>
90 </div>
91 91 </div>
@@ -1,87 +1,87 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3 <%def name="title()">
4 4 %if c.cur_query:
5 %if c.repo_name:
6 ${_('Search "%s" in repository: %s') % (c.cur_query, c.repo_name)}
7 %else:
8 ${_('Search "%s" in all repositories') % c.cur_query}
9 %endif
5 %if c.repo_name:
6 ${_('Search "%s" in repository: %s') % (c.cur_query, c.repo_name)}
7 %else:
8 ${_('Search "%s" in all repositories') % c.cur_query}
9 %endif
10 10 %else:
11 %if c.repo_name:
12 ${_('Search in repository: %s') % c.repo_name}
13 %else:
14 ${_('Search in all repositories')}
15 %endif
11 %if c.repo_name:
12 ${_('Search in repository: %s') % c.repo_name}
13 %else:
14 ${_('Search in all repositories')}
15 %endif
16 16 %endif
17 - ${c.rhodecode_name}
17 - ${c.rhodecode_name}
18 18 </%def>
19 19 <%def name="breadcrumbs()">
20 ${c.rhodecode_name}
20 ${c.rhodecode_name}
21 21 </%def>
22 22 <%def name="page_nav()">
23 ${self.menu('home')}
23 ${self.menu('home')}
24 24 </%def>
25 25 <%def name="main()">
26 26
27 27 <div class="box">
28 <!-- box / title -->
29 <div class="title">
30 <h5>
31 %if c.repo_name:
32 ${_('Search in repository: %s') % c.repo_name}
33 %else:
34 ${_('Search in all repositories')}
35 %endif
36 </h5>
37 </div>
38 <!-- end box / title -->
39 %if c.repo_name:
40 ${h.form(h.url('search_repo',search_repo=c.repo_name),method='get')}
41 %else:
42 ${h.form(h.url('search'),method='get')}
43 %endif
44 <div class="form">
45 <div class="fields">
46 <div class="field field-first field-noborder">
28 <!-- box / title -->
29 <div class="title">
30 <h5>
31 %if c.repo_name:
32 ${_('Search in repository: %s') % c.repo_name}
33 %else:
34 ${_('Search in all repositories')}
35 %endif
36 </h5>
37 </div>
38 <!-- end box / title -->
39 %if c.repo_name:
40 ${h.form(h.url('search_repo',search_repo=c.repo_name),method='get')}
41 %else:
42 ${h.form(h.url('search'),method='get')}
43 %endif
44 <div class="form">
45 <div class="fields">
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 <div class="input">${h.text('q',c.cur_query,class_="small")}
51 <div class="button highlight">
52 <input type="submit" value="${_('Search')}" class="ui-button"/>
53 </div>
54 </div>
55 <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div>
56 </div>
50 <div class="input">${h.text('q',c.cur_query,class_="small")}
51 <div class="button highlight">
52 <input type="submit" value="${_('Search')}" class="ui-button"/>
53 </div>
54 </div>
55 <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div>
56 </div>
57 57
58 <div class="field">
59 <div class="label">
60 <label for="type">${_('Search in')}</label>
61 </div>
58 <div class="field">
59 <div class="label">
60 <label for="type">${_('Search in')}</label>
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 </div>
72 </div>
73 ${h.end_form()}
71 </div>
72 </div>
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,26 +1,26 b''
1 1 ##path search
2 2
3 3 %for cnt,sr in enumerate(c.formated_results):
4 4 %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(sr['repository'],'search results check'):
5 <div class="search_path">
6 <div class="link">
7 ${h.link_to(h.literal('%s &raquo; %s' % (sr['repository'],sr['f_path'])),
8 h.url('files_home',repo_name=sr['repository'],revision='tip',f_path=sr['f_path']))}
9 </div>
10 </div>
5 <div class="search_path">
6 <div class="link">
7 ${h.link_to(h.literal('%s &raquo; %s' % (sr['repository'],sr['f_path'])),
8 h.url('files_home',repo_name=sr['repository'],revision='tip',f_path=sr['f_path']))}
9 </div>
10 </div>
11 11 %else:
12 12 %if cnt == 0:
13 <div class="error">
14 <div class="link">
15 ${_('Permission denied')}
16 </div>
17 </div>
13 <div class="error">
14 <div class="link">
15 ${_('Permission denied')}
16 </div>
17 </div>
18 18 %endif
19 19
20 20 %endif
21 21 %endfor
22 22 %if c.cur_query and c.formated_results:
23 23 <div class="pagination-wh pagination-left">
24 24 ${c.formated_results.pager('$link_previous ~2~ $link_next')}
25 25 </div>
26 26 %endif
@@ -1,130 +1,130 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 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 &raquo;
11 11 ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))}
12 12 &raquo;
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 <div class="field">
38 <div class="label">
39 <label for="clone_uri">${_('Clone uri')}:</label>
40 </div>
41 <div class="input">
42 ${h.text('clone_uri',class_="medium")}
37 <div class="field">
38 <div class="label">
39 <label for="clone_uri">${_('Clone uri')}:</label>
40 </div>
41 <div class="input">
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 </div>
45 </div>
44 </div>
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
84 84 <div class="field">
85 85 <div class="label">
86 86 <label for="">${_('Permissions')}:</label>
87 87 </div>
88 88 <div class="input">
89 89 <%include file="../admin/repos/repo_edit_perms.html"/>
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 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
96 96 </div>
97 97
98 98 </div>
99 99 ${h.end_form()}
100 100 </div>
101 101
102 102 <h3>${_('Delete repository')}</h3>
103 103 <div class="form">
104 104 <!-- fields -->
105 105 <div class="fields">
106 106
107 107 <div class="field">
108 108 <div class="label">
109 109 <label for="">${_('Remove repo')}:</label>
110 110 </div>
111 111 <div class="checkboxes">
112 112 ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')}
113 113 <div class="">
114 114 <div class="fields">
115 115 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
116 116 </div>
117 117 <div class="field" style="border:none;color:#888">
118 118 <ul>
119 119 <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>
120 120 </ul>
121 121 </div>
122 122 </div>
123 123 ${h.end_form()}
124 124 </div>
125 125 </div>
126 126 </div>
127 127 </div>
128 128
129 129 </div>
130 130 </%def>
@@ -1,39 +1,39 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('%s Shortlog') % c.repo_name} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8
9 9 <%def name="breadcrumbs_links()">
10 10 ${h.link_to(_(u'Home'),h.url('/'))}
11 11 &raquo;
12 12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
13 13 &raquo;
14 14 %if c.file_history:
15 15 ${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}
16 16 &raquo;
17 17 ${c.file_history}
18 18 %else:
19 19 ${_('shortlog')}
20 20 %endif
21 21 </%def>
22 22
23 23 <%def name="page_nav()">
24 24 ${self.menu('shortlog')}
25 25 </%def>
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 <!-- end box / title -->
33 33 <div class="table">
34 <div id="shortlog_data">
35 ${c.shortlog_data}
36 </div>
34 <div id="shortlog_data">
35 ${c.shortlog_data}
36 </div>
37 37 </div>
38 38 </div>
39 39 </%def>
@@ -1,101 +1,101 b''
1 1 ## -*- coding: utf-8 -*-
2 2 %if c.repo_changesets:
3 3 <table class="table_disp">
4 <tr>
5 <th class="left">${_('revision')}</th>
4 <tr>
5 <th class="left">${_('revision')}</th>
6 6 <th class="left">${_('commit message')}</th>
7 <th class="left">${_('age')}</th>
8 <th class="left">${_('author')}</th>
9 <th class="left">${_('branch')}</th>
10 <th class="left">${_('tags')}</th>
11 </tr>
7 <th class="left">${_('age')}</th>
8 <th class="left">${_('author')}</th>
9 <th class="left">${_('branch')}</th>
10 <th class="left">${_('tags')}</th>
11 </tr>
12 12 %for cnt,cs in enumerate(c.repo_changesets):
13 <tr class="parity${cnt%2}">
13 <tr class="parity${cnt%2}">
14 14 <td>
15 15 <div>
16 16 <div class="changeset-status-container">
17 17 %if c.statuses.get(cs.raw_id):
18 18 <div class="changeset-status-ico">
19 19 %if c.statuses.get(cs.raw_id)[2]:
20 20 <a class="tooltip" title="${_('Click to open associated pull request')}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}">
21 21 <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" />
22 22 </a>
23 23 %else:
24 24 <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" />
25 25 %endif
26 26 </div>
27 27 %endif
28 28 </div>
29 29 <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}">r${cs.revision}:${h.short_id(cs.raw_id)}</a></pre>
30 30 </div>
31 31 </td>
32 32 <td>
33 33 ${h.urlify_commit(h.truncate(cs.message,50),c.repo_name, h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
34 34 </td>
35 35 <td><span class="tooltip" title="${h.tooltip(h.fmt_date(cs.date))}">
36 36 ${h.age(cs.date)}</span>
37 37 </td>
38 <td title="${cs.author}">${h.person(cs.author)}</td>
39 <td>
40 <span class="logtags">
38 <td title="${cs.author}">${h.person(cs.author)}</td>
39 <td>
40 <span class="logtags">
41 41 %if cs.branch:
42 <span class="branchtag">
42 <span class="branchtag">
43 43 ${cs.branch}
44 44 </span>
45 45 %endif
46 </span>
47 </td>
48 <td>
49 <span class="logtags">
50 %for tag in cs.tags:
51 <span class="tagtag">${tag}</span>
52 %endfor
53 </span>
54 </td>
55 </tr>
46 </span>
47 </td>
48 <td>
49 <span class="logtags">
50 %for tag in cs.tags:
51 <span class="tagtag">${tag}</span>
52 %endfor
53 </span>
54 </td>
55 </tr>
56 56 %endfor
57 57
58 58 </table>
59 59
60 60 <script type="text/javascript">
61 61 YUE.onDOMReady(function(){
62 62 YUE.delegate("shortlog_data","click",function(e, matchedEl, container){
63 63 ypjax(e.target.href,"shortlog_data",function(){tooltip_activate();});
64 64 YUE.preventDefault(e);
65 65 },'.pager_link');
66 66 });
67 67 </script>
68 68
69 69 <div class="pagination-wh pagination-left">
70 70 ${c.repo_changesets.pager('$link_previous ~2~ $link_next')}
71 71 </div>
72 72 %else:
73 73
74 74 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
75 75 <h4>${_('Add or upload files directly via RhodeCode')}</h4>
76 76 <div style="margin: 20px 30px;">
77 77 <div id="add_node_id" class="add_node">
78 78 <a class="ui-btn" href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='')}">${_('add new file')}</a>
79 79 </div>
80 80 </div>
81 81 %endif
82 82
83 83
84 84 <h4>${_('Push new repo')}</h4>
85 85 <pre>
86 86 ${c.rhodecode_repo.alias} clone ${c.clone_repo_url}
87 87 ${c.rhodecode_repo.alias} add README # add first file
88 88 ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message
89 89 ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back
90 90 </pre>
91 91
92 92 <h4>${_('Existing repository?')}</h4>
93 93 <pre>
94 94 %if h.is_git(c.rhodecode_repo):
95 95 git remote add origin ${c.clone_repo_url}
96 96 git push -u origin master
97 97 %else:
98 98 hg push ${c.clone_repo_url}
99 99 %endif
100 100 </pre>
101 101 %endif
@@ -1,721 +1,721 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${_('%s Summary') % 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 &raquo;
10 10 ${h.repo_link(c.dbrepo.groups_and_repo)}
11 11 &raquo;
12 12 ${_('summary')}
13 13 </%def>
14 14
15 15 <%def name="page_nav()">
16 ${self.menu('summary')}
16 ${self.menu('summary')}
17 17 </%def>
18 18
19 19 <%def name="head_extra()">
20 20 <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s ATOM feed') % c.repo_name}" type="application/atom+xml" />
21 21 <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s RSS feed') % c.repo_name}" type="application/rss+xml" />
22 22 </%def>
23 23
24 24 <%def name="main()">
25 25 <%
26 26 summary = lambda n:{False:'summary-short'}.get(n)
27 27 %>
28 28 %if c.show_stats:
29 29 <div class="box box-left">
30 30 %else:
31 31 <div class="box">
32 32 %endif
33 33 <!-- box / title -->
34 34 <div class="title">
35 35 ${self.breadcrumbs()}
36 36 </div>
37 37 <!-- end box / title -->
38 <div class="form">
39 <div id="summary" class="fields">
38 <div class="form">
39 <div id="summary" class="fields">
40 40
41 <div class="field">
42 <div class="label-summary">
43 <label>${_('Name')}:</label>
44 </div>
45 <div class="input ${summary(c.show_stats)}">
41 <div class="field">
42 <div class="label-summary">
43 <label>${_('Name')}:</label>
44 </div>
45 <div class="input ${summary(c.show_stats)}">
46 46 <div style="float:right;padding:5px 0px 0px 5px">
47 47 %if c.rhodecode_user.username != 'default':
48 48 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='rss_icon')}
49 49 ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='atom_icon')}
50 50 %else:
51 51 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name),class_='rss_icon')}
52 52 ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')}
53 53 %endif
54 54 </div>
55 55 %if c.rhodecode_user.username != 'default':
56 56 %if c.following:
57 57 <span id="follow_toggle" class="following tooltip" title="${_('Stop following this repository')}"
58 58 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
59 59 </span>
60 60 %else:
61 61 <span id="follow_toggle" class="follow tooltip" title="${_('Start following this repository')}"
62 62 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
63 63 </span>
64 64 %endif
65 65 %endif:
66 66
67 67 ## locking icon
68 68 %if c.rhodecode_db_repo.enable_locking:
69 69 %if c.rhodecode_db_repo.locked[0]:
70 70 <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span>
71 71 %else:
72 72 <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span>
73 73 %endif
74 74 %endif
75 75 ##REPO TYPE
76 %if h.is_hg(c.dbrepo):
77 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
78 %endif
79 %if h.is_git(c.dbrepo):
80 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
81 %endif
76 %if h.is_hg(c.dbrepo):
77 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
78 %endif
79 %if h.is_git(c.dbrepo):
80 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
81 %endif
82 82
83 83 ##PUBLIC/PRIVATE
84 %if c.dbrepo.private:
85 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
86 %else:
87 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
88 %endif
84 %if c.dbrepo.private:
85 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
86 %else:
87 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
88 %endif
89 89
90 ##REPO NAME
91 <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
90 ##REPO NAME
91 <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
92 92
93 93 ##FORK
94 %if c.dbrepo.fork:
95 <div style="margin-top:5px;clear:both"">
96 <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')}"/>
97 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
98 </a>
99 </div>
100 %endif
101 ##REMOTE
102 %if c.dbrepo.clone_uri:
94 %if c.dbrepo.fork:
95 <div style="margin-top:5px;clear:both"">
96 <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')}"/>
97 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
98 </a>
99 </div>
100 %endif
101 ##REMOTE
102 %if c.dbrepo.clone_uri:
103 103 <div style="margin-top:5px;clear:both">
104 104 <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')}"/>
105 105 ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}
106 106 </a>
107 107 </div>
108 %endif
109 </div>
110 </div>
108 %endif
109 </div>
110 </div>
111 111
112 <div class="field">
113 <div class="label-summary">
114 <label>${_('Description')}:</label>
115 </div>
112 <div class="field">
113 <div class="label-summary">
114 <label>${_('Description')}:</label>
115 </div>
116 116 %if c.visual.stylify_metatags:
117 117 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div>
118 118 %else:
119 119 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div>
120 120 %endif
121 </div>
121 </div>
122 122
123 <div class="field">
124 <div class="label-summary">
125 <label>${_('Contact')}:</label>
126 </div>
127 <div class="input ${summary(c.show_stats)}">
128 <div class="gravatar">
129 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
130 </div>
131 ${_('Username')}: ${c.dbrepo.user.username}<br/>
132 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
133 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
134 </div>
135 </div>
123 <div class="field">
124 <div class="label-summary">
125 <label>${_('Contact')}:</label>
126 </div>
127 <div class="input ${summary(c.show_stats)}">
128 <div class="gravatar">
129 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
130 </div>
131 ${_('Username')}: ${c.dbrepo.user.username}<br/>
132 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
133 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
134 </div>
135 </div>
136 136
137 <div class="field">
138 <div class="label-summary">
139 <label>${_('Clone url')}:</label>
140 </div>
141 <div class="input ${summary(c.show_stats)}">
137 <div class="field">
138 <div class="label-summary">
139 <label>${_('Clone url')}:</label>
140 </div>
141 <div class="input ${summary(c.show_stats)}">
142 142 <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div>
143 143 <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div>
144 <input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
144 <input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
145 145 <input style="display:none;width:80%;margin-left:105px" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
146 </div>
147 </div>
146 </div>
147 </div>
148 148
149 <div class="field">
150 <div class="label-summary">
151 <label>${_('Trending files')}:</label>
152 </div>
153 <div class="input ${summary(c.show_stats)}">
149 <div class="field">
150 <div class="label-summary">
151 <label>${_('Trending files')}:</label>
152 </div>
153 <div class="input ${summary(c.show_stats)}">
154 154 %if c.show_stats:
155 <div id="lang_stats"></div>
155 <div id="lang_stats"></div>
156 156 %else:
157 157 ${_('Statistics are disabled for this repository')}
158 158 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
159 159 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
160 160 %endif
161 161 %endif
162 </div>
163 </div>
162 </div>
163 </div>
164 164
165 <div class="field">
166 <div class="label-summary">
167 <label>${_('Download')}:</label>
168 </div>
169 <div class="input ${summary(c.show_stats)}">
170 %if len(c.rhodecode_repo.revisions) == 0:
171 ${_('There are no downloads yet')}
172 %elif c.enable_downloads is False:
173 ${_('Downloads are disabled for this repository')}
165 <div class="field">
166 <div class="label-summary">
167 <label>${_('Download')}:</label>
168 </div>
169 <div class="input ${summary(c.show_stats)}">
170 %if len(c.rhodecode_repo.revisions) == 0:
171 ${_('There are no downloads yet')}
172 %elif c.enable_downloads is False:
173 ${_('Downloads are disabled for this repository')}
174 174 %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'):
175 175 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
176 176 %endif
177 %else:
178 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
179 <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>
177 %else:
178 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
179 <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>
180 180 <span style="vertical-align: bottom">
181 181 <input id="archive_subrepos" type="checkbox" name="subrepos" />
182 182 <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label>
183 183 </span>
184 %endif
185 </div>
186 </div>
187 </div>
188 </div>
184 %endif
185 </div>
186 </div>
187 </div>
188 </div>
189 189 </div>
190 190
191 191 %if c.show_stats:
192 192 <div class="box box-right" style="min-height:455px">
193 193 <!-- box / title -->
194 194 <div class="title">
195 195 <h5>${_('Commit activity by day / author')}</h5>
196 196 </div>
197 197
198 198 <div class="graph">
199 199 <div style="padding:0 10px 10px 17px;">
200 200 %if c.no_data:
201 201 ${c.no_data_msg}
202 202 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
203 203 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
204 204 %endif
205 205 %else:
206 206 ${_('Stats gathered: ')} ${c.stats_percentage}%
207 207 %endif
208 208 </div>
209 209 <div id="commit_history" style="width:450px;height:300px;float:left"></div>
210 210 <div style="clear: both;height: 10px"></div>
211 211 <div id="overview" style="width:450px;height:100px;float:left"></div>
212 212
213 <div id="legend_data" style="clear:both;margin-top:10px;">
214 <div id="legend_container"></div>
215 <div id="legend_choices">
216 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
217 </div>
218 </div>
213 <div id="legend_data" style="clear:both;margin-top:10px;">
214 <div id="legend_container"></div>
215 <div id="legend_choices">
216 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
217 </div>
218 </div>
219 219 </div>
220 220 </div>
221 221 %endif
222 222
223 223 <div class="box">
224 224 <div class="title">
225 225 <div class="breadcrumbs">
226 226 %if c.repo_changesets:
227 227 ${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}
228 228 %else:
229 229 ${_('Quick start')}
230 230 %endif
231 231 </div>
232 232 </div>
233 233 <div class="table">
234 234 <div id="shortlog_data">
235 235 <%include file='../shortlog/shortlog_data.html'/>
236 236 </div>
237 237 </div>
238 238 </div>
239 239
240 240 %if c.readme_data:
241 241 <div id="readme" class="anchor">
242 242 <div class="box" style="background-color: #FAFAFA">
243 243 <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}">
244 244 <div class="breadcrumbs">
245 245 <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a>
246 246 <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">&para;</a>
247 247 </div>
248 248 </div>
249 249 <div class="readme">
250 250 <div class="readme_box">
251 251 ${c.readme_data|n}
252 252 </div>
253 253 </div>
254 254 </div>
255 255 </div>
256 256 %endif
257 257
258 258 <script type="text/javascript">
259 259 var clone_url = 'clone_url';
260 260 YUE.on(clone_url,'click',function(e){
261 261 if(YUD.hasClass(clone_url,'selected')){
262 262 return
263 263 }
264 264 else{
265 265 YUD.addClass(clone_url,'selected');
266 266 YUD.get(clone_url).select();
267 267 }
268 268 })
269 269
270 270 YUE.on('clone_by_name','click',function(e){
271 271 // show url by name and hide name button
272 272 YUD.setStyle('clone_url','display','');
273 273 YUD.setStyle('clone_by_name','display','none');
274 274
275 275 // hide url by id and show name button
276 276 YUD.setStyle('clone_by_id','display','');
277 277 YUD.setStyle('clone_url_id','display','none');
278 278
279 279 })
280 280 YUE.on('clone_by_id','click',function(e){
281 281
282 // show url by id and hide id button
283 YUD.setStyle('clone_by_id','display','none');
282 // show url by id and hide id button
283 YUD.setStyle('clone_by_id','display','none');
284 284 YUD.setStyle('clone_url_id','display','');
285 285
286 286 // hide url by name and show id button
287 YUD.setStyle('clone_by_name','display','');
288 YUD.setStyle('clone_url','display','none');
287 YUD.setStyle('clone_by_name','display','');
288 YUD.setStyle('clone_url','display','none');
289 289 })
290 290
291 291
292 292 var tmpl_links = {};
293 293 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
294 294 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')}';
295 295 %endfor
296 296
297 297 YUE.on(['download_options','archive_subrepos'],'change',function(e){
298 298 var sm = YUD.get('download_options');
299 299 var new_cs = sm.options[sm.selectedIndex];
300 300
301 301 for(k in tmpl_links){
302 302 var s = YUD.get(k+'_link');
303 303 if(s){
304 304 var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
305 305 title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text);
306 306 title_tmpl = title_tmpl.replace('__CS_EXT__',k);
307 307
308 308 var url = tmpl_links[k].replace('__CS__',new_cs.value);
309 309 var subrepos = YUD.get('archive_subrepos').checked;
310 310 url = url.replace('__SUB__',subrepos);
311 311 url = url.replace('__NAME__',title_tmpl);
312 312 s.innerHTML = url
313 313 }
314 314 }
315 315 });
316 316 </script>
317 317 %if c.show_stats:
318 318 <script type="text/javascript">
319 319 var data = ${c.trending_languages|n};
320 320 var total = 0;
321 321 var no_data = true;
322 322 var tbl = document.createElement('table');
323 323 tbl.setAttribute('class','trending_language_tbl');
324 324 var cnt = 0;
325 325 for (var i=0;i<data.length;i++){
326 total+= data[i][1].count;
326 total+= data[i][1].count;
327 327 }
328 328 for (var i=0;i<data.length;i++){
329 329 cnt += 1;
330 330 no_data = false;
331 331
332 332 var hide = cnt>2;
333 333 var tr = document.createElement('tr');
334 334 if (hide){
335 335 tr.setAttribute('style','display:none');
336 336 tr.setAttribute('class','stats_hidden');
337 337 }
338 338 var k = data[i][0];
339 339 var obj = data[i][1];
340 340 var percentage = Math.round((obj.count/total*100),2);
341 341
342 342 var td1 = document.createElement('td');
343 343 td1.width = 150;
344 344 var trending_language_label = document.createElement('div');
345 345 trending_language_label.innerHTML = obj.desc+" ("+k+")";
346 346 td1.appendChild(trending_language_label);
347 347
348 348 var td2 = document.createElement('td');
349 349 td2.setAttribute('style','padding-right:14px !important');
350 350 var trending_language = document.createElement('div');
351 351 var nr_files = obj.count+" ${_('files')}";
352 352
353 353 trending_language.title = k+" "+nr_files;
354 354
355 355 if (percentage>22){
356 356 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
357 357 }
358 358 else{
359 359 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
360 360 }
361 361
362 362 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
363 363 trending_language.style.width=percentage+"%";
364 364 td2.appendChild(trending_language);
365 365
366 366 tr.appendChild(td1);
367 367 tr.appendChild(td2);
368 368 tbl.appendChild(tr);
369 369 if(cnt == 3){
370 370 var show_more = document.createElement('tr');
371 371 var td = document.createElement('td');
372 372 lnk = document.createElement('a');
373 373
374 374 lnk.href='#';
375 375 lnk.innerHTML = "${_('show more')}";
376 376 lnk.id='code_stats_show_more';
377 377 td.appendChild(lnk);
378 378
379 379 show_more.appendChild(td);
380 380 show_more.appendChild(document.createElement('td'));
381 381 tbl.appendChild(show_more);
382 382 }
383 383
384 384 }
385 385
386 386 YUD.get('lang_stats').appendChild(tbl);
387 387 YUE.on('code_stats_show_more','click',function(){
388 388 l = YUD.getElementsByClassName('stats_hidden')
389 389 for (e in l){
390 390 YUD.setStyle(l[e],'display','');
391 391 };
392 392 YUD.setStyle(YUD.get('code_stats_show_more'),
393 393 'display','none');
394 394 });
395 395 </script>
396 396 <script type="text/javascript">
397 397 /**
398 398 * Plots summary graph
399 399 *
400 400 * @class SummaryPlot
401 401 * @param {from} initial from for detailed graph
402 402 * @param {to} initial to for detailed graph
403 403 * @param {dataset}
404 404 * @param {overview_dataset}
405 405 */
406 406 function SummaryPlot(from,to,dataset,overview_dataset) {
407 407 var initial_ranges = {
408 408 "xaxis":{
409 409 "from":from,
410 410 "to":to,
411 411 },
412 412 };
413 413 var dataset = dataset;
414 414 var overview_dataset = [overview_dataset];
415 415 var choiceContainer = YUD.get("legend_choices");
416 416 var choiceContainerTable = YUD.get("legend_choices_tables");
417 417 var plotContainer = YUD.get('commit_history');
418 418 var overviewContainer = YUD.get('overview');
419 419
420 420 var plot_options = {
421 421 bars: {show:true,align:'center',lineWidth:4},
422 422 legend: {show:true, container:"legend_container"},
423 423 points: {show:true,radius:0,fill:false},
424 424 yaxis: {tickDecimals:0,},
425 425 xaxis: {
426 426 mode: "time",
427 427 timeformat: "%d/%m",
428 428 min:from,
429 429 max:to,
430 430 },
431 431 grid: {
432 432 hoverable: true,
433 433 clickable: true,
434 434 autoHighlight:true,
435 435 color: "#999"
436 436 },
437 437 //selection: {mode: "x"}
438 438 };
439 439 var overview_options = {
440 440 legend:{show:false},
441 441 bars: {show:true,barWidth: 2,},
442 442 shadowSize: 0,
443 443 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
444 444 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
445 445 grid: {color: "#999",},
446 446 selection: {mode: "x"}
447 447 };
448 448
449 449 /**
450 450 *get dummy data needed in few places
451 451 */
452 452 function getDummyData(label){
453 453 return {"label":label,
454 454 "data":[{"time":0,
455 455 "commits":0,
456 456 "added":0,
457 457 "changed":0,
458 458 "removed":0,
459 459 }],
460 460 "schema":["commits"],
461 461 "color":'#ffffff',
462 462 }
463 463 }
464 464
465 465 /**
466 466 * generate checkboxes accordindly to data
467 467 * @param keys
468 468 * @returns
469 469 */
470 470 function generateCheckboxes(data) {
471 471 //append checkboxes
472 472 var i = 0;
473 473 choiceContainerTable.innerHTML = '';
474 474 for(var pos in data) {
475 475
476 476 data[pos].color = i;
477 477 i++;
478 478 if(data[pos].label != ''){
479 479 choiceContainerTable.innerHTML +=
480 480 '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \
481 481 <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label);
482 482 }
483 483 }
484 484 }
485 485
486 486 /**
487 487 * ToolTip show
488 488 */
489 489 function showTooltip(x, y, contents) {
490 490 var div=document.getElementById('tooltip');
491 491 if(!div) {
492 492 div = document.createElement('div');
493 493 div.id="tooltip";
494 494 div.style.position="absolute";
495 495 div.style.border='1px solid #fdd';
496 496 div.style.padding='2px';
497 497 div.style.backgroundColor='#fee';
498 498 document.body.appendChild(div);
499 499 }
500 500 YUD.setStyle(div, 'opacity', 0);
501 501 div.innerHTML = contents;
502 502 div.style.top=(y + 5) + "px";
503 503 div.style.left=(x + 5) + "px";
504 504
505 505 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
506 506 anim.animate();
507 507 }
508 508
509 509 /**
510 510 * This function will detect if selected period has some changesets
511 511 for this user if it does this data is then pushed for displaying
512 512 Additionally it will only display users that are selected by the checkbox
513 513 */
514 514 function getDataAccordingToRanges(ranges) {
515 515
516 516 var data = [];
517 517 var new_dataset = {};
518 518 var keys = [];
519 519 var max_commits = 0;
520 520 for(var key in dataset){
521 521
522 522 for(var ds in dataset[key].data){
523 523 commit_data = dataset[key].data[ds];
524 524 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
525 525
526 526 if(new_dataset[key] === undefined){
527 527 new_dataset[key] = {data:[],schema:["commits"],label:key};
528 528 }
529 529 new_dataset[key].data.push(commit_data);
530 530 }
531 531 }
532 532 if (new_dataset[key] !== undefined){
533 533 data.push(new_dataset[key]);
534 534 }
535 535 }
536 536
537 537 if (data.length > 0){
538 538 return data;
539 539 }
540 540 else{
541 541 //just return dummy data for graph to plot itself
542 542 return [getDummyData('')];
543 543 }
544 544 }
545 545
546 546 /**
547 547 * redraw using new checkbox data
548 548 */
549 549 function plotchoiced(e,args){
550 550 var cur_data = args[0];
551 551 var cur_ranges = args[1];
552 552
553 553 var new_data = [];
554 554 var inputs = choiceContainer.getElementsByTagName("input");
555 555
556 556 //show only checked labels
557 557 for(var i=0; i<inputs.length; i++) {
558 558 var checkbox_key = inputs[i].name;
559 559
560 560 if(inputs[i].checked){
561 561 for(var d in cur_data){
562 562 if(cur_data[d].label == checkbox_key){
563 563 new_data.push(cur_data[d]);
564 564 }
565 565 }
566 566 }
567 567 else{
568 568 //push dummy data to not hide the label
569 569 new_data.push(getDummyData(checkbox_key));
570 570 }
571 571 }
572 572
573 573 var new_options = YAHOO.lang.merge(plot_options, {
574 574 xaxis: {
575 575 min: cur_ranges.xaxis.from,
576 576 max: cur_ranges.xaxis.to,
577 577 mode:"time",
578 578 timeformat: "%d/%m",
579 579 },
580 580 });
581 581 if (!new_data){
582 582 new_data = [[0,1]];
583 583 }
584 584 // do the zooming
585 585 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
586 586
587 587 plot.subscribe("plotselected", plotselected);
588 588
589 589 //resubscribe plothover
590 590 plot.subscribe("plothover", plothover);
591 591
592 592 // don't fire event on the overview to prevent eternal loop
593 593 overview.setSelection(cur_ranges, true);
594 594
595 595 }
596 596
597 597 /**
598 598 * plot only selected items from overview
599 599 * @param ranges
600 600 * @returns
601 601 */
602 602 function plotselected(ranges,cur_data) {
603 603 //updates the data for new plot
604 604 var data = getDataAccordingToRanges(ranges);
605 605 generateCheckboxes(data);
606 606
607 607 var new_options = YAHOO.lang.merge(plot_options, {
608 608 xaxis: {
609 609 min: ranges.xaxis.from,
610 610 max: ranges.xaxis.to,
611 611 mode:"time",
612 612 timeformat: "%d/%m",
613 613 },
614 614 });
615 615 // do the zooming
616 616 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
617 617
618 618 plot.subscribe("plotselected", plotselected);
619 619
620 620 //resubscribe plothover
621 621 plot.subscribe("plothover", plothover);
622 622
623 623 // don't fire event on the overview to prevent eternal loop
624 624 overview.setSelection(ranges, true);
625 625
626 626 //resubscribe choiced
627 627 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
628 628 }
629 629
630 630 var previousPoint = null;
631 631
632 632 function plothover(o) {
633 633 var pos = o.pos;
634 634 var item = o.item;
635 635
636 636 //YUD.get("x").innerHTML = pos.x.toFixed(2);
637 637 //YUD.get("y").innerHTML = pos.y.toFixed(2);
638 638 if (item) {
639 639 if (previousPoint != item.datapoint) {
640 640 previousPoint = item.datapoint;
641 641
642 642 var tooltip = YUD.get("tooltip");
643 643 if(tooltip) {
644 644 tooltip.parentNode.removeChild(tooltip);
645 645 }
646 646 var x = item.datapoint.x.toFixed(2);
647 647 var y = item.datapoint.y.toFixed(2);
648 648
649 649 if (!item.series.label){
650 650 item.series.label = 'commits';
651 651 }
652 652 var d = new Date(x*1000);
653 653 var fd = d.toDateString()
654 654 var nr_commits = parseInt(y);
655 655
656 656 var cur_data = dataset[item.series.label].data[item.dataIndex];
657 657 var added = cur_data.added;
658 658 var changed = cur_data.changed;
659 659 var removed = cur_data.removed;
660 660
661 661 var nr_commits_suffix = " ${_('commits')} ";
662 662 var added_suffix = " ${_('files added')} ";
663 663 var changed_suffix = " ${_('files changed')} ";
664 664 var removed_suffix = " ${_('files removed')} ";
665 665
666 666
667 667 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
668 668 if(added==1){added_suffix=" ${_('file added')} ";}
669 669 if(changed==1){changed_suffix=" ${_('file changed')} ";}
670 670 if(removed==1){removed_suffix=" ${_('file removed')} ";}
671 671
672 672 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
673 673 +'<br/>'+
674 674 nr_commits + nr_commits_suffix+'<br/>'+
675 675 added + added_suffix +'<br/>'+
676 676 changed + changed_suffix + '<br/>'+
677 677 removed + removed_suffix + '<br/>');
678 678 }
679 679 }
680 680 else {
681 681 var tooltip = YUD.get("tooltip");
682 682
683 683 if(tooltip) {
684 684 tooltip.parentNode.removeChild(tooltip);
685 685 }
686 686 previousPoint = null;
687 687 }
688 688 }
689 689
690 690 /**
691 691 * MAIN EXECUTION
692 692 */
693 693
694 694 var data = getDataAccordingToRanges(initial_ranges);
695 695 generateCheckboxes(data);
696 696
697 697 //main plot
698 698 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
699 699
700 700 //overview
701 701 var overview = YAHOO.widget.Flot(overviewContainer,
702 702 overview_dataset, overview_options);
703 703
704 704 //show initial selection on overview
705 705 overview.setSelection(initial_ranges);
706 706
707 707 plot.subscribe("plotselected", plotselected);
708 708 plot.subscribe("plothover", plothover)
709 709
710 710 overview.subscribe("plotselected", function (ranges) {
711 711 plot.setSelection(ranges);
712 712 });
713 713
714 714 // user choices on overview
715 715 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
716 716 }
717 717 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
718 718 </script>
719 719 %endif
720 720
721 721 </%def>
@@ -1,39 +1,39 b''
1 1 %if c.repo_tags:
2 2 <div id="table_wrap" class="yui-skin-sam">
3 3 <table id="tags_data">
4 4 <thead>
5 <tr>
5 <tr>
6 6 <th class="left">${_('Name')}</th>
7 7 <th class="left">${_('Date')}</th>
8 8 <th class="left">${_('Author')}</th>
9 9 <th class="left">${_('Revision')}</th>
10 10 <th class="left">${_('Compare')}</th>
11 </tr>
11 </tr>
12 12 </thead>
13 %for cnt,tag in enumerate(c.repo_tags.items()):
14 <tr class="parity${cnt%2}">
13 %for cnt,tag in enumerate(c.repo_tags.items()):
14 <tr class="parity${cnt%2}">
15 15 <td>
16 16 <span class="logtags">
17 17 <span class="tagtag">${h.link_to(tag[0],
18 18 h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
19 19 </span>
20 20 </span>
21 21 </td>
22 22 <td><span class="tooltip" title="${h.tooltip(h.age(tag[1].date))}">${h.fmt_date(tag[1].date)}</span></td>
23 <td title="${tag[1].author}">${h.person(tag[1].author)}</td>
24 <td>
23 <td title="${tag[1].author}">${h.person(tag[1].author)}</td>
24 <td>
25 25 <div>
26 26 <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id)}">r${tag[1].revision}:${h.short_id(tag[1].raw_id)}</a></pre>
27 27 </div>
28 28 </td>
29 29 <td>
30 30 <input class="branch-compare" type="radio" name="compare_org" value="${tag[0]}"/>
31 31 <input class="branch-compare" type="radio" name="compare_other" value="${tag[0]}"/>
32 32 </td>
33 </tr>
34 %endfor
33 </tr>
34 %endfor
35 35 </table>
36 36 </div>
37 37 %else:
38 ${_('There are no tags yet')}
38 ${_('There are no tags yet')}
39 39 %endif
General Comments 0
You need to be logged in to leave comments. Login now