Show More
@@ -1,93 +1,93 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%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.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
13 | » |
|
13 | » | |
14 | ${_('branches')} |
|
14 | ${_('branches')} | |
15 | </%def> |
|
15 | </%def> | |
16 |
|
16 | |||
17 | <%def name="page_nav()"> |
|
17 | <%def name="page_nav()"> | |
18 | ${self.menu('branches')} |
|
18 | ${self.menu('branches')} | |
19 | </%def> |
|
19 | </%def> | |
20 |
|
20 | |||
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <div class="box"> |
|
22 | <div class="box"> | |
23 | <!-- box / title --> |
|
23 | <!-- box / title --> | |
24 | <div class="title"> |
|
24 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
25 | ${self.breadcrumbs()} | |
26 | </div> |
|
26 | </div> | |
27 | <!-- end box / title --> |
|
27 | <!-- end box / title --> | |
28 | %if c.repo_branches: |
|
28 | %if c.repo_branches: | |
29 |
<div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px; |
|
29 | <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div> | |
30 | %endif |
|
30 | %endif | |
31 | <div class="table"> |
|
31 | <div class="table"> | |
32 | <%include file='branches_data.html'/> |
|
32 | <%include file='branches_data.html'/> | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | <script type="text/javascript"> |
|
35 | <script type="text/javascript"> | |
36 | YUE.on('compare_branches','click',function(e){ |
|
36 | YUE.on('compare_branches','click',function(e){ | |
37 | YUE.preventDefault(e); |
|
37 | YUE.preventDefault(e); | |
38 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
38 | var org = YUQ('input[name=compare_org]:checked')[0]; | |
39 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
39 | var other = YUQ('input[name=compare_other]:checked')[0]; | |
40 |
|
40 | |||
41 | if(org && other){ |
|
41 | if(org && other){ | |
42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}"; |
|
42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}"; | |
43 | var u = compare_url.replace('__ORG__',org.value) |
|
43 | var u = compare_url.replace('__ORG__',org.value) | |
44 | .replace('__OTHER__',other.value); |
|
44 | .replace('__OTHER__',other.value); | |
45 | window.location=u; |
|
45 | window.location=u; | |
46 | } |
|
46 | } | |
47 | }); |
|
47 | }); | |
48 | // main table sorting |
|
48 | // main table sorting | |
49 | var myColumnDefs = [ |
|
49 | var myColumnDefs = [ | |
50 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
50 | {key:"name",label:"${_('Name')}",sortable:true}, | |
51 | {key:"date",label:"${_('Date')}",sortable:true, |
|
51 | {key:"date",label:"${_('Date')}",sortable:true, | |
52 | sortOptions: { sortFunction: dateSort }}, |
|
52 | sortOptions: { sortFunction: dateSort }}, | |
53 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
53 | {key:"author",label:"${_('Author')}",sortable:true}, | |
54 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
54 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
55 | sortOptions: { sortFunction: revisionSort }}, |
|
55 | sortOptions: { sortFunction: revisionSort }}, | |
56 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
56 | {key:"compare",label:"${_('Compare')}",sortable:false,}, | |
57 | ]; |
|
57 | ]; | |
58 |
|
58 | |||
59 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); |
|
59 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); | |
60 |
|
60 | |||
61 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
61 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
62 |
|
62 | |||
63 | myDataSource.responseSchema = { |
|
63 | myDataSource.responseSchema = { | |
64 | fields: [ |
|
64 | fields: [ | |
65 | {key:"name"}, |
|
65 | {key:"name"}, | |
66 | {key:"date"}, |
|
66 | {key:"date"}, | |
67 | {key:"author"}, |
|
67 | {key:"author"}, | |
68 | {key:"revision"}, |
|
68 | {key:"revision"}, | |
69 | {key:"compare"}, |
|
69 | {key:"compare"}, | |
70 | ] |
|
70 | ] | |
71 | }; |
|
71 | }; | |
72 |
|
72 | |||
73 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
73 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
74 | { |
|
74 | { | |
75 | sortedBy:{key:"name",dir:"asc"}, |
|
75 | sortedBy:{key:"name",dir:"asc"}, | |
76 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
76 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
77 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
77 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
78 | MSG_EMPTY:"${_('No records found.')}", |
|
78 | MSG_EMPTY:"${_('No records found.')}", | |
79 | MSG_ERROR:"${_('Data error.')}", |
|
79 | MSG_ERROR:"${_('Data error.')}", | |
80 | MSG_LOADING:"${_('Loading...')}", |
|
80 | MSG_LOADING:"${_('Loading...')}", | |
81 | } |
|
81 | } | |
82 | ); |
|
82 | ); | |
83 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
83 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
84 | tooltip_activate(); |
|
84 | tooltip_activate(); | |
85 | var func = function(node){ |
|
85 | var func = function(node){ | |
86 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
86 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
87 | } |
|
87 | } | |
88 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); |
|
88 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); | |
89 | }); |
|
89 | }); | |
90 |
|
90 | |||
91 | </script> |
|
91 | </script> | |
92 |
|
92 | |||
93 | </%def> |
|
93 | </%def> |
@@ -1,284 +1,284 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.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
13 | » |
|
13 | » | |
14 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
|
14 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> | |
15 | ${_('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 | ${self.menu('changelog')} |
|
19 | ${self.menu('changelog')} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="main()"> |
|
22 | <%def name="main()"> | |
23 | <div class="box"> |
|
23 | <div class="box"> | |
24 | <!-- box / title --> |
|
24 | <!-- box / title --> | |
25 | <div class="title"> |
|
25 | <div class="title"> | |
26 | ${self.breadcrumbs()} |
|
26 | ${self.breadcrumbs()} | |
27 | </div> |
|
27 | </div> | |
28 | <div class="table"> |
|
28 | <div class="table"> | |
29 | % if c.pagination: |
|
29 | % if c.pagination: | |
30 | <div id="graph"> |
|
30 | <div id="graph"> | |
31 | <div id="graph_nodes"> |
|
31 | <div id="graph_nodes"> | |
32 | <canvas id="graph_canvas"></canvas> |
|
32 | <canvas id="graph_canvas"></canvas> | |
33 | </div> |
|
33 | </div> | |
34 | <div id="graph_content"> |
|
34 | <div id="graph_content"> | |
35 |
<div class="info_box" style="clear: both;padding: 10px 6px; |
|
35 | <div class="info_box" style="clear: both;padding: 10px 6px;text-align: right;"> | |
36 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> |
|
36 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> | |
37 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> |
|
37 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> | |
38 |
|
38 | |||
39 | %if c.rhodecode_db_repo.fork: |
|
39 | %if c.rhodecode_db_repo.fork: | |
40 | <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default')}" class="ui-btn small">${_('Compare fork with parent')}</a> |
|
40 | <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default')}" class="ui-btn small">${_('Compare fork with parent')}</a> | |
41 | %endif |
|
41 | %endif | |
42 | %if h.is_hg(c.rhodecode_repo): |
|
42 | %if h.is_hg(c.rhodecode_repo): | |
43 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a> |
|
43 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a> | |
44 | %endif |
|
44 | %endif | |
45 | </div> |
|
45 | </div> | |
46 | <div class="container_header"> |
|
46 | <div class="container_header"> | |
47 | ${h.form(h.url.current(),method='get')} |
|
47 | ${h.form(h.url.current(),method='get')} | |
48 | <div class="info_box" style="float:left"> |
|
48 | <div class="info_box" style="float:left"> | |
49 | ${h.submit('set',_('Show'),class_="ui-btn")} |
|
49 | ${h.submit('set',_('Show'),class_="ui-btn")} | |
50 | ${h.text('size',size=1,value=c.size)} |
|
50 | ${h.text('size',size=1,value=c.size)} | |
51 | ${_('revisions')} |
|
51 | ${_('revisions')} | |
52 | </div> |
|
52 | </div> | |
53 | ${h.end_form()} |
|
53 | ${h.end_form()} | |
54 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
54 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> | |
55 | </div> |
|
55 | </div> | |
56 |
|
56 | |||
57 | %for cnt,cs in enumerate(c.pagination): |
|
57 | %for cnt,cs in enumerate(c.pagination): | |
58 | <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
58 | <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> | |
59 | <div class="left"> |
|
59 | <div class="left"> | |
60 | <div> |
|
60 | <div> | |
61 | ${h.checkbox(cs.raw_id,class_="changeset_range")} |
|
61 | ${h.checkbox(cs.raw_id,class_="changeset_range")} | |
62 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> |
|
62 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="author"> |
|
64 | <div class="author"> | |
65 | <div class="gravatar"> |
|
65 | <div class="gravatar"> | |
66 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> |
|
66 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> | |
67 | </div> |
|
67 | </div> | |
68 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> |
|
68 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="date">${h.fmt_date(cs.date)}</div> |
|
70 | <div class="date">${h.fmt_date(cs.date)}</div> | |
71 | </div> |
|
71 | </div> | |
72 | <div class="mid"> |
|
72 | <div class="mid"> | |
73 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
73 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> | |
74 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> |
|
74 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> | |
75 | </div> |
|
75 | </div> | |
76 | <div class="right"> |
|
76 | <div class="right"> | |
77 | <div class="changes"> |
|
77 | <div class="changes"> | |
78 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> |
|
78 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> | |
79 | <div class="comments-container"> |
|
79 | <div class="comments-container"> | |
80 | %if len(c.comments.get(cs.raw_id,[])) > 0: |
|
80 | %if len(c.comments.get(cs.raw_id,[])) > 0: | |
81 | <div class="comments-cnt" title="${('comments')}"> |
|
81 | <div class="comments-cnt" title="${('comments')}"> | |
82 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
82 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> | |
83 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> |
|
83 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> | |
84 | <img src="${h.url('/images/icons/comments.png')}"> |
|
84 | <img src="${h.url('/images/icons/comments.png')}"> | |
85 | </a> |
|
85 | </a> | |
86 | </div> |
|
86 | </div> | |
87 | %endif |
|
87 | %endif | |
88 | </div> |
|
88 | </div> | |
89 | <div class="changeset-status-container"> |
|
89 | <div class="changeset-status-container"> | |
90 | %if c.statuses.get(cs.raw_id): |
|
90 | %if c.statuses.get(cs.raw_id): | |
91 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> |
|
91 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> | |
92 | <div class="changeset-status-ico"> |
|
92 | <div class="changeset-status-ico"> | |
93 | %if c.statuses.get(cs.raw_id)[2]: |
|
93 | %if c.statuses.get(cs.raw_id)[2]: | |
94 | <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> |
|
94 | <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> | |
95 | %else: |
|
95 | %else: | |
96 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> |
|
96 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> | |
97 | %endif |
|
97 | %endif | |
98 | </div> |
|
98 | </div> | |
99 | %endif |
|
99 | %endif | |
100 | </div> |
|
100 | </div> | |
101 | </div> |
|
101 | </div> | |
102 | %if cs.parents: |
|
102 | %if cs.parents: | |
103 | %for p_cs in reversed(cs.parents): |
|
103 | %for p_cs in reversed(cs.parents): | |
104 | <div class="parent">${_('Parent')} |
|
104 | <div class="parent">${_('Parent')} | |
105 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), |
|
105 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), | |
106 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> |
|
106 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> | |
107 | </div> |
|
107 | </div> | |
108 | %endfor |
|
108 | %endfor | |
109 | %else: |
|
109 | %else: | |
110 | <div class="parent">${_('No parents')}</div> |
|
110 | <div class="parent">${_('No parents')}</div> | |
111 | %endif |
|
111 | %endif | |
112 |
|
112 | |||
113 | <span class="logtags"> |
|
113 | <span class="logtags"> | |
114 | %if len(cs.parents)>1: |
|
114 | %if len(cs.parents)>1: | |
115 | <span class="merge">${_('merge')}</span> |
|
115 | <span class="merge">${_('merge')}</span> | |
116 | %endif |
|
116 | %endif | |
117 | %if cs.branch: |
|
117 | %if cs.branch: | |
118 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
118 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | |
119 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
119 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
120 | </span> |
|
120 | </span> | |
121 | %endif |
|
121 | %endif | |
122 | %if h.is_hg(c.rhodecode_repo): |
|
122 | %if h.is_hg(c.rhodecode_repo): | |
123 | %for book in cs.bookmarks: |
|
123 | %for book in cs.bookmarks: | |
124 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
124 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
125 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
125 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
126 | </span> |
|
126 | </span> | |
127 | %endfor |
|
127 | %endfor | |
128 | %endif |
|
128 | %endif | |
129 | %for tag in cs.tags: |
|
129 | %for tag in cs.tags: | |
130 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
130 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
131 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
131 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> | |
132 | %endfor |
|
132 | %endfor | |
133 | </span> |
|
133 | </span> | |
134 | </div> |
|
134 | </div> | |
135 | </div> |
|
135 | </div> | |
136 |
|
136 | |||
137 | %endfor |
|
137 | %endfor | |
138 | <div class="pagination-wh pagination-left"> |
|
138 | <div class="pagination-wh pagination-left"> | |
139 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
139 | ${c.pagination.pager('$link_previous ~2~ $link_next')} | |
140 | </div> |
|
140 | </div> | |
141 | </div> |
|
141 | </div> | |
142 | </div> |
|
142 | </div> | |
143 |
|
143 | |||
144 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
|
144 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> | |
145 | <script type="text/javascript"> |
|
145 | <script type="text/javascript"> | |
146 | YAHOO.util.Event.onDOMReady(function(){ |
|
146 | YAHOO.util.Event.onDOMReady(function(){ | |
147 |
|
147 | |||
148 | //Monitor range checkboxes and build a link to changesets |
|
148 | //Monitor range checkboxes and build a link to changesets | |
149 | //ranges |
|
149 | //ranges | |
150 | var checkboxes = YUD.getElementsByClassName('changeset_range'); |
|
150 | var checkboxes = YUD.getElementsByClassName('changeset_range'); | |
151 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
|
151 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; | |
152 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; |
|
152 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; | |
153 | YUE.on(checkboxes,'click',function(e){ |
|
153 | YUE.on(checkboxes,'click',function(e){ | |
154 | var clicked_cb = e.currentTarget; |
|
154 | var clicked_cb = e.currentTarget; | |
155 | var checked_checkboxes = []; |
|
155 | var checked_checkboxes = []; | |
156 | for (pos in checkboxes){ |
|
156 | for (pos in checkboxes){ | |
157 | if(checkboxes[pos].checked){ |
|
157 | if(checkboxes[pos].checked){ | |
158 | checked_checkboxes.push(checkboxes[pos]); |
|
158 | checked_checkboxes.push(checkboxes[pos]); | |
159 | } |
|
159 | } | |
160 | } |
|
160 | } | |
161 | if(YUD.get('open_new_pr')){ |
|
161 | if(YUD.get('open_new_pr')){ | |
162 | if(checked_checkboxes.length>0){ |
|
162 | if(checked_checkboxes.length>0){ | |
163 | // modify open pull request to show we have selected cs |
|
163 | // modify open pull request to show we have selected cs | |
164 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; |
|
164 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; | |
165 |
|
165 | |||
166 | }else{ |
|
166 | }else{ | |
167 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; |
|
167 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; | |
168 | } |
|
168 | } | |
169 | } |
|
169 | } | |
170 |
|
170 | |||
171 | if(checked_checkboxes.length>0){ |
|
171 | if(checked_checkboxes.length>0){ | |
172 | var rev_end = checked_checkboxes[0].name; |
|
172 | var rev_end = checked_checkboxes[0].name; | |
173 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
|
173 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; | |
174 | var url = url_tmpl.replace('__REVRANGE__', |
|
174 | var url = url_tmpl.replace('__REVRANGE__', | |
175 | rev_start+'...'+rev_end); |
|
175 | rev_start+'...'+rev_end); | |
176 |
|
176 | |||
177 | var link = _TM['Show selected changes __S -> __E']; |
|
177 | var link = _TM['Show selected changes __S -> __E']; | |
178 | link = link.replace('__S',rev_start.substr(0,6)); |
|
178 | link = link.replace('__S',rev_start.substr(0,6)); | |
179 | link = link.replace('__E',rev_end.substr(0,6)); |
|
179 | link = link.replace('__E',rev_end.substr(0,6)); | |
180 | YUD.get('rev_range_container').href = url; |
|
180 | YUD.get('rev_range_container').href = url; | |
181 | YUD.get('rev_range_container').innerHTML = link; |
|
181 | YUD.get('rev_range_container').innerHTML = link; | |
182 | YUD.setStyle('rev_range_container','display',''); |
|
182 | YUD.setStyle('rev_range_container','display',''); | |
183 | YUD.setStyle('rev_range_clear','display',''); |
|
183 | YUD.setStyle('rev_range_clear','display',''); | |
184 |
|
184 | |||
185 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); |
|
185 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); | |
186 |
|
186 | |||
187 | } |
|
187 | } | |
188 | else{ |
|
188 | else{ | |
189 | YUD.setStyle('rev_range_container','display','none'); |
|
189 | YUD.setStyle('rev_range_container','display','none'); | |
190 | YUD.setStyle('rev_range_clear','display','none'); |
|
190 | YUD.setStyle('rev_range_clear','display','none'); | |
191 | } |
|
191 | } | |
192 | }); |
|
192 | }); | |
193 | YUE.on('rev_range_clear','click',function(e){ |
|
193 | YUE.on('rev_range_clear','click',function(e){ | |
194 | for (var i=0; i<checkboxes.length; i++){ |
|
194 | for (var i=0; i<checkboxes.length; i++){ | |
195 | var cb = checkboxes[i]; |
|
195 | var cb = checkboxes[i]; | |
196 | cb.checked = false; |
|
196 | cb.checked = false; | |
197 | } |
|
197 | } | |
198 | YUE.preventDefault(e); |
|
198 | YUE.preventDefault(e); | |
199 | }) |
|
199 | }) | |
200 | var msgs = YUQ('.message'); |
|
200 | var msgs = YUQ('.message'); | |
201 | // get first element height |
|
201 | // get first element height | |
202 | var el = YUQ('#graph_content .container')[0]; |
|
202 | var el = YUQ('#graph_content .container')[0]; | |
203 | var row_h = el.clientHeight; |
|
203 | var row_h = el.clientHeight; | |
204 | for(var i=0;i<msgs.length;i++){ |
|
204 | for(var i=0;i<msgs.length;i++){ | |
205 | var m = msgs[i]; |
|
205 | var m = msgs[i]; | |
206 |
|
206 | |||
207 | var h = m.clientHeight; |
|
207 | var h = m.clientHeight; | |
208 | var pad = YUD.getStyle(m,'padding'); |
|
208 | var pad = YUD.getStyle(m,'padding'); | |
209 | if(h > row_h){ |
|
209 | if(h > row_h){ | |
210 | var offset = row_h - (h+12); |
|
210 | var offset = row_h - (h+12); | |
211 | YUD.setStyle(m.nextElementSibling,'display','block'); |
|
211 | YUD.setStyle(m.nextElementSibling,'display','block'); | |
212 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
|
212 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); | |
213 | }; |
|
213 | }; | |
214 | } |
|
214 | } | |
215 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
215 | YUE.on(YUQ('.expand'),'click',function(e){ | |
216 | var elem = e.currentTarget.parentNode.parentNode; |
|
216 | var elem = e.currentTarget.parentNode.parentNode; | |
217 | YUD.setStyle(e.currentTarget,'display','none'); |
|
217 | YUD.setStyle(e.currentTarget,'display','none'); | |
218 | YUD.setStyle(elem,'height','auto'); |
|
218 | YUD.setStyle(elem,'height','auto'); | |
219 |
|
219 | |||
220 | //redraw the graph, line_count and jsdata are global vars |
|
220 | //redraw the graph, line_count and jsdata are global vars | |
221 | set_canvas(100); |
|
221 | set_canvas(100); | |
222 |
|
222 | |||
223 | var r = new BranchRenderer(); |
|
223 | var r = new BranchRenderer(); | |
224 | r.render(jsdata,100,line_count); |
|
224 | r.render(jsdata,100,line_count); | |
225 |
|
225 | |||
226 | }) |
|
226 | }) | |
227 |
|
227 | |||
228 | // Fetch changeset details |
|
228 | // Fetch changeset details | |
229 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ |
|
229 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ | |
230 | var id = e.currentTarget.id; |
|
230 | var id = e.currentTarget.id; | |
231 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; |
|
231 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; | |
232 | var url = url.replace('__CS__',id.replace('changed_total_','')); |
|
232 | var url = url.replace('__CS__',id.replace('changed_total_','')); | |
233 | ypjax(url,id,function(){tooltip_activate()}); |
|
233 | ypjax(url,id,function(){tooltip_activate()}); | |
234 | }); |
|
234 | }); | |
235 |
|
235 | |||
236 | // change branch filter |
|
236 | // change branch filter | |
237 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
237 | YUE.on(YUD.get('branch_filter'),'change',function(e){ | |
238 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
|
238 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; | |
239 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
|
239 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; | |
240 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
|
240 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; | |
241 | var url = url.replace('__BRANCH__',selected_branch); |
|
241 | var url = url.replace('__BRANCH__',selected_branch); | |
242 | if(selected_branch != ''){ |
|
242 | if(selected_branch != ''){ | |
243 | window.location = url; |
|
243 | window.location = url; | |
244 | }else{ |
|
244 | }else{ | |
245 | window.location = url_main; |
|
245 | window.location = url_main; | |
246 | } |
|
246 | } | |
247 |
|
247 | |||
248 | }); |
|
248 | }); | |
249 |
|
249 | |||
250 | function set_canvas(width) { |
|
250 | function set_canvas(width) { | |
251 | var c = document.getElementById('graph_nodes'); |
|
251 | var c = document.getElementById('graph_nodes'); | |
252 | var t = document.getElementById('graph_content'); |
|
252 | var t = document.getElementById('graph_content'); | |
253 | canvas = document.getElementById('graph_canvas'); |
|
253 | canvas = document.getElementById('graph_canvas'); | |
254 | var div_h = t.clientHeight; |
|
254 | var div_h = t.clientHeight; | |
255 | c.style.height=div_h+'px'; |
|
255 | c.style.height=div_h+'px'; | |
256 | canvas.setAttribute('height',div_h); |
|
256 | canvas.setAttribute('height',div_h); | |
257 | c.style.height=width+'px'; |
|
257 | c.style.height=width+'px'; | |
258 | canvas.setAttribute('width',width); |
|
258 | canvas.setAttribute('width',width); | |
259 | }; |
|
259 | }; | |
260 | var heads = 1; |
|
260 | var heads = 1; | |
261 | var line_count = 0; |
|
261 | var line_count = 0; | |
262 | var jsdata = ${c.jsdata|n}; |
|
262 | var jsdata = ${c.jsdata|n}; | |
263 |
|
263 | |||
264 | for (var i=0;i<jsdata.length;i++) { |
|
264 | for (var i=0;i<jsdata.length;i++) { | |
265 | var in_l = jsdata[i][2]; |
|
265 | var in_l = jsdata[i][2]; | |
266 | for (var j in in_l) { |
|
266 | for (var j in in_l) { | |
267 | var m = in_l[j][1]; |
|
267 | var m = in_l[j][1]; | |
268 | if (m > line_count) |
|
268 | if (m > line_count) | |
269 | line_count = m; |
|
269 | line_count = m; | |
270 | } |
|
270 | } | |
271 | } |
|
271 | } | |
272 | set_canvas(100); |
|
272 | set_canvas(100); | |
273 |
|
273 | |||
274 | var r = new BranchRenderer(); |
|
274 | var r = new BranchRenderer(); | |
275 | r.render(jsdata,100,line_count); |
|
275 | r.render(jsdata,100,line_count); | |
276 |
|
276 | |||
277 | }); |
|
277 | }); | |
278 | </script> |
|
278 | </script> | |
279 | %else: |
|
279 | %else: | |
280 | ${_('There are no changes yet')} |
|
280 | ${_('There are no changes yet')} | |
281 | %endif |
|
281 | %endif | |
282 | </div> |
|
282 | </div> | |
283 | </div> |
|
283 | </div> | |
284 | </%def> |
|
284 | </%def> |
@@ -1,93 +1,93 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Tags') % c.repo_name} - ${c.rhodecode_name} |
|
5 | ${_('%s Tags') % c.repo_name} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
10 | <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" value="${_('quick filter...')}"/> | |
11 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
11 | ${h.link_to(_(u'Home'),h.url('/'))} | |
12 | » |
|
12 | » | |
13 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
13 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
14 | » |
|
14 | » | |
15 | ${_('tags')} |
|
15 | ${_('tags')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="page_nav()"> |
|
18 | <%def name="page_nav()"> | |
19 | ${self.menu('tags')} |
|
19 | ${self.menu('tags')} | |
20 | </%def> |
|
20 | </%def> | |
21 | <%def name="main()"> |
|
21 | <%def name="main()"> | |
22 | <div class="box"> |
|
22 | <div class="box"> | |
23 | <!-- box / title --> |
|
23 | <!-- box / title --> | |
24 | <div class="title"> |
|
24 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
25 | ${self.breadcrumbs()} | |
26 | </div> |
|
26 | </div> | |
27 | <!-- end box / title --> |
|
27 | <!-- end box / title --> | |
28 | %if c.repo_tags: |
|
28 | %if c.repo_tags: | |
29 |
<div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px; |
|
29 | <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;text-align: right;"><a href="#" class="ui-btn small">${_('Compare tags')}</a></div> | |
30 | %endif |
|
30 | %endif | |
31 | <div class="table"> |
|
31 | <div class="table"> | |
32 | <%include file='tags_data.html'/> |
|
32 | <%include file='tags_data.html'/> | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | <script type="text/javascript"> |
|
35 | <script type="text/javascript"> | |
36 | YUE.on('compare_tags','click',function(e){ |
|
36 | YUE.on('compare_tags','click',function(e){ | |
37 | YUE.preventDefault(e); |
|
37 | YUE.preventDefault(e); | |
38 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
38 | var org = YUQ('input[name=compare_org]:checked')[0]; | |
39 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
39 | var other = YUQ('input[name=compare_other]:checked')[0]; | |
40 |
|
40 | |||
41 | if(org && other){ |
|
41 | if(org && other){ | |
42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='tag',org_ref='__ORG__',other_ref_type='tag',other_ref='__OTHER__')}"; |
|
42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='tag',org_ref='__ORG__',other_ref_type='tag',other_ref='__OTHER__')}"; | |
43 | var u = compare_url.replace('__ORG__',org.value) |
|
43 | var u = compare_url.replace('__ORG__',org.value) | |
44 | .replace('__OTHER__',other.value); |
|
44 | .replace('__OTHER__',other.value); | |
45 | window.location=u; |
|
45 | window.location=u; | |
46 | } |
|
46 | } | |
47 | }); |
|
47 | }); | |
48 |
|
48 | |||
49 | // main table sorting |
|
49 | // main table sorting | |
50 | var myColumnDefs = [ |
|
50 | var myColumnDefs = [ | |
51 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
51 | {key:"name",label:"${_('Name')}",sortable:true}, | |
52 | {key:"date",label:"${_('Date')}",sortable:true, |
|
52 | {key:"date",label:"${_('Date')}",sortable:true, | |
53 | sortOptions: { sortFunction: dateSort }}, |
|
53 | sortOptions: { sortFunction: dateSort }}, | |
54 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
54 | {key:"author",label:"${_('Author')}",sortable:true}, | |
55 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
55 | {key:"revision",label:"${_('Revision')}",sortable:true, | |
56 | sortOptions: { sortFunction: revisionSort }}, |
|
56 | sortOptions: { sortFunction: revisionSort }}, | |
57 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
57 | {key:"compare",label:"${_('Compare')}",sortable:false,}, | |
58 | ]; |
|
58 | ]; | |
59 |
|
59 | |||
60 | var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data")); |
|
60 | var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data")); | |
61 |
|
61 | |||
62 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
62 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; | |
63 |
|
63 | |||
64 | myDataSource.responseSchema = { |
|
64 | myDataSource.responseSchema = { | |
65 | fields: [ |
|
65 | fields: [ | |
66 | {key:"name"}, |
|
66 | {key:"name"}, | |
67 | {key:"date"}, |
|
67 | {key:"date"}, | |
68 | {key:"author"}, |
|
68 | {key:"author"}, | |
69 | {key:"revision"}, |
|
69 | {key:"revision"}, | |
70 | {key:"compare"}, |
|
70 | {key:"compare"}, | |
71 | ] |
|
71 | ] | |
72 | }; |
|
72 | }; | |
73 |
|
73 | |||
74 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
74 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, | |
75 | { |
|
75 | { | |
76 | sortedBy:{key:"name",dir:"asc"}, |
|
76 | sortedBy:{key:"name",dir:"asc"}, | |
77 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
77 | MSG_SORTASC:"${_('Click to sort ascending')}", | |
78 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
78 | MSG_SORTDESC:"${_('Click to sort descending')}", | |
79 | MSG_EMPTY:"${_('No records found.')}", |
|
79 | MSG_EMPTY:"${_('No records found.')}", | |
80 | MSG_ERROR:"${_('Data error.')}", |
|
80 | MSG_ERROR:"${_('Data error.')}", | |
81 | MSG_LOADING:"${_('Loading...')}", |
|
81 | MSG_LOADING:"${_('Loading...')}", | |
82 | } |
|
82 | } | |
83 | ); |
|
83 | ); | |
84 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
84 | myDataTable.subscribe('postRenderEvent',function(oArgs) { | |
85 | tooltip_activate(); |
|
85 | tooltip_activate(); | |
86 | var func = function(node){ |
|
86 | var func = function(node){ | |
87 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
87 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; | |
88 | } |
|
88 | } | |
89 | q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func); |
|
89 | q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func); | |
90 | }); |
|
90 | }); | |
91 |
|
91 | |||
92 | </script> |
|
92 | </script> | |
93 | </%def> |
|
93 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now