Show More
@@ -1,18 +1,18 b'' | |||||
1 | {% extends "basic/layout.html" %} |
|
1 | {% extends "basic/layout.html" %} | |
2 |
|
2 | |||
3 | {% block sidebarlogo %} |
|
3 | {% block sidebarlogo %} | |
4 | <h3>Support RhodeCode development.</h3> |
|
4 | <h3>Support RhodeCode development.</h3> | |
5 | <div style="text-align:center"> |
|
5 | <div style="text-align:center"> | |
6 |
|
|
6 | <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> | |
7 |
|
|
7 | <input type="hidden" name="cmd" value="_s-xclick"> | |
8 |
|
|
8 | <input type="hidden" name="hosted_button_id" value="8U2LLRPLBKWDU"> | |
9 |
|
|
9 | <input style="border:0px !important" type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" | |
10 |
|
|
10 | border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> | |
11 |
|
|
11 | <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> | |
12 |
|
|
12 | </form> | |
13 | <div style="padding:5px"> |
|
13 | <div style="padding:5px"> | |
14 | <a href="http://flattr.com/thing/167489/RhodeCode" target="_blank"> |
|
14 | <a href="http://flattr.com/thing/167489/RhodeCode" target="_blank"> | |
15 | <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a> |
|
15 | <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a> | |
16 | </div> |
|
16 | </div> | |
17 | </div> |
|
17 | </div> | |
18 | {% endblock %}} |
|
18 | {% endblock %}} |
@@ -1,55 +1,55 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Admin journal')} - ${c.rhodecode_name} |
|
5 | ${_('Admin journal')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | <form id="filter_form"> |
|
9 | <form id="filter_form"> | |
10 | <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('journal filter...')}"/> |
|
10 | <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('journal filter...')}"/> | |
11 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> |
|
11 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> | |
12 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> |
|
12 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> | |
13 | ${_('Admin journal')} - ${ungettext('%s entry', '%s entries', c.users_log.item_count) % (c.users_log.item_count)} |
|
13 | ${_('Admin journal')} - ${ungettext('%s entry', '%s entries', c.users_log.item_count) % (c.users_log.item_count)} | |
14 | </form> |
|
14 | </form> | |
15 | ${h.end_form()} |
|
15 | ${h.end_form()} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 |
|
|
19 | ${self.menu('admin')} | |
20 | </%def> |
|
20 | </%def> | |
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <div class="box"> |
|
22 | <div class="box"> | |
23 |
|
|
23 | <!-- box / title --> | |
24 |
|
|
24 | <div class="title"> | |
25 |
|
|
25 | ${self.breadcrumbs()} | |
26 |
|
|
26 | </div> | |
27 |
|
|
27 | <!-- end box / title --> | |
28 |
|
|
28 | <div class="table"> | |
29 |
|
|
29 | <div id="user_log"> | |
30 |
|
|
30 | ${c.log_data} | |
31 |
|
|
31 | </div> | |
32 |
|
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 |
|
34 | |||
35 | <script> |
|
35 | <script> | |
36 | YUE.on('j_filter','click',function(){ |
|
36 | YUE.on('j_filter','click',function(){ | |
37 |
|
|
37 | var jfilter = YUD.get('j_filter'); | |
38 |
|
|
38 | if(YUD.hasClass(jfilter, 'initial')){ | |
39 |
|
|
39 | jfilter.value = ''; | |
40 | } |
|
40 | } | |
41 | }); |
|
41 | }); | |
42 | var fix_j_filter_width = function(len){ |
|
42 | var fix_j_filter_width = function(len){ | |
43 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); |
|
43 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); | |
44 | } |
|
44 | } | |
45 | YUE.on('j_filter','keyup',function(){ |
|
45 | YUE.on('j_filter','keyup',function(){ | |
46 |
|
|
46 | fix_j_filter_width(YUD.get('j_filter').value.length); | |
47 | }); |
|
47 | }); | |
48 | YUE.on('filter_form','submit',function(e){ |
|
48 | YUE.on('filter_form','submit',function(e){ | |
49 |
|
|
49 | YUE.preventDefault(e) | |
50 | var val = YUD.get('j_filter').value; |
|
50 | var val = YUD.get('j_filter').value; | |
51 |
|
|
51 | window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val); | |
52 | }); |
|
52 | }); | |
53 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
53 | fix_j_filter_width(YUD.get('j_filter').value.length); | |
54 | </script> |
|
54 | </script> | |
55 | </%def> |
|
55 | </%def> |
@@ -1,64 +1,64 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | %if c.users_log: |
|
2 | %if c.users_log: | |
3 | <table> |
|
3 | <table> | |
4 |
|
|
4 | <tr> | |
5 |
|
|
5 | <th class="left">${_('Username')}</th> | |
6 |
|
|
6 | <th class="left">${_('Action')}</th> | |
7 |
|
|
7 | <th class="left">${_('Repository')}</th> | |
8 |
|
|
8 | <th class="left">${_('Date')}</th> | |
9 |
|
|
9 | <th class="left">${_('From IP')}</th> | |
10 |
|
|
10 | </tr> | |
11 |
|
11 | |||
12 |
|
|
12 | %for cnt,l in enumerate(c.users_log): | |
13 |
|
|
13 | <tr class="parity${cnt%2}"> | |
14 | <td> |
|
14 | <td> | |
15 | %if l.user is not None: |
|
15 | %if l.user is not None: | |
16 | ${h.link_to(l.user.username,h.url('edit_user', id=l.user.user_id))} |
|
16 | ${h.link_to(l.user.username,h.url('edit_user', id=l.user.user_id))} | |
17 | %else: |
|
17 | %else: | |
18 | ${l.username} |
|
18 | ${l.username} | |
19 | %endif |
|
19 | %endif | |
20 | </td> |
|
20 | </td> | |
21 |
|
|
21 | <td>${h.action_parser(l)[0]()} | |
22 |
|
|
22 | <div class="journal_action_params"> | |
23 | ${h.literal(h.action_parser(l)[1]())} |
|
23 | ${h.literal(h.action_parser(l)[1]())} | |
24 | </div> |
|
24 | </div> | |
25 | </td> |
|
25 | </td> | |
26 | <td> |
|
26 | <td> | |
27 |
|
|
27 | %if l.repository is not None: | |
28 |
|
|
28 | ${h.link_to(l.repository.repo_name,h.url('summary_home',repo_name=l.repository.repo_name))} | |
29 | %else: |
|
29 | %else: | |
30 |
|
|
30 | ${l.repository_name} | |
31 | %endif |
|
31 | %endif | |
32 | </td> |
|
32 | </td> | |
33 |
|
33 | |||
34 |
|
|
34 | <td>${h.fmt_date(l.action_date)}</td> | |
35 |
|
|
35 | <td>${l.user_ip}</td> | |
36 |
|
|
36 | </tr> | |
37 |
|
|
37 | %endfor | |
38 | </table> |
|
38 | </table> | |
39 |
|
39 | |||
40 | <script type="text/javascript"> |
|
40 | <script type="text/javascript"> | |
41 | YUE.onDOMReady(function(){ |
|
41 | YUE.onDOMReady(function(){ | |
42 | YUE.delegate("user_log","click",function(e, matchedEl, container){ |
|
42 | YUE.delegate("user_log","click",function(e, matchedEl, container){ | |
43 | ypjax(e.target.href,"user_log",function(){ |
|
43 | ypjax(e.target.href,"user_log",function(){ | |
44 | show_more_event(); |
|
44 | show_more_event(); | |
45 | tooltip_activate(); |
|
45 | tooltip_activate(); | |
46 | show_changeset_tooltip(); |
|
46 | show_changeset_tooltip(); | |
47 | }); |
|
47 | }); | |
48 | YUE.preventDefault(e); |
|
48 | YUE.preventDefault(e); | |
49 | },'.pager_link'); |
|
49 | },'.pager_link'); | |
50 |
|
50 | |||
51 | YUE.delegate("user_log","click",function(e,matchedEl,container){ |
|
51 | YUE.delegate("user_log","click",function(e,matchedEl,container){ | |
52 | var el = e.target; |
|
52 | var el = e.target; | |
53 | YUD.setStyle(YUD.get(el.id.substring(1)),'display',''); |
|
53 | YUD.setStyle(YUD.get(el.id.substring(1)),'display',''); | |
54 | YUD.setStyle(el.parentNode,'display','none'); |
|
54 | YUD.setStyle(el.parentNode,'display','none'); | |
55 | },'.show_more'); |
|
55 | },'.show_more'); | |
56 | }); |
|
56 | }); | |
57 | </script> |
|
57 | </script> | |
58 |
|
58 | |||
59 | <div class="pagination-wh pagination-left"> |
|
59 | <div class="pagination-wh pagination-left"> | |
60 | ${c.users_log.pager('$link_previous ~2~ $link_next')} |
|
60 | ${c.users_log.pager('$link_previous ~2~ $link_next')} | |
61 | </div> |
|
61 | </div> | |
62 | %else: |
|
62 | %else: | |
63 |
|
|
63 | ${_('No actions yet')} | |
64 | %endif |
|
64 | %endif |
@@ -1,93 +1,93 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Repositories defaults')} - ${c.rhodecode_name} |
|
5 | ${_('Repositories defaults')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 | ${_('Defaults')} |
|
11 | ${_('Defaults')} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 |
|
|
15 | ${self.menu('admin')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
19 | <div class="box"> |
|
19 | <div class="box"> | |
20 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
23 | </div> |
|
23 | </div> | |
24 |
|
24 | |||
25 | <h3>${_('Repositories defaults')}</h3> |
|
25 | <h3>${_('Repositories defaults')}</h3> | |
26 |
|
26 | |||
27 | ${h.form(url('default', id='defaults'),method='put')} |
|
27 | ${h.form(url('default', id='defaults'),method='put')} | |
28 | <div class="form"> |
|
28 | <div class="form"> | |
29 | <!-- fields --> |
|
29 | <!-- fields --> | |
30 |
|
30 | |||
31 | <div class="fields"> |
|
31 | <div class="fields"> | |
32 |
|
32 | |||
33 | <div class="field"> |
|
33 | <div class="field"> | |
34 | <div class="label"> |
|
34 | <div class="label"> | |
35 | <label for="default_repo_type">${_('Type')}:</label> |
|
35 | <label for="default_repo_type">${_('Type')}:</label> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="input"> |
|
37 | <div class="input"> | |
38 | ${h.select('default_repo_type','hg',c.backends,class_="medium")} |
|
38 | ${h.select('default_repo_type','hg',c.backends,class_="medium")} | |
39 | </div> |
|
39 | </div> | |
40 | </div> |
|
40 | </div> | |
41 |
|
41 | |||
42 | <div class="field"> |
|
42 | <div class="field"> | |
43 | <div class="label label-checkbox"> |
|
43 | <div class="label label-checkbox"> | |
44 | <label for="default_repo_private">${_('Private repository')}:</label> |
|
44 | <label for="default_repo_private">${_('Private repository')}:</label> | |
45 | </div> |
|
45 | </div> | |
46 | <div class="checkboxes"> |
|
46 | <div class="checkboxes"> | |
47 | ${h.checkbox('default_repo_private',value="True")} |
|
47 | ${h.checkbox('default_repo_private',value="True")} | |
48 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
48 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
49 | </div> |
|
49 | </div> | |
50 | </div> |
|
50 | </div> | |
51 |
|
51 | |||
52 |
|
52 | |||
53 | <div class="field"> |
|
53 | <div class="field"> | |
54 | <div class="label label-checkbox"> |
|
54 | <div class="label label-checkbox"> | |
55 | <label for="default_repo_enable_statistics">${_('Enable statistics')}:</label> |
|
55 | <label for="default_repo_enable_statistics">${_('Enable statistics')}:</label> | |
56 | </div> |
|
56 | </div> | |
57 | <div class="checkboxes"> |
|
57 | <div class="checkboxes"> | |
58 | ${h.checkbox('default_repo_enable_statistics',value="True")} |
|
58 | ${h.checkbox('default_repo_enable_statistics',value="True")} | |
59 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
59 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> | |
60 | </div> |
|
60 | </div> | |
61 | </div> |
|
61 | </div> | |
62 |
|
62 | |||
63 | <div class="field"> |
|
63 | <div class="field"> | |
64 | <div class="label label-checkbox"> |
|
64 | <div class="label label-checkbox"> | |
65 | <label for="default_repo_enable_downloads">${_('Enable downloads')}:</label> |
|
65 | <label for="default_repo_enable_downloads">${_('Enable downloads')}:</label> | |
66 | </div> |
|
66 | </div> | |
67 | <div class="checkboxes"> |
|
67 | <div class="checkboxes"> | |
68 | ${h.checkbox('default_repo_enable_downloads',value="True")} |
|
68 | ${h.checkbox('default_repo_enable_downloads',value="True")} | |
69 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
69 | <span class="help-block">${_('Enable download menu on summary page.')}</span> | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 |
|
72 | |||
73 | <div class="field"> |
|
73 | <div class="field"> | |
74 | <div class="label label-checkbox"> |
|
74 | <div class="label label-checkbox"> | |
75 | <label for="default_repo_enable_locking">${_('Enable locking')}:</label> |
|
75 | <label for="default_repo_enable_locking">${_('Enable locking')}:</label> | |
76 | </div> |
|
76 | </div> | |
77 | <div class="checkboxes"> |
|
77 | <div class="checkboxes"> | |
78 | ${h.checkbox('default_repo_enable_locking',value="True")} |
|
78 | ${h.checkbox('default_repo_enable_locking',value="True")} | |
79 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
79 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 |
|
82 | |||
83 | <div class="buttons"> |
|
83 | <div class="buttons"> | |
84 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
84 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
85 | </div> |
|
85 | </div> | |
86 | </div> |
|
86 | </div> | |
87 | </div> |
|
87 | </div> | |
88 | ${h.end_form()} |
|
88 | ${h.end_form()} | |
89 |
|
89 | |||
90 | ##<h3>${_('Groups defaults')}</h3> |
|
90 | ##<h3>${_('Groups defaults')}</h3> | |
91 |
|
91 | |||
92 | </div> |
|
92 | </div> | |
93 | </%def> |
|
93 | </%def> |
@@ -1,95 +1,95 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('LDAP administration')} - ${c.rhodecode_name} |
|
5 | ${_('LDAP administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 | ${_('Ldap')} |
|
11 | ${_('Ldap')} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 | ${self.menu('admin')} |
|
15 | ${self.menu('admin')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
19 | <div class="box"> |
|
19 | <div class="box"> | |
20 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
23 | </div> |
|
23 | </div> | |
24 | ${h.form(url('ldap_settings'))} |
|
24 | ${h.form(url('ldap_settings'))} | |
25 | <div class="form"> |
|
25 | <div class="form"> | |
26 | <div class="fields"> |
|
26 | <div class="fields"> | |
27 |
|
27 | |||
28 |
|
|
28 | <h3>${_('Connection settings')}</h3> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="label label-checkbox"><label for="ldap_active">${_('Enable LDAP')}</label></div> |
|
30 | <div class="label label-checkbox"><label for="ldap_active">${_('Enable LDAP')}</label></div> | |
31 | <div class="checkboxes"><div class="checkbox">${h.checkbox('ldap_active',True,class_='small')}</div></div> |
|
31 | <div class="checkboxes"><div class="checkbox">${h.checkbox('ldap_active',True,class_='small')}</div></div> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="field"> |
|
33 | <div class="field"> | |
34 | <div class="label"><label for="ldap_host">${_('Host')}</label></div> |
|
34 | <div class="label"><label for="ldap_host">${_('Host')}</label></div> | |
35 | <div class="input">${h.text('ldap_host',class_='small')}</div> |
|
35 | <div class="input">${h.text('ldap_host',class_='small')}</div> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="field"> |
|
37 | <div class="field"> | |
38 | <div class="label"><label for="ldap_port">${_('Port')}</label></div> |
|
38 | <div class="label"><label for="ldap_port">${_('Port')}</label></div> | |
39 | <div class="input">${h.text('ldap_port',class_='small')}</div> |
|
39 | <div class="input">${h.text('ldap_port',class_='small')}</div> | |
40 | </div> |
|
40 | </div> | |
41 | <div class="field"> |
|
41 | <div class="field"> | |
42 | <div class="label"><label for="ldap_dn_user">${_('Account')}</label></div> |
|
42 | <div class="label"><label for="ldap_dn_user">${_('Account')}</label></div> | |
43 | <div class="input">${h.text('ldap_dn_user',class_='small')}</div> |
|
43 | <div class="input">${h.text('ldap_dn_user',class_='small')}</div> | |
44 | </div> |
|
44 | </div> | |
45 | <div class="field"> |
|
45 | <div class="field"> | |
46 | <div class="label"><label for="ldap_dn_pass">${_('Password')}</label></div> |
|
46 | <div class="label"><label for="ldap_dn_pass">${_('Password')}</label></div> | |
47 | <div class="input">${h.password('ldap_dn_pass',class_='small')}</div> |
|
47 | <div class="input">${h.password('ldap_dn_pass',class_='small')}</div> | |
48 | </div> |
|
48 | </div> | |
49 | <div class="field"> |
|
49 | <div class="field"> | |
50 | <div class="label"><label for="ldap_tls_kind">${_('Connection security')}</label></div> |
|
50 | <div class="label"><label for="ldap_tls_kind">${_('Connection security')}</label></div> | |
51 | <div class="select">${h.select('ldap_tls_kind',c.tls_kind_cur,c.tls_kind_choices,class_='small')}</div> |
|
51 | <div class="select">${h.select('ldap_tls_kind',c.tls_kind_cur,c.tls_kind_choices,class_='small')}</div> | |
52 | </div> |
|
52 | </div> | |
53 | <div class="field"> |
|
53 | <div class="field"> | |
54 | <div class="label"><label for="ldap_tls_reqcert">${_('Certificate Checks')}</label></div> |
|
54 | <div class="label"><label for="ldap_tls_reqcert">${_('Certificate Checks')}</label></div> | |
55 | <div class="select">${h.select('ldap_tls_reqcert',c.tls_reqcert_cur,c.tls_reqcert_choices,class_='small')}</div> |
|
55 | <div class="select">${h.select('ldap_tls_reqcert',c.tls_reqcert_cur,c.tls_reqcert_choices,class_='small')}</div> | |
56 | </div> |
|
56 | </div> | |
57 |
|
|
57 | <h3>${_('Search settings')}</h3> | |
58 | <div class="field"> |
|
58 | <div class="field"> | |
59 | <div class="label"><label for="ldap_base_dn">${_('Base DN')}</label></div> |
|
59 | <div class="label"><label for="ldap_base_dn">${_('Base DN')}</label></div> | |
60 | <div class="input">${h.text('ldap_base_dn',class_='small')}</div> |
|
60 | <div class="input">${h.text('ldap_base_dn',class_='small')}</div> | |
61 | </div> |
|
61 | </div> | |
62 | <div class="field"> |
|
62 | <div class="field"> | |
63 | <div class="label"><label for="ldap_filter">${_('LDAP Filter')}</label></div> |
|
63 | <div class="label"><label for="ldap_filter">${_('LDAP Filter')}</label></div> | |
64 | <div class="input">${h.text('ldap_filter',class_='small')}</div> |
|
64 | <div class="input">${h.text('ldap_filter',class_='small')}</div> | |
65 | </div> |
|
65 | </div> | |
66 | <div class="field"> |
|
66 | <div class="field"> | |
67 | <div class="label"><label for="ldap_search_scope">${_('LDAP Search Scope')}</label></div> |
|
67 | <div class="label"><label for="ldap_search_scope">${_('LDAP Search Scope')}</label></div> | |
68 | <div class="select">${h.select('ldap_search_scope',c.search_scope_cur,c.search_scope_choices,class_='small')}</div> |
|
68 | <div class="select">${h.select('ldap_search_scope',c.search_scope_cur,c.search_scope_choices,class_='small')}</div> | |
69 | </div> |
|
69 | </div> | |
70 |
|
|
70 | <h3>${_('Attribute mappings')}</h3> | |
71 | <div class="field"> |
|
71 | <div class="field"> | |
72 | <div class="label"><label for="ldap_attr_login">${_('Login Attribute')}</label></div> |
|
72 | <div class="label"><label for="ldap_attr_login">${_('Login Attribute')}</label></div> | |
73 | <div class="input">${h.text('ldap_attr_login',class_='small')}</div> |
|
73 | <div class="input">${h.text('ldap_attr_login',class_='small')}</div> | |
74 | </div> |
|
74 | </div> | |
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label"><label for="ldap_attr_firstname">${_('First Name Attribute')}</label></div> |
|
76 | <div class="label"><label for="ldap_attr_firstname">${_('First Name Attribute')}</label></div> | |
77 | <div class="input">${h.text('ldap_attr_firstname',class_='small')}</div> |
|
77 | <div class="input">${h.text('ldap_attr_firstname',class_='small')}</div> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="field"> |
|
79 | <div class="field"> | |
80 | <div class="label"><label for="ldap_attr_lastname">${_('Last Name Attribute')}</label></div> |
|
80 | <div class="label"><label for="ldap_attr_lastname">${_('Last Name Attribute')}</label></div> | |
81 | <div class="input">${h.text('ldap_attr_lastname',class_='small')}</div> |
|
81 | <div class="input">${h.text('ldap_attr_lastname',class_='small')}</div> | |
82 | </div> |
|
82 | </div> | |
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label"><label for="ldap_attr_email">${_('E-mail Attribute')}</label></div> |
|
84 | <div class="label"><label for="ldap_attr_email">${_('E-mail Attribute')}</label></div> | |
85 | <div class="input">${h.text('ldap_attr_email',class_='small')}</div> |
|
85 | <div class="input">${h.text('ldap_attr_email',class_='small')}</div> | |
86 | </div> |
|
86 | </div> | |
87 |
|
87 | |||
88 | <div class="buttons"> |
|
88 | <div class="buttons"> | |
89 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
89 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 | ${h.end_form()} |
|
93 | ${h.end_form()} | |
94 | </div> |
|
94 | </div> | |
95 | </%def> |
|
95 | </%def> |
@@ -1,65 +1,65 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('My Notifications')} ${c.rhodecode_user.username} - ${c.rhodecode_name} |
|
5 | ${_('My Notifications')} ${c.rhodecode_user.username} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${_('My Notifications')} |
|
9 | ${_('My Notifications')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 |
|
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | ##<ul class="links"> |
|
21 | ##<ul class="links"> | |
22 | ## <li> |
|
22 | ## <li> | |
23 | ## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> |
|
23 | ## <span style="text-transform: uppercase;"><a href="#">${_('Compose message')}</a></span> | |
24 | ## </li> |
|
24 | ## </li> | |
25 | ##</ul> |
|
25 | ##</ul> | |
26 | </div> |
|
26 | </div> | |
27 |
|
27 | |||
28 | <div style="padding:14px 18px;text-align: right;float:left"> |
|
28 | <div style="padding:14px 18px;text-align: right;float:left"> | |
29 | <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span> |
|
29 | <span id='all' class="ui-btn"><a href="${h.url.current()}">${_('All')}</a></span> | |
30 | <span id='comment' class="ui-btn"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> |
|
30 | <span id='comment' class="ui-btn"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span> | |
31 | <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span> |
|
31 | <span id='pull_request' class="ui-btn"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull requests')}</a></span> | |
32 | </div> |
|
32 | </div> | |
33 | %if c.notifications: |
|
33 | %if c.notifications: | |
34 | <div style="padding:14px 18px;text-align: right;float:right"> |
|
34 | <div style="padding:14px 18px;text-align: right;float:right"> | |
35 | <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span> |
|
35 | <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span> | |
36 | </div> |
|
36 | </div> | |
37 | %endif |
|
37 | %endif | |
38 | <div id='notification_data'> |
|
38 | <div id='notification_data'> | |
39 | <%include file='notifications_data.html'/> |
|
39 | <%include file='notifications_data.html'/> | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 | <script type="text/javascript"> |
|
42 | <script type="text/javascript"> | |
43 | var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; |
|
43 | var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}"; | |
44 | var run = function(){ |
|
44 | var run = function(){ | |
45 | YUE.on(YUQ('.delete-notification'),'click',function(e){ |
|
45 | YUE.on(YUQ('.delete-notification'),'click',function(e){ | |
46 | var notification_id = e.currentTarget.id; |
|
46 | var notification_id = e.currentTarget.id; | |
47 | deleteNotification(url_action,notification_id) |
|
47 | deleteNotification(url_action,notification_id) | |
48 | }) |
|
48 | }) | |
49 | YUE.on(YUQ('.read-notification'),'click',function(e){ |
|
49 | YUE.on(YUQ('.read-notification'),'click',function(e){ | |
50 | var notification_id = e.currentTarget.id; |
|
50 | var notification_id = e.currentTarget.id; | |
51 | readNotification(url_action,notification_id) |
|
51 | readNotification(url_action,notification_id) | |
52 | }) |
|
52 | }) | |
53 | } |
|
53 | } | |
54 | run() |
|
54 | run() | |
55 | YUE.on('mark_all_read','click',function(e){ |
|
55 | YUE.on('mark_all_read','click',function(e){ | |
56 | var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}"; |
|
56 | var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}"; | |
57 | ypjax(url,'notification_data',function(){run()}); |
|
57 | ypjax(url,'notification_data',function(){run()}); | |
58 | }) |
|
58 | }) | |
59 |
|
59 | |||
60 | var current_filter = "${c.current_filter}"; |
|
60 | var current_filter = "${c.current_filter}"; | |
61 | if (YUD.get(current_filter)){ |
|
61 | if (YUD.get(current_filter)){ | |
62 |
|
|
62 | YUD.addClass(current_filter, 'active'); | |
63 | } |
|
63 | } | |
64 | </script> |
|
64 | </script> | |
65 | </%def> |
|
65 | </%def> |
@@ -1,215 +1,215 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Permissions administration')} - ${c.rhodecode_name} |
|
5 | ${_('Permissions administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 | ${_('Permissions')} |
|
11 | ${_('Permissions')} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 |
|
|
15 | ${self.menu('admin')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
19 | <div class="box box-left"> |
|
19 | <div class="box box-left"> | |
20 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
23 | </div> |
|
23 | </div> | |
24 | <h3>${_('Default permissions')}</h3> |
|
24 | <h3>${_('Default permissions')}</h3> | |
25 | ${h.form(url('permission', id='default'),method='put')} |
|
25 | ${h.form(url('permission', id='default'),method='put')} | |
26 | <div class="form"> |
|
26 | <div class="form"> | |
27 | <!-- fields --> |
|
27 | <!-- fields --> | |
28 | <div class="fields"> |
|
28 | <div class="fields"> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="label label-checkbox"> |
|
30 | <div class="label label-checkbox"> | |
31 | <label for="anonymous">${_('Anonymous access')}:</label> |
|
31 | <label for="anonymous">${_('Anonymous access')}:</label> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="checkboxes"> |
|
33 | <div class="checkboxes"> | |
34 | <div class="checkbox"> |
|
34 | <div class="checkbox"> | |
35 | ${h.checkbox('anonymous',True)} |
|
35 | ${h.checkbox('anonymous',True)} | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 |
|
|
39 | <div class="field"> | |
40 |
|
|
40 | <div class="label"> | |
41 |
|
|
41 | <label for="default_repo_perm">${_('Repository')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 |
|
|
43 | <div class="select"> | |
44 |
|
|
44 | ${h.select('default_repo_perm','',c.repo_perms_choices)} | |
45 |
|
45 | |||
46 |
|
|
46 | ${h.checkbox('overwrite_default_repo','true')} | |
47 |
|
|
47 | <label for="overwrite_default_repo"> | |
48 |
|
|
48 | <span class="tooltip" | |
49 |
|
|
49 | title="${h.tooltip(_('All default permissions on each repository will be reset to choosen permission, note that all custom default permission on repositories will be lost'))}"> | |
50 |
|
|
50 | ${_('overwrite existing settings')}</span> </label> | |
51 | </div> |
|
51 | </div> | |
52 | </div> |
|
52 | </div> | |
53 |
|
|
53 | <div class="field"> | |
54 |
|
|
54 | <div class="label"> | |
55 |
|
|
55 | <label for="default_group_perm">${_('Repository group')}:</label> | |
56 | </div> |
|
56 | </div> | |
57 |
|
|
57 | <div class="select"> | |
58 |
|
|
58 | ${h.select('default_group_perm','',c.group_perms_choices)} | |
59 | ${h.checkbox('overwrite_default_group','true')} |
|
59 | ${h.checkbox('overwrite_default_group','true')} | |
60 | <label for="overwrite_default_group"> |
|
60 | <label for="overwrite_default_group"> | |
61 | <span class="tooltip" |
|
61 | <span class="tooltip" | |
62 | title="${h.tooltip(_('All default permissions on each repository group will be reset to choosen permission, note that all custom default permission on repositories group will be lost'))}"> |
|
62 | title="${h.tooltip(_('All default permissions on each repository group will be reset to choosen permission, note that all custom default permission on repositories group will be lost'))}"> | |
63 | ${_('overwrite existing settings')}</span> </label> |
|
63 | ${_('overwrite existing settings')}</span> </label> | |
64 |
|
64 | |||
65 | </div> |
|
65 | </div> | |
66 | </div> |
|
66 | </div> | |
67 |
|
|
67 | <div class="field"> | |
68 |
|
|
68 | <div class="label"> | |
69 |
|
|
69 | <label for="default_register">${_('Registration')}:</label> | |
70 |
|
|
70 | </div> | |
71 |
|
|
71 | <div class="select"> | |
72 |
|
|
72 | ${h.select('default_register','',c.register_choices)} | |
73 | </div> |
|
73 | </div> | |
74 | </div> |
|
74 | </div> | |
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label"> |
|
76 | <div class="label"> | |
77 | <label for="default_create">${_('Repository creation')}:</label> |
|
77 | <label for="default_create">${_('Repository creation')}:</label> | |
78 | </div> |
|
78 | </div> | |
79 |
|
|
79 | <div class="select"> | |
80 |
|
|
80 | ${h.select('default_create','',c.create_choices)} | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label"> |
|
84 | <div class="label"> | |
85 | <label for="default_fork">${_('Repository forking')}:</label> |
|
85 | <label for="default_fork">${_('Repository forking')}:</label> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="select"> |
|
87 | <div class="select"> | |
88 | ${h.select('default_fork','',c.fork_choices)} |
|
88 | ${h.select('default_fork','',c.fork_choices)} | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 |
|
|
91 | <div class="buttons"> | |
92 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
92 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
93 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
93 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
94 |
|
|
94 | </div> | |
95 | </div> |
|
95 | </div> | |
96 | </div> |
|
96 | </div> | |
97 | ${h.end_form()} |
|
97 | ${h.end_form()} | |
98 | </div> |
|
98 | </div> | |
99 |
|
99 | |||
100 | <div style="min-height:780px" class="box box-right"> |
|
100 | <div style="min-height:780px" class="box box-right"> | |
101 | <!-- box / title --> |
|
101 | <!-- box / title --> | |
102 | <div class="title"> |
|
102 | <div class="title"> | |
103 | <h5>${_('Default User Permissions')}</h5> |
|
103 | <h5>${_('Default User Permissions')}</h5> | |
104 | </div> |
|
104 | </div> | |
105 |
|
105 | |||
106 | ## permissions overview |
|
106 | ## permissions overview | |
107 | <div id="perms" class="table"> |
|
107 | <div id="perms" class="table"> | |
108 | %for section in sorted(c.perm_user.permissions.keys()): |
|
108 | %for section in sorted(c.perm_user.permissions.keys()): | |
109 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
109 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
110 | %if not c.perm_user.permissions[section]: |
|
110 | %if not c.perm_user.permissions[section]: | |
111 | <span class="empty_data">${_('Nothing here yet')}</span> |
|
111 | <span class="empty_data">${_('Nothing here yet')}</span> | |
112 | %else: |
|
112 | %else: | |
113 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
113 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
114 | <table id="tbl_list_${section}"> |
|
114 | <table id="tbl_list_${section}"> | |
115 | <thead> |
|
115 | <thead> | |
116 | <tr> |
|
116 | <tr> | |
117 | <th class="left">${_('Name')}</th> |
|
117 | <th class="left">${_('Name')}</th> | |
118 | <th class="left">${_('Permission')}</th> |
|
118 | <th class="left">${_('Permission')}</th> | |
119 | <th class="left">${_('Edit Permission')}</th> |
|
119 | <th class="left">${_('Edit Permission')}</th> | |
120 | </thead> |
|
120 | </thead> | |
121 | <tbody> |
|
121 | <tbody> | |
122 | %for k in c.perm_user.permissions[section]: |
|
122 | %for k in c.perm_user.permissions[section]: | |
123 | <% |
|
123 | <% | |
124 | if section != 'global': |
|
124 | if section != 'global': | |
125 | section_perm = c.perm_user.permissions[section].get(k) |
|
125 | section_perm = c.perm_user.permissions[section].get(k) | |
126 | _perm = section_perm.split('.')[-1] |
|
126 | _perm = section_perm.split('.')[-1] | |
127 | else: |
|
127 | else: | |
128 | _perm = section_perm = None |
|
128 | _perm = section_perm = None | |
129 | %> |
|
129 | %> | |
130 | <tr> |
|
130 | <tr> | |
131 | <td> |
|
131 | <td> | |
132 | %if section == 'repositories': |
|
132 | %if section == 'repositories': | |
133 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
133 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
134 | %elif section == 'repositories_groups': |
|
134 | %elif section == 'repositories_groups': | |
135 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
135 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
136 | %else: |
|
136 | %else: | |
137 | ${h.get_permission_name(k)} |
|
137 | ${h.get_permission_name(k)} | |
138 | %endif |
|
138 | %endif | |
139 | </td> |
|
139 | </td> | |
140 | <td> |
|
140 | <td> | |
141 | %if section == 'global': |
|
141 | %if section == 'global': | |
142 | ${h.bool2icon(k.split('.')[-1] != 'none')} |
|
142 | ${h.bool2icon(k.split('.')[-1] != 'none')} | |
143 | %else: |
|
143 | %else: | |
144 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
144 | <span class="perm_tag ${_perm}">${section_perm}</span> | |
145 | %endif |
|
145 | %endif | |
146 | </td> |
|
146 | </td> | |
147 | <td> |
|
147 | <td> | |
148 | %if section == 'repositories': |
|
148 | %if section == 'repositories': | |
149 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
149 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
150 | %elif section == 'repositories_groups': |
|
150 | %elif section == 'repositories_groups': | |
151 | <a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
151 | <a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a> | |
152 | %else: |
|
152 | %else: | |
153 | -- |
|
153 | -- | |
154 | %endif |
|
154 | %endif | |
155 | </td> |
|
155 | </td> | |
156 | </tr> |
|
156 | </tr> | |
157 | %endfor |
|
157 | %endfor | |
158 | </tbody> |
|
158 | </tbody> | |
159 | </table> |
|
159 | </table> | |
160 | </div> |
|
160 | </div> | |
161 | %endif |
|
161 | %endif | |
162 | %endfor |
|
162 | %endfor | |
163 | </div> |
|
163 | </div> | |
164 | </div> |
|
164 | </div> | |
165 | <div class="box box-left" style="clear:left"> |
|
165 | <div class="box box-left" style="clear:left"> | |
166 | <!-- box / title --> |
|
166 | <!-- box / title --> | |
167 | <div class="title"> |
|
167 | <div class="title"> | |
168 | <h5>${_('Allowed IP addresses')}</h5> |
|
168 | <h5>${_('Allowed IP addresses')}</h5> | |
169 | </div> |
|
169 | </div> | |
170 |
|
170 | |||
171 | <div class="ips_wrap"> |
|
171 | <div class="ips_wrap"> | |
172 | <table class="noborder"> |
|
172 | <table class="noborder"> | |
173 | %if c.user_ip_map: |
|
173 | %if c.user_ip_map: | |
174 | %for ip in c.user_ip_map: |
|
174 | %for ip in c.user_ip_map: | |
175 | <tr> |
|
175 | <tr> | |
176 | <td><div class="ip">${ip.ip_addr}</div></td> |
|
176 | <td><div class="ip">${ip.ip_addr}</div></td> | |
177 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> |
|
177 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> | |
178 | <td> |
|
178 | <td> | |
179 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} |
|
179 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} | |
180 | ${h.hidden('del_ip',ip.ip_id)} |
|
180 | ${h.hidden('del_ip',ip.ip_id)} | |
181 | ${h.hidden('default_user', 'True')} |
|
181 | ${h.hidden('default_user', 'True')} | |
182 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, |
|
182 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, | |
183 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} |
|
183 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} | |
184 | ${h.end_form()} |
|
184 | ${h.end_form()} | |
185 | </td> |
|
185 | </td> | |
186 | </tr> |
|
186 | </tr> | |
187 | %endfor |
|
187 | %endfor | |
188 | %else: |
|
188 | %else: | |
189 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> |
|
189 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> | |
190 | %endif |
|
190 | %endif | |
191 | </table> |
|
191 | </table> | |
192 | </div> |
|
192 | </div> | |
193 |
|
193 | |||
194 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} |
|
194 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} | |
195 | <div class="form"> |
|
195 | <div class="form"> | |
196 | <!-- fields --> |
|
196 | <!-- fields --> | |
197 | <div class="fields"> |
|
197 | <div class="fields"> | |
198 | <div class="field"> |
|
198 | <div class="field"> | |
199 | <div class="label"> |
|
199 | <div class="label"> | |
200 | <label for="new_ip">${_('New ip address')}:</label> |
|
200 | <label for="new_ip">${_('New ip address')}:</label> | |
201 | </div> |
|
201 | </div> | |
202 | <div class="input"> |
|
202 | <div class="input"> | |
203 | ${h.hidden('default_user', 'True')} |
|
203 | ${h.hidden('default_user', 'True')} | |
204 | ${h.text('new_ip', class_='medium')} |
|
204 | ${h.text('new_ip', class_='medium')} | |
205 | </div> |
|
205 | </div> | |
206 | </div> |
|
206 | </div> | |
207 | <div class="buttons"> |
|
207 | <div class="buttons"> | |
208 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
208 | ${h.submit('save',_('Add'),class_="ui-btn large")} | |
209 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
209 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
210 | </div> |
|
210 | </div> | |
211 | </div> |
|
211 | </div> | |
212 | </div> |
|
212 | </div> | |
213 | ${h.end_form()} |
|
213 | ${h.end_form()} | |
214 | </div> |
|
214 | </div> | |
215 | </%def> |
|
215 | </%def> |
@@ -1,28 +1,28 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Add repository')} - ${c.rhodecode_name} |
|
5 | ${_('Add repository')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(_('Repositories'),h.url('repos'))} |
|
11 | ${h.link_to(_('Repositories'),h.url('repos'))} | |
12 | » |
|
12 | » | |
13 | ${_('add new')} |
|
13 | ${_('add new')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 |
|
|
17 | ${self.menu('admin')} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="main()"> |
|
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 | <%include file="repo_add_base.html"/> |
|
26 | <%include file="repo_add_base.html"/> | |
27 | </div> |
|
27 | </div> | |
28 | </%def> |
|
28 | </%def> |
@@ -1,24 +1,24 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Add repository')} - ${c.rhodecode_name} |
|
5 | ${_('Add repository')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 |
|
|
9 | ${_('add new repository')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 |
|
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | </div> |
|
21 | </div> | |
22 | <%include file="repo_add_base.html"/> |
|
22 | <%include file="repo_add_base.html"/> | |
23 | </div> |
|
23 | </div> | |
24 | </%def> |
|
24 | </%def> |
@@ -1,289 +1,289 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Edit repository')} ${c.repo_info.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('Edit repository')} ${c.repo_info.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(_('Repositories'),h.url('repos'))} |
|
11 | ${h.link_to(_('Repositories'),h.url('repos'))} | |
12 | » |
|
12 | » | |
13 | ${_('edit')} » ${h.link_to(c.repo_info.just_name,h.url('summary_home',repo_name=c.repo_name))} |
|
13 | ${_('edit')} » ${h.link_to(c.repo_info.just_name,h.url('summary_home',repo_name=c.repo_name))} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 |
|
|
17 | ${self.menu('admin')} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="main()"> |
|
20 | <%def name="main()"> | |
21 | <div class="box box-left"> |
|
21 | <div class="box box-left"> | |
22 | <!-- box / title --> |
|
22 | <!-- box / title --> | |
23 | <div class="title"> |
|
23 | <div class="title"> | |
24 | ${self.breadcrumbs()} |
|
24 | ${self.breadcrumbs()} | |
25 | </div> |
|
25 | </div> | |
26 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')} |
|
26 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')} | |
27 | <div class="form"> |
|
27 | <div class="form"> | |
28 | <!-- fields --> |
|
28 | <!-- fields --> | |
29 | <div class="fields"> |
|
29 | <div class="fields"> | |
30 | <div class="field"> |
|
30 | <div class="field"> | |
31 | <div class="label"> |
|
31 | <div class="label"> | |
32 | <label for="repo_name">${_('Name')}:</label> |
|
32 | <label for="repo_name">${_('Name')}:</label> | |
33 | </div> |
|
33 | </div> | |
34 | <div class="input"> |
|
34 | <div class="input"> | |
35 | ${h.text('repo_name',class_="medium")} |
|
35 | ${h.text('repo_name',class_="medium")} | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 |
|
|
38 | <div class="field"> | |
39 |
|
|
39 | <div class="label"> | |
40 |
|
|
40 | <label for="clone_uri">${_('Clone uri')}:</label> | |
41 |
|
|
41 | </div> | |
42 |
|
|
42 | <div class="input"> | |
43 |
|
|
43 | ${h.text('clone_uri',class_="medium")} | |
44 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
44 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> | |
45 |
|
|
45 | </div> | |
46 |
|
|
46 | </div> | |
47 |
|
|
47 | <div class="field"> | |
48 |
|
|
48 | <div class="label"> | |
49 |
|
|
49 | <label for="repo_group">${_('Repository group')}:</label> | |
50 |
|
|
50 | </div> | |
51 |
|
|
51 | <div class="input"> | |
52 |
|
|
52 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
53 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> |
|
53 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> | |
54 |
|
|
54 | </div> | |
55 |
|
|
55 | </div> | |
56 | <div class="field"> |
|
56 | <div class="field"> | |
57 | <div class="label"> |
|
57 | <div class="label"> | |
58 | <label for="repo_type">${_('Type')}:</label> |
|
58 | <label for="repo_type">${_('Type')}:</label> | |
59 | </div> |
|
59 | </div> | |
60 | <div class="input"> |
|
60 | <div class="input"> | |
61 | ${h.select('repo_type','hg',c.backends,class_="medium")} |
|
61 | ${h.select('repo_type','hg',c.backends,class_="medium")} | |
62 | </div> |
|
62 | </div> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="field"> |
|
64 | <div class="field"> | |
65 | <div class="label"> |
|
65 | <div class="label"> | |
66 | <label for="repo_landing_rev">${_('Landing revision')}:</label> |
|
66 | <label for="repo_landing_rev">${_('Landing revision')}:</label> | |
67 | </div> |
|
67 | </div> | |
68 | <div class="input"> |
|
68 | <div class="input"> | |
69 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
69 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} | |
70 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
70 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 | <div class="field"> |
|
73 | <div class="field"> | |
74 | <div class="label label-textarea"> |
|
74 | <div class="label label-textarea"> | |
75 | <label for="repo_description">${_('Description')}:</label> |
|
75 | <label for="repo_description">${_('Description')}:</label> | |
76 | </div> |
|
76 | </div> | |
77 | <div class="textarea text-area editor"> |
|
77 | <div class="textarea text-area editor"> | |
78 | ${h.textarea('repo_description')} |
|
78 | ${h.textarea('repo_description')} | |
79 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
79 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 |
|
82 | |||
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label label-checkbox"> |
|
84 | <div class="label label-checkbox"> | |
85 | <label for="repo_private">${_('Private repository')}:</label> |
|
85 | <label for="repo_private">${_('Private repository')}:</label> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="checkboxes"> |
|
87 | <div class="checkboxes"> | |
88 | ${h.checkbox('repo_private',value="True")} |
|
88 | ${h.checkbox('repo_private',value="True")} | |
89 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
89 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | <div class="field"> |
|
92 | <div class="field"> | |
93 | <div class="label label-checkbox"> |
|
93 | <div class="label label-checkbox"> | |
94 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> |
|
94 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> | |
95 | </div> |
|
95 | </div> | |
96 | <div class="checkboxes"> |
|
96 | <div class="checkboxes"> | |
97 | ${h.checkbox('repo_enable_statistics',value="True")} |
|
97 | ${h.checkbox('repo_enable_statistics',value="True")} | |
98 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
98 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> | |
99 | </div> |
|
99 | </div> | |
100 | </div> |
|
100 | </div> | |
101 | <div class="field"> |
|
101 | <div class="field"> | |
102 | <div class="label label-checkbox"> |
|
102 | <div class="label label-checkbox"> | |
103 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> |
|
103 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> | |
104 | </div> |
|
104 | </div> | |
105 | <div class="checkboxes"> |
|
105 | <div class="checkboxes"> | |
106 | ${h.checkbox('repo_enable_downloads',value="True")} |
|
106 | ${h.checkbox('repo_enable_downloads',value="True")} | |
107 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
107 | <span class="help-block">${_('Enable download menu on summary page.')}</span> | |
108 | </div> |
|
108 | </div> | |
109 | </div> |
|
109 | </div> | |
110 | <div class="field"> |
|
110 | <div class="field"> | |
111 | <div class="label label-checkbox"> |
|
111 | <div class="label label-checkbox"> | |
112 | <label for="repo_enable_locking">${_('Enable locking')}:</label> |
|
112 | <label for="repo_enable_locking">${_('Enable locking')}:</label> | |
113 | </div> |
|
113 | </div> | |
114 | <div class="checkboxes"> |
|
114 | <div class="checkboxes"> | |
115 | ${h.checkbox('repo_enable_locking',value="True")} |
|
115 | ${h.checkbox('repo_enable_locking',value="True")} | |
116 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
116 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> | |
117 | </div> |
|
117 | </div> | |
118 | </div> |
|
118 | </div> | |
119 | <div class="field"> |
|
119 | <div class="field"> | |
120 | <div class="label"> |
|
120 | <div class="label"> | |
121 | <label for="user">${_('Owner')}:</label> |
|
121 | <label for="user">${_('Owner')}:</label> | |
122 | </div> |
|
122 | </div> | |
123 | <div class="input input-medium ac"> |
|
123 | <div class="input input-medium ac"> | |
124 | <div class="perm_ac"> |
|
124 | <div class="perm_ac"> | |
125 | ${h.text('user',class_='yui-ac-input')} |
|
125 | ${h.text('user',class_='yui-ac-input')} | |
126 | <span class="help-block">${_('Change owner of this repository.')}</span> |
|
126 | <span class="help-block">${_('Change owner of this repository.')}</span> | |
127 | <div id="owner_container"></div> |
|
127 | <div id="owner_container"></div> | |
128 | </div> |
|
128 | </div> | |
129 | </div> |
|
129 | </div> | |
130 | </div> |
|
130 | </div> | |
131 |
|
131 | |||
132 | <div class="field"> |
|
132 | <div class="field"> | |
133 | <div class="label"> |
|
133 | <div class="label"> | |
134 | <label for="input">${_('Permissions')}:</label> |
|
134 | <label for="input">${_('Permissions')}:</label> | |
135 | </div> |
|
135 | </div> | |
136 | <div class="input"> |
|
136 | <div class="input"> | |
137 | <%include file="repo_edit_perms.html"/> |
|
137 | <%include file="repo_edit_perms.html"/> | |
138 | </div> |
|
138 | </div> | |
139 |
|
139 | |||
140 | <div class="buttons"> |
|
140 | <div class="buttons"> | |
141 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
141 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
142 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
142 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
143 | </div> |
|
143 | </div> | |
144 | </div> |
|
144 | </div> | |
145 | </div> |
|
145 | </div> | |
146 | </div> |
|
146 | </div> | |
147 | ${h.end_form()} |
|
147 | ${h.end_form()} | |
148 | </div> |
|
148 | </div> | |
149 |
|
149 | |||
150 | <div class="box box-right"> |
|
150 | <div class="box box-right"> | |
151 | <div class="title"> |
|
151 | <div class="title"> | |
152 | <h5>${_('Administration')}</h5> |
|
152 | <h5>${_('Administration')}</h5> | |
153 | </div> |
|
153 | </div> | |
154 |
|
154 | |||
155 | <h3>${_('Statistics')}</h3> |
|
155 | <h3>${_('Statistics')}</h3> | |
156 | ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')} |
|
156 | ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')} | |
157 | <div class="form"> |
|
157 | <div class="form"> | |
158 | <div class="fields"> |
|
158 | <div class="fields"> | |
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')+"');")} |
|
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 | <div class="field" style="border:none;color:#888"> |
|
160 | <div class="field" style="border:none;color:#888"> | |
161 | <ul> |
|
161 | <ul> | |
162 | <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li> |
|
162 | <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li> | |
163 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> |
|
163 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> | |
164 | </ul> |
|
164 | </ul> | |
165 | </div> |
|
165 | </div> | |
166 | </div> |
|
166 | </div> | |
167 | </div> |
|
167 | </div> | |
168 | ${h.end_form()} |
|
168 | ${h.end_form()} | |
169 |
|
169 | |||
170 | %if c.repo_info.clone_uri: |
|
170 | %if c.repo_info.clone_uri: | |
171 | <h3>${_('Remote')}</h3> |
|
171 | <h3>${_('Remote')}</h3> | |
172 | ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')} |
|
172 | ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')} | |
173 | <div class="form"> |
|
173 | <div class="form"> | |
174 | <div class="fields"> |
|
174 | <div class="fields"> | |
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')+"');")} |
|
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 | <div class="field" style="border:none"> |
|
176 | <div class="field" style="border:none"> | |
177 | <ul> |
|
177 | <ul> | |
178 | <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li> |
|
178 | <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li> | |
179 | </ul> |
|
179 | </ul> | |
180 | </div> |
|
180 | </div> | |
181 | </div> |
|
181 | </div> | |
182 | </div> |
|
182 | </div> | |
183 | ${h.end_form()} |
|
183 | ${h.end_form()} | |
184 | %endif |
|
184 | %endif | |
185 |
|
185 | |||
186 | <h3>${_('Cache')}</h3> |
|
186 | <h3>${_('Cache')}</h3> | |
187 | ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')} |
|
187 | ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')} | |
188 | <div class="form"> |
|
188 | <div class="form"> | |
189 | <div class="fields"> |
|
189 | <div class="fields"> | |
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')+"');")} |
|
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 | <div class="field" style="border:none;color:#888"> |
|
191 | <div class="field" style="border:none;color:#888"> | |
192 | <ul> |
|
192 | <ul> | |
193 | <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')} |
|
193 | <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')} | |
194 | </li> |
|
194 | </li> | |
195 | </ul> |
|
195 | </ul> | |
196 | </div> |
|
196 | </div> | |
197 | <div class="field" style="border:none;"> |
|
197 | <div class="field" style="border:none;"> | |
198 | ${_('List of cached values')} |
|
198 | ${_('List of cached values')} | |
199 | <table> |
|
199 | <table> | |
200 | <tr> |
|
200 | <tr> | |
201 | <th>${_('Prefix')}</th> |
|
201 | <th>${_('Prefix')}</th> | |
202 | <th>${_('Key')}</th> |
|
202 | <th>${_('Key')}</th> | |
203 | <th>${_('Active')}</th> |
|
203 | <th>${_('Active')}</th> | |
204 | </tr> |
|
204 | </tr> | |
205 | %for cache in c.repo_info.cache_keys: |
|
205 | %for cache in c.repo_info.cache_keys: | |
206 | <tr> |
|
206 | <tr> | |
207 | <td>${cache.prefix or '-'}</td> |
|
207 | <td>${cache.prefix or '-'}</td> | |
208 | <td>${cache.cache_key}</td> |
|
208 | <td>${cache.cache_key}</td> | |
209 | <td>${h.bool2icon(cache.cache_active)}</td> |
|
209 | <td>${h.bool2icon(cache.cache_active)}</td> | |
210 | </tr> |
|
210 | </tr> | |
211 | %endfor |
|
211 | %endfor | |
212 | </table> |
|
212 | </table> | |
213 | </div> |
|
213 | </div> | |
214 | </div> |
|
214 | </div> | |
215 | </div> |
|
215 | </div> | |
216 | ${h.end_form()} |
|
216 | ${h.end_form()} | |
217 |
|
217 | |||
218 | <h3>${_('Public journal')}</h3> |
|
218 | <h3>${_('Public journal')}</h3> | |
219 | ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')} |
|
219 | ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')} | |
220 | <div class="form"> |
|
220 | <div class="form"> | |
221 | ${h.hidden('auth_token',str(h.get_token()))} |
|
221 | ${h.hidden('auth_token',str(h.get_token()))} | |
222 | <div class="field"> |
|
222 | <div class="field"> | |
223 | %if c.in_public_journal: |
|
223 | %if c.in_public_journal: | |
224 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")} |
|
224 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")} | |
225 | %else: |
|
225 | %else: | |
226 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")} |
|
226 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")} | |
227 | %endif |
|
227 | %endif | |
228 | </div> |
|
228 | </div> | |
229 | <div class="field" style="border:none;color:#888"> |
|
229 | <div class="field" style="border:none;color:#888"> | |
230 | <ul> |
|
230 | <ul> | |
231 | <li>${_('All actions made on this repository will be accessible to everyone in public journal')} |
|
231 | <li>${_('All actions made on this repository will be accessible to everyone in public journal')} | |
232 | </li> |
|
232 | </li> | |
233 | </ul> |
|
233 | </ul> | |
234 | </div> |
|
234 | </div> | |
235 | </div> |
|
235 | </div> | |
236 | ${h.end_form()} |
|
236 | ${h.end_form()} | |
237 |
|
237 | |||
238 | <h3>${_('Locking')}</h3> |
|
238 | <h3>${_('Locking')}</h3> | |
239 | ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')} |
|
239 | ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')} | |
240 | <div class="form"> |
|
240 | <div class="form"> | |
241 | <div class="fields"> |
|
241 | <div class="fields"> | |
242 | %if c.repo_info.locked[0]: |
|
242 | %if c.repo_info.locked[0]: | |
243 | ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")} |
|
243 | ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")} | |
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])))} |
|
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 | %else: |
|
245 | %else: | |
246 | ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")} |
|
246 | ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")} | |
247 | ${_('Repository is not locked')} |
|
247 | ${_('Repository is not locked')} | |
248 | %endif |
|
248 | %endif | |
249 | </div> |
|
249 | </div> | |
250 | <div class="field" style="border:none;color:#888"> |
|
250 | <div class="field" style="border:none;color:#888"> | |
251 | <ul> |
|
251 | <ul> | |
252 | <li>${_('Force locking on repository. Works only when anonymous access is disabled')} |
|
252 | <li>${_('Force locking on repository. Works only when anonymous access is disabled')} | |
253 | </li> |
|
253 | </li> | |
254 | </ul> |
|
254 | </ul> | |
255 | </div> |
|
255 | </div> | |
256 | </div> |
|
256 | </div> | |
257 | ${h.end_form()} |
|
257 | ${h.end_form()} | |
258 |
|
258 | |||
259 | <h3>${_('Set as fork of')}</h3> |
|
259 | <h3>${_('Set as fork of')}</h3> | |
260 | ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')} |
|
260 | ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')} | |
261 | <div class="form"> |
|
261 | <div class="form"> | |
262 | <div class="fields"> |
|
262 | <div class="fields"> | |
263 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} |
|
263 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} | |
264 | ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)} |
|
264 | ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)} | |
265 | </div> |
|
265 | </div> | |
266 | <div class="field" style="border:none;color:#888"> |
|
266 | <div class="field" style="border:none;color:#888"> | |
267 | <ul> |
|
267 | <ul> | |
268 | <li>${_('''Manually set this repository as a fork of another from the list''')}</li> |
|
268 | <li>${_('''Manually set this repository as a fork of another from the list''')}</li> | |
269 | </ul> |
|
269 | </ul> | |
270 | </div> |
|
270 | </div> | |
271 | </div> |
|
271 | </div> | |
272 | ${h.end_form()} |
|
272 | ${h.end_form()} | |
273 |
|
273 | |||
274 | <h3>${_('Delete')}</h3> |
|
274 | <h3>${_('Delete')}</h3> | |
275 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')} |
|
275 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')} | |
276 | <div class="form"> |
|
276 | <div class="form"> | |
277 | <div class="fields"> |
|
277 | <div class="fields"> | |
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')+"');")} |
|
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 | </div> |
|
279 | </div> | |
280 | <div class="field" style="border:none;color:#888"> |
|
280 | <div class="field" style="border:none;color:#888"> | |
281 | <ul> |
|
281 | <ul> | |
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> |
|
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 | </ul> |
|
283 | </ul> | |
284 | </div> |
|
284 | </div> | |
285 | </div> |
|
285 | </div> | |
286 | ${h.end_form()} |
|
286 | ${h.end_form()} | |
287 | </div> |
|
287 | </div> | |
288 |
|
288 | |||
289 | </%def> |
|
289 | </%def> |
@@ -1,128 +1,128 b'' | |||||
1 | <table id="permissions_manage" class="noborder"> |
|
1 | <table id="permissions_manage" class="noborder"> | |
2 | <tr> |
|
2 | <tr> | |
3 | <td>${_('none')}</td> |
|
3 | <td>${_('none')}</td> | |
4 | <td>${_('read')}</td> |
|
4 | <td>${_('read')}</td> | |
5 | <td>${_('write')}</td> |
|
5 | <td>${_('write')}</td> | |
6 | <td>${_('admin')}</td> |
|
6 | <td>${_('admin')}</td> | |
7 | <td>${_('member')}</td> |
|
7 | <td>${_('member')}</td> | |
8 | <td></td> |
|
8 | <td></td> | |
9 | </tr> |
|
9 | </tr> | |
10 | ## USERS |
|
10 | ## USERS | |
11 | %for r2p in c.repo_info.repo_to_perm: |
|
11 | %for r2p in c.repo_info.repo_to_perm: | |
12 | %if r2p.user.username =='default' and c.repo_info.private: |
|
12 | %if r2p.user.username =='default' and c.repo_info.private: | |
13 | <tr> |
|
13 | <tr> | |
14 | <td colspan="4"> |
|
14 | <td colspan="4"> | |
15 | <span class="private_repo_msg"> |
|
15 | <span class="private_repo_msg"> | |
16 | ${_('private repository')} |
|
16 | ${_('private repository')} | |
17 | </span> |
|
17 | </span> | |
18 | </td> |
|
18 | </td> | |
19 | <td class="private_repo_msg"><img style="vertical-align:bottom" src="${h.url('/images/icons/user.png')}"/>${_('default')}</td> |
|
19 | <td class="private_repo_msg"><img style="vertical-align:bottom" src="${h.url('/images/icons/user.png')}"/>${_('default')}</td> | |
20 | </tr> |
|
20 | </tr> | |
21 | %else: |
|
21 | %else: | |
22 | <tr id="id${id(r2p.user.username)}"> |
|
22 | <tr id="id${id(r2p.user.username)}"> | |
23 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.none')}</td> |
|
23 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.none')}</td> | |
24 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.read')}</td> |
|
24 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.read')}</td> | |
25 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.write')}</td> |
|
25 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.write')}</td> | |
26 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.admin')}</td> |
|
26 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.admin')}</td> | |
27 | <td style="white-space: nowrap;"> |
|
27 | <td style="white-space: nowrap;"> | |
28 | <img class="perm-gravatar" src="${h.gravatar_url(r2p.user.email,14)}"/>${r2p.user.username if r2p.user.username != 'default' else _('default')} |
|
28 | <img class="perm-gravatar" src="${h.gravatar_url(r2p.user.email,14)}"/>${r2p.user.username if r2p.user.username != 'default' else _('default')} | |
29 | </td> |
|
29 | </td> | |
30 | <td> |
|
30 | <td> | |
31 | %if r2p.user.username !='default': |
|
31 | %if r2p.user.username !='default': | |
32 | <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')"> |
|
32 | <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')"> | |
33 | ${_('revoke')} |
|
33 | ${_('revoke')} | |
34 | </span> |
|
34 | </span> | |
35 | %endif |
|
35 | %endif | |
36 | </td> |
|
36 | </td> | |
37 | </tr> |
|
37 | </tr> | |
38 | %endif |
|
38 | %endif | |
39 | %endfor |
|
39 | %endfor | |
40 |
|
40 | |||
41 | ## USERS GROUPS |
|
41 | ## USERS GROUPS | |
42 | %for g2p in c.repo_info.users_group_to_perm: |
|
42 | %for g2p in c.repo_info.users_group_to_perm: | |
43 | <tr id="id${id(g2p.users_group.users_group_name)}"> |
|
43 | <tr id="id${id(g2p.users_group.users_group_name)}"> | |
44 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.none')}</td> |
|
44 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.none')}</td> | |
45 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.read')}</td> |
|
45 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.read')}</td> | |
46 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.write')}</td> |
|
46 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.write')}</td> | |
47 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.admin')}</td> |
|
47 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.admin')}</td> | |
48 | <td style="white-space: nowrap;"> |
|
48 | <td style="white-space: nowrap;"> | |
49 | <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/> |
|
49 | <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/> | |
50 | %if h.HasPermissionAny('hg.admin')(): |
|
50 | %if h.HasPermissionAny('hg.admin')(): | |
51 | <a href="${h.url('edit_users_group',id=g2p.users_group.users_group_id)}">${g2p.users_group.users_group_name}</a> |
|
51 | <a href="${h.url('edit_users_group',id=g2p.users_group.users_group_id)}">${g2p.users_group.users_group_name}</a> | |
52 | %else: |
|
52 | %else: | |
53 | ${g2p.users_group.users_group_name} |
|
53 | ${g2p.users_group.users_group_name} | |
54 | %endif |
|
54 | %endif | |
55 | </td> |
|
55 | </td> | |
56 | <td> |
|
56 | <td> | |
57 | <span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')"> |
|
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 | ${_('revoke')} |
|
58 | ${_('revoke')} | |
59 | </span> |
|
59 | </span> | |
60 | </td> |
|
60 | </td> | |
61 | </tr> |
|
61 | </tr> | |
62 | %endfor |
|
62 | %endfor | |
63 | <% |
|
63 | <% | |
64 | _tmpl = h.literal("""' \ |
|
64 | _tmpl = h.literal("""' \ | |
65 | <td><input type="radio" value="repository.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
|
65 | <td><input type="radio" value="repository.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ | |
66 | <td><input type="radio" value="repository.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
|
66 | <td><input type="radio" value="repository.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ | |
67 | <td><input type="radio" value="repository.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
|
67 | <td><input type="radio" value="repository.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ | |
68 | <td><input type="radio" value="repository.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
|
68 | <td><input type="radio" value="repository.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ | |
69 | <td class="ac"> \ |
|
69 | <td class="ac"> \ | |
70 | <div class="perm_ac" id="perm_ac_{0}"> \ |
|
70 | <div class="perm_ac" id="perm_ac_{0}"> \ | |
71 | <input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \ |
|
71 | <input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \ | |
72 | <input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden"> \ |
|
72 | <input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden"> \ | |
73 | <div id="perm_container_{0}"></div> \ |
|
73 | <div id="perm_container_{0}"></div> \ | |
74 | </div> \ |
|
74 | </div> \ | |
75 | </td> \ |
|
75 | </td> \ | |
76 | <td></td>'""") |
|
76 | <td></td>'""") | |
77 | %> |
|
77 | %> | |
78 | ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl' |
|
78 | ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl' | |
79 | <tr class="new_members last_new_member" id="add_perm_input"></tr> |
|
79 | <tr class="new_members last_new_member" id="add_perm_input"></tr> | |
80 | <tr> |
|
80 | <tr> | |
81 | <td colspan="6"> |
|
81 | <td colspan="6"> | |
82 | <span id="add_perm" class="add_icon" style="cursor: pointer;"> |
|
82 | <span id="add_perm" class="add_icon" style="cursor: pointer;"> | |
83 | ${_('Add another member')} |
|
83 | ${_('Add another member')} | |
84 | </span> |
|
84 | </span> | |
85 | </td> |
|
85 | </td> | |
86 | </tr> |
|
86 | </tr> | |
87 | </table> |
|
87 | </table> | |
88 | <script type="text/javascript"> |
|
88 | <script type="text/javascript"> | |
89 | function ajaxActionUser(user_id, field_id) { |
|
89 | function ajaxActionUser(user_id, field_id) { | |
90 | var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}"; |
|
90 | var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}"; | |
91 | var callback = { |
|
91 | var callback = { | |
92 | success: function (o) { |
|
92 | success: function (o) { | |
93 | var tr = YUD.get(String(field_id)); |
|
93 | var tr = YUD.get(String(field_id)); | |
94 | tr.parentNode.removeChild(tr); |
|
94 | tr.parentNode.removeChild(tr); | |
95 | }, |
|
95 | }, | |
96 | failure: function (o) { |
|
96 | failure: function (o) { | |
97 | alert("${_('Failed to remove user')}"); |
|
97 | alert("${_('Failed to remove user')}"); | |
98 | }, |
|
98 | }, | |
99 | }; |
|
99 | }; | |
100 | var postData = '_method=delete&user_id=' + user_id; |
|
100 | var postData = '_method=delete&user_id=' + user_id; | |
101 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); |
|
101 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); | |
102 | }; |
|
102 | }; | |
103 |
|
103 | |||
104 | function ajaxActionUsersGroup(users_group_id,field_id){ |
|
104 | function ajaxActionUsersGroup(users_group_id,field_id){ | |
105 | var sUrl = "${h.url('delete_repo_users_group',repo_name=c.repo_name)}"; |
|
105 | var sUrl = "${h.url('delete_repo_users_group',repo_name=c.repo_name)}"; | |
106 | var callback = { |
|
106 | var callback = { | |
107 |
|
|
107 | success:function(o){ | |
108 |
|
|
108 | var tr = YUD.get(String(field_id)); | |
109 |
|
|
109 | tr.parentNode.removeChild(tr); | |
110 |
|
|
110 | }, | |
111 | failure:function(o){ |
|
111 | failure:function(o){ | |
112 | alert("${_('Failed to remove users group')}"); |
|
112 | alert("${_('Failed to remove users group')}"); | |
113 | }, |
|
113 | }, | |
114 | }; |
|
114 | }; | |
115 | var postData = '_method=delete&users_group_id='+users_group_id; |
|
115 | var postData = '_method=delete&users_group_id='+users_group_id; | |
116 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); |
|
116 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); | |
117 | }; |
|
117 | }; | |
118 |
|
118 | |||
119 | YUE.onDOMReady(function () { |
|
119 | YUE.onDOMReady(function () { | |
120 | if (!YUD.hasClass('perm_new_member_name', 'error')) { |
|
120 | if (!YUD.hasClass('perm_new_member_name', 'error')) { | |
121 | YUD.setStyle('add_perm_input', 'display', 'none'); |
|
121 | YUD.setStyle('add_perm_input', 'display', 'none'); | |
122 | } |
|
122 | } | |
123 | YAHOO.util.Event.addListener('add_perm', 'click', function () { |
|
123 | YAHOO.util.Event.addListener('add_perm', 'click', function () { | |
124 | addPermAction(${_tmpl}, ${c.users_array|n}, ${c.users_groups_array|n}); |
|
124 | addPermAction(${_tmpl}, ${c.users_array|n}, ${c.users_groups_array|n}); | |
125 | }); |
|
125 | }); | |
126 | }); |
|
126 | }); | |
127 |
|
127 | |||
128 | </script> |
|
128 | </script> |
@@ -1,142 +1,142 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Repositories administration')} - ${c.rhodecode_name} |
|
5 | ${_('Repositories administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} » <span id="repo_count">0</span> ${_('repositories')} |
|
9 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} » <span id="repo_count">0</span> ${_('repositories')} | |
10 | </%def> |
|
10 | </%def> | |
11 | <%def name="page_nav()"> |
|
11 | <%def name="page_nav()"> | |
12 |
|
|
12 | ${self.menu('admin')} | |
13 | </%def> |
|
13 | </%def> | |
14 | <%def name="main()"> |
|
14 | <%def name="main()"> | |
15 | <div class="box"> |
|
15 | <div class="box"> | |
16 |
|
16 | |||
17 | <div class="title"> |
|
17 | <div class="title"> | |
18 | ${self.breadcrumbs()} |
|
18 | ${self.breadcrumbs()} | |
19 | <ul class="links"> |
|
19 | <ul class="links"> | |
20 | <li> |
|
20 | <li> | |
21 | <span>${h.link_to(_(u'ADD REPOSITORY'),h.url('new_repo'))}</span> |
|
21 | <span>${h.link_to(_(u'ADD REPOSITORY'),h.url('new_repo'))}</span> | |
22 | </li> |
|
22 | </li> | |
23 | </ul> |
|
23 | </ul> | |
24 | </div> |
|
24 | </div> | |
25 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> |
|
25 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> | |
26 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
26 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
27 |
|
27 | |||
28 |
|
28 | |||
29 | </div> |
|
29 | </div> | |
30 | <script> |
|
30 | <script> | |
31 | var url = "${h.url('formatted_users', format='json')}"; |
|
31 | var url = "${h.url('formatted_users', format='json')}"; | |
32 | var data = ${c.data|n}; |
|
32 | var data = ${c.data|n}; | |
33 | var myDataSource = new YAHOO.util.DataSource(data); |
|
33 | var myDataSource = new YAHOO.util.DataSource(data); | |
34 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
34 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
35 |
|
35 | |||
36 | myDataSource.responseSchema = { |
|
36 | myDataSource.responseSchema = { | |
37 | resultsList: "records", |
|
37 | resultsList: "records", | |
38 | fields: [ |
|
38 | fields: [ | |
39 | {key:"menu"}, |
|
39 | {key:"menu"}, | |
40 | {key:"raw_name"}, |
|
40 | {key:"raw_name"}, | |
41 | {key:"name"}, |
|
41 | {key:"name"}, | |
42 | {key:"desc"}, |
|
42 | {key:"desc"}, | |
43 | {key:"last_changeset"}, |
|
43 | {key:"last_changeset"}, | |
44 | {key:"owner"}, |
|
44 | {key:"owner"}, | |
45 | {key:"action"}, |
|
45 | {key:"action"}, | |
46 | ] |
|
46 | ] | |
47 | }; |
|
47 | }; | |
48 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
48 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
49 | // This is the filter function |
|
49 | // This is the filter function | |
50 | var data = res.results || [], |
|
50 | var data = res.results || [], | |
51 | filtered = [], |
|
51 | filtered = [], | |
52 | i,l; |
|
52 | i,l; | |
53 |
|
53 | |||
54 | if (req) { |
|
54 | if (req) { | |
55 | req = req.toLowerCase(); |
|
55 | req = req.toLowerCase(); | |
56 | for (i = 0; i<data.length; i++) { |
|
56 | for (i = 0; i<data.length; i++) { | |
57 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
57 | var pos = data[i].raw_name.toLowerCase().indexOf(req) | |
58 | if (pos != -1) { |
|
58 | if (pos != -1) { | |
59 | filtered.push(data[i]); |
|
59 | filtered.push(data[i]); | |
60 | } |
|
60 | } | |
61 | } |
|
61 | } | |
62 | res.results = filtered; |
|
62 | res.results = filtered; | |
63 | } |
|
63 | } | |
64 | YUD.get('repo_count').innerHTML = res.results.length; |
|
64 | YUD.get('repo_count').innerHTML = res.results.length; | |
65 | return res; |
|
65 | return res; | |
66 | } |
|
66 | } | |
67 |
|
67 | |||
68 | // main table sorting |
|
68 | // main table sorting | |
69 | var myColumnDefs = [ |
|
69 | var myColumnDefs = [ | |
70 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
70 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
71 | {key:"name",label:"${_('Name')}",sortable:true, |
|
71 | {key:"name",label:"${_('Name')}",sortable:true, | |
72 |
|
|
72 | sortOptions: { sortFunction: nameSort }}, | |
73 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
73 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
74 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
74 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, | |
75 | sortOptions: { sortFunction: revisionSort }}, |
|
75 | sortOptions: { sortFunction: revisionSort }}, | |
76 | {key:"owner",label:"${_('Owner')}",sortable:true}, |
|
76 | {key:"owner",label:"${_('Owner')}",sortable:true}, | |
77 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
77 | {key:"action",label:"${_('Action')}",sortable:false}, | |
78 | ]; |
|
78 | ]; | |
79 |
|
79 | |||
80 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
|
80 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ | |
81 | sortedBy:{key:"name",dir:"asc"}, |
|
81 | sortedBy:{key:"name",dir:"asc"}, | |
82 | paginator: new YAHOO.widget.Paginator({ |
|
82 | paginator: new YAHOO.widget.Paginator({ | |
83 | rowsPerPage: 25, |
|
83 | rowsPerPage: 25, | |
84 | alwaysVisible: false, |
|
84 | alwaysVisible: false, | |
85 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
85 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
86 | pageLinks: 5, |
|
86 | pageLinks: 5, | |
87 | containerClass: 'pagination-wh', |
|
87 | containerClass: 'pagination-wh', | |
88 | currentPageClass: 'pager_curpage', |
|
88 | currentPageClass: 'pager_curpage', | |
89 | pageLinkClass: 'pager_link', |
|
89 | pageLinkClass: 'pager_link', | |
90 | nextPageLinkLabel: '>', |
|
90 | nextPageLinkLabel: '>', | |
91 | previousPageLinkLabel: '<', |
|
91 | previousPageLinkLabel: '<', | |
92 | firstPageLinkLabel: '<<', |
|
92 | firstPageLinkLabel: '<<', | |
93 | lastPageLinkLabel: '>>', |
|
93 | lastPageLinkLabel: '>>', | |
94 | containers:['user-paginator'] |
|
94 | containers:['user-paginator'] | |
95 | }), |
|
95 | }), | |
96 |
|
96 | |||
97 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
97 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
98 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
98 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
99 | MSG_EMPTY:"${_('No records found.')}", |
|
99 | MSG_EMPTY:"${_('No records found.')}", | |
100 | MSG_ERROR:"${_('Data error.')}", |
|
100 | MSG_ERROR:"${_('Data error.')}", | |
101 | MSG_LOADING:"${_('Loading...')}", |
|
101 | MSG_LOADING:"${_('Loading...')}", | |
102 | } |
|
102 | } | |
103 | ); |
|
103 | ); | |
104 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
104 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
105 | tooltip_activate(); |
|
105 | tooltip_activate(); | |
106 | quick_repo_menu(); |
|
106 | quick_repo_menu(); | |
107 | }); |
|
107 | }); | |
108 |
|
108 | |||
109 | var filterTimeout = null; |
|
109 | var filterTimeout = null; | |
110 |
|
110 | |||
111 | updateFilter = function () { |
|
111 | updateFilter = function () { | |
112 | // Reset timeout |
|
112 | // Reset timeout | |
113 | filterTimeout = null; |
|
113 | filterTimeout = null; | |
114 |
|
114 | |||
115 | // Reset sort |
|
115 | // Reset sort | |
116 | var state = myDataTable.getState(); |
|
116 | var state = myDataTable.getState(); | |
117 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
117 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
118 |
|
118 | |||
119 | // Get filtered data |
|
119 | // Get filtered data | |
120 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
120 | myDataSource.sendRequest(YUD.get('q_filter').value,{ | |
121 | success : myDataTable.onDataReturnInitializeTable, |
|
121 | success : myDataTable.onDataReturnInitializeTable, | |
122 | failure : myDataTable.onDataReturnInitializeTable, |
|
122 | failure : myDataTable.onDataReturnInitializeTable, | |
123 | scope : myDataTable, |
|
123 | scope : myDataTable, | |
124 | argument: state |
|
124 | argument: state | |
125 | }); |
|
125 | }); | |
126 |
|
126 | |||
127 | }; |
|
127 | }; | |
128 | YUE.on('q_filter','click',function(){ |
|
128 | YUE.on('q_filter','click',function(){ | |
129 |
|
|
129 | if(!YUD.hasClass('q_filter', 'loaded')){ | |
130 |
|
|
130 | YUD.get('q_filter').value = ''; | |
131 |
|
|
131 | //TODO: load here full list later to do search within groups | |
132 |
|
|
132 | YUD.addClass('q_filter', 'loaded'); | |
133 | } |
|
133 | } | |
134 | }); |
|
134 | }); | |
135 |
|
135 | |||
136 | YUE.on('q_filter','keyup',function (e) { |
|
136 | YUE.on('q_filter','keyup',function (e) { | |
137 | clearTimeout(filterTimeout); |
|
137 | clearTimeout(filterTimeout); | |
138 | filterTimeout = setTimeout(updateFilter,600); |
|
138 | filterTimeout = setTimeout(updateFilter,600); | |
139 | }); |
|
139 | }); | |
140 | </script> |
|
140 | </script> | |
141 |
|
141 | |||
142 | </%def> |
|
142 | </%def> |
@@ -1,120 +1,120 b'' | |||||
1 | <table id="permissions_manage" class="noborder"> |
|
1 | <table id="permissions_manage" class="noborder"> | |
2 | <tr> |
|
2 | <tr> | |
3 | <td>${_('none')}</td> |
|
3 | <td>${_('none')}</td> | |
4 | <td>${_('read')}</td> |
|
4 | <td>${_('read')}</td> | |
5 | <td>${_('write')}</td> |
|
5 | <td>${_('write')}</td> | |
6 | <td>${_('admin')}</td> |
|
6 | <td>${_('admin')}</td> | |
7 | <td>${_('member')}</td> |
|
7 | <td>${_('member')}</td> | |
8 | <td></td> |
|
8 | <td></td> | |
9 | </tr> |
|
9 | </tr> | |
10 | ## USERS |
|
10 | ## USERS | |
11 | %for r2p in c.repos_group.repo_group_to_perm: |
|
11 | %for r2p in c.repos_group.repo_group_to_perm: | |
12 | <tr id="id${id(r2p.user.username)}"> |
|
12 | <tr id="id${id(r2p.user.username)}"> | |
13 | <td>${h.radio('u_perm_%s' % r2p.user.username,'group.none')}</td> |
|
13 | <td>${h.radio('u_perm_%s' % r2p.user.username,'group.none')}</td> | |
14 | <td>${h.radio('u_perm_%s' % r2p.user.username,'group.read')}</td> |
|
14 | <td>${h.radio('u_perm_%s' % r2p.user.username,'group.read')}</td> | |
15 | <td>${h.radio('u_perm_%s' % r2p.user.username,'group.write')}</td> |
|
15 | <td>${h.radio('u_perm_%s' % r2p.user.username,'group.write')}</td> | |
16 | <td>${h.radio('u_perm_%s' % r2p.user.username,'group.admin')}</td> |
|
16 | <td>${h.radio('u_perm_%s' % r2p.user.username,'group.admin')}</td> | |
17 | <td style="white-space: nowrap;"> |
|
17 | <td style="white-space: nowrap;"> | |
18 | <img class="perm-gravatar" src="${h.gravatar_url(r2p.user.email,14)}"/>${r2p.user.username if r2p.user.username != 'default' else _('default')} |
|
18 | <img class="perm-gravatar" src="${h.gravatar_url(r2p.user.email,14)}"/>${r2p.user.username if r2p.user.username != 'default' else _('default')} | |
19 | </td> |
|
19 | </td> | |
20 | <td> |
|
20 | <td> | |
21 | %if r2p.user.username !='default': |
|
21 | %if r2p.user.username !='default': | |
22 | <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')"> |
|
22 | <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')"> | |
23 | ${_('revoke')} |
|
23 | ${_('revoke')} | |
24 | </span> |
|
24 | </span> | |
25 | %endif |
|
25 | %endif | |
26 | </td> |
|
26 | </td> | |
27 | </tr> |
|
27 | </tr> | |
28 | %endfor |
|
28 | %endfor | |
29 |
|
29 | |||
30 | ## USERS GROUPS |
|
30 | ## USERS GROUPS | |
31 | %for g2p in c.repos_group.users_group_to_perm: |
|
31 | %for g2p in c.repos_group.users_group_to_perm: | |
32 | <tr id="id${id(g2p.users_group.users_group_name)}"> |
|
32 | <tr id="id${id(g2p.users_group.users_group_name)}"> | |
33 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.none')}</td> |
|
33 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.none')}</td> | |
34 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.read')}</td> |
|
34 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.read')}</td> | |
35 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.write')}</td> |
|
35 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.write')}</td> | |
36 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.admin')}</td> |
|
36 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.admin')}</td> | |
37 | <td style="white-space: nowrap;"> |
|
37 | <td style="white-space: nowrap;"> | |
38 | <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>${g2p.users_group.users_group_name} |
|
38 | <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>${g2p.users_group.users_group_name} | |
39 | </td> |
|
39 | </td> | |
40 | <td> |
|
40 | <td> | |
41 | <span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')"> |
|
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 | ${_('revoke')} |
|
42 | ${_('revoke')} | |
43 | </span> |
|
43 | </span> | |
44 | </td> |
|
44 | </td> | |
45 | </tr> |
|
45 | </tr> | |
46 | %endfor |
|
46 | %endfor | |
47 | <% |
|
47 | <% | |
48 | _tmpl = h.literal("""' \ |
|
48 | _tmpl = h.literal("""' \ | |
49 | <td><input type="radio" value="group.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
|
49 | <td><input type="radio" value="group.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ | |
50 | <td><input type="radio" value="group.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
|
50 | <td><input type="radio" value="group.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ | |
51 | <td><input type="radio" value="group.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
|
51 | <td><input type="radio" value="group.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ | |
52 | <td><input type="radio" value="group.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
|
52 | <td><input type="radio" value="group.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ | |
53 | <td class="ac"> \ |
|
53 | <td class="ac"> \ | |
54 | <div class="perm_ac" id="perm_ac_{0}"> \ |
|
54 | <div class="perm_ac" id="perm_ac_{0}"> \ | |
55 | <input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \ |
|
55 | <input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \ | |
56 | <input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden"> \ |
|
56 | <input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden"> \ | |
57 | <div id="perm_container_{0}"></div> \ |
|
57 | <div id="perm_container_{0}"></div> \ | |
58 | </div> \ |
|
58 | </div> \ | |
59 | </td> \ |
|
59 | </td> \ | |
60 | <td></td>'""") |
|
60 | <td></td>'""") | |
61 | %> |
|
61 | %> | |
62 | ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl' |
|
62 | ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl' | |
63 | <tr class="new_members last_new_member" id="add_perm_input"></tr> |
|
63 | <tr class="new_members last_new_member" id="add_perm_input"></tr> | |
64 | <tr> |
|
64 | <tr> | |
65 | <td colspan="6"> |
|
65 | <td colspan="6"> | |
66 | <span id="add_perm" class="add_icon" style="cursor: pointer;"> |
|
66 | <span id="add_perm" class="add_icon" style="cursor: pointer;"> | |
67 | ${_('Add another member')} |
|
67 | ${_('Add another member')} | |
68 | </span> |
|
68 | </span> | |
69 | </td> |
|
69 | </td> | |
70 | </tr> |
|
70 | </tr> | |
71 | <tr> |
|
71 | <tr> | |
72 | <td colspan="6"> |
|
72 | <td colspan="6"> | |
73 | ${h.checkbox('recursive',value="True", label=_('apply to children'))} |
|
73 | ${h.checkbox('recursive',value="True", label=_('apply to children'))} | |
74 | <span class="help-block">${_('Set or revoke permission to all children of that group, including repositories and other groups')}</span> |
|
74 | <span class="help-block">${_('Set or revoke permission to all children of that group, including repositories and other groups')}</span> | |
75 | </td> |
|
75 | </td> | |
76 | </tr> |
|
76 | </tr> | |
77 | </table> |
|
77 | </table> | |
78 | <script type="text/javascript"> |
|
78 | <script type="text/javascript"> | |
79 | function ajaxActionUser(user_id, field_id) { |
|
79 | function ajaxActionUser(user_id, field_id) { | |
80 | var sUrl = "${h.url('delete_repos_group_user_perm',group_name=c.repos_group.group_name)}"; |
|
80 | var sUrl = "${h.url('delete_repos_group_user_perm',group_name=c.repos_group.group_name)}"; | |
81 | var callback = { |
|
81 | var callback = { | |
82 | success: function (o) { |
|
82 | success: function (o) { | |
83 | var tr = YUD.get(String(field_id)); |
|
83 | var tr = YUD.get(String(field_id)); | |
84 | tr.parentNode.removeChild(tr); |
|
84 | tr.parentNode.removeChild(tr); | |
85 | }, |
|
85 | }, | |
86 | failure: function (o) { |
|
86 | failure: function (o) { | |
87 | alert("${_('Failed to remove user')}"); |
|
87 | alert("${_('Failed to remove user')}"); | |
88 | }, |
|
88 | }, | |
89 | }; |
|
89 | }; | |
90 | var recursive = YUD.get('recursive').checked; |
|
90 | var recursive = YUD.get('recursive').checked; | |
91 | var postData = '_method=delete&recursive={0}&user_id={1}'.format(recursive,user_id); |
|
91 | var postData = '_method=delete&recursive={0}&user_id={1}'.format(recursive,user_id); | |
92 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); |
|
92 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); | |
93 | }; |
|
93 | }; | |
94 |
|
94 | |||
95 | function ajaxActionUsersGroup(users_group_id,field_id){ |
|
95 | function ajaxActionUsersGroup(users_group_id,field_id){ | |
96 | var sUrl = "${h.url('delete_repos_group_users_group_perm',group_name=c.repos_group.group_name)}"; |
|
96 | var sUrl = "${h.url('delete_repos_group_users_group_perm',group_name=c.repos_group.group_name)}"; | |
97 | var callback = { |
|
97 | var callback = { | |
98 | success:function(o){ |
|
98 | success:function(o){ | |
99 | var tr = YUD.get(String(field_id)); |
|
99 | var tr = YUD.get(String(field_id)); | |
100 | tr.parentNode.removeChild(tr); |
|
100 | tr.parentNode.removeChild(tr); | |
101 | }, |
|
101 | }, | |
102 | failure:function(o){ |
|
102 | failure:function(o){ | |
103 | alert("${_('Failed to remove users group')}"); |
|
103 | alert("${_('Failed to remove users group')}"); | |
104 | }, |
|
104 | }, | |
105 | }; |
|
105 | }; | |
106 | var recursive = YUD.get('recursive').checked; |
|
106 | var recursive = YUD.get('recursive').checked; | |
107 | var postData = '_method=delete&recursive={0}&users_group_id={1}'.format(recursive,users_group_id); |
|
107 | var postData = '_method=delete&recursive={0}&users_group_id={1}'.format(recursive,users_group_id); | |
108 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); |
|
108 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); | |
109 | }; |
|
109 | }; | |
110 |
|
110 | |||
111 | YUE.onDOMReady(function () { |
|
111 | YUE.onDOMReady(function () { | |
112 | if (!YUD.hasClass('perm_new_member_name', 'error')) { |
|
112 | if (!YUD.hasClass('perm_new_member_name', 'error')) { | |
113 | YUD.setStyle('add_perm_input', 'display', 'none'); |
|
113 | YUD.setStyle('add_perm_input', 'display', 'none'); | |
114 | } |
|
114 | } | |
115 | YAHOO.util.Event.addListener('add_perm', 'click', function () { |
|
115 | YAHOO.util.Event.addListener('add_perm', 'click', function () { | |
116 |
|
|
116 | addPermAction(${_tmpl}, ${c.users_array|n}, ${c.users_groups_array|n}); | |
117 | }); |
|
117 | }); | |
118 | }); |
|
118 | }); | |
119 |
|
119 | |||
120 | </script> |
|
120 | </script> |
@@ -1,86 +1,86 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Edit repos group')} ${c.repos_group.name} - ${c.rhodecode_name} |
|
5 | ${_('Edit repos group')} ${c.repos_group.name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(_('Repos groups'),h.url('repos_groups'))} |
|
10 | ${h.link_to(_('Repos groups'),h.url('repos_groups'))} | |
11 | » |
|
11 | » | |
12 | ${_('edit repos group')} "${c.repos_group.name}" |
|
12 | ${_('edit repos group')} "${c.repos_group.name}" | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
16 | ${self.menu('admin')} |
|
16 | ${self.menu('admin')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
24 | <ul class="links"> |
|
24 | <ul class="links"> | |
25 | <li> |
|
25 | <li> | |
26 | <span>${h.link_to(_(u'ADD NEW CHILD GROUP'),h.url('new_repos_group', parent_group=c.repos_group.group_id))}</span> |
|
26 | <span>${h.link_to(_(u'ADD NEW CHILD GROUP'),h.url('new_repos_group', parent_group=c.repos_group.group_id))}</span> | |
27 | </li> |
|
27 | </li> | |
28 | </ul> |
|
28 | </ul> | |
29 | </div> |
|
29 | </div> | |
30 | <!-- end box / title --> |
|
30 | <!-- end box / title --> | |
31 | ${h.form(url('repos_group',id=c.repos_group.group_id),method='put')} |
|
31 | ${h.form(url('repos_group',id=c.repos_group.group_id),method='put')} | |
32 | <div class="form"> |
|
32 | <div class="form"> | |
33 | <!-- fields --> |
|
33 | <!-- fields --> | |
34 | <div class="fields"> |
|
34 | <div class="fields"> | |
35 | <div class="field"> |
|
35 | <div class="field"> | |
36 | <div class="label"> |
|
36 | <div class="label"> | |
37 | <label for="group_name">${_('Group name')}:</label> |
|
37 | <label for="group_name">${_('Group name')}:</label> | |
38 | </div> |
|
38 | </div> | |
39 | <div class="input"> |
|
39 | <div class="input"> | |
40 | ${h.text('group_name',class_='medium')} |
|
40 | ${h.text('group_name',class_='medium')} | |
41 | </div> |
|
41 | </div> | |
42 | </div> |
|
42 | </div> | |
43 |
|
43 | |||
44 |
|
|
44 | <div class="field"> | |
45 |
|
|
45 | <div class="label label-textarea"> | |
46 |
|
|
46 | <label for="group_description">${_('Description')}:</label> | |
47 |
|
|
47 | </div> | |
48 |
|
|
48 | <div class="textarea text-area editor"> | |
49 |
|
|
49 | ${h.textarea('group_description',cols=23,rows=5,class_="medium")} | |
50 |
|
|
50 | </div> | |
51 |
|
|
51 | </div> | |
52 |
|
52 | |||
53 |
|
|
53 | <div class="field"> | |
54 |
|
|
54 | <div class="label"> | |
55 |
|
|
55 | <label for="group_parent_id">${_('Group parent')}:</label> | |
56 |
|
|
56 | </div> | |
57 |
|
|
57 | <div class="input"> | |
58 |
|
|
58 | ${h.select('group_parent_id','',c.repo_groups,class_="medium")} | |
59 |
|
|
59 | </div> | |
60 |
|
|
60 | </div> | |
61 | <div class="field"> |
|
61 | <div class="field"> | |
62 | <div class="label"> |
|
62 | <div class="label"> | |
63 | <label for="input">${_('Permissions')}:</label> |
|
63 | <label for="input">${_('Permissions')}:</label> | |
64 | </div> |
|
64 | </div> | |
65 | <div class="input"> |
|
65 | <div class="input"> | |
66 | <%include file="repos_group_edit_perms.html"/> |
|
66 | <%include file="repos_group_edit_perms.html"/> | |
67 | </div> |
|
67 | </div> | |
68 | </div> |
|
68 | </div> | |
69 | <div class="field"> |
|
69 | <div class="field"> | |
70 | <div class="label label-checkbox"> |
|
70 | <div class="label label-checkbox"> | |
71 | <label for="enable_locking">${_('Enable locking')}:</label> |
|
71 | <label for="enable_locking">${_('Enable locking')}:</label> | |
72 | </div> |
|
72 | </div> | |
73 | <div class="checkboxes"> |
|
73 | <div class="checkboxes"> | |
74 | ${h.checkbox('enable_locking',value="True")} |
|
74 | ${h.checkbox('enable_locking',value="True")} | |
75 | <span class="help-block">${_('Enable lock-by-pulling on group. This option will be applied to all other groups and repositories inside')}</span> |
|
75 | <span class="help-block">${_('Enable lock-by-pulling on group. This option will be applied to all other groups and repositories inside')}</span> | |
76 | </div> |
|
76 | </div> | |
77 | </div> |
|
77 | </div> | |
78 | <div class="buttons"> |
|
78 | <div class="buttons"> | |
79 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
79 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
80 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
80 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | </div> |
|
83 | </div> | |
84 | ${h.end_form()} |
|
84 | ${h.end_form()} | |
85 | </div> |
|
85 | </div> | |
86 | </%def> |
|
86 | </%def> |
@@ -1,96 +1,96 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Settings administration')} - ${c.rhodecode_name} |
|
5 | ${_('Settings administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} » ${_('Settings')} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} » ${_('Settings')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 |
|
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | </div> |
|
21 | </div> | |
22 | <!-- end box / title --> |
|
22 | <!-- end box / title --> | |
23 |
|
23 | |||
24 | <h3>${_('Built in hooks - read only')}</h3> |
|
24 | <h3>${_('Built in hooks - read only')}</h3> | |
25 | <div class="form"> |
|
25 | <div class="form"> | |
26 | <div class="fields"> |
|
26 | <div class="fields"> | |
27 | % for hook in c.hooks: |
|
27 | % for hook in c.hooks: | |
28 | <div class="field"> |
|
28 | <div class="field"> | |
29 |
|
|
29 | <div class="label label"> | |
30 |
|
|
30 | <label for="${hook.ui_key}">${hook.ui_key}</label> | |
31 |
|
|
31 | </div> | |
32 |
|
|
32 | <div class="input" style="margin-left:280px"> | |
33 | ${h.text(hook.ui_key,hook.ui_value,size=60,readonly="readonly")} |
|
33 | ${h.text(hook.ui_key,hook.ui_value,size=60,readonly="readonly")} | |
34 |
|
|
34 | </div> | |
35 | </div> |
|
35 | </div> | |
36 | % endfor |
|
36 | % endfor | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 |
|
39 | |||
40 | <h3>${_('Custom hooks')}</h3> |
|
40 | <h3>${_('Custom hooks')}</h3> | |
41 | ${h.form(url('admin_setting', setting_id='hooks'),method='put')} |
|
41 | ${h.form(url('admin_setting', setting_id='hooks'),method='put')} | |
42 | <div class="form"> |
|
42 | <div class="form"> | |
43 | <div class="fields"> |
|
43 | <div class="fields"> | |
44 |
|
44 | |||
45 | % for hook in c.custom_hooks: |
|
45 | % for hook in c.custom_hooks: | |
46 | <div class="field" id="${'id%s' % hook.ui_id }"> |
|
46 | <div class="field" id="${'id%s' % hook.ui_id }"> | |
47 | <div class="label label"> |
|
47 | <div class="label label"> | |
48 | <label for="${hook.ui_key}">${hook.ui_key}</label> |
|
48 | <label for="${hook.ui_key}">${hook.ui_key}</label> | |
49 | </div> |
|
49 | </div> | |
50 | <div class="input" style="margin-left:280px"> |
|
50 | <div class="input" style="margin-left:280px"> | |
51 | ${h.hidden('hook_ui_key',hook.ui_key)} |
|
51 | ${h.hidden('hook_ui_key',hook.ui_key)} | |
52 | ${h.hidden('hook_ui_value',hook.ui_value)} |
|
52 | ${h.hidden('hook_ui_value',hook.ui_value)} | |
53 | ${h.text('hook_ui_value_new',hook.ui_value,size=60)} |
|
53 | ${h.text('hook_ui_value_new',hook.ui_value,size=60)} | |
54 | <span class="delete_icon action_button" |
|
54 | <span class="delete_icon action_button" | |
55 | onclick="ajaxActionHook(${hook.ui_id},'${'id%s' % hook.ui_id }')"> |
|
55 | onclick="ajaxActionHook(${hook.ui_id},'${'id%s' % hook.ui_id }')"> | |
56 | ${_('remove')} |
|
56 | ${_('remove')} | |
57 | </span> |
|
57 | </span> | |
58 | </div> |
|
58 | </div> | |
59 | </div> |
|
59 | </div> | |
60 | % endfor |
|
60 | % endfor | |
61 |
|
61 | |||
62 | <div class="field"> |
|
62 | <div class="field"> | |
63 | <div class="input" style="margin-left:-180px;position: absolute;"> |
|
63 | <div class="input" style="margin-left:-180px;position: absolute;"> | |
64 | <div class="input"> |
|
64 | <div class="input"> | |
65 | ${h.text('new_hook_ui_key',size=30)} |
|
65 | ${h.text('new_hook_ui_key',size=30)} | |
66 | </div> |
|
66 | </div> | |
67 | </div> |
|
67 | </div> | |
68 | <div class="input" style="margin-left:280px"> |
|
68 | <div class="input" style="margin-left:280px"> | |
69 | ${h.text('new_hook_ui_value',size=60)} |
|
69 | ${h.text('new_hook_ui_value',size=60)} | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 | <div class="buttons" style="margin-left:280px"> |
|
72 | <div class="buttons" style="margin-left:280px"> | |
73 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
73 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
74 | </div> |
|
74 | </div> | |
75 | </div> |
|
75 | </div> | |
76 | </div> |
|
76 | </div> | |
77 | ${h.end_form()} |
|
77 | ${h.end_form()} | |
78 | </div> |
|
78 | </div> | |
79 | <script type="text/javascript"> |
|
79 | <script type="text/javascript"> | |
80 | function ajaxActionHook(hook_id,field_id) { |
|
80 | function ajaxActionHook(hook_id,field_id) { | |
81 | var sUrl = "${h.url('admin_setting', setting_id='hooks')}"; |
|
81 | var sUrl = "${h.url('admin_setting', setting_id='hooks')}"; | |
82 | var callback = { |
|
82 | var callback = { | |
83 | success: function (o) { |
|
83 | success: function (o) { | |
84 | var elem = YUD.get(""+field_id); |
|
84 | var elem = YUD.get(""+field_id); | |
85 | elem.parentNode.removeChild(elem); |
|
85 | elem.parentNode.removeChild(elem); | |
86 | }, |
|
86 | }, | |
87 | failure: function (o) { |
|
87 | failure: function (o) { | |
88 | alert("${_('Failed to remove hook')}"); |
|
88 | alert("${_('Failed to remove hook')}"); | |
89 | }, |
|
89 | }, | |
90 | }; |
|
90 | }; | |
91 | var postData = '_method=delete&hook_id=' + hook_id; |
|
91 | var postData = '_method=delete&hook_id=' + hook_id; | |
92 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); |
|
92 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); | |
93 | }; |
|
93 | }; | |
94 | </script> |
|
94 | </script> | |
95 |
|
95 | |||
96 | </%def> |
|
96 | </%def> |
@@ -1,338 +1,338 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Settings administration')} - ${c.rhodecode_name} |
|
5 | ${_('Settings administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} » ${_('Settings')} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} » ${_('Settings')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 |
|
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | </div> |
|
21 | </div> | |
22 | <!-- end box / title --> |
|
22 | <!-- end box / title --> | |
23 |
|
23 | |||
24 | <h3>${_('Remap and rescan repositories')}</h3> |
|
24 | <h3>${_('Remap and rescan repositories')}</h3> | |
25 | ${h.form(url('admin_setting', setting_id='mapping'),method='put')} |
|
25 | ${h.form(url('admin_setting', setting_id='mapping'),method='put')} | |
26 | <div class="form"> |
|
26 | <div class="form"> | |
27 | <!-- fields --> |
|
27 | <!-- fields --> | |
28 |
|
28 | |||
29 | <div class="fields"> |
|
29 | <div class="fields"> | |
30 |
|
|
30 | <div class="field"> | |
31 |
|
|
31 | <div class="label label-checkbox"> | |
32 |
|
|
32 | <label for="destroy">${_('rescan option')}:</label> | |
33 |
|
|
33 | </div> | |
34 |
|
|
34 | <div class="checkboxes"> | |
35 |
|
|
35 | <div class="checkbox"> | |
36 |
|
|
36 | ${h.checkbox('destroy',True)} | |
37 |
|
|
37 | <label for="destroy"> | |
38 |
|
|
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 |
|
|
39 | ${_('destroy old data')}</span> </label> | |
40 |
|
|
40 | </div> | |
41 | <span class="help-block">${_('Rescan repositories location for new repositories. Also deletes obsolete if `destroy` flag is checked ')}</span> |
|
41 | <span class="help-block">${_('Rescan repositories location for new repositories. Also deletes obsolete if `destroy` flag is checked ')}</span> | |
42 |
|
|
42 | </div> | |
43 | </div> |
|
43 | </div> | |
44 |
|
44 | |||
45 | <div class="buttons"> |
|
45 | <div class="buttons"> | |
46 | ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")} |
|
46 | ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")} | |
47 | </div> |
|
47 | </div> | |
48 | </div> |
|
48 | </div> | |
49 | </div> |
|
49 | </div> | |
50 | ${h.end_form()} |
|
50 | ${h.end_form()} | |
51 |
|
51 | |||
52 | <h3>${_('Whoosh indexing')}</h3> |
|
52 | <h3>${_('Whoosh indexing')}</h3> | |
53 | ${h.form(url('admin_setting', setting_id='whoosh'),method='put')} |
|
53 | ${h.form(url('admin_setting', setting_id='whoosh'),method='put')} | |
54 | <div class="form"> |
|
54 | <div class="form"> | |
55 | <!-- fields --> |
|
55 | <!-- fields --> | |
56 |
|
56 | |||
57 | <div class="fields"> |
|
57 | <div class="fields"> | |
58 | <div class="field"> |
|
58 | <div class="field"> | |
59 | <div class="label label-checkbox"> |
|
59 | <div class="label label-checkbox"> | |
60 | <label>${_('index build option')}:</label> |
|
60 | <label>${_('index build option')}:</label> | |
61 | </div> |
|
61 | </div> | |
62 | <div class="checkboxes"> |
|
62 | <div class="checkboxes"> | |
63 | <div class="checkbox"> |
|
63 | <div class="checkbox"> | |
64 | ${h.checkbox('full_index',True)} |
|
64 | ${h.checkbox('full_index',True)} | |
65 | <label for="full_index">${_('build from scratch')}</label> |
|
65 | <label for="full_index">${_('build from scratch')}</label> | |
66 | </div> |
|
66 | </div> | |
67 | </div> |
|
67 | </div> | |
68 | </div> |
|
68 | </div> | |
69 |
|
69 | |||
70 | <div class="buttons"> |
|
70 | <div class="buttons"> | |
71 | ${h.submit('reindex',_('Reindex'),class_="ui-btn large")} |
|
71 | ${h.submit('reindex',_('Reindex'),class_="ui-btn large")} | |
72 | </div> |
|
72 | </div> | |
73 | </div> |
|
73 | </div> | |
74 | </div> |
|
74 | </div> | |
75 | ${h.end_form()} |
|
75 | ${h.end_form()} | |
76 |
|
76 | |||
77 | <h3>${_('Global application settings')}</h3> |
|
77 | <h3>${_('Global application settings')}</h3> | |
78 | ${h.form(url('admin_setting', setting_id='global'),method='put')} |
|
78 | ${h.form(url('admin_setting', setting_id='global'),method='put')} | |
79 | <div class="form"> |
|
79 | <div class="form"> | |
80 | <!-- fields --> |
|
80 | <!-- fields --> | |
81 |
|
81 | |||
82 | <div class="fields"> |
|
82 | <div class="fields"> | |
83 |
|
83 | |||
84 | <div class="field"> |
|
84 | <div class="field"> | |
85 | <div class="label"> |
|
85 | <div class="label"> | |
86 | <label for="rhodecode_title">${_('Application name')}:</label> |
|
86 | <label for="rhodecode_title">${_('Application name')}:</label> | |
87 | </div> |
|
87 | </div> | |
88 | <div class="input"> |
|
88 | <div class="input"> | |
89 | ${h.text('rhodecode_title',size=30)} |
|
89 | ${h.text('rhodecode_title',size=30)} | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 |
|
92 | |||
93 | <div class="field"> |
|
93 | <div class="field"> | |
94 | <div class="label"> |
|
94 | <div class="label"> | |
95 | <label for="rhodecode_realm">${_('Realm text')}:</label> |
|
95 | <label for="rhodecode_realm">${_('Realm text')}:</label> | |
96 | </div> |
|
96 | </div> | |
97 | <div class="input"> |
|
97 | <div class="input"> | |
98 | ${h.text('rhodecode_realm',size=30)} |
|
98 | ${h.text('rhodecode_realm',size=30)} | |
99 | </div> |
|
99 | </div> | |
100 | </div> |
|
100 | </div> | |
101 |
|
101 | |||
102 | <div class="field"> |
|
102 | <div class="field"> | |
103 | <div class="label"> |
|
103 | <div class="label"> | |
104 | <label for="rhodecode_ga_code">${_('GA code')}:</label> |
|
104 | <label for="rhodecode_ga_code">${_('GA code')}:</label> | |
105 | </div> |
|
105 | </div> | |
106 | <div class="input"> |
|
106 | <div class="input"> | |
107 | ${h.text('rhodecode_ga_code',size=30)} |
|
107 | ${h.text('rhodecode_ga_code',size=30)} | |
108 | </div> |
|
108 | </div> | |
109 | </div> |
|
109 | </div> | |
110 |
|
110 | |||
111 | <div class="buttons"> |
|
111 | <div class="buttons"> | |
112 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
112 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
113 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
113 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
114 | </div> |
|
114 | </div> | |
115 | </div> |
|
115 | </div> | |
116 | </div> |
|
116 | </div> | |
117 | ${h.end_form()} |
|
117 | ${h.end_form()} | |
118 |
|
118 | |||
119 | <h3>${_('Visualisation settings')}</h3> |
|
119 | <h3>${_('Visualisation settings')}</h3> | |
120 | ${h.form(url('admin_setting', setting_id='visual'),method='put')} |
|
120 | ${h.form(url('admin_setting', setting_id='visual'),method='put')} | |
121 | <div class="form"> |
|
121 | <div class="form"> | |
122 | <!-- fields --> |
|
122 | <!-- fields --> | |
123 |
|
123 | |||
124 | <div class="fields"> |
|
124 | <div class="fields"> | |
125 | <div class="field"> |
|
125 | <div class="field"> | |
126 | <div class="label label-checkbox"> |
|
126 | <div class="label label-checkbox"> | |
127 | <label>${_('General')}:</label> |
|
127 | <label>${_('General')}:</label> | |
128 | </div> |
|
128 | </div> | |
129 | <div class="checkboxes"> |
|
129 | <div class="checkboxes"> | |
130 | <div class="checkbox"> |
|
130 | <div class="checkbox"> | |
131 | ${h.checkbox('rhodecode_lightweight_dashboard','True')} |
|
131 | ${h.checkbox('rhodecode_lightweight_dashboard','True')} | |
132 | <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> |
|
132 | <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> | |
133 | </div> |
|
133 | </div> | |
134 | </div> |
|
134 | </div> | |
135 | </div> |
|
135 | </div> | |
136 |
|
136 | |||
137 | <div class="field"> |
|
137 | <div class="field"> | |
138 | <div class="label label-checkbox"> |
|
138 | <div class="label label-checkbox"> | |
139 | <label>${_('Icons')}:</label> |
|
139 | <label>${_('Icons')}:</label> | |
140 | </div> |
|
140 | </div> | |
141 | <div class="checkboxes"> |
|
141 | <div class="checkboxes"> | |
142 | <div class="checkbox"> |
|
142 | <div class="checkbox"> | |
143 | ${h.checkbox('rhodecode_show_public_icon','True')} |
|
143 | ${h.checkbox('rhodecode_show_public_icon','True')} | |
144 | <label for="rhodecode_show_public_icon">${_('Show public repo icon on repositories')}</label> |
|
144 | <label for="rhodecode_show_public_icon">${_('Show public repo icon on repositories')}</label> | |
145 | </div> |
|
145 | </div> | |
146 | <div class="checkbox"> |
|
146 | <div class="checkbox"> | |
147 | ${h.checkbox('rhodecode_show_private_icon','True')} |
|
147 | ${h.checkbox('rhodecode_show_private_icon','True')} | |
148 | <label for="rhodecode_show_private_icon">${_('Show private repo icon on repositories')}</label> |
|
148 | <label for="rhodecode_show_private_icon">${_('Show private repo icon on repositories')}</label> | |
149 | </div> |
|
149 | </div> | |
150 | </div> |
|
150 | </div> | |
151 | </div> |
|
151 | </div> | |
152 |
|
152 | |||
153 | <div class="field"> |
|
153 | <div class="field"> | |
154 | <div class="label label-checkbox"> |
|
154 | <div class="label label-checkbox"> | |
155 | <label>${_('Meta-Tagging')}:</label> |
|
155 | <label>${_('Meta-Tagging')}:</label> | |
156 | </div> |
|
156 | </div> | |
157 | <div class="checkboxes"> |
|
157 | <div class="checkboxes"> | |
158 | <div class="checkbox"> |
|
158 | <div class="checkbox"> | |
159 | ${h.checkbox('rhodecode_stylify_metatags','True')} |
|
159 | ${h.checkbox('rhodecode_stylify_metatags','True')} | |
160 | <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label> |
|
160 | <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label> | |
161 | </div> |
|
161 | </div> | |
162 | <div style="padding-left: 20px;"> |
|
162 | <div style="padding-left: 20px;"> | |
163 | <ul> <!-- Fix style here --> |
|
163 | <ul> <!-- Fix style here --> | |
164 | <li>[featured] <span class="metatag" tag="featured">featured</span></li> |
|
164 | <li>[featured] <span class="metatag" tag="featured">featured</span></li> | |
165 | <li>[stale] <span class="metatag" tag="stale">stale</span></li> |
|
165 | <li>[stale] <span class="metatag" tag="stale">stale</span></li> | |
166 | <li>[dead] <span class="metatag" tag="dead">dead</span></li> |
|
166 | <li>[dead] <span class="metatag" tag="dead">dead</span></li> | |
167 | <li>[lang => lang] <span class="metatag" tag="lang" >lang</span></li> |
|
167 | <li>[lang => lang] <span class="metatag" tag="lang" >lang</span></li> | |
168 | <li>[license => License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li> |
|
168 | <li>[license => License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li> | |
169 | <li>[requires => Repo] <span class="metatag" tag="requires" >requires => <a href="#" >Repo</a></span></li> |
|
169 | <li>[requires => Repo] <span class="metatag" tag="requires" >requires => <a href="#" >Repo</a></span></li> | |
170 | <li>[recommends => Repo] <span class="metatag" tag="recommends" >recommends => <a href="#" >Repo</a></span></li> |
|
170 | <li>[recommends => Repo] <span class="metatag" tag="recommends" >recommends => <a href="#" >Repo</a></span></li> | |
171 | <li>[see => URI] <span class="metatag" tag="see">see => <a href="#">URI</a> </span></li> |
|
171 | <li>[see => URI] <span class="metatag" tag="see">see => <a href="#">URI</a> </span></li> | |
172 | </ul> |
|
172 | </ul> | |
173 | </div> |
|
173 | </div> | |
174 | </div> |
|
174 | </div> | |
175 | </div> |
|
175 | </div> | |
176 |
|
176 | |||
177 | <div class="buttons"> |
|
177 | <div class="buttons"> | |
178 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
178 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
179 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
179 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
180 | </div> |
|
180 | </div> | |
181 |
|
181 | |||
182 | </div> |
|
182 | </div> | |
183 | </div> |
|
183 | </div> | |
184 | ${h.end_form()} |
|
184 | ${h.end_form()} | |
185 |
|
185 | |||
186 |
|
186 | |||
187 | <h3>${_('VCS settings')}</h3> |
|
187 | <h3>${_('VCS settings')}</h3> | |
188 | ${h.form(url('admin_setting', setting_id='vcs'),method='put')} |
|
188 | ${h.form(url('admin_setting', setting_id='vcs'),method='put')} | |
189 | <div class="form"> |
|
189 | <div class="form"> | |
190 | <!-- fields --> |
|
190 | <!-- fields --> | |
191 |
|
191 | |||
192 | <div class="fields"> |
|
192 | <div class="fields"> | |
193 |
|
193 | |||
194 | <div class="field"> |
|
194 | <div class="field"> | |
195 | <div class="label label-checkbox"> |
|
195 | <div class="label label-checkbox"> | |
196 | <label>${_('Web')}:</label> |
|
196 | <label>${_('Web')}:</label> | |
197 | </div> |
|
197 | </div> | |
198 | <div class="checkboxes"> |
|
198 | <div class="checkboxes"> | |
199 |
|
|
199 | <div class="checkbox"> | |
200 |
|
|
200 | ${h.checkbox('web_push_ssl', 'True')} | |
201 |
|
|
201 | <label for="web_push_ssl">${_('require ssl for vcs operations')}</label> | |
202 | </div> |
|
202 | </div> | |
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> |
|
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 | </div> |
|
205 | </div> | |
206 |
|
206 | |||
207 | <div class="field"> |
|
207 | <div class="field"> | |
208 | <div class="label label-checkbox"> |
|
208 | <div class="label label-checkbox"> | |
209 | <label>${_('Hooks')}:</label> |
|
209 | <label>${_('Hooks')}:</label> | |
210 | </div> |
|
210 | </div> | |
211 | <div class="checkboxes"> |
|
211 | <div class="checkboxes"> | |
212 |
|
|
212 | <div class="checkbox"> | |
213 |
|
|
213 | ${h.checkbox('hooks_changegroup_update','True')} | |
214 |
|
|
214 | <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label> | |
215 | </div> |
|
215 | </div> | |
216 |
|
|
216 | <div class="checkbox"> | |
217 |
|
|
217 | ${h.checkbox('hooks_changegroup_repo_size','True')} | |
218 |
|
|
218 | <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label> | |
219 | </div> |
|
219 | </div> | |
220 | <div class="checkbox"> |
|
220 | <div class="checkbox"> | |
221 | ${h.checkbox('hooks_changegroup_push_logger','True')} |
|
221 | ${h.checkbox('hooks_changegroup_push_logger','True')} | |
222 | <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label> |
|
222 | <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label> | |
223 | </div> |
|
223 | </div> | |
224 | <div class="checkbox"> |
|
224 | <div class="checkbox"> | |
225 | ${h.checkbox('hooks_outgoing_pull_logger','True')} |
|
225 | ${h.checkbox('hooks_outgoing_pull_logger','True')} | |
226 | <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label> |
|
226 | <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label> | |
227 | </div> |
|
227 | </div> | |
228 | </div> |
|
228 | </div> | |
229 | <div class="input" style="margin-top:10px"> |
|
229 | <div class="input" style="margin-top:10px"> | |
230 | ${h.link_to(_('advanced setup'),url('admin_edit_setting',setting_id='hooks'),class_="ui-btn")} |
|
230 | ${h.link_to(_('advanced setup'),url('admin_edit_setting',setting_id='hooks'),class_="ui-btn")} | |
231 | </div> |
|
231 | </div> | |
232 | </div> |
|
232 | </div> | |
233 | <div class="field"> |
|
233 | <div class="field"> | |
234 | <div class="label label-checkbox"> |
|
234 | <div class="label label-checkbox"> | |
235 | <label>${_('Mercurial Extensions')}:</label> |
|
235 | <label>${_('Mercurial Extensions')}:</label> | |
236 | </div> |
|
236 | </div> | |
237 | <div class="checkboxes"> |
|
237 | <div class="checkboxes"> | |
238 | <div class="checkbox"> |
|
238 | <div class="checkbox"> | |
239 | ${h.checkbox('extensions_largefiles','True')} |
|
239 | ${h.checkbox('extensions_largefiles','True')} | |
240 | <label for="extensions_hgsubversion">${_('largefiles extensions')}</label> |
|
240 | <label for="extensions_hgsubversion">${_('largefiles extensions')}</label> | |
241 | </div> |
|
241 | </div> | |
242 | <div class="checkbox"> |
|
242 | <div class="checkbox"> | |
243 | ${h.checkbox('extensions_hgsubversion','True')} |
|
243 | ${h.checkbox('extensions_hgsubversion','True')} | |
244 | <label for="extensions_hgsubversion">${_('hgsubversion extensions')}</label> |
|
244 | <label for="extensions_hgsubversion">${_('hgsubversion extensions')}</label> | |
245 | </div> |
|
245 | </div> | |
246 | <span class="help-block">${_('Requires hgsubversion library installed. Allows clonning from svn remote locations')}</span> |
|
246 | <span class="help-block">${_('Requires hgsubversion library installed. Allows clonning from svn remote locations')}</span> | |
247 | ##<div class="checkbox"> |
|
247 | ##<div class="checkbox"> | |
248 | ## ${h.checkbox('extensions_hggit','True')} |
|
248 | ## ${h.checkbox('extensions_hggit','True')} | |
249 | ## <label for="extensions_hggit">${_('hg-git extensions')}</label> |
|
249 | ## <label for="extensions_hggit">${_('hg-git extensions')}</label> | |
250 | ##</div> |
|
250 | ##</div> | |
251 | ##<span class="help-block">${_('Requires hg-git library installed. Allows clonning from git remote locations')}</span> |
|
251 | ##<span class="help-block">${_('Requires hg-git library installed. Allows clonning from git remote locations')}</span> | |
252 | </div> |
|
252 | </div> | |
253 | </div> |
|
253 | </div> | |
254 | <div class="field"> |
|
254 | <div class="field"> | |
255 | <div class="label"> |
|
255 | <div class="label"> | |
256 | <label for="paths_root_path">${_('Repositories location')}:</label> |
|
256 | <label for="paths_root_path">${_('Repositories location')}:</label> | |
257 | </div> |
|
257 | </div> | |
258 | <div class="input"> |
|
258 | <div class="input"> | |
259 | ${h.text('paths_root_path',size=30,readonly="readonly")} |
|
259 | ${h.text('paths_root_path',size=30,readonly="readonly")} | |
260 |
|
|
260 | <span id="path_unlock" class="tooltip" | |
261 |
|
|
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 |
|
|
262 | ${_('unlock')}</span> | |
263 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> |
|
263 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> | |
264 | </div> |
|
264 | </div> | |
265 | </div> |
|
265 | </div> | |
266 |
|
266 | |||
267 | <div class="buttons"> |
|
267 | <div class="buttons"> | |
268 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
268 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
269 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
269 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
270 | </div> |
|
270 | </div> | |
271 | </div> |
|
271 | </div> | |
272 | </div> |
|
272 | </div> | |
273 | ${h.end_form()} |
|
273 | ${h.end_form()} | |
274 |
|
274 | |||
275 | <script type="text/javascript"> |
|
275 | <script type="text/javascript"> | |
276 | YAHOO.util.Event.onDOMReady(function(){ |
|
276 | YAHOO.util.Event.onDOMReady(function(){ | |
277 | YAHOO.util.Event.addListener('path_unlock','click',function(){ |
|
277 | YAHOO.util.Event.addListener('path_unlock','click',function(){ | |
278 | YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly'); |
|
278 | YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly'); | |
279 | }); |
|
279 | }); | |
280 | }); |
|
280 | }); | |
281 | </script> |
|
281 | </script> | |
282 |
|
282 | |||
283 | <h3>${_('Test Email')}</h3> |
|
283 | <h3>${_('Test Email')}</h3> | |
284 | ${h.form(url('admin_setting', setting_id='email'),method='put')} |
|
284 | ${h.form(url('admin_setting', setting_id='email'),method='put')} | |
285 | <div class="form"> |
|
285 | <div class="form"> | |
286 | <!-- fields --> |
|
286 | <!-- fields --> | |
287 |
|
287 | |||
288 | <div class="fields"> |
|
288 | <div class="fields"> | |
289 | <div class="field"> |
|
289 | <div class="field"> | |
290 | <div class="label"> |
|
290 | <div class="label"> | |
291 | <label for="test_email">${_('Email to')}:</label> |
|
291 | <label for="test_email">${_('Email to')}:</label> | |
292 | </div> |
|
292 | </div> | |
293 | <div class="input"> |
|
293 | <div class="input"> | |
294 | ${h.text('test_email',size=30)} |
|
294 | ${h.text('test_email',size=30)} | |
295 | </div> |
|
295 | </div> | |
296 | </div> |
|
296 | </div> | |
297 |
|
297 | |||
298 | <div class="buttons"> |
|
298 | <div class="buttons"> | |
299 | ${h.submit('send',_('Send'),class_="ui-btn large")} |
|
299 | ${h.submit('send',_('Send'),class_="ui-btn large")} | |
300 | </div> |
|
300 | </div> | |
301 | </div> |
|
301 | </div> | |
302 | </div> |
|
302 | </div> | |
303 | ${h.end_form()} |
|
303 | ${h.end_form()} | |
304 |
|
304 | |||
305 | <h3>${_('System Info and Packages')}</h3> |
|
305 | <h3>${_('System Info and Packages')}</h3> | |
306 | <div class="form"> |
|
306 | <div class="form"> | |
307 | <div> |
|
307 | <div> | |
308 | <h5 id="expand_modules" style="cursor: pointer">↓ ${_('show')} ↓</h5> |
|
308 | <h5 id="expand_modules" style="cursor: pointer">↓ ${_('show')} ↓</h5> | |
309 | </div> |
|
309 | </div> | |
310 | <div id="expand_modules_table" style="display:none"> |
|
310 | <div id="expand_modules_table" style="display:none"> | |
311 | <h5>Python - ${c.py_version}</h5> |
|
311 | <h5>Python - ${c.py_version}</h5> | |
312 | <h5>System - ${c.platform}</h5> |
|
312 | <h5>System - ${c.platform}</h5> | |
313 |
|
313 | |||
314 | <table class="table" style="margin:0px 0px 0px 20px"> |
|
314 | <table class="table" style="margin:0px 0px 0px 20px"> | |
315 | <colgroup> |
|
315 | <colgroup> | |
316 | <col style="width:220px"> |
|
316 | <col style="width:220px"> | |
317 | </colgroup> |
|
317 | </colgroup> | |
318 | <tbody> |
|
318 | <tbody> | |
319 | %for key, value in c.modules: |
|
319 | %for key, value in c.modules: | |
320 | <tr> |
|
320 | <tr> | |
321 | <th style="text-align: right;padding-right:5px;">${key}</th> |
|
321 | <th style="text-align: right;padding-right:5px;">${key}</th> | |
322 | <td>${value}</td> |
|
322 | <td>${value}</td> | |
323 | </tr> |
|
323 | </tr> | |
324 | %endfor |
|
324 | %endfor | |
325 | </tbody> |
|
325 | </tbody> | |
326 | </table> |
|
326 | </table> | |
327 | </div> |
|
327 | </div> | |
328 | </div> |
|
328 | </div> | |
329 |
|
329 | |||
330 | <script type="text/javascript"> |
|
330 | <script type="text/javascript"> | |
331 | YUE.on('expand_modules','click',function(e){ |
|
331 | YUE.on('expand_modules','click',function(e){ | |
332 |
|
|
332 | YUD.setStyle('expand_modules_table','display',''); | |
333 |
|
|
333 | YUD.setStyle('expand_modules','display','none'); | |
334 | }) |
|
334 | }) | |
335 | </script> |
|
335 | </script> | |
336 |
|
336 | |||
337 | </div> |
|
337 | </div> | |
338 | </%def> |
|
338 | </%def> |
@@ -1,100 +1,100 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Add user')} - ${c.rhodecode_name} |
|
5 | ${_('Add user')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
8 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(_('Users'),h.url('users'))} |
|
10 | ${h.link_to(_('Users'),h.url('users'))} | |
11 | » |
|
11 | » | |
12 | ${_('add new user')} |
|
12 | ${_('add new user')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
16 |
|
|
16 | ${self.menu('admin')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
24 | </div> |
|
24 | </div> | |
25 | <!-- end box / title --> |
|
25 | <!-- end box / title --> | |
26 | ${h.form(url('users'))} |
|
26 | ${h.form(url('users'))} | |
27 | <div class="form"> |
|
27 | <div class="form"> | |
28 | <!-- fields --> |
|
28 | <!-- fields --> | |
29 | <div class="fields"> |
|
29 | <div class="fields"> | |
30 | <div class="field"> |
|
30 | <div class="field"> | |
31 | <div class="label"> |
|
31 | <div class="label"> | |
32 | <label for="username">${_('Username')}:</label> |
|
32 | <label for="username">${_('Username')}:</label> | |
33 | </div> |
|
33 | </div> | |
34 | <div class="input"> |
|
34 | <div class="input"> | |
35 | ${h.text('username',class_='small')} |
|
35 | ${h.text('username',class_='small')} | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 |
|
38 | |||
39 | <div class="field"> |
|
39 | <div class="field"> | |
40 | <div class="label"> |
|
40 | <div class="label"> | |
41 | <label for="password">${_('Password')}:</label> |
|
41 | <label for="password">${_('Password')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 | <div class="input"> |
|
43 | <div class="input"> | |
44 | ${h.password('password',class_='small')} |
|
44 | ${h.password('password',class_='small')} | |
45 | </div> |
|
45 | </div> | |
46 | </div> |
|
46 | </div> | |
47 |
|
47 | |||
48 | <div class="field"> |
|
48 | <div class="field"> | |
49 | <div class="label"> |
|
49 | <div class="label"> | |
50 | <label for="password_confirmation">${_('Password confirmation')}:</label> |
|
50 | <label for="password_confirmation">${_('Password confirmation')}:</label> | |
51 | </div> |
|
51 | </div> | |
52 | <div class="input"> |
|
52 | <div class="input"> | |
53 | ${h.password('password_confirmation',class_="small",autocomplete="off")} |
|
53 | ${h.password('password_confirmation',class_="small",autocomplete="off")} | |
54 | </div> |
|
54 | </div> | |
55 | </div> |
|
55 | </div> | |
56 |
|
56 | |||
57 | <div class="field"> |
|
57 | <div class="field"> | |
58 | <div class="label"> |
|
58 | <div class="label"> | |
59 | <label for="firstname">${_('First Name')}:</label> |
|
59 | <label for="firstname">${_('First Name')}:</label> | |
60 | </div> |
|
60 | </div> | |
61 | <div class="input"> |
|
61 | <div class="input"> | |
62 | ${h.text('firstname',class_='small')} |
|
62 | ${h.text('firstname',class_='small')} | |
63 | </div> |
|
63 | </div> | |
64 | </div> |
|
64 | </div> | |
65 |
|
65 | |||
66 | <div class="field"> |
|
66 | <div class="field"> | |
67 | <div class="label"> |
|
67 | <div class="label"> | |
68 | <label for="lastname">${_('Last Name')}:</label> |
|
68 | <label for="lastname">${_('Last Name')}:</label> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="input"> |
|
70 | <div class="input"> | |
71 | ${h.text('lastname',class_='small')} |
|
71 | ${h.text('lastname',class_='small')} | |
72 | </div> |
|
72 | </div> | |
73 | </div> |
|
73 | </div> | |
74 |
|
74 | |||
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label"> |
|
76 | <div class="label"> | |
77 | <label for="email">${_('Email')}:</label> |
|
77 | <label for="email">${_('Email')}:</label> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="input"> |
|
79 | <div class="input"> | |
80 | ${h.text('email',class_='small')} |
|
80 | ${h.text('email',class_='small')} | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 |
|
83 | |||
84 | <div class="field"> |
|
84 | <div class="field"> | |
85 | <div class="label label-checkbox"> |
|
85 | <div class="label label-checkbox"> | |
86 | <label for="active">${_('Active')}:</label> |
|
86 | <label for="active">${_('Active')}:</label> | |
87 | </div> |
|
87 | </div> | |
88 | <div class="checkboxes"> |
|
88 | <div class="checkboxes"> | |
89 | ${h.checkbox('active',value=True,checked='checked')} |
|
89 | ${h.checkbox('active',value=True,checked='checked')} | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 |
|
92 | |||
93 | <div class="buttons"> |
|
93 | <div class="buttons"> | |
94 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
94 | ${h.submit('save',_('save'),class_="ui-btn large")} | |
95 | </div> |
|
95 | </div> | |
96 |
|
|
96 | </div> | |
97 | </div> |
|
97 | </div> | |
98 | ${h.end_form()} |
|
98 | ${h.end_form()} | |
99 | </div> |
|
99 | </div> | |
100 | </%def> |
|
100 | </%def> |
@@ -1,340 +1,340 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Edit user')} ${c.user.username} - ${c.rhodecode_name} |
|
5 | ${_('Edit user')} ${c.user.username} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(_('Users'),h.url('users'))} |
|
11 | ${h.link_to(_('Users'),h.url('users'))} | |
12 | » |
|
12 | » | |
13 | ${_('edit')} "${c.user.username}" |
|
13 | ${_('edit')} "${c.user.username}" | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 |
|
|
17 | ${self.menu('admin')} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="main()"> |
|
20 | <%def name="main()"> | |
21 | <div class="box box-left"> |
|
21 | <div class="box box-left"> | |
22 | <!-- box / title --> |
|
22 | <!-- box / title --> | |
23 | <div class="title"> |
|
23 | <div class="title"> | |
24 | ${self.breadcrumbs()} |
|
24 | ${self.breadcrumbs()} | |
25 | </div> |
|
25 | </div> | |
26 | <!-- end box / title --> |
|
26 | <!-- end box / title --> | |
27 | ${h.form(url('update_user', id=c.user.user_id),method='put')} |
|
27 | ${h.form(url('update_user', id=c.user.user_id),method='put')} | |
28 | <div class="form"> |
|
28 | <div class="form"> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="gravatar_box"> |
|
30 | <div class="gravatar_box"> | |
31 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> |
|
31 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> | |
32 | <p> |
|
32 | <p> | |
33 | %if c.use_gravatar: |
|
33 | %if c.use_gravatar: | |
34 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> |
|
34 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> | |
35 | <br/>${_('Using')} ${c.user.email} |
|
35 | <br/>${_('Using')} ${c.user.email} | |
36 | %else: |
|
36 | %else: | |
37 | <br/>${c.user.email} |
|
37 | <br/>${c.user.email} | |
38 | %endif |
|
38 | %endif | |
39 | </div> |
|
39 | </div> | |
40 | </div> |
|
40 | </div> | |
41 | <div class="field"> |
|
41 | <div class="field"> | |
42 | <div class="label"> |
|
42 | <div class="label"> | |
43 | <label>${_('API key')}</label> ${c.user.api_key} |
|
43 | <label>${_('API key')}</label> ${c.user.api_key} | |
44 | </div> |
|
44 | </div> | |
45 | </div> |
|
45 | </div> | |
46 | <div class="field"> |
|
46 | <div class="field"> | |
47 | <div class="label"> |
|
47 | <div class="label"> | |
48 | <label>${_('Your IP')}</label> ${c.perm_user.ip_addr or "?"} |
|
48 | <label>${_('Your IP')}</label> ${c.perm_user.ip_addr or "?"} | |
49 | </div> |
|
49 | </div> | |
50 | </div> |
|
50 | </div> | |
51 | <div class="fields"> |
|
51 | <div class="fields"> | |
52 | <div class="field"> |
|
52 | <div class="field"> | |
53 | <div class="label"> |
|
53 | <div class="label"> | |
54 | <label for="username">${_('Username')}:</label> |
|
54 | <label for="username">${_('Username')}:</label> | |
55 | </div> |
|
55 | </div> | |
56 | <div class="input"> |
|
56 | <div class="input"> | |
57 | %if c.ldap_dn: |
|
57 | %if c.ldap_dn: | |
58 | ${h.text('username',class_='medium disabled', readonly="readonly")} |
|
58 | ${h.text('username',class_='medium disabled', readonly="readonly")} | |
59 | %else: |
|
59 | %else: | |
60 | ${h.text('username',class_='medium')} |
|
60 | ${h.text('username',class_='medium')} | |
61 | %endif: |
|
61 | %endif: | |
62 | </div> |
|
62 | </div> | |
63 | </div> |
|
63 | </div> | |
64 |
|
64 | |||
65 | <div class="field"> |
|
65 | <div class="field"> | |
66 | <div class="label"> |
|
66 | <div class="label"> | |
67 | <label for="ldap_dn">${_('LDAP DN')}:</label> |
|
67 | <label for="ldap_dn">${_('LDAP DN')}:</label> | |
68 | </div> |
|
68 | </div> | |
69 | <div class="input"> |
|
69 | <div class="input"> | |
70 | ${h.text('ldap_dn',class_='medium disabled',readonly="readonly")} |
|
70 | ${h.text('ldap_dn',class_='medium disabled',readonly="readonly")} | |
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 |
|
73 | |||
74 | <div class="field"> |
|
74 | <div class="field"> | |
75 | <div class="label"> |
|
75 | <div class="label"> | |
76 | <label for="new_password">${_('New password')}:</label> |
|
76 | <label for="new_password">${_('New password')}:</label> | |
77 | </div> |
|
77 | </div> | |
78 | <div class="input"> |
|
78 | <div class="input"> | |
79 | ${h.password('new_password',class_='medium',autocomplete="off")} |
|
79 | ${h.password('new_password',class_='medium',autocomplete="off")} | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 |
|
82 | |||
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label"> |
|
84 | <div class="label"> | |
85 | <label for="password_confirmation">${_('New password confirmation')}:</label> |
|
85 | <label for="password_confirmation">${_('New password confirmation')}:</label> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="input"> |
|
87 | <div class="input"> | |
88 | ${h.password('password_confirmation',class_="medium",autocomplete="off")} |
|
88 | ${h.password('password_confirmation',class_="medium",autocomplete="off")} | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 |
|
91 | |||
92 | <div class="field"> |
|
92 | <div class="field"> | |
93 | <div class="label"> |
|
93 | <div class="label"> | |
94 | <label for="firstname">${_('First Name')}:</label> |
|
94 | <label for="firstname">${_('First Name')}:</label> | |
95 | </div> |
|
95 | </div> | |
96 | <div class="input"> |
|
96 | <div class="input"> | |
97 | ${h.text('firstname',class_='medium')} |
|
97 | ${h.text('firstname',class_='medium')} | |
98 | </div> |
|
98 | </div> | |
99 | </div> |
|
99 | </div> | |
100 |
|
100 | |||
101 | <div class="field"> |
|
101 | <div class="field"> | |
102 | <div class="label"> |
|
102 | <div class="label"> | |
103 | <label for="lastname">${_('Last Name')}:</label> |
|
103 | <label for="lastname">${_('Last Name')}:</label> | |
104 | </div> |
|
104 | </div> | |
105 | <div class="input"> |
|
105 | <div class="input"> | |
106 | ${h.text('lastname',class_='medium')} |
|
106 | ${h.text('lastname',class_='medium')} | |
107 | </div> |
|
107 | </div> | |
108 | </div> |
|
108 | </div> | |
109 |
|
109 | |||
110 | <div class="field"> |
|
110 | <div class="field"> | |
111 | <div class="label"> |
|
111 | <div class="label"> | |
112 | <label for="email">${_('Email')}:</label> |
|
112 | <label for="email">${_('Email')}:</label> | |
113 | </div> |
|
113 | </div> | |
114 | <div class="input"> |
|
114 | <div class="input"> | |
115 | ${h.text('email',class_='medium')} |
|
115 | ${h.text('email',class_='medium')} | |
116 | </div> |
|
116 | </div> | |
117 | </div> |
|
117 | </div> | |
118 |
|
118 | |||
119 | <div class="field"> |
|
119 | <div class="field"> | |
120 | <div class="label label-checkbox"> |
|
120 | <div class="label label-checkbox"> | |
121 | <label for="active">${_('Active')}:</label> |
|
121 | <label for="active">${_('Active')}:</label> | |
122 | </div> |
|
122 | </div> | |
123 | <div class="checkboxes"> |
|
123 | <div class="checkboxes"> | |
124 | ${h.checkbox('active',value=True)} |
|
124 | ${h.checkbox('active',value=True)} | |
125 | </div> |
|
125 | </div> | |
126 | </div> |
|
126 | </div> | |
127 |
|
127 | |||
128 | <div class="field"> |
|
128 | <div class="field"> | |
129 | <div class="label label-checkbox"> |
|
129 | <div class="label label-checkbox"> | |
130 | <label for="admin">${_('Admin')}:</label> |
|
130 | <label for="admin">${_('Admin')}:</label> | |
131 | </div> |
|
131 | </div> | |
132 | <div class="checkboxes"> |
|
132 | <div class="checkboxes"> | |
133 | ${h.checkbox('admin',value=True)} |
|
133 | ${h.checkbox('admin',value=True)} | |
134 | </div> |
|
134 | </div> | |
135 | </div> |
|
135 | </div> | |
136 | <div class="buttons"> |
|
136 | <div class="buttons"> | |
137 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
137 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
138 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
138 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
139 | </div> |
|
139 | </div> | |
140 |
|
|
140 | </div> | |
141 | </div> |
|
141 | </div> | |
142 | ${h.end_form()} |
|
142 | ${h.end_form()} | |
143 | </div> |
|
143 | </div> | |
144 | <div style="min-height:780px" class="box box-right"> |
|
144 | <div style="min-height:780px" class="box box-right"> | |
145 | <!-- box / title --> |
|
145 | <!-- box / title --> | |
146 | <div class="title"> |
|
146 | <div class="title"> | |
147 | <h5>${_('Permissions')}</h5> |
|
147 | <h5>${_('Permissions')}</h5> | |
148 | </div> |
|
148 | </div> | |
149 | ${h.form(url('user_perm', id=c.user.user_id),method='put')} |
|
149 | ${h.form(url('user_perm', id=c.user.user_id),method='put')} | |
150 | <div class="form"> |
|
150 | <div class="form"> | |
151 | <!-- fields --> |
|
151 | <!-- fields --> | |
152 | <div class="fields"> |
|
152 | <div class="fields"> | |
153 | <div class="field"> |
|
153 | <div class="field"> | |
154 | <div class="label label-checkbox"> |
|
154 | <div class="label label-checkbox"> | |
155 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> |
|
155 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> | |
156 | </div> |
|
156 | </div> | |
157 | <div class="checkboxes"> |
|
157 | <div class="checkboxes"> | |
158 | ${h.checkbox('inherit_default_permissions',value=True)} |
|
158 | ${h.checkbox('inherit_default_permissions',value=True)} | |
159 | </div> |
|
159 | </div> | |
160 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' |
|
160 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' | |
161 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> |
|
161 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> | |
162 | </div> |
|
162 | </div> | |
163 | <div id="inherit_overlay" style="${'opacity:0.3' if c.user.inherit_default_permissions else ''}" > |
|
163 | <div id="inherit_overlay" style="${'opacity:0.3' if c.user.inherit_default_permissions else ''}" > | |
164 | <div class="field"> |
|
164 | <div class="field"> | |
165 | <div class="label label-checkbox"> |
|
165 | <div class="label label-checkbox"> | |
166 | <label for="create_repo_perm">${_('Create repositories')}:</label> |
|
166 | <label for="create_repo_perm">${_('Create repositories')}:</label> | |
167 | </div> |
|
167 | </div> | |
168 | <div class="checkboxes"> |
|
168 | <div class="checkboxes"> | |
169 | ${h.checkbox('create_repo_perm',value=True)} |
|
169 | ${h.checkbox('create_repo_perm',value=True)} | |
170 | </div> |
|
170 | </div> | |
171 | </div> |
|
171 | </div> | |
172 | <div class="field"> |
|
172 | <div class="field"> | |
173 | <div class="label label-checkbox"> |
|
173 | <div class="label label-checkbox"> | |
174 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> |
|
174 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> | |
175 | </div> |
|
175 | </div> | |
176 | <div class="checkboxes"> |
|
176 | <div class="checkboxes"> | |
177 | ${h.checkbox('fork_repo_perm',value=True)} |
|
177 | ${h.checkbox('fork_repo_perm',value=True)} | |
178 | </div> |
|
178 | </div> | |
179 | </div> |
|
179 | </div> | |
180 | </div> |
|
180 | </div> | |
181 | <div class="buttons"> |
|
181 | <div class="buttons"> | |
182 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
182 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
183 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
183 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
184 | </div> |
|
184 | </div> | |
185 | </div> |
|
185 | </div> | |
186 | </div> |
|
186 | </div> | |
187 | ${h.end_form()} |
|
187 | ${h.end_form()} | |
188 |
|
188 | |||
189 | ## permissions overview |
|
189 | ## permissions overview | |
190 | <div id="perms" class="table"> |
|
190 | <div id="perms" class="table"> | |
191 | %for section in sorted(c.perm_user.permissions.keys()): |
|
191 | %for section in sorted(c.perm_user.permissions.keys()): | |
192 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
192 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
193 | %if not c.perm_user.permissions[section]: |
|
193 | %if not c.perm_user.permissions[section]: | |
194 | <span class="empty_data">${_('Nothing here yet')}</span> |
|
194 | <span class="empty_data">${_('Nothing here yet')}</span> | |
195 | %else: |
|
195 | %else: | |
196 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
196 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
197 | <table id="tbl_list_${section}"> |
|
197 | <table id="tbl_list_${section}"> | |
198 | <thead> |
|
198 | <thead> | |
199 | <tr> |
|
199 | <tr> | |
200 | <th class="left">${_('Name')}</th> |
|
200 | <th class="left">${_('Name')}</th> | |
201 | <th class="left">${_('Permission')}</th> |
|
201 | <th class="left">${_('Permission')}</th> | |
202 | <th class="left">${_('Edit Permission')}</th> |
|
202 | <th class="left">${_('Edit Permission')}</th> | |
203 | </thead> |
|
203 | </thead> | |
204 | <tbody> |
|
204 | <tbody> | |
205 | %for k in c.perm_user.permissions[section]: |
|
205 | %for k in c.perm_user.permissions[section]: | |
206 | <% |
|
206 | <% | |
207 | if section != 'global': |
|
207 | if section != 'global': | |
208 | section_perm = c.perm_user.permissions[section].get(k) |
|
208 | section_perm = c.perm_user.permissions[section].get(k) | |
209 | _perm = section_perm.split('.')[-1] |
|
209 | _perm = section_perm.split('.')[-1] | |
210 | else: |
|
210 | else: | |
211 | _perm = section_perm = None |
|
211 | _perm = section_perm = None | |
212 | %> |
|
212 | %> | |
213 | <tr> |
|
213 | <tr> | |
214 | <td> |
|
214 | <td> | |
215 | %if section == 'repositories': |
|
215 | %if section == 'repositories': | |
216 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
216 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
217 | %elif section == 'repositories_groups': |
|
217 | %elif section == 'repositories_groups': | |
218 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
218 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
219 | %else: |
|
219 | %else: | |
220 | ${h.get_permission_name(k)} |
|
220 | ${h.get_permission_name(k)} | |
221 | %endif |
|
221 | %endif | |
222 | </td> |
|
222 | </td> | |
223 | <td> |
|
223 | <td> | |
224 | %if section == 'global': |
|
224 | %if section == 'global': | |
225 | ${h.bool2icon(k.split('.')[-1] != 'none')} |
|
225 | ${h.bool2icon(k.split('.')[-1] != 'none')} | |
226 | %else: |
|
226 | %else: | |
227 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
227 | <span class="perm_tag ${_perm}">${section_perm}</span> | |
228 | %endif |
|
228 | %endif | |
229 | </td> |
|
229 | </td> | |
230 | <td> |
|
230 | <td> | |
231 | %if section == 'repositories': |
|
231 | %if section == 'repositories': | |
232 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
232 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
233 | %elif section == 'repositories_groups': |
|
233 | %elif section == 'repositories_groups': | |
234 | <a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
234 | <a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a> | |
235 | %else: |
|
235 | %else: | |
236 | -- |
|
236 | -- | |
237 | %endif |
|
237 | %endif | |
238 | </td> |
|
238 | </td> | |
239 | </tr> |
|
239 | </tr> | |
240 | %endfor |
|
240 | %endfor | |
241 | </tbody> |
|
241 | </tbody> | |
242 | </table> |
|
242 | </table> | |
243 | </div> |
|
243 | </div> | |
244 | %endif |
|
244 | %endif | |
245 | %endfor |
|
245 | %endfor | |
246 | </div> |
|
246 | </div> | |
247 | </div> |
|
247 | </div> | |
248 | <div class="box box-left" style="clear:left"> |
|
248 | <div class="box box-left" style="clear:left"> | |
249 | <!-- box / title --> |
|
249 | <!-- box / title --> | |
250 | <div class="title"> |
|
250 | <div class="title"> | |
251 | <h5>${_('Email addresses')}</h5> |
|
251 | <h5>${_('Email addresses')}</h5> | |
252 | </div> |
|
252 | </div> | |
253 |
|
253 | |||
254 | <div class="emails_wrap"> |
|
254 | <div class="emails_wrap"> | |
255 | <table class="noborder"> |
|
255 | <table class="noborder"> | |
256 | %for em in c.user_email_map: |
|
256 | %for em in c.user_email_map: | |
257 | <tr> |
|
257 | <tr> | |
258 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(em.user.email,16)}"/> </div></td> |
|
258 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(em.user.email,16)}"/> </div></td> | |
259 | <td><div class="email">${em.email}</div></td> |
|
259 | <td><div class="email">${em.email}</div></td> | |
260 | <td> |
|
260 | <td> | |
261 | ${h.form(url('user_emails_delete', id=c.user.user_id),method='delete')} |
|
261 | ${h.form(url('user_emails_delete', id=c.user.user_id),method='delete')} | |
262 | ${h.hidden('del_email',em.email_id)} |
|
262 | ${h.hidden('del_email',em.email_id)} | |
263 | ${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id, |
|
263 | ${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id, | |
264 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this email: %s') % em.email+"');")} |
|
264 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this email: %s') % em.email+"');")} | |
265 | ${h.end_form()} |
|
265 | ${h.end_form()} | |
266 | </td> |
|
266 | </td> | |
267 | </tr> |
|
267 | </tr> | |
268 | %endfor |
|
268 | %endfor | |
269 | </table> |
|
269 | </table> | |
270 | </div> |
|
270 | </div> | |
271 |
|
271 | |||
272 | ${h.form(url('user_emails', id=c.user.user_id),method='put')} |
|
272 | ${h.form(url('user_emails', id=c.user.user_id),method='put')} | |
273 | <div class="form"> |
|
273 | <div class="form"> | |
274 | <!-- fields --> |
|
274 | <!-- fields --> | |
275 | <div class="fields"> |
|
275 | <div class="fields"> | |
276 | <div class="field"> |
|
276 | <div class="field"> | |
277 | <div class="label"> |
|
277 | <div class="label"> | |
278 | <label for="new_email">${_('New email address')}:</label> |
|
278 | <label for="new_email">${_('New email address')}:</label> | |
279 | </div> |
|
279 | </div> | |
280 | <div class="input"> |
|
280 | <div class="input"> | |
281 | ${h.text('new_email', class_='medium')} |
|
281 | ${h.text('new_email', class_='medium')} | |
282 | </div> |
|
282 | </div> | |
283 | </div> |
|
283 | </div> | |
284 | <div class="buttons"> |
|
284 | <div class="buttons"> | |
285 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
285 | ${h.submit('save',_('Add'),class_="ui-btn large")} | |
286 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
286 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
287 | </div> |
|
287 | </div> | |
288 | </div> |
|
288 | </div> | |
289 | </div> |
|
289 | </div> | |
290 | ${h.end_form()} |
|
290 | ${h.end_form()} | |
291 | </div> |
|
291 | </div> | |
292 | <div class="box box-left" style="clear:left"> |
|
292 | <div class="box box-left" style="clear:left"> | |
293 | <!-- box / title --> |
|
293 | <!-- box / title --> | |
294 | <div class="title"> |
|
294 | <div class="title"> | |
295 | <h5>${_('Allowed IP addresses')}</h5> |
|
295 | <h5>${_('Allowed IP addresses')}</h5> | |
296 | </div> |
|
296 | </div> | |
297 |
|
297 | |||
298 | <div class="ips_wrap"> |
|
298 | <div class="ips_wrap"> | |
299 | <table class="noborder"> |
|
299 | <table class="noborder"> | |
300 | %if c.user_ip_map: |
|
300 | %if c.user_ip_map: | |
301 | %for ip in c.user_ip_map: |
|
301 | %for ip in c.user_ip_map: | |
302 | <tr> |
|
302 | <tr> | |
303 | <td><div class="ip">${ip.ip_addr}</div></td> |
|
303 | <td><div class="ip">${ip.ip_addr}</div></td> | |
304 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> |
|
304 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> | |
305 | <td> |
|
305 | <td> | |
306 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} |
|
306 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} | |
307 | ${h.hidden('del_ip',ip.ip_id)} |
|
307 | ${h.hidden('del_ip',ip.ip_id)} | |
308 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, |
|
308 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, | |
309 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} |
|
309 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} | |
310 | ${h.end_form()} |
|
310 | ${h.end_form()} | |
311 | </td> |
|
311 | </td> | |
312 | </tr> |
|
312 | </tr> | |
313 | %endfor |
|
313 | %endfor | |
314 | %else: |
|
314 | %else: | |
315 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> |
|
315 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> | |
316 | %endif |
|
316 | %endif | |
317 | </table> |
|
317 | </table> | |
318 | </div> |
|
318 | </div> | |
319 |
|
319 | |||
320 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} |
|
320 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} | |
321 | <div class="form"> |
|
321 | <div class="form"> | |
322 | <!-- fields --> |
|
322 | <!-- fields --> | |
323 | <div class="fields"> |
|
323 | <div class="fields"> | |
324 | <div class="field"> |
|
324 | <div class="field"> | |
325 | <div class="label"> |
|
325 | <div class="label"> | |
326 | <label for="new_ip">${_('New ip address')}:</label> |
|
326 | <label for="new_ip">${_('New ip address')}:</label> | |
327 | </div> |
|
327 | </div> | |
328 | <div class="input"> |
|
328 | <div class="input"> | |
329 | ${h.text('new_ip', class_='medium')} |
|
329 | ${h.text('new_ip', class_='medium')} | |
330 | </div> |
|
330 | </div> | |
331 | </div> |
|
331 | </div> | |
332 | <div class="buttons"> |
|
332 | <div class="buttons"> | |
333 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
333 | ${h.submit('save',_('Add'),class_="ui-btn large")} | |
334 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
334 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
335 | </div> |
|
335 | </div> | |
336 | </div> |
|
336 | </div> | |
337 | </div> |
|
337 | </div> | |
338 | ${h.end_form()} |
|
338 | ${h.end_form()} | |
339 | </div> |
|
339 | </div> | |
340 | </%def> |
|
340 | </%def> |
@@ -1,280 +1,280 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name} |
|
5 | ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${_('My Account')} |
|
9 | ${_('My Account')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 |
|
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 |
|
17 | |||
18 | <div class="box box-left"> |
|
18 | <div class="box box-left"> | |
19 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
20 | <div class="title"> |
|
20 | <div class="title"> | |
21 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
22 | </div> |
|
22 | </div> | |
23 | <!-- end box / title --> |
|
23 | <!-- end box / title --> | |
24 | ${c.form|n} |
|
24 | ${c.form|n} | |
25 | </div> |
|
25 | </div> | |
26 |
|
26 | |||
27 | <div class="box box-right"> |
|
27 | <div class="box box-right"> | |
28 | <!-- box / title --> |
|
28 | <!-- box / title --> | |
29 | <div class="title"> |
|
29 | <div class="title"> | |
30 | <h5> |
|
30 | <h5> | |
31 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> |
|
31 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> | |
32 | </h5> |
|
32 | </h5> | |
33 | <ul class="links" style="color:#DADADA"> |
|
33 | <ul class="links" style="color:#DADADA"> | |
34 | <li> |
|
34 | <li> | |
35 | <span><a id="show_perms" class="link-white current" href="#perms">${_('My permissions')}</a> </span> |
|
35 | <span><a id="show_perms" class="link-white current" href="#perms">${_('My permissions')}</a> </span> | |
36 | </li> |
|
36 | </li> | |
37 | <li> |
|
37 | <li> | |
38 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> |
|
38 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> | |
39 | </li> |
|
39 | </li> | |
40 | <li> |
|
40 | <li> | |
41 | <span><a id="show_pullrequests" class="link-white" href="#pullrequests">${_('My pull requests')}</a> </span> |
|
41 | <span><a id="show_pullrequests" class="link-white" href="#pullrequests">${_('My pull requests')}</a> </span> | |
42 | </li> |
|
42 | </li> | |
43 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
43 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
44 | <li> |
|
44 | <li> | |
45 | <span>${h.link_to(_('Add repo'),h.url('admin_settings_create_repository'))}</span> |
|
45 | <span>${h.link_to(_('Add repo'),h.url('admin_settings_create_repository'))}</span> | |
46 | </li> |
|
46 | </li> | |
47 | %endif |
|
47 | %endif | |
48 | </ul> |
|
48 | </ul> | |
49 | </div> |
|
49 | </div> | |
50 | <!-- end box / title --> |
|
50 | <!-- end box / title --> | |
51 | <div id="perms_container"> |
|
51 | <div id="perms_container"> | |
52 | <div id="perms" class="table"> |
|
52 | <div id="perms" class="table"> | |
53 | %for section in sorted(c.rhodecode_user.permissions.keys()): |
|
53 | %for section in sorted(c.rhodecode_user.permissions.keys()): | |
54 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
54 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
55 |
|
55 | |||
56 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
56 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
57 | <table id="tbl_list_${section}"> |
|
57 | <table id="tbl_list_${section}"> | |
58 | <thead> |
|
58 | <thead> | |
59 | <tr> |
|
59 | <tr> | |
60 | <th class="left">${_('Name')}</th> |
|
60 | <th class="left">${_('Name')}</th> | |
61 | <th class="left">${_('Permission')}</th> |
|
61 | <th class="left">${_('Permission')}</th> | |
62 | </thead> |
|
62 | </thead> | |
63 | <tbody> |
|
63 | <tbody> | |
64 | %for k in c.rhodecode_user.permissions[section]: |
|
64 | %for k in c.rhodecode_user.permissions[section]: | |
65 | <% |
|
65 | <% | |
66 | if section != 'global': |
|
66 | if section != 'global': | |
67 | section_perm = c.rhodecode_user.permissions[section].get(k) |
|
67 | section_perm = c.rhodecode_user.permissions[section].get(k) | |
68 | _perm = section_perm.split('.')[-1] |
|
68 | _perm = section_perm.split('.')[-1] | |
69 | else: |
|
69 | else: | |
70 | _perm = section_perm = None |
|
70 | _perm = section_perm = None | |
71 | %> |
|
71 | %> | |
72 | %if _perm not in ['none']: |
|
72 | %if _perm not in ['none']: | |
73 | <tr> |
|
73 | <tr> | |
74 | <td> |
|
74 | <td> | |
75 | %if section == 'repositories': |
|
75 | %if section == 'repositories': | |
76 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
76 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
77 | %elif section == 'repositories_groups': |
|
77 | %elif section == 'repositories_groups': | |
78 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
78 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
79 | %else: |
|
79 | %else: | |
80 | ${k} |
|
80 | ${k} | |
81 | %endif |
|
81 | %endif | |
82 | </td> |
|
82 | </td> | |
83 | <td> |
|
83 | <td> | |
84 | %if section == 'global': |
|
84 | %if section == 'global': | |
85 | ${h.bool2icon(True)} |
|
85 | ${h.bool2icon(True)} | |
86 | %else: |
|
86 | %else: | |
87 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
87 | <span class="perm_tag ${_perm}">${section_perm}</span> | |
88 | %endif |
|
88 | %endif | |
89 | </td> |
|
89 | </td> | |
90 | </tr> |
|
90 | </tr> | |
91 | %endif |
|
91 | %endif | |
92 | %endfor |
|
92 | %endfor | |
93 | </tbody> |
|
93 | </tbody> | |
94 | </table> |
|
94 | </table> | |
95 | </div> |
|
95 | </div> | |
96 | %endfor |
|
96 | %endfor | |
97 | </div> |
|
97 | </div> | |
98 | </div> |
|
98 | </div> | |
99 | <div id="my_container" style="display:none"> |
|
99 | <div id="my_container" style="display:none"> | |
100 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> |
|
100 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> | |
101 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
101 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
102 | </div> |
|
102 | </div> | |
103 | <div id="pullrequests_container" class="table" style="display:none"> |
|
103 | <div id="pullrequests_container" class="table" style="display:none"> | |
104 | ## loaded via AJAX |
|
104 | ## loaded via AJAX | |
105 | ${_('Loading...')} |
|
105 | ${_('Loading...')} | |
106 | </div> |
|
106 | </div> | |
107 | </div> |
|
107 | </div> | |
108 |
|
108 | |||
109 | <script type="text/javascript"> |
|
109 | <script type="text/javascript"> | |
110 |
|
110 | |||
111 | var show_perms = function(e){ |
|
111 | var show_perms = function(e){ | |
112 | YUD.addClass('show_perms', 'current'); |
|
112 | YUD.addClass('show_perms', 'current'); | |
113 | YUD.removeClass('show_my','current'); |
|
113 | YUD.removeClass('show_my','current'); | |
114 | YUD.removeClass('show_pullrequests','current'); |
|
114 | YUD.removeClass('show_pullrequests','current'); | |
115 |
|
115 | |||
116 | YUD.setStyle('my_container','display','none'); |
|
116 | YUD.setStyle('my_container','display','none'); | |
117 | YUD.setStyle('pullrequests_container','display','none'); |
|
117 | YUD.setStyle('pullrequests_container','display','none'); | |
118 | YUD.setStyle('perms_container','display',''); |
|
118 | YUD.setStyle('perms_container','display',''); | |
119 | YUD.setStyle('q_filter','display','none'); |
|
119 | YUD.setStyle('q_filter','display','none'); | |
120 | } |
|
120 | } | |
121 | YUE.on('show_perms','click',function(e){ |
|
121 | YUE.on('show_perms','click',function(e){ | |
122 | show_perms(); |
|
122 | show_perms(); | |
123 | }) |
|
123 | }) | |
124 |
|
124 | |||
125 | var show_my = function(e){ |
|
125 | var show_my = function(e){ | |
126 | YUD.addClass('show_my', 'current'); |
|
126 | YUD.addClass('show_my', 'current'); | |
127 | YUD.removeClass('show_perms','current'); |
|
127 | YUD.removeClass('show_perms','current'); | |
128 | YUD.removeClass('show_pullrequests','current'); |
|
128 | YUD.removeClass('show_pullrequests','current'); | |
129 |
|
129 | |||
130 | YUD.setStyle('perms_container','display','none'); |
|
130 | YUD.setStyle('perms_container','display','none'); | |
131 | YUD.setStyle('pullrequests_container','display','none'); |
|
131 | YUD.setStyle('pullrequests_container','display','none'); | |
132 | YUD.setStyle('my_container','display',''); |
|
132 | YUD.setStyle('my_container','display',''); | |
133 | YUD.setStyle('q_filter','display',''); |
|
133 | YUD.setStyle('q_filter','display',''); | |
134 | if(!YUD.hasClass('show_my', 'loaded')){ |
|
134 | if(!YUD.hasClass('show_my', 'loaded')){ | |
135 |
|
|
135 | table_renderer(${c.data |n}); | |
136 | YUD.addClass('show_my', 'loaded'); |
|
136 | YUD.addClass('show_my', 'loaded'); | |
137 | } |
|
137 | } | |
138 | } |
|
138 | } | |
139 | YUE.on('show_my','click',function(e){ |
|
139 | YUE.on('show_my','click',function(e){ | |
140 |
|
|
140 | show_my(e); | |
141 | }) |
|
141 | }) | |
142 |
|
142 | |||
143 | var show_pullrequests = function(e){ |
|
143 | var show_pullrequests = function(e){ | |
144 | YUD.addClass('show_pullrequests', 'current'); |
|
144 | YUD.addClass('show_pullrequests', 'current'); | |
145 | YUD.removeClass('show_my','current'); |
|
145 | YUD.removeClass('show_my','current'); | |
146 | YUD.removeClass('show_perms','current'); |
|
146 | YUD.removeClass('show_perms','current'); | |
147 |
|
147 | |||
148 | YUD.setStyle('my_container','display','none'); |
|
148 | YUD.setStyle('my_container','display','none'); | |
149 | YUD.setStyle('perms_container','display','none'); |
|
149 | YUD.setStyle('perms_container','display','none'); | |
150 | YUD.setStyle('pullrequests_container','display',''); |
|
150 | YUD.setStyle('pullrequests_container','display',''); | |
151 | YUD.setStyle('q_filter','display','none'); |
|
151 | YUD.setStyle('q_filter','display','none'); | |
152 |
|
152 | |||
153 | var url = "${h.url('admin_settings_my_pullrequests')}"; |
|
153 | var url = "${h.url('admin_settings_my_pullrequests')}"; | |
154 | ypjax(url, 'pullrequests_container'); |
|
154 | ypjax(url, 'pullrequests_container'); | |
155 | } |
|
155 | } | |
156 | YUE.on('show_pullrequests','click',function(e){ |
|
156 | YUE.on('show_pullrequests','click',function(e){ | |
157 |
|
|
157 | show_pullrequests(e) | |
158 | }) |
|
158 | }) | |
159 |
|
159 | |||
160 | var tabs = { |
|
160 | var tabs = { | |
161 | 'perms': show_perms, |
|
161 | 'perms': show_perms, | |
162 | 'my': show_my, |
|
162 | 'my': show_my, | |
163 | 'pullrequests': show_pullrequests |
|
163 | 'pullrequests': show_pullrequests | |
164 | } |
|
164 | } | |
165 | var url = location.href.split('#'); |
|
165 | var url = location.href.split('#'); | |
166 | if (url[1]) { |
|
166 | if (url[1]) { | |
167 | //We have a hash |
|
167 | //We have a hash | |
168 | var tabHash = url[1]; |
|
168 | var tabHash = url[1]; | |
169 | var func = tabs[tabHash] |
|
169 | var func = tabs[tabHash] | |
170 | if (func){ |
|
170 | if (func){ | |
171 | func(); |
|
171 | func(); | |
172 | } |
|
172 | } | |
173 | } |
|
173 | } | |
174 |
|
174 | |||
175 | function table_renderer(data){ |
|
175 | function table_renderer(data){ | |
176 |
|
|
176 | var myDataSource = new YAHOO.util.DataSource(data); | |
177 |
|
|
177 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
178 |
|
178 | |||
179 |
|
|
179 | myDataSource.responseSchema = { | |
180 |
|
|
180 | resultsList: "records", | |
181 |
|
|
181 | fields: [ | |
182 |
|
|
182 | {key:"menu"}, | |
183 |
|
|
183 | {key:"raw_name"}, | |
184 |
|
|
184 | {key:"name"}, | |
185 |
|
|
185 | {key:"last_changeset"}, | |
186 |
|
|
186 | {key:"action"}, | |
187 |
|
|
187 | ] | |
188 |
|
|
188 | }; | |
189 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
189 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
190 | // This is the filter function |
|
190 | // This is the filter function | |
191 | var data = res.results || [], |
|
191 | var data = res.results || [], | |
192 | filtered = [], |
|
192 | filtered = [], | |
193 | i,l; |
|
193 | i,l; | |
194 |
|
194 | |||
195 | if (req) { |
|
195 | if (req) { | |
196 | req = req.toLowerCase(); |
|
196 | req = req.toLowerCase(); | |
197 | for (i = 0; i<data.length; i++) { |
|
197 | for (i = 0; i<data.length; i++) { | |
198 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
198 | var pos = data[i].raw_name.toLowerCase().indexOf(req) | |
199 | if (pos != -1) { |
|
199 | if (pos != -1) { | |
200 | filtered.push(data[i]); |
|
200 | filtered.push(data[i]); | |
201 | } |
|
201 | } | |
202 | } |
|
202 | } | |
203 | res.results = filtered; |
|
203 | res.results = filtered; | |
204 | } |
|
204 | } | |
205 | return res; |
|
205 | return res; | |
206 | } |
|
206 | } | |
207 |
|
207 | |||
208 |
|
|
208 | // main table sorting | |
209 |
|
|
209 | var myColumnDefs = [ | |
210 |
|
|
210 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
211 |
|
|
211 | {key:"name",label:"${_('Name')}",sortable:true, | |
212 |
|
|
212 | sortOptions: { sortFunction: nameSort }}, | |
213 |
|
|
213 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, | |
214 |
|
|
214 | sortOptions: { sortFunction: revisionSort }}, | |
215 |
|
|
215 | {key:"action",label:"${_('Action')}",sortable:false}, | |
216 |
|
|
216 | ]; | |
217 |
|
217 | |||
218 |
|
|
218 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ | |
219 |
|
|
219 | sortedBy:{key:"name",dir:"asc"}, | |
220 |
|
|
220 | paginator: new YAHOO.widget.Paginator({ | |
221 |
|
|
221 | rowsPerPage: 50, | |
222 |
|
|
222 | alwaysVisible: false, | |
223 |
|
|
223 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
224 |
|
|
224 | pageLinks: 5, | |
225 |
|
|
225 | containerClass: 'pagination-wh', | |
226 |
|
|
226 | currentPageClass: 'pager_curpage', | |
227 |
|
|
227 | pageLinkClass: 'pager_link', | |
228 |
|
|
228 | nextPageLinkLabel: '>', | |
229 |
|
|
229 | previousPageLinkLabel: '<', | |
230 |
|
|
230 | firstPageLinkLabel: '<<', | |
231 |
|
|
231 | lastPageLinkLabel: '>>', | |
232 |
|
|
232 | containers:['user-paginator'] | |
233 |
|
|
233 | }), | |
234 |
|
234 | |||
235 |
|
|
235 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
236 |
|
|
236 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
237 |
|
|
237 | MSG_EMPTY:"${_('No records found.')}", | |
238 |
|
|
238 | MSG_ERROR:"${_('Data error.')}", | |
239 |
|
|
239 | MSG_LOADING:"${_('Loading...')}", | |
240 | } |
|
240 | } | |
241 |
|
|
241 | ); | |
242 |
|
|
242 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
243 |
|
|
243 | tooltip_activate(); | |
244 |
|
|
244 | quick_repo_menu(); | |
245 |
|
|
245 | }); | |
246 |
|
246 | |||
247 |
|
|
247 | var filterTimeout = null; | |
248 |
|
248 | |||
249 |
|
|
249 | updateFilter = function() { | |
250 |
|
|
250 | // Reset timeout | |
251 |
|
|
251 | filterTimeout = null; | |
252 |
|
252 | |||
253 |
|
|
253 | // Reset sort | |
254 |
|
|
254 | var state = myDataTable.getState(); | |
255 |
|
|
255 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
256 |
|
256 | |||
257 |
|
|
257 | // Get filtered data | |
258 |
|
|
258 | myDataSource.sendRequest(YUD.get('q_filter').value,{ | |
259 |
|
|
259 | success : myDataTable.onDataReturnInitializeTable, | |
260 |
|
|
260 | failure : myDataTable.onDataReturnInitializeTable, | |
261 |
|
|
261 | scope : myDataTable, | |
262 |
|
|
262 | argument: state | |
263 |
|
|
263 | }); | |
264 |
|
264 | |||
265 |
|
|
265 | }; | |
266 |
|
|
266 | YUE.on('q_filter','click',function(){ | |
267 |
|
|
267 | if(!YUD.hasClass('q_filter', 'loaded')){ | |
268 |
|
|
268 | YUD.get('q_filter').value = ''; | |
269 |
|
|
269 | //TODO: load here full list later to do search within groups | |
270 |
|
|
270 | YUD.addClass('q_filter', 'loaded'); | |
271 |
|
|
271 | } | |
272 |
|
|
272 | }); | |
273 |
|
273 | |||
274 |
|
|
274 | YUE.on('q_filter','keyup',function (e) { | |
275 |
|
|
275 | clearTimeout(filterTimeout); | |
276 |
|
|
276 | filterTimeout = setTimeout(updateFilter,600); | |
277 |
|
|
277 | }); | |
278 | } |
|
278 | } | |
279 | </script> |
|
279 | </script> | |
280 | </%def> |
|
280 | </%def> |
@@ -1,147 +1,147 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Users administration')} - ${c.rhodecode_name} |
|
5 | ${_('Users administration')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} » <span id="user_count">0</span> ${_('users')} |
|
9 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} » <span id="user_count">0</span> ${_('users')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 |
|
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | <ul class="links"> |
|
21 | <ul class="links"> | |
22 | <li> |
|
22 | <li> | |
23 | <span>${h.link_to(_(u'ADD NEW USER'),h.url('new_user'))}</span> |
|
23 | <span>${h.link_to(_(u'ADD NEW USER'),h.url('new_user'))}</span> | |
24 | </li> |
|
24 | </li> | |
25 | </ul> |
|
25 | </ul> | |
26 | </div> |
|
26 | </div> | |
27 | <!-- end box / title --> |
|
27 | <!-- end box / title --> | |
28 | <div class="table yui-skin-sam" id="users_list_wrap"></div> |
|
28 | <div class="table yui-skin-sam" id="users_list_wrap"></div> | |
29 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
29 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
30 | </div> |
|
30 | </div> | |
31 |
|
31 | |||
32 | <script> |
|
32 | <script> | |
33 | var url = "${h.url('formatted_users', format='json')}"; |
|
33 | var url = "${h.url('formatted_users', format='json')}"; | |
34 | var data = ${c.data|n}; |
|
34 | var data = ${c.data|n}; | |
35 | var myDataSource = new YAHOO.util.DataSource(data); |
|
35 | var myDataSource = new YAHOO.util.DataSource(data); | |
36 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
36 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
37 |
|
37 | |||
38 | myDataSource.responseSchema = { |
|
38 | myDataSource.responseSchema = { | |
39 |
|
|
39 | resultsList: "records", | |
40 | fields: [ |
|
40 | fields: [ | |
41 | {key: "gravatar"}, |
|
41 | {key: "gravatar"}, | |
42 | {key: "raw_username"}, |
|
42 | {key: "raw_username"}, | |
43 | {key: "username"}, |
|
43 | {key: "username"}, | |
44 | {key: "firstname"}, |
|
44 | {key: "firstname"}, | |
45 | {key: "lastname"}, |
|
45 | {key: "lastname"}, | |
46 | {key: "last_login"}, |
|
46 | {key: "last_login"}, | |
47 | {key: "last_login_raw"}, |
|
47 | {key: "last_login_raw"}, | |
48 | {key: "active"}, |
|
48 | {key: "active"}, | |
49 | {key: "admin"}, |
|
49 | {key: "admin"}, | |
50 | {key: "ldap"}, |
|
50 | {key: "ldap"}, | |
51 | {key: "action"}, |
|
51 | {key: "action"}, | |
52 | ] |
|
52 | ] | |
53 | }; |
|
53 | }; | |
54 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
54 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
55 | // This is the filter function |
|
55 | // This is the filter function | |
56 | var data = res.results || [], |
|
56 | var data = res.results || [], | |
57 | filtered = [], |
|
57 | filtered = [], | |
58 | i,l; |
|
58 | i,l; | |
59 |
|
59 | |||
60 | if (req) { |
|
60 | if (req) { | |
61 | req = req.toLowerCase(); |
|
61 | req = req.toLowerCase(); | |
62 | for (i = 0; i<data.length; i++) { |
|
62 | for (i = 0; i<data.length; i++) { | |
63 |
|
|
63 | var pos = data[i].raw_username.toLowerCase().indexOf(req) | |
64 | if (pos != -1) { |
|
64 | if (pos != -1) { | |
65 | filtered.push(data[i]); |
|
65 | filtered.push(data[i]); | |
66 | } |
|
66 | } | |
67 | } |
|
67 | } | |
68 | res.results = filtered; |
|
68 | res.results = filtered; | |
69 | } |
|
69 | } | |
70 | YUD.get('user_count').innerHTML = res.results.length; |
|
70 | YUD.get('user_count').innerHTML = res.results.length; | |
71 | return res; |
|
71 | return res; | |
72 | } |
|
72 | } | |
73 |
|
73 | |||
74 | // main table sorting |
|
74 | // main table sorting | |
75 | var myColumnDefs = [ |
|
75 | var myColumnDefs = [ | |
76 | {key:"gravatar",label:"",sortable:false,}, |
|
76 | {key:"gravatar",label:"",sortable:false,}, | |
77 | {key:"username",label:"${_('username')}",sortable:true, |
|
77 | {key:"username",label:"${_('username')}",sortable:true, | |
78 |
|
|
78 | sortOptions: { sortFunction: linkSort } | |
79 | }, |
|
79 | }, | |
80 | {key:"firstname",label:"${_('firstname')}",sortable:true,}, |
|
80 | {key:"firstname",label:"${_('firstname')}",sortable:true,}, | |
81 | {key:"lastname",label:"${_('lastname')}",sortable:true,}, |
|
81 | {key:"lastname",label:"${_('lastname')}",sortable:true,}, | |
82 | {key:"last_login",label:"${_('last login')}",sortable:true, |
|
82 | {key:"last_login",label:"${_('last login')}",sortable:true, | |
83 |
|
|
83 | sortOptions: { sortFunction: lastLoginSort }}, | |
84 | {key:"active",label:"${_('active')}",sortable:true,}, |
|
84 | {key:"active",label:"${_('active')}",sortable:true,}, | |
85 | {key:"admin",label:"${_('admin')}",sortable:true,}, |
|
85 | {key:"admin",label:"${_('admin')}",sortable:true,}, | |
86 | {key:"ldap",label:"${_('ldap')}",sortable:true,}, |
|
86 | {key:"ldap",label:"${_('ldap')}",sortable:true,}, | |
87 | {key:"action",label:"${_('action')}",sortable:false}, |
|
87 | {key:"action",label:"${_('action')}",sortable:false}, | |
88 | ]; |
|
88 | ]; | |
89 |
|
89 | |||
90 | var myDataTable = new YAHOO.widget.DataTable("users_list_wrap", myColumnDefs, myDataSource,{ |
|
90 | var myDataTable = new YAHOO.widget.DataTable("users_list_wrap", myColumnDefs, myDataSource,{ | |
91 | sortedBy:{key:"username",dir:"asc"}, |
|
91 | sortedBy:{key:"username",dir:"asc"}, | |
92 | paginator: new YAHOO.widget.Paginator({ |
|
92 | paginator: new YAHOO.widget.Paginator({ | |
93 | rowsPerPage: 15, |
|
93 | rowsPerPage: 15, | |
94 | alwaysVisible: false, |
|
94 | alwaysVisible: false, | |
95 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
95 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
96 | pageLinks: 5, |
|
96 | pageLinks: 5, | |
97 | containerClass: 'pagination-wh', |
|
97 | containerClass: 'pagination-wh', | |
98 | currentPageClass: 'pager_curpage', |
|
98 | currentPageClass: 'pager_curpage', | |
99 | pageLinkClass: 'pager_link', |
|
99 | pageLinkClass: 'pager_link', | |
100 | nextPageLinkLabel: '>', |
|
100 | nextPageLinkLabel: '>', | |
101 | previousPageLinkLabel: '<', |
|
101 | previousPageLinkLabel: '<', | |
102 | firstPageLinkLabel: '<<', |
|
102 | firstPageLinkLabel: '<<', | |
103 | lastPageLinkLabel: '>>', |
|
103 | lastPageLinkLabel: '>>', | |
104 | containers:['user-paginator'] |
|
104 | containers:['user-paginator'] | |
105 | }), |
|
105 | }), | |
106 |
|
106 | |||
107 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
107 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
108 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
108 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
109 | MSG_EMPTY:"${_('No records found.')}", |
|
109 | MSG_EMPTY:"${_('No records found.')}", | |
110 | MSG_ERROR:"${_('Data error.')}", |
|
110 | MSG_ERROR:"${_('Data error.')}", | |
111 | MSG_LOADING:"${_('Loading...')}", |
|
111 | MSG_LOADING:"${_('Loading...')}", | |
112 | } |
|
112 | } | |
113 | ); |
|
113 | ); | |
114 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
114 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
115 |
|
115 | |||
116 | }); |
|
116 | }); | |
117 |
|
117 | |||
118 | var filterTimeout = null; |
|
118 | var filterTimeout = null; | |
119 |
|
119 | |||
120 | updateFilter = function () { |
|
120 | updateFilter = function () { | |
121 | // Reset timeout |
|
121 | // Reset timeout | |
122 | filterTimeout = null; |
|
122 | filterTimeout = null; | |
123 |
|
123 | |||
124 | // Reset sort |
|
124 | // Reset sort | |
125 | var state = myDataTable.getState(); |
|
125 | var state = myDataTable.getState(); | |
126 | state.sortedBy = {key:'username', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
126 | state.sortedBy = {key:'username', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
127 |
|
127 | |||
128 | // Get filtered data |
|
128 | // Get filtered data | |
129 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
129 | myDataSource.sendRequest(YUD.get('q_filter').value,{ | |
130 | success : myDataTable.onDataReturnInitializeTable, |
|
130 | success : myDataTable.onDataReturnInitializeTable, | |
131 | failure : myDataTable.onDataReturnInitializeTable, |
|
131 | failure : myDataTable.onDataReturnInitializeTable, | |
132 | scope : myDataTable, |
|
132 | scope : myDataTable, | |
133 | argument: state |
|
133 | argument: state | |
134 | }); |
|
134 | }); | |
135 |
|
135 | |||
136 | }; |
|
136 | }; | |
137 | YUE.on('q_filter','click',function(){ |
|
137 | YUE.on('q_filter','click',function(){ | |
138 | YUD.get('q_filter').value = ''; |
|
138 | YUD.get('q_filter').value = ''; | |
139 | }); |
|
139 | }); | |
140 |
|
140 | |||
141 | YUE.on('q_filter','keyup',function (e) { |
|
141 | YUE.on('q_filter','keyup',function (e) { | |
142 | clearTimeout(filterTimeout); |
|
142 | clearTimeout(filterTimeout); | |
143 | filterTimeout = setTimeout(updateFilter,600); |
|
143 | filterTimeout = setTimeout(updateFilter,600); | |
144 | }); |
|
144 | }); | |
145 | </script> |
|
145 | </script> | |
146 |
|
146 | |||
147 | </%def> |
|
147 | </%def> |
@@ -1,228 +1,228 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Edit users group')} ${c.users_group.users_group_name} - ${c.rhodecode_name} |
|
5 | ${_('Edit users group')} ${c.users_group.users_group_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(_('UsersGroups'),h.url('users_groups'))} |
|
11 | ${h.link_to(_('UsersGroups'),h.url('users_groups'))} | |
12 | » |
|
12 | » | |
13 | ${_('edit')} "${c.users_group.users_group_name}" |
|
13 | ${_('edit')} "${c.users_group.users_group_name}" | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('admin')} |
|
17 | ${self.menu('admin')} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="main()"> |
|
20 | <%def name="main()"> | |
21 | <div class="box box-left"> |
|
21 | <div class="box box-left"> | |
22 | <!-- box / title --> |
|
22 | <!-- box / title --> | |
23 | <div class="title"> |
|
23 | <div class="title"> | |
24 | ${self.breadcrumbs()} |
|
24 | ${self.breadcrumbs()} | |
25 | </div> |
|
25 | </div> | |
26 | <!-- end box / title --> |
|
26 | <!-- end box / title --> | |
27 | ${h.form(url('users_group', id=c.users_group.users_group_id),method='put', id='edit_users_group')} |
|
27 | ${h.form(url('users_group', id=c.users_group.users_group_id),method='put', id='edit_users_group')} | |
28 | <div class="form"> |
|
28 | <div class="form"> | |
29 | <!-- fields --> |
|
29 | <!-- fields --> | |
30 |
|
|
30 | <div class="fields"> | |
31 |
|
|
31 | <div class="field"> | |
32 |
|
|
32 | <div class="label"> | |
33 |
|
|
33 | <label for="users_group_name">${_('Group name')}:</label> | |
34 |
|
|
34 | </div> | |
35 |
|
|
35 | <div class="input"> | |
36 |
|
|
36 | ${h.text('users_group_name',class_='small')} | |
37 |
|
|
37 | </div> | |
38 |
|
|
38 | </div> | |
39 |
|
39 | |||
40 |
|
|
40 | <div class="field"> | |
41 |
|
|
41 | <div class="label label-checkbox"> | |
42 |
|
|
42 | <label for="users_group_active">${_('Active')}:</label> | |
43 |
|
|
43 | </div> | |
44 |
|
|
44 | <div class="checkboxes"> | |
45 |
|
|
45 | ${h.checkbox('users_group_active',value=True)} | |
46 |
|
|
46 | </div> | |
47 |
|
|
47 | </div> | |
48 |
|
|
48 | <div class="field"> | |
49 | <div class="label"> |
|
49 | <div class="label"> | |
50 | <label for="users_group_active">${_('Members')}:</label> |
|
50 | <label for="users_group_active">${_('Members')}:</label> | |
51 | </div> |
|
51 | </div> | |
52 | <div class="select"> |
|
52 | <div class="select"> | |
53 |
|
|
53 | <table> | |
54 |
|
|
54 | <tr> | |
55 |
|
|
55 | <td> | |
56 |
|
|
56 | <div> | |
57 |
|
|
57 | <div style="float:left"> | |
58 |
|
|
58 | <div class="text" style="padding: 0px 0px 6px;">${_('Choosen group members')}</div> | |
59 |
|
|
59 | ${h.select('users_group_members',[x[0] for x in c.group_members],c.group_members,multiple=True,size=8,style="min-width:210px")} | |
60 |
|
|
60 | <div id="remove_all_elements" style="cursor:pointer;text-align:center"> | |
61 |
|
|
61 | ${_('Remove all elements')} | |
62 |
|
|
62 | <img alt="remove" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_right.png')}"/> | |
63 |
|
|
63 | </div> | |
64 |
|
|
64 | </div> | |
65 |
|
|
65 | <div style="float:left;width:20px;padding-top:50px"> | |
66 |
|
|
66 | <img alt="add" id="add_element" | |
67 |
|
|
67 | style="padding:2px;cursor:pointer" | |
68 |
|
|
68 | src="${h.url('/images/icons/arrow_left.png')}"/> | |
69 |
|
|
69 | <br /> | |
70 |
|
|
70 | <img alt="remove" id="remove_element" | |
71 |
|
|
71 | style="padding:2px;cursor:pointer" | |
72 |
|
|
72 | src="${h.url('/images/icons/arrow_right.png')}"/> | |
73 |
|
|
73 | </div> | |
74 |
|
|
74 | <div style="float:left"> | |
75 |
|
|
75 | <div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div> | |
76 |
|
|
76 | ${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")} | |
77 |
|
|
77 | <div id="add_all_elements" style="cursor:pointer;text-align:center"> | |
78 |
|
|
78 | <img alt="add" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_left.png')}"/> | |
79 |
|
|
79 | ${_('Add all elements')} | |
80 |
|
|
80 | </div> | |
81 |
|
|
81 | </div> | |
82 |
|
|
82 | </div> | |
83 |
|
|
83 | </td> | |
84 |
|
|
84 | </tr> | |
85 |
|
|
85 | </table> | |
86 | </div> |
|
86 | </div> | |
87 |
|
87 | |||
88 | </div> |
|
88 | </div> | |
89 | <div class="buttons"> |
|
89 | <div class="buttons"> | |
90 | ${h.submit('save',_('save'),class_="ui-btn large")} |
|
90 | ${h.submit('save',_('save'),class_="ui-btn large")} | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 | </div> |
|
93 | </div> | |
94 | ${h.end_form()} |
|
94 | ${h.end_form()} | |
95 | </div> |
|
95 | </div> | |
96 |
|
96 | |||
97 | <div class="box box-right"> |
|
97 | <div class="box box-right"> | |
98 | <!-- box / title --> |
|
98 | <!-- box / title --> | |
99 | <div class="title"> |
|
99 | <div class="title"> | |
100 | <h5>${_('Permissions')}</h5> |
|
100 | <h5>${_('Permissions')}</h5> | |
101 | </div> |
|
101 | </div> | |
102 | ${h.form(url('users_group_perm', id=c.users_group.users_group_id), method='put')} |
|
102 | ${h.form(url('users_group_perm', id=c.users_group.users_group_id), method='put')} | |
103 | <div class="form"> |
|
103 | <div class="form"> | |
104 | <!-- fields --> |
|
104 | <!-- fields --> | |
105 | <div class="fields"> |
|
105 | <div class="fields"> | |
106 | <div class="field"> |
|
106 | <div class="field"> | |
107 | <div class="label label-checkbox"> |
|
107 | <div class="label label-checkbox"> | |
108 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> |
|
108 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> | |
109 | </div> |
|
109 | </div> | |
110 | <div class="checkboxes"> |
|
110 | <div class="checkboxes"> | |
111 | ${h.checkbox('inherit_default_permissions',value=True)} |
|
111 | ${h.checkbox('inherit_default_permissions',value=True)} | |
112 | </div> |
|
112 | </div> | |
113 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' |
|
113 | <span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' | |
114 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> |
|
114 | 'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> | |
115 | </div> |
|
115 | </div> | |
116 | <div id="inherit_overlay" style="${'opacity:0.3' if c.users_group.inherit_default_permissions else ''}" > |
|
116 | <div id="inherit_overlay" style="${'opacity:0.3' if c.users_group.inherit_default_permissions else ''}" > | |
117 | <div class="field"> |
|
117 | <div class="field"> | |
118 | <div class="label label-checkbox"> |
|
118 | <div class="label label-checkbox"> | |
119 | <label for="create_repo_perm">${_('Create repositories')}:</label> |
|
119 | <label for="create_repo_perm">${_('Create repositories')}:</label> | |
120 | </div> |
|
120 | </div> | |
121 | <div class="checkboxes"> |
|
121 | <div class="checkboxes"> | |
122 | ${h.checkbox('create_repo_perm',value=True)} |
|
122 | ${h.checkbox('create_repo_perm',value=True)} | |
123 | </div> |
|
123 | </div> | |
124 | </div> |
|
124 | </div> | |
125 | <div class="field"> |
|
125 | <div class="field"> | |
126 | <div class="label label-checkbox"> |
|
126 | <div class="label label-checkbox"> | |
127 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> |
|
127 | <label for="fork_repo_perm">${_('Fork repositories')}:</label> | |
128 | </div> |
|
128 | </div> | |
129 | <div class="checkboxes"> |
|
129 | <div class="checkboxes"> | |
130 | ${h.checkbox('fork_repo_perm',value=True)} |
|
130 | ${h.checkbox('fork_repo_perm',value=True)} | |
131 | </div> |
|
131 | </div> | |
132 | </div> |
|
132 | </div> | |
133 | </div> |
|
133 | </div> | |
134 | <div class="buttons"> |
|
134 | <div class="buttons"> | |
135 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
135 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
136 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
136 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
137 | </div> |
|
137 | </div> | |
138 | </div> |
|
138 | </div> | |
139 | </div> |
|
139 | </div> | |
140 | ${h.end_form()} |
|
140 | ${h.end_form()} | |
141 | </div> |
|
141 | </div> | |
142 |
|
142 | |||
143 | <div class="box box-right"> |
|
143 | <div class="box box-right"> | |
144 | <!-- box / title --> |
|
144 | <!-- box / title --> | |
145 | <div class="title"> |
|
145 | <div class="title"> | |
146 | <h5>${_('Group members')}</h5> |
|
146 | <h5>${_('Group members')}</h5> | |
147 | </div> |
|
147 | </div> | |
148 |
|
148 | |||
149 | <div class="group_members_wrap"> |
|
149 | <div class="group_members_wrap"> | |
150 | % if c.group_members_obj: |
|
150 | % if c.group_members_obj: | |
151 | <ul class="group_members"> |
|
151 | <ul class="group_members"> | |
152 | %for user in c.group_members_obj: |
|
152 | %for user in c.group_members_obj: | |
153 | <li> |
|
153 | <li> | |
154 | <div class="group_member"> |
|
154 | <div class="group_member"> | |
155 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/> </div> |
|
155 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/> </div> | |
156 | <div>${h.link_to(user.username, h.url('edit_user',id=user.user_id))}</div> |
|
156 | <div>${h.link_to(user.username, h.url('edit_user',id=user.user_id))}</div> | |
157 | <div>${user.full_name}</div> |
|
157 | <div>${user.full_name}</div> | |
158 | </div> |
|
158 | </div> | |
159 | </li> |
|
159 | </li> | |
160 | %endfor |
|
160 | %endfor | |
161 | </ul> |
|
161 | </ul> | |
162 | %else: |
|
162 | %else: | |
163 | <span class="empty_data">${_('No members yet')}</span> |
|
163 | <span class="empty_data">${_('No members yet')}</span> | |
164 | %endif |
|
164 | %endif | |
165 | </div> |
|
165 | </div> | |
166 | </div> |
|
166 | </div> | |
167 |
|
167 | |||
168 | <div class="box box-left"> |
|
168 | <div class="box box-left"> | |
169 | <!-- box / title --> |
|
169 | <!-- box / title --> | |
170 | <div class="title"> |
|
170 | <div class="title"> | |
171 | <h5>${_('Permissions defined for this group')}</h5> |
|
171 | <h5>${_('Permissions defined for this group')}</h5> | |
172 | </div> |
|
172 | </div> | |
173 | ## permissions overview |
|
173 | ## permissions overview | |
174 | <div id="perms" class="table"> |
|
174 | <div id="perms" class="table"> | |
175 | %for section in sorted(c.users_group.permissions.keys()): |
|
175 | %for section in sorted(c.users_group.permissions.keys()): | |
176 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
176 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
177 | %if not c.users_group.permissions: |
|
177 | %if not c.users_group.permissions: | |
178 | <span class="empty_data">${_('No permissions set yet')}</span> |
|
178 | <span class="empty_data">${_('No permissions set yet')}</span> | |
179 | %else: |
|
179 | %else: | |
180 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
180 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
181 | <table id="tbl_list_repository"> |
|
181 | <table id="tbl_list_repository"> | |
182 | <thead> |
|
182 | <thead> | |
183 | <tr> |
|
183 | <tr> | |
184 | <th class="left">${_('Name')}</th> |
|
184 | <th class="left">${_('Name')}</th> | |
185 | <th class="left">${_('Permission')}</th> |
|
185 | <th class="left">${_('Permission')}</th> | |
186 | <th class="left">${_('Edit Permission')}</th> |
|
186 | <th class="left">${_('Edit Permission')}</th> | |
187 | </thead> |
|
187 | </thead> | |
188 | <tbody> |
|
188 | <tbody> | |
189 | %for k in c.users_group.permissions[section]: |
|
189 | %for k in c.users_group.permissions[section]: | |
190 | <% |
|
190 | <% | |
191 | section_perm = c.users_group.permissions[section].get(k) |
|
191 | section_perm = c.users_group.permissions[section].get(k) | |
192 | _perm = section_perm.split('.')[-1] |
|
192 | _perm = section_perm.split('.')[-1] | |
193 | %> |
|
193 | %> | |
194 | <tr> |
|
194 | <tr> | |
195 | <td> |
|
195 | <td> | |
196 | %if section == 'repositories': |
|
196 | %if section == 'repositories': | |
197 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
197 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
198 | %elif section == 'repositories_groups': |
|
198 | %elif section == 'repositories_groups': | |
199 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
199 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
200 | %endif |
|
200 | %endif | |
201 | </td> |
|
201 | </td> | |
202 | <td> |
|
202 | <td> | |
203 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
203 | <span class="perm_tag ${_perm}">${section_perm}</span> | |
204 | </td> |
|
204 | </td> | |
205 | <td> |
|
205 | <td> | |
206 | %if section == 'repositories': |
|
206 | %if section == 'repositories': | |
207 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
207 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
208 | %elif section == 'repositories_groups': |
|
208 | %elif section == 'repositories_groups': | |
209 | <a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
209 | <a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a> | |
210 | %else: |
|
210 | %else: | |
211 | -- |
|
211 | -- | |
212 | %endif |
|
212 | %endif | |
213 | </td> |
|
213 | </td> | |
214 | </tr> |
|
214 | </tr> | |
215 | %endfor |
|
215 | %endfor | |
216 | </tbody> |
|
216 | </tbody> | |
217 | </table> |
|
217 | </table> | |
218 | </div> |
|
218 | </div> | |
219 | %endif |
|
219 | %endif | |
220 | %endfor |
|
220 | %endfor | |
221 | </div> |
|
221 | </div> | |
222 | </div> |
|
222 | </div> | |
223 |
|
223 | |||
224 |
|
224 | |||
225 | <script type="text/javascript"> |
|
225 | <script type="text/javascript"> | |
226 | MultiSelectWidget('users_group_members','available_members','edit_users_group'); |
|
226 | MultiSelectWidget('users_group_members','available_members','edit_users_group'); | |
227 | </script> |
|
227 | </script> | |
228 | </%def> |
|
228 | </%def> |
@@ -1,362 +1,362 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="root.html"/> |
|
2 | <%inherit file="root.html"/> | |
3 |
|
3 | |||
4 | <!-- HEADER --> |
|
4 | <!-- HEADER --> | |
5 | <div id="header"> |
|
5 | <div id="header"> | |
6 | <div id="header-inner" class="title hover"> |
|
6 | <div id="header-inner" class="title hover"> | |
7 | <div id="logo"> |
|
7 | <div id="logo"> | |
8 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> |
|
8 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> | |
9 | </div> |
|
9 | </div> | |
10 | <!-- MENU --> |
|
10 | <!-- MENU --> | |
11 | ${self.page_nav()} |
|
11 | ${self.page_nav()} | |
12 | <!-- END MENU --> |
|
12 | <!-- END MENU --> | |
13 | ${self.body()} |
|
13 | ${self.body()} | |
14 | </div> |
|
14 | </div> | |
15 | </div> |
|
15 | </div> | |
16 | <!-- END HEADER --> |
|
16 | <!-- END HEADER --> | |
17 |
|
17 | |||
18 | <!-- CONTENT --> |
|
18 | <!-- CONTENT --> | |
19 | <div id="content"> |
|
19 | <div id="content"> | |
20 | <div class="flash_msg"> |
|
20 | <div class="flash_msg"> | |
21 | <% messages = h.flash.pop_messages() %> |
|
21 | <% messages = h.flash.pop_messages() %> | |
22 | % if messages: |
|
22 | % if messages: | |
23 | <ul id="flash-messages"> |
|
23 | <ul id="flash-messages"> | |
24 | % for message in messages: |
|
24 | % for message in messages: | |
25 | <li class="${message.category}_msg">${message}</li> |
|
25 | <li class="${message.category}_msg">${message}</li> | |
26 | % endfor |
|
26 | % endfor | |
27 | </ul> |
|
27 | </ul> | |
28 | % endif |
|
28 | % endif | |
29 | </div> |
|
29 | </div> | |
30 | <div id="main"> |
|
30 | <div id="main"> | |
31 | ${next.main()} |
|
31 | ${next.main()} | |
32 | </div> |
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 | <!-- END CONTENT --> |
|
34 | <!-- END CONTENT --> | |
35 |
|
35 | |||
36 | <!-- FOOTER --> |
|
36 | <!-- FOOTER --> | |
37 | <div id="footer"> |
|
37 | <div id="footer"> | |
38 | <div id="footer-inner" class="title"> |
|
38 | <div id="footer-inner" class="title"> | |
39 | <div> |
|
39 | <div> | |
40 | <p class="footer-link"> |
|
40 | <p class="footer-link"> | |
41 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> |
|
41 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> | |
42 | </p> |
|
42 | </p> | |
43 |
|
|
43 | <p class="footer-link-right"> | |
44 |
|
|
44 | <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a> | |
45 |
|
|
45 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski | |
46 |
|
|
46 | </p> | |
47 | </div> |
|
47 | </div> | |
48 | </div> |
|
48 | </div> | |
49 | </div> |
|
49 | </div> | |
50 | <!-- END FOOTER --> |
|
50 | <!-- END FOOTER --> | |
51 |
|
51 | |||
52 | ### MAKO DEFS ### |
|
52 | ### MAKO DEFS ### | |
53 | <%def name="page_nav()"> |
|
53 | <%def name="page_nav()"> | |
54 | ${self.menu()} |
|
54 | ${self.menu()} | |
55 | </%def> |
|
55 | </%def> | |
56 |
|
56 | |||
57 | <%def name="breadcrumbs()"> |
|
57 | <%def name="breadcrumbs()"> | |
58 | <div class="breadcrumbs"> |
|
58 | <div class="breadcrumbs"> | |
59 | ${self.breadcrumbs_links()} |
|
59 | ${self.breadcrumbs_links()} | |
60 | </div> |
|
60 | </div> | |
61 | </%def> |
|
61 | </%def> | |
62 |
|
62 | |||
63 | <%def name="usermenu()"> |
|
63 | <%def name="usermenu()"> | |
64 | <div class="user-menu"> |
|
64 | <div class="user-menu"> | |
65 | <div class="container"> |
|
65 | <div class="container"> | |
66 | <div class="gravatar" id="quick_login_link"> |
|
66 | <div class="gravatar" id="quick_login_link"> | |
67 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" /> |
|
67 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" /> | |
68 | </div> |
|
68 | </div> | |
69 | %if c.rhodecode_user.username != 'default' and c.unread_notifications != 0: |
|
69 | %if c.rhodecode_user.username != 'default' and c.unread_notifications != 0: | |
70 | <div class="notifications"> |
|
70 | <div class="notifications"> | |
71 | <a id="notification_counter" href="${h.url('notifications')}">${c.unread_notifications}</a> |
|
71 | <a id="notification_counter" href="${h.url('notifications')}">${c.unread_notifications}</a> | |
72 | </div> |
|
72 | </div> | |
73 | %endif |
|
73 | %endif | |
74 | </div> |
|
74 | </div> | |
75 | <div id="quick_login" style="display:none"> |
|
75 | <div id="quick_login" style="display:none"> | |
76 | %if c.rhodecode_user.username == 'default': |
|
76 | %if c.rhodecode_user.username == 'default': | |
77 | <h4>${_('Login to your account')}</h4> |
|
77 | <h4>${_('Login to your account')}</h4> | |
78 | ${h.form(h.url('login_home',came_from=h.url.current()))} |
|
78 | ${h.form(h.url('login_home',came_from=h.url.current()))} | |
79 | <div class="form"> |
|
79 | <div class="form"> | |
80 | <div class="fields"> |
|
80 | <div class="fields"> | |
81 | <div class="field"> |
|
81 | <div class="field"> | |
82 | <div class="label"> |
|
82 | <div class="label"> | |
83 | <label for="username">${_('Username')}:</label> |
|
83 | <label for="username">${_('Username')}:</label> | |
84 | </div> |
|
84 | </div> | |
85 | <div class="input"> |
|
85 | <div class="input"> | |
86 | ${h.text('username',class_='focus',size=40)} |
|
86 | ${h.text('username',class_='focus',size=40)} | |
87 | </div> |
|
87 | </div> | |
88 |
|
88 | |||
89 | </div> |
|
89 | </div> | |
90 | <div class="field"> |
|
90 | <div class="field"> | |
91 | <div class="label"> |
|
91 | <div class="label"> | |
92 | <label for="password">${_('Password')}:</label> |
|
92 | <label for="password">${_('Password')}:</label> | |
93 | </div> |
|
93 | </div> | |
94 | <div class="input"> |
|
94 | <div class="input"> | |
95 | ${h.password('password',class_='focus',size=40)} |
|
95 | ${h.password('password',class_='focus',size=40)} | |
96 | </div> |
|
96 | </div> | |
97 |
|
97 | |||
98 | </div> |
|
98 | </div> | |
99 | <div class="buttons"> |
|
99 | <div class="buttons"> | |
100 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> |
|
100 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> | |
101 | <div class="register"> |
|
101 | <div class="register"> | |
102 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
102 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): | |
103 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
103 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} | |
104 | %endif |
|
104 | %endif | |
105 | </div> |
|
105 | </div> | |
106 | <div class="submit"> |
|
106 | <div class="submit"> | |
107 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} |
|
107 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} | |
108 | </div> |
|
108 | </div> | |
109 | </div> |
|
109 | </div> | |
110 | </div> |
|
110 | </div> | |
111 | </div> |
|
111 | </div> | |
112 | ${h.end_form()} |
|
112 | ${h.end_form()} | |
113 | %else: |
|
113 | %else: | |
114 | <div class="links_left"> |
|
114 | <div class="links_left"> | |
115 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> |
|
115 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> | |
116 | <div class="email">${c.rhodecode_user.email}</div> |
|
116 | <div class="email">${c.rhodecode_user.email}</div> | |
117 | <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div> |
|
117 | <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div> | |
118 | <div class="inbox"><a href="${h.url('notifications')}">${_('Inbox')}: ${c.unread_notifications}</a></div> |
|
118 | <div class="inbox"><a href="${h.url('notifications')}">${_('Inbox')}: ${c.unread_notifications}</a></div> | |
119 | </div> |
|
119 | </div> | |
120 | <div class="links_right"> |
|
120 | <div class="links_right"> | |
121 | <ol class="links"> |
|
121 | <ol class="links"> | |
122 | <li>${h.link_to(_(u'Home'),h.url('home'))}</li> |
|
122 | <li>${h.link_to(_(u'Home'),h.url('home'))}</li> | |
123 | <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li> |
|
123 | <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li> | |
124 | <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li> |
|
124 | <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li> | |
125 | <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> |
|
125 | <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> | |
126 | </ol> |
|
126 | </ol> | |
127 | </div> |
|
127 | </div> | |
128 | %endif |
|
128 | %endif | |
129 | </div> |
|
129 | </div> | |
130 | </div> |
|
130 | </div> | |
131 | </%def> |
|
131 | </%def> | |
132 |
|
132 | |||
133 | <%def name="menu(current=None)"> |
|
133 | <%def name="menu(current=None)"> | |
134 | <% |
|
134 | <% | |
135 |
|
|
135 | def is_current(selected): | |
136 |
|
|
136 | if selected == current: | |
137 |
|
|
137 | return h.literal('class="current"') | |
138 | %> |
|
138 | %> | |
139 |
|
|
139 | %if current not in ['home','admin']: | |
140 |
|
|
140 | ##REGULAR MENU | |
141 |
|
|
141 | <ul id="quick"> | |
142 |
|
|
142 | <!-- repo switcher --> | |
143 | <li> |
|
143 | <li> | |
144 |
|
|
144 | <a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#"> | |
145 | <span class="icon"> |
|
145 | <span class="icon"> | |
146 | <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> |
|
146 | <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> | |
147 | </span> |
|
147 | </span> | |
148 | <span>↓</span> |
|
148 | <span>↓</span> | |
149 | </a> |
|
149 | </a> | |
150 |
|
|
150 | <ul id="repo_switcher_list" class="repo_switcher"> | |
151 | <li> |
|
151 | <li> | |
152 | <a href="#">${_('loading...')}</a> |
|
152 | <a href="#">${_('loading...')}</a> | |
153 | </li> |
|
153 | </li> | |
154 | </ul> |
|
154 | </ul> | |
155 | </li> |
|
155 | </li> | |
156 |
|
156 | |||
157 |
|
|
157 | <li ${is_current('summary')}> | |
158 |
|
|
158 | <a class="menu_link" title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> | |
159 |
|
|
159 | <span class="icon"> | |
160 |
|
|
160 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> | |
161 |
|
|
161 | </span> | |
162 |
|
|
162 | <span>${_('Summary')}</span> | |
163 |
|
|
163 | </a> | |
164 |
|
|
164 | </li> | |
165 | <li ${is_current('changelog')}> |
|
165 | <li ${is_current('changelog')}> | |
166 | <a class="menu_link" title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> |
|
166 | <a class="menu_link" title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> | |
167 | <span class="icon"> |
|
167 | <span class="icon"> | |
168 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> |
|
168 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> | |
169 | </span> |
|
169 | </span> | |
170 | <span>${_('Changelog')}</span> |
|
170 | <span>${_('Changelog')}</span> | |
171 | </a> |
|
171 | </a> | |
172 | </li> |
|
172 | </li> | |
173 |
|
173 | |||
174 | <li ${is_current('switch_to')}> |
|
174 | <li ${is_current('switch_to')}> | |
175 | <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#"> |
|
175 | <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#"> | |
176 | <span class="icon"> |
|
176 | <span class="icon"> | |
177 | <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> |
|
177 | <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> | |
178 | </span> |
|
178 | </span> | |
179 | <span>${_('Switch to')}</span> |
|
179 | <span>${_('Switch to')}</span> | |
180 | </a> |
|
180 | </a> | |
181 | <ul id="switch_to_list" class="switch_to"> |
|
181 | <ul id="switch_to_list" class="switch_to"> | |
182 | <li><a href="#">${_('loading...')}</a></li> |
|
182 | <li><a href="#">${_('loading...')}</a></li> | |
183 | </ul> |
|
183 | </ul> | |
184 | </li> |
|
184 | </li> | |
185 | <li ${is_current('files')}> |
|
185 | <li ${is_current('files')}> | |
186 | <a class="menu_link" title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> |
|
186 | <a class="menu_link" title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> | |
187 | <span class="icon"> |
|
187 | <span class="icon"> | |
188 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> |
|
188 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> | |
189 | </span> |
|
189 | </span> | |
190 | <span>${_('Files')}</span> |
|
190 | <span>${_('Files')}</span> | |
191 | </a> |
|
191 | </a> | |
192 | </li> |
|
192 | </li> | |
193 |
|
193 | |||
194 | <li ${is_current('options')}> |
|
194 | <li ${is_current('options')}> | |
195 | <a class="menu_link" title="${_('Options')}" href="#"> |
|
195 | <a class="menu_link" title="${_('Options')}" href="#"> | |
196 | <span class="icon"> |
|
196 | <span class="icon"> | |
197 | <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> |
|
197 | <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> | |
198 | </span> |
|
198 | </span> | |
199 | <span>${_('Options')}</span> |
|
199 | <span>${_('Options')}</span> | |
200 | </a> |
|
200 | </a> | |
201 | <ul> |
|
201 | <ul> | |
202 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
202 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): | |
203 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): |
|
203 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): | |
204 | <li>${h.link_to(_('repository settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> |
|
204 | <li>${h.link_to(_('repository settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> | |
205 | %else: |
|
205 | %else: | |
206 | <li>${h.link_to(_('repository settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> |
|
206 | <li>${h.link_to(_('repository settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> | |
207 | %endif |
|
207 | %endif | |
208 | %endif |
|
208 | %endif | |
209 |
|
209 | |||
210 |
|
|
210 | <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> | |
211 | %if h.is_hg(c.rhodecode_repo): |
|
211 | %if h.is_hg(c.rhodecode_repo): | |
212 | <li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li> |
|
212 | <li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li> | |
213 | %endif |
|
213 | %endif | |
214 | %if c.rhodecode_db_repo.fork: |
|
214 | %if c.rhodecode_db_repo.fork: | |
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> |
|
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 | %endif |
|
216 | %endif | |
217 |
|
|
217 | <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> | |
218 |
|
218 | |||
219 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking: |
|
219 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking: | |
220 | %if c.rhodecode_db_repo.locked[0]: |
|
220 | %if c.rhodecode_db_repo.locked[0]: | |
221 | <li>${h.link_to(_('unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li> |
|
221 | <li>${h.link_to(_('unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li> | |
222 | %else: |
|
222 | %else: | |
223 | <li>${h.link_to(_('lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li> |
|
223 | <li>${h.link_to(_('lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li> | |
224 | %endif |
|
224 | %endif | |
225 | %endif |
|
225 | %endif | |
226 |
|
226 | |||
227 | % if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
227 | % if h.HasPermissionAll('hg.admin')('access admin main page'): | |
228 | <li> |
|
228 | <li> | |
229 | ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} |
|
229 | ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} | |
230 | <%def name="admin_menu()"> |
|
230 | <%def name="admin_menu()"> | |
231 | <ul> |
|
231 | <ul> | |
232 | <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> |
|
232 | <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> | |
233 | <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> |
|
233 | <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> | |
234 | <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
234 | <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li> | |
235 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> |
|
235 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> | |
236 | <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> |
|
236 | <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> | |
237 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> |
|
237 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> | |
238 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> |
|
238 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> | |
239 | <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li> |
|
239 | <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li> | |
240 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> |
|
240 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> | |
241 | </ul> |
|
241 | </ul> | |
242 | </%def> |
|
242 | </%def> | |
243 | ## ADMIN MENU |
|
243 | ## ADMIN MENU | |
244 | ${admin_menu()} |
|
244 | ${admin_menu()} | |
245 | </li> |
|
245 | </li> | |
246 | % endif |
|
246 | % endif | |
247 | </ul> |
|
247 | </ul> | |
248 | </li> |
|
248 | </li> | |
249 |
|
249 | |||
250 | <li> |
|
250 | <li> | |
251 | <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> |
|
251 | <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> | |
252 | <span class="icon_short"> |
|
252 | <span class="icon_short"> | |
253 | <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> |
|
253 | <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> | |
254 | </span> |
|
254 | </span> | |
255 | <span id="current_followers_count" class="short">${c.repository_followers}</span> |
|
255 | <span id="current_followers_count" class="short">${c.repository_followers}</span> | |
256 | </a> |
|
256 | </a> | |
257 | </li> |
|
257 | </li> | |
258 | <li> |
|
258 | <li> | |
259 | <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> |
|
259 | <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> | |
260 | <span class="icon_short"> |
|
260 | <span class="icon_short"> | |
261 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> |
|
261 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> | |
262 | </span> |
|
262 | </span> | |
263 | <span class="short">${c.repository_forks}</span> |
|
263 | <span class="short">${c.repository_forks}</span> | |
264 | </a> |
|
264 | </a> | |
265 | </li> |
|
265 | </li> | |
266 | <li> |
|
266 | <li> | |
267 | <a class="menu_link" title="${_('Pull requests')}" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}"> |
|
267 | <a class="menu_link" title="${_('Pull requests')}" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}"> | |
268 | <span class="icon_short"> |
|
268 | <span class="icon_short"> | |
269 | <img src="${h.url('/images/icons/arrow_join.png')}" alt="${_('Pull requests')}" /> |
|
269 | <img src="${h.url('/images/icons/arrow_join.png')}" alt="${_('Pull requests')}" /> | |
270 | </span> |
|
270 | </span> | |
271 | <span class="short">${c.repository_pull_requests}</span> |
|
271 | <span class="short">${c.repository_pull_requests}</span> | |
272 | </a> |
|
272 | </a> | |
273 | </li> |
|
273 | </li> | |
274 | ${usermenu()} |
|
274 | ${usermenu()} | |
275 |
|
|
275 | </ul> | |
276 | <script type="text/javascript"> |
|
276 | <script type="text/javascript"> | |
277 | YUE.on('repo_switcher','mouseover',function(){ |
|
277 | YUE.on('repo_switcher','mouseover',function(){ | |
278 | function qfilter(){ |
|
278 | function qfilter(){ | |
279 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); |
|
279 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); | |
280 | var target = 'q_filter_rs'; |
|
280 | var target = 'q_filter_rs'; | |
281 | var func = function(node){ |
|
281 | var func = function(node){ | |
282 | return node.parentNode; |
|
282 | return node.parentNode; | |
283 | } |
|
283 | } | |
284 | q_filter(target,nodes,func); |
|
284 | q_filter(target,nodes,func); | |
285 | } |
|
285 | } | |
286 | var loaded = YUD.hasClass('repo_switcher','loaded'); |
|
286 | var loaded = YUD.hasClass('repo_switcher','loaded'); | |
287 | if(!loaded){ |
|
287 | if(!loaded){ | |
288 | YUD.addClass('repo_switcher','loaded'); |
|
288 | YUD.addClass('repo_switcher','loaded'); | |
289 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', |
|
289 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', | |
290 | function(o){qfilter();}, |
|
290 | function(o){qfilter();}, | |
291 | function(o){YUD.removeClass('repo_switcher','loaded');} |
|
291 | function(o){YUD.removeClass('repo_switcher','loaded');} | |
292 | ,null); |
|
292 | ,null); | |
293 | } |
|
293 | } | |
294 | return false; |
|
294 | return false; | |
295 | }); |
|
295 | }); | |
296 |
|
296 | |||
297 | YUE.on('branch_tag_switcher','mouseover',function(){ |
|
297 | YUE.on('branch_tag_switcher','mouseover',function(){ | |
298 | var loaded = YUD.hasClass('branch_tag_switcher','loaded'); |
|
298 | var loaded = YUD.hasClass('branch_tag_switcher','loaded'); | |
299 | if(!loaded){ |
|
299 | if(!loaded){ | |
300 | YUD.addClass('branch_tag_switcher','loaded'); |
|
300 | YUD.addClass('branch_tag_switcher','loaded'); | |
301 | ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list', |
|
301 | ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list', | |
302 | function(o){}, |
|
302 | function(o){}, | |
303 | function(o){YUD.removeClass('branch_tag_switcher','loaded');} |
|
303 | function(o){YUD.removeClass('branch_tag_switcher','loaded');} | |
304 | ,null); |
|
304 | ,null); | |
305 | } |
|
305 | } | |
306 | return false; |
|
306 | return false; | |
307 | }); |
|
307 | }); | |
308 | </script> |
|
308 | </script> | |
309 | %else: |
|
309 | %else: | |
310 |
|
|
310 | ##ROOT MENU | |
311 | <ul id="quick"> |
|
311 | <ul id="quick"> | |
312 | <li> |
|
312 | <li> | |
313 | <a class="menu_link" title="${_('Home')}" href="${h.url('home')}"> |
|
313 | <a class="menu_link" title="${_('Home')}" href="${h.url('home')}"> | |
314 | <span class="icon"> |
|
314 | <span class="icon"> | |
315 | <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> |
|
315 | <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> | |
316 | </span> |
|
316 | </span> | |
317 | <span>${_('Home')}</span> |
|
317 | <span>${_('Home')}</span> | |
318 | </a> |
|
318 | </a> | |
319 | </li> |
|
319 | </li> | |
320 | %if c.rhodecode_user.username != 'default': |
|
320 | %if c.rhodecode_user.username != 'default': | |
321 | <li> |
|
321 | <li> | |
322 | <a class="menu_link" title="${_('Journal')}" href="${h.url('journal')}"> |
|
322 | <a class="menu_link" title="${_('Journal')}" href="${h.url('journal')}"> | |
323 | <span class="icon"> |
|
323 | <span class="icon"> | |
324 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> |
|
324 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> | |
325 | </span> |
|
325 | </span> | |
326 | <span>${_('Journal')}</span> |
|
326 | <span>${_('Journal')}</span> | |
327 | </a> |
|
327 | </a> | |
328 | </li> |
|
328 | </li> | |
329 | %else: |
|
329 | %else: | |
330 | <li> |
|
330 | <li> | |
331 | <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}"> |
|
331 | <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}"> | |
332 | <span class="icon"> |
|
332 | <span class="icon"> | |
333 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" /> |
|
333 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" /> | |
334 | </span> |
|
334 | </span> | |
335 | <span>${_('Public journal')}</span> |
|
335 | <span>${_('Public journal')}</span> | |
336 | </a> |
|
336 | </a> | |
337 | </li> |
|
337 | </li> | |
338 | %endif |
|
338 | %endif | |
339 | <li> |
|
339 | <li> | |
340 | <a class="menu_link" title="${_('Search')}" href="${h.url('search')}"> |
|
340 | <a class="menu_link" title="${_('Search')}" href="${h.url('search')}"> | |
341 | <span class="icon"> |
|
341 | <span class="icon"> | |
342 | <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> |
|
342 | <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> | |
343 | </span> |
|
343 | </span> | |
344 | <span>${_('Search')}</span> |
|
344 | <span>${_('Search')}</span> | |
345 | </a> |
|
345 | </a> | |
346 | </li> |
|
346 | </li> | |
347 |
|
347 | |||
348 |
|
|
348 | %if h.HasPermissionAll('hg.admin')('access admin main page'): | |
349 | <li ${is_current('admin')}> |
|
349 | <li ${is_current('admin')}> | |
350 | <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}"> |
|
350 | <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}"> | |
351 | <span class="icon"> |
|
351 | <span class="icon"> | |
352 | <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> |
|
352 | <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> | |
353 | </span> |
|
353 | </span> | |
354 | <span>${_('Admin')}</span> |
|
354 | <span>${_('Admin')}</span> | |
355 | </a> |
|
355 | </a> | |
356 | ${admin_menu()} |
|
356 | ${admin_menu()} | |
357 | </li> |
|
357 | </li> | |
358 | %endif |
|
358 | %endif | |
359 | ${usermenu()} |
|
359 | ${usermenu()} | |
360 | </ul> |
|
360 | </ul> | |
361 | %endif |
|
361 | %endif | |
362 | </%def> |
|
362 | </%def> |
@@ -1,123 +1,123 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <!DOCTYPE html> |
|
2 | <!DOCTYPE html> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
4 | <head> |
|
4 | <head> | |
5 | <title>${self.title()}</title> |
|
5 | <title>${self.title()}</title> | |
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
7 | <meta name="robots" content="index, nofollow"/> |
|
7 | <meta name="robots" content="index, nofollow"/> | |
8 | <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" /> |
|
8 | <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" /> | |
9 |
|
9 | |||
10 | ## CSS ### |
|
10 | ## CSS ### | |
11 | <%def name="css()"> |
|
11 | <%def name="css()"> | |
12 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/> |
|
12 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/> | |
13 | <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/> |
|
13 | <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/> | |
14 | ## EXTRA FOR CSS |
|
14 | ## EXTRA FOR CSS | |
15 | ${self.css_extra()} |
|
15 | ${self.css_extra()} | |
16 | </%def> |
|
16 | </%def> | |
17 | <%def name="css_extra()"> |
|
17 | <%def name="css_extra()"> | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | ${self.css()} |
|
20 | ${self.css()} | |
21 |
|
21 | |||
22 | %if c.ga_code: |
|
22 | %if c.ga_code: | |
23 | <!-- Analytics --> |
|
23 | <!-- Analytics --> | |
24 |
|
|
24 | <script type="text/javascript"> | |
25 |
|
|
25 | var _gaq = _gaq || []; | |
26 |
|
|
26 | _gaq.push(['_setAccount', '${c.ga_code}']); | |
27 |
|
|
27 | _gaq.push(['_trackPageview']); | |
28 |
|
28 | |||
29 |
|
|
29 | (function() { | |
30 |
|
|
30 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
31 |
|
|
31 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
32 |
|
|
32 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
33 |
|
|
33 | })(); | |
34 |
|
|
34 | </script> | |
35 |
|
|
35 | %endif | |
36 |
|
36 | |||
37 | ## JAVASCRIPT ## |
|
37 | ## JAVASCRIPT ## | |
38 | <%def name="js()"> |
|
38 | <%def name="js()"> | |
39 | <script type="text/javascript"> |
|
39 | <script type="text/javascript"> | |
40 | //JS translations map |
|
40 | //JS translations map | |
41 | var TRANSLATION_MAP = { |
|
41 | var TRANSLATION_MAP = { | |
42 | 'add another comment':'${_("add another comment")}', |
|
42 | 'add another comment':'${_("add another comment")}', | |
43 | 'Stop following this repository':"${_('Stop following this repository')}", |
|
43 | 'Stop following this repository':"${_('Stop following this repository')}", | |
44 | 'Start following this repository':"${_('Start following this repository')}", |
|
44 | 'Start following this repository':"${_('Start following this repository')}", | |
45 | 'Group':"${_('Group')}", |
|
45 | 'Group':"${_('Group')}", | |
46 | 'members':"${_('members')}", |
|
46 | 'members':"${_('members')}", | |
47 | 'loading...':"${_('loading...')}", |
|
47 | 'loading...':"${_('loading...')}", | |
48 | 'search truncated': "${_('search truncated')}", |
|
48 | 'search truncated': "${_('search truncated')}", | |
49 | 'no matching files': "${_('no matching files')}", |
|
49 | 'no matching files': "${_('no matching files')}", | |
50 | 'Open new pull request': "${_('Open new pull request')}", |
|
50 | 'Open new pull request': "${_('Open new pull request')}", | |
51 | 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}", |
|
51 | 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}", | |
52 | 'Show selected changes __S -> __E': "${_('Show selected changes __S -> __E')}", |
|
52 | 'Show selected changes __S -> __E': "${_('Show selected changes __S -> __E')}", | |
53 | 'Selection link': "${_('Selection link')}", |
|
53 | 'Selection link': "${_('Selection link')}", | |
54 | }; |
|
54 | }; | |
55 | var _TM = TRANSLATION_MAP; |
|
55 | var _TM = TRANSLATION_MAP; | |
56 | var TOGGLE_FOLLOW_URL = "${h.url('toggle_following')}"; |
|
56 | var TOGGLE_FOLLOW_URL = "${h.url('toggle_following')}"; | |
57 | var LAZY_CS_URL = "${h.url('changeset_info', repo_name='__NAME__', revision='__REV__')}" |
|
57 | var LAZY_CS_URL = "${h.url('changeset_info', repo_name='__NAME__', revision='__REV__')}" | |
58 | </script> |
|
58 | </script> | |
59 | <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script> |
|
59 | <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script> | |
60 | <!--[if lt IE 9]> |
|
60 | <!--[if lt IE 9]> | |
61 | <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script> |
|
61 | <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script> | |
62 | <![endif]--> |
|
62 | <![endif]--> | |
63 | <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script> |
|
63 | <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script> | |
64 | <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script> |
|
64 | <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script> | |
65 | <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script> |
|
65 | <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script> | |
66 | ## EXTRA FOR JS |
|
66 | ## EXTRA FOR JS | |
67 | ${self.js_extra()} |
|
67 | ${self.js_extra()} | |
68 | <script type="text/javascript"> |
|
68 | <script type="text/javascript"> | |
69 | (function(window,undefined){ |
|
69 | (function(window,undefined){ | |
70 | // Prepare |
|
70 | // Prepare | |
71 | var History = window.History; // Note: We are using a capital H instead of a lower h |
|
71 | var History = window.History; // Note: We are using a capital H instead of a lower h | |
72 | if ( !History.enabled ) { |
|
72 | if ( !History.enabled ) { | |
73 | // History.js is disabled for this browser. |
|
73 | // History.js is disabled for this browser. | |
74 | // This is because we can optionally choose to support HTML4 browsers or not. |
|
74 | // This is because we can optionally choose to support HTML4 browsers or not. | |
75 | return false; |
|
75 | return false; | |
76 | } |
|
76 | } | |
77 | })(window); |
|
77 | })(window); | |
78 |
|
78 | |||
79 | YUE.onDOMReady(function(){ |
|
79 | YUE.onDOMReady(function(){ | |
80 | tooltip_activate(); |
|
80 | tooltip_activate(); | |
81 | show_more_event(); |
|
81 | show_more_event(); | |
82 | show_changeset_tooltip(); |
|
82 | show_changeset_tooltip(); | |
83 |
|
83 | |||
84 | YUE.on('quick_login_link','click',function(e){ |
|
84 | YUE.on('quick_login_link','click',function(e){ | |
85 | // make sure we don't redirect |
|
85 | // make sure we don't redirect | |
86 | YUE.preventDefault(e); |
|
86 | YUE.preventDefault(e); | |
87 |
|
87 | |||
88 | if(YUD.hasClass('quick_login_link','enabled')){ |
|
88 | if(YUD.hasClass('quick_login_link','enabled')){ | |
89 | YUD.setStyle('quick_login','display','none'); |
|
89 | YUD.setStyle('quick_login','display','none'); | |
90 | YUD.removeClass('quick_login_link','enabled'); |
|
90 | YUD.removeClass('quick_login_link','enabled'); | |
91 | } |
|
91 | } | |
92 | else{ |
|
92 | else{ | |
93 | YUD.setStyle('quick_login','display',''); |
|
93 | YUD.setStyle('quick_login','display',''); | |
94 | YUD.addClass('quick_login_link','enabled'); |
|
94 | YUD.addClass('quick_login_link','enabled'); | |
95 | var usr = YUD.get('username'); |
|
95 | var usr = YUD.get('username'); | |
96 | if(usr){ |
|
96 | if(usr){ | |
97 |
|
|
97 | usr.focus(); | |
98 | } |
|
98 | } | |
99 | } |
|
99 | } | |
100 | }); |
|
100 | }); | |
101 | }) |
|
101 | }) | |
102 | </script> |
|
102 | </script> | |
103 | </%def> |
|
103 | </%def> | |
104 | <%def name="js_extra()"></%def> |
|
104 | <%def name="js_extra()"></%def> | |
105 | ${self.js()} |
|
105 | ${self.js()} | |
106 | <%def name="head_extra()"></%def> |
|
106 | <%def name="head_extra()"></%def> | |
107 | ${self.head_extra()} |
|
107 | ${self.head_extra()} | |
108 | </head> |
|
108 | </head> | |
109 | <body id="body"> |
|
109 | <body id="body"> | |
110 | ## IE hacks |
|
110 | ## IE hacks | |
111 | <!--[if IE 7]> |
|
111 | <!--[if IE 7]> | |
112 | <script>YUD.addClass(document.body,'ie7')</script> |
|
112 | <script>YUD.addClass(document.body,'ie7')</script> | |
113 | <![endif]--> |
|
113 | <![endif]--> | |
114 | <!--[if IE 8]> |
|
114 | <!--[if IE 8]> | |
115 | <script>YUD.addClass(document.body,'ie8')</script> |
|
115 | <script>YUD.addClass(document.body,'ie8')</script> | |
116 | <![endif]--> |
|
116 | <![endif]--> | |
117 | <!--[if IE 9]> |
|
117 | <!--[if IE 9]> | |
118 | <script>YUD.addClass(document.body,'ie9')</script> |
|
118 | <script>YUD.addClass(document.body,'ie9')</script> | |
119 | <![endif]--> |
|
119 | <![endif]--> | |
120 |
|
120 | |||
121 | ${next.body()} |
|
121 | ${next.body()} | |
122 | </body> |
|
122 | </body> | |
123 | </html> |
|
123 | </html> |
@@ -1,33 +1,33 b'' | |||||
1 | %if c.repo_bookmarks: |
|
1 | %if c.repo_bookmarks: | |
2 | <div id="table_wrap" class="yui-skin-sam"> |
|
2 | <div id="table_wrap" class="yui-skin-sam"> | |
3 | <table id="bookmarks_data"> |
|
3 | <table id="bookmarks_data"> | |
4 | <thead> |
|
4 | <thead> | |
5 |
|
|
5 | <tr> | |
6 | <th class="left">${_('Name')}</th> |
|
6 | <th class="left">${_('Name')}</th> | |
7 | <th class="left">${_('Date')}</th> |
|
7 | <th class="left">${_('Date')}</th> | |
8 | <th class="left">${_('Author')}</th> |
|
8 | <th class="left">${_('Author')}</th> | |
9 | <th class="left">${_('Revision')}</th> |
|
9 | <th class="left">${_('Revision')}</th> | |
10 |
|
|
10 | </tr> | |
11 | </thead> |
|
11 | </thead> | |
12 |
|
|
12 | %for cnt,book in enumerate(c.repo_bookmarks.items()): | |
13 |
|
|
13 | <tr class="parity${cnt%2}"> | |
14 | <td> |
|
14 | <td> | |
15 | <span class="logbooks"> |
|
15 | <span class="logbooks"> | |
16 | <span class="bookbook">${h.link_to(book[0], |
|
16 | <span class="bookbook">${h.link_to(book[0], | |
17 | h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span> |
|
17 | h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span> | |
18 | </span> |
|
18 | </span> | |
19 | </td> |
|
19 | </td> | |
20 | <td><span class="tooltip" title="${h.tooltip(h.age(book[1].date))}">${h.fmt_date(book[1].date)}</span></td> |
|
20 | <td><span class="tooltip" title="${h.tooltip(h.age(book[1].date))}">${h.fmt_date(book[1].date)}</span></td> | |
21 |
|
|
21 | <td title="${book[1].author}">${h.person(book[1].author)}</td> | |
22 |
|
|
22 | <td> | |
23 | <div> |
|
23 | <div> | |
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> |
|
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 | </div> |
|
25 | </div> | |
26 | </td> |
|
26 | </td> | |
27 | </tr> |
|
27 | </tr> | |
28 | %endfor |
|
28 | %endfor | |
29 | </table> |
|
29 | </table> | |
30 | </div> |
|
30 | </div> | |
31 | %else: |
|
31 | %else: | |
32 |
|
|
32 | ${_('There are no bookmarks yet')} | |
33 | %endif |
|
33 | %endif |
@@ -1,93 +1,93 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Branches') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Branches') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
9 | <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" value="${_('quick filter...')}"/> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | ${h.link_to(_(u'Home'),h.url('/'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
13 | » |
|
13 | » | |
14 | ${_('branches')} |
|
14 | ${_('branches')} | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="page_nav()"> |
|
17 | <%def name="page_nav()"> | |
18 | ${self.menu('branches')} |
|
18 | ${self.menu('branches')} | |
19 | </%def> |
|
19 | </%def> | |
20 |
|
20 | |||
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <div class="box"> |
|
22 | <div class="box"> | |
23 | <!-- box / title --> |
|
23 | <!-- box / title --> | |
24 | <div class="title"> |
|
24 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
25 | ${self.breadcrumbs()} | |
26 | </div> |
|
26 | </div> | |
27 | <!-- end box / title --> |
|
27 | <!-- end box / title --> | |
28 | %if c.repo_branches: |
|
28 | %if c.repo_branches: | |
29 | <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;vertical-align: right;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div> |
|
29 | <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;vertical-align: right;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div> | |
30 | %endif |
|
30 | %endif | |
31 | <div class="table"> |
|
31 | <div class="table"> | |
32 | <%include file='branches_data.html'/> |
|
32 | <%include file='branches_data.html'/> | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | <script type="text/javascript"> |
|
35 | <script type="text/javascript"> | |
36 | YUE.on('compare_branches','click',function(e){ |
|
36 | YUE.on('compare_branches','click',function(e){ | |
37 |
|
|
37 | YUE.preventDefault(e); | |
38 |
|
|
38 | var org = YUQ('input[name=compare_org]:checked')[0]; | |
39 |
|
|
39 | var other = YUQ('input[name=compare_other]:checked')[0]; | |
40 |
|
40 | |||
41 |
|
|
41 | if(org && other){ | |
42 |
|
|
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 |
|
|
43 | var u = compare_url.replace('__ORG__',org.value) | |
44 |
|
|
44 | .replace('__OTHER__',other.value); | |
45 |
|
|
45 | window.location=u; | |
46 | } |
|
46 | } | |
47 | }); |
|
47 | }); | |
48 | // main table sorting |
|
48 | // main table sorting | |
49 | var myColumnDefs = [ |
|
49 | var myColumnDefs = [ | |
50 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
50 | {key:"name",label:"${_('Name')}",sortable:true}, | |
51 | {key:"date",label:"${_('Date')}",sortable:true, |
|
51 | {key:"date",label:"${_('Date')}",sortable:true, | |
52 | sortOptions: { sortFunction: dateSort }}, |
|
52 | sortOptions: { sortFunction: dateSort }}, | |
53 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
53 | {key:"author",label:"${_('Author')}",sortable:true}, | |
54 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
54 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
55 | sortOptions: { sortFunction: revisionSort }}, |
|
55 | sortOptions: { sortFunction: revisionSort }}, | |
56 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
56 | {key:"compare",label:"${_('Compare')}",sortable:false,}, | |
57 | ]; |
|
57 | ]; | |
58 |
|
58 | |||
59 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); |
|
59 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); | |
60 |
|
60 | |||
61 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
61 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
62 |
|
62 | |||
63 | myDataSource.responseSchema = { |
|
63 | myDataSource.responseSchema = { | |
64 | fields: [ |
|
64 | fields: [ | |
65 | {key:"name"}, |
|
65 | {key:"name"}, | |
66 | {key:"date"}, |
|
66 | {key:"date"}, | |
67 | {key:"author"}, |
|
67 | {key:"author"}, | |
68 | {key:"revision"}, |
|
68 | {key:"revision"}, | |
69 | {key:"compare"}, |
|
69 | {key:"compare"}, | |
70 | ] |
|
70 | ] | |
71 | }; |
|
71 | }; | |
72 |
|
72 | |||
73 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
73 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
74 | { |
|
74 | { | |
75 | sortedBy:{key:"name",dir:"asc"}, |
|
75 | sortedBy:{key:"name",dir:"asc"}, | |
76 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
76 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
77 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
77 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
78 | MSG_EMPTY:"${_('No records found.')}", |
|
78 | MSG_EMPTY:"${_('No records found.')}", | |
79 | MSG_ERROR:"${_('Data error.')}", |
|
79 | MSG_ERROR:"${_('Data error.')}", | |
80 | MSG_LOADING:"${_('Loading...')}", |
|
80 | MSG_LOADING:"${_('Loading...')}", | |
81 | } |
|
81 | } | |
82 | ); |
|
82 | ); | |
83 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
83 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
84 | tooltip_activate(); |
|
84 | tooltip_activate(); | |
85 | var func = function(node){ |
|
85 | var func = function(node){ | |
86 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
86 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
87 | } |
|
87 | } | |
88 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); |
|
88 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); | |
89 | }); |
|
89 | }); | |
90 |
|
90 | |||
91 | </script> |
|
91 | </script> | |
92 |
|
92 | |||
93 | </%def> |
|
93 | </%def> |
@@ -1,58 +1,58 b'' | |||||
1 | %if c.repo_branches: |
|
1 | %if c.repo_branches: | |
2 | <div id="table_wrap" class="yui-skin-sam"> |
|
2 | <div id="table_wrap" class="yui-skin-sam"> | |
3 | <table id="branches_data"> |
|
3 | <table id="branches_data"> | |
4 | <thead> |
|
4 | <thead> | |
5 | <tr> |
|
5 | <tr> | |
6 | <th class="left">${_('Name')}</th> |
|
6 | <th class="left">${_('Name')}</th> | |
7 | <th class="left">${_('Date')}</th> |
|
7 | <th class="left">${_('Date')}</th> | |
8 | <th class="left">${_('Author')}</th> |
|
8 | <th class="left">${_('Author')}</th> | |
9 | <th class="left">${_('Revision')}</th> |
|
9 | <th class="left">${_('Revision')}</th> | |
10 | <th class="left">${_('Compare')}</th> |
|
10 | <th class="left">${_('Compare')}</th> | |
11 | </tr> |
|
11 | </tr> | |
12 | </thead> |
|
12 | </thead> | |
13 |
|
|
13 | %for cnt,branch in enumerate(c.repo_branches.items()): | |
14 |
|
|
14 | <tr class="parity${cnt%2}"> | |
15 | <td> |
|
15 | <td> | |
16 | <span class="logtags"> |
|
16 | <span class="logtags"> | |
17 | <span class="branchtag">${h.link_to(branch[0], |
|
17 | <span class="branchtag">${h.link_to(branch[0], | |
18 | h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> |
|
18 | h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> | |
19 | </span> |
|
19 | </span> | |
20 | </td> |
|
20 | </td> | |
21 | <td><span class="tooltip" title="${h.tooltip(h.age(branch[1].date))}">${h.fmt_date(branch[1].date)}</span></td> |
|
21 | <td><span class="tooltip" title="${h.tooltip(h.age(branch[1].date))}">${h.fmt_date(branch[1].date)}</span></td> | |
22 | <td title="${branch[1].author}">${h.person(branch[1].author)}</td> |
|
22 | <td title="${branch[1].author}">${h.person(branch[1].author)}</td> | |
23 | <td> |
|
23 | <td> | |
24 | <div> |
|
24 | <div> | |
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> |
|
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 | </div> |
|
26 | </div> | |
27 | </td> |
|
27 | </td> | |
28 | <td> |
|
28 | <td> | |
29 | <input class="branch-compare" type="radio" name="compare_org" value="${branch[0]}"/> |
|
29 | <input class="branch-compare" type="radio" name="compare_org" value="${branch[0]}"/> | |
30 | <input class="branch-compare" type="radio" name="compare_other" value="${branch[0]}"/> |
|
30 | <input class="branch-compare" type="radio" name="compare_other" value="${branch[0]}"/> | |
31 | </td> |
|
31 | </td> | |
32 | </tr> |
|
32 | </tr> | |
33 | %endfor |
|
33 | %endfor | |
34 | % if hasattr(c,'repo_closed_branches') and c.repo_closed_branches: |
|
34 | % if hasattr(c,'repo_closed_branches') and c.repo_closed_branches: | |
35 | %for cnt,branch in enumerate(c.repo_closed_branches.items()): |
|
35 | %for cnt,branch in enumerate(c.repo_closed_branches.items()): | |
36 | <tr class="parity${cnt%2}"> |
|
36 | <tr class="parity${cnt%2}"> | |
37 | <td> |
|
37 | <td> | |
38 | <span class="logtags"> |
|
38 | <span class="logtags"> | |
39 | <span class="branchtag">${h.link_to(branch[0]+' [closed]', |
|
39 | <span class="branchtag">${h.link_to(branch[0]+' [closed]', | |
40 | h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> |
|
40 | h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> | |
41 | </span> |
|
41 | </span> | |
42 | </td> |
|
42 | </td> | |
43 | <td><span class="tooltip" title="${h.tooltip(h.age(branch[1].date))}">${h.fmt_date(branch[1].date)}</span></td> |
|
43 | <td><span class="tooltip" title="${h.tooltip(h.age(branch[1].date))}">${h.fmt_date(branch[1].date)}</span></td> | |
44 | <td title="${branch[1].author}">${h.person(branch[1].author)}</td> |
|
44 | <td title="${branch[1].author}">${h.person(branch[1].author)}</td> | |
45 | <td> |
|
45 | <td> | |
46 | <div> |
|
46 | <div> | |
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> |
|
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 | </div> |
|
48 | </div> | |
49 | </td> |
|
49 | </td> | |
50 | <td></td> |
|
50 | <td></td> | |
51 | </tr> |
|
51 | </tr> | |
52 | %endfor |
|
52 | %endfor | |
53 | %endif |
|
53 | %endif | |
54 | </table> |
|
54 | </table> | |
55 | </div> |
|
55 | </div> | |
56 | %else: |
|
56 | %else: | |
57 | ${_('There are no branches yet')} |
|
57 | ${_('There are no branches yet')} | |
58 | %endif |
|
58 | %endif |
@@ -1,306 +1,306 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%inherit file="/base/base.html"/> |
|
3 | <%inherit file="/base/base.html"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('%s Changelog') % c.repo_name} - ${c.rhodecode_name} |
|
6 | ${_('%s Changelog') % c.repo_name} - ${c.rhodecode_name} | |
7 | </%def> |
|
7 | </%def> | |
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | ${h.link_to(_(u'Home'),h.url('/'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
13 | » |
|
13 | » | |
14 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
|
14 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> | |
15 | ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} |
|
15 | ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 |
|
|
19 | ${self.menu('changelog')} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="main()"> |
|
22 | <%def name="main()"> | |
23 | <div class="box"> |
|
23 | <div class="box"> | |
24 | <!-- box / title --> |
|
24 | <!-- box / title --> | |
25 | <div class="title"> |
|
25 | <div class="title"> | |
26 | ${self.breadcrumbs()} |
|
26 | ${self.breadcrumbs()} | |
27 | </div> |
|
27 | </div> | |
28 | <div class="table"> |
|
28 | <div class="table"> | |
29 |
|
|
29 | % if c.pagination: | |
30 |
|
|
30 | <div id="graph"> | |
31 |
|
|
31 | <div id="graph_nodes"> | |
32 |
|
|
32 | <canvas id="graph_canvas"></canvas> | |
33 | </div> |
|
33 | </div> | |
34 |
|
|
34 | <div id="graph_content"> | |
35 | <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;"> |
|
35 | <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;"> | |
36 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> |
|
36 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> | |
37 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> |
|
37 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> | |
38 |
|
38 | |||
39 | %if c.rhodecode_db_repo.fork: |
|
39 | %if c.rhodecode_db_repo.fork: | |
40 | <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.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> |
|
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 | %endif |
|
41 | %endif | |
42 | %if h.is_hg(c.rhodecode_repo): |
|
42 | %if h.is_hg(c.rhodecode_repo): | |
43 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a> |
|
43 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a> | |
44 | %endif |
|
44 | %endif | |
45 | </div> |
|
45 | </div> | |
46 |
|
|
46 | <div class="container_header"> | |
47 |
|
|
47 | ${h.form(h.url.current(),method='get')} | |
48 |
|
|
48 | <div class="info_box" style="float:left"> | |
49 |
|
|
49 | ${h.submit('set',_('Show'),class_="ui-btn")} | |
50 |
|
|
50 | ${h.text('size',size=1,value=c.size)} | |
51 |
|
|
51 | ${_('revisions')} | |
52 | </div> |
|
52 | </div> | |
53 |
|
|
53 | ${h.end_form()} | |
54 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
54 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> | |
55 | </div> |
|
55 | </div> | |
56 |
|
56 | |||
57 |
|
|
57 | %for cnt,cs in enumerate(c.pagination): | |
58 |
|
|
58 | <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> | |
59 | <div class="left"> |
|
59 | <div class="left"> | |
60 | <div> |
|
60 | <div> | |
61 |
|
|
61 | ${h.checkbox(cs.raw_id,class_="changeset_range")} | |
62 |
|
|
62 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="author"> |
|
64 | <div class="author"> | |
65 | <div class="gravatar"> |
|
65 | <div class="gravatar"> | |
66 |
|
|
66 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> | |
67 | </div> |
|
67 | </div> | |
68 |
|
|
68 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="date">${h.fmt_date(cs.date)}</div> |
|
70 | <div class="date">${h.fmt_date(cs.date)}</div> | |
71 | </div> |
|
71 | </div> | |
72 | <div class="mid"> |
|
72 | <div class="mid"> | |
73 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
73 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> | |
74 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> |
|
74 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> | |
75 | </div> |
|
75 | </div> | |
76 | <div class="right"> |
|
76 | <div class="right"> | |
77 | <div class="changes"> |
|
77 | <div class="changes"> | |
78 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> |
|
78 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> | |
79 | <div class="comments-container"> |
|
79 | <div class="comments-container"> | |
80 | %if len(c.comments.get(cs.raw_id,[])) > 0: |
|
80 | %if len(c.comments.get(cs.raw_id,[])) > 0: | |
81 | <div class="comments-cnt" title="${('comments')}"> |
|
81 | <div class="comments-cnt" title="${('comments')}"> | |
82 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
82 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> | |
83 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> |
|
83 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> | |
84 | <img src="${h.url('/images/icons/comments.png')}"> |
|
84 | <img src="${h.url('/images/icons/comments.png')}"> | |
85 | </a> |
|
85 | </a> | |
86 | </div> |
|
86 | </div> | |
87 | %endif |
|
87 | %endif | |
88 | </div> |
|
88 | </div> | |
89 | <div class="changeset-status-container"> |
|
89 | <div class="changeset-status-container"> | |
90 | %if c.statuses.get(cs.raw_id): |
|
90 | %if c.statuses.get(cs.raw_id): | |
91 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> |
|
91 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> | |
92 | <div class="changeset-status-ico"> |
|
92 | <div class="changeset-status-ico"> | |
93 | %if c.statuses.get(cs.raw_id)[2]: |
|
93 | %if c.statuses.get(cs.raw_id)[2]: | |
94 | <a class="tooltip" title="${_('Click to open associated pull request')}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> |
|
94 | <a class="tooltip" title="${_('Click to open associated pull request')}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> | |
95 | %else: |
|
95 | %else: | |
96 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> |
|
96 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> | |
97 | %endif |
|
97 | %endif | |
98 | </div> |
|
98 | </div> | |
99 | %endif |
|
99 | %endif | |
100 | </div> |
|
100 | </div> | |
101 | </div> |
|
101 | </div> | |
102 | %if cs.parents: |
|
102 | %if cs.parents: | |
103 |
|
|
103 | %for p_cs in reversed(cs.parents): | |
104 | <div class="parent">${_('Parent')} |
|
104 | <div class="parent">${_('Parent')} | |
105 |
|
|
105 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), | |
106 |
|
|
106 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> | |
107 | </div> |
|
107 | </div> | |
108 | %endfor |
|
108 | %endfor | |
109 | %else: |
|
109 | %else: | |
110 | <div class="parent">${_('No parents')}</div> |
|
110 | <div class="parent">${_('No parents')}</div> | |
111 | %endif |
|
111 | %endif | |
112 |
|
112 | |||
113 | <span class="logtags"> |
|
113 | <span class="logtags"> | |
114 | %if len(cs.parents)>1: |
|
114 | %if len(cs.parents)>1: | |
115 |
|
|
115 | <span class="merge">${_('merge')}</span> | |
116 | %endif |
|
116 | %endif | |
117 | %if cs.branch: |
|
117 | %if cs.branch: | |
118 |
|
|
118 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | |
119 |
|
|
119 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
120 | </span> |
|
120 | </span> | |
121 | %endif |
|
121 | %endif | |
122 | %if h.is_hg(c.rhodecode_repo): |
|
122 | %if h.is_hg(c.rhodecode_repo): | |
123 | %for book in cs.bookmarks: |
|
123 | %for book in cs.bookmarks: | |
124 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
124 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
125 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
125 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
126 | </span> |
|
126 | </span> | |
127 | %endfor |
|
127 | %endfor | |
128 | %endif |
|
128 | %endif | |
129 | %for tag in cs.tags: |
|
129 | %for tag in cs.tags: | |
130 |
|
|
130 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
131 |
|
|
131 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> | |
132 | %endfor |
|
132 | %endfor | |
133 | </span> |
|
133 | </span> | |
134 | </div> |
|
134 | </div> | |
135 | </div> |
|
135 | </div> | |
136 |
|
136 | |||
137 | %endfor |
|
137 | %endfor | |
138 |
|
|
138 | <div class="pagination-wh pagination-left"> | |
139 |
|
|
139 | ${c.pagination.pager('$link_previous ~2~ $link_next')} | |
140 | </div> |
|
140 | </div> | |
141 | </div> |
|
141 | </div> | |
142 | </div> |
|
142 | </div> | |
143 |
|
143 | |||
144 |
|
|
144 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> | |
145 |
|
|
145 | <script type="text/javascript"> | |
146 |
|
|
146 | YAHOO.util.Event.onDOMReady(function(){ | |
147 |
|
147 | |||
148 | //Monitor range checkboxes and build a link to changesets |
|
148 | //Monitor range checkboxes and build a link to changesets | |
149 | //ranges |
|
149 | //ranges | |
150 | var checkboxes = YUD.getElementsByClassName('changeset_range'); |
|
150 | var checkboxes = YUD.getElementsByClassName('changeset_range'); | |
151 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
|
151 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; | |
152 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; |
|
152 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; | |
153 | YUE.on(checkboxes,'click',function(e){ |
|
153 | YUE.on(checkboxes,'click',function(e){ | |
154 |
|
|
154 | var clicked_cb = e.currentTarget; | |
155 | var checked_checkboxes = []; |
|
155 | var checked_checkboxes = []; | |
156 | for (pos in checkboxes){ |
|
156 | for (pos in checkboxes){ | |
157 | if(checkboxes[pos].checked){ |
|
157 | if(checkboxes[pos].checked){ | |
158 | checked_checkboxes.push(checkboxes[pos]); |
|
158 | checked_checkboxes.push(checkboxes[pos]); | |
159 | } |
|
159 | } | |
160 | } |
|
160 | } | |
161 | if(YUD.get('open_new_pr')){ |
|
161 | if(YUD.get('open_new_pr')){ | |
162 | if(checked_checkboxes.length>0){ |
|
162 | if(checked_checkboxes.length>0){ | |
163 | // modify open pull request to show we have selected cs |
|
163 | // modify open pull request to show we have selected cs | |
164 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; |
|
164 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; | |
165 |
|
165 | |||
166 | }else{ |
|
166 | }else{ | |
167 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; |
|
167 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; | |
168 | } |
|
168 | } | |
169 | } |
|
169 | } | |
170 |
|
170 | |||
171 | if(checked_checkboxes.length>0){ |
|
171 | if(checked_checkboxes.length>0){ | |
172 |
|
|
172 | var rev_end = checked_checkboxes[0].name; | |
173 |
|
|
173 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; | |
174 |
|
174 | |||
175 |
|
|
175 | // now select all checkboxes in the middle. | |
176 |
|
|
176 | var checked = false; | |
177 |
|
|
177 | for (var i=0; i<checkboxes.length; i++){ | |
178 |
|
|
178 | var cb = checkboxes[i]; | |
179 |
|
|
179 | var rev = cb.name; | |
180 |
|
180 | |||
181 |
|
|
181 | if (rev == rev_end){ | |
182 |
|
|
182 | checked = true; | |
183 |
|
|
183 | } | |
184 | if (checked){ |
|
184 | if (checked){ | |
185 | cb.checked = true; |
|
185 | cb.checked = true; | |
186 | } |
|
186 | } | |
187 | else{ |
|
187 | else{ | |
188 | cb.checked = false; |
|
188 | cb.checked = false; | |
189 | } |
|
189 | } | |
190 |
|
|
190 | if (rev == rev_start){ | |
191 | checked = false; |
|
191 | checked = false; | |
192 | } |
|
192 | } | |
193 |
|
193 | |||
194 |
|
|
194 | } | |
195 |
|
195 | |||
196 | var url = url_tmpl.replace('__REVRANGE__', |
|
196 | var url = url_tmpl.replace('__REVRANGE__', | |
197 |
|
|
197 | rev_start+'...'+rev_end); | |
198 |
|
198 | |||
199 | var link = _TM['Show selected changes __S -> __E']; |
|
199 | var link = _TM['Show selected changes __S -> __E']; | |
200 | link = link.replace('__S',rev_start.substr(0,6)); |
|
200 | link = link.replace('__S',rev_start.substr(0,6)); | |
201 | link = link.replace('__E',rev_end.substr(0,6)); |
|
201 | link = link.replace('__E',rev_end.substr(0,6)); | |
202 | YUD.get('rev_range_container').href = url; |
|
202 | YUD.get('rev_range_container').href = url; | |
203 | YUD.get('rev_range_container').innerHTML = link; |
|
203 | YUD.get('rev_range_container').innerHTML = link; | |
204 | YUD.setStyle('rev_range_container','display',''); |
|
204 | YUD.setStyle('rev_range_container','display',''); | |
205 | YUD.setStyle('rev_range_clear','display',''); |
|
205 | YUD.setStyle('rev_range_clear','display',''); | |
206 |
|
206 | |||
207 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); |
|
207 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); | |
208 |
|
208 | |||
209 | } |
|
209 | } | |
210 | else{ |
|
210 | else{ | |
211 |
|
|
211 | YUD.setStyle('rev_range_container','display','none'); | |
212 |
|
|
212 | YUD.setStyle('rev_range_clear','display','none'); | |
213 | } |
|
213 | } | |
214 | }); |
|
214 | }); | |
215 | YUE.on('rev_range_clear','click',function(e){ |
|
215 | YUE.on('rev_range_clear','click',function(e){ | |
216 | for (var i=0; i<checkboxes.length; i++){ |
|
216 | for (var i=0; i<checkboxes.length; i++){ | |
217 | var cb = checkboxes[i]; |
|
217 | var cb = checkboxes[i]; | |
218 | cb.checked = false; |
|
218 | cb.checked = false; | |
219 | } |
|
219 | } | |
220 | YUE.preventDefault(e); |
|
220 | YUE.preventDefault(e); | |
221 | }) |
|
221 | }) | |
222 | var msgs = YUQ('.message'); |
|
222 | var msgs = YUQ('.message'); | |
223 | // get first element height |
|
223 | // get first element height | |
224 | var el = YUQ('#graph_content .container')[0]; |
|
224 | var el = YUQ('#graph_content .container')[0]; | |
225 | var row_h = el.clientHeight; |
|
225 | var row_h = el.clientHeight; | |
226 | for(var i=0;i<msgs.length;i++){ |
|
226 | for(var i=0;i<msgs.length;i++){ | |
227 |
|
|
227 | var m = msgs[i]; | |
228 |
|
228 | |||
229 |
|
|
229 | var h = m.clientHeight; | |
230 |
|
|
230 | var pad = YUD.getStyle(m,'padding'); | |
231 |
|
|
231 | if(h > row_h){ | |
232 |
|
|
232 | var offset = row_h - (h+12); | |
233 |
|
|
233 | YUD.setStyle(m.nextElementSibling,'display','block'); | |
234 |
|
|
234 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); | |
235 |
|
|
235 | }; | |
236 | } |
|
236 | } | |
237 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
237 | YUE.on(YUQ('.expand'),'click',function(e){ | |
238 |
|
|
238 | var elem = e.currentTarget.parentNode.parentNode; | |
239 |
|
|
239 | YUD.setStyle(e.currentTarget,'display','none'); | |
240 |
|
|
240 | YUD.setStyle(elem,'height','auto'); | |
241 |
|
241 | |||
242 |
|
|
242 | //redraw the graph, line_count and jsdata are global vars | |
243 | set_canvas(100); |
|
243 | set_canvas(100); | |
244 |
|
244 | |||
245 | var r = new BranchRenderer(); |
|
245 | var r = new BranchRenderer(); | |
246 | r.render(jsdata,100,line_count); |
|
246 | r.render(jsdata,100,line_count); | |
247 |
|
247 | |||
248 | }) |
|
248 | }) | |
249 |
|
249 | |||
250 | // Fetch changeset details |
|
250 | // Fetch changeset details | |
251 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ |
|
251 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ | |
252 |
|
|
252 | var id = e.currentTarget.id; | |
253 |
|
|
253 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; | |
254 |
|
|
254 | var url = url.replace('__CS__',id.replace('changed_total_','')); | |
255 |
|
|
255 | ypjax(url,id,function(){tooltip_activate()}); | |
256 | }); |
|
256 | }); | |
257 |
|
257 | |||
258 | // change branch filter |
|
258 | // change branch filter | |
259 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
259 | YUE.on(YUD.get('branch_filter'),'change',function(e){ | |
260 |
|
|
260 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; | |
261 |
|
|
261 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; | |
262 |
|
|
262 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; | |
263 |
|
|
263 | var url = url.replace('__BRANCH__',selected_branch); | |
264 |
|
|
264 | if(selected_branch != ''){ | |
265 |
|
|
265 | window.location = url; | |
266 |
|
|
266 | }else{ | |
267 |
|
|
267 | window.location = url_main; | |
268 |
|
|
268 | } | |
269 |
|
269 | |||
270 | }); |
|
270 | }); | |
271 |
|
271 | |||
272 |
|
|
272 | function set_canvas(width) { | |
273 |
|
|
273 | var c = document.getElementById('graph_nodes'); | |
274 |
|
|
274 | var t = document.getElementById('graph_content'); | |
275 |
|
|
275 | canvas = document.getElementById('graph_canvas'); | |
276 |
|
|
276 | var div_h = t.clientHeight; | |
277 |
|
|
277 | c.style.height=div_h+'px'; | |
278 |
|
|
278 | canvas.setAttribute('height',div_h); | |
279 |
|
|
279 | c.style.height=width+'px'; | |
280 |
|
|
280 | canvas.setAttribute('width',width); | |
281 | }; |
|
281 | }; | |
282 | var heads = 1; |
|
282 | var heads = 1; | |
283 |
|
|
283 | var line_count = 0; | |
284 |
|
|
284 | var jsdata = ${c.jsdata|n}; | |
285 |
|
285 | |||
286 |
|
|
286 | for (var i=0;i<jsdata.length;i++) { | |
287 | var in_l = jsdata[i][2]; |
|
287 | var in_l = jsdata[i][2]; | |
288 | for (var j in in_l) { |
|
288 | for (var j in in_l) { | |
289 | var m = in_l[j][1]; |
|
289 | var m = in_l[j][1]; | |
290 | if (m > line_count) |
|
290 | if (m > line_count) | |
291 | line_count = m; |
|
291 | line_count = m; | |
292 | } |
|
292 | } | |
293 | } |
|
293 | } | |
294 | set_canvas(100); |
|
294 | set_canvas(100); | |
295 |
|
295 | |||
296 |
|
|
296 | var r = new BranchRenderer(); | |
297 |
|
|
297 | r.render(jsdata,100,line_count); | |
298 |
|
298 | |||
299 | }); |
|
299 | }); | |
300 | </script> |
|
300 | </script> | |
301 | %else: |
|
301 | %else: | |
302 |
|
|
302 | ${_('There are no changes yet')} | |
303 | %endif |
|
303 | %endif | |
304 | </div> |
|
304 | </div> | |
305 | </div> |
|
305 | </div> | |
306 | </%def> |
|
306 | </%def> |
@@ -1,202 +1,202 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%inherit file="/base/base.html"/> |
|
3 | <%inherit file="/base/base.html"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('%s Changeset') % c.repo_name} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name} |
|
6 | ${_('%s Changeset') % c.repo_name} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name} | |
7 | </%def> |
|
7 | </%def> | |
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | ${h.link_to(_(u'Home'),h.url('/'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
13 | » |
|
13 | » | |
14 | ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> |
|
14 | ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="page_nav()"> |
|
17 | <%def name="page_nav()"> | |
18 | ${self.menu('changelog')} |
|
18 | ${self.menu('changelog')} | |
19 | </%def> |
|
19 | </%def> | |
20 |
|
20 | |||
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <div class="box"> |
|
22 | <div class="box"> | |
23 | <!-- box / title --> |
|
23 | <!-- box / title --> | |
24 | <div class="title"> |
|
24 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
25 | ${self.breadcrumbs()} | |
26 | </div> |
|
26 | </div> | |
27 | <script> |
|
27 | <script> | |
28 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
28 | var _USERS_AC_DATA = ${c.users_array|n}; | |
29 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
29 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
30 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; |
|
30 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; | |
31 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
31 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
32 | </script> |
|
32 | </script> | |
33 | <div class="table"> |
|
33 | <div class="table"> | |
34 |
|
|
34 | <div class="diffblock"> | |
35 | <div class="parents"> |
|
35 | <div class="parents"> | |
36 | %if c.changeset.parents: |
|
36 | %if c.changeset.parents: | |
37 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): |
|
37 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): | |
38 | <span class="changeset_hash">« ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span> |
|
38 | <span class="changeset_hash">« ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span> | |
39 | <br> |
|
39 | <br> | |
40 | %endfor |
|
40 | %endfor | |
41 | %else: |
|
41 | %else: | |
42 | <span>${_('No parents')}</span> |
|
42 | <span>${_('No parents')}</span> | |
43 | %endif |
|
43 | %endif | |
44 | </div> |
|
44 | </div> | |
45 | <div class="children"> |
|
45 | <div class="children"> | |
46 | %if c.changeset.children: |
|
46 | %if c.changeset.children: | |
47 | %for n, p_cs in enumerate(reversed(c.changeset.children)): |
|
47 | %for n, p_cs in enumerate(reversed(c.changeset.children)): | |
48 | <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} »</span> |
|
48 | <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} »</span> | |
49 | <br> |
|
49 | <br> | |
50 | %endfor |
|
50 | %endfor | |
51 | %else: |
|
51 | %else: | |
52 | <span>${_('No children')}</span> |
|
52 | <span>${_('No children')}</span> | |
53 | %endif |
|
53 | %endif | |
54 | </div> |
|
54 | </div> | |
55 |
|
|
55 | <div class="code-header banner"> | |
56 |
|
56 | |||
57 | <div class="hash"> |
|
57 | <div class="hash"> | |
58 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
58 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} | |
59 | </div> |
|
59 | </div> | |
60 | <div class="date"> |
|
60 | <div class="date"> | |
61 | ${h.fmt_date(c.changeset.date)} |
|
61 | ${h.fmt_date(c.changeset.date)} | |
62 | </div> |
|
62 | </div> | |
63 | <div class="changeset-status-container"> |
|
63 | <div class="changeset-status-container"> | |
64 | %if c.statuses: |
|
64 | %if c.statuses: | |
65 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> |
|
65 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> | |
66 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> |
|
66 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> | |
67 | %endif |
|
67 | %endif | |
68 | </div> |
|
68 | </div> | |
69 | <div class="diff-actions"> |
|
69 | <div class="diff-actions"> | |
70 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> |
|
70 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> | |
71 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a> |
|
71 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a> | |
72 | <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a> |
|
72 | <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a> | |
73 | ${c.ignorews_url(request.GET)} |
|
73 | ${c.ignorews_url(request.GET)} | |
74 | ${c.context_url(request.GET)} |
|
74 | ${c.context_url(request.GET)} | |
75 | </div> |
|
75 | </div> | |
76 | <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div> |
|
76 | <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div> | |
77 | </div> |
|
77 | </div> | |
78 | </div> |
|
78 | </div> | |
79 |
|
|
79 | <div id="changeset_content"> | |
80 |
|
|
80 | <div class="container"> | |
81 |
|
|
81 | <div class="left"> | |
82 |
|
|
82 | <div class="author"> | |
83 |
|
|
83 | <div class="gravatar"> | |
84 |
|
|
84 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> | |
85 |
|
|
85 | </div> | |
86 |
|
|
86 | <span>${h.person(c.changeset.author)}</span><br/> | |
87 |
|
|
87 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> | |
88 |
|
|
88 | </div> | |
89 |
|
|
89 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> | |
90 |
|
|
90 | </div> | |
91 |
|
|
91 | <div class="right"> | |
92 |
|
|
92 | <div class="changes"> | |
93 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: |
|
93 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: | |
94 |
|
|
94 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> | |
95 |
|
|
95 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> | |
96 |
|
|
96 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> | |
97 |
|
|
97 | % else: | |
98 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
98 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
99 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
99 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
100 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
100 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
101 |
|
|
101 | % endif | |
102 |
|
|
102 | </div> | |
103 |
|
103 | |||
104 |
|
|
104 | <span class="logtags"> | |
105 | %if len(c.changeset.parents)>1: |
|
105 | %if len(c.changeset.parents)>1: | |
106 | <span class="merge">${_('merge')}</span> |
|
106 | <span class="merge">${_('merge')}</span> | |
107 | %endif |
|
107 | %endif | |
108 |
|
|
108 | %if c.changeset.branch: | |
109 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> |
|
109 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> | |
110 |
|
|
110 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} | |
111 | </span> |
|
111 | </span> | |
112 | %endif |
|
112 | %endif | |
113 |
|
|
113 | %for tag in c.changeset.tags: | |
114 |
|
|
114 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
115 |
|
|
115 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> | |
116 |
|
|
116 | %endfor | |
117 |
|
|
117 | </span> | |
118 |
|
|
118 | </div> | |
119 |
|
|
119 | </div> | |
120 |
|
|
120 | <span> | |
121 | % if c.limited_diff: |
|
121 | % if c.limited_diff: | |
122 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: |
|
122 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: | |
123 | % else: |
|
123 | % else: | |
124 |
|
|
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 |
|
|
125 | %endif | |
126 | </span> |
|
126 | </span> | |
127 |
|
|
127 | <div class="cs_files"> | |
128 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): |
|
128 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): | |
129 | <div class="cs_${change}"> |
|
129 | <div class="cs_${change}"> | |
130 | <div class="node"> |
|
130 | <div class="node"> | |
131 | <a href="#${FID}">${h.safe_unicode(path)}</a> |
|
131 | <a href="#${FID}">${h.safe_unicode(path)}</a> | |
132 | </div> |
|
132 | </div> | |
133 | <div class="changes">${h.fancy_file_stats(stats)}</div> |
|
133 | <div class="changes">${h.fancy_file_stats(stats)}</div> | |
134 | </div> |
|
134 | </div> | |
135 | %endfor |
|
135 | %endfor | |
136 | % if c.limited_diff: |
|
136 | % if c.limited_diff: | |
137 | <h5>${_('Changeset was too big and was cut off...')}</h5> |
|
137 | <h5>${_('Changeset was too big and was cut off...')}</h5> | |
138 | % endif |
|
138 | % endif | |
139 |
|
|
139 | </div> | |
140 |
|
|
140 | </div> | |
141 |
|
141 | |||
142 | </div> |
|
142 | </div> | |
143 |
|
143 | |||
144 | ## diff block |
|
144 | ## diff block | |
145 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
145 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
146 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} |
|
146 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} | |
147 |
|
147 | |||
148 | % if c.limited_diff: |
|
148 | % if c.limited_diff: | |
149 | <h4>${_('Changeset was too big and was cut off...')}</h4> |
|
149 | <h4>${_('Changeset was too big and was cut off...')}</h4> | |
150 | % endif |
|
150 | % endif | |
151 |
|
151 | |||
152 | ## template for inline comment form |
|
152 | ## template for inline comment form | |
153 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
153 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
154 | ${comment.comment_inline_form()} |
|
154 | ${comment.comment_inline_form()} | |
155 |
|
155 | |||
156 | ## render comments and inlines |
|
156 | ## render comments and inlines | |
157 | ${comment.generate_comments()} |
|
157 | ${comment.generate_comments()} | |
158 |
|
158 | |||
159 | ## main comment form and it status |
|
159 | ## main comment form and it status | |
160 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), |
|
160 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), | |
161 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} |
|
161 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} | |
162 |
|
162 | |||
163 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
163 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS | |
164 | <script type="text/javascript"> |
|
164 | <script type="text/javascript"> | |
165 | YUE.onDOMReady(function(){ |
|
165 | YUE.onDOMReady(function(){ | |
166 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
166 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ | |
167 | var show = 'none'; |
|
167 | var show = 'none'; | |
168 | var target = e.currentTarget; |
|
168 | var target = e.currentTarget; | |
169 | if(target == null){ |
|
169 | if(target == null){ | |
170 | target = this; |
|
170 | target = this; | |
171 | } |
|
171 | } | |
172 | if(target.checked){ |
|
172 | if(target.checked){ | |
173 | var show = '' |
|
173 | var show = '' | |
174 | } |
|
174 | } | |
175 | var boxid = YUD.getAttribute(target,'id_for'); |
|
175 | var boxid = YUD.getAttribute(target,'id_for'); | |
176 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
176 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); | |
177 | for(c in comments){ |
|
177 | for(c in comments){ | |
178 | YUD.setStyle(comments[c],'display',show); |
|
178 | YUD.setStyle(comments[c],'display',show); | |
179 | } |
|
179 | } | |
180 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
180 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); | |
181 | for(c in btns){ |
|
181 | for(c in btns){ | |
182 | YUD.setStyle(btns[c],'display',show); |
|
182 | YUD.setStyle(btns[c],'display',show); | |
183 | } |
|
183 | } | |
184 | }) |
|
184 | }) | |
185 |
|
185 | |||
186 | YUE.on(YUQ('.line'),'click',function(e){ |
|
186 | YUE.on(YUQ('.line'),'click',function(e){ | |
187 | var tr = e.currentTarget; |
|
187 | var tr = e.currentTarget; | |
188 | if(tr == null){ |
|
188 | if(tr == null){ | |
189 | tr = this; |
|
189 | tr = this; | |
190 | } |
|
190 | } | |
191 | injectInlineForm(tr); |
|
191 | injectInlineForm(tr); | |
192 | }); |
|
192 | }); | |
193 |
|
193 | |||
194 | // inject comments into they proper positions |
|
194 | // inject comments into they proper positions | |
195 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
195 | var file_comments = YUQ('.inline-comment-placeholder'); | |
196 | renderInlineComments(file_comments); |
|
196 | renderInlineComments(file_comments); | |
197 | }) |
|
197 | }) | |
198 |
|
198 | |||
199 | </script> |
|
199 | </script> | |
200 |
|
200 | |||
201 | </div> |
|
201 | </div> | |
202 | </%def> |
|
202 | </%def> |
@@ -1,191 +1,191 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | ## usage: |
|
2 | ## usage: | |
3 | ## <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
3 | ## <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
4 | ## ${comment.comment_block(co)} |
|
4 | ## ${comment.comment_block(co)} | |
5 | ## |
|
5 | ## | |
6 | <%def name="comment_block(co)"> |
|
6 | <%def name="comment_block(co)"> | |
7 | <div class="comment" id="comment-${co.comment_id}" line="${co.line_no}"> |
|
7 | <div class="comment" id="comment-${co.comment_id}" line="${co.line_no}"> | |
8 | <div class="comment-wrapp"> |
|
8 | <div class="comment-wrapp"> | |
9 |
|
|
9 | <div class="meta"> | |
10 | <div style="float:left"> <img src="${h.gravatar_url(co.author.email, 20)}" /> </div> |
|
10 | <div style="float:left"> <img src="${h.gravatar_url(co.author.email, 20)}" /> </div> | |
11 |
|
|
11 | <div class="user"> | |
12 |
|
|
12 | ${co.author.username} | |
13 |
|
|
13 | </div> | |
14 |
|
|
14 | <div class="date"> | |
15 |
|
|
15 | ${h.age(co.modified_at)} <a class="permalink" href="#comment-${co.comment_id}">¶</a> | |
16 |
|
|
16 | </div> | |
17 | %if co.status_change: |
|
17 | %if co.status_change: | |
18 | <div style="float:left" class="changeset-status-container"> |
|
18 | <div style="float:left" class="changeset-status-container"> | |
19 | <div style="float:left;padding:0px 2px 0px 2px"><span style="font-size: 18px;">›</span></div> |
|
19 | <div style="float:left;padding:0px 2px 0px 2px"><span style="font-size: 18px;">›</span></div> | |
20 | <div title="${_('Changeset status')}" class="changeset-status-lbl"> ${co.status_change[0].status_lbl}</div> |
|
20 | <div title="${_('Changeset status')}" class="changeset-status-lbl"> ${co.status_change[0].status_lbl}</div> | |
21 | <div class="changeset-status-ico"><img src="${h.url(str('/images/icons/flag_status_%s.png' % co.status_change[0].status))}" /></div> |
|
21 | <div class="changeset-status-ico"><img src="${h.url(str('/images/icons/flag_status_%s.png' % co.status_change[0].status))}" /></div> | |
22 | </div> |
|
22 | </div> | |
23 | %endif |
|
23 | %endif | |
24 |
|
24 | |||
25 | <div style="float:left;padding:3px 0px 0px 5px"> |
|
25 | <div style="float:left;padding:3px 0px 0px 5px"> | |
26 | <span class=""> |
|
26 | <span class=""> | |
27 | %if co.pull_request: |
|
27 | %if co.pull_request: | |
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)}"> |
|
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 | %if co.status_change: |
|
29 | %if co.status_change: | |
30 | ${_('Status from pull request %s') % co.pull_request.pull_request_id} |
|
30 | ${_('Status from pull request %s') % co.pull_request.pull_request_id} | |
31 | %else: |
|
31 | %else: | |
32 | ${_('Comment from pull request %s') % co.pull_request.pull_request_id} |
|
32 | ${_('Comment from pull request %s') % co.pull_request.pull_request_id} | |
33 | %endif |
|
33 | %endif | |
34 | </a> |
|
34 | </a> | |
35 | %endif |
|
35 | %endif | |
36 | </span> |
|
36 | </span> | |
37 | </div> |
|
37 | </div> | |
38 |
|
38 | |||
39 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or co.author.user_id == c.rhodecode_user.user_id: |
|
39 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or co.author.user_id == c.rhodecode_user.user_id: | |
40 | <div class="buttons"> |
|
40 | <div class="buttons"> | |
41 | <span onClick="deleteComment(${co.comment_id})" class="delete-comment ui-btn">${_('Delete')}</span> |
|
41 | <span onClick="deleteComment(${co.comment_id})" class="delete-comment ui-btn">${_('Delete')}</span> | |
42 | </div> |
|
42 | </div> | |
43 | %endif |
|
43 | %endif | |
44 |
|
|
44 | </div> | |
45 |
|
|
45 | <div class="text"> | |
46 |
|
|
46 | ${h.rst_w_mentions(co.text)|n} | |
47 |
|
|
47 | </div> | |
48 | </div> |
|
48 | </div> | |
49 | </div> |
|
49 | </div> | |
50 | </%def> |
|
50 | </%def> | |
51 |
|
51 | |||
52 |
|
52 | |||
53 | <%def name="comment_inline_form()"> |
|
53 | <%def name="comment_inline_form()"> | |
54 | <div id='comment-inline-form-template' style="display:none"> |
|
54 | <div id='comment-inline-form-template' style="display:none"> | |
55 | <div class="comment-inline-form ac"> |
|
55 | <div class="comment-inline-form ac"> | |
56 | %if c.rhodecode_user.username != 'default': |
|
56 | %if c.rhodecode_user.username != 'default': | |
57 | <div class="overlay"><div class="overlay-text">${_('Submitting...')}</div></div> |
|
57 | <div class="overlay"><div class="overlay-text">${_('Submitting...')}</div></div> | |
58 | ${h.form('#', class_='inline-form')} |
|
58 | ${h.form('#', class_='inline-form')} | |
59 | <div class="clearfix"> |
|
59 | <div class="clearfix"> | |
60 | <div class="comment-help">${_('Commenting on line {1}.')} |
|
60 | <div class="comment-help">${_('Commenting on line {1}.')} | |
61 | ${(_('Comments parsed using %s syntax with %s support.') % ( |
|
61 | ${(_('Comments parsed using %s syntax with %s support.') % ( | |
62 | ('<a href="%s">RST</a>' % h.url('rst_help')), |
|
62 | ('<a href="%s">RST</a>' % h.url('rst_help')), | |
63 |
|
|
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 | )|n |
|
65 | )|n | |
66 | } |
|
66 | } | |
67 | </div> |
|
67 | </div> | |
68 | <div class="mentions-container" id="mentions_container_{1}"></div> |
|
68 | <div class="mentions-container" id="mentions_container_{1}"></div> | |
69 | <textarea id="text_{1}" name="text" class="yui-ac-input"></textarea> |
|
69 | <textarea id="text_{1}" name="text" class="yui-ac-input"></textarea> | |
70 | </div> |
|
70 | </div> | |
71 | <div class="comment-button"> |
|
71 | <div class="comment-button"> | |
72 | <input type="hidden" name="f_path" value="{0}"> |
|
72 | <input type="hidden" name="f_path" value="{0}"> | |
73 | <input type="hidden" name="line" value="{1}"> |
|
73 | <input type="hidden" name="line" value="{1}"> | |
74 | ${h.submit('save', _('Comment'), class_='ui-btn save-inline-form')} |
|
74 | ${h.submit('save', _('Comment'), class_='ui-btn save-inline-form')} | |
75 | ${h.reset('hide-inline-form', _('Hide'), class_='ui-btn hide-inline-form')} |
|
75 | ${h.reset('hide-inline-form', _('Hide'), class_='ui-btn hide-inline-form')} | |
76 | </div> |
|
76 | </div> | |
77 | ${h.end_form()} |
|
77 | ${h.end_form()} | |
78 | %else: |
|
78 | %else: | |
79 | ${h.form('')} |
|
79 | ${h.form('')} | |
80 | <div class="clearfix"> |
|
80 | <div class="clearfix"> | |
81 | <div class="comment-help"> |
|
81 | <div class="comment-help"> | |
82 | ${_('You need to be logged in to comment.')} <a href="${h.url('login_home',came_from=h.url.current())}">${_('Login now')}</a> |
|
82 | ${_('You need to be logged in to comment.')} <a href="${h.url('login_home',came_from=h.url.current())}">${_('Login now')}</a> | |
83 | </div> |
|
83 | </div> | |
84 | </div> |
|
84 | </div> | |
85 | <div class="comment-button"> |
|
85 | <div class="comment-button"> | |
86 | ${h.reset('hide-inline-form', _('Hide'), class_='ui-btn hide-inline-form')} |
|
86 | ${h.reset('hide-inline-form', _('Hide'), class_='ui-btn hide-inline-form')} | |
87 | </div> |
|
87 | </div> | |
88 | ${h.end_form()} |
|
88 | ${h.end_form()} | |
89 | %endif |
|
89 | %endif | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | </%def> |
|
92 | </%def> | |
93 |
|
93 | |||
94 |
|
94 | |||
95 | ## generates inlines taken from c.comments var |
|
95 | ## generates inlines taken from c.comments var | |
96 | <%def name="inlines()"> |
|
96 | <%def name="inlines()"> | |
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> |
|
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 | %for path, lines in c.inline_comments: |
|
98 | %for path, lines in c.inline_comments: | |
99 | % for line,comments in lines.iteritems(): |
|
99 | % for line,comments in lines.iteritems(): | |
100 | <div style="display:none" class="inline-comment-placeholder" path="${path}" target_id="${h.safeid(h.safe_unicode(path))}"> |
|
100 | <div style="display:none" class="inline-comment-placeholder" path="${path}" target_id="${h.safeid(h.safe_unicode(path))}"> | |
101 | %for co in comments: |
|
101 | %for co in comments: | |
102 | ${comment_block(co)} |
|
102 | ${comment_block(co)} | |
103 | %endfor |
|
103 | %endfor | |
104 | </div> |
|
104 | </div> | |
105 | %endfor |
|
105 | %endfor | |
106 | %endfor |
|
106 | %endfor | |
107 |
|
107 | |||
108 | </%def> |
|
108 | </%def> | |
109 |
|
109 | |||
110 | ## generate inline comments and the main ones |
|
110 | ## generate inline comments and the main ones | |
111 | <%def name="generate_comments()"> |
|
111 | <%def name="generate_comments()"> | |
112 | <div class="comments"> |
|
112 | <div class="comments"> | |
113 | <div id="inline-comments-container"> |
|
113 | <div id="inline-comments-container"> | |
114 | ## generate inlines for this changeset |
|
114 | ## generate inlines for this changeset | |
115 | ${inlines()} |
|
115 | ${inlines()} | |
116 | </div> |
|
116 | </div> | |
117 |
|
117 | |||
118 | %for co in c.comments: |
|
118 | %for co in c.comments: | |
119 | <div id="comment-tr-${co.comment_id}"> |
|
119 | <div id="comment-tr-${co.comment_id}"> | |
120 | ${comment_block(co)} |
|
120 | ${comment_block(co)} | |
121 | </div> |
|
121 | </div> | |
122 | %endfor |
|
122 | %endfor | |
123 | </div> |
|
123 | </div> | |
124 | </%def> |
|
124 | </%def> | |
125 |
|
125 | |||
126 | ## MAIN COMMENT FORM |
|
126 | ## MAIN COMMENT FORM | |
127 | <%def name="comments(post_url, cur_status, close_btn=False, change_status=True)"> |
|
127 | <%def name="comments(post_url, cur_status, close_btn=False, change_status=True)"> | |
128 |
|
128 | |||
129 | <div class="comments"> |
|
129 | <div class="comments"> | |
130 | %if c.rhodecode_user.username != 'default': |
|
130 | %if c.rhodecode_user.username != 'default': | |
131 | <div class="comment-form ac"> |
|
131 | <div class="comment-form ac"> | |
132 | ${h.form(post_url)} |
|
132 | ${h.form(post_url)} | |
133 | <strong>${_('Leave a comment')}</strong> |
|
133 | <strong>${_('Leave a comment')}</strong> | |
134 | <div class="clearfix"> |
|
134 | <div class="clearfix"> | |
135 | <div class="comment-help"> |
|
135 | <div class="comment-help"> | |
136 | ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')), |
|
136 | ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')), | |
137 |
|
|
137 | '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' % | |
138 |
|
|
138 | _('Use @username inside this text to send notification to this RhodeCode user')))|n} | |
139 | %if change_status: |
|
139 | %if change_status: | |
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> |
|
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 | <input style="vertical-align: bottom;margin-bottom:-2px" id="show_changeset_status_box" type="checkbox" name="change_changeset_status" /> |
|
141 | <input style="vertical-align: bottom;margin-bottom:-2px" id="show_changeset_status_box" type="checkbox" name="change_changeset_status" /> | |
142 | %endif |
|
142 | %endif | |
143 | </div> |
|
143 | </div> | |
144 | %if change_status: |
|
144 | %if change_status: | |
145 | <div id="status_block_container" class="status-block" style="display:none"> |
|
145 | <div id="status_block_container" class="status-block" style="display:none"> | |
146 | %for status,lbl in c.changeset_statuses: |
|
146 | %for status,lbl in c.changeset_statuses: | |
147 | <div class=""> |
|
147 | <div class=""> | |
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}"> |
|
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 | <label for="${status}">${lbl}</label> |
|
149 | <label for="${status}">${lbl}</label> | |
150 | </div> |
|
150 | </div> | |
151 | %endfor |
|
151 | %endfor | |
152 | </div> |
|
152 | </div> | |
153 | %endif |
|
153 | %endif | |
154 | <div class="mentions-container" id="mentions_container"></div> |
|
154 | <div class="mentions-container" id="mentions_container"></div> | |
155 | ${h.textarea('text')} |
|
155 | ${h.textarea('text')} | |
156 | </div> |
|
156 | </div> | |
157 | <div class="comment-button"> |
|
157 | <div class="comment-button"> | |
158 | ${h.submit('save', _('Comment'), class_="ui-btn large")} |
|
158 | ${h.submit('save', _('Comment'), class_="ui-btn large")} | |
159 | %if close_btn and change_status: |
|
159 | %if close_btn and change_status: | |
160 | ${h.submit('save_close', _('Comment and close'), class_='ui-btn blue large %s' % ('hidden' if cur_status in ['not_reviewed','under_review'] else ''))} |
|
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 | %endif |
|
161 | %endif | |
162 | </div> |
|
162 | </div> | |
163 | ${h.end_form()} |
|
163 | ${h.end_form()} | |
164 | </div> |
|
164 | </div> | |
165 | %endif |
|
165 | %endif | |
166 | </div> |
|
166 | </div> | |
167 | <script> |
|
167 | <script> | |
168 | YUE.onDOMReady(function () { |
|
168 | YUE.onDOMReady(function () { | |
169 | MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
169 | MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA); | |
170 |
|
170 | |||
171 | // changeset status box listener |
|
171 | // changeset status box listener | |
172 | YUE.on(YUD.get('show_changeset_status_box'),'change',function(e){ |
|
172 | YUE.on(YUD.get('show_changeset_status_box'),'change',function(e){ | |
173 | if(e.currentTarget.checked){ |
|
173 | if(e.currentTarget.checked){ | |
174 | YUD.setStyle('status_block_container','display',''); |
|
174 | YUD.setStyle('status_block_container','display',''); | |
175 | } |
|
175 | } | |
176 | else{ |
|
176 | else{ | |
177 | YUD.setStyle('status_block_container','display','none'); |
|
177 | YUD.setStyle('status_block_container','display','none'); | |
178 | } |
|
178 | } | |
179 | }) |
|
179 | }) | |
180 | YUE.on(YUQ('.status_change_radio'), 'change',function(e){ |
|
180 | YUE.on(YUQ('.status_change_radio'), 'change',function(e){ | |
181 |
|
|
181 | var val = e.currentTarget.value; | |
182 |
|
|
182 | if (val == 'approved' || val == 'rejected') { | |
183 |
|
|
183 | YUD.removeClass('save_close', 'hidden'); | |
184 |
|
|
184 | }else{ | |
185 |
|
|
185 | YUD.addClass('save_close', 'hidden'); | |
186 |
|
|
186 | } | |
187 | }) |
|
187 | }) | |
188 |
|
188 | |||
189 | }); |
|
189 | }); | |
190 | </script> |
|
190 | </script> | |
191 | </%def> |
|
191 | </%def> |
@@ -1,122 +1,122 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s 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} |
|
5 | ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
12 | » |
|
12 | » | |
13 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
|
13 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('changelog')} |
|
17 | ${self.menu('changelog')} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="main()"> |
|
20 | <%def name="main()"> | |
21 | <div class="box"> |
|
21 | <div class="box"> | |
22 | <!-- box / title --> |
|
22 | <!-- box / title --> | |
23 | <div class="title"> |
|
23 | <div class="title"> | |
24 | ${self.breadcrumbs()} |
|
24 | ${self.breadcrumbs()} | |
25 | </div> |
|
25 | </div> | |
26 | <div class="table"> |
|
26 | <div class="table"> | |
27 |
|
|
27 | <div id="body" class="diffblock"> | |
28 |
|
|
28 | <div class="code-header cv"> | |
29 |
|
|
29 | <h3 class="code-header-title">${_('Compare View')} / ${h.link_to(_('Show combined compare'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id))}</h3> | |
30 | <div> |
|
30 | <div> | |
31 |
|
|
31 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} | |
32 | </div> |
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 |
|
|
35 | <div id="changeset_compare_view_content"> | |
36 |
|
|
36 | <div class="container"> | |
37 |
|
|
37 | <table class="compare_view_commits noborder"> | |
38 | %for cnt,cs in enumerate(c.cs_ranges): |
|
38 | %for cnt,cs in enumerate(c.cs_ranges): | |
39 | <tr> |
|
39 | <tr> | |
40 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td> |
|
40 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td> | |
41 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> |
|
41 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> | |
42 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
42 | <td><div class="author">${h.person(cs.author)}</div></td> | |
43 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
|
43 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> | |
44 | <td> |
|
44 | <td> | |
45 | %if c.statuses: |
|
45 | %if c.statuses: | |
46 | <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div> |
|
46 | <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div> | |
47 | %endif |
|
47 | %endif | |
48 | </td> |
|
48 | </td> | |
49 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> |
|
49 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> | |
50 | </tr> |
|
50 | </tr> | |
51 | %endfor |
|
51 | %endfor | |
52 | </table> |
|
52 | </table> | |
53 |
|
|
53 | </div> | |
54 |
|
|
54 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> | |
55 |
|
|
55 | <div class="cs_files"> | |
56 |
|
|
56 | %for cs in c.cs_ranges: | |
57 |
|
|
57 | <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> | |
58 |
|
|
58 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems(): | |
59 |
|
|
59 | <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div> | |
60 |
|
|
60 | %endfor | |
61 |
|
|
61 | %endfor | |
62 |
|
|
62 | </div> | |
63 |
|
|
63 | </div> | |
64 |
|
64 | |||
65 | </div> |
|
65 | </div> | |
66 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
66 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
67 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
67 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
68 | %for cs in c.cs_ranges: |
|
68 | %for cs in c.cs_ranges: | |
69 | ##${comment.comment_inline_form(cs)} |
|
69 | ##${comment.comment_inline_form(cs)} | |
70 | ## diff block |
|
70 | ## diff block | |
71 | <div class="h3"> |
|
71 | <div class="h3"> | |
72 | <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a> |
|
72 | <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a> | |
73 | <div class="gravatar"> |
|
73 | <div class="gravatar"> | |
74 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/> |
|
74 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/> | |
75 | </div> |
|
75 | </div> | |
76 | <div class="right"> |
|
76 | <div class="right"> | |
77 | <span class="logtags"> |
|
77 | <span class="logtags"> | |
78 | %if len(cs.parents)>1: |
|
78 | %if len(cs.parents)>1: | |
79 | <span class="merge">${_('merge')}</span> |
|
79 | <span class="merge">${_('merge')}</span> | |
80 | %endif |
|
80 | %endif | |
81 | %if cs.branch: |
|
81 | %if cs.branch: | |
82 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
82 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | |
83 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
83 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
84 | </span> |
|
84 | </span> | |
85 | %endif |
|
85 | %endif | |
86 | %if h.is_hg(c.rhodecode_repo): |
|
86 | %if h.is_hg(c.rhodecode_repo): | |
87 | %for book in cs.bookmarks: |
|
87 | %for book in cs.bookmarks: | |
88 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
88 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
89 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
89 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
90 | </span> |
|
90 | </span> | |
91 | %endfor |
|
91 | %endfor | |
92 | %endif |
|
92 | %endif | |
93 | %for tag in cs.tags: |
|
93 | %for tag in cs.tags: | |
94 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
94 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
95 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
95 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> | |
96 | %endfor |
|
96 | %endfor | |
97 | </span> |
|
97 | </span> | |
98 | </div> |
|
98 | </div> | |
99 | </div> |
|
99 | </div> | |
100 | ${diff_block.diff_block(c.changes[cs.raw_id])} |
|
100 | ${diff_block.diff_block(c.changes[cs.raw_id])} | |
101 | ##${comment.comments(cs)} |
|
101 | ##${comment.comments(cs)} | |
102 |
|
102 | |||
103 | %endfor |
|
103 | %endfor | |
104 | <script type="text/javascript"> |
|
104 | <script type="text/javascript"> | |
105 |
|
105 | |||
106 | YUE.onDOMReady(function(){ |
|
106 | YUE.onDOMReady(function(){ | |
107 |
|
107 | |||
108 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
108 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ | |
109 | var act = e.currentTarget.nextElementSibling; |
|
109 | var act = e.currentTarget.nextElementSibling; | |
110 |
|
110 | |||
111 | if(YUD.hasClass(act,'active')){ |
|
111 | if(YUD.hasClass(act,'active')){ | |
112 | YUD.removeClass(act,'active'); |
|
112 | YUD.removeClass(act,'active'); | |
113 | YUD.setStyle(act,'display','none'); |
|
113 | YUD.setStyle(act,'display','none'); | |
114 | }else{ |
|
114 | }else{ | |
115 | YUD.addClass(act,'active'); |
|
115 | YUD.addClass(act,'active'); | |
116 | YUD.setStyle(act,'display',''); |
|
116 | YUD.setStyle(act,'display',''); | |
117 | } |
|
117 | } | |
118 | }); |
|
118 | }); | |
119 | }) |
|
119 | }) | |
120 | </script> |
|
120 | </script> | |
121 | </div> |
|
121 | </div> | |
122 | </%def> |
|
122 | </%def> |
@@ -1,55 +1,55 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <!DOCTYPE html> |
|
2 | <!DOCTYPE html> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
4 | <head> |
|
4 | <head> | |
5 | <title>Error - ${c.error_message}</title> |
|
5 | <title>Error - ${c.error_message}</title> | |
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
7 | <meta name="robots" content="index, nofollow"/> |
|
7 | <meta name="robots" content="index, nofollow"/> | |
8 | <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" /> |
|
8 | <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" /> | |
9 |
|
9 | |||
10 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
10 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
11 |
|
|
11 | %if c.redirect_time: | |
12 |
|
|
12 | <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/> | |
13 |
|
|
13 | %endif | |
14 |
|
14 | |||
15 | <!-- stylesheets --> |
|
15 | <!-- stylesheets --> | |
16 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" /> |
|
16 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" /> | |
17 |
|
|
17 | <style type="text/css"> | |
18 |
|
|
18 | #main_div{ | |
19 |
|
|
19 | border: 0px solid #000; | |
20 |
|
|
20 | width: 500px; | |
21 |
|
|
21 | margin: auto; | |
22 |
|
|
22 | text-align: center; | |
23 |
|
|
23 | margin-top: 200px; | |
24 |
|
|
24 | font-size: 1.6em; | |
25 |
|
|
25 | } | |
26 |
|
|
26 | .error_message{ | |
27 |
|
|
27 | text-align: center; | |
28 |
|
|
28 | color:#003367; | |
29 |
|
|
29 | font-size: 1.6em; | |
30 |
|
|
30 | margin:10px; | |
31 |
|
|
31 | } | |
32 |
|
|
32 | </style> | |
33 |
|
33 | |||
34 | </head> |
|
34 | </head> | |
35 | <body> |
|
35 | <body> | |
36 |
|
36 | |||
37 | <div id="login"> |
|
37 | <div id="login"> | |
38 | <div class="table"> |
|
38 | <div class="table"> | |
39 |
|
|
39 | <div id="main_div"> | |
40 |
|
|
40 | <div style="font-size:2.0em;margin: 10px">${c.rhodecode_name}</div> | |
41 |
|
|
41 | <h1 class="error_message">${c.error_message}</h1> | |
42 |
|
42 | |||
43 |
|
|
43 | <p>${c.error_explanation}</p> | |
44 |
|
44 | |||
45 |
|
|
45 | %if c.redirect_time: | |
46 |
|
|
46 | <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p> | |
47 | %endif |
|
47 | %endif | |
48 |
|
48 | |||
49 | </div> |
|
49 | </div> | |
50 | </div> |
|
50 | </div> | |
51 | <!-- end login --> |
|
51 | <!-- end login --> | |
52 | </div> |
|
52 | </div> | |
53 | </body> |
|
53 | </body> | |
54 |
|
54 | |||
55 | </html> |
|
55 | </html> |
@@ -1,161 +1,161 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('%s files') % c.repo_name} - ${c.rhodecode_name} |
|
4 | ${_('%s files') % c.repo_name} - ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))} |
|
10 | ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))} | |
11 | » |
|
11 | » | |
12 | ${_('files')} |
|
12 | ${_('files')} | |
13 | %if c.file: |
|
13 | %if c.file: | |
14 | @ r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
14 | @ r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} | |
15 | %endif |
|
15 | %endif | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 | ${self.menu('files')} |
|
19 | ${self.menu('files')} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="main()"> |
|
22 | <%def name="main()"> | |
23 | <div class="box"> |
|
23 | <div class="box"> | |
24 | <!-- box / title --> |
|
24 | <!-- box / title --> | |
25 | <div class="title"> |
|
25 | <div class="title"> | |
26 | ${self.breadcrumbs()} |
|
26 | ${self.breadcrumbs()} | |
27 |
|
|
27 | <ul class="links"> | |
28 |
|
|
28 | <li> | |
29 |
|
|
29 | <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span> | |
30 |
|
|
30 | </li> | |
31 |
|
|
31 | </ul> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="table"> |
|
33 | <div class="table"> | |
34 |
|
|
34 | <div id="files_data"> | |
35 |
|
|
35 | <%include file='files_ypjax.html'/> | |
36 | </div> |
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 |
|
39 | |||
40 | <script type="text/javascript"> |
|
40 | <script type="text/javascript"> | |
41 | var CACHE = {}; |
|
41 | var CACHE = {}; | |
42 | var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s |
|
42 | var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s | |
43 | //used to construct links from the search list |
|
43 | //used to construct links from the search list | |
44 | var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
44 | var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; | |
45 | //send the nodelist request to this url |
|
45 | //send the nodelist request to this url | |
46 | var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
46 | var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; | |
47 | // send the node history requst to this url |
|
47 | // send the node history requst to this url | |
48 | var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
48 | var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; | |
49 |
|
49 | |||
50 | var ypjax_links = function(){ |
|
50 | var ypjax_links = function(){ | |
51 | YUE.on(YUQ('.ypjax-link'), 'click',function(e){ |
|
51 | YUE.on(YUQ('.ypjax-link'), 'click',function(e){ | |
52 |
|
52 | |||
53 |
|
|
53 | //don't do ypjax on middle click | |
54 |
|
|
54 | if(e.which == 2 || !History.enabled){ | |
55 |
|
|
55 | return true; | |
56 |
|
|
56 | } | |
57 |
|
57 | |||
58 | var el = e.currentTarget; |
|
58 | var el = e.currentTarget; | |
59 | var url = el.href; |
|
59 | var url = el.href; | |
60 |
|
60 | |||
61 | var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}'; |
|
61 | var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}'; | |
62 | _base_url = _base_url.replace('//','/') |
|
62 | _base_url = _base_url.replace('//','/') | |
63 |
|
63 | |||
64 | //extract rev and the f_path from url. |
|
64 | //extract rev and the f_path from url. | |
65 | parts = url.split(_base_url) |
|
65 | parts = url.split(_base_url) | |
66 | if(parts.length != 2){ |
|
66 | if(parts.length != 2){ | |
67 |
|
|
67 | return false; | |
68 | } |
|
68 | } | |
69 |
|
69 | |||
70 | var parts2 = parts[1].split('/'); |
|
70 | var parts2 = parts[1].split('/'); | |
71 |
|
|
71 | var rev = parts2.shift(); // pop the first element which is the revision | |
72 |
|
|
72 | var f_path = parts2.join('/'); | |
73 |
|
73 | |||
74 | var title = "${_('%s files') % c.repo_name}" + " - " + f_path; |
|
74 | var title = "${_('%s files') % c.repo_name}" + " - " + f_path; | |
75 |
|
75 | |||
76 | var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path); |
|
76 | var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path); | |
77 | var _url_base = url_base.replace('__REV__',rev); |
|
77 | var _url_base = url_base.replace('__REV__',rev); | |
78 |
|
78 | |||
79 | // Change our States and save some data for handling events |
|
79 | // Change our States and save some data for handling events | |
80 | var data = {url:url,title:title, url_base:_url_base, |
|
80 | var data = {url:url,title:title, url_base:_url_base, | |
81 | node_list_url:_node_list_url, rev:rev, f_path:f_path}; |
|
81 | node_list_url:_node_list_url, rev:rev, f_path:f_path}; | |
82 | History.pushState(data, title, url); |
|
82 | History.pushState(data, title, url); | |
83 |
|
83 | |||
84 | //now we're sure that we can do ypjax things |
|
84 | //now we're sure that we can do ypjax things | |
85 | YUE.preventDefault(e); |
|
85 | YUE.preventDefault(e); | |
86 | return false; |
|
86 | return false; | |
87 | }); |
|
87 | }); | |
88 | } |
|
88 | } | |
89 |
|
89 | |||
90 | var callbacks = function(State){ |
|
90 | var callbacks = function(State){ | |
91 | ypjax_links(); |
|
91 | ypjax_links(); | |
92 | tooltip_activate(); |
|
92 | tooltip_activate(); | |
93 | fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); |
|
93 | fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); | |
94 |
|
94 | |||
95 | if(YUD.get('hlcode')){ |
|
95 | if(YUD.get('hlcode')){ | |
96 |
|
|
96 | YUE.on('hlcode', 'mouseup', getSelectionLink); | |
97 | } |
|
97 | } | |
98 | //console.log(State); |
|
98 | //console.log(State); | |
99 | if(YUD.get('load_node_history')){ |
|
99 | if(YUD.get('load_node_history')){ | |
100 | //remove all listeners due to problems of history state |
|
100 | //remove all listeners due to problems of history state | |
101 | YUE.removeListener('load_node_history', 'click'); |
|
101 | YUE.removeListener('load_node_history', 'click'); | |
102 | YUE.on('load_node_history', 'click', function(e){ |
|
102 | YUE.on('load_node_history', 'click', function(e){ | |
103 | var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path); |
|
103 | var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path); | |
104 | ypjax(_url, 'node_history', function(o){ |
|
104 | ypjax(_url, 'node_history', function(o){ | |
105 |
|
|
105 | tooltip_activate(); | |
106 | }) |
|
106 | }) | |
107 | }); |
|
107 | }); | |
108 | } |
|
108 | } | |
109 | // Inform Google Analytics of the change |
|
109 | // Inform Google Analytics of the change | |
110 | if ( typeof window.pageTracker !== 'undefined' ) { |
|
110 | if ( typeof window.pageTracker !== 'undefined' ) { | |
111 | window.pageTracker._trackPageview(State.url); |
|
111 | window.pageTracker._trackPageview(State.url); | |
112 | } |
|
112 | } | |
113 | } |
|
113 | } | |
114 |
|
114 | |||
115 | YUE.onDOMReady(function(){ |
|
115 | YUE.onDOMReady(function(){ | |
116 | ypjax_links(); |
|
116 | ypjax_links(); | |
117 | var container = 'files_data'; |
|
117 | var container = 'files_data'; | |
118 | //Bind to StateChange Event |
|
118 | //Bind to StateChange Event | |
119 | History.Adapter.bind(window,'statechange',function(){ |
|
119 | History.Adapter.bind(window,'statechange',function(){ | |
120 | var State = History.getState(); |
|
120 | var State = History.getState(); | |
121 | cache_key = State.url; |
|
121 | cache_key = State.url; | |
122 | //check if we have this request in cache maybe ? |
|
122 | //check if we have this request in cache maybe ? | |
123 | var _cache_obj = CACHE[cache_key]; |
|
123 | var _cache_obj = CACHE[cache_key]; | |
124 | var _cur_time = new Date().getTime(); |
|
124 | var _cur_time = new Date().getTime(); | |
125 | // get from cache if it's there and not yet expired ! |
|
125 | // get from cache if it's there and not yet expired ! | |
126 | if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){ |
|
126 | if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){ | |
127 | YUD.get(container).innerHTML=_cache_obj[1]; |
|
127 | YUD.get(container).innerHTML=_cache_obj[1]; | |
128 | YUD.setStyle(container,'opacity','1.0'); |
|
128 | YUD.setStyle(container,'opacity','1.0'); | |
129 |
|
129 | |||
130 | //callbacks after ypjax call |
|
130 | //callbacks after ypjax call | |
131 | callbacks(State); |
|
131 | callbacks(State); | |
132 | } |
|
132 | } | |
133 | else{ |
|
133 | else{ | |
134 | ypjax(State.url,container,function(o){ |
|
134 | ypjax(State.url,container,function(o){ | |
135 |
|
|
135 | //callbacks after ypjax call | |
136 |
|
|
136 | callbacks(State); | |
137 |
|
|
137 | if (o !== undefined){ | |
138 |
|
|
138 | //store our request in cache | |
139 |
|
|
139 | var _expire_on = new Date().getTime()+CACHE_EXPIRE; | |
140 | CACHE[cache_key] = [_expire_on, o.responseText]; |
|
140 | CACHE[cache_key] = [_expire_on, o.responseText]; | |
141 | } |
|
141 | } | |
142 | }); |
|
142 | }); | |
143 | } |
|
143 | } | |
144 | }); |
|
144 | }); | |
145 |
|
145 | |||
146 | // init the search filter |
|
146 | // init the search filter | |
147 | var _State = { |
|
147 | var _State = { | |
148 | url: "${h.url.current()}", |
|
148 | url: "${h.url.current()}", | |
149 | data: { |
|
149 | data: { | |
150 | node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"), |
|
150 | node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"), | |
151 | url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"), |
|
151 | url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"), | |
152 | rev:"${c.changeset.raw_id}", |
|
152 | rev:"${c.changeset.raw_id}", | |
153 | f_path: "${h.safe_unicode(c.file.path)}" |
|
153 | f_path: "${h.safe_unicode(c.file.path)}" | |
154 | } |
|
154 | } | |
155 | } |
|
155 | } | |
156 | fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); |
|
156 | fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); | |
157 | }); |
|
157 | }); | |
158 |
|
158 | |||
159 | </script> |
|
159 | </script> | |
160 |
|
160 | |||
161 | </%def> |
|
161 | </%def> |
@@ -1,92 +1,92 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('%s Edit file') % c.repo_name} - ${c.rhodecode_name} |
|
4 | ${_('%s Edit file') % c.repo_name} - ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="js_extra()"> |
|
7 | <%def name="js_extra()"> | |
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="css_extra()"> |
|
10 | <%def name="css_extra()"> | |
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="breadcrumbs_links()"> |
|
14 | <%def name="breadcrumbs_links()"> | |
15 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
15 | ${h.link_to(_(u'Home'),h.url('/'))} | |
16 | » |
|
16 | » | |
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
18 | » |
|
18 | » | |
19 | ${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} |
|
19 | ${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="page_nav()"> |
|
22 | <%def name="page_nav()"> | |
23 |
|
|
23 | ${self.menu('files')} | |
24 | </%def> |
|
24 | </%def> | |
25 | <%def name="main()"> |
|
25 | <%def name="main()"> | |
26 | <div class="box"> |
|
26 | <div class="box"> | |
27 | <!-- box / title --> |
|
27 | <!-- box / title --> | |
28 | <div class="title"> |
|
28 | <div class="title"> | |
29 | ${self.breadcrumbs()} |
|
29 | ${self.breadcrumbs()} | |
30 | <ul class="links"> |
|
30 | <ul class="links"> | |
31 | <li> |
|
31 | <li> | |
32 | <span style="text-transform: uppercase;"> |
|
32 | <span style="text-transform: uppercase;"> | |
33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> | |
34 | </li> |
|
34 | </li> | |
35 | </ul> |
|
35 | </ul> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="table"> |
|
37 | <div class="table"> | |
38 |
|
|
38 | <div id="files_data"> | |
39 |
|
|
39 | ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")} | |
40 | <h3>${_('Add new file')}</h3> |
|
40 | <h3>${_('Add new file')}</h3> | |
41 | <div class="form"> |
|
41 | <div class="form"> | |
42 | <div class="fields"> |
|
42 | <div class="fields"> | |
43 | <div id="filename_container" class="field file"> |
|
43 | <div id="filename_container" class="field file"> | |
44 | <div class="label"> |
|
44 | <div class="label"> | |
45 | <label for="filename">${_('File Name')}:</label> |
|
45 | <label for="filename">${_('File Name')}:</label> | |
46 | </div> |
|
46 | </div> | |
47 | <div class="input"> |
|
47 | <div class="input"> | |
48 | <input type="text" value="" size="30" name="filename" id="filename"> |
|
48 | <input type="text" value="" size="30" name="filename" id="filename"> | |
49 | ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> |
|
49 | ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> | |
50 | </div> |
|
50 | </div> | |
51 | </div> |
|
51 | </div> | |
52 | <div id="upload_file_container" class="field" style="display:none"> |
|
52 | <div id="upload_file_container" class="field" style="display:none"> | |
53 | <div class="label"> |
|
53 | <div class="label"> | |
54 | <label for="location">${_('Upload file')}</label> |
|
54 | <label for="location">${_('Upload file')}</label> | |
55 | </div> |
|
55 | </div> | |
56 | <div class="file"> |
|
56 | <div class="file"> | |
57 | <input type="file" size="30" name="upload_file" id="upload_file"> |
|
57 | <input type="file" size="30" name="upload_file" id="upload_file"> | |
58 | ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span> |
|
58 | ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span> | |
59 | </div> |
|
59 | </div> | |
60 | </div> |
|
60 | </div> | |
61 | <div class="field"> |
|
61 | <div class="field"> | |
62 | <div class="label"> |
|
62 | <div class="label"> | |
63 | <label for="location">${_('Location')}</label> |
|
63 | <label for="location">${_('Location')}</label> | |
64 | </div> |
|
64 | </div> | |
65 | <div class="input"> |
|
65 | <div class="input"> | |
66 | <input type="text" value="${c.f_path}" size="30" name="location" id="location"> |
|
66 | <input type="text" value="${c.f_path}" size="30" name="location" id="location"> | |
67 | ${_('use / to separate directories')} |
|
67 | ${_('use / to separate directories')} | |
68 | </div> |
|
68 | </div> | |
69 | </div> |
|
69 | </div> | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 |
|
|
72 | <div id="body" class="codeblock"> | |
73 |
|
|
73 | <div id="editor_container"> | |
74 | <pre id="editor_pre"></pre> |
|
74 | <pre id="editor_pre"></pre> | |
75 |
|
|
75 | <textarea id="editor" name="content" style="display:none"></textarea> | |
76 | </div> |
|
76 | </div> | |
77 |
|
|
77 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> | |
78 |
|
|
78 | <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px"></textarea> | |
79 | </div> |
|
79 | </div> | |
80 |
|
|
80 | <div style="text-align: l;padding-top: 5px"> | |
81 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
81 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} | |
82 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
82 | ${h.reset('reset',_('Reset'),class_="ui-btn")} | |
83 | </div> |
|
83 | </div> | |
84 |
|
|
84 | ${h.end_form()} | |
85 |
|
|
85 | <script type="text/javascript"> | |
86 |
|
|
86 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}"; | |
87 |
|
|
87 | initCodeMirror('editor',reset_url); | |
88 | </script> |
|
88 | </script> | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 | </%def> |
|
92 | </%def> |
@@ -1,116 +1,116 b'' | |||||
1 | <%def name="file_class(node)"> |
|
1 | <%def name="file_class(node)"> | |
2 |
|
|
2 | %if node.is_file(): | |
3 |
|
|
3 | <%return "browser-file" %> | |
4 |
|
|
4 | %else: | |
5 |
|
|
5 | <%return "browser-dir"%> | |
6 |
|
|
6 | %endif | |
7 | </%def> |
|
7 | </%def> | |
8 | <div id="body" class="browserblock"> |
|
8 | <div id="body" class="browserblock"> | |
9 | <div class="browser-header"> |
|
9 | <div class="browser-header"> | |
10 |
|
|
10 | <div class="browser-nav"> | |
11 |
|
|
11 | ${h.form(h.url.current())} | |
12 |
|
|
12 | <div class="info_box"> | |
13 |
|
|
13 | <span class="rev">${_('view')}@rev</span> | |
14 |
|
|
14 | <a class="ui-btn ypjax-link" href="${c.url_prev}" title="${_('previous revision')}">«</a> | |
15 |
|
|
15 | ${h.text('at_rev',value=c.changeset.revision,size=5)} | |
16 |
|
|
16 | <a class="ui-btn ypjax-link" href="${c.url_next}" title="${_('next revision')}">»</a> | |
17 |
|
|
17 | ## ${h.submit('view',_('view'),class_="ui-btn")} | |
18 |
|
|
18 | </div> | |
19 |
|
|
19 | ${h.end_form()} | |
20 | </div> |
|
20 | </div> | |
21 |
|
|
21 | <div class="browser-branch"> | |
22 |
|
|
22 | ${h.checkbox('stay_at_branch',c.changeset.branch,c.changeset.branch==c.branch)} | |
23 |
|
|
23 | <label>${_('follow current branch')}</label> | |
24 |
|
|
24 | </div> | |
25 | <div class="browser-search"> |
|
25 | <div class="browser-search"> | |
26 | <div id="search_activate_id" class="search_activate"> |
|
26 | <div id="search_activate_id" class="search_activate"> | |
27 | <a class="ui-btn" id="filter_activate" href="#">${_('search file list')}</a> |
|
27 | <a class="ui-btn" id="filter_activate" href="#">${_('search file list')}</a> | |
28 | </div> |
|
28 | </div> | |
29 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
29 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
30 | <div id="add_node_id" class="add_node"> |
|
30 | <div id="add_node_id" class="add_node"> | |
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> |
|
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 | </div> |
|
32 | </div> | |
33 | % endif |
|
33 | % endif | |
34 | <div> |
|
34 | <div> | |
35 | <div id="node_filter_box_loading" style="display:none">${_('Loading file list...')}</div> |
|
35 | <div id="node_filter_box_loading" style="display:none">${_('Loading file list...')}</div> | |
36 | <div id="node_filter_box" style="display:none"> |
|
36 | <div id="node_filter_box" style="display:none"> | |
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"> |
|
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 | </div> |
|
38 | </div> | |
39 | </div> |
|
39 | </div> | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 |
|
42 | |||
43 |
|
|
43 | <div class="browser-body"> | |
44 |
|
|
44 | <table class="code-browser"> | |
45 |
|
|
45 | <thead> | |
46 |
|
|
46 | <tr> | |
47 |
|
|
47 | <th>${_('Name')}</th> | |
48 |
|
|
48 | <th>${_('Size')}</th> | |
49 |
|
|
49 | <th>${_('Mimetype')}</th> | |
50 |
|
|
50 | <th>${_('Last Revision')}</th> | |
51 |
|
|
51 | <th>${_('Last modified')}</th> | |
52 |
|
|
52 | <th>${_('Last commiter')}</th> | |
53 |
|
|
53 | </tr> | |
54 |
|
|
54 | </thead> | |
55 |
|
55 | |||
56 | <tbody id="tbody"> |
|
56 | <tbody id="tbody"> | |
57 |
|
|
57 | %if c.file.parent: | |
58 |
|
|
58 | <tr class="parity0"> | |
59 |
|
|
59 | <td> | |
60 |
|
|
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 |
|
|
61 | </td> | |
62 |
|
|
62 | <td></td> | |
63 |
|
|
63 | <td></td> | |
64 |
|
|
64 | <td></td> | |
65 |
|
|
65 | <td></td> | |
66 |
|
|
66 | <td></td> | |
67 | </tr> |
|
67 | </tr> | |
68 |
|
|
68 | %endif | |
69 |
|
69 | |||
70 |
|
|
70 | %for cnt,node in enumerate(c.file): | |
71 |
|
|
71 | <tr class="parity${cnt%2}"> | |
72 |
|
|
72 | <td> | |
73 | %if node.is_submodule(): |
|
73 | %if node.is_submodule(): | |
74 | ${h.link_to(node.name,node.url or '#',class_="submodule-dir ypjax-link")} |
|
74 | ${h.link_to(node.name,node.url or '#',class_="submodule-dir ypjax-link")} | |
75 | %else: |
|
75 | %else: | |
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")} |
|
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 | %endif: |
|
77 | %endif: | |
78 |
|
|
78 | </td> | |
79 |
|
|
79 | <td> | |
80 |
|
|
80 | %if node.is_file(): | |
81 |
|
|
81 | ${h.format_byte_size(node.size,binary=True)} | |
82 |
|
|
82 | %endif | |
83 |
|
|
83 | </td> | |
84 |
|
|
84 | <td> | |
85 |
|
|
85 | %if node.is_file(): | |
86 |
|
|
86 | ${node.mimetype} | |
87 |
|
|
87 | %endif | |
88 |
|
|
88 | </td> | |
89 |
|
|
89 | <td> | |
90 |
|
|
90 | %if node.is_file(): | |
91 |
|
|
91 | <div class="tooltip" title="${h.tooltip(node.last_changeset.message)}"> | |
92 |
|
|
92 | <pre>${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</pre> | |
93 | </div> |
|
93 | </div> | |
94 |
|
|
94 | %endif | |
95 |
|
|
95 | </td> | |
96 |
|
|
96 | <td> | |
97 |
|
|
97 | %if node.is_file(): | |
98 |
|
|
98 | <span class="tooltip" title="${h.tooltip(h.fmt_date(node.last_changeset.date))}"> | |
99 | ${h.age(node.last_changeset.date)}</span> |
|
99 | ${h.age(node.last_changeset.date)}</span> | |
100 |
|
|
100 | %endif | |
101 |
|
|
101 | </td> | |
102 |
|
|
102 | <td> | |
103 |
|
|
103 | %if node.is_file(): | |
104 |
|
|
104 | <span title="${node.last_changeset.author}"> | |
105 | ${h.person(node.last_changeset.author)} |
|
105 | ${h.person(node.last_changeset.author)} | |
106 | </span> |
|
106 | </span> | |
107 |
|
|
107 | %endif | |
108 |
|
|
108 | </td> | |
109 | </tr> |
|
109 | </tr> | |
110 | %endfor |
|
110 | %endfor | |
111 | </tbody> |
|
111 | </tbody> | |
112 | <tbody id="tbody_filtered" style="display:none"> |
|
112 | <tbody id="tbody_filtered" style="display:none"> | |
113 | </tbody> |
|
113 | </tbody> | |
114 |
|
|
114 | </table> | |
115 |
|
|
115 | </div> | |
116 | </div> |
|
116 | </div> |
@@ -1,78 +1,78 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('%s Edit file') % c.repo_name} - ${c.rhodecode_name} |
|
4 | ${_('%s Edit file') % c.repo_name} - ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="js_extra()"> |
|
7 | <%def name="js_extra()"> | |
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="css_extra()"> |
|
10 | <%def name="css_extra()"> | |
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="breadcrumbs_links()"> |
|
14 | <%def name="breadcrumbs_links()"> | |
15 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
15 | ${h.link_to(_(u'Home'),h.url('/'))} | |
16 | » |
|
16 | » | |
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
18 | » |
|
18 | » | |
19 | ${_('edit file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} |
|
19 | ${_('edit file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="page_nav()"> |
|
22 | <%def name="page_nav()"> | |
23 |
|
|
23 | ${self.menu('files')} | |
24 | </%def> |
|
24 | </%def> | |
25 | <%def name="main()"> |
|
25 | <%def name="main()"> | |
26 | <div class="box"> |
|
26 | <div class="box"> | |
27 | <!-- box / title --> |
|
27 | <!-- box / title --> | |
28 | <div class="title"> |
|
28 | <div class="title"> | |
29 | ${self.breadcrumbs()} |
|
29 | ${self.breadcrumbs()} | |
30 | <ul class="links"> |
|
30 | <ul class="links"> | |
31 | <li> |
|
31 | <li> | |
32 | <span style="text-transform: uppercase;"> |
|
32 | <span style="text-transform: uppercase;"> | |
33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
33 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> | |
34 | </li> |
|
34 | </li> | |
35 | </ul> |
|
35 | </ul> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="table"> |
|
37 | <div class="table"> | |
38 |
|
|
38 | <div id="files_data"> | |
39 |
|
|
39 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> | |
40 |
|
|
40 | ${h.form(h.url.current(),method='post',id='eform')} | |
41 |
|
|
41 | <div id="body" class="codeblock"> | |
42 | <div class="code-header"> |
|
42 | <div class="code-header"> | |
43 | <div class="stats"> |
|
43 | <div class="stats"> | |
44 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> |
|
44 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> | |
45 | <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div> |
|
45 | <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div> | |
46 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> |
|
46 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> | |
47 | <div class="left item last">${c.file.mimetype}</div> |
|
47 | <div class="left item last">${c.file.mimetype}</div> | |
48 | <div class="buttons"> |
|
48 | <div class="buttons"> | |
49 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
49 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
50 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
50 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
51 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
51 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
52 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
52 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
53 | % if not c.file.is_binary: |
|
53 | % if not c.file.is_binary: | |
54 | ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
54 | ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |
55 | % endif |
|
55 | % endif | |
56 | % endif |
|
56 | % endif | |
57 | </div> |
|
57 | </div> | |
58 | </div> |
|
58 | </div> | |
59 | <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> |
|
59 | <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> | |
60 | </div> |
|
60 | </div> | |
61 |
|
|
61 | <pre id="editor_pre"></pre> | |
62 |
|
|
62 | <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea> | |
63 |
|
|
63 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> | |
64 |
|
|
64 | <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px"></textarea> | |
65 | </div> |
|
65 | </div> | |
66 |
|
|
66 | <div style="text-align: left;padding-top: 5px"> | |
67 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
67 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} | |
68 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
68 | ${h.reset('reset',_('Reset'),class_="ui-btn")} | |
69 | </div> |
|
69 | </div> | |
70 |
|
|
70 | ${h.end_form()} | |
71 |
|
|
71 | <script type="text/javascript"> | |
72 |
|
|
72 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}"; | |
73 |
|
|
73 | initCodeMirror('editor',reset_url); | |
74 | </script> |
|
74 | </script> | |
75 | </div> |
|
75 | </div> | |
76 | </div> |
|
76 | </div> | |
77 | </div> |
|
77 | </div> | |
78 | </%def> |
|
78 | </%def> |
@@ -1,104 +1,104 b'' | |||||
1 | <div id="node_history"> |
|
1 | <div id="node_history"> | |
2 | %if c.load_full_history: |
|
2 | %if c.load_full_history: | |
3 | <%include file='files_history_box.html'/> |
|
3 | <%include file='files_history_box.html'/> | |
4 | %else: |
|
4 | %else: | |
5 | <div style="padding-bottom:10px"> |
|
5 | <div style="padding-bottom:10px"> | |
6 | <span id="load_node_history" class="ui-btn">${_('Load file history')}</span> |
|
6 | <span id="load_node_history" class="ui-btn">${_('Load file history')}</span> | |
7 | </div> |
|
7 | </div> | |
8 | %endif |
|
8 | %endif | |
9 | </div> |
|
9 | </div> | |
10 |
|
10 | |||
11 |
|
11 | |||
12 | <div id="body" class="codeblock"> |
|
12 | <div id="body" class="codeblock"> | |
13 |
|
|
13 | <div class="code-header"> | |
14 | <div class="stats"> |
|
14 | <div class="stats"> | |
15 | <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div> |
|
15 | <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div> | |
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> |
|
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 | <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div> |
|
17 | <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div> | |
18 | <div class="left item last"><pre>${c.file.mimetype}</pre></div> |
|
18 | <div class="left item last"><pre>${c.file.mimetype}</pre></div> | |
19 | <div class="buttons"> |
|
19 | <div class="buttons"> | |
20 | %if c.annotate: |
|
20 | %if c.annotate: | |
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")} |
|
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 | %else: |
|
22 | %else: | |
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")} |
|
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 | %endif |
|
24 | %endif | |
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")} |
|
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 | ${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")} |
|
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 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
27 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
28 | % if not c.file.is_binary: |
|
28 | % if not c.file.is_binary: | |
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")} |
|
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 | % endif |
|
30 | % endif | |
31 | % endif |
|
31 | % endif | |
32 | </div> |
|
32 | </div> | |
33 | </div> |
|
33 | </div> | |
34 | <div class="author"> |
|
34 | <div class="author"> | |
35 | <div class="gravatar"> |
|
35 | <div class="gravatar"> | |
36 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.file_changeset.author),16)}"/> |
|
36 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.file_changeset.author),16)}"/> | |
37 | </div> |
|
37 | </div> | |
38 | <div title="${c.file_changeset.author}" class="user">${h.person(c.file_changeset.author)}</div> |
|
38 | <div title="${c.file_changeset.author}" class="user">${h.person(c.file_changeset.author)}</div> | |
39 | </div> |
|
39 | </div> | |
40 |
|
|
40 | <div class="commit">${h.urlify_commit(c.file_changeset.message,c.repo_name)}</div> | |
41 |
|
|
41 | </div> | |
42 |
|
|
42 | <div class="code-body"> | |
43 |
|
|
43 | %if c.file.is_binary: | |
44 |
|
|
44 | ${_('Binary file (%s)') % c.file.mimetype} | |
45 |
|
|
45 | %else: | |
46 |
|
|
46 | % if c.file.size < c.cut_off_limit: | |
47 | %if c.annotate: |
|
47 | %if c.annotate: | |
48 | ${h.pygmentize_annotation(c.repo_name,c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} |
|
48 | ${h.pygmentize_annotation(c.repo_name,c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
49 | %else: |
|
49 | %else: | |
50 |
|
|
50 | ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
51 | %endif |
|
51 | %endif | |
52 | %else: |
|
52 | %else: | |
53 |
|
|
53 | ${_('File is too big to display')} ${h.link_to(_('show as raw'), | |
54 |
|
|
54 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path))} | |
55 | %endif |
|
55 | %endif | |
56 | %endif |
|
56 | %endif | |
57 |
|
|
57 | </div> | |
58 | </div> |
|
58 | </div> | |
59 |
|
59 | |||
60 | <script type="text/javascript"> |
|
60 | <script type="text/javascript"> | |
61 | YUE.onDOMReady(function(){ |
|
61 | YUE.onDOMReady(function(){ | |
62 | function highlight_lines(lines){ |
|
62 | function highlight_lines(lines){ | |
63 | for(pos in lines){ |
|
63 | for(pos in lines){ | |
64 | YUD.setStyle('L'+lines[pos],'background-color','#FFFFBE'); |
|
64 | YUD.setStyle('L'+lines[pos],'background-color','#FFFFBE'); | |
65 | } |
|
65 | } | |
66 | } |
|
66 | } | |
67 | page_highlights = location.href.substring(location.href.indexOf('#')+1).split('L'); |
|
67 | page_highlights = location.href.substring(location.href.indexOf('#')+1).split('L'); | |
68 | if (page_highlights.length == 2){ |
|
68 | if (page_highlights.length == 2){ | |
69 | highlight_ranges = page_highlights[1].split(","); |
|
69 | highlight_ranges = page_highlights[1].split(","); | |
70 |
|
70 | |||
71 | var h_lines = []; |
|
71 | var h_lines = []; | |
72 | for (pos in highlight_ranges){ |
|
72 | for (pos in highlight_ranges){ | |
73 | var _range = highlight_ranges[pos].split('-'); |
|
73 | var _range = highlight_ranges[pos].split('-'); | |
74 | if(_range.length == 2){ |
|
74 | if(_range.length == 2){ | |
75 | var start = parseInt(_range[0]); |
|
75 | var start = parseInt(_range[0]); | |
76 | var end = parseInt(_range[1]); |
|
76 | var end = parseInt(_range[1]); | |
77 | if (start < end){ |
|
77 | if (start < end){ | |
78 | for(var i=start;i<=end;i++){ |
|
78 | for(var i=start;i<=end;i++){ | |
79 | h_lines.push(i); |
|
79 | h_lines.push(i); | |
80 | } |
|
80 | } | |
81 | } |
|
81 | } | |
82 | } |
|
82 | } | |
83 | else{ |
|
83 | else{ | |
84 | h_lines.push(parseInt(highlight_ranges[pos])); |
|
84 | h_lines.push(parseInt(highlight_ranges[pos])); | |
85 | } |
|
85 | } | |
86 | } |
|
86 | } | |
87 | highlight_lines(h_lines); |
|
87 | highlight_lines(h_lines); | |
88 |
|
88 | |||
89 | } |
|
89 | } | |
90 |
|
90 | |||
91 | // select code link event |
|
91 | // select code link event | |
92 | YUE.on('hlcode', 'mouseup', getSelectionLink); |
|
92 | YUE.on('hlcode', 'mouseup', getSelectionLink); | |
93 |
|
93 | |||
94 | //load history of file |
|
94 | //load history of file | |
95 | YUE.on('load_node_history', 'click', function(e){ |
|
95 | YUE.on('load_node_history', 'click', function(e){ | |
96 | var _url = node_history_url.replace('__REV__','${c.file_changeset.raw_id}').replace('__FPATH__', '${c.f_path}'); |
|
96 | var _url = node_history_url.replace('__REV__','${c.file_changeset.raw_id}').replace('__FPATH__', '${c.f_path}'); | |
97 | ypjax(_url, 'node_history', function(o){ |
|
97 | ypjax(_url, 'node_history', function(o){ | |
98 |
|
|
98 | tooltip_activate(); | |
99 | }) |
|
99 | }) | |
100 | }); |
|
100 | }); | |
101 |
|
101 | |||
102 | }); |
|
102 | }); | |
103 |
|
103 | |||
104 | </script> |
|
104 | </script> |
@@ -1,32 +1,32 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | % for f in c.followers_pager: |
|
3 | % for f in c.followers_pager: | |
4 | <div> |
|
4 | <div> | |
5 | <div class="follower_user"> |
|
5 | <div class="follower_user"> | |
6 | <div class="gravatar"> |
|
6 | <div class="gravatar"> | |
7 | <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/> |
|
7 | <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/> | |
8 | </div> |
|
8 | </div> | |
9 | <span style="font-size: 20px"> <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname})</span> |
|
9 | <span style="font-size: 20px"> <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname})</span> | |
10 | </div> |
|
10 | </div> | |
11 | <div style="clear:both;padding-top: 10px"></div> |
|
11 | <div style="clear:both;padding-top: 10px"></div> | |
12 | <div class="follower_date">${_('Started following -')} |
|
12 | <div class="follower_date">${_('Started following -')} | |
13 | <span class="tooltip" title="${h.tooltip(f.follows_from)}"> ${h.age(f.follows_from)}</span></div> |
|
13 | <span class="tooltip" title="${h.tooltip(f.follows_from)}"> ${h.age(f.follows_from)}</span></div> | |
14 | <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div> |
|
14 | <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div> | |
15 | </div> |
|
15 | </div> | |
16 | % endfor |
|
16 | % endfor | |
17 |
|
17 | |||
18 | <div class="pagination-wh pagination-left"> |
|
18 | <div class="pagination-wh pagination-left"> | |
19 | <script type="text/javascript"> |
|
19 | <script type="text/javascript"> | |
20 | YUE.onDOMReady(function(){ |
|
20 | YUE.onDOMReady(function(){ | |
21 | YUE.delegate("followers","click",function(e, matchedEl, container){ |
|
21 | YUE.delegate("followers","click",function(e, matchedEl, container){ | |
22 | ypjax(e.target.href,"followers",function(){ |
|
22 | ypjax(e.target.href,"followers",function(){ | |
23 |
|
|
23 | show_more_event(); | |
24 |
|
|
24 | tooltip_activate(); | |
25 |
|
|
25 | show_changeset_tooltip(); | |
26 | }); |
|
26 | }); | |
27 | YUE.preventDefault(e); |
|
27 | YUE.preventDefault(e); | |
28 | },'.pager_link'); |
|
28 | },'.pager_link'); | |
29 | }); |
|
29 | }); | |
30 | </script> |
|
30 | </script> | |
31 | ${c.followers_pager.pager('$link_previous ~2~ $link_next')} |
|
31 | ${c.followers_pager.pager('$link_previous ~2~ $link_next')} | |
32 | </div> |
|
32 | </div> |
@@ -1,100 +1,100 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Fork') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Fork') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} |
|
11 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} | |
12 | » |
|
12 | » | |
13 | ${_('fork')} |
|
13 | ${_('fork')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 |
|
|
17 | ${self.menu('')} | |
18 | </%def> |
|
18 | </%def> | |
19 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
24 | </div> |
|
24 | </div> | |
25 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} |
|
25 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} | |
26 | <div class="form"> |
|
26 | <div class="form"> | |
27 | <!-- fields --> |
|
27 | <!-- fields --> | |
28 | <div class="fields"> |
|
28 | <div class="fields"> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="label"> |
|
30 | <div class="label"> | |
31 | <label for="repo_name">${_('Fork name')}:</label> |
|
31 | <label for="repo_name">${_('Fork name')}:</label> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="input"> |
|
33 | <div class="input"> | |
34 | ${h.text('repo_name',class_="small")} |
|
34 | ${h.text('repo_name',class_="small")} | |
35 | ${h.hidden('repo_type',c.repo_info.repo_type)} |
|
35 | ${h.hidden('repo_type',c.repo_info.repo_type)} | |
36 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} |
|
36 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 | <div class="field"> |
|
39 | <div class="field"> | |
40 | <div class="label"> |
|
40 | <div class="label"> | |
41 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
41 | <label for="landing_rev">${_('Landing revision')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 | <div class="input"> |
|
43 | <div class="input"> | |
44 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} |
|
44 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} | |
45 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
45 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
46 | </div> |
|
46 | </div> | |
47 | </div> |
|
47 | </div> | |
48 | <div class="field"> |
|
48 | <div class="field"> | |
49 | <div class="label"> |
|
49 | <div class="label"> | |
50 | <label for="repo_group">${_('Repository group')}:</label> |
|
50 | <label for="repo_group">${_('Repository group')}:</label> | |
51 | </div> |
|
51 | </div> | |
52 | <div class="input"> |
|
52 | <div class="input"> | |
53 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
53 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
54 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> |
|
54 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> | |
55 | </div> |
|
55 | </div> | |
56 | </div> |
|
56 | </div> | |
57 | <div class="field"> |
|
57 | <div class="field"> | |
58 | <div class="label label-textarea"> |
|
58 | <div class="label label-textarea"> | |
59 | <label for="description">${_('Description')}:</label> |
|
59 | <label for="description">${_('Description')}:</label> | |
60 | </div> |
|
60 | </div> | |
61 | <div class="textarea text-area editor"> |
|
61 | <div class="textarea text-area editor"> | |
62 | ${h.textarea('description',cols=23,rows=5)} |
|
62 | ${h.textarea('description',cols=23,rows=5)} | |
63 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
63 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
64 | </div> |
|
64 | </div> | |
65 | </div> |
|
65 | </div> | |
66 | <div class="field"> |
|
66 | <div class="field"> | |
67 | <div class="label label-checkbox"> |
|
67 | <div class="label label-checkbox"> | |
68 | <label for="private">${_('Private')}:</label> |
|
68 | <label for="private">${_('Private')}:</label> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="checkboxes"> |
|
70 | <div class="checkboxes"> | |
71 | ${h.checkbox('private',value="True")} |
|
71 | ${h.checkbox('private',value="True")} | |
72 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
72 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
73 | </div> |
|
73 | </div> | |
74 | </div> |
|
74 | </div> | |
75 | <div class="field"> |
|
75 | <div class="field"> | |
76 | <div class="label label-checkbox"> |
|
76 | <div class="label label-checkbox"> | |
77 | <label for="private">${_('Copy permissions')}:</label> |
|
77 | <label for="private">${_('Copy permissions')}:</label> | |
78 | </div> |
|
78 | </div> | |
79 | <div class="checkboxes"> |
|
79 | <div class="checkboxes"> | |
80 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
80 | ${h.checkbox('copy_permissions',value="True", checked="checked")} | |
81 | <span class="help-block">${_('Copy permissions from forked repository')}</span> |
|
81 | <span class="help-block">${_('Copy permissions from forked repository')}</span> | |
82 | </div> |
|
82 | </div> | |
83 | </div> |
|
83 | </div> | |
84 | <div class="field"> |
|
84 | <div class="field"> | |
85 | <div class="label label-checkbox"> |
|
85 | <div class="label label-checkbox"> | |
86 | <label for="private">${_('Update after clone')}:</label> |
|
86 | <label for="private">${_('Update after clone')}:</label> | |
87 | </div> |
|
87 | </div> | |
88 | <div class="checkboxes"> |
|
88 | <div class="checkboxes"> | |
89 | ${h.checkbox('update_after_clone',value="True")} |
|
89 | ${h.checkbox('update_after_clone',value="True")} | |
90 | <span class="help-block">${_('Checkout source after making a clone')}</span> |
|
90 | <span class="help-block">${_('Checkout source after making a clone')}</span> | |
91 | </div> |
|
91 | </div> | |
92 | </div> |
|
92 | </div> | |
93 |
|
|
93 | <div class="buttons"> | |
94 |
|
|
94 | ${h.submit('',_('fork this repository'),class_="ui-btn large")} | |
95 |
|
|
95 | </div> | |
96 | </div> |
|
96 | </div> | |
97 | </div> |
|
97 | </div> | |
98 | ${h.end_form()} |
|
98 | ${h.end_form()} | |
99 | </div> |
|
99 | </div> | |
100 | </%def> |
|
100 | </%def> |
@@ -1,43 +1,43 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | % if c.forks_pager: |
|
3 | % if c.forks_pager: | |
4 |
|
|
4 | % for f in c.forks_pager: | |
5 |
|
|
5 | <div> | |
6 |
|
|
6 | <div class="fork_user"> | |
7 |
|
|
7 | <div class="gravatar"> | |
8 |
|
|
8 | <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/> | |
9 |
|
|
9 | </div> | |
10 |
|
|
10 | <span style="font-size: 20px"> | |
11 |
|
|
11 | <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname}) / | |
12 |
|
|
12 | ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))} | |
13 |
|
|
13 | </span> | |
14 |
|
|
14 | <div style="padding:5px 3px 3px 42px;">${f.description}</div> | |
15 |
|
|
15 | </div> | |
16 |
|
|
16 | <div style="clear:both;padding-top: 10px"></div> | |
17 |
|
|
17 | <div class="follower_date">${_('forked')} - | |
18 |
|
|
18 | <span class="tooltip" title="${h.tooltip(h.fmt_date(f.created_on))}"> ${h.age(f.created_on)}</span> | |
19 | <a title="${_('compare fork with %s' % c.repo_name)}" |
|
19 | <a title="${_('compare fork with %s' % c.repo_name)}" | |
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)}" |
|
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 | class="ui-btn small">${_('Compare fork')}</a> |
|
21 | class="ui-btn small">${_('Compare fork')}</a> | |
22 | </div> |
|
22 | </div> | |
23 |
|
|
23 | <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div> | |
24 |
|
|
24 | </div> | |
25 |
|
|
25 | % endfor | |
26 | <div class="pagination-wh pagination-left"> |
|
26 | <div class="pagination-wh pagination-left"> | |
27 | <script type="text/javascript"> |
|
27 | <script type="text/javascript"> | |
28 | YUE.onDOMReady(function(){ |
|
28 | YUE.onDOMReady(function(){ | |
29 | YUE.delegate("forks","click",function(e, matchedEl, container){ |
|
29 | YUE.delegate("forks","click",function(e, matchedEl, container){ | |
30 | ypjax(e.target.href,"forks",function(){ |
|
30 | ypjax(e.target.href,"forks",function(){ | |
31 |
|
|
31 | show_more_event(); | |
32 |
|
|
32 | tooltip_activate(); | |
33 |
|
|
33 | show_changeset_tooltip(); | |
34 | }); |
|
34 | }); | |
35 | YUE.preventDefault(e); |
|
35 | YUE.preventDefault(e); | |
36 | },'.pager_link'); |
|
36 | },'.pager_link'); | |
37 | }); |
|
37 | }); | |
38 | </script> |
|
38 | </script> | |
39 | ${c.forks_pager.pager('$link_previous ~2~ $link_next')} |
|
39 | ${c.forks_pager.pager('$link_previous ~2~ $link_next')} | |
40 | </div> |
|
40 | </div> | |
41 | % else: |
|
41 | % else: | |
42 |
|
|
42 | ${_('There are no forks yet')} | |
43 | % endif |
|
43 | % endif |
@@ -1,337 +1,337 b'' | |||||
1 | <%page args="parent" /> |
|
1 | <%page args="parent" /> | |
2 | <div class="box"> |
|
2 | <div class="box"> | |
3 | <!-- box / title --> |
|
3 | <!-- box / title --> | |
4 | <div class="title"> |
|
4 | <div class="title"> | |
5 | <h5> |
|
5 | <h5> | |
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')} |
|
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 | </h5> |
|
7 | </h5> | |
8 | %if c.rhodecode_user.username != 'default': |
|
8 | %if c.rhodecode_user.username != 'default': | |
9 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
9 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
10 | <ul class="links"> |
|
10 | <ul class="links"> | |
11 | <li> |
|
11 | <li> | |
12 | %if c.group: |
|
12 | %if c.group: | |
13 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span> |
|
13 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span> | |
14 | %else: |
|
14 | %else: | |
15 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
|
15 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> | |
16 | %endif |
|
16 | %endif | |
17 | </li> |
|
17 | </li> | |
18 | </ul> |
|
18 | </ul> | |
19 | %endif |
|
19 | %endif | |
20 | %endif |
|
20 | %endif | |
21 | </div> |
|
21 | </div> | |
22 | <!-- end box / title --> |
|
22 | <!-- end box / title --> | |
23 | <div class="table"> |
|
23 | <div class="table"> | |
24 | % if c.groups: |
|
24 | % if c.groups: | |
25 | <div id='groups_list_wrap' class="yui-skin-sam"> |
|
25 | <div id='groups_list_wrap' class="yui-skin-sam"> | |
26 | <table id="groups_list"> |
|
26 | <table id="groups_list"> | |
27 | <thead> |
|
27 | <thead> | |
28 | <tr> |
|
28 | <tr> | |
29 | <th class="left"><a href="#">${_('Group name')}</a></th> |
|
29 | <th class="left"><a href="#">${_('Group name')}</a></th> | |
30 | <th class="left"><a href="#">${_('Description')}</a></th> |
|
30 | <th class="left"><a href="#">${_('Description')}</a></th> | |
31 | ##<th class="left"><a href="#">${_('Number of repositories')}</a></th> |
|
31 | ##<th class="left"><a href="#">${_('Number of repositories')}</a></th> | |
32 | </tr> |
|
32 | </tr> | |
33 | </thead> |
|
33 | </thead> | |
34 |
|
34 | |||
35 | ## REPO GROUPS |
|
35 | ## REPO GROUPS | |
36 | % for gr in c.groups: |
|
36 | % for gr in c.groups: | |
37 | <tr> |
|
37 | <tr> | |
38 | <td> |
|
38 | <td> | |
39 | <div style="white-space: nowrap"> |
|
39 | <div style="white-space: nowrap"> | |
40 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> |
|
40 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> | |
41 | ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))} |
|
41 | ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))} | |
42 | </div> |
|
42 | </div> | |
43 | </td> |
|
43 | </td> | |
44 | %if c.visual.stylify_metatags: |
|
44 | %if c.visual.stylify_metatags: | |
45 | <td>${h.urlify_text(h.desc_stylize(gr.group_description))}</td> |
|
45 | <td>${h.urlify_text(h.desc_stylize(gr.group_description))}</td> | |
46 | %else: |
|
46 | %else: | |
47 | <td>${gr.group_description}</td> |
|
47 | <td>${gr.group_description}</td> | |
48 | %endif |
|
48 | %endif | |
49 | ## this is commented out since for multi nested repos can be HEAVY! |
|
49 | ## this is commented out since for multi nested repos can be HEAVY! | |
50 | ## in number of executed queries during traversing uncomment at will |
|
50 | ## in number of executed queries during traversing uncomment at will | |
51 | ##<td><b>${gr.repositories_recursive_count}</b></td> |
|
51 | ##<td><b>${gr.repositories_recursive_count}</b></td> | |
52 | </tr> |
|
52 | </tr> | |
53 | % endfor |
|
53 | % endfor | |
54 | </table> |
|
54 | </table> | |
55 | </div> |
|
55 | </div> | |
56 | <div id="group-user-paginator" style="padding: 0px 0px 0px 0px"></div> |
|
56 | <div id="group-user-paginator" style="padding: 0px 0px 0px 0px"></div> | |
57 | <div style="height: 20px"></div> |
|
57 | <div style="height: 20px"></div> | |
58 | % endif |
|
58 | % endif | |
59 | <div id="welcome" style="display:none;text-align:center"> |
|
59 | <div id="welcome" style="display:none;text-align:center"> | |
60 | <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1> |
|
60 | <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1> | |
61 | </div> |
|
61 | </div> | |
62 | <%cnt=0%> |
|
62 | <%cnt=0%> | |
63 | <%namespace name="dt" file="/data_table/_dt_elements.html"/> |
|
63 | <%namespace name="dt" file="/data_table/_dt_elements.html"/> | |
64 | % if c.visual.lightweight_dashboard is False: |
|
64 | % if c.visual.lightweight_dashboard is False: | |
65 | ## old full detailed version |
|
65 | ## old full detailed version | |
66 | <div id='repos_list_wrap' class="yui-skin-sam"> |
|
66 | <div id='repos_list_wrap' class="yui-skin-sam"> | |
67 | <table id="repos_list"> |
|
67 | <table id="repos_list"> | |
68 | <thead> |
|
68 | <thead> | |
69 | <tr> |
|
69 | <tr> | |
70 | <th class="left"></th> |
|
70 | <th class="left"></th> | |
71 | <th class="left">${_('Name')}</th> |
|
71 | <th class="left">${_('Name')}</th> | |
72 | <th class="left">${_('Description')}</th> |
|
72 | <th class="left">${_('Description')}</th> | |
73 | <th class="left">${_('Last change')}</th> |
|
73 | <th class="left">${_('Last change')}</th> | |
74 | <th class="left">${_('Tip')}</th> |
|
74 | <th class="left">${_('Tip')}</th> | |
75 | <th class="left">${_('Owner')}</th> |
|
75 | <th class="left">${_('Owner')}</th> | |
76 | <th class="left">${_('RSS')}</th> |
|
76 | <th class="left">${_('RSS')}</th> | |
77 | <th class="left">${_('Atom')}</th> |
|
77 | <th class="left">${_('Atom')}</th> | |
78 | </tr> |
|
78 | </tr> | |
79 | </thead> |
|
79 | </thead> | |
80 | <tbody> |
|
80 | <tbody> | |
81 | %for cnt,repo in enumerate(c.repos_list): |
|
81 | %for cnt,repo in enumerate(c.repos_list): | |
82 | <tr class="parity${(cnt+1)%2}"> |
|
82 | <tr class="parity${(cnt+1)%2}"> | |
83 | ##QUICK MENU |
|
83 | ##QUICK MENU | |
84 | <td class="quick_repo_menu"> |
|
84 | <td class="quick_repo_menu"> | |
85 | ${dt.quick_menu(repo['name'])} |
|
85 | ${dt.quick_menu(repo['name'])} | |
86 | </td> |
|
86 | </td> | |
87 | ##REPO NAME AND ICONS |
|
87 | ##REPO NAME AND ICONS | |
88 | <td class="reponame"> |
|
88 | <td class="reponame"> | |
89 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],h.AttributeDict(repo['dbrepo_fork']),pageargs.get('short_repo_names'))} |
|
89 | ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],h.AttributeDict(repo['dbrepo_fork']),pageargs.get('short_repo_names'))} | |
90 | </td> |
|
90 | </td> | |
91 | ##DESCRIPTION |
|
91 | ##DESCRIPTION | |
92 | <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> |
|
92 | <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> | |
93 | %if c.visual.stylify_metatags: |
|
93 | %if c.visual.stylify_metatags: | |
94 | ${h.urlify_text(h.desc_stylize(h.truncate(repo['description'],60)))}</span> |
|
94 | ${h.urlify_text(h.desc_stylize(h.truncate(repo['description'],60)))}</span> | |
95 | %else: |
|
95 | %else: | |
96 | ${h.truncate(repo['description'],60)}</span> |
|
96 | ${h.truncate(repo['description'],60)}</span> | |
97 | %endif |
|
97 | %endif | |
98 | </td> |
|
98 | </td> | |
99 | ##LAST CHANGE DATE |
|
99 | ##LAST CHANGE DATE | |
100 | <td> |
|
100 | <td> | |
101 | ${dt.last_change(repo['last_change'])} |
|
101 | ${dt.last_change(repo['last_change'])} | |
102 | </td> |
|
102 | </td> | |
103 | ##LAST REVISION |
|
103 | ##LAST REVISION | |
104 | <td> |
|
104 | <td> | |
105 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} |
|
105 | ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} | |
106 | </td> |
|
106 | </td> | |
107 | ## |
|
107 | ## | |
108 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> |
|
108 | <td title="${repo['contact']}">${h.person(repo['contact'])}</td> | |
109 | <td> |
|
109 | <td> | |
110 | ${dt.rss(repo['name'])} |
|
110 | ${dt.rss(repo['name'])} | |
111 | </td> |
|
111 | </td> | |
112 | <td> |
|
112 | <td> | |
113 | ${dt.atom(repo['name'])} |
|
113 | ${dt.atom(repo['name'])} | |
114 | </td> |
|
114 | </td> | |
115 | </tr> |
|
115 | </tr> | |
116 | %endfor |
|
116 | %endfor | |
117 | </tbody> |
|
117 | </tbody> | |
118 | </table> |
|
118 | </table> | |
119 | </div> |
|
119 | </div> | |
120 | % else: |
|
120 | % else: | |
121 | ## lightweight version |
|
121 | ## lightweight version | |
122 | <div class="yui-skin-sam" id="repos_list_wrap"></div> |
|
122 | <div class="yui-skin-sam" id="repos_list_wrap"></div> | |
123 | <div id="user-paginator" style="padding: 0px 0px 0px 0px"></div> |
|
123 | <div id="user-paginator" style="padding: 0px 0px 0px 0px"></div> | |
124 | % endif |
|
124 | % endif | |
125 | </div> |
|
125 | </div> | |
126 | </div> |
|
126 | </div> | |
127 | % if c.visual.lightweight_dashboard is False: |
|
127 | % if c.visual.lightweight_dashboard is False: | |
128 | <script> |
|
128 | <script> | |
129 | YUD.get('repo_count').innerHTML = ${cnt+1 if cnt else 0}; |
|
129 | YUD.get('repo_count').innerHTML = ${cnt+1 if cnt else 0}; | |
130 |
|
130 | |||
131 | // groups table sorting |
|
131 | // groups table sorting | |
132 | var myColumnDefs = [ |
|
132 | var myColumnDefs = [ | |
133 | {key:"name",label:"${_('Group name')}",sortable:true, |
|
133 | {key:"name",label:"${_('Group name')}",sortable:true, | |
134 | sortOptions: { sortFunction: groupNameSort }}, |
|
134 | sortOptions: { sortFunction: groupNameSort }}, | |
135 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
135 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
136 | ]; |
|
136 | ]; | |
137 |
|
137 | |||
138 | var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list")); |
|
138 | var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list")); | |
139 |
|
139 | |||
140 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
140 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
141 | myDataSource.responseSchema = { |
|
141 | myDataSource.responseSchema = { | |
142 | fields: [ |
|
142 | fields: [ | |
143 | {key:"name"}, |
|
143 | {key:"name"}, | |
144 | {key:"desc"}, |
|
144 | {key:"desc"}, | |
145 | ] |
|
145 | ] | |
146 | }; |
|
146 | }; | |
147 |
|
147 | |||
148 | var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource,{ |
|
148 | var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource,{ | |
149 | sortedBy:{key:"name",dir:"asc"}, |
|
149 | sortedBy:{key:"name",dir:"asc"}, | |
150 | paginator: new YAHOO.widget.Paginator({ |
|
150 | paginator: new YAHOO.widget.Paginator({ | |
151 | rowsPerPage: 50, |
|
151 | rowsPerPage: 50, | |
152 | alwaysVisible: false, |
|
152 | alwaysVisible: false, | |
153 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
153 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
154 | pageLinks: 5, |
|
154 | pageLinks: 5, | |
155 | containerClass: 'pagination-wh', |
|
155 | containerClass: 'pagination-wh', | |
156 | currentPageClass: 'pager_curpage', |
|
156 | currentPageClass: 'pager_curpage', | |
157 | pageLinkClass: 'pager_link', |
|
157 | pageLinkClass: 'pager_link', | |
158 | nextPageLinkLabel: '>', |
|
158 | nextPageLinkLabel: '>', | |
159 | previousPageLinkLabel: '<', |
|
159 | previousPageLinkLabel: '<', | |
160 | firstPageLinkLabel: '<<', |
|
160 | firstPageLinkLabel: '<<', | |
161 | lastPageLinkLabel: '>>', |
|
161 | lastPageLinkLabel: '>>', | |
162 | containers:['group-user-paginator'] |
|
162 | containers:['group-user-paginator'] | |
163 | }), |
|
163 | }), | |
164 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
164 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
165 | MSG_SORTDESC:"${_('Click to sort descending')}" |
|
165 | MSG_SORTDESC:"${_('Click to sort descending')}" | |
166 | }); |
|
166 | }); | |
167 |
|
167 | |||
168 | // main table sorting |
|
168 | // main table sorting | |
169 | var myColumnDefs = [ |
|
169 | var myColumnDefs = [ | |
170 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
170 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
171 | {key:"name",label:"${_('Name')}",sortable:true, |
|
171 | {key:"name",label:"${_('Name')}",sortable:true, | |
172 | sortOptions: { sortFunction: nameSort }}, |
|
172 | sortOptions: { sortFunction: nameSort }}, | |
173 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
173 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
174 | {key:"last_change",label:"${_('Last Change')}",sortable:true, |
|
174 | {key:"last_change",label:"${_('Last Change')}",sortable:true, | |
175 | sortOptions: { sortFunction: ageSort }}, |
|
175 | sortOptions: { sortFunction: ageSort }}, | |
176 | {key:"tip",label:"${_('Tip')}",sortable:true, |
|
176 | {key:"tip",label:"${_('Tip')}",sortable:true, | |
177 |
|
|
177 | sortOptions: { sortFunction: revisionSort }}, | |
178 | {key:"owner",label:"${_('Owner')}",sortable:true}, |
|
178 | {key:"owner",label:"${_('Owner')}",sortable:true}, | |
179 | {key:"rss",label:"",sortable:false}, |
|
179 | {key:"rss",label:"",sortable:false}, | |
180 | {key:"atom",label:"",sortable:false}, |
|
180 | {key:"atom",label:"",sortable:false}, | |
181 | ]; |
|
181 | ]; | |
182 |
|
182 | |||
183 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); |
|
183 | var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); | |
184 |
|
184 | |||
185 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
185 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
186 |
|
186 | |||
187 | myDataSource.responseSchema = { |
|
187 | myDataSource.responseSchema = { | |
188 | fields: [ |
|
188 | fields: [ | |
189 | {key:"menu"}, |
|
189 | {key:"menu"}, | |
190 | //{key:"raw_name"}, |
|
190 | //{key:"raw_name"}, | |
191 | {key:"name"}, |
|
191 | {key:"name"}, | |
192 | {key:"desc"}, |
|
192 | {key:"desc"}, | |
193 | {key:"last_change"}, |
|
193 | {key:"last_change"}, | |
194 | {key:"tip"}, |
|
194 | {key:"tip"}, | |
195 | {key:"owner"}, |
|
195 | {key:"owner"}, | |
196 | {key:"rss"}, |
|
196 | {key:"rss"}, | |
197 | {key:"atom"}, |
|
197 | {key:"atom"}, | |
198 | ] |
|
198 | ] | |
199 | }; |
|
199 | }; | |
200 |
|
200 | |||
201 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, |
|
201 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, | |
202 | { |
|
202 | { | |
203 |
|
|
203 | sortedBy:{key:"name",dir:"asc"}, | |
204 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
204 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
205 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
205 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
206 | MSG_EMPTY:"${_('No records found.')}", |
|
206 | MSG_EMPTY:"${_('No records found.')}", | |
207 | MSG_ERROR:"${_('Data error.')}", |
|
207 | MSG_ERROR:"${_('Data error.')}", | |
208 | MSG_LOADING:"${_('Loading...')}", |
|
208 | MSG_LOADING:"${_('Loading...')}", | |
209 | } |
|
209 | } | |
210 | ); |
|
210 | ); | |
211 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
211 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
212 | tooltip_activate(); |
|
212 | tooltip_activate(); | |
213 | quick_repo_menu(); |
|
213 | quick_repo_menu(); | |
214 | var func = function(node){ |
|
214 | var func = function(node){ | |
215 | return node.parentNode.parentNode.parentNode.parentNode; |
|
215 | return node.parentNode.parentNode.parentNode.parentNode; | |
216 | } |
|
216 | } | |
217 | q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func); |
|
217 | q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func); | |
218 | }); |
|
218 | }); | |
219 |
|
219 | |||
220 | </script> |
|
220 | </script> | |
221 | % else: |
|
221 | % else: | |
222 | <script> |
|
222 | <script> | |
223 | var data = ${c.data|n}; |
|
223 | var data = ${c.data|n}; | |
224 | var myDataSource = new YAHOO.util.DataSource(data); |
|
224 | var myDataSource = new YAHOO.util.DataSource(data); | |
225 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
225 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
226 |
|
226 | |||
227 | myDataSource.responseSchema = { |
|
227 | myDataSource.responseSchema = { | |
228 | resultsList: "records", |
|
228 | resultsList: "records", | |
229 | fields: [ |
|
229 | fields: [ | |
230 | {key:"menu"}, |
|
230 | {key:"menu"}, | |
231 | {key:"raw_name"}, |
|
231 | {key:"raw_name"}, | |
232 | {key:"name"}, |
|
232 | {key:"name"}, | |
233 | {key:"desc"}, |
|
233 | {key:"desc"}, | |
234 | {key:"last_change"}, |
|
234 | {key:"last_change"}, | |
235 | {key:"last_changeset"}, |
|
235 | {key:"last_changeset"}, | |
236 | {key:"owner"}, |
|
236 | {key:"owner"}, | |
237 | {key:"rss"}, |
|
237 | {key:"rss"}, | |
238 | {key:"atom"}, |
|
238 | {key:"atom"}, | |
239 | ] |
|
239 | ] | |
240 | }; |
|
240 | }; | |
241 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
241 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
242 | // This is the filter function |
|
242 | // This is the filter function | |
243 | var data = res.results || [], |
|
243 | var data = res.results || [], | |
244 | filtered = [], |
|
244 | filtered = [], | |
245 | i,l; |
|
245 | i,l; | |
246 |
|
246 | |||
247 | if (req) { |
|
247 | if (req) { | |
248 | req = req.toLowerCase(); |
|
248 | req = req.toLowerCase(); | |
249 | for (i = 0; i<data.length; i++) { |
|
249 | for (i = 0; i<data.length; i++) { | |
250 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
250 | var pos = data[i].raw_name.toLowerCase().indexOf(req) | |
251 | if (pos != -1) { |
|
251 | if (pos != -1) { | |
252 | filtered.push(data[i]); |
|
252 | filtered.push(data[i]); | |
253 | } |
|
253 | } | |
254 | } |
|
254 | } | |
255 | res.results = filtered; |
|
255 | res.results = filtered; | |
256 | } |
|
256 | } | |
257 | YUD.get('repo_count').innerHTML = res.results.length; |
|
257 | YUD.get('repo_count').innerHTML = res.results.length; | |
258 | return res; |
|
258 | return res; | |
259 | } |
|
259 | } | |
260 |
|
260 | |||
261 | // main table sorting |
|
261 | // main table sorting | |
262 | var myColumnDefs = [ |
|
262 | var myColumnDefs = [ | |
263 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
263 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
264 | {key:"name",label:"${_('Name')}",sortable:true, |
|
264 | {key:"name",label:"${_('Name')}",sortable:true, | |
265 | sortOptions: { sortFunction: nameSort }}, |
|
265 | sortOptions: { sortFunction: nameSort }}, | |
266 | {key:"desc",label:"${_('Description')}",sortable:true}, |
|
266 | {key:"desc",label:"${_('Description')}",sortable:true}, | |
267 | {key:"last_change",label:"${_('Last Change')}",sortable:true, |
|
267 | {key:"last_change",label:"${_('Last Change')}",sortable:true, | |
268 | sortOptions: { sortFunction: ageSort }}, |
|
268 | sortOptions: { sortFunction: ageSort }}, | |
269 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
269 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, | |
270 | sortOptions: { sortFunction: revisionSort }}, |
|
270 | sortOptions: { sortFunction: revisionSort }}, | |
271 | {key:"owner",label:"${_('Owner')}",sortable:true}, |
|
271 | {key:"owner",label:"${_('Owner')}",sortable:true}, | |
272 | {key:"rss",label:"",sortable:false}, |
|
272 | {key:"rss",label:"",sortable:false}, | |
273 | {key:"atom",label:"",sortable:false}, |
|
273 | {key:"atom",label:"",sortable:false}, | |
274 | ]; |
|
274 | ]; | |
275 |
|
275 | |||
276 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
|
276 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ | |
277 | sortedBy:{key:"name",dir:"asc"}, |
|
277 | sortedBy:{key:"name",dir:"asc"}, | |
278 | paginator: new YAHOO.widget.Paginator({ |
|
278 | paginator: new YAHOO.widget.Paginator({ | |
279 | rowsPerPage: ${c.visual.lightweight_dashboard_items}, |
|
279 | rowsPerPage: ${c.visual.lightweight_dashboard_items}, | |
280 | alwaysVisible: false, |
|
280 | alwaysVisible: false, | |
281 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
281 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
282 | pageLinks: 5, |
|
282 | pageLinks: 5, | |
283 | containerClass: 'pagination-wh', |
|
283 | containerClass: 'pagination-wh', | |
284 | currentPageClass: 'pager_curpage', |
|
284 | currentPageClass: 'pager_curpage', | |
285 | pageLinkClass: 'pager_link', |
|
285 | pageLinkClass: 'pager_link', | |
286 | nextPageLinkLabel: '>', |
|
286 | nextPageLinkLabel: '>', | |
287 | previousPageLinkLabel: '<', |
|
287 | previousPageLinkLabel: '<', | |
288 | firstPageLinkLabel: '<<', |
|
288 | firstPageLinkLabel: '<<', | |
289 | lastPageLinkLabel: '>>', |
|
289 | lastPageLinkLabel: '>>', | |
290 | containers:['user-paginator'] |
|
290 | containers:['user-paginator'] | |
291 | }), |
|
291 | }), | |
292 |
|
292 | |||
293 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
293 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
294 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
294 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
295 | MSG_EMPTY:"${_('No records found.')}", |
|
295 | MSG_EMPTY:"${_('No records found.')}", | |
296 | MSG_ERROR:"${_('Data error.')}", |
|
296 | MSG_ERROR:"${_('Data error.')}", | |
297 | MSG_LOADING:"${_('Loading...')}", |
|
297 | MSG_LOADING:"${_('Loading...')}", | |
298 | } |
|
298 | } | |
299 | ); |
|
299 | ); | |
300 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
300 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
301 | tooltip_activate(); |
|
301 | tooltip_activate(); | |
302 | quick_repo_menu(); |
|
302 | quick_repo_menu(); | |
303 | }); |
|
303 | }); | |
304 |
|
304 | |||
305 | var filterTimeout = null; |
|
305 | var filterTimeout = null; | |
306 |
|
306 | |||
307 | updateFilter = function () { |
|
307 | updateFilter = function () { | |
308 | // Reset timeout |
|
308 | // Reset timeout | |
309 | filterTimeout = null; |
|
309 | filterTimeout = null; | |
310 |
|
310 | |||
311 | // Reset sort |
|
311 | // Reset sort | |
312 | var state = myDataTable.getState(); |
|
312 | var state = myDataTable.getState(); | |
313 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
313 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
314 |
|
314 | |||
315 | // Get filtered data |
|
315 | // Get filtered data | |
316 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
316 | myDataSource.sendRequest(YUD.get('q_filter').value,{ | |
317 | success : myDataTable.onDataReturnInitializeTable, |
|
317 | success : myDataTable.onDataReturnInitializeTable, | |
318 | failure : myDataTable.onDataReturnInitializeTable, |
|
318 | failure : myDataTable.onDataReturnInitializeTable, | |
319 | scope : myDataTable, |
|
319 | scope : myDataTable, | |
320 | argument: state |
|
320 | argument: state | |
321 | }); |
|
321 | }); | |
322 |
|
322 | |||
323 | }; |
|
323 | }; | |
324 | YUE.on('q_filter','click',function(){ |
|
324 | YUE.on('q_filter','click',function(){ | |
325 | if(!YUD.hasClass('q_filter', 'loaded')){ |
|
325 | if(!YUD.hasClass('q_filter', 'loaded')){ | |
326 | YUD.get('q_filter').value = ''; |
|
326 | YUD.get('q_filter').value = ''; | |
327 | //TODO: load here full list later to do search within groups |
|
327 | //TODO: load here full list later to do search within groups | |
328 | YUD.addClass('q_filter', 'loaded'); |
|
328 | YUD.addClass('q_filter', 'loaded'); | |
329 | } |
|
329 | } | |
330 | }); |
|
330 | }); | |
331 |
|
331 | |||
332 | YUE.on('q_filter','keyup',function (e) { |
|
332 | YUE.on('q_filter','keyup',function (e) { | |
333 | clearTimeout(filterTimeout); |
|
333 | clearTimeout(filterTimeout); | |
334 | filterTimeout = setTimeout(updateFilter,600); |
|
334 | filterTimeout = setTimeout(updateFilter,600); | |
335 | }); |
|
335 | }); | |
336 | </script> |
|
336 | </script> | |
337 | % endif |
|
337 | % endif |
@@ -1,375 +1,375 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('Journal')} - ${c.rhodecode_name} |
|
4 | ${_('Journal')} - ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 | <%def name="breadcrumbs()"> |
|
6 | <%def name="breadcrumbs()"> | |
7 | <h5> |
|
7 | <h5> | |
8 | <form id="filter_form"> |
|
8 | <form id="filter_form"> | |
9 | <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/> |
|
9 | <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/> | |
10 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> |
|
10 | <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span> | |
11 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> |
|
11 | <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/> | |
12 | ${_('journal')} - ${ungettext('%s entry', '%s entries', c.journal_pager.item_count) % (c.journal_pager.item_count)} |
|
12 | ${_('journal')} - ${ungettext('%s entry', '%s entries', c.journal_pager.item_count) % (c.journal_pager.item_count)} | |
13 | </form> |
|
13 | </form> | |
14 | ${h.end_form()} |
|
14 | ${h.end_form()} | |
15 | </h5> |
|
15 | </h5> | |
16 | </%def> |
|
16 | </%def> | |
17 | <%def name="page_nav()"> |
|
17 | <%def name="page_nav()"> | |
18 |
|
|
18 | ${self.menu('home')} | |
19 | </%def> |
|
19 | </%def> | |
20 | <%def name="head_extra()"> |
|
20 | <%def name="head_extra()"> | |
21 | <link href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" /> |
|
21 | <link href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" /> | |
22 | <link href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" /> |
|
22 | <link href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" /> | |
23 | </%def> |
|
23 | </%def> | |
24 | <%def name="main()"> |
|
24 | <%def name="main()"> | |
25 |
|
25 | |||
26 | <div class="box box-left"> |
|
26 | <div class="box box-left"> | |
27 |
|
|
27 | <!-- box / title --> | |
28 |
|
|
28 | <div class="title"> | |
29 | ${self.breadcrumbs()} |
|
29 | ${self.breadcrumbs()} | |
30 | <ul class="links"> |
|
30 | <ul class="links"> | |
31 | <li> |
|
31 | <li> | |
32 | <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/></a></span> |
|
32 | <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/></a></span> | |
33 | </li> |
|
33 | </li> | |
34 | <li> |
|
34 | <li> | |
35 | <span><a href="${h.url('journal_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> |
|
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 | </li> |
|
36 | </li> | |
37 | <li> |
|
37 | <li> | |
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> |
|
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 | </li> |
|
39 | </li> | |
40 | </ul> |
|
40 | </ul> | |
41 |
|
|
41 | </div> | |
42 |
|
|
42 | <div id="journal">${c.journal_data}</div> | |
43 | </div> |
|
43 | </div> | |
44 | <div class="box box-right"> |
|
44 | <div class="box box-right"> | |
45 | <!-- box / title --> |
|
45 | <!-- box / title --> | |
46 |
|
46 | |||
47 | <div class="title"> |
|
47 | <div class="title"> | |
48 | <h5> |
|
48 | <h5> | |
49 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> |
|
49 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> | |
50 | <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> |
|
50 | <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/> | |
51 | </h5> |
|
51 | </h5> | |
52 | <ul class="links" style="color:#DADADA"> |
|
52 | <ul class="links" style="color:#DADADA"> | |
53 | <li> |
|
53 | <li> | |
54 | <span><a id="show_watched" class="link-white current" href="#watched">${_('Watched')}</a> </span> |
|
54 | <span><a id="show_watched" class="link-white current" href="#watched">${_('Watched')}</a> </span> | |
55 | </li> |
|
55 | </li> | |
56 | <li> |
|
56 | <li> | |
57 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> |
|
57 | <span><a id="show_my" class="link-white" href="#my">${_('My repos')}</a> </span> | |
58 | </li> |
|
58 | </li> | |
59 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
59 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
60 | <li> |
|
60 | <li> | |
61 | <span>${h.link_to(_('Add repo'),h.url('admin_settings_create_repository'))}</span> |
|
61 | <span>${h.link_to(_('Add repo'),h.url('admin_settings_create_repository'))}</span> | |
62 | </li> |
|
62 | </li> | |
63 | %endif |
|
63 | %endif | |
64 | </ul> |
|
64 | </ul> | |
65 | </div> |
|
65 | </div> | |
66 |
|
66 | |||
67 | <!-- end box / title --> |
|
67 | <!-- end box / title --> | |
68 | <div id="my_container" style="display:none"> |
|
68 | <div id="my_container" style="display:none"> | |
69 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> |
|
69 | <div class="table yui-skin-sam" id="repos_list_wrap"></div> | |
70 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
70 | <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
71 | </div> |
|
71 | </div> | |
72 |
|
72 | |||
73 | <div id="watched_container"> |
|
73 | <div id="watched_container"> | |
74 | <div class="table yui-skin-sam" id="watched_repos_list_wrap"></div> |
|
74 | <div class="table yui-skin-sam" id="watched_repos_list_wrap"></div> | |
75 | <div id="watched-user-paginator" style="padding: 0px 0px 0px 20px"></div> |
|
75 | <div id="watched-user-paginator" style="padding: 0px 0px 0px 20px"></div> | |
76 | </div> |
|
76 | </div> | |
77 | </div> |
|
77 | </div> | |
78 |
|
78 | |||
79 | <script type="text/javascript"> |
|
79 | <script type="text/javascript"> | |
80 |
|
80 | |||
81 | YUE.on('j_filter','click',function(){ |
|
81 | YUE.on('j_filter','click',function(){ | |
82 | var jfilter = YUD.get('j_filter'); |
|
82 | var jfilter = YUD.get('j_filter'); | |
83 | if(YUD.hasClass(jfilter, 'initial')){ |
|
83 | if(YUD.hasClass(jfilter, 'initial')){ | |
84 | jfilter.value = ''; |
|
84 | jfilter.value = ''; | |
85 | } |
|
85 | } | |
86 | }); |
|
86 | }); | |
87 | var fix_j_filter_width = function(len){ |
|
87 | var fix_j_filter_width = function(len){ | |
88 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); |
|
88 | YUD.setStyle(YUD.get('j_filter'),'width',Math.max(80, len*6.50)+'px'); | |
89 | } |
|
89 | } | |
90 | YUE.on('j_filter','keyup',function(){ |
|
90 | YUE.on('j_filter','keyup',function(){ | |
91 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
91 | fix_j_filter_width(YUD.get('j_filter').value.length); | |
92 | }); |
|
92 | }); | |
93 | YUE.on('filter_form','submit',function(e){ |
|
93 | YUE.on('filter_form','submit',function(e){ | |
94 | YUE.preventDefault(e) |
|
94 | YUE.preventDefault(e) | |
95 | var val = YUD.get('j_filter').value; |
|
95 | var val = YUD.get('j_filter').value; | |
96 | window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val); |
|
96 | window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val); | |
97 | }); |
|
97 | }); | |
98 | fix_j_filter_width(YUD.get('j_filter').value.length); |
|
98 | fix_j_filter_width(YUD.get('j_filter').value.length); | |
99 |
|
99 | |||
100 | YUE.on('refresh','click',function(e){ |
|
100 | YUE.on('refresh','click',function(e){ | |
101 | ypjax("${h.url.current(filter=c.search_term)}","journal",function(){ |
|
101 | ypjax("${h.url.current(filter=c.search_term)}","journal",function(){ | |
102 | show_more_event(); |
|
102 | show_more_event(); | |
103 | tooltip_activate(); |
|
103 | tooltip_activate(); | |
104 | show_changeset_tooltip(); |
|
104 | show_changeset_tooltip(); | |
105 | }); |
|
105 | }); | |
106 | YUE.preventDefault(e); |
|
106 | YUE.preventDefault(e); | |
107 | }); |
|
107 | }); | |
108 |
|
108 | |||
109 | var show_my = function(e){ |
|
109 | var show_my = function(e){ | |
110 | YUD.setStyle('watched_container','display','none'); |
|
110 | YUD.setStyle('watched_container','display','none'); | |
111 | YUD.setStyle('my_container','display',''); |
|
111 | YUD.setStyle('my_container','display',''); | |
112 | YUD.setStyle('q_filter','display',''); |
|
112 | YUD.setStyle('q_filter','display',''); | |
113 | YUD.setStyle('q_filter_watched','display','none'); |
|
113 | YUD.setStyle('q_filter_watched','display','none'); | |
114 |
|
114 | |||
115 | YUD.addClass('show_my', 'current'); |
|
115 | YUD.addClass('show_my', 'current'); | |
116 | YUD.removeClass('show_watched','current'); |
|
116 | YUD.removeClass('show_watched','current'); | |
117 |
|
117 | |||
118 | if(!YUD.hasClass('show_my', 'loaded')){ |
|
118 | if(!YUD.hasClass('show_my', 'loaded')){ | |
119 | table_renderer(${c.data |n}); |
|
119 | table_renderer(${c.data |n}); | |
120 | YUD.addClass('show_my', 'loaded'); |
|
120 | YUD.addClass('show_my', 'loaded'); | |
121 | } |
|
121 | } | |
122 | } |
|
122 | } | |
123 | YUE.on('show_my','click',function(e){ |
|
123 | YUE.on('show_my','click',function(e){ | |
124 | show_my(e); |
|
124 | show_my(e); | |
125 | }) |
|
125 | }) | |
126 | var show_watched = function(e){ |
|
126 | var show_watched = function(e){ | |
127 |
|
|
127 | YUD.setStyle('my_container','display','none'); | |
128 | YUD.setStyle('watched_container','display',''); |
|
128 | YUD.setStyle('watched_container','display',''); | |
129 | YUD.setStyle('q_filter_watched','display',''); |
|
129 | YUD.setStyle('q_filter_watched','display',''); | |
130 | YUD.setStyle('q_filter','display','none'); |
|
130 | YUD.setStyle('q_filter','display','none'); | |
131 |
|
131 | |||
132 | YUD.addClass('show_watched', 'current'); |
|
132 | YUD.addClass('show_watched', 'current'); | |
133 | YUD.removeClass('show_my','current'); |
|
133 | YUD.removeClass('show_my','current'); | |
134 | if(!YUD.hasClass('show_watched', 'loaded')){ |
|
134 | if(!YUD.hasClass('show_watched', 'loaded')){ | |
135 |
|
|
135 | watched_renderer(${c.watched_data |n}); | |
136 | YUD.addClass('show_watched', 'loaded'); |
|
136 | YUD.addClass('show_watched', 'loaded'); | |
137 | } |
|
137 | } | |
138 |
|
138 | |||
139 | return |
|
139 | return | |
140 | var nodes = YUQ('#watched_container .watched_repo a'); |
|
140 | var nodes = YUQ('#watched_container .watched_repo a'); | |
141 | var target = 'q_filter'; |
|
141 | var target = 'q_filter'; | |
142 | var func = function(node){ |
|
142 | var func = function(node){ | |
143 | return node.parentNode.parentNode; |
|
143 | return node.parentNode.parentNode; | |
144 | } |
|
144 | } | |
145 | q_filter(target,nodes,func); |
|
145 | q_filter(target,nodes,func); | |
146 | } |
|
146 | } | |
147 | YUE.on('show_watched','click',function(e){ |
|
147 | YUE.on('show_watched','click',function(e){ | |
148 | show_watched(e); |
|
148 | show_watched(e); | |
149 | }) |
|
149 | }) | |
150 | //init watched |
|
150 | //init watched | |
151 | show_watched(); |
|
151 | show_watched(); | |
152 |
|
152 | |||
153 | var tabs = { |
|
153 | var tabs = { | |
154 | 'watched': show_watched, |
|
154 | 'watched': show_watched, | |
155 | 'my': show_my, |
|
155 | 'my': show_my, | |
156 | } |
|
156 | } | |
157 | var url = location.href.split('#'); |
|
157 | var url = location.href.split('#'); | |
158 | if (url[1]) { |
|
158 | if (url[1]) { | |
159 | //We have a hash |
|
159 | //We have a hash | |
160 | var tabHash = url[1]; |
|
160 | var tabHash = url[1]; | |
161 | var func = tabs[tabHash] |
|
161 | var func = tabs[tabHash] | |
162 | if (func){ |
|
162 | if (func){ | |
163 |
|
|
163 | func(); | |
164 | } |
|
164 | } | |
165 | } |
|
165 | } | |
166 | function watched_renderer(data){ |
|
166 | function watched_renderer(data){ | |
167 | var myDataSource = new YAHOO.util.DataSource(data); |
|
167 | var myDataSource = new YAHOO.util.DataSource(data); | |
168 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
168 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
169 |
|
169 | |||
170 | myDataSource.responseSchema = { |
|
170 | myDataSource.responseSchema = { | |
171 | resultsList: "records", |
|
171 | resultsList: "records", | |
172 | fields: [ |
|
172 | fields: [ | |
173 | {key:"menu"}, |
|
173 | {key:"menu"}, | |
174 | {key:"raw_name"}, |
|
174 | {key:"raw_name"}, | |
175 | {key:"name"}, |
|
175 | {key:"name"}, | |
176 | {key:"last_changeset"}, |
|
176 | {key:"last_changeset"}, | |
177 | {key:"action"}, |
|
177 | {key:"action"}, | |
178 | ] |
|
178 | ] | |
179 | }; |
|
179 | }; | |
180 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
180 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
181 | // This is the filter function |
|
181 | // This is the filter function | |
182 | var data = res.results || [], |
|
182 | var data = res.results || [], | |
183 | filtered = [], |
|
183 | filtered = [], | |
184 | i,l; |
|
184 | i,l; | |
185 |
|
185 | |||
186 | if (req) { |
|
186 | if (req) { | |
187 | req = req.toLowerCase(); |
|
187 | req = req.toLowerCase(); | |
188 | for (i = 0; i<data.length; i++) { |
|
188 | for (i = 0; i<data.length; i++) { | |
189 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
189 | var pos = data[i].raw_name.toLowerCase().indexOf(req) | |
190 | if (pos != -1) { |
|
190 | if (pos != -1) { | |
191 | filtered.push(data[i]); |
|
191 | filtered.push(data[i]); | |
192 | } |
|
192 | } | |
193 | } |
|
193 | } | |
194 | res.results = filtered; |
|
194 | res.results = filtered; | |
195 | } |
|
195 | } | |
196 | return res; |
|
196 | return res; | |
197 | } |
|
197 | } | |
198 | // main table sorting |
|
198 | // main table sorting | |
199 | var myColumnDefs = [ |
|
199 | var myColumnDefs = [ | |
200 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
200 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
201 | {key:"name",label:"${_('Name')}",sortable:true, |
|
201 | {key:"name",label:"${_('Name')}",sortable:true, | |
202 | sortOptions: { sortFunction: nameSort }}, |
|
202 | sortOptions: { sortFunction: nameSort }}, | |
203 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
203 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, | |
204 | sortOptions: { sortFunction: revisionSort }}, |
|
204 | sortOptions: { sortFunction: revisionSort }}, | |
205 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
205 | {key:"action",label:"${_('Action')}",sortable:false}, | |
206 | ]; |
|
206 | ]; | |
207 |
|
207 | |||
208 | var myDataTable = new YAHOO.widget.DataTable("watched_repos_list_wrap", myColumnDefs, myDataSource,{ |
|
208 | var myDataTable = new YAHOO.widget.DataTable("watched_repos_list_wrap", myColumnDefs, myDataSource,{ | |
209 | sortedBy:{key:"name",dir:"asc"}, |
|
209 | sortedBy:{key:"name",dir:"asc"}, | |
210 | paginator: new YAHOO.widget.Paginator({ |
|
210 | paginator: new YAHOO.widget.Paginator({ | |
211 | rowsPerPage: 25, |
|
211 | rowsPerPage: 25, | |
212 | alwaysVisible: false, |
|
212 | alwaysVisible: false, | |
213 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
213 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
214 | pageLinks: 5, |
|
214 | pageLinks: 5, | |
215 | containerClass: 'pagination-wh', |
|
215 | containerClass: 'pagination-wh', | |
216 | currentPageClass: 'pager_curpage', |
|
216 | currentPageClass: 'pager_curpage', | |
217 | pageLinkClass: 'pager_link', |
|
217 | pageLinkClass: 'pager_link', | |
218 | nextPageLinkLabel: '>', |
|
218 | nextPageLinkLabel: '>', | |
219 | previousPageLinkLabel: '<', |
|
219 | previousPageLinkLabel: '<', | |
220 | firstPageLinkLabel: '<<', |
|
220 | firstPageLinkLabel: '<<', | |
221 | lastPageLinkLabel: '>>', |
|
221 | lastPageLinkLabel: '>>', | |
222 | containers:['watched-user-paginator'] |
|
222 | containers:['watched-user-paginator'] | |
223 | }), |
|
223 | }), | |
224 |
|
224 | |||
225 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
225 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
226 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
226 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
227 | MSG_EMPTY:"${_('No records found.')}", |
|
227 | MSG_EMPTY:"${_('No records found.')}", | |
228 | MSG_ERROR:"${_('Data error.')}", |
|
228 | MSG_ERROR:"${_('Data error.')}", | |
229 | MSG_LOADING:"${_('Loading...')}", |
|
229 | MSG_LOADING:"${_('Loading...')}", | |
230 | } |
|
230 | } | |
231 | ); |
|
231 | ); | |
232 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
232 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
233 | tooltip_activate(); |
|
233 | tooltip_activate(); | |
234 | quick_repo_menu(); |
|
234 | quick_repo_menu(); | |
235 | }); |
|
235 | }); | |
236 |
|
236 | |||
237 | var filterTimeout = null; |
|
237 | var filterTimeout = null; | |
238 |
|
238 | |||
239 | updateFilter = function () { |
|
239 | updateFilter = function () { | |
240 | // Reset timeout |
|
240 | // Reset timeout | |
241 | filterTimeout = null; |
|
241 | filterTimeout = null; | |
242 |
|
242 | |||
243 | // Reset sort |
|
243 | // Reset sort | |
244 | var state = myDataTable.getState(); |
|
244 | var state = myDataTable.getState(); | |
245 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
245 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
246 |
|
246 | |||
247 | // Get filtered data |
|
247 | // Get filtered data | |
248 | myDataSource.sendRequest(YUD.get('q_filter_watched').value,{ |
|
248 | myDataSource.sendRequest(YUD.get('q_filter_watched').value,{ | |
249 | success : myDataTable.onDataReturnInitializeTable, |
|
249 | success : myDataTable.onDataReturnInitializeTable, | |
250 | failure : myDataTable.onDataReturnInitializeTable, |
|
250 | failure : myDataTable.onDataReturnInitializeTable, | |
251 | scope : myDataTable, |
|
251 | scope : myDataTable, | |
252 | argument: state |
|
252 | argument: state | |
253 | }); |
|
253 | }); | |
254 |
|
254 | |||
255 | }; |
|
255 | }; | |
256 | YUE.on('q_filter_watched','click',function(){ |
|
256 | YUE.on('q_filter_watched','click',function(){ | |
257 | if(!YUD.hasClass('q_filter_watched', 'loaded')){ |
|
257 | if(!YUD.hasClass('q_filter_watched', 'loaded')){ | |
258 | YUD.get('q_filter_watched').value = ''; |
|
258 | YUD.get('q_filter_watched').value = ''; | |
259 | //TODO: load here full list later to do search within groups |
|
259 | //TODO: load here full list later to do search within groups | |
260 | YUD.addClass('q_filter_watched', 'loaded'); |
|
260 | YUD.addClass('q_filter_watched', 'loaded'); | |
261 | } |
|
261 | } | |
262 | }); |
|
262 | }); | |
263 |
|
263 | |||
264 | YUE.on('q_filter_watched','keyup',function (e) { |
|
264 | YUE.on('q_filter_watched','keyup',function (e) { | |
265 | clearTimeout(filterTimeout); |
|
265 | clearTimeout(filterTimeout); | |
266 | filterTimeout = setTimeout(updateFilter,600); |
|
266 | filterTimeout = setTimeout(updateFilter,600); | |
267 | }); |
|
267 | }); | |
268 | } |
|
268 | } | |
269 |
|
269 | |||
270 | function table_renderer(data){ |
|
270 | function table_renderer(data){ | |
271 | var myDataSource = new YAHOO.util.DataSource(data); |
|
271 | var myDataSource = new YAHOO.util.DataSource(data); | |
272 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
|
272 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; | |
273 |
|
273 | |||
274 | myDataSource.responseSchema = { |
|
274 | myDataSource.responseSchema = { | |
275 | resultsList: "records", |
|
275 | resultsList: "records", | |
276 | fields: [ |
|
276 | fields: [ | |
277 | {key:"menu"}, |
|
277 | {key:"menu"}, | |
278 | {key:"raw_name"}, |
|
278 | {key:"raw_name"}, | |
279 | {key:"name"}, |
|
279 | {key:"name"}, | |
280 | {key:"last_changeset"}, |
|
280 | {key:"last_changeset"}, | |
281 | {key:"action"}, |
|
281 | {key:"action"}, | |
282 | ] |
|
282 | ] | |
283 | }; |
|
283 | }; | |
284 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
|
284 | myDataSource.doBeforeCallback = function(req,raw,res,cb) { | |
285 | // This is the filter function |
|
285 | // This is the filter function | |
286 | var data = res.results || [], |
|
286 | var data = res.results || [], | |
287 | filtered = [], |
|
287 | filtered = [], | |
288 | i,l; |
|
288 | i,l; | |
289 |
|
289 | |||
290 | if (req) { |
|
290 | if (req) { | |
291 | req = req.toLowerCase(); |
|
291 | req = req.toLowerCase(); | |
292 | for (i = 0; i<data.length; i++) { |
|
292 | for (i = 0; i<data.length; i++) { | |
293 | var pos = data[i].raw_name.toLowerCase().indexOf(req) |
|
293 | var pos = data[i].raw_name.toLowerCase().indexOf(req) | |
294 | if (pos != -1) { |
|
294 | if (pos != -1) { | |
295 | filtered.push(data[i]); |
|
295 | filtered.push(data[i]); | |
296 | } |
|
296 | } | |
297 | } |
|
297 | } | |
298 | res.results = filtered; |
|
298 | res.results = filtered; | |
299 | } |
|
299 | } | |
300 | return res; |
|
300 | return res; | |
301 | } |
|
301 | } | |
302 | // main table sorting |
|
302 | // main table sorting | |
303 | var myColumnDefs = [ |
|
303 | var myColumnDefs = [ | |
304 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
|
304 | {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, | |
305 | {key:"name",label:"${_('Name')}",sortable:true, |
|
305 | {key:"name",label:"${_('Name')}",sortable:true, | |
306 | sortOptions: { sortFunction: nameSort }}, |
|
306 | sortOptions: { sortFunction: nameSort }}, | |
307 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
|
307 | {key:"last_changeset",label:"${_('Tip')}",sortable:true, | |
308 | sortOptions: { sortFunction: revisionSort }}, |
|
308 | sortOptions: { sortFunction: revisionSort }}, | |
309 | {key:"action",label:"${_('Action')}",sortable:false}, |
|
309 | {key:"action",label:"${_('Action')}",sortable:false}, | |
310 | ]; |
|
310 | ]; | |
311 |
|
311 | |||
312 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
|
312 | var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ | |
313 | sortedBy:{key:"name",dir:"asc"}, |
|
313 | sortedBy:{key:"name",dir:"asc"}, | |
314 | paginator: new YAHOO.widget.Paginator({ |
|
314 | paginator: new YAHOO.widget.Paginator({ | |
315 | rowsPerPage: 25, |
|
315 | rowsPerPage: 25, | |
316 | alwaysVisible: false, |
|
316 | alwaysVisible: false, | |
317 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
|
317 | template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", | |
318 | pageLinks: 5, |
|
318 | pageLinks: 5, | |
319 | containerClass: 'pagination-wh', |
|
319 | containerClass: 'pagination-wh', | |
320 | currentPageClass: 'pager_curpage', |
|
320 | currentPageClass: 'pager_curpage', | |
321 | pageLinkClass: 'pager_link', |
|
321 | pageLinkClass: 'pager_link', | |
322 | nextPageLinkLabel: '>', |
|
322 | nextPageLinkLabel: '>', | |
323 | previousPageLinkLabel: '<', |
|
323 | previousPageLinkLabel: '<', | |
324 | firstPageLinkLabel: '<<', |
|
324 | firstPageLinkLabel: '<<', | |
325 | lastPageLinkLabel: '>>', |
|
325 | lastPageLinkLabel: '>>', | |
326 | containers:['user-paginator'] |
|
326 | containers:['user-paginator'] | |
327 | }), |
|
327 | }), | |
328 |
|
328 | |||
329 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
329 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
330 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
330 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
331 | MSG_EMPTY:"${_('No records found.')}", |
|
331 | MSG_EMPTY:"${_('No records found.')}", | |
332 | MSG_ERROR:"${_('Data error.')}", |
|
332 | MSG_ERROR:"${_('Data error.')}", | |
333 | MSG_LOADING:"${_('Loading...')}", |
|
333 | MSG_LOADING:"${_('Loading...')}", | |
334 | } |
|
334 | } | |
335 | ); |
|
335 | ); | |
336 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
336 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
337 | tooltip_activate(); |
|
337 | tooltip_activate(); | |
338 | quick_repo_menu(); |
|
338 | quick_repo_menu(); | |
339 | }); |
|
339 | }); | |
340 |
|
340 | |||
341 | var filterTimeout = null; |
|
341 | var filterTimeout = null; | |
342 |
|
342 | |||
343 | updateFilter = function () { |
|
343 | updateFilter = function () { | |
344 | // Reset timeout |
|
344 | // Reset timeout | |
345 | filterTimeout = null; |
|
345 | filterTimeout = null; | |
346 |
|
346 | |||
347 | // Reset sort |
|
347 | // Reset sort | |
348 | var state = myDataTable.getState(); |
|
348 | var state = myDataTable.getState(); | |
349 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
|
349 | state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; | |
350 |
|
350 | |||
351 | // Get filtered data |
|
351 | // Get filtered data | |
352 | myDataSource.sendRequest(YUD.get('q_filter').value,{ |
|
352 | myDataSource.sendRequest(YUD.get('q_filter').value,{ | |
353 | success : myDataTable.onDataReturnInitializeTable, |
|
353 | success : myDataTable.onDataReturnInitializeTable, | |
354 | failure : myDataTable.onDataReturnInitializeTable, |
|
354 | failure : myDataTable.onDataReturnInitializeTable, | |
355 | scope : myDataTable, |
|
355 | scope : myDataTable, | |
356 | argument: state |
|
356 | argument: state | |
357 | }); |
|
357 | }); | |
358 |
|
358 | |||
359 | }; |
|
359 | }; | |
360 | YUE.on('q_filter','click',function(){ |
|
360 | YUE.on('q_filter','click',function(){ | |
361 | if(!YUD.hasClass('q_filter', 'loaded')){ |
|
361 | if(!YUD.hasClass('q_filter', 'loaded')){ | |
362 | YUD.get('q_filter').value = ''; |
|
362 | YUD.get('q_filter').value = ''; | |
363 | //TODO: load here full list later to do search within groups |
|
363 | //TODO: load here full list later to do search within groups | |
364 | YUD.addClass('q_filter', 'loaded'); |
|
364 | YUD.addClass('q_filter', 'loaded'); | |
365 | } |
|
365 | } | |
366 | }); |
|
366 | }); | |
367 |
|
367 | |||
368 | YUE.on('q_filter','keyup',function (e) { |
|
368 | YUE.on('q_filter','keyup',function (e) { | |
369 | clearTimeout(filterTimeout); |
|
369 | clearTimeout(filterTimeout); | |
370 | filterTimeout = setTimeout(updateFilter,600); |
|
370 | filterTimeout = setTimeout(updateFilter,600); | |
371 | }); |
|
371 | }); | |
372 | } |
|
372 | } | |
373 |
|
373 | |||
374 | </script> |
|
374 | </script> | |
375 | </%def> |
|
375 | </%def> |
@@ -1,57 +1,57 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | %if c.journal_day_aggreagate: |
|
3 | %if c.journal_day_aggreagate: | |
4 | %for day,items in c.journal_day_aggreagate: |
|
4 | %for day,items in c.journal_day_aggreagate: | |
5 | <div class="journal_day">${day}</div> |
|
5 | <div class="journal_day">${day}</div> | |
6 | % for user,entries in items: |
|
6 | % for user,entries in items: | |
7 |
|
|
7 | <div class="journal_container"> | |
8 |
|
|
8 | <div class="gravatar"> | |
9 |
|
|
9 | <img alt="gravatar" src="${h.gravatar_url(user.email if user else 'anonymous@rhodecode.org',24)}"/> | |
10 |
|
|
10 | </div> | |
11 | %if user: |
|
11 | %if user: | |
12 |
|
|
12 | <div class="journal_user">${user.name} ${user.lastname}</div> | |
13 | %else: |
|
13 | %else: | |
14 | <div class="journal_user deleted">${entries[0].username}</div> |
|
14 | <div class="journal_user deleted">${entries[0].username}</div> | |
15 | %endif |
|
15 | %endif | |
16 |
|
|
16 | <div class="journal_action_container"> | |
17 |
|
|
17 | % for entry in entries: | |
18 |
|
|
18 | <div class="journal_icon"> ${h.action_parser(entry)[2]()}</div> | |
19 |
|
|
19 | <div class="journal_action">${h.action_parser(entry)[0]()}</div> | |
20 |
|
|
20 | <div class="journal_repo"> | |
21 |
|
|
21 | <span class="journal_repo_name"> | |
22 |
|
|
22 | %if entry.repository is not None: | |
23 |
|
|
23 | ${h.link_to(entry.repository.repo_name, | |
24 |
|
|
24 | h.url('summary_home',repo_name=entry.repository.repo_name))} | |
25 |
|
|
25 | %else: | |
26 |
|
|
26 | ${entry.repository_name} | |
27 |
|
|
27 | %endif | |
28 |
|
|
28 | </span> | |
29 |
|
|
29 | </div> | |
30 |
|
|
30 | <div class="journal_action_params">${h.literal(h.action_parser(entry)[1]())}</div> | |
31 |
|
|
31 | <div class="date"><span class="tooltip" title="${h.tooltip(h.fmt_date(entry.action_date))}">${h.age(entry.action_date)}</span></div> | |
32 |
|
|
32 | %endfor | |
33 |
|
|
33 | </div> | |
34 |
|
|
34 | </div> | |
35 | %endfor |
|
35 | %endfor | |
36 | %endfor |
|
36 | %endfor | |
37 |
|
37 | |||
38 | <div class="pagination-wh pagination-left"> |
|
38 | <div class="pagination-wh pagination-left"> | |
39 | <script type="text/javascript"> |
|
39 | <script type="text/javascript"> | |
40 | YUE.onDOMReady(function(){ |
|
40 | YUE.onDOMReady(function(){ | |
41 | YUE.delegate("journal","click",function(e, matchedEl, container){ |
|
41 | YUE.delegate("journal","click",function(e, matchedEl, container){ | |
42 |
|
|
42 | ypjax(e.target.href,"journal",function(){ | |
43 |
|
|
43 | show_more_event(); | |
44 |
|
|
44 | tooltip_activate(); | |
45 |
|
|
45 | show_changeset_tooltip(); | |
46 |
|
|
46 | }); | |
47 | YUE.preventDefault(e); |
|
47 | YUE.preventDefault(e); | |
48 | },'.pager_link'); |
|
48 | },'.pager_link'); | |
49 | }); |
|
49 | }); | |
50 | </script> |
|
50 | </script> | |
51 | ${c.journal_pager.pager('$link_previous ~2~ $link_next')} |
|
51 | ${c.journal_pager.pager('$link_previous ~2~ $link_next')} | |
52 | </div> |
|
52 | </div> | |
53 | %else: |
|
53 | %else: | |
54 | <div style="padding:5px 0px 10px 10px;"> |
|
54 | <div style="padding:5px 0px 10px 10px;"> | |
55 | ${_('No entries yet')} |
|
55 | ${_('No entries yet')} | |
56 | </div> |
|
56 | </div> | |
57 | %endif |
|
57 | %endif |
@@ -1,35 +1,35 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('Journal')} - ${c.rhodecode_name} |
|
4 | ${_('Journal')} - ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 | <%def name="breadcrumbs()"> |
|
6 | <%def name="breadcrumbs()"> | |
7 |
|
|
7 | ${c.rhodecode_name} | |
8 | </%def> |
|
8 | </%def> | |
9 | <%def name="page_nav()"> |
|
9 | <%def name="page_nav()"> | |
10 |
|
|
10 | ${self.menu('home')} | |
11 | </%def> |
|
11 | </%def> | |
12 | <%def name="head_extra()"> |
|
12 | <%def name="head_extra()"> | |
13 | <link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" /> |
|
13 | <link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" /> | |
14 | <link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" /> |
|
14 | <link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" /> | |
15 | </%def> |
|
15 | </%def> | |
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 |
|
17 | |||
18 | <div class="box"> |
|
18 | <div class="box"> | |
19 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
20 | <div class="title"> |
|
20 | <div class="title"> | |
21 | <h5>${_('Public Journal')}</h5> |
|
21 | <h5>${_('Public Journal')}</h5> | |
22 | <ul class="links"> |
|
22 | <ul class="links"> | |
23 | <li> |
|
23 | <li> | |
24 | <span><a href="${h.url('public_journal_rss')}"><img class="icon" title="${_('RSS feed')}" alt="${_('RSS feed')}" src="${h.url('/images/icons/atom.png')}"/></a></span> |
|
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 | </li> |
|
25 | </li> | |
26 | <li> |
|
26 | <li> | |
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> |
|
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 | </li> |
|
28 | </li> | |
29 | </ul> |
|
29 | </ul> | |
30 | </div> |
|
30 | </div> | |
31 |
|
31 | |||
32 | <div id="journal">${c.journal_data}</div> |
|
32 | <div id="journal">${c.journal_data}</div> | |
33 | </div> |
|
33 | </div> | |
34 |
|
34 | |||
35 | </%def> |
|
35 | </%def> |
@@ -1,77 +1,77 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base/root.html"/> |
|
2 | <%inherit file="base/root.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Sign In')} - ${c.rhodecode_name} |
|
5 | ${_('Sign In')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <div id="login"> |
|
8 | <div id="login"> | |
9 | <div class="flash_msg"> |
|
9 | <div class="flash_msg"> | |
10 | <% messages = h.flash.pop_messages() %> |
|
10 | <% messages = h.flash.pop_messages() %> | |
11 | % if messages: |
|
11 | % if messages: | |
12 | <ul id="flash-messages"> |
|
12 | <ul id="flash-messages"> | |
13 | % for message in messages: |
|
13 | % for message in messages: | |
14 | <li class="${message.category}_msg">${message}</li> |
|
14 | <li class="${message.category}_msg">${message}</li> | |
15 | % endfor |
|
15 | % endfor | |
16 | </ul> |
|
16 | </ul> | |
17 | % endif |
|
17 | % endif | |
18 | </div> |
|
18 | </div> | |
19 | <!-- login --> |
|
19 | <!-- login --> | |
20 | <div class="title top-left-rounded-corner top-right-rounded-corner"> |
|
20 | <div class="title top-left-rounded-corner top-right-rounded-corner"> | |
21 | <h5>${_('Sign In to')} ${c.rhodecode_name}</h5> |
|
21 | <h5>${_('Sign In to')} ${c.rhodecode_name}</h5> | |
22 | </div> |
|
22 | </div> | |
23 | <div class="inner"> |
|
23 | <div class="inner"> | |
24 | ${h.form(h.url.current(came_from=c.came_from))} |
|
24 | ${h.form(h.url.current(came_from=c.came_from))} | |
25 | <div class="form"> |
|
25 | <div class="form"> | |
26 | <!-- fields --> |
|
26 | <!-- fields --> | |
27 |
|
27 | |||
28 | <div class="fields"> |
|
28 | <div class="fields"> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="label"> |
|
30 | <div class="label"> | |
31 | <label for="username">${_('Username')}:</label> |
|
31 | <label for="username">${_('Username')}:</label> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="input"> |
|
33 | <div class="input"> | |
34 | ${h.text('username',class_='focus',size=40)} |
|
34 | ${h.text('username',class_='focus',size=40)} | |
35 | </div> |
|
35 | </div> | |
36 |
|
36 | |||
37 | </div> |
|
37 | </div> | |
38 | <div class="field"> |
|
38 | <div class="field"> | |
39 | <div class="label"> |
|
39 | <div class="label"> | |
40 | <label for="password">${_('Password')}:</label> |
|
40 | <label for="password">${_('Password')}:</label> | |
41 | </div> |
|
41 | </div> | |
42 | <div class="input"> |
|
42 | <div class="input"> | |
43 | ${h.password('password',class_='focus',size=40)} |
|
43 | ${h.password('password',class_='focus',size=40)} | |
44 | </div> |
|
44 | </div> | |
45 |
|
45 | |||
46 | </div> |
|
46 | </div> | |
47 | <div class="field"> |
|
47 | <div class="field"> | |
48 | <div class="checkbox"> |
|
48 | <div class="checkbox"> | |
49 | <input type="checkbox" id="remember" name="remember" /> |
|
49 | <input type="checkbox" id="remember" name="remember" /> | |
50 | <label for="remember">${_('Remember me')}</label> |
|
50 | <label for="remember">${_('Remember me')}</label> | |
51 | </div> |
|
51 | </div> | |
52 | </div> |
|
52 | </div> | |
53 | <div class="buttons"> |
|
53 | <div class="buttons"> | |
54 | ${h.submit('sign_in',_('Sign In'),class_="ui-btn large")} |
|
54 | ${h.submit('sign_in',_('Sign In'),class_="ui-btn large")} | |
55 | </div> |
|
55 | </div> | |
56 | </div> |
|
56 | </div> | |
57 | <!-- end fields --> |
|
57 | <!-- end fields --> | |
58 | <!-- links --> |
|
58 | <!-- links --> | |
59 | <div class="links"> |
|
59 | <div class="links"> | |
60 | ${h.link_to(_('Forgot your password ?'),h.url('reset_password'))} |
|
60 | ${h.link_to(_('Forgot your password ?'),h.url('reset_password'))} | |
61 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
61 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): | |
62 | / |
|
62 | / | |
63 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
63 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} | |
64 | %endif |
|
64 | %endif | |
65 | </div> |
|
65 | </div> | |
66 |
|
66 | |||
67 | <!-- end links --> |
|
67 | <!-- end links --> | |
68 | </div> |
|
68 | </div> | |
69 | ${h.end_form()} |
|
69 | ${h.end_form()} | |
70 | <script type="text/javascript"> |
|
70 | <script type="text/javascript"> | |
71 | YUE.onDOMReady(function(){ |
|
71 | YUE.onDOMReady(function(){ | |
72 |
|
|
72 | YUD.get('username').focus(); | |
73 | }) |
|
73 | }) | |
74 | </script> |
|
74 | </script> | |
75 | </div> |
|
75 | </div> | |
76 | <!-- end login --> |
|
76 | <!-- end login --> | |
77 | </div> |
|
77 | </div> |
@@ -1,43 +1,43 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base/root.html"/> |
|
2 | <%inherit file="base/root.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Reset your password')} - ${c.rhodecode_name} |
|
5 | ${_('Reset your password')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <div id="register"> |
|
8 | <div id="register"> | |
9 |
|
9 | |||
10 |
|
|
10 | <div class="title top-left-rounded-corner top-right-rounded-corner"> | |
11 |
|
|
11 | <h5>${_('Reset your password to')} ${c.rhodecode_name}</h5> | |
12 |
|
|
12 | </div> | |
13 |
|
|
13 | <div class="inner"> | |
14 |
|
|
14 | ${h.form(url('password_reset'))} | |
15 |
|
|
15 | <div class="form"> | |
16 |
|
|
16 | <!-- fields --> | |
17 |
|
|
17 | <div class="fields"> | |
18 |
|
18 | |||
19 |
|
|
19 | <div class="field"> | |
20 |
|
|
20 | <div class="label"> | |
21 |
|
|
21 | <label for="email">${_('Email address')}:</label> | |
22 |
|
|
22 | </div> | |
23 |
|
|
23 | <div class="input"> | |
24 |
|
|
24 | ${h.text('email')} | |
25 |
|
|
25 | </div> | |
26 |
|
|
26 | </div> | |
27 |
|
27 | |||
28 |
|
|
28 | <div class="buttons"> | |
29 |
|
|
29 | <div class="nohighlight"> | |
30 |
|
|
30 | ${h.submit('send',_('Reset my password'),class_="ui-btn large")} | |
31 |
|
|
31 | <div class="activation_msg">${_('Password reset link will be send to matching email address')}</div> | |
32 |
|
|
32 | </div> | |
33 |
|
|
33 | </div> | |
34 |
|
|
34 | </div> | |
35 |
|
|
35 | </div> | |
36 |
|
|
36 | ${h.end_form()} | |
37 | <script type="text/javascript"> |
|
37 | <script type="text/javascript"> | |
38 | YUE.onDOMReady(function(){ |
|
38 | YUE.onDOMReady(function(){ | |
39 | YUD.get('email').focus(); |
|
39 | YUD.get('email').focus(); | |
40 | }) |
|
40 | }) | |
41 | </script> |
|
41 | </script> | |
42 |
|
|
42 | </div> | |
43 | </div> |
|
43 | </div> |
@@ -1,204 +1,204 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${c.repo_name} ${_('New pull request')} |
|
4 | ${c.repo_name} ${_('New pull request')} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} |
|
10 | ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} | |
11 | » |
|
11 | » | |
12 | ${_('New pull request')} |
|
12 | ${_('New pull request')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="main()"> |
|
15 | <%def name="main()"> | |
16 |
|
16 | |||
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | </div> |
|
21 | </div> | |
22 | ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} |
|
22 | ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} | |
23 | <div style="float:left;padding:0px 30px 30px 30px"> |
|
23 | <div style="float:left;padding:0px 30px 30px 30px"> | |
24 | <input type="hidden" name="rev_start" value="${request.GET.get('rev_start')}" /> |
|
24 | <input type="hidden" name="rev_start" value="${request.GET.get('rev_start')}" /> | |
25 | <input type="hidden" name="rev_end" value="${request.GET.get('rev_end')}" /> |
|
25 | <input type="hidden" name="rev_end" value="${request.GET.get('rev_end')}" /> | |
26 |
|
26 | |||
27 | ##ORG |
|
27 | ##ORG | |
28 | <div style="float:left"> |
|
28 | <div style="float:left"> | |
29 | <div class="fork_user"> |
|
29 | <div class="fork_user"> | |
30 | <div class="gravatar"> |
|
30 | <div class="gravatar"> | |
31 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_db_repo.user.email,24)}"/> |
|
31 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_db_repo.user.email,24)}"/> | |
32 | </div> |
|
32 | </div> | |
33 | <span style="font-size: 20px"> |
|
33 | <span style="font-size: 20px"> | |
34 | ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref','',c.org_refs,class_='refs')} |
|
34 | ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref','',c.org_refs,class_='refs')} | |
35 | </span> |
|
35 | </span> | |
36 | <div style="padding:5px 3px 3px 42px;">${c.rhodecode_db_repo.description}</div> |
|
36 | <div style="padding:5px 3px 3px 42px;">${c.rhodecode_db_repo.description}</div> | |
37 | </div> |
|
37 | </div> | |
38 | <div style="clear:both;padding-top: 10px"></div> |
|
38 | <div style="clear:both;padding-top: 10px"></div> | |
39 | </div> |
|
39 | </div> | |
40 | <div style="float:left;font-size:24px;padding:0px 20px"> |
|
40 | <div style="float:left;font-size:24px;padding:0px 20px"> | |
41 | <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/> |
|
41 | <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/> | |
42 | </div> |
|
42 | </div> | |
43 |
|
43 | |||
44 | ##OTHER, most Probably the PARENT OF THIS FORK |
|
44 | ##OTHER, most Probably the PARENT OF THIS FORK | |
45 | <div style="float:left"> |
|
45 | <div style="float:left"> | |
46 | <div class="fork_user"> |
|
46 | <div class="fork_user"> | |
47 | <div class="gravatar"> |
|
47 | <div class="gravatar"> | |
48 | <img id="other_repo_gravatar" alt="gravatar" src=""/> |
|
48 | <img id="other_repo_gravatar" alt="gravatar" src=""/> | |
49 | </div> |
|
49 | </div> | |
50 | <span style="font-size: 20px"> |
|
50 | <span style="font-size: 20px"> | |
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')} |
|
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 | </span> |
|
52 | </span> | |
53 | <span style="padding:3px"> |
|
53 | <span style="padding:3px"> | |
54 | <a id="refresh" href="#" class="tooltip" title="${h.tooltip(_('refresh overview'))}"> |
|
54 | <a id="refresh" href="#" class="tooltip" title="${h.tooltip(_('refresh overview'))}"> | |
55 | <img style="margin:3px" class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/> |
|
55 | <img style="margin:3px" class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/> | |
56 | </a> |
|
56 | </a> | |
57 | </span> |
|
57 | </span> | |
58 | <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div> |
|
58 | <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div> | |
59 | </div> |
|
59 | </div> | |
60 | <div style="clear:both;padding-top: 10px"></div> |
|
60 | <div style="clear:both;padding-top: 10px"></div> | |
61 | </div> |
|
61 | </div> | |
62 | <div style="clear:both;padding-top: 10px"></div> |
|
62 | <div style="clear:both;padding-top: 10px"></div> | |
63 | ## overview pulled by ajax |
|
63 | ## overview pulled by ajax | |
64 | <div style="float:left" id="pull_request_overview"></div> |
|
64 | <div style="float:left" id="pull_request_overview"></div> | |
65 | <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none"> |
|
65 | <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none"> | |
66 | <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a> |
|
66 | <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a> | |
67 | </div> |
|
67 | </div> | |
68 | </div> |
|
68 | </div> | |
69 | <div style="float:left; border-left:1px dashed #eee"> |
|
69 | <div style="float:left; border-left:1px dashed #eee"> | |
70 | <h4>${_('Pull request reviewers')}</h4> |
|
70 | <h4>${_('Pull request reviewers')}</h4> | |
71 | <div id="reviewers" style="padding:0px 0px 0px 15px"> |
|
71 | <div id="reviewers" style="padding:0px 0px 0px 15px"> | |
72 | ## members goes here ! |
|
72 | ## members goes here ! | |
73 | <div class="group_members_wrap"> |
|
73 | <div class="group_members_wrap"> | |
74 | <ul id="review_members" class="group_members"> |
|
74 | <ul id="review_members" class="group_members"> | |
75 | %for member in c.review_members: |
|
75 | %for member in c.review_members: | |
76 | <li id="reviewer_${member.user_id}"> |
|
76 | <li id="reviewer_${member.user_id}"> | |
77 | <div class="reviewers_member"> |
|
77 | <div class="reviewers_member"> | |
78 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
78 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> | |
79 | <div style="float:left">${member.full_name} (${_('owner')})</div> |
|
79 | <div style="float:left">${member.full_name} (${_('owner')})</div> | |
80 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
80 | <input type="hidden" value="${member.user_id}" name="review_members" /> | |
81 | <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span> |
|
81 | <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span> | |
82 | </div> |
|
82 | </div> | |
83 | </li> |
|
83 | </li> | |
84 | %endfor |
|
84 | %endfor | |
85 | </ul> |
|
85 | </ul> | |
86 | </div> |
|
86 | </div> | |
87 |
|
87 | |||
88 | <div class='ac'> |
|
88 | <div class='ac'> | |
89 | <div class="reviewer_ac"> |
|
89 | <div class="reviewer_ac"> | |
90 | ${h.text('user', class_='yui-ac-input')} |
|
90 | ${h.text('user', class_='yui-ac-input')} | |
91 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> |
|
91 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> | |
92 | <div id="reviewers_container"></div> |
|
92 | <div id="reviewers_container"></div> | |
93 | </div> |
|
93 | </div> | |
94 | </div> |
|
94 | </div> | |
95 | </div> |
|
95 | </div> | |
96 | </div> |
|
96 | </div> | |
97 | <h3>${_('Create new pull request')}</h3> |
|
97 | <h3>${_('Create new pull request')}</h3> | |
98 |
|
98 | |||
99 | <div class="form"> |
|
99 | <div class="form"> | |
100 | <!-- fields --> |
|
100 | <!-- fields --> | |
101 |
|
101 | |||
102 | <div class="fields"> |
|
102 | <div class="fields"> | |
103 |
|
103 | |||
104 | <div class="field"> |
|
104 | <div class="field"> | |
105 | <div class="label"> |
|
105 | <div class="label"> | |
106 | <label for="pullrequest_title">${_('Title')}:</label> |
|
106 | <label for="pullrequest_title">${_('Title')}:</label> | |
107 | </div> |
|
107 | </div> | |
108 | <div class="input"> |
|
108 | <div class="input"> | |
109 | ${h.text('pullrequest_title',size=30)} |
|
109 | ${h.text('pullrequest_title',size=30)} | |
110 | </div> |
|
110 | </div> | |
111 | </div> |
|
111 | </div> | |
112 |
|
112 | |||
113 | <div class="field"> |
|
113 | <div class="field"> | |
114 | <div class="label label-textarea"> |
|
114 | <div class="label label-textarea"> | |
115 | <label for="pullrequest_desc">${_('description')}:</label> |
|
115 | <label for="pullrequest_desc">${_('description')}:</label> | |
116 | </div> |
|
116 | </div> | |
117 | <div class="textarea text-area editor"> |
|
117 | <div class="textarea text-area editor"> | |
118 | ${h.textarea('pullrequest_desc',size=30)} |
|
118 | ${h.textarea('pullrequest_desc',size=30)} | |
119 | </div> |
|
119 | </div> | |
120 | </div> |
|
120 | </div> | |
121 |
|
121 | |||
122 | <div class="buttons"> |
|
122 | <div class="buttons"> | |
123 | ${h.submit('save',_('Send pull request'),class_="ui-btn large")} |
|
123 | ${h.submit('save',_('Send pull request'),class_="ui-btn large")} | |
124 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
124 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
125 | </div> |
|
125 | </div> | |
126 | </div> |
|
126 | </div> | |
127 | </div> |
|
127 | </div> | |
128 | ${h.end_form()} |
|
128 | ${h.end_form()} | |
129 |
|
129 | |||
130 | </div> |
|
130 | </div> | |
131 |
|
131 | |||
132 | <script type="text/javascript"> |
|
132 | <script type="text/javascript"> | |
133 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
133 | var _USERS_AC_DATA = ${c.users_array|n}; | |
134 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
134 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
135 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
135 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); | |
136 |
|
136 | |||
137 | var other_repos_info = ${c.other_repos_info|n}; |
|
137 | var other_repos_info = ${c.other_repos_info|n}; | |
138 |
|
138 | |||
139 | var loadPreview = function(){ |
|
139 | var loadPreview = function(){ | |
140 |
|
|
140 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none'); | |
141 | var url = "${h.url('compare_url', |
|
141 | var url = "${h.url('compare_url', | |
142 |
|
|
142 | repo_name='org_repo', | |
143 |
|
|
143 | org_ref_type='org_ref_type', org_ref='org_ref', | |
144 | other_ref_type='other_ref_type', other_ref='other_ref', |
|
144 | other_ref_type='other_ref_type', other_ref='other_ref', | |
145 | repo='other_repo', |
|
145 | repo='other_repo', | |
146 | as_form=True, bundle=False, |
|
146 | as_form=True, bundle=False, | |
147 | rev_start=request.GET.get('rev_start',''), |
|
147 | rev_start=request.GET.get('rev_start',''), | |
148 | rev_end=request.GET.get('rev_end',''))}"; |
|
148 | rev_end=request.GET.get('rev_end',''))}"; | |
149 |
|
149 | |||
150 | var select_refs = YUQ('#pull_request_form select.refs') |
|
150 | var select_refs = YUQ('#pull_request_form select.refs') | |
151 | var rev_data = {}; // gather the org/other ref and repo here |
|
151 | var rev_data = {}; // gather the org/other ref and repo here | |
152 | for(var i=0;i<select_refs.length;i++){ |
|
152 | for(var i=0;i<select_refs.length;i++){ | |
153 | var select_ref = select_refs[i]; |
|
153 | var select_ref = select_refs[i]; | |
154 | var select_ref_data = select_ref.value.split(':'); |
|
154 | var select_ref_data = select_ref.value.split(':'); | |
155 | var key = null; |
|
155 | var key = null; | |
156 | var val = null; |
|
156 | var val = null; | |
157 |
|
157 | |||
158 | if(select_ref_data.length>1){ |
|
158 | if(select_ref_data.length>1){ | |
159 | key = select_ref.name+"_type"; |
|
159 | key = select_ref.name+"_type"; | |
160 | val = select_ref_data[0]; |
|
160 | val = select_ref_data[0]; | |
161 | url = url.replace(key,val); |
|
161 | url = url.replace(key,val); | |
162 | rev_data[key] = val; |
|
162 | rev_data[key] = val; | |
163 |
|
163 | |||
164 | key = select_ref.name; |
|
164 | key = select_ref.name; | |
165 | val = select_ref_data[1]; |
|
165 | val = select_ref_data[1]; | |
166 | url = url.replace(key,val); |
|
166 | url = url.replace(key,val); | |
167 | rev_data[key] = val; |
|
167 | rev_data[key] = val; | |
168 |
|
168 | |||
169 | }else{ |
|
169 | }else{ | |
170 | key = select_ref.name; |
|
170 | key = select_ref.name; | |
171 | val = select_ref.value; |
|
171 | val = select_ref.value; | |
172 | url = url.replace(key,val); |
|
172 | url = url.replace(key,val); | |
173 | rev_data[key] = val; |
|
173 | rev_data[key] = val; | |
174 | } |
|
174 | } | |
175 | } |
|
175 | } | |
176 |
|
176 | |||
177 | YUE.on('other_repo', 'change', function(e){ |
|
177 | YUE.on('other_repo', 'change', function(e){ | |
178 |
|
|
178 | var repo_name = e.currentTarget.value; | |
179 |
|
|
179 | // replace the <select> of changed repo | |
180 |
|
|
180 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; | |
181 | }); |
|
181 | }); | |
182 |
|
182 | |||
183 | ypjax(url,'pull_request_overview', function(data){ |
|
183 | ypjax(url,'pull_request_overview', function(data){ | |
184 |
|
|
184 | var sel_box = YUQ('#pull_request_form #other_repo')[0]; | |
185 |
|
|
185 | var repo_name = sel_box.options[sel_box.selectedIndex].value; | |
186 |
|
|
186 | YUD.get('pull_request_overview_url').href = url; | |
187 |
|
|
187 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display',''); | |
188 |
|
|
188 | YUD.get('other_repo_gravatar').src = other_repos_info[repo_name]['gravatar']; | |
189 |
|
|
189 | YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; | |
190 |
|
|
190 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; | |
191 |
|
|
191 | // select back the revision that was just compared | |
192 |
|
|
192 | setSelectValue(YUD.get('other_ref'), rev_data['other_ref']); | |
193 | }) |
|
193 | }) | |
194 | } |
|
194 | } | |
195 | YUE.on('refresh','click',function(e){ |
|
195 | YUE.on('refresh','click',function(e){ | |
196 | loadPreview() |
|
196 | loadPreview() | |
197 | }) |
|
197 | }) | |
198 |
|
198 | |||
199 | //lazy load overview after 0.5s |
|
199 | //lazy load overview after 0.5s | |
200 | setTimeout(loadPreview, 500) |
|
200 | setTimeout(loadPreview, 500) | |
201 |
|
201 | |||
202 | </script> |
|
202 | </script> | |
203 |
|
203 | |||
204 | </%def> |
|
204 | </%def> |
@@ -1,228 +1,228 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${c.repo_name} ${_('Pull request #%s') % c.pull_request.pull_request_id} |
|
4 | ${c.repo_name} ${_('Pull request #%s') % c.pull_request.pull_request_id} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} |
|
10 | ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} | |
11 | » |
|
11 | » | |
12 | ${_('Pull request #%s') % c.pull_request.pull_request_id} |
|
12 | ${_('Pull request #%s') % c.pull_request.pull_request_id} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="main()"> |
|
15 | <%def name="main()"> | |
16 |
|
16 | |||
17 | <div class="box"> |
|
17 | <div class="box"> | |
18 | <!-- box / title --> |
|
18 | <!-- box / title --> | |
19 | <div class="title"> |
|
19 | <div class="title"> | |
20 | ${self.breadcrumbs()} |
|
20 | ${self.breadcrumbs()} | |
21 | </div> |
|
21 | </div> | |
22 | %if c.pull_request.is_closed(): |
|
22 | %if c.pull_request.is_closed(): | |
23 | <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div> |
|
23 | <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div> | |
24 | %endif |
|
24 | %endif | |
25 | <h3>${_('Title')}: ${c.pull_request.title}</h3> |
|
25 | <h3>${_('Title')}: ${c.pull_request.title}</h3> | |
26 |
|
26 | |||
27 | <div class="form"> |
|
27 | <div class="form"> | |
28 | <div id="summary" class="fields"> |
|
28 | <div id="summary" class="fields"> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="label-summary"> |
|
30 | <div class="label-summary"> | |
31 | <label>${_('Status')}:</label> |
|
31 | <label>${_('Status')}:</label> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="input"> |
|
33 | <div class="input"> | |
34 | <div class="changeset-status-container" style="float:none;clear:both"> |
|
34 | <div class="changeset-status-container" style="float:none;clear:both"> | |
35 | %if c.current_changeset_status: |
|
35 | %if c.current_changeset_status: | |
36 | <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div> |
|
36 | <div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div> | |
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> |
|
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 | %endif |
|
38 | %endif | |
39 | </div> |
|
39 | </div> | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 | <div class="field"> |
|
42 | <div class="field"> | |
43 | <div class="label-summary"> |
|
43 | <div class="label-summary"> | |
44 | <label>${_('Still not reviewed by')}:</label> |
|
44 | <label>${_('Still not reviewed by')}:</label> | |
45 | </div> |
|
45 | </div> | |
46 | <div class="input"> |
|
46 | <div class="input"> | |
47 | % if len(c.pull_request_pending_reviewers) > 0: |
|
47 | % if len(c.pull_request_pending_reviewers) > 0: | |
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> |
|
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 | %else: |
|
49 | %else: | |
50 | <div>${_('pull request was reviewed by all reviewers')}</div> |
|
50 | <div>${_('pull request was reviewed by all reviewers')}</div> | |
51 | %endif |
|
51 | %endif | |
52 | </div> |
|
52 | </div> | |
53 | </div> |
|
53 | </div> | |
54 | <div class="field"> |
|
54 | <div class="field"> | |
55 | <div class="label-summary"> |
|
55 | <div class="label-summary"> | |
56 | <label>${_('Origin repository')}:</label> |
|
56 | <label>${_('Origin repository')}:</label> | |
57 | </div> |
|
57 | </div> | |
58 | <div class="input"> |
|
58 | <div class="input"> | |
59 | <div> |
|
59 | <div> | |
60 | ##%if h.is_hg(c.pull_request.org_repo): |
|
60 | ##%if h.is_hg(c.pull_request.org_repo): | |
61 | ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
61 | ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> | |
62 | ##%elif h.is_git(c.pull_request.org_repo): |
|
62 | ##%elif h.is_git(c.pull_request.org_repo): | |
63 | ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
63 | ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> | |
64 | ##%endif |
|
64 | ##%endif | |
65 | <span class="spantag">${c.pull_request.org_ref_parts[0]}</span> |
|
65 | <span class="spantag">${c.pull_request.org_ref_parts[0]}</span> | |
66 | : |
|
66 | : | |
67 | <span class="spantag">${c.pull_request.org_ref_parts[1]}</span> |
|
67 | <span class="spantag">${c.pull_request.org_ref_parts[1]}</span> | |
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> |
|
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 | </div> |
|
69 | </div> | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 | </div> |
|
73 | </div> | |
74 | <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div> |
|
74 | <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div> | |
75 | <div style="padding:4px 4px 10px 20px"> |
|
75 | <div style="padding:4px 4px 10px 20px"> | |
76 | <div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div> |
|
76 | <div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div> | |
77 | </div> |
|
77 | </div> | |
78 |
|
78 | |||
79 | <div style="overflow: auto;"> |
|
79 | <div style="overflow: auto;"> | |
80 | ##DIFF |
|
80 | ##DIFF | |
81 | <div class="table" style="float:left;clear:none"> |
|
81 | <div class="table" style="float:left;clear:none"> | |
82 | <div id="body" class="diffblock"> |
|
82 | <div id="body" class="diffblock"> | |
83 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> |
|
83 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> | |
84 | </div> |
|
84 | </div> | |
85 | <div id="changeset_compare_view_content"> |
|
85 | <div id="changeset_compare_view_content"> | |
86 | ##CS |
|
86 | ##CS | |
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> |
|
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 | <%include file="/compare/compare_cs.html" /> |
|
88 | <%include file="/compare/compare_cs.html" /> | |
89 |
|
89 | |||
90 | ## FILES |
|
90 | ## FILES | |
91 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
91 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> | |
92 |
|
92 | |||
93 | % if c.limited_diff: |
|
93 | % if c.limited_diff: | |
94 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
94 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} | |
95 | % else: |
|
95 | % else: | |
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)}: |
|
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 | %endif |
|
97 | %endif | |
98 |
|
98 | |||
99 | </div> |
|
99 | </div> | |
100 | <div class="cs_files"> |
|
100 | <div class="cs_files"> | |
101 | %if not c.files: |
|
101 | %if not c.files: | |
102 | <span class="empty_data">${_('No files')}</span> |
|
102 | <span class="empty_data">${_('No files')}</span> | |
103 | %endif |
|
103 | %endif | |
104 | %for fid, change, f, stat in c.files: |
|
104 | %for fid, change, f, stat in c.files: | |
105 | <div class="cs_${change}"> |
|
105 | <div class="cs_${change}"> | |
106 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> |
|
106 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> | |
107 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
107 | <div class="changes">${h.fancy_file_stats(stat)}</div> | |
108 | </div> |
|
108 | </div> | |
109 | %endfor |
|
109 | %endfor | |
110 | </div> |
|
110 | </div> | |
111 | % if c.limited_diff: |
|
111 | % if c.limited_diff: | |
112 | <h5>${_('Changeset was too big and was cut off...')}</h5> |
|
112 | <h5>${_('Changeset was too big and was cut off...')}</h5> | |
113 | % endif |
|
113 | % endif | |
114 | </div> |
|
114 | </div> | |
115 | </div> |
|
115 | </div> | |
116 | ## REVIEWERS |
|
116 | ## REVIEWERS | |
117 | <div style="float:left; border-left:1px dashed #eee"> |
|
117 | <div style="float:left; border-left:1px dashed #eee"> | |
118 | <h4>${_('Pull request reviewers')}</h4> |
|
118 | <h4>${_('Pull request reviewers')}</h4> | |
119 | <div id="reviewers" style="padding:0px 0px 5px 10px"> |
|
119 | <div id="reviewers" style="padding:0px 0px 5px 10px"> | |
120 | ## members goes here ! |
|
120 | ## members goes here ! | |
121 | <div class="group_members_wrap" style="min-height:45px"> |
|
121 | <div class="group_members_wrap" style="min-height:45px"> | |
122 | <ul id="review_members" class="group_members"> |
|
122 | <ul id="review_members" class="group_members"> | |
123 | %for member,status in c.pull_request_reviewers: |
|
123 | %for member,status in c.pull_request_reviewers: | |
124 | <li id="reviewer_${member.user_id}"> |
|
124 | <li id="reviewer_${member.user_id}"> | |
125 | <div class="reviewers_member"> |
|
125 | <div class="reviewers_member"> | |
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'))}"> |
|
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 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> |
|
127 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> | |
128 | </div> |
|
128 | </div> | |
129 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
129 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> | |
130 | <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div> |
|
130 | <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div> | |
131 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
131 | <input type="hidden" value="${member.user_id}" name="review_members" /> | |
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): |
|
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 | <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span> |
|
133 | <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span> | |
134 | %endif |
|
134 | %endif | |
135 | </div> |
|
135 | </div> | |
136 | </li> |
|
136 | </li> | |
137 | %endfor |
|
137 | %endfor | |
138 | </ul> |
|
138 | </ul> | |
139 | </div> |
|
139 | </div> | |
140 | %if not c.pull_request.is_closed(): |
|
140 | %if not c.pull_request.is_closed(): | |
141 | <div class='ac'> |
|
141 | <div class='ac'> | |
142 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id: |
|
142 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id: | |
143 | <div class="reviewer_ac"> |
|
143 | <div class="reviewer_ac"> | |
144 | ${h.text('user', class_='yui-ac-input')} |
|
144 | ${h.text('user', class_='yui-ac-input')} | |
145 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> |
|
145 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> | |
146 | <div id="reviewers_container"></div> |
|
146 | <div id="reviewers_container"></div> | |
147 | </div> |
|
147 | </div> | |
148 | <div style="padding:0px 10px"> |
|
148 | <div style="padding:0px 10px"> | |
149 | <span id="update_pull_request" class="ui-btn xsmall">${_('save')}</span> |
|
149 | <span id="update_pull_request" class="ui-btn xsmall">${_('save')}</span> | |
150 | </div> |
|
150 | </div> | |
151 | %endif |
|
151 | %endif | |
152 | </div> |
|
152 | </div> | |
153 | %endif |
|
153 | %endif | |
154 | </div> |
|
154 | </div> | |
155 | </div> |
|
155 | </div> | |
156 | </div> |
|
156 | </div> | |
157 | <script> |
|
157 | <script> | |
158 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
158 | var _USERS_AC_DATA = ${c.users_array|n}; | |
159 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
159 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
160 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; |
|
160 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; | |
161 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
161 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
162 | AJAX_UPDATE_PULLREQUEST = "${url('pullrequest_update',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}" |
|
162 | AJAX_UPDATE_PULLREQUEST = "${url('pullrequest_update',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}" | |
163 | </script> |
|
163 | </script> | |
164 |
|
164 | |||
165 | ## diff block |
|
165 | ## diff block | |
166 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
166 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
167 | %for fid, change, f, stat in c.files: |
|
167 | %for fid, change, f, stat in c.files: | |
168 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
168 | ${diff_block.diff_block_simple([c.changes[fid]])} | |
169 | %endfor |
|
169 | %endfor | |
170 | % if c.limited_diff: |
|
170 | % if c.limited_diff: | |
171 | <h4>${_('Changeset was too big and was cut off...')}</h4> |
|
171 | <h4>${_('Changeset was too big and was cut off...')}</h4> | |
172 | % endif |
|
172 | % endif | |
173 |
|
173 | |||
174 |
|
174 | |||
175 | ## template for inline comment form |
|
175 | ## template for inline comment form | |
176 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
176 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
177 | ${comment.comment_inline_form()} |
|
177 | ${comment.comment_inline_form()} | |
178 |
|
178 | |||
179 | ## render comments and inlines |
|
179 | ## render comments and inlines | |
180 | ${comment.generate_comments()} |
|
180 | ${comment.generate_comments()} | |
181 |
|
181 | |||
182 | % if not c.pull_request.is_closed(): |
|
182 | % if not c.pull_request.is_closed(): | |
183 | ## main comment form and it status |
|
183 | ## main comment form and it status | |
184 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, |
|
184 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, | |
185 | pull_request_id=c.pull_request.pull_request_id), |
|
185 | pull_request_id=c.pull_request.pull_request_id), | |
186 | c.current_changeset_status, |
|
186 | c.current_changeset_status, | |
187 | close_btn=True, change_status=c.allowed_to_change_status)} |
|
187 | close_btn=True, change_status=c.allowed_to_change_status)} | |
188 | %endif |
|
188 | %endif | |
189 |
|
189 | |||
190 | <script type="text/javascript"> |
|
190 | <script type="text/javascript"> | |
191 | YUE.onDOMReady(function(){ |
|
191 | YUE.onDOMReady(function(){ | |
192 |
|
|
192 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); | |
193 |
|
193 | |||
194 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
194 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ | |
195 | var show = 'none'; |
|
195 | var show = 'none'; | |
196 | var target = e.currentTarget; |
|
196 | var target = e.currentTarget; | |
197 | if(target.checked){ |
|
197 | if(target.checked){ | |
198 | var show = '' |
|
198 | var show = '' | |
199 | } |
|
199 | } | |
200 | var boxid = YUD.getAttribute(target,'id_for'); |
|
200 | var boxid = YUD.getAttribute(target,'id_for'); | |
201 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
201 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); | |
202 | for(c in comments){ |
|
202 | for(c in comments){ | |
203 | YUD.setStyle(comments[c],'display',show); |
|
203 | YUD.setStyle(comments[c],'display',show); | |
204 | } |
|
204 | } | |
205 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
205 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); | |
206 | for(c in btns){ |
|
206 | for(c in btns){ | |
207 | YUD.setStyle(btns[c],'display',show); |
|
207 | YUD.setStyle(btns[c],'display',show); | |
208 | } |
|
208 | } | |
209 | }) |
|
209 | }) | |
210 |
|
210 | |||
211 | YUE.on(YUQ('.line'),'click',function(e){ |
|
211 | YUE.on(YUQ('.line'),'click',function(e){ | |
212 | var tr = e.currentTarget; |
|
212 | var tr = e.currentTarget; | |
213 | injectInlineForm(tr); |
|
213 | injectInlineForm(tr); | |
214 | }); |
|
214 | }); | |
215 |
|
215 | |||
216 | // inject comments into they proper positions |
|
216 | // inject comments into they proper positions | |
217 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
217 | var file_comments = YUQ('.inline-comment-placeholder'); | |
218 | renderInlineComments(file_comments); |
|
218 | renderInlineComments(file_comments); | |
219 |
|
219 | |||
220 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ |
|
220 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ | |
221 |
|
|
221 | updateReviewers(); | |
222 | }) |
|
222 | }) | |
223 | }) |
|
223 | }) | |
224 | </script> |
|
224 | </script> | |
225 |
|
225 | |||
226 | </div> |
|
226 | </div> | |
227 |
|
227 | |||
228 | </%def> |
|
228 | </%def> |
@@ -1,91 +1,91 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base/root.html"/> |
|
2 | <%inherit file="base/root.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Sign Up')} - ${c.rhodecode_name} |
|
5 | ${_('Sign Up')} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <div id="register"> |
|
8 | <div id="register"> | |
9 |
|
9 | |||
10 |
|
|
10 | <div class="title top-left-rounded-corner top-right-rounded-corner"> | |
11 |
|
|
11 | <h5>${_('Sign Up to')} ${c.rhodecode_name}</h5> | |
12 |
|
|
12 | </div> | |
13 |
|
|
13 | <div class="inner"> | |
14 |
|
|
14 | ${h.form(url('register'))} | |
15 |
|
|
15 | <div class="form"> | |
16 |
|
|
16 | <!-- fields --> | |
17 |
|
|
17 | <div class="fields"> | |
18 |
|
|
18 | <div class="field"> | |
19 |
|
|
19 | <div class="label"> | |
20 |
|
|
20 | <label for="username">${_('Username')}:</label> | |
21 |
|
|
21 | </div> | |
22 |
|
|
22 | <div class="input"> | |
23 |
|
|
23 | ${h.text('username',class_="medium")} | |
24 |
|
|
24 | </div> | |
25 |
|
|
25 | </div> | |
26 |
|
26 | |||
27 |
|
|
27 | <div class="field"> | |
28 |
|
|
28 | <div class="label"> | |
29 |
|
|
29 | <label for="password">${_('Password')}:</label> | |
30 |
|
|
30 | </div> | |
31 |
|
|
31 | <div class="input"> | |
32 |
|
|
32 | ${h.password('password',class_="medium")} | |
33 |
|
|
33 | </div> | |
34 |
|
|
34 | </div> | |
35 |
|
35 | |||
36 | <div class="field"> |
|
36 | <div class="field"> | |
37 | <div class="label"> |
|
37 | <div class="label"> | |
38 | <label for="password">${_('Re-enter password')}:</label> |
|
38 | <label for="password">${_('Re-enter password')}:</label> | |
39 | </div> |
|
39 | </div> | |
40 | <div class="input"> |
|
40 | <div class="input"> | |
41 | ${h.password('password_confirmation',class_="medium")} |
|
41 | ${h.password('password_confirmation',class_="medium")} | |
42 | </div> |
|
42 | </div> | |
43 | </div> |
|
43 | </div> | |
44 |
|
44 | |||
45 |
|
|
45 | <div class="field"> | |
46 |
|
|
46 | <div class="label"> | |
47 |
|
|
47 | <label for="firstname">${_('First Name')}:</label> | |
48 |
|
|
48 | </div> | |
49 |
|
|
49 | <div class="input"> | |
50 |
|
|
50 | ${h.text('firstname',class_="medium")} | |
51 |
|
|
51 | </div> | |
52 |
|
|
52 | </div> | |
53 |
|
53 | |||
54 |
|
|
54 | <div class="field"> | |
55 |
|
|
55 | <div class="label"> | |
56 |
|
|
56 | <label for="lastname">${_('Last Name')}:</label> | |
57 |
|
|
57 | </div> | |
58 |
|
|
58 | <div class="input"> | |
59 |
|
|
59 | ${h.text('lastname',class_="medium")} | |
60 |
|
|
60 | </div> | |
61 |
|
|
61 | </div> | |
62 |
|
62 | |||
63 |
|
|
63 | <div class="field"> | |
64 |
|
|
64 | <div class="label"> | |
65 |
|
|
65 | <label for="email">${_('Email')}:</label> | |
66 |
|
|
66 | </div> | |
67 |
|
|
67 | <div class="input"> | |
68 |
|
|
68 | ${h.text('email',class_="medium")} | |
69 |
|
|
69 | </div> | |
70 |
|
|
70 | </div> | |
71 |
|
71 | |||
72 |
|
|
72 | <div class="buttons"> | |
73 |
|
|
73 | <div class="nohighlight"> | |
74 |
|
|
74 | ${h.submit('sign_up',_('Sign Up'),class_="ui-btn large")} | |
75 |
|
|
75 | %if c.auto_active: | |
76 |
|
|
76 | <div class="activation_msg">${_('Your account will be activated right after registration')}</div> | |
77 | %else: |
|
77 | %else: | |
78 |
|
|
78 | <div class="activation_msg">${_('Your account must wait for activation by administrator')}</div> | |
79 | %endif |
|
79 | %endif | |
80 |
|
|
80 | </div> | |
81 |
|
|
81 | </div> | |
82 |
|
|
82 | </div> | |
83 |
|
|
83 | </div> | |
84 |
|
|
84 | ${h.end_form()} | |
85 | <script type="text/javascript"> |
|
85 | <script type="text/javascript"> | |
86 | YUE.onDOMReady(function(){ |
|
86 | YUE.onDOMReady(function(){ | |
87 | YUD.get('username').focus(); |
|
87 | YUD.get('username').focus(); | |
88 | }) |
|
88 | }) | |
89 | </script> |
|
89 | </script> | |
90 |
|
|
90 | </div> | |
91 | </div> |
|
91 | </div> |
@@ -1,87 +1,87 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | %if c.cur_query: |
|
4 | %if c.cur_query: | |
5 |
|
|
5 | %if c.repo_name: | |
6 |
|
|
6 | ${_('Search "%s" in repository: %s') % (c.cur_query, c.repo_name)} | |
7 |
|
|
7 | %else: | |
8 |
|
|
8 | ${_('Search "%s" in all repositories') % c.cur_query} | |
9 |
|
|
9 | %endif | |
10 | %else: |
|
10 | %else: | |
11 |
|
|
11 | %if c.repo_name: | |
12 |
|
|
12 | ${_('Search in repository: %s') % c.repo_name} | |
13 |
|
|
13 | %else: | |
14 |
|
|
14 | ${_('Search in all repositories')} | |
15 |
|
|
15 | %endif | |
16 | %endif |
|
16 | %endif | |
17 |
|
|
17 | - ${c.rhodecode_name} | |
18 | </%def> |
|
18 | </%def> | |
19 | <%def name="breadcrumbs()"> |
|
19 | <%def name="breadcrumbs()"> | |
20 |
|
|
20 | ${c.rhodecode_name} | |
21 | </%def> |
|
21 | </%def> | |
22 | <%def name="page_nav()"> |
|
22 | <%def name="page_nav()"> | |
23 |
|
|
23 | ${self.menu('home')} | |
24 | </%def> |
|
24 | </%def> | |
25 | <%def name="main()"> |
|
25 | <%def name="main()"> | |
26 |
|
26 | |||
27 | <div class="box"> |
|
27 | <div class="box"> | |
28 |
|
|
28 | <!-- box / title --> | |
29 |
|
|
29 | <div class="title"> | |
30 | <h5> |
|
30 | <h5> | |
31 |
|
|
31 | %if c.repo_name: | |
32 |
|
|
32 | ${_('Search in repository: %s') % c.repo_name} | |
33 | %else: |
|
33 | %else: | |
34 |
|
|
34 | ${_('Search in all repositories')} | |
35 | %endif |
|
35 | %endif | |
36 | </h5> |
|
36 | </h5> | |
37 |
|
|
37 | </div> | |
38 |
|
|
38 | <!-- end box / title --> | |
39 |
|
|
39 | %if c.repo_name: | |
40 |
|
|
40 | ${h.form(h.url('search_repo',search_repo=c.repo_name),method='get')} | |
41 |
|
|
41 | %else: | |
42 |
|
|
42 | ${h.form(h.url('search'),method='get')} | |
43 |
|
|
43 | %endif | |
44 |
|
|
44 | <div class="form"> | |
45 |
|
|
45 | <div class="fields"> | |
46 |
|
|
46 | <div class="field field-first field-noborder"> | |
47 | <div class="label"> |
|
47 | <div class="label"> | |
48 | <label for="q">${_('Search term')}</label> |
|
48 | <label for="q">${_('Search term')}</label> | |
49 | </div> |
|
49 | </div> | |
50 |
|
|
50 | <div class="input">${h.text('q',c.cur_query,class_="small")} | |
51 |
|
|
51 | <div class="button highlight"> | |
52 |
|
|
52 | <input type="submit" value="${_('Search')}" class="ui-button"/> | |
53 | </div> |
|
53 | </div> | |
54 | </div> |
|
54 | </div> | |
55 |
|
|
55 | <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> | |
56 | </div> |
|
56 | </div> | |
57 |
|
57 | |||
58 |
|
|
58 | <div class="field"> | |
59 |
|
|
59 | <div class="label"> | |
60 |
|
|
60 | <label for="type">${_('Search in')}</label> | |
61 |
|
|
61 | </div> | |
62 | <div class="select"> |
|
62 | <div class="select"> | |
63 | ${h.select('type',c.cur_type,[('content',_('File contents')), |
|
63 | ${h.select('type',c.cur_type,[('content',_('File contents')), | |
64 | ('commit',_('Commit messages')), |
|
64 | ('commit',_('Commit messages')), | |
65 | ('path',_('File names')), |
|
65 | ('path',_('File names')), | |
66 | ##('repository',_('Repository names')), |
|
66 | ##('repository',_('Repository names')), | |
67 | ])} |
|
67 | ])} | |
68 | </div> |
|
68 | </div> | |
69 | </div> |
|
69 | </div> | |
70 |
|
70 | |||
71 | </div> |
|
71 | </div> | |
72 |
|
|
72 | </div> | |
73 |
|
|
73 | ${h.end_form()} | |
74 | <div class="search"> |
|
74 | <div class="search"> | |
75 | %if c.cur_type == 'content': |
|
75 | %if c.cur_type == 'content': | |
76 | <%include file='search_content.html'/> |
|
76 | <%include file='search_content.html'/> | |
77 | %elif c.cur_type == 'path': |
|
77 | %elif c.cur_type == 'path': | |
78 | <%include file='search_path.html'/> |
|
78 | <%include file='search_path.html'/> | |
79 | %elif c.cur_type == 'commit': |
|
79 | %elif c.cur_type == 'commit': | |
80 | <%include file='search_commit.html'/> |
|
80 | <%include file='search_commit.html'/> | |
81 | %elif c.cur_type == 'repository': |
|
81 | %elif c.cur_type == 'repository': | |
82 | <%include file='search_repository.html'/> |
|
82 | <%include file='search_repository.html'/> | |
83 | %endif |
|
83 | %endif | |
84 | </div> |
|
84 | </div> | |
85 | </div> |
|
85 | </div> | |
86 |
|
86 | |||
87 | </%def> |
|
87 | </%def> |
@@ -1,26 +1,26 b'' | |||||
1 | ##path search |
|
1 | ##path search | |
2 |
|
2 | |||
3 | %for cnt,sr in enumerate(c.formated_results): |
|
3 | %for cnt,sr in enumerate(c.formated_results): | |
4 | %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(sr['repository'],'search results check'): |
|
4 | %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(sr['repository'],'search results check'): | |
5 |
|
|
5 | <div class="search_path"> | |
6 |
|
|
6 | <div class="link"> | |
7 |
|
|
7 | ${h.link_to(h.literal('%s » %s' % (sr['repository'],sr['f_path'])), | |
8 |
|
|
8 | h.url('files_home',repo_name=sr['repository'],revision='tip',f_path=sr['f_path']))} | |
9 |
|
|
9 | </div> | |
10 |
|
|
10 | </div> | |
11 | %else: |
|
11 | %else: | |
12 | %if cnt == 0: |
|
12 | %if cnt == 0: | |
13 |
|
|
13 | <div class="error"> | |
14 |
|
|
14 | <div class="link"> | |
15 |
|
|
15 | ${_('Permission denied')} | |
16 |
|
|
16 | </div> | |
17 |
|
|
17 | </div> | |
18 | %endif |
|
18 | %endif | |
19 |
|
19 | |||
20 | %endif |
|
20 | %endif | |
21 | %endfor |
|
21 | %endfor | |
22 | %if c.cur_query and c.formated_results: |
|
22 | %if c.cur_query and c.formated_results: | |
23 | <div class="pagination-wh pagination-left"> |
|
23 | <div class="pagination-wh pagination-left"> | |
24 | ${c.formated_results.pager('$link_previous ~2~ $link_next')} |
|
24 | ${c.formated_results.pager('$link_previous ~2~ $link_next')} | |
25 | </div> |
|
25 | </div> | |
26 | %endif |
|
26 | %endif |
@@ -1,130 +1,130 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Settings') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Settings') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
10 | » |
|
10 | » | |
11 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} |
|
11 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} | |
12 | » |
|
12 | » | |
13 | ${_('Settings')} |
|
13 | ${_('Settings')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="page_nav()"> |
|
16 | <%def name="page_nav()"> | |
17 | ${self.menu('settings')} |
|
17 | ${self.menu('settings')} | |
18 | </%def> |
|
18 | </%def> | |
19 | <%def name="main()"> |
|
19 | <%def name="main()"> | |
20 | <div class="box"> |
|
20 | <div class="box"> | |
21 | <!-- box / title --> |
|
21 | <!-- box / title --> | |
22 | <div class="title"> |
|
22 | <div class="title"> | |
23 | ${self.breadcrumbs()} |
|
23 | ${self.breadcrumbs()} | |
24 | </div> |
|
24 | </div> | |
25 | ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')} |
|
25 | ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')} | |
26 | <div class="form"> |
|
26 | <div class="form"> | |
27 | <!-- fields --> |
|
27 | <!-- fields --> | |
28 | <div class="fields"> |
|
28 | <div class="fields"> | |
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="label"> |
|
30 | <div class="label"> | |
31 | <label for="repo_name">${_('Name')}:</label> |
|
31 | <label for="repo_name">${_('Name')}:</label> | |
32 | </div> |
|
32 | </div> | |
33 | <div class="input input-medium"> |
|
33 | <div class="input input-medium"> | |
34 | ${h.text('repo_name',class_="small")} |
|
34 | ${h.text('repo_name',class_="small")} | |
35 | </div> |
|
35 | </div> | |
36 | </div> |
|
36 | </div> | |
37 |
|
|
37 | <div class="field"> | |
38 |
|
|
38 | <div class="label"> | |
39 |
|
|
39 | <label for="clone_uri">${_('Clone uri')}:</label> | |
40 |
|
|
40 | </div> | |
41 |
|
|
41 | <div class="input"> | |
42 |
|
|
42 | ${h.text('clone_uri',class_="medium")} | |
43 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
43 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> | |
44 |
|
|
44 | </div> | |
45 |
|
|
45 | </div> | |
46 | <div class="field"> |
|
46 | <div class="field"> | |
47 | <div class="label"> |
|
47 | <div class="label"> | |
48 | <label for="repo_group">${_('Repository group')}:</label> |
|
48 | <label for="repo_group">${_('Repository group')}:</label> | |
49 | </div> |
|
49 | </div> | |
50 | <div class="input"> |
|
50 | <div class="input"> | |
51 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
51 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
52 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> |
|
52 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> | |
53 | </div> |
|
53 | </div> | |
54 | </div> |
|
54 | </div> | |
55 | <div class="field"> |
|
55 | <div class="field"> | |
56 | <div class="label"> |
|
56 | <div class="label"> | |
57 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
57 | <label for="landing_rev">${_('Landing revision')}:</label> | |
58 | </div> |
|
58 | </div> | |
59 | <div class="input"> |
|
59 | <div class="input"> | |
60 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
60 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} | |
61 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
61 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
62 | </div> |
|
62 | </div> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="field"> |
|
64 | <div class="field"> | |
65 | <div class="label label-textarea"> |
|
65 | <div class="label label-textarea"> | |
66 | <label for="repo_description">${_('Description')}:</label> |
|
66 | <label for="repo_description">${_('Description')}:</label> | |
67 | </div> |
|
67 | </div> | |
68 | <div class="textarea text-area editor"> |
|
68 | <div class="textarea text-area editor"> | |
69 | ${h.textarea('repo_description')} |
|
69 | ${h.textarea('repo_description')} | |
70 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
70 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 |
|
73 | |||
74 | <div class="field"> |
|
74 | <div class="field"> | |
75 | <div class="label label-checkbox"> |
|
75 | <div class="label label-checkbox"> | |
76 | <label for="repo_private">${_('Private repository')}:</label> |
|
76 | <label for="repo_private">${_('Private repository')}:</label> | |
77 | </div> |
|
77 | </div> | |
78 | <div class="checkboxes"> |
|
78 | <div class="checkboxes"> | |
79 | ${h.checkbox('repo_private',value="True")} |
|
79 | ${h.checkbox('repo_private',value="True")} | |
80 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
80 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 |
|
83 | |||
84 | <div class="field"> |
|
84 | <div class="field"> | |
85 | <div class="label"> |
|
85 | <div class="label"> | |
86 | <label for="">${_('Permissions')}:</label> |
|
86 | <label for="">${_('Permissions')}:</label> | |
87 | </div> |
|
87 | </div> | |
88 | <div class="input"> |
|
88 | <div class="input"> | |
89 | <%include file="../admin/repos/repo_edit_perms.html"/> |
|
89 | <%include file="../admin/repos/repo_edit_perms.html"/> | |
90 | </div> |
|
90 | </div> | |
91 | </div> |
|
91 | </div> | |
92 |
|
92 | |||
93 | <div class="buttons"> |
|
93 | <div class="buttons"> | |
94 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
94 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |
95 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
95 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
96 | </div> |
|
96 | </div> | |
97 |
|
97 | |||
98 | </div> |
|
98 | </div> | |
99 | ${h.end_form()} |
|
99 | ${h.end_form()} | |
100 | </div> |
|
100 | </div> | |
101 |
|
101 | |||
102 | <h3>${_('Delete repository')}</h3> |
|
102 | <h3>${_('Delete repository')}</h3> | |
103 | <div class="form"> |
|
103 | <div class="form"> | |
104 | <!-- fields --> |
|
104 | <!-- fields --> | |
105 | <div class="fields"> |
|
105 | <div class="fields"> | |
106 |
|
106 | |||
107 | <div class="field"> |
|
107 | <div class="field"> | |
108 | <div class="label"> |
|
108 | <div class="label"> | |
109 | <label for="">${_('Remove repo')}:</label> |
|
109 | <label for="">${_('Remove repo')}:</label> | |
110 | </div> |
|
110 | </div> | |
111 | <div class="checkboxes"> |
|
111 | <div class="checkboxes"> | |
112 | ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')} |
|
112 | ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')} | |
113 | <div class=""> |
|
113 | <div class=""> | |
114 | <div class="fields"> |
|
114 | <div class="fields"> | |
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')+"');")} |
|
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 | </div> |
|
116 | </div> | |
117 | <div class="field" style="border:none;color:#888"> |
|
117 | <div class="field" style="border:none;color:#888"> | |
118 | <ul> |
|
118 | <ul> | |
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> |
|
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 | </ul> |
|
120 | </ul> | |
121 | </div> |
|
121 | </div> | |
122 | </div> |
|
122 | </div> | |
123 | ${h.end_form()} |
|
123 | ${h.end_form()} | |
124 | </div> |
|
124 | </div> | |
125 | </div> |
|
125 | </div> | |
126 | </div> |
|
126 | </div> | |
127 | </div> |
|
127 | </div> | |
128 |
|
128 | |||
129 | </div> |
|
129 | </div> | |
130 | </%def> |
|
130 | </%def> |
@@ -1,39 +1,39 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Shortlog') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Shortlog') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | ${h.link_to(_(u'Home'),h.url('/'))} | |
11 | » |
|
11 | » | |
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
13 | » |
|
13 | » | |
14 | %if c.file_history: |
|
14 | %if c.file_history: | |
15 | ${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))} |
|
15 | ${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))} | |
16 | » |
|
16 | » | |
17 | ${c.file_history} |
|
17 | ${c.file_history} | |
18 | %else: |
|
18 | %else: | |
19 | ${_('shortlog')} |
|
19 | ${_('shortlog')} | |
20 | %endif |
|
20 | %endif | |
21 | </%def> |
|
21 | </%def> | |
22 |
|
22 | |||
23 | <%def name="page_nav()"> |
|
23 | <%def name="page_nav()"> | |
24 | ${self.menu('shortlog')} |
|
24 | ${self.menu('shortlog')} | |
25 | </%def> |
|
25 | </%def> | |
26 | <%def name="main()"> |
|
26 | <%def name="main()"> | |
27 | <div class="box"> |
|
27 | <div class="box"> | |
28 | <!-- box / title --> |
|
28 | <!-- box / title --> | |
29 | <div class="title"> |
|
29 | <div class="title"> | |
30 | ${self.breadcrumbs()} |
|
30 | ${self.breadcrumbs()} | |
31 | </div> |
|
31 | </div> | |
32 | <!-- end box / title --> |
|
32 | <!-- end box / title --> | |
33 | <div class="table"> |
|
33 | <div class="table"> | |
34 |
|
|
34 | <div id="shortlog_data"> | |
35 |
|
|
35 | ${c.shortlog_data} | |
36 |
|
|
36 | </div> | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 | </%def> |
|
39 | </%def> |
@@ -1,101 +1,101 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | %if c.repo_changesets: |
|
2 | %if c.repo_changesets: | |
3 | <table class="table_disp"> |
|
3 | <table class="table_disp"> | |
4 |
|
|
4 | <tr> | |
5 |
|
|
5 | <th class="left">${_('revision')}</th> | |
6 | <th class="left">${_('commit message')}</th> |
|
6 | <th class="left">${_('commit message')}</th> | |
7 |
|
|
7 | <th class="left">${_('age')}</th> | |
8 |
|
|
8 | <th class="left">${_('author')}</th> | |
9 |
|
|
9 | <th class="left">${_('branch')}</th> | |
10 |
|
|
10 | <th class="left">${_('tags')}</th> | |
11 |
|
|
11 | </tr> | |
12 | %for cnt,cs in enumerate(c.repo_changesets): |
|
12 | %for cnt,cs in enumerate(c.repo_changesets): | |
13 |
|
|
13 | <tr class="parity${cnt%2}"> | |
14 | <td> |
|
14 | <td> | |
15 | <div> |
|
15 | <div> | |
16 | <div class="changeset-status-container"> |
|
16 | <div class="changeset-status-container"> | |
17 | %if c.statuses.get(cs.raw_id): |
|
17 | %if c.statuses.get(cs.raw_id): | |
18 | <div class="changeset-status-ico"> |
|
18 | <div class="changeset-status-ico"> | |
19 | %if c.statuses.get(cs.raw_id)[2]: |
|
19 | %if c.statuses.get(cs.raw_id)[2]: | |
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])}"> |
|
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 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> |
|
21 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> | |
22 | </a> |
|
22 | </a> | |
23 | %else: |
|
23 | %else: | |
24 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> |
|
24 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> | |
25 | %endif |
|
25 | %endif | |
26 | </div> |
|
26 | </div> | |
27 | %endif |
|
27 | %endif | |
28 | </div> |
|
28 | </div> | |
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> |
|
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 | </div> |
|
30 | </div> | |
31 | </td> |
|
31 | </td> | |
32 | <td> |
|
32 | <td> | |
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))} |
|
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 | </td> |
|
34 | </td> | |
35 | <td><span class="tooltip" title="${h.tooltip(h.fmt_date(cs.date))}"> |
|
35 | <td><span class="tooltip" title="${h.tooltip(h.fmt_date(cs.date))}"> | |
36 | ${h.age(cs.date)}</span> |
|
36 | ${h.age(cs.date)}</span> | |
37 | </td> |
|
37 | </td> | |
38 |
|
|
38 | <td title="${cs.author}">${h.person(cs.author)}</td> | |
39 | <td> |
|
39 | <td> | |
40 |
|
|
40 | <span class="logtags"> | |
41 | %if cs.branch: |
|
41 | %if cs.branch: | |
42 |
|
|
42 | <span class="branchtag"> | |
43 | ${cs.branch} |
|
43 | ${cs.branch} | |
44 | </span> |
|
44 | </span> | |
45 | %endif |
|
45 | %endif | |
46 | </span> |
|
46 | </span> | |
47 | </td> |
|
47 | </td> | |
48 | <td> |
|
48 | <td> | |
49 |
|
|
49 | <span class="logtags"> | |
50 |
|
|
50 | %for tag in cs.tags: | |
51 |
|
|
51 | <span class="tagtag">${tag}</span> | |
52 | %endfor |
|
52 | %endfor | |
53 | </span> |
|
53 | </span> | |
54 | </td> |
|
54 | </td> | |
55 |
|
|
55 | </tr> | |
56 | %endfor |
|
56 | %endfor | |
57 |
|
57 | |||
58 | </table> |
|
58 | </table> | |
59 |
|
59 | |||
60 | <script type="text/javascript"> |
|
60 | <script type="text/javascript"> | |
61 | YUE.onDOMReady(function(){ |
|
61 | YUE.onDOMReady(function(){ | |
62 | YUE.delegate("shortlog_data","click",function(e, matchedEl, container){ |
|
62 | YUE.delegate("shortlog_data","click",function(e, matchedEl, container){ | |
63 | ypjax(e.target.href,"shortlog_data",function(){tooltip_activate();}); |
|
63 | ypjax(e.target.href,"shortlog_data",function(){tooltip_activate();}); | |
64 | YUE.preventDefault(e); |
|
64 | YUE.preventDefault(e); | |
65 | },'.pager_link'); |
|
65 | },'.pager_link'); | |
66 | }); |
|
66 | }); | |
67 | </script> |
|
67 | </script> | |
68 |
|
68 | |||
69 | <div class="pagination-wh pagination-left"> |
|
69 | <div class="pagination-wh pagination-left"> | |
70 | ${c.repo_changesets.pager('$link_previous ~2~ $link_next')} |
|
70 | ${c.repo_changesets.pager('$link_previous ~2~ $link_next')} | |
71 | </div> |
|
71 | </div> | |
72 | %else: |
|
72 | %else: | |
73 |
|
73 | |||
74 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
74 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
75 | <h4>${_('Add or upload files directly via RhodeCode')}</h4> |
|
75 | <h4>${_('Add or upload files directly via RhodeCode')}</h4> | |
76 | <div style="margin: 20px 30px;"> |
|
76 | <div style="margin: 20px 30px;"> | |
77 | <div id="add_node_id" class="add_node"> |
|
77 | <div id="add_node_id" class="add_node"> | |
78 | <a class="ui-btn" href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='')}">${_('add new file')}</a> |
|
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 | </div> |
|
79 | </div> | |
80 | </div> |
|
80 | </div> | |
81 | %endif |
|
81 | %endif | |
82 |
|
82 | |||
83 |
|
83 | |||
84 | <h4>${_('Push new repo')}</h4> |
|
84 | <h4>${_('Push new repo')}</h4> | |
85 | <pre> |
|
85 | <pre> | |
86 | ${c.rhodecode_repo.alias} clone ${c.clone_repo_url} |
|
86 | ${c.rhodecode_repo.alias} clone ${c.clone_repo_url} | |
87 | ${c.rhodecode_repo.alias} add README # add first file |
|
87 | ${c.rhodecode_repo.alias} add README # add first file | |
88 | ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message |
|
88 | ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message | |
89 | ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back |
|
89 | ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back | |
90 | </pre> |
|
90 | </pre> | |
91 |
|
91 | |||
92 | <h4>${_('Existing repository?')}</h4> |
|
92 | <h4>${_('Existing repository?')}</h4> | |
93 | <pre> |
|
93 | <pre> | |
94 | %if h.is_git(c.rhodecode_repo): |
|
94 | %if h.is_git(c.rhodecode_repo): | |
95 | git remote add origin ${c.clone_repo_url} |
|
95 | git remote add origin ${c.clone_repo_url} | |
96 | git push -u origin master |
|
96 | git push -u origin master | |
97 | %else: |
|
97 | %else: | |
98 | hg push ${c.clone_repo_url} |
|
98 | hg push ${c.clone_repo_url} | |
99 | %endif |
|
99 | %endif | |
100 | </pre> |
|
100 | </pre> | |
101 | %endif |
|
101 | %endif |
@@ -1,721 +1,721 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('%s Summary') % c.repo_name} - ${c.rhodecode_name} |
|
4 | ${_('%s Summary') % c.repo_name} - ${c.rhodecode_name} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
9 | » |
|
9 | » | |
10 | ${h.repo_link(c.dbrepo.groups_and_repo)} |
|
10 | ${h.repo_link(c.dbrepo.groups_and_repo)} | |
11 | » |
|
11 | » | |
12 | ${_('summary')} |
|
12 | ${_('summary')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="page_nav()"> |
|
15 | <%def name="page_nav()"> | |
16 |
|
|
16 | ${self.menu('summary')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="head_extra()"> |
|
19 | <%def name="head_extra()"> | |
20 | <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s ATOM feed') % c.repo_name}" type="application/atom+xml" /> |
|
20 | <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s ATOM feed') % c.repo_name}" type="application/atom+xml" /> | |
21 | <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s RSS feed') % c.repo_name}" type="application/rss+xml" /> |
|
21 | <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s RSS feed') % c.repo_name}" type="application/rss+xml" /> | |
22 | </%def> |
|
22 | </%def> | |
23 |
|
23 | |||
24 | <%def name="main()"> |
|
24 | <%def name="main()"> | |
25 | <% |
|
25 | <% | |
26 | summary = lambda n:{False:'summary-short'}.get(n) |
|
26 | summary = lambda n:{False:'summary-short'}.get(n) | |
27 | %> |
|
27 | %> | |
28 | %if c.show_stats: |
|
28 | %if c.show_stats: | |
29 | <div class="box box-left"> |
|
29 | <div class="box box-left"> | |
30 | %else: |
|
30 | %else: | |
31 | <div class="box"> |
|
31 | <div class="box"> | |
32 | %endif |
|
32 | %endif | |
33 | <!-- box / title --> |
|
33 | <!-- box / title --> | |
34 | <div class="title"> |
|
34 | <div class="title"> | |
35 | ${self.breadcrumbs()} |
|
35 | ${self.breadcrumbs()} | |
36 | </div> |
|
36 | </div> | |
37 | <!-- end box / title --> |
|
37 | <!-- end box / title --> | |
38 |
|
|
38 | <div class="form"> | |
39 |
|
|
39 | <div id="summary" class="fields"> | |
40 |
|
40 | |||
41 |
|
|
41 | <div class="field"> | |
42 |
|
|
42 | <div class="label-summary"> | |
43 |
|
|
43 | <label>${_('Name')}:</label> | |
44 | </div> |
|
44 | </div> | |
45 |
|
|
45 | <div class="input ${summary(c.show_stats)}"> | |
46 | <div style="float:right;padding:5px 0px 0px 5px"> |
|
46 | <div style="float:right;padding:5px 0px 0px 5px"> | |
47 | %if c.rhodecode_user.username != 'default': |
|
47 | %if c.rhodecode_user.username != 'default': | |
48 | ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='rss_icon')} |
|
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 | ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='atom_icon')} |
|
49 | ${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 | %else: |
|
50 | %else: | |
51 | ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name),class_='rss_icon')} |
|
51 | ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name),class_='rss_icon')} | |
52 | ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')} |
|
52 | ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')} | |
53 | %endif |
|
53 | %endif | |
54 | </div> |
|
54 | </div> | |
55 | %if c.rhodecode_user.username != 'default': |
|
55 | %if c.rhodecode_user.username != 'default': | |
56 | %if c.following: |
|
56 | %if c.following: | |
57 | <span id="follow_toggle" class="following tooltip" title="${_('Stop following this repository')}" |
|
57 | <span id="follow_toggle" class="following tooltip" title="${_('Stop following this repository')}" | |
58 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> |
|
58 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> | |
59 | </span> |
|
59 | </span> | |
60 | %else: |
|
60 | %else: | |
61 | <span id="follow_toggle" class="follow tooltip" title="${_('Start following this repository')}" |
|
61 | <span id="follow_toggle" class="follow tooltip" title="${_('Start following this repository')}" | |
62 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> |
|
62 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> | |
63 | </span> |
|
63 | </span> | |
64 | %endif |
|
64 | %endif | |
65 | %endif: |
|
65 | %endif: | |
66 |
|
66 | |||
67 | ## locking icon |
|
67 | ## locking icon | |
68 | %if c.rhodecode_db_repo.enable_locking: |
|
68 | %if c.rhodecode_db_repo.enable_locking: | |
69 | %if c.rhodecode_db_repo.locked[0]: |
|
69 | %if c.rhodecode_db_repo.locked[0]: | |
70 | <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span> |
|
70 | <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span> | |
71 | %else: |
|
71 | %else: | |
72 | <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span> |
|
72 | <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span> | |
73 | %endif |
|
73 | %endif | |
74 | %endif |
|
74 | %endif | |
75 | ##REPO TYPE |
|
75 | ##REPO TYPE | |
76 |
|
|
76 | %if h.is_hg(c.dbrepo): | |
77 |
|
|
77 | <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> | |
78 |
|
|
78 | %endif | |
79 |
|
|
79 | %if h.is_git(c.dbrepo): | |
80 |
|
|
80 | <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> | |
81 |
|
|
81 | %endif | |
82 |
|
82 | |||
83 | ##PUBLIC/PRIVATE |
|
83 | ##PUBLIC/PRIVATE | |
84 |
|
|
84 | %if c.dbrepo.private: | |
85 |
|
|
85 | <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> | |
86 |
|
|
86 | %else: | |
87 |
|
|
87 | <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> | |
88 |
|
|
88 | %endif | |
89 |
|
89 | |||
90 |
|
|
90 | ##REPO NAME | |
91 |
|
|
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 | ##FORK |
|
93 | ##FORK | |
94 |
|
|
94 | %if c.dbrepo.fork: | |
95 |
|
|
95 | <div style="margin-top:5px;clear:both""> | |
96 |
|
|
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 |
|
|
97 | ${_('Fork of')} ${c.dbrepo.fork.repo_name} | |
98 |
|
|
98 | </a> | |
99 |
|
|
99 | </div> | |
100 |
|
|
100 | %endif | |
101 |
|
|
101 | ##REMOTE | |
102 |
|
|
102 | %if c.dbrepo.clone_uri: | |
103 | <div style="margin-top:5px;clear:both"> |
|
103 | <div style="margin-top:5px;clear:both"> | |
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')}"/> |
|
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 | ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)} |
|
105 | ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)} | |
106 | </a> |
|
106 | </a> | |
107 | </div> |
|
107 | </div> | |
108 | %endif |
|
108 | %endif | |
109 | </div> |
|
109 | </div> | |
110 | </div> |
|
110 | </div> | |
111 |
|
111 | |||
112 |
|
|
112 | <div class="field"> | |
113 |
|
|
113 | <div class="label-summary"> | |
114 |
|
|
114 | <label>${_('Description')}:</label> | |
115 | </div> |
|
115 | </div> | |
116 | %if c.visual.stylify_metatags: |
|
116 | %if c.visual.stylify_metatags: | |
117 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div> |
|
117 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div> | |
118 | %else: |
|
118 | %else: | |
119 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div> |
|
119 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div> | |
120 | %endif |
|
120 | %endif | |
121 | </div> |
|
121 | </div> | |
122 |
|
122 | |||
123 |
|
|
123 | <div class="field"> | |
124 |
|
|
124 | <div class="label-summary"> | |
125 |
|
|
125 | <label>${_('Contact')}:</label> | |
126 | </div> |
|
126 | </div> | |
127 |
|
|
127 | <div class="input ${summary(c.show_stats)}"> | |
128 |
|
|
128 | <div class="gravatar"> | |
129 |
|
|
129 | <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/> | |
130 | </div> |
|
130 | </div> | |
131 |
|
|
131 | ${_('Username')}: ${c.dbrepo.user.username}<br/> | |
132 |
|
|
132 | ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/> | |
133 |
|
|
133 | ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a> | |
134 | </div> |
|
134 | </div> | |
135 | </div> |
|
135 | </div> | |
136 |
|
136 | |||
137 |
|
|
137 | <div class="field"> | |
138 |
|
|
138 | <div class="label-summary"> | |
139 |
|
|
139 | <label>${_('Clone url')}:</label> | |
140 | </div> |
|
140 | </div> | |
141 |
|
|
141 | <div class="input ${summary(c.show_stats)}"> | |
142 | <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> |
|
142 | <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> | |
143 | <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> |
|
143 | <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> | |
144 |
|
|
144 | <input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> | |
145 | <input style="display:none;width:80%;margin-left:105px" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> |
|
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> |
|
146 | </div> | |
147 | </div> |
|
147 | </div> | |
148 |
|
148 | |||
149 |
|
|
149 | <div class="field"> | |
150 |
|
|
150 | <div class="label-summary"> | |
151 |
|
|
151 | <label>${_('Trending files')}:</label> | |
152 | </div> |
|
152 | </div> | |
153 |
|
|
153 | <div class="input ${summary(c.show_stats)}"> | |
154 | %if c.show_stats: |
|
154 | %if c.show_stats: | |
155 |
|
|
155 | <div id="lang_stats"></div> | |
156 | %else: |
|
156 | %else: | |
157 | ${_('Statistics are disabled for this repository')} |
|
157 | ${_('Statistics are disabled for this repository')} | |
158 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
158 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): | |
159 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
159 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | |
160 | %endif |
|
160 | %endif | |
161 | %endif |
|
161 | %endif | |
162 | </div> |
|
162 | </div> | |
163 | </div> |
|
163 | </div> | |
164 |
|
164 | |||
165 |
|
|
165 | <div class="field"> | |
166 |
|
|
166 | <div class="label-summary"> | |
167 |
|
|
167 | <label>${_('Download')}:</label> | |
168 | </div> |
|
168 | </div> | |
169 |
|
|
169 | <div class="input ${summary(c.show_stats)}"> | |
170 |
|
|
170 | %if len(c.rhodecode_repo.revisions) == 0: | |
171 |
|
|
171 | ${_('There are no downloads yet')} | |
172 |
|
|
172 | %elif c.enable_downloads is False: | |
173 |
|
|
173 | ${_('Downloads are disabled for this repository')} | |
174 | %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
|
174 | %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): | |
175 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
175 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | |
176 | %endif |
|
176 | %endif | |
177 |
|
|
177 | %else: | |
178 |
|
|
178 | ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)} | |
179 |
|
|
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 | <span style="vertical-align: bottom"> |
|
180 | <span style="vertical-align: bottom"> | |
181 | <input id="archive_subrepos" type="checkbox" name="subrepos" /> |
|
181 | <input id="archive_subrepos" type="checkbox" name="subrepos" /> | |
182 | <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label> |
|
182 | <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label> | |
183 | </span> |
|
183 | </span> | |
184 | %endif |
|
184 | %endif | |
185 | </div> |
|
185 | </div> | |
186 | </div> |
|
186 | </div> | |
187 |
|
|
187 | </div> | |
188 |
|
|
188 | </div> | |
189 | </div> |
|
189 | </div> | |
190 |
|
190 | |||
191 | %if c.show_stats: |
|
191 | %if c.show_stats: | |
192 | <div class="box box-right" style="min-height:455px"> |
|
192 | <div class="box box-right" style="min-height:455px"> | |
193 | <!-- box / title --> |
|
193 | <!-- box / title --> | |
194 | <div class="title"> |
|
194 | <div class="title"> | |
195 | <h5>${_('Commit activity by day / author')}</h5> |
|
195 | <h5>${_('Commit activity by day / author')}</h5> | |
196 | </div> |
|
196 | </div> | |
197 |
|
197 | |||
198 | <div class="graph"> |
|
198 | <div class="graph"> | |
199 | <div style="padding:0 10px 10px 17px;"> |
|
199 | <div style="padding:0 10px 10px 17px;"> | |
200 | %if c.no_data: |
|
200 | %if c.no_data: | |
201 | ${c.no_data_msg} |
|
201 | ${c.no_data_msg} | |
202 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
202 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): | |
203 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
203 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | |
204 | %endif |
|
204 | %endif | |
205 | %else: |
|
205 | %else: | |
206 | ${_('Stats gathered: ')} ${c.stats_percentage}% |
|
206 | ${_('Stats gathered: ')} ${c.stats_percentage}% | |
207 | %endif |
|
207 | %endif | |
208 | </div> |
|
208 | </div> | |
209 | <div id="commit_history" style="width:450px;height:300px;float:left"></div> |
|
209 | <div id="commit_history" style="width:450px;height:300px;float:left"></div> | |
210 | <div style="clear: both;height: 10px"></div> |
|
210 | <div style="clear: both;height: 10px"></div> | |
211 | <div id="overview" style="width:450px;height:100px;float:left"></div> |
|
211 | <div id="overview" style="width:450px;height:100px;float:left"></div> | |
212 |
|
212 | |||
213 |
|
|
213 | <div id="legend_data" style="clear:both;margin-top:10px;"> | |
214 |
|
|
214 | <div id="legend_container"></div> | |
215 |
|
|
215 | <div id="legend_choices"> | |
216 |
|
|
216 | <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table> | |
217 |
|
|
217 | </div> | |
218 |
|
|
218 | </div> | |
219 | </div> |
|
219 | </div> | |
220 | </div> |
|
220 | </div> | |
221 | %endif |
|
221 | %endif | |
222 |
|
222 | |||
223 | <div class="box"> |
|
223 | <div class="box"> | |
224 | <div class="title"> |
|
224 | <div class="title"> | |
225 | <div class="breadcrumbs"> |
|
225 | <div class="breadcrumbs"> | |
226 | %if c.repo_changesets: |
|
226 | %if c.repo_changesets: | |
227 | ${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))} |
|
227 | ${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))} | |
228 | %else: |
|
228 | %else: | |
229 | ${_('Quick start')} |
|
229 | ${_('Quick start')} | |
230 | %endif |
|
230 | %endif | |
231 | </div> |
|
231 | </div> | |
232 | </div> |
|
232 | </div> | |
233 | <div class="table"> |
|
233 | <div class="table"> | |
234 | <div id="shortlog_data"> |
|
234 | <div id="shortlog_data"> | |
235 | <%include file='../shortlog/shortlog_data.html'/> |
|
235 | <%include file='../shortlog/shortlog_data.html'/> | |
236 | </div> |
|
236 | </div> | |
237 | </div> |
|
237 | </div> | |
238 | </div> |
|
238 | </div> | |
239 |
|
239 | |||
240 | %if c.readme_data: |
|
240 | %if c.readme_data: | |
241 | <div id="readme" class="anchor"> |
|
241 | <div id="readme" class="anchor"> | |
242 | <div class="box" style="background-color: #FAFAFA"> |
|
242 | <div class="box" style="background-color: #FAFAFA"> | |
243 | <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}"> |
|
243 | <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}"> | |
244 | <div class="breadcrumbs"> |
|
244 | <div class="breadcrumbs"> | |
245 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> |
|
245 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> | |
246 | <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">¶</a> |
|
246 | <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">¶</a> | |
247 | </div> |
|
247 | </div> | |
248 | </div> |
|
248 | </div> | |
249 | <div class="readme"> |
|
249 | <div class="readme"> | |
250 | <div class="readme_box"> |
|
250 | <div class="readme_box"> | |
251 | ${c.readme_data|n} |
|
251 | ${c.readme_data|n} | |
252 | </div> |
|
252 | </div> | |
253 | </div> |
|
253 | </div> | |
254 | </div> |
|
254 | </div> | |
255 | </div> |
|
255 | </div> | |
256 | %endif |
|
256 | %endif | |
257 |
|
257 | |||
258 | <script type="text/javascript"> |
|
258 | <script type="text/javascript"> | |
259 | var clone_url = 'clone_url'; |
|
259 | var clone_url = 'clone_url'; | |
260 | YUE.on(clone_url,'click',function(e){ |
|
260 | YUE.on(clone_url,'click',function(e){ | |
261 | if(YUD.hasClass(clone_url,'selected')){ |
|
261 | if(YUD.hasClass(clone_url,'selected')){ | |
262 | return |
|
262 | return | |
263 | } |
|
263 | } | |
264 | else{ |
|
264 | else{ | |
265 | YUD.addClass(clone_url,'selected'); |
|
265 | YUD.addClass(clone_url,'selected'); | |
266 | YUD.get(clone_url).select(); |
|
266 | YUD.get(clone_url).select(); | |
267 | } |
|
267 | } | |
268 | }) |
|
268 | }) | |
269 |
|
269 | |||
270 | YUE.on('clone_by_name','click',function(e){ |
|
270 | YUE.on('clone_by_name','click',function(e){ | |
271 | // show url by name and hide name button |
|
271 | // show url by name and hide name button | |
272 | YUD.setStyle('clone_url','display',''); |
|
272 | YUD.setStyle('clone_url','display',''); | |
273 | YUD.setStyle('clone_by_name','display','none'); |
|
273 | YUD.setStyle('clone_by_name','display','none'); | |
274 |
|
274 | |||
275 | // hide url by id and show name button |
|
275 | // hide url by id and show name button | |
276 | YUD.setStyle('clone_by_id','display',''); |
|
276 | YUD.setStyle('clone_by_id','display',''); | |
277 | YUD.setStyle('clone_url_id','display','none'); |
|
277 | YUD.setStyle('clone_url_id','display','none'); | |
278 |
|
278 | |||
279 | }) |
|
279 | }) | |
280 | YUE.on('clone_by_id','click',function(e){ |
|
280 | YUE.on('clone_by_id','click',function(e){ | |
281 |
|
281 | |||
282 |
|
|
282 | // show url by id and hide id button | |
283 |
|
|
283 | YUD.setStyle('clone_by_id','display','none'); | |
284 | YUD.setStyle('clone_url_id','display',''); |
|
284 | YUD.setStyle('clone_url_id','display',''); | |
285 |
|
285 | |||
286 | // hide url by name and show id button |
|
286 | // hide url by name and show id button | |
287 |
|
|
287 | YUD.setStyle('clone_by_name','display',''); | |
288 |
|
|
288 | YUD.setStyle('clone_url','display','none'); | |
289 | }) |
|
289 | }) | |
290 |
|
290 | |||
291 |
|
291 | |||
292 | var tmpl_links = {}; |
|
292 | var tmpl_links = {}; | |
293 | %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): |
|
293 | %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): | |
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')}'; |
|
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 | %endfor |
|
295 | %endfor | |
296 |
|
296 | |||
297 | YUE.on(['download_options','archive_subrepos'],'change',function(e){ |
|
297 | YUE.on(['download_options','archive_subrepos'],'change',function(e){ | |
298 | var sm = YUD.get('download_options'); |
|
298 | var sm = YUD.get('download_options'); | |
299 | var new_cs = sm.options[sm.selectedIndex]; |
|
299 | var new_cs = sm.options[sm.selectedIndex]; | |
300 |
|
300 | |||
301 | for(k in tmpl_links){ |
|
301 | for(k in tmpl_links){ | |
302 | var s = YUD.get(k+'_link'); |
|
302 | var s = YUD.get(k+'_link'); | |
303 | if(s){ |
|
303 | if(s){ | |
304 | var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}"; |
|
304 | var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}"; | |
305 | title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text); |
|
305 | title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text); | |
306 | title_tmpl = title_tmpl.replace('__CS_EXT__',k); |
|
306 | title_tmpl = title_tmpl.replace('__CS_EXT__',k); | |
307 |
|
307 | |||
308 | var url = tmpl_links[k].replace('__CS__',new_cs.value); |
|
308 | var url = tmpl_links[k].replace('__CS__',new_cs.value); | |
309 | var subrepos = YUD.get('archive_subrepos').checked; |
|
309 | var subrepos = YUD.get('archive_subrepos').checked; | |
310 | url = url.replace('__SUB__',subrepos); |
|
310 | url = url.replace('__SUB__',subrepos); | |
311 | url = url.replace('__NAME__',title_tmpl); |
|
311 | url = url.replace('__NAME__',title_tmpl); | |
312 | s.innerHTML = url |
|
312 | s.innerHTML = url | |
313 | } |
|
313 | } | |
314 | } |
|
314 | } | |
315 | }); |
|
315 | }); | |
316 | </script> |
|
316 | </script> | |
317 | %if c.show_stats: |
|
317 | %if c.show_stats: | |
318 | <script type="text/javascript"> |
|
318 | <script type="text/javascript"> | |
319 | var data = ${c.trending_languages|n}; |
|
319 | var data = ${c.trending_languages|n}; | |
320 | var total = 0; |
|
320 | var total = 0; | |
321 | var no_data = true; |
|
321 | var no_data = true; | |
322 | var tbl = document.createElement('table'); |
|
322 | var tbl = document.createElement('table'); | |
323 | tbl.setAttribute('class','trending_language_tbl'); |
|
323 | tbl.setAttribute('class','trending_language_tbl'); | |
324 | var cnt = 0; |
|
324 | var cnt = 0; | |
325 | for (var i=0;i<data.length;i++){ |
|
325 | for (var i=0;i<data.length;i++){ | |
326 |
|
|
326 | total+= data[i][1].count; | |
327 | } |
|
327 | } | |
328 | for (var i=0;i<data.length;i++){ |
|
328 | for (var i=0;i<data.length;i++){ | |
329 | cnt += 1; |
|
329 | cnt += 1; | |
330 | no_data = false; |
|
330 | no_data = false; | |
331 |
|
331 | |||
332 | var hide = cnt>2; |
|
332 | var hide = cnt>2; | |
333 | var tr = document.createElement('tr'); |
|
333 | var tr = document.createElement('tr'); | |
334 | if (hide){ |
|
334 | if (hide){ | |
335 | tr.setAttribute('style','display:none'); |
|
335 | tr.setAttribute('style','display:none'); | |
336 | tr.setAttribute('class','stats_hidden'); |
|
336 | tr.setAttribute('class','stats_hidden'); | |
337 | } |
|
337 | } | |
338 | var k = data[i][0]; |
|
338 | var k = data[i][0]; | |
339 | var obj = data[i][1]; |
|
339 | var obj = data[i][1]; | |
340 | var percentage = Math.round((obj.count/total*100),2); |
|
340 | var percentage = Math.round((obj.count/total*100),2); | |
341 |
|
341 | |||
342 | var td1 = document.createElement('td'); |
|
342 | var td1 = document.createElement('td'); | |
343 | td1.width = 150; |
|
343 | td1.width = 150; | |
344 | var trending_language_label = document.createElement('div'); |
|
344 | var trending_language_label = document.createElement('div'); | |
345 | trending_language_label.innerHTML = obj.desc+" ("+k+")"; |
|
345 | trending_language_label.innerHTML = obj.desc+" ("+k+")"; | |
346 | td1.appendChild(trending_language_label); |
|
346 | td1.appendChild(trending_language_label); | |
347 |
|
347 | |||
348 | var td2 = document.createElement('td'); |
|
348 | var td2 = document.createElement('td'); | |
349 | td2.setAttribute('style','padding-right:14px !important'); |
|
349 | td2.setAttribute('style','padding-right:14px !important'); | |
350 | var trending_language = document.createElement('div'); |
|
350 | var trending_language = document.createElement('div'); | |
351 | var nr_files = obj.count+" ${_('files')}"; |
|
351 | var nr_files = obj.count+" ${_('files')}"; | |
352 |
|
352 | |||
353 | trending_language.title = k+" "+nr_files; |
|
353 | trending_language.title = k+" "+nr_files; | |
354 |
|
354 | |||
355 | if (percentage>22){ |
|
355 | if (percentage>22){ | |
356 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>"; |
|
356 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>"; | |
357 | } |
|
357 | } | |
358 | else{ |
|
358 | else{ | |
359 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>"; |
|
359 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>"; | |
360 | } |
|
360 | } | |
361 |
|
361 | |||
362 | trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner'); |
|
362 | trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner'); | |
363 | trending_language.style.width=percentage+"%"; |
|
363 | trending_language.style.width=percentage+"%"; | |
364 | td2.appendChild(trending_language); |
|
364 | td2.appendChild(trending_language); | |
365 |
|
365 | |||
366 | tr.appendChild(td1); |
|
366 | tr.appendChild(td1); | |
367 | tr.appendChild(td2); |
|
367 | tr.appendChild(td2); | |
368 | tbl.appendChild(tr); |
|
368 | tbl.appendChild(tr); | |
369 | if(cnt == 3){ |
|
369 | if(cnt == 3){ | |
370 | var show_more = document.createElement('tr'); |
|
370 | var show_more = document.createElement('tr'); | |
371 | var td = document.createElement('td'); |
|
371 | var td = document.createElement('td'); | |
372 | lnk = document.createElement('a'); |
|
372 | lnk = document.createElement('a'); | |
373 |
|
373 | |||
374 | lnk.href='#'; |
|
374 | lnk.href='#'; | |
375 | lnk.innerHTML = "${_('show more')}"; |
|
375 | lnk.innerHTML = "${_('show more')}"; | |
376 | lnk.id='code_stats_show_more'; |
|
376 | lnk.id='code_stats_show_more'; | |
377 | td.appendChild(lnk); |
|
377 | td.appendChild(lnk); | |
378 |
|
378 | |||
379 | show_more.appendChild(td); |
|
379 | show_more.appendChild(td); | |
380 | show_more.appendChild(document.createElement('td')); |
|
380 | show_more.appendChild(document.createElement('td')); | |
381 | tbl.appendChild(show_more); |
|
381 | tbl.appendChild(show_more); | |
382 | } |
|
382 | } | |
383 |
|
383 | |||
384 | } |
|
384 | } | |
385 |
|
385 | |||
386 | YUD.get('lang_stats').appendChild(tbl); |
|
386 | YUD.get('lang_stats').appendChild(tbl); | |
387 | YUE.on('code_stats_show_more','click',function(){ |
|
387 | YUE.on('code_stats_show_more','click',function(){ | |
388 | l = YUD.getElementsByClassName('stats_hidden') |
|
388 | l = YUD.getElementsByClassName('stats_hidden') | |
389 | for (e in l){ |
|
389 | for (e in l){ | |
390 | YUD.setStyle(l[e],'display',''); |
|
390 | YUD.setStyle(l[e],'display',''); | |
391 | }; |
|
391 | }; | |
392 | YUD.setStyle(YUD.get('code_stats_show_more'), |
|
392 | YUD.setStyle(YUD.get('code_stats_show_more'), | |
393 | 'display','none'); |
|
393 | 'display','none'); | |
394 | }); |
|
394 | }); | |
395 | </script> |
|
395 | </script> | |
396 | <script type="text/javascript"> |
|
396 | <script type="text/javascript"> | |
397 | /** |
|
397 | /** | |
398 | * Plots summary graph |
|
398 | * Plots summary graph | |
399 | * |
|
399 | * | |
400 | * @class SummaryPlot |
|
400 | * @class SummaryPlot | |
401 | * @param {from} initial from for detailed graph |
|
401 | * @param {from} initial from for detailed graph | |
402 | * @param {to} initial to for detailed graph |
|
402 | * @param {to} initial to for detailed graph | |
403 | * @param {dataset} |
|
403 | * @param {dataset} | |
404 | * @param {overview_dataset} |
|
404 | * @param {overview_dataset} | |
405 | */ |
|
405 | */ | |
406 | function SummaryPlot(from,to,dataset,overview_dataset) { |
|
406 | function SummaryPlot(from,to,dataset,overview_dataset) { | |
407 | var initial_ranges = { |
|
407 | var initial_ranges = { | |
408 | "xaxis":{ |
|
408 | "xaxis":{ | |
409 | "from":from, |
|
409 | "from":from, | |
410 | "to":to, |
|
410 | "to":to, | |
411 | }, |
|
411 | }, | |
412 | }; |
|
412 | }; | |
413 | var dataset = dataset; |
|
413 | var dataset = dataset; | |
414 | var overview_dataset = [overview_dataset]; |
|
414 | var overview_dataset = [overview_dataset]; | |
415 | var choiceContainer = YUD.get("legend_choices"); |
|
415 | var choiceContainer = YUD.get("legend_choices"); | |
416 | var choiceContainerTable = YUD.get("legend_choices_tables"); |
|
416 | var choiceContainerTable = YUD.get("legend_choices_tables"); | |
417 | var plotContainer = YUD.get('commit_history'); |
|
417 | var plotContainer = YUD.get('commit_history'); | |
418 | var overviewContainer = YUD.get('overview'); |
|
418 | var overviewContainer = YUD.get('overview'); | |
419 |
|
419 | |||
420 | var plot_options = { |
|
420 | var plot_options = { | |
421 | bars: {show:true,align:'center',lineWidth:4}, |
|
421 | bars: {show:true,align:'center',lineWidth:4}, | |
422 | legend: {show:true, container:"legend_container"}, |
|
422 | legend: {show:true, container:"legend_container"}, | |
423 | points: {show:true,radius:0,fill:false}, |
|
423 | points: {show:true,radius:0,fill:false}, | |
424 | yaxis: {tickDecimals:0,}, |
|
424 | yaxis: {tickDecimals:0,}, | |
425 | xaxis: { |
|
425 | xaxis: { | |
426 | mode: "time", |
|
426 | mode: "time", | |
427 | timeformat: "%d/%m", |
|
427 | timeformat: "%d/%m", | |
428 | min:from, |
|
428 | min:from, | |
429 | max:to, |
|
429 | max:to, | |
430 | }, |
|
430 | }, | |
431 | grid: { |
|
431 | grid: { | |
432 | hoverable: true, |
|
432 | hoverable: true, | |
433 | clickable: true, |
|
433 | clickable: true, | |
434 | autoHighlight:true, |
|
434 | autoHighlight:true, | |
435 | color: "#999" |
|
435 | color: "#999" | |
436 | }, |
|
436 | }, | |
437 | //selection: {mode: "x"} |
|
437 | //selection: {mode: "x"} | |
438 | }; |
|
438 | }; | |
439 | var overview_options = { |
|
439 | var overview_options = { | |
440 | legend:{show:false}, |
|
440 | legend:{show:false}, | |
441 | bars: {show:true,barWidth: 2,}, |
|
441 | bars: {show:true,barWidth: 2,}, | |
442 | shadowSize: 0, |
|
442 | shadowSize: 0, | |
443 | xaxis: {mode: "time", timeformat: "%d/%m/%y",}, |
|
443 | xaxis: {mode: "time", timeformat: "%d/%m/%y",}, | |
444 | yaxis: {ticks: 3, min: 0,tickDecimals:0,}, |
|
444 | yaxis: {ticks: 3, min: 0,tickDecimals:0,}, | |
445 | grid: {color: "#999",}, |
|
445 | grid: {color: "#999",}, | |
446 | selection: {mode: "x"} |
|
446 | selection: {mode: "x"} | |
447 | }; |
|
447 | }; | |
448 |
|
448 | |||
449 | /** |
|
449 | /** | |
450 | *get dummy data needed in few places |
|
450 | *get dummy data needed in few places | |
451 | */ |
|
451 | */ | |
452 | function getDummyData(label){ |
|
452 | function getDummyData(label){ | |
453 | return {"label":label, |
|
453 | return {"label":label, | |
454 | "data":[{"time":0, |
|
454 | "data":[{"time":0, | |
455 | "commits":0, |
|
455 | "commits":0, | |
456 | "added":0, |
|
456 | "added":0, | |
457 | "changed":0, |
|
457 | "changed":0, | |
458 | "removed":0, |
|
458 | "removed":0, | |
459 | }], |
|
459 | }], | |
460 | "schema":["commits"], |
|
460 | "schema":["commits"], | |
461 | "color":'#ffffff', |
|
461 | "color":'#ffffff', | |
462 | } |
|
462 | } | |
463 | } |
|
463 | } | |
464 |
|
464 | |||
465 | /** |
|
465 | /** | |
466 | * generate checkboxes accordindly to data |
|
466 | * generate checkboxes accordindly to data | |
467 | * @param keys |
|
467 | * @param keys | |
468 | * @returns |
|
468 | * @returns | |
469 | */ |
|
469 | */ | |
470 | function generateCheckboxes(data) { |
|
470 | function generateCheckboxes(data) { | |
471 | //append checkboxes |
|
471 | //append checkboxes | |
472 | var i = 0; |
|
472 | var i = 0; | |
473 | choiceContainerTable.innerHTML = ''; |
|
473 | choiceContainerTable.innerHTML = ''; | |
474 | for(var pos in data) { |
|
474 | for(var pos in data) { | |
475 |
|
475 | |||
476 | data[pos].color = i; |
|
476 | data[pos].color = i; | |
477 | i++; |
|
477 | i++; | |
478 | if(data[pos].label != ''){ |
|
478 | if(data[pos].label != ''){ | |
479 | choiceContainerTable.innerHTML += |
|
479 | choiceContainerTable.innerHTML += | |
480 | '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \ |
|
480 | '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \ | |
481 | <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label); |
|
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 | * ToolTip show |
|
487 | * ToolTip show | |
488 | */ |
|
488 | */ | |
489 | function showTooltip(x, y, contents) { |
|
489 | function showTooltip(x, y, contents) { | |
490 | var div=document.getElementById('tooltip'); |
|
490 | var div=document.getElementById('tooltip'); | |
491 | if(!div) { |
|
491 | if(!div) { | |
492 | div = document.createElement('div'); |
|
492 | div = document.createElement('div'); | |
493 | div.id="tooltip"; |
|
493 | div.id="tooltip"; | |
494 | div.style.position="absolute"; |
|
494 | div.style.position="absolute"; | |
495 | div.style.border='1px solid #fdd'; |
|
495 | div.style.border='1px solid #fdd'; | |
496 | div.style.padding='2px'; |
|
496 | div.style.padding='2px'; | |
497 | div.style.backgroundColor='#fee'; |
|
497 | div.style.backgroundColor='#fee'; | |
498 | document.body.appendChild(div); |
|
498 | document.body.appendChild(div); | |
499 | } |
|
499 | } | |
500 | YUD.setStyle(div, 'opacity', 0); |
|
500 | YUD.setStyle(div, 'opacity', 0); | |
501 | div.innerHTML = contents; |
|
501 | div.innerHTML = contents; | |
502 | div.style.top=(y + 5) + "px"; |
|
502 | div.style.top=(y + 5) + "px"; | |
503 | div.style.left=(x + 5) + "px"; |
|
503 | div.style.left=(x + 5) + "px"; | |
504 |
|
504 | |||
505 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); |
|
505 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); | |
506 | anim.animate(); |
|
506 | anim.animate(); | |
507 | } |
|
507 | } | |
508 |
|
508 | |||
509 | /** |
|
509 | /** | |
510 | * This function will detect if selected period has some changesets |
|
510 | * This function will detect if selected period has some changesets | |
511 | for this user if it does this data is then pushed for displaying |
|
511 | for this user if it does this data is then pushed for displaying | |
512 | Additionally it will only display users that are selected by the checkbox |
|
512 | Additionally it will only display users that are selected by the checkbox | |
513 | */ |
|
513 | */ | |
514 | function getDataAccordingToRanges(ranges) { |
|
514 | function getDataAccordingToRanges(ranges) { | |
515 |
|
515 | |||
516 | var data = []; |
|
516 | var data = []; | |
517 | var new_dataset = {}; |
|
517 | var new_dataset = {}; | |
518 | var keys = []; |
|
518 | var keys = []; | |
519 | var max_commits = 0; |
|
519 | var max_commits = 0; | |
520 | for(var key in dataset){ |
|
520 | for(var key in dataset){ | |
521 |
|
521 | |||
522 | for(var ds in dataset[key].data){ |
|
522 | for(var ds in dataset[key].data){ | |
523 | commit_data = dataset[key].data[ds]; |
|
523 | commit_data = dataset[key].data[ds]; | |
524 | if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){ |
|
524 | if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){ | |
525 |
|
525 | |||
526 | if(new_dataset[key] === undefined){ |
|
526 | if(new_dataset[key] === undefined){ | |
527 | new_dataset[key] = {data:[],schema:["commits"],label:key}; |
|
527 | new_dataset[key] = {data:[],schema:["commits"],label:key}; | |
528 | } |
|
528 | } | |
529 | new_dataset[key].data.push(commit_data); |
|
529 | new_dataset[key].data.push(commit_data); | |
530 | } |
|
530 | } | |
531 | } |
|
531 | } | |
532 | if (new_dataset[key] !== undefined){ |
|
532 | if (new_dataset[key] !== undefined){ | |
533 | data.push(new_dataset[key]); |
|
533 | data.push(new_dataset[key]); | |
534 | } |
|
534 | } | |
535 | } |
|
535 | } | |
536 |
|
536 | |||
537 | if (data.length > 0){ |
|
537 | if (data.length > 0){ | |
538 | return data; |
|
538 | return data; | |
539 | } |
|
539 | } | |
540 | else{ |
|
540 | else{ | |
541 | //just return dummy data for graph to plot itself |
|
541 | //just return dummy data for graph to plot itself | |
542 | return [getDummyData('')]; |
|
542 | return [getDummyData('')]; | |
543 | } |
|
543 | } | |
544 | } |
|
544 | } | |
545 |
|
545 | |||
546 | /** |
|
546 | /** | |
547 | * redraw using new checkbox data |
|
547 | * redraw using new checkbox data | |
548 | */ |
|
548 | */ | |
549 | function plotchoiced(e,args){ |
|
549 | function plotchoiced(e,args){ | |
550 | var cur_data = args[0]; |
|
550 | var cur_data = args[0]; | |
551 | var cur_ranges = args[1]; |
|
551 | var cur_ranges = args[1]; | |
552 |
|
552 | |||
553 | var new_data = []; |
|
553 | var new_data = []; | |
554 | var inputs = choiceContainer.getElementsByTagName("input"); |
|
554 | var inputs = choiceContainer.getElementsByTagName("input"); | |
555 |
|
555 | |||
556 | //show only checked labels |
|
556 | //show only checked labels | |
557 | for(var i=0; i<inputs.length; i++) { |
|
557 | for(var i=0; i<inputs.length; i++) { | |
558 | var checkbox_key = inputs[i].name; |
|
558 | var checkbox_key = inputs[i].name; | |
559 |
|
559 | |||
560 | if(inputs[i].checked){ |
|
560 | if(inputs[i].checked){ | |
561 | for(var d in cur_data){ |
|
561 | for(var d in cur_data){ | |
562 | if(cur_data[d].label == checkbox_key){ |
|
562 | if(cur_data[d].label == checkbox_key){ | |
563 | new_data.push(cur_data[d]); |
|
563 | new_data.push(cur_data[d]); | |
564 | } |
|
564 | } | |
565 | } |
|
565 | } | |
566 | } |
|
566 | } | |
567 | else{ |
|
567 | else{ | |
568 | //push dummy data to not hide the label |
|
568 | //push dummy data to not hide the label | |
569 | new_data.push(getDummyData(checkbox_key)); |
|
569 | new_data.push(getDummyData(checkbox_key)); | |
570 | } |
|
570 | } | |
571 | } |
|
571 | } | |
572 |
|
572 | |||
573 | var new_options = YAHOO.lang.merge(plot_options, { |
|
573 | var new_options = YAHOO.lang.merge(plot_options, { | |
574 | xaxis: { |
|
574 | xaxis: { | |
575 | min: cur_ranges.xaxis.from, |
|
575 | min: cur_ranges.xaxis.from, | |
576 | max: cur_ranges.xaxis.to, |
|
576 | max: cur_ranges.xaxis.to, | |
577 | mode:"time", |
|
577 | mode:"time", | |
578 | timeformat: "%d/%m", |
|
578 | timeformat: "%d/%m", | |
579 | }, |
|
579 | }, | |
580 | }); |
|
580 | }); | |
581 | if (!new_data){ |
|
581 | if (!new_data){ | |
582 | new_data = [[0,1]]; |
|
582 | new_data = [[0,1]]; | |
583 | } |
|
583 | } | |
584 | // do the zooming |
|
584 | // do the zooming | |
585 | plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); |
|
585 | plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); | |
586 |
|
586 | |||
587 | plot.subscribe("plotselected", plotselected); |
|
587 | plot.subscribe("plotselected", plotselected); | |
588 |
|
588 | |||
589 | //resubscribe plothover |
|
589 | //resubscribe plothover | |
590 | plot.subscribe("plothover", plothover); |
|
590 | plot.subscribe("plothover", plothover); | |
591 |
|
591 | |||
592 | // don't fire event on the overview to prevent eternal loop |
|
592 | // don't fire event on the overview to prevent eternal loop | |
593 | overview.setSelection(cur_ranges, true); |
|
593 | overview.setSelection(cur_ranges, true); | |
594 |
|
594 | |||
595 | } |
|
595 | } | |
596 |
|
596 | |||
597 | /** |
|
597 | /** | |
598 | * plot only selected items from overview |
|
598 | * plot only selected items from overview | |
599 | * @param ranges |
|
599 | * @param ranges | |
600 | * @returns |
|
600 | * @returns | |
601 | */ |
|
601 | */ | |
602 | function plotselected(ranges,cur_data) { |
|
602 | function plotselected(ranges,cur_data) { | |
603 | //updates the data for new plot |
|
603 | //updates the data for new plot | |
604 | var data = getDataAccordingToRanges(ranges); |
|
604 | var data = getDataAccordingToRanges(ranges); | |
605 | generateCheckboxes(data); |
|
605 | generateCheckboxes(data); | |
606 |
|
606 | |||
607 | var new_options = YAHOO.lang.merge(plot_options, { |
|
607 | var new_options = YAHOO.lang.merge(plot_options, { | |
608 | xaxis: { |
|
608 | xaxis: { | |
609 | min: ranges.xaxis.from, |
|
609 | min: ranges.xaxis.from, | |
610 | max: ranges.xaxis.to, |
|
610 | max: ranges.xaxis.to, | |
611 | mode:"time", |
|
611 | mode:"time", | |
612 | timeformat: "%d/%m", |
|
612 | timeformat: "%d/%m", | |
613 | }, |
|
613 | }, | |
614 | }); |
|
614 | }); | |
615 | // do the zooming |
|
615 | // do the zooming | |
616 | plot = YAHOO.widget.Flot(plotContainer, data, new_options); |
|
616 | plot = YAHOO.widget.Flot(plotContainer, data, new_options); | |
617 |
|
617 | |||
618 | plot.subscribe("plotselected", plotselected); |
|
618 | plot.subscribe("plotselected", plotselected); | |
619 |
|
619 | |||
620 | //resubscribe plothover |
|
620 | //resubscribe plothover | |
621 | plot.subscribe("plothover", plothover); |
|
621 | plot.subscribe("plothover", plothover); | |
622 |
|
622 | |||
623 | // don't fire event on the overview to prevent eternal loop |
|
623 | // don't fire event on the overview to prevent eternal loop | |
624 | overview.setSelection(ranges, true); |
|
624 | overview.setSelection(ranges, true); | |
625 |
|
625 | |||
626 | //resubscribe choiced |
|
626 | //resubscribe choiced | |
627 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]); |
|
627 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]); | |
628 | } |
|
628 | } | |
629 |
|
629 | |||
630 | var previousPoint = null; |
|
630 | var previousPoint = null; | |
631 |
|
631 | |||
632 | function plothover(o) { |
|
632 | function plothover(o) { | |
633 | var pos = o.pos; |
|
633 | var pos = o.pos; | |
634 | var item = o.item; |
|
634 | var item = o.item; | |
635 |
|
635 | |||
636 | //YUD.get("x").innerHTML = pos.x.toFixed(2); |
|
636 | //YUD.get("x").innerHTML = pos.x.toFixed(2); | |
637 | //YUD.get("y").innerHTML = pos.y.toFixed(2); |
|
637 | //YUD.get("y").innerHTML = pos.y.toFixed(2); | |
638 | if (item) { |
|
638 | if (item) { | |
639 | if (previousPoint != item.datapoint) { |
|
639 | if (previousPoint != item.datapoint) { | |
640 | previousPoint = item.datapoint; |
|
640 | previousPoint = item.datapoint; | |
641 |
|
641 | |||
642 | var tooltip = YUD.get("tooltip"); |
|
642 | var tooltip = YUD.get("tooltip"); | |
643 | if(tooltip) { |
|
643 | if(tooltip) { | |
644 | tooltip.parentNode.removeChild(tooltip); |
|
644 | tooltip.parentNode.removeChild(tooltip); | |
645 | } |
|
645 | } | |
646 | var x = item.datapoint.x.toFixed(2); |
|
646 | var x = item.datapoint.x.toFixed(2); | |
647 | var y = item.datapoint.y.toFixed(2); |
|
647 | var y = item.datapoint.y.toFixed(2); | |
648 |
|
648 | |||
649 | if (!item.series.label){ |
|
649 | if (!item.series.label){ | |
650 | item.series.label = 'commits'; |
|
650 | item.series.label = 'commits'; | |
651 | } |
|
651 | } | |
652 | var d = new Date(x*1000); |
|
652 | var d = new Date(x*1000); | |
653 | var fd = d.toDateString() |
|
653 | var fd = d.toDateString() | |
654 | var nr_commits = parseInt(y); |
|
654 | var nr_commits = parseInt(y); | |
655 |
|
655 | |||
656 | var cur_data = dataset[item.series.label].data[item.dataIndex]; |
|
656 | var cur_data = dataset[item.series.label].data[item.dataIndex]; | |
657 | var added = cur_data.added; |
|
657 | var added = cur_data.added; | |
658 | var changed = cur_data.changed; |
|
658 | var changed = cur_data.changed; | |
659 | var removed = cur_data.removed; |
|
659 | var removed = cur_data.removed; | |
660 |
|
660 | |||
661 | var nr_commits_suffix = " ${_('commits')} "; |
|
661 | var nr_commits_suffix = " ${_('commits')} "; | |
662 | var added_suffix = " ${_('files added')} "; |
|
662 | var added_suffix = " ${_('files added')} "; | |
663 | var changed_suffix = " ${_('files changed')} "; |
|
663 | var changed_suffix = " ${_('files changed')} "; | |
664 | var removed_suffix = " ${_('files removed')} "; |
|
664 | var removed_suffix = " ${_('files removed')} "; | |
665 |
|
665 | |||
666 |
|
666 | |||
667 | if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";} |
|
667 | if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";} | |
668 | if(added==1){added_suffix=" ${_('file added')} ";} |
|
668 | if(added==1){added_suffix=" ${_('file added')} ";} | |
669 | if(changed==1){changed_suffix=" ${_('file changed')} ";} |
|
669 | if(changed==1){changed_suffix=" ${_('file changed')} ";} | |
670 | if(removed==1){removed_suffix=" ${_('file removed')} ";} |
|
670 | if(removed==1){removed_suffix=" ${_('file removed')} ";} | |
671 |
|
671 | |||
672 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd |
|
672 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd | |
673 | +'<br/>'+ |
|
673 | +'<br/>'+ | |
674 | nr_commits + nr_commits_suffix+'<br/>'+ |
|
674 | nr_commits + nr_commits_suffix+'<br/>'+ | |
675 | added + added_suffix +'<br/>'+ |
|
675 | added + added_suffix +'<br/>'+ | |
676 | changed + changed_suffix + '<br/>'+ |
|
676 | changed + changed_suffix + '<br/>'+ | |
677 | removed + removed_suffix + '<br/>'); |
|
677 | removed + removed_suffix + '<br/>'); | |
678 | } |
|
678 | } | |
679 | } |
|
679 | } | |
680 | else { |
|
680 | else { | |
681 | var tooltip = YUD.get("tooltip"); |
|
681 | var tooltip = YUD.get("tooltip"); | |
682 |
|
682 | |||
683 | if(tooltip) { |
|
683 | if(tooltip) { | |
684 | tooltip.parentNode.removeChild(tooltip); |
|
684 | tooltip.parentNode.removeChild(tooltip); | |
685 | } |
|
685 | } | |
686 | previousPoint = null; |
|
686 | previousPoint = null; | |
687 | } |
|
687 | } | |
688 | } |
|
688 | } | |
689 |
|
689 | |||
690 | /** |
|
690 | /** | |
691 | * MAIN EXECUTION |
|
691 | * MAIN EXECUTION | |
692 | */ |
|
692 | */ | |
693 |
|
693 | |||
694 | var data = getDataAccordingToRanges(initial_ranges); |
|
694 | var data = getDataAccordingToRanges(initial_ranges); | |
695 | generateCheckboxes(data); |
|
695 | generateCheckboxes(data); | |
696 |
|
696 | |||
697 | //main plot |
|
697 | //main plot | |
698 | var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); |
|
698 | var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); | |
699 |
|
699 | |||
700 | //overview |
|
700 | //overview | |
701 | var overview = YAHOO.widget.Flot(overviewContainer, |
|
701 | var overview = YAHOO.widget.Flot(overviewContainer, | |
702 | overview_dataset, overview_options); |
|
702 | overview_dataset, overview_options); | |
703 |
|
703 | |||
704 | //show initial selection on overview |
|
704 | //show initial selection on overview | |
705 | overview.setSelection(initial_ranges); |
|
705 | overview.setSelection(initial_ranges); | |
706 |
|
706 | |||
707 | plot.subscribe("plotselected", plotselected); |
|
707 | plot.subscribe("plotselected", plotselected); | |
708 | plot.subscribe("plothover", plothover) |
|
708 | plot.subscribe("plothover", plothover) | |
709 |
|
709 | |||
710 | overview.subscribe("plotselected", function (ranges) { |
|
710 | overview.subscribe("plotselected", function (ranges) { | |
711 | plot.setSelection(ranges); |
|
711 | plot.setSelection(ranges); | |
712 | }); |
|
712 | }); | |
713 |
|
713 | |||
714 | // user choices on overview |
|
714 | // user choices on overview | |
715 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]); |
|
715 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]); | |
716 | } |
|
716 | } | |
717 | SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n}); |
|
717 | SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n}); | |
718 | </script> |
|
718 | </script> | |
719 | %endif |
|
719 | %endif | |
720 |
|
720 | |||
721 | </%def> |
|
721 | </%def> |
@@ -1,39 +1,39 b'' | |||||
1 | %if c.repo_tags: |
|
1 | %if c.repo_tags: | |
2 | <div id="table_wrap" class="yui-skin-sam"> |
|
2 | <div id="table_wrap" class="yui-skin-sam"> | |
3 | <table id="tags_data"> |
|
3 | <table id="tags_data"> | |
4 | <thead> |
|
4 | <thead> | |
5 |
|
|
5 | <tr> | |
6 | <th class="left">${_('Name')}</th> |
|
6 | <th class="left">${_('Name')}</th> | |
7 | <th class="left">${_('Date')}</th> |
|
7 | <th class="left">${_('Date')}</th> | |
8 | <th class="left">${_('Author')}</th> |
|
8 | <th class="left">${_('Author')}</th> | |
9 | <th class="left">${_('Revision')}</th> |
|
9 | <th class="left">${_('Revision')}</th> | |
10 | <th class="left">${_('Compare')}</th> |
|
10 | <th class="left">${_('Compare')}</th> | |
11 |
|
|
11 | </tr> | |
12 | </thead> |
|
12 | </thead> | |
13 |
|
|
13 | %for cnt,tag in enumerate(c.repo_tags.items()): | |
14 |
|
|
14 | <tr class="parity${cnt%2}"> | |
15 | <td> |
|
15 | <td> | |
16 | <span class="logtags"> |
|
16 | <span class="logtags"> | |
17 | <span class="tagtag">${h.link_to(tag[0], |
|
17 | <span class="tagtag">${h.link_to(tag[0], | |
18 | h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id))} |
|
18 | h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id))} | |
19 | </span> |
|
19 | </span> | |
20 | </span> |
|
20 | </span> | |
21 | </td> |
|
21 | </td> | |
22 | <td><span class="tooltip" title="${h.tooltip(h.age(tag[1].date))}">${h.fmt_date(tag[1].date)}</span></td> |
|
22 | <td><span class="tooltip" title="${h.tooltip(h.age(tag[1].date))}">${h.fmt_date(tag[1].date)}</span></td> | |
23 |
|
|
23 | <td title="${tag[1].author}">${h.person(tag[1].author)}</td> | |
24 |
|
|
24 | <td> | |
25 | <div> |
|
25 | <div> | |
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> |
|
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 | </div> |
|
27 | </div> | |
28 | </td> |
|
28 | </td> | |
29 | <td> |
|
29 | <td> | |
30 | <input class="branch-compare" type="radio" name="compare_org" value="${tag[0]}"/> |
|
30 | <input class="branch-compare" type="radio" name="compare_org" value="${tag[0]}"/> | |
31 | <input class="branch-compare" type="radio" name="compare_other" value="${tag[0]}"/> |
|
31 | <input class="branch-compare" type="radio" name="compare_other" value="${tag[0]}"/> | |
32 | </td> |
|
32 | </td> | |
33 | </tr> |
|
33 | </tr> | |
34 | %endfor |
|
34 | %endfor | |
35 | </table> |
|
35 | </table> | |
36 | </div> |
|
36 | </div> | |
37 | %else: |
|
37 | %else: | |
38 |
|
|
38 | ${_('There are no tags yet')} | |
39 | %endif |
|
39 | %endif |
General Comments 0
You need to be logged in to leave comments.
Login now