##// END OF EJS Templates
Better i18n for page titles.
Vincent Duvert -
r2417:76d156be beta
parent child Browse files
Show More
@@ -1,78 +1,78
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${c.repo_name} ${_('Bookmarks')} - ${c.rhodecode_name}
5 ${_('%s Bookmarks') % c.repo_name} - ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8
8
9 <%def name="breadcrumbs_links()">
9 <%def name="breadcrumbs_links()">
10 <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
10 <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
11 ${h.link_to(u'Home',h.url('/'))}
11 ${h.link_to(u'Home',h.url('/'))}
12 &raquo;
12 &raquo;
13 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
13 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
14 &raquo;
14 &raquo;
15 ${_('bookmarks')}
15 ${_('bookmarks')}
16 </%def>
16 </%def>
17
17
18 <%def name="page_nav()">
18 <%def name="page_nav()">
19 ${self.menu('bookmarks')}
19 ${self.menu('bookmarks')}
20 </%def>
20 </%def>
21 <%def name="main()">
21 <%def name="main()">
22 <div class="box">
22 <div class="box">
23 <!-- box / title -->
23 <!-- box / title -->
24 <div class="title">
24 <div class="title">
25 ${self.breadcrumbs()}
25 ${self.breadcrumbs()}
26 </div>
26 </div>
27 <!-- end box / title -->
27 <!-- end box / title -->
28 <div class="table">
28 <div class="table">
29 <%include file='bookmarks_data.html'/>
29 <%include file='bookmarks_data.html'/>
30 </div>
30 </div>
31 </div>
31 </div>
32 <script type="text/javascript">
32 <script type="text/javascript">
33
33
34 // main table sorting
34 // main table sorting
35 var myColumnDefs = [
35 var myColumnDefs = [
36 {key:"name",label:"${_('Name')}",sortable:true},
36 {key:"name",label:"${_('Name')}",sortable:true},
37 {key:"date",label:"${_('Date')}",sortable:true,
37 {key:"date",label:"${_('Date')}",sortable:true,
38 sortOptions: { sortFunction: dateSort }},
38 sortOptions: { sortFunction: dateSort }},
39 {key:"author",label:"${_('Author')}",sortable:true},
39 {key:"author",label:"${_('Author')}",sortable:true},
40 {key:"revision",label:"${_('Revision')}",sortable:true,
40 {key:"revision",label:"${_('Revision')}",sortable:true,
41 sortOptions: { sortFunction: revisionSort }},
41 sortOptions: { sortFunction: revisionSort }},
42 ];
42 ];
43
43
44 var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data"));
44 var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data"));
45
45
46 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
46 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
47
47
48 myDataSource.responseSchema = {
48 myDataSource.responseSchema = {
49 fields: [
49 fields: [
50 {key:"name"},
50 {key:"name"},
51 {key:"date"},
51 {key:"date"},
52 {key:"author"},
52 {key:"author"},
53 {key:"revision"},
53 {key:"revision"},
54 ]
54 ]
55 };
55 };
56
56
57 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
57 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
58 {
58 {
59 sortedBy:{key:"name",dir:"asc"},
59 sortedBy:{key:"name",dir:"asc"},
60 MSG_SORTASC:"${_('Click to sort ascending')}",
60 MSG_SORTASC:"${_('Click to sort ascending')}",
61 MSG_SORTDESC:"${_('Click to sort descending')}",
61 MSG_SORTDESC:"${_('Click to sort descending')}",
62 MSG_EMPTY:"${_('No records found.')}",
62 MSG_EMPTY:"${_('No records found.')}",
63 MSG_ERROR:"${_('Data error.')}",
63 MSG_ERROR:"${_('Data error.')}",
64 MSG_LOADING:"${_('Loading...')}",
64 MSG_LOADING:"${_('Loading...')}",
65 }
65 }
66 );
66 );
67 myDataTable.subscribe('postRenderEvent',function(oArgs) {
67 myDataTable.subscribe('postRenderEvent',function(oArgs) {
68 tooltip_activate();
68 tooltip_activate();
69 var func = function(node){
69 var func = function(node){
70 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
70 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
71 }
71 }
72 q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func);
72 q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func);
73 });
73 });
74
74
75 </script>
75 </script>
76
76
77
77
78 </%def>
78 </%def>
@@ -1,77 +1,77
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 ${c.repo_name} ${_('Branches')} - ${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 &raquo;
11 &raquo;
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 &raquo;
13 &raquo;
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 <div class="table">
28 <div class="table">
29 <%include file='branches_data.html'/>
29 <%include file='branches_data.html'/>
30 </div>
30 </div>
31 </div>
31 </div>
32 <script type="text/javascript">
32 <script type="text/javascript">
33
33
34 // main table sorting
34 // main table sorting
35 var myColumnDefs = [
35 var myColumnDefs = [
36 {key:"name",label:"${_('Name')}",sortable:true},
36 {key:"name",label:"${_('Name')}",sortable:true},
37 {key:"date",label:"${_('Date')}",sortable:true,
37 {key:"date",label:"${_('Date')}",sortable:true,
38 sortOptions: { sortFunction: dateSort }},
38 sortOptions: { sortFunction: dateSort }},
39 {key:"author",label:"${_('Author')}",sortable:true},
39 {key:"author",label:"${_('Author')}",sortable:true},
40 {key:"revision",label:"${_('Revision')}",sortable:true,
40 {key:"revision",label:"${_('Revision')}",sortable:true,
41 sortOptions: { sortFunction: revisionSort }},
41 sortOptions: { sortFunction: revisionSort }},
42 ];
42 ];
43
43
44 var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data"));
44 var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data"));
45
45
46 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
46 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
47
47
48 myDataSource.responseSchema = {
48 myDataSource.responseSchema = {
49 fields: [
49 fields: [
50 {key:"name"},
50 {key:"name"},
51 {key:"date"},
51 {key:"date"},
52 {key:"author"},
52 {key:"author"},
53 {key:"revision"},
53 {key:"revision"},
54 ]
54 ]
55 };
55 };
56
56
57 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
57 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
58 {
58 {
59 sortedBy:{key:"name",dir:"asc"},
59 sortedBy:{key:"name",dir:"asc"},
60 MSG_SORTASC:"${_('Click to sort ascending')}",
60 MSG_SORTASC:"${_('Click to sort ascending')}",
61 MSG_SORTDESC:"${_('Click to sort descending')}",
61 MSG_SORTDESC:"${_('Click to sort descending')}",
62 MSG_EMPTY:"${_('No records found.')}",
62 MSG_EMPTY:"${_('No records found.')}",
63 MSG_ERROR:"${_('Data error.')}",
63 MSG_ERROR:"${_('Data error.')}",
64 MSG_LOADING:"${_('Loading...')}",
64 MSG_LOADING:"${_('Loading...')}",
65 }
65 }
66 );
66 );
67 myDataTable.subscribe('postRenderEvent',function(oArgs) {
67 myDataTable.subscribe('postRenderEvent',function(oArgs) {
68 tooltip_activate();
68 tooltip_activate();
69 var func = function(node){
69 var func = function(node){
70 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
70 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
71 }
71 }
72 q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func);
72 q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func);
73 });
73 });
74
74
75 </script>
75 </script>
76
76
77 </%def>
77 </%def>
@@ -1,239 +1,239
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 ${c.repo_name} ${_('Changelog')} - ${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 &raquo;
11 &raquo;
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 &raquo;
13 &raquo;
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="container_header">
35 <div class="container_header">
36 ${h.form(h.url.current(),method='get')}
36 ${h.form(h.url.current(),method='get')}
37 <div class="info_box" style="float:left">
37 <div class="info_box" style="float:left">
38 ${h.submit('set',_('Show'),class_="ui-btn")}
38 ${h.submit('set',_('Show'),class_="ui-btn")}
39 ${h.text('size',size=1,value=c.size)}
39 ${h.text('size',size=1,value=c.size)}
40 ${_('revisions')}
40 ${_('revisions')}
41 </div>
41 </div>
42 ${h.end_form()}
42 ${h.end_form()}
43 <div id="rev_range_container" style="display:none"></div>
43 <div id="rev_range_container" style="display:none"></div>
44 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
44 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
45 </div>
45 </div>
46
46
47 %for cnt,cs in enumerate(c.pagination):
47 %for cnt,cs in enumerate(c.pagination):
48 <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
48 <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
49 <div class="left">
49 <div class="left">
50 <div>
50 <div>
51 ${h.checkbox(cs.short_id,class_="changeset_range")}
51 ${h.checkbox(cs.short_id,class_="changeset_range")}
52 <span class="tooltip" title="${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>
52 <span class="tooltip" title="${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>
53 </div>
53 </div>
54 <div class="author">
54 <div class="author">
55 <div class="gravatar">
55 <div class="gravatar">
56 <img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),16)}"/>
56 <img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),16)}"/>
57 </div>
57 </div>
58 <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div>
58 <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div>
59 </div>
59 </div>
60 <div class="date">${h.fmt_date(cs.date)}</div>
60 <div class="date">${h.fmt_date(cs.date)}</div>
61 </div>
61 </div>
62 <div class="mid">
62 <div class="mid">
63 <div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
63 <div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
64 <div class="expand"><span class="expandtext">&darr; ${_('show more')} &darr;</span></div>
64 <div class="expand"><span class="expandtext">&darr; ${_('show more')} &darr;</span></div>
65 </div>
65 </div>
66 <div class="right">
66 <div class="right">
67 <div class="changes">
67 <div class="changes">
68 <div id="${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${_('Affected number of files, click to show more details')}">${len(cs.affected_files)}</div>
68 <div id="${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${_('Affected number of files, click to show more details')}">${len(cs.affected_files)}</div>
69 <div class="comments-container">
69 <div class="comments-container">
70 %if len(c.comments.get(cs.raw_id,[])) > 0:
70 %if len(c.comments.get(cs.raw_id,[])) > 0:
71 <div class="comments-cnt" title="${('comments')}">
71 <div class="comments-cnt" title="${('comments')}">
72 <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)}">
72 <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)}">
73 <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div>
73 <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div>
74 <img src="${h.url('/images/icons/comments.png')}">
74 <img src="${h.url('/images/icons/comments.png')}">
75 </a>
75 </a>
76 </div>
76 </div>
77 %endif
77 %endif
78 </div>
78 </div>
79 </div>
79 </div>
80 %if cs.parents:
80 %if cs.parents:
81 %for p_cs in reversed(cs.parents):
81 %for p_cs in reversed(cs.parents):
82 <div class="parent">${_('Parent')}
82 <div class="parent">${_('Parent')}
83 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
83 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
84 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
84 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
85 </div>
85 </div>
86 %endfor
86 %endfor
87 %else:
87 %else:
88 <div class="parent">${_('No parents')}</div>
88 <div class="parent">${_('No parents')}</div>
89 %endif
89 %endif
90
90
91 <span class="logtags">
91 <span class="logtags">
92 %if len(cs.parents)>1:
92 %if len(cs.parents)>1:
93 <span class="merge">${_('merge')}</span>
93 <span class="merge">${_('merge')}</span>
94 %endif
94 %endif
95 %if cs.branch:
95 %if cs.branch:
96 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
96 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
97 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
97 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
98 </span>
98 </span>
99 %endif
99 %endif
100 %if h.is_hg(c.rhodecode_repo):
100 %if h.is_hg(c.rhodecode_repo):
101 %for book in cs.bookmarks:
101 %for book in cs.bookmarks:
102 <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
102 <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
103 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
103 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
104 </span>
104 </span>
105 %endfor
105 %endfor
106 %endif
106 %endif
107 %for tag in cs.tags:
107 %for tag in cs.tags:
108 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
108 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
109 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
109 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
110 %endfor
110 %endfor
111 </span>
111 </span>
112 </div>
112 </div>
113 </div>
113 </div>
114
114
115 %endfor
115 %endfor
116 <div class="pagination-wh pagination-left">
116 <div class="pagination-wh pagination-left">
117 ${c.pagination.pager('$link_previous ~2~ $link_next')}
117 ${c.pagination.pager('$link_previous ~2~ $link_next')}
118 </div>
118 </div>
119 </div>
119 </div>
120 </div>
120 </div>
121
121
122 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
122 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
123 <script type="text/javascript">
123 <script type="text/javascript">
124 YAHOO.util.Event.onDOMReady(function(){
124 YAHOO.util.Event.onDOMReady(function(){
125
125
126 //Monitor range checkboxes and build a link to changesets
126 //Monitor range checkboxes and build a link to changesets
127 //ranges
127 //ranges
128 var checkboxes = YUD.getElementsByClassName('changeset_range');
128 var checkboxes = YUD.getElementsByClassName('changeset_range');
129 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}";
129 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}";
130 YUE.on(checkboxes,'click',function(e){
130 YUE.on(checkboxes,'click',function(e){
131 var checked_checkboxes = [];
131 var checked_checkboxes = [];
132 for (pos in checkboxes){
132 for (pos in checkboxes){
133 if(checkboxes[pos].checked){
133 if(checkboxes[pos].checked){
134 checked_checkboxes.push(checkboxes[pos]);
134 checked_checkboxes.push(checkboxes[pos]);
135 }
135 }
136 }
136 }
137 if(checked_checkboxes.length>1){
137 if(checked_checkboxes.length>1){
138 var rev_end = checked_checkboxes[0].name;
138 var rev_end = checked_checkboxes[0].name;
139 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
139 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
140
140
141 var url = url_tmpl.replace('__REVRANGE__',
141 var url = url_tmpl.replace('__REVRANGE__',
142 rev_start+'...'+rev_end);
142 rev_start+'...'+rev_end);
143
143
144 var link = "<a href="+url+">${_('Show selected changes __S -> __E')}</a>"
144 var link = "<a href="+url+">${_('Show selected changes __S -> __E')}</a>"
145 link = link.replace('__S',rev_start);
145 link = link.replace('__S',rev_start);
146 link = link.replace('__E',rev_end);
146 link = link.replace('__E',rev_end);
147 YUD.get('rev_range_container').innerHTML = link;
147 YUD.get('rev_range_container').innerHTML = link;
148 YUD.setStyle('rev_range_container','display','');
148 YUD.setStyle('rev_range_container','display','');
149 }
149 }
150 else{
150 else{
151 YUD.setStyle('rev_range_container','display','none');
151 YUD.setStyle('rev_range_container','display','none');
152
152
153 }
153 }
154 });
154 });
155
155
156 var msgs = YUQ('.message');
156 var msgs = YUQ('.message');
157 // get first element height
157 // get first element height
158 var el = YUQ('#graph_content .container')[0];
158 var el = YUQ('#graph_content .container')[0];
159 var row_h = el.clientHeight;
159 var row_h = el.clientHeight;
160 for(var i=0;i<msgs.length;i++){
160 for(var i=0;i<msgs.length;i++){
161 var m = msgs[i];
161 var m = msgs[i];
162
162
163 var h = m.clientHeight;
163 var h = m.clientHeight;
164 var pad = YUD.getStyle(m,'padding');
164 var pad = YUD.getStyle(m,'padding');
165 if(h > row_h){
165 if(h > row_h){
166 var offset = row_h - (h+12);
166 var offset = row_h - (h+12);
167 YUD.setStyle(m.nextElementSibling,'display','block');
167 YUD.setStyle(m.nextElementSibling,'display','block');
168 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
168 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
169 };
169 };
170 }
170 }
171 YUE.on(YUQ('.expand'),'click',function(e){
171 YUE.on(YUQ('.expand'),'click',function(e){
172 var elem = e.currentTarget.parentNode.parentNode;
172 var elem = e.currentTarget.parentNode.parentNode;
173 YUD.setStyle(e.currentTarget,'display','none');
173 YUD.setStyle(e.currentTarget,'display','none');
174 YUD.setStyle(elem,'height','auto');
174 YUD.setStyle(elem,'height','auto');
175
175
176 //redraw the graph, max_w and jsdata are global vars
176 //redraw the graph, max_w and jsdata are global vars
177 set_canvas(max_w);
177 set_canvas(max_w);
178
178
179 var r = new BranchRenderer();
179 var r = new BranchRenderer();
180 r.render(jsdata,max_w);
180 r.render(jsdata,max_w);
181
181
182 })
182 })
183
183
184 // Fetch changeset details
184 // Fetch changeset details
185 YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){
185 YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){
186 var id = e.currentTarget.id
186 var id = e.currentTarget.id
187 var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"
187 var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"
188 var url = url.replace('__CS__',id);
188 var url = url.replace('__CS__',id);
189 ypjax(url,id,function(){tooltip_activate()});
189 ypjax(url,id,function(){tooltip_activate()});
190 });
190 });
191
191
192 // change branch filter
192 // change branch filter
193 YUE.on(YUD.get('branch_filter'),'change',function(e){
193 YUE.on(YUD.get('branch_filter'),'change',function(e){
194 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
194 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
195 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}";
195 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}";
196 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}";
196 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}";
197 var url = url.replace('__BRANCH__',selected_branch);
197 var url = url.replace('__BRANCH__',selected_branch);
198 if(selected_branch != ''){
198 if(selected_branch != ''){
199 window.location = url;
199 window.location = url;
200 }else{
200 }else{
201 window.location = url_main;
201 window.location = url_main;
202 }
202 }
203
203
204 });
204 });
205
205
206 function set_canvas(heads) {
206 function set_canvas(heads) {
207 var c = document.getElementById('graph_nodes');
207 var c = document.getElementById('graph_nodes');
208 var t = document.getElementById('graph_content');
208 var t = document.getElementById('graph_content');
209 canvas = document.getElementById('graph_canvas');
209 canvas = document.getElementById('graph_canvas');
210 var div_h = t.clientHeight;
210 var div_h = t.clientHeight;
211 c.style.height=div_h+'px';
211 c.style.height=div_h+'px';
212 canvas.setAttribute('height',div_h);
212 canvas.setAttribute('height',div_h);
213 c.style.height=max_w+'px';
213 c.style.height=max_w+'px';
214 canvas.setAttribute('width',max_w);
214 canvas.setAttribute('width',max_w);
215 };
215 };
216 var heads = 1;
216 var heads = 1;
217 var max_heads = 0;
217 var max_heads = 0;
218 var jsdata = ${c.jsdata|n};
218 var jsdata = ${c.jsdata|n};
219
219
220 for( var i=0;i<jsdata.length;i++){
220 for( var i=0;i<jsdata.length;i++){
221 var m = Math.max.apply(Math, jsdata[i][1]);
221 var m = Math.max.apply(Math, jsdata[i][1]);
222 if (m>max_heads){
222 if (m>max_heads){
223 max_heads = m;
223 max_heads = m;
224 }
224 }
225 }
225 }
226 var max_w = Math.max(100,max_heads*25);
226 var max_w = Math.max(100,max_heads*25);
227 set_canvas(max_w);
227 set_canvas(max_w);
228
228
229 var r = new BranchRenderer();
229 var r = new BranchRenderer();
230 r.render(jsdata,max_w);
230 r.render(jsdata,max_w);
231
231
232 });
232 });
233 </script>
233 </script>
234 %else:
234 %else:
235 ${_('There are no changes yet')}
235 ${_('There are no changes yet')}
236 %endif
236 %endif
237 </div>
237 </div>
238 </div>
238 </div>
239 </%def>
239 </%def>
@@ -1,167 +1,167
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 ${c.repo_name} ${_('Changeset')} - 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 &raquo;
11 &raquo;
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 &raquo;
13 &raquo;
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 <div class="table">
27 <div class="table">
28 <div class="diffblock">
28 <div class="diffblock">
29 <div class="code-header">
29 <div class="code-header">
30 <div class="hash">
30 <div class="hash">
31 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
31 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
32 </div>
32 </div>
33 <div class="date">
33 <div class="date">
34 ${h.fmt_date(c.changeset.date)}
34 ${h.fmt_date(c.changeset.date)}
35 </div>
35 </div>
36 <div class="diff-actions">
36 <div class="diff-actions">
37 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" title="${_('raw diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
37 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" title="${_('raw diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
38 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" title="${_('download diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white_get.png')}"/></a>
38 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" title="${_('download diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white_get.png')}"/></a>
39 ${c.ignorews_url(request.GET)}
39 ${c.ignorews_url(request.GET)}
40 ${c.context_url(request.GET)}
40 ${c.context_url(request.GET)}
41 </div>
41 </div>
42 <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>
42 <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>
43 </div>
43 </div>
44 </div>
44 </div>
45 <div id="changeset_content">
45 <div id="changeset_content">
46 <div class="container">
46 <div class="container">
47 <div class="left">
47 <div class="left">
48 <div class="author">
48 <div class="author">
49 <div class="gravatar">
49 <div class="gravatar">
50 <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/>
50 <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/>
51 </div>
51 </div>
52 <span>${h.person(c.changeset.author)}</span><br/>
52 <span>${h.person(c.changeset.author)}</span><br/>
53 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
53 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
54 </div>
54 </div>
55 <div class="message">${h.urlify_commit(h.wrap_paragraphs(c.changeset.message),c.repo_name)}</div>
55 <div class="message">${h.urlify_commit(h.wrap_paragraphs(c.changeset.message),c.repo_name)}</div>
56 </div>
56 </div>
57 <div class="right">
57 <div class="right">
58 <div class="changes">
58 <div class="changes">
59 % if len(c.changeset.affected_files) <= c.affected_files_cut_off:
59 % if len(c.changeset.affected_files) <= c.affected_files_cut_off:
60 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
60 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
61 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
61 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
62 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
62 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
63 % else:
63 % else:
64 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
64 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
65 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
65 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
66 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
66 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
67 % endif
67 % endif
68 </div>
68 </div>
69
69
70 %if c.changeset.parents:
70 %if c.changeset.parents:
71 %for p_cs in reversed(c.changeset.parents):
71 %for p_cs in reversed(c.changeset.parents):
72 <div class="parent">${_('Parent')}
72 <div class="parent">${_('Parent')}
73 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
73 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
74 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
74 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
75 </div>
75 </div>
76 %endfor
76 %endfor
77 %else:
77 %else:
78 <div class="parent">${_('No parents')}</div>
78 <div class="parent">${_('No parents')}</div>
79 %endif
79 %endif
80 <span class="logtags">
80 <span class="logtags">
81 %if len(c.changeset.parents)>1:
81 %if len(c.changeset.parents)>1:
82 <span class="merge">${_('merge')}</span>
82 <span class="merge">${_('merge')}</span>
83 %endif
83 %endif
84 %if c.changeset.branch:
84 %if c.changeset.branch:
85 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
85 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
86 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
86 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
87 </span>
87 </span>
88 %endif
88 %endif
89 %for tag in c.changeset.tags:
89 %for tag in c.changeset.tags:
90 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
90 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
91 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
91 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
92 %endfor
92 %endfor
93 </span>
93 </span>
94 </div>
94 </div>
95 </div>
95 </div>
96 <span>
96 <span>
97 ${_('%s files affected with %s insertions and %s deletions:') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
97 ${_('%s files affected with %s insertions and %s deletions:') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
98 </span>
98 </span>
99 <div class="cs_files">
99 <div class="cs_files">
100 %for change,filenode,diff,cs1,cs2,stat in c.changes:
100 %for change,filenode,diff,cs1,cs2,stat in c.changes:
101 <div class="cs_${change}">
101 <div class="cs_${change}">
102 <div class="node">
102 <div class="node">
103 %if change != 'removed':
103 %if change != 'removed':
104 ${h.link_to(h.safe_unicode(filenode.path),c.anchor_url(filenode.changeset.raw_id,filenode.path,request.GET)+"_target")}
104 ${h.link_to(h.safe_unicode(filenode.path),c.anchor_url(filenode.changeset.raw_id,filenode.path,request.GET)+"_target")}
105 %else:
105 %else:
106 ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID('',filenode.path)))}
106 ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID('',filenode.path)))}
107 %endif
107 %endif
108 </div>
108 </div>
109 <div class="changes">${h.fancy_file_stats(stat)}</div>
109 <div class="changes">${h.fancy_file_stats(stat)}</div>
110 </div>
110 </div>
111 %endfor
111 %endfor
112 % if c.cut_off:
112 % if c.cut_off:
113 ${_('Changeset was too big and was cut off...')}
113 ${_('Changeset was too big and was cut off...')}
114 % endif
114 % endif
115 </div>
115 </div>
116 </div>
116 </div>
117
117
118 </div>
118 </div>
119 <script>
119 <script>
120 var _USERS_AC_DATA = ${c.users_array|n};
120 var _USERS_AC_DATA = ${c.users_array|n};
121 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
121 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
122 </script>
122 </script>
123 ## diff block
123 ## diff block
124 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
124 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
125 ${diff_block.diff_block(c.changes)}
125 ${diff_block.diff_block(c.changes)}
126
126
127 ## template for inline comment form
127 ## template for inline comment form
128 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
128 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
129 ${comment.comment_inline_form(c.changeset)}
129 ${comment.comment_inline_form(c.changeset)}
130
130
131 ## render comments
131 ## render comments
132 ${comment.comments(c.changeset)}
132 ${comment.comments(c.changeset)}
133 <script type="text/javascript">
133 <script type="text/javascript">
134 YUE.onDOMReady(function(){
134 YUE.onDOMReady(function(){
135 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
135 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
136 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"
136 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"
137 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
137 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
138 var show = 'none';
138 var show = 'none';
139 var target = e.currentTarget;
139 var target = e.currentTarget;
140 if(target.checked){
140 if(target.checked){
141 var show = ''
141 var show = ''
142 }
142 }
143 var boxid = YUD.getAttribute(target,'id_for');
143 var boxid = YUD.getAttribute(target,'id_for');
144 var comments = YUQ('#{0} .inline-comments'.format(boxid));
144 var comments = YUQ('#{0} .inline-comments'.format(boxid));
145 for(c in comments){
145 for(c in comments){
146 YUD.setStyle(comments[c],'display',show);
146 YUD.setStyle(comments[c],'display',show);
147 }
147 }
148 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
148 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
149 for(c in btns){
149 for(c in btns){
150 YUD.setStyle(btns[c],'display',show);
150 YUD.setStyle(btns[c],'display',show);
151 }
151 }
152 })
152 })
153
153
154 YUE.on(YUQ('.line'),'click',function(e){
154 YUE.on(YUQ('.line'),'click',function(e){
155 var tr = e.currentTarget;
155 var tr = e.currentTarget;
156 injectInlineForm(tr);
156 injectInlineForm(tr);
157 });
157 });
158
158
159 // inject comments into they proper positions
159 // inject comments into they proper positions
160 var file_comments = YUQ('.inline-comment-placeholder');
160 var file_comments = YUQ('.inline-comment-placeholder');
161 renderInlineComments(file_comments);
161 renderInlineComments(file_comments);
162 })
162 })
163
163
164 </script>
164 </script>
165
165
166 </div>
166 </div>
167 </%def>
167 </%def>
@@ -1,89 +1,89
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 ${c.repo_name} ${_('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)} - ${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 &raquo;
10 &raquo;
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 &raquo;
12 &raquo;
13 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
13 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
14 </%def>
14 </%def>
15
15
16 <%def name="page_nav()">
16 <%def name="page_nav()">
17 ${self.menu('changelog')}
17 ${self.menu('changelog')}
18 </%def>
18 </%def>
19
19
20 <%def name="main()">
20 <%def name="main()">
21 <div class="box">
21 <div class="box">
22 <!-- box / title -->
22 <!-- box / title -->
23 <div class="title">
23 <div class="title">
24 ${self.breadcrumbs()}
24 ${self.breadcrumbs()}
25 </div>
25 </div>
26 <div class="table">
26 <div class="table">
27 <div id="body" class="diffblock">
27 <div id="body" class="diffblock">
28 <div class="code-header cv">
28 <div class="code-header cv">
29 <h3 class="code-header-title">${_('Compare View')}</h3>
29 <h3 class="code-header-title">${_('Compare View')}</h3>
30 <div>
30 <div>
31 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
31 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
32 </div>
32 </div>
33 </div>
33 </div>
34 </div>
34 </div>
35 <div id="changeset_compare_view_content">
35 <div id="changeset_compare_view_content">
36 <div class="container">
36 <div class="container">
37 <table class="compare_view_commits noborder">
37 <table class="compare_view_commits noborder">
38 %for cs in c.cs_ranges:
38 %for cs in c.cs_ranges:
39 <tr>
39 <tr>
40 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td>
40 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(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)}">${h.fmt_date(cs.date)}</span></td>
43 <td><span class="tooltip" title="${h.age(cs.date)}">${h.fmt_date(cs.date)}</span></td>
44 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
44 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
45 </tr>
45 </tr>
46 %endfor
46 %endfor
47 </table>
47 </table>
48 </div>
48 </div>
49 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
49 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
50 <div class="cs_files">
50 <div class="cs_files">
51 %for cs in c.cs_ranges:
51 %for cs in c.cs_ranges:
52 <div class="cur_cs">r${cs}</div>
52 <div class="cur_cs">r${cs}</div>
53 %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]:
53 %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]:
54 <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID(cs.raw_id,filenode.path)))}</div>
54 <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID(cs.raw_id,filenode.path)))}</div>
55 %endfor
55 %endfor
56 %endfor
56 %endfor
57 </div>
57 </div>
58 </div>
58 </div>
59
59
60 </div>
60 </div>
61 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
61 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
62 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
62 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
63 %for cs in c.cs_ranges:
63 %for cs in c.cs_ranges:
64 ##${comment.comment_inline_form(cs)}
64 ##${comment.comment_inline_form(cs)}
65 ## diff block
65 ## diff block
66 <h3 style="border:none;padding-top:8px;">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</h3>
66 <h3 style="border:none;padding-top:8px;">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</h3>
67 ${diff_block.diff_block(c.changes[cs.raw_id])}
67 ${diff_block.diff_block(c.changes[cs.raw_id])}
68 ##${comment.comments(cs)}
68 ##${comment.comments(cs)}
69
69
70 %endfor
70 %endfor
71 <script type="text/javascript">
71 <script type="text/javascript">
72
72
73 YUE.onDOMReady(function(){
73 YUE.onDOMReady(function(){
74
74
75 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
75 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
76 var act = e.currentTarget.nextElementSibling;
76 var act = e.currentTarget.nextElementSibling;
77
77
78 if(YUD.hasClass(act,'active')){
78 if(YUD.hasClass(act,'active')){
79 YUD.removeClass(act,'active');
79 YUD.removeClass(act,'active');
80 YUD.setStyle(act,'display','none');
80 YUD.setStyle(act,'display','none');
81 }else{
81 }else{
82 YUD.addClass(act,'active');
82 YUD.addClass(act,'active');
83 YUD.setStyle(act,'display','');
83 YUD.setStyle(act,'display','');
84 }
84 }
85 });
85 });
86 })
86 })
87 </script>
87 </script>
88 </div>
88 </div>
89 </%def>
89 </%def>
@@ -1,47 +1,47
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2
2
3 <%def name="title()">
3 <%def name="title()">
4 ${c.repo_name} ${_('File diff')} - ${c.rhodecode_name}
4 ${_('%s File diff') % c.repo_name} - ${c.rhodecode_name}
5 </%def>
5 </%def>
6
6
7 <%def name="breadcrumbs_links()">
7 <%def name="breadcrumbs_links()">
8 ${h.link_to(u'Home',h.url('/'))}
8 ${h.link_to(u'Home',h.url('/'))}
9 &raquo;
9 &raquo;
10 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
10 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
11 &raquo;
11 &raquo;
12 ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} &rarr; r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)}
12 ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} &rarr; r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)}
13 </%def>
13 </%def>
14
14
15 <%def name="page_nav()">
15 <%def name="page_nav()">
16 ${self.menu('files')}
16 ${self.menu('files')}
17 </%def>
17 </%def>
18 <%def name="main()">
18 <%def name="main()">
19 <div class="box">
19 <div class="box">
20 <!-- box / title -->
20 <!-- box / title -->
21 <div class="title">
21 <div class="title">
22 ${self.breadcrumbs()}
22 ${self.breadcrumbs()}
23 </div>
23 </div>
24 <div>
24 <div>
25 ## diff block
25 ## diff block
26 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
26 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
27 ${diff_block.diff_block(c.changes)}
27 ${diff_block.diff_block(c.changes)}
28 </div>
28 </div>
29 </div>
29 </div>
30 <script>
30 <script>
31 YUE.onDOMReady(function(){
31 YUE.onDOMReady(function(){
32
32
33 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
33 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
34 var act = e.currentTarget.nextElementSibling;
34 var act = e.currentTarget.nextElementSibling;
35
35
36 if(YUD.hasClass(act,'active')){
36 if(YUD.hasClass(act,'active')){
37 YUD.removeClass(act,'active');
37 YUD.removeClass(act,'active');
38 YUD.setStyle(act,'display','none');
38 YUD.setStyle(act,'display','none');
39 }else{
39 }else{
40 YUD.addClass(act,'active');
40 YUD.addClass(act,'active');
41 YUD.setStyle(act,'display','');
41 YUD.setStyle(act,'display','');
42 }
42 }
43 });
43 });
44
44
45 })
45 })
46 </script>
46 </script>
47 </%def>
47 </%def>
@@ -1,48 +1,48
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} ${_('Files')} - ${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 &raquo;
9 &raquo;
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 &raquo;
11 &raquo;
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 <ul class="links">
27 <ul class="links">
28 <li>
28 <li>
29 <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span>
29 <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span>
30 </li>
30 </li>
31 </ul>
31 </ul>
32 </div>
32 </div>
33 <div class="table">
33 <div class="table">
34 <div id="files_data">
34 <div id="files_data">
35 <%include file='files_ypjax.html'/>
35 <%include file='files_ypjax.html'/>
36 </div>
36 </div>
37 </div>
37 </div>
38 </div>
38 </div>
39 <script type="text/javascript">
39 <script type="text/javascript">
40 var YPJAX_TITLE = "${c.repo_name} ${_('Files')} - ${c.rhodecode_name}";
40 var YPJAX_TITLE = "${c.repo_name} ${_('Files')} - ${c.rhodecode_name}";
41 var current_url = "${h.url.current()}";
41 var current_url = "${h.url.current()}";
42 var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path='__FPATH__')}';
42 var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path='__FPATH__')}';
43 var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.path)}';
43 var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.path)}';
44 var truncated_lbl = "${_('search truncated')}";
44 var truncated_lbl = "${_('search truncated')}";
45 var nomatch_lbl = "${_('no matching files')}";
45 var nomatch_lbl = "${_('no matching files')}";
46 fileBrowserListeners(current_url, node_list_url, url_base, truncated_lbl, nomatch_lbl);
46 fileBrowserListeners(current_url, node_list_url, url_base, truncated_lbl, nomatch_lbl);
47 </script>
47 </script>
48 </%def>
48 </%def>
@@ -1,92 +1,92
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2
2
3 <%def name="title()">
3 <%def name="title()">
4 ${c.repo_name} ${_('Edit file')} - ${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 &raquo;
16 &raquo;
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 &raquo;
18 &raquo;
19 ${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)}
19 ${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)}
20 </%def>
20 </%def>
21
21
22 <%def name="page_nav()">
22 <%def name="page_nav()">
23 ${self.menu('files')}
23 ${self.menu('files')}
24 </%def>
24 </%def>
25 <%def name="main()">
25 <%def name="main()">
26 <div class="box">
26 <div class="box">
27 <!-- box / title -->
27 <!-- box / title -->
28 <div class="title">
28 <div class="title">
29 ${self.breadcrumbs()}
29 ${self.breadcrumbs()}
30 <ul class="links">
30 <ul class="links">
31 <li>
31 <li>
32 <span style="text-transform: uppercase;">
32 <span style="text-transform: uppercase;">
33 <a href="#">${_('branch')}: ${c.cs.branch}</a></span>
33 <a href="#">${_('branch')}: ${c.cs.branch}</a></span>
34 </li>
34 </li>
35 </ul>
35 </ul>
36 </div>
36 </div>
37 <div class="table">
37 <div class="table">
38 <div id="files_data">
38 <div id="files_data">
39 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")}
39 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")}
40 <h3>${_('Add new file')}</h3>
40 <h3>${_('Add new file')}</h3>
41 <div class="form">
41 <div class="form">
42 <div class="fields">
42 <div class="fields">
43 <div id="filename_container" class="field file">
43 <div id="filename_container" class="field file">
44 <div class="label">
44 <div class="label">
45 <label for="filename">${_('File Name')}:</label>
45 <label for="filename">${_('File Name')}:</label>
46 </div>
46 </div>
47 <div class="input">
47 <div class="input">
48 <input type="text" value="" size="30" name="filename" id="filename">
48 <input type="text" value="" size="30" name="filename" id="filename">
49 ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span>
49 ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span>
50 </div>
50 </div>
51 </div>
51 </div>
52 <div id="upload_file_container" class="field" style="display:none">
52 <div id="upload_file_container" class="field" style="display:none">
53 <div class="label">
53 <div class="label">
54 <label for="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 <div id="body" class="codeblock">
72 <div id="body" class="codeblock">
73 <div id="editor_container">
73 <div id="editor_container">
74 <pre id="editor_pre"></pre>
74 <pre id="editor_pre"></pre>
75 <textarea id="editor" name="content" style="display:none"></textarea>
75 <textarea id="editor" name="content" style="display:none"></textarea>
76 </div>
76 </div>
77 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
77 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
78 <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px"></textarea>
78 <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px"></textarea>
79 </div>
79 </div>
80 <div style="text-align: l;padding-top: 5px">
80 <div style="text-align: l;padding-top: 5px">
81 ${h.submit('commit',_('Commit changes'),class_="ui-btn")}
81 ${h.submit('commit',_('Commit changes'),class_="ui-btn")}
82 ${h.reset('reset',_('Reset'),class_="ui-btn")}
82 ${h.reset('reset',_('Reset'),class_="ui-btn")}
83 </div>
83 </div>
84 ${h.end_form()}
84 ${h.end_form()}
85 <script type="text/javascript">
85 <script type="text/javascript">
86 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}";
86 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}";
87 initCodeMirror('editor',reset_url);
87 initCodeMirror('editor',reset_url);
88 </script>
88 </script>
89 </div>
89 </div>
90 </div>
90 </div>
91 </div>
91 </div>
92 </%def>
92 </%def>
@@ -1,78 +1,78
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2
2
3 <%def name="title()">
3 <%def name="title()">
4 ${c.repo_name} ${_('Edit file')} - ${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 &raquo;
16 &raquo;
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 &raquo;
18 &raquo;
19 ${_('edit file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)}
19 ${_('edit file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)}
20 </%def>
20 </%def>
21
21
22 <%def name="page_nav()">
22 <%def name="page_nav()">
23 ${self.menu('files')}
23 ${self.menu('files')}
24 </%def>
24 </%def>
25 <%def name="main()">
25 <%def name="main()">
26 <div class="box">
26 <div class="box">
27 <!-- box / title -->
27 <!-- box / title -->
28 <div class="title">
28 <div class="title">
29 ${self.breadcrumbs()}
29 ${self.breadcrumbs()}
30 <ul class="links">
30 <ul class="links">
31 <li>
31 <li>
32 <span style="text-transform: uppercase;">
32 <span style="text-transform: uppercase;">
33 <a href="#">${_('branch')}: ${c.cs.branch}</a></span>
33 <a href="#">${_('branch')}: ${c.cs.branch}</a></span>
34 </li>
34 </li>
35 </ul>
35 </ul>
36 </div>
36 </div>
37 <div class="table">
37 <div class="table">
38 <div id="files_data">
38 <div id="files_data">
39 <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3>
39 <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3>
40 ${h.form(h.url.current(),method='post',id='eform')}
40 ${h.form(h.url.current(),method='post',id='eform')}
41 <div id="body" class="codeblock">
41 <div id="body" class="codeblock">
42 <div class="code-header">
42 <div class="code-header">
43 <div class="stats">
43 <div class="stats">
44 <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div>
44 <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div>
45 <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div>
45 <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div>
46 <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div>
46 <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div>
47 <div class="left item last">${c.file.mimetype}</div>
47 <div class="left item last">${c.file.mimetype}</div>
48 <div class="buttons">
48 <div class="buttons">
49 ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")}
49 ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")}
50 ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")}
50 ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")}
51 ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")}
51 ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")}
52 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
52 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
53 % if not c.file.is_binary:
53 % if not c.file.is_binary:
54 ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")}
54 ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")}
55 % endif
55 % endif
56 % endif
56 % endif
57 </div>
57 </div>
58 </div>
58 </div>
59 <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div>
59 <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div>
60 </div>
60 </div>
61 <pre id="editor_pre"></pre>
61 <pre id="editor_pre"></pre>
62 <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea>
62 <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea>
63 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
63 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
64 <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px"></textarea>
64 <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px"></textarea>
65 </div>
65 </div>
66 <div style="text-align: left;padding-top: 5px">
66 <div style="text-align: left;padding-top: 5px">
67 ${h.submit('commit',_('Commit changes'),class_="ui-btn")}
67 ${h.submit('commit',_('Commit changes'),class_="ui-btn")}
68 ${h.reset('reset',_('Reset'),class_="ui-btn")}
68 ${h.reset('reset',_('Reset'),class_="ui-btn")}
69 </div>
69 </div>
70 ${h.end_form()}
70 ${h.end_form()}
71 <script type="text/javascript">
71 <script type="text/javascript">
72 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}";
72 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}";
73 initCodeMirror('editor',reset_url);
73 initCodeMirror('editor',reset_url);
74 </script>
74 </script>
75 </div>
75 </div>
76 </div>
76 </div>
77 </div>
77 </div>
78 </%def>
78 </%def>
@@ -1,32 +1,32
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 ${c.repo_name} ${_('Followers')} - ${c.rhodecode_name}
5 ${_('%s Followers') % c.repo_name} - ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 ${h.link_to(u'Home',h.url('/'))}
9 ${h.link_to(u'Home',h.url('/'))}
10 &raquo;
10 &raquo;
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 &raquo;
12 &raquo;
13 ${_('followers')}
13 ${_('followers')}
14 </%def>
14 </%def>
15
15
16 <%def name="page_nav()">
16 <%def name="page_nav()">
17 ${self.menu('followers')}
17 ${self.menu('followers')}
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 <!-- end box / title -->
25 <!-- end box / title -->
26 <div class="table">
26 <div class="table">
27 <div id="followers">
27 <div id="followers">
28 ${c.followers_data}
28 ${c.followers_data}
29 </div>
29 </div>
30 </div>
30 </div>
31 </div>
31 </div>
32 </%def>
32 </%def>
@@ -1,86 +1,86
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${c.repo_name} ${_('Fork')} - ${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 &raquo;
10 &raquo;
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 &raquo;
12 &raquo;
13 ${_('fork')}
13 ${_('fork')}
14 </%def>
14 </%def>
15
15
16 <%def name="page_nav()">
16 <%def name="page_nav()">
17 ${self.menu('')}
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="repo_group">${_('Repository group')}:</label>
41 <label for="repo_group">${_('Repository group')}:</label>
42 </div>
42 </div>
43 <div class="input">
43 <div class="input">
44 ${h.select('repo_group','',c.repo_groups,class_="medium")}
44 ${h.select('repo_group','',c.repo_groups,class_="medium")}
45 </div>
45 </div>
46 </div>
46 </div>
47 <div class="field">
47 <div class="field">
48 <div class="label label-textarea">
48 <div class="label label-textarea">
49 <label for="description">${_('Description')}:</label>
49 <label for="description">${_('Description')}:</label>
50 </div>
50 </div>
51 <div class="textarea text-area editor">
51 <div class="textarea text-area editor">
52 ${h.textarea('description',cols=23,rows=5)}
52 ${h.textarea('description',cols=23,rows=5)}
53 </div>
53 </div>
54 </div>
54 </div>
55 <div class="field">
55 <div class="field">
56 <div class="label label-checkbox">
56 <div class="label label-checkbox">
57 <label for="private">${_('Private')}:</label>
57 <label for="private">${_('Private')}:</label>
58 </div>
58 </div>
59 <div class="checkboxes">
59 <div class="checkboxes">
60 ${h.checkbox('private',value="True")}
60 ${h.checkbox('private',value="True")}
61 </div>
61 </div>
62 </div>
62 </div>
63 <div class="field">
63 <div class="field">
64 <div class="label label-checkbox">
64 <div class="label label-checkbox">
65 <label for="private">${_('Copy permissions')}:</label>
65 <label for="private">${_('Copy permissions')}:</label>
66 </div>
66 </div>
67 <div class="checkboxes">
67 <div class="checkboxes">
68 ${h.checkbox('copy_permissions',value="True", checked="checked")}
68 ${h.checkbox('copy_permissions',value="True", checked="checked")}
69 </div>
69 </div>
70 </div>
70 </div>
71 <div class="field">
71 <div class="field">
72 <div class="label label-checkbox">
72 <div class="label label-checkbox">
73 <label for="private">${_('Update after clone')}:</label>
73 <label for="private">${_('Update after clone')}:</label>
74 </div>
74 </div>
75 <div class="checkboxes">
75 <div class="checkboxes">
76 ${h.checkbox('update_after_clone',value="True")}
76 ${h.checkbox('update_after_clone',value="True")}
77 </div>
77 </div>
78 </div>
78 </div>
79 <div class="buttons">
79 <div class="buttons">
80 ${h.submit('',_('fork this repository'),class_="ui-button")}
80 ${h.submit('',_('fork this repository'),class_="ui-button")}
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,32 +1,32
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 ${c.repo_name} ${_('Forks')} - ${c.rhodecode_name}
5 ${_('%s Forks') % c.repo_name} - ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 ${h.link_to(u'Home',h.url('/'))}
9 ${h.link_to(u'Home',h.url('/'))}
10 &raquo;
10 &raquo;
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 &raquo;
12 &raquo;
13 ${_('forks')}
13 ${_('forks')}
14 </%def>
14 </%def>
15
15
16 <%def name="page_nav()">
16 <%def name="page_nav()">
17 ${self.menu('forks')}
17 ${self.menu('forks')}
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 <!-- end box / title -->
25 <!-- end box / title -->
26 <div class="table">
26 <div class="table">
27 <div id="forks">
27 <div id="forks">
28 ${c.forks_data}
28 ${c.forks_data}
29 </div>
29 </div>
30 </div>
30 </div>
31 </div>
31 </div>
32 </%def>
32 </%def>
@@ -1,92 +1,92
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 ${c.repo_name} ${_('Settings')} - ${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 &raquo;
10 &raquo;
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 &raquo;
12 &raquo;
13 ${_('Settings')}
13 ${_('Settings')}
14 </%def>
14 </%def>
15
15
16 <%def name="page_nav()">
16 <%def name="page_nav()">
17 ${self.menu('settings')}
17 ${self.menu('settings')}
18 </%def>
18 </%def>
19 <%def name="main()">
19 <%def name="main()">
20 <div class="box">
20 <div class="box">
21 <!-- box / title -->
21 <!-- box / title -->
22 <div class="title">
22 <div class="title">
23 ${self.breadcrumbs()}
23 ${self.breadcrumbs()}
24 </div>
24 </div>
25 ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')}
25 ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')}
26 <div class="form">
26 <div class="form">
27 <!-- fields -->
27 <!-- fields -->
28 <div class="fields">
28 <div class="fields">
29 <div class="field">
29 <div class="field">
30 <div class="label">
30 <div class="label">
31 <label for="repo_name">${_('Name')}:</label>
31 <label for="repo_name">${_('Name')}:</label>
32 </div>
32 </div>
33 <div class="input input-medium">
33 <div class="input input-medium">
34 ${h.text('repo_name',class_="small")}
34 ${h.text('repo_name',class_="small")}
35 </div>
35 </div>
36 </div>
36 </div>
37 <div class="field">
37 <div class="field">
38 <div class="label">
38 <div class="label">
39 <label for="clone_uri">${_('Clone uri')}:</label>
39 <label for="clone_uri">${_('Clone uri')}:</label>
40 </div>
40 </div>
41 <div class="input">
41 <div class="input">
42 ${h.text('clone_uri',class_="medium")}
42 ${h.text('clone_uri',class_="medium")}
43 <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span>
43 <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span>
44 </div>
44 </div>
45 </div>
45 </div>
46 <div class="field">
46 <div class="field">
47 <div class="label">
47 <div class="label">
48 <label for="repo_group">${_('Repository group')}:</label>
48 <label for="repo_group">${_('Repository group')}:</label>
49 </div>
49 </div>
50 <div class="input">
50 <div class="input">
51 ${h.select('repo_group','',c.repo_groups,class_="medium")}
51 ${h.select('repo_group','',c.repo_groups,class_="medium")}
52 <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
52 <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
53 </div>
53 </div>
54 </div>
54 </div>
55 <div class="field">
55 <div class="field">
56 <div class="label label-textarea">
56 <div class="label label-textarea">
57 <label for="description">${_('Description')}:</label>
57 <label for="description">${_('Description')}:</label>
58 </div>
58 </div>
59 <div class="textarea text-area editor">
59 <div class="textarea text-area editor">
60 ${h.textarea('description')}
60 ${h.textarea('description')}
61 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
61 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
62 </div>
62 </div>
63 </div>
63 </div>
64
64
65 <div class="field">
65 <div class="field">
66 <div class="label label-checkbox">
66 <div class="label label-checkbox">
67 <label for="private">${_('Private repository')}:</label>
67 <label for="private">${_('Private repository')}:</label>
68 </div>
68 </div>
69 <div class="checkboxes">
69 <div class="checkboxes">
70 ${h.checkbox('private',value="True")}
70 ${h.checkbox('private',value="True")}
71 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
71 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
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="">${_('Permissions')}:</label>
77 <label for="">${_('Permissions')}:</label>
78 </div>
78 </div>
79 <div class="input">
79 <div class="input">
80 <%include file="../admin/repos/repo_edit_perms.html"/>
80 <%include file="../admin/repos/repo_edit_perms.html"/>
81 </div>
81 </div>
82
82
83 <div class="buttons">
83 <div class="buttons">
84 ${h.submit('save',_('Save'),class_="ui-button")}
84 ${h.submit('save',_('Save'),class_="ui-button")}
85 ${h.reset('reset',_('Reset'),class_="ui-button")}
85 ${h.reset('reset',_('Reset'),class_="ui-button")}
86 </div>
86 </div>
87 </div>
87 </div>
88 </div>
88 </div>
89 ${h.end_form()}
89 ${h.end_form()}
90 </div>
90 </div>
91 </div>
91 </div>
92 </%def>
92 </%def>
@@ -1,33 +1,33
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 ${c.repo_name} ${_('Shortlog')} - ${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 &raquo;
11 &raquo;
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 &raquo;
13 &raquo;
14 ${_('shortlog')}
14 ${_('shortlog')}
15 </%def>
15 </%def>
16
16
17 <%def name="page_nav()">
17 <%def name="page_nav()">
18 ${self.menu('shortlog')}
18 ${self.menu('shortlog')}
19 </%def>
19 </%def>
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 <!-- end box / title -->
26 <!-- end box / title -->
27 <div class="table">
27 <div class="table">
28 <div id="shortlog_data">
28 <div id="shortlog_data">
29 ${c.shortlog_data}
29 ${c.shortlog_data}
30 </div>
30 </div>
31 </div>
31 </div>
32 </div>
32 </div>
33 </%def>
33 </%def>
@@ -1,698 +1,698
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} ${_('Summary')} - ${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 &raquo;
9 &raquo;
10 ${h.link_to(c.dbrepo.just_name,h.url('summary_home',repo_name=c.repo_name))}
10 ${h.link_to(c.dbrepo.just_name,h.url('summary_home',repo_name=c.repo_name))}
11 &raquo;
11 &raquo;
12 ${_('summary')}
12 ${_('summary')}
13 </%def>
13 </%def>
14
14
15 <%def name="page_nav()">
15 <%def name="page_nav()">
16 ${self.menu('summary')}
16 ${self.menu('summary')}
17 </%def>
17 </%def>
18
18
19 <%def name="main()">
19 <%def name="main()">
20 <%
20 <%
21 summary = lambda n:{False:'summary-short'}.get(n)
21 summary = lambda n:{False:'summary-short'}.get(n)
22 %>
22 %>
23 %if c.show_stats:
23 %if c.show_stats:
24 <div class="box box-left">
24 <div class="box box-left">
25 %else:
25 %else:
26 <div class="box">
26 <div class="box">
27 %endif
27 %endif
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="form">
33 <div class="form">
34 <div id="summary" class="fields">
34 <div id="summary" class="fields">
35
35
36 <div class="field">
36 <div class="field">
37 <div class="label-summary">
37 <div class="label-summary">
38 <label>${_('Name')}:</label>
38 <label>${_('Name')}:</label>
39 </div>
39 </div>
40 <div class="input ${summary(c.show_stats)}">
40 <div class="input ${summary(c.show_stats)}">
41 <div style="float:right;padding:5px 0px 0px 5px">
41 <div style="float:right;padding:5px 0px 0px 5px">
42 %if c.rhodecode_user.username != 'default':
42 %if c.rhodecode_user.username != 'default':
43 ${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')}
43 ${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')}
44 ${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')}
44 ${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')}
45 %else:
45 %else:
46 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name),class_='rss_icon')}
46 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name),class_='rss_icon')}
47 ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')}
47 ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')}
48 %endif
48 %endif
49 </div>
49 </div>
50 %if c.rhodecode_user.username != 'default':
50 %if c.rhodecode_user.username != 'default':
51 %if c.following:
51 %if c.following:
52 <span id="follow_toggle" class="following" title="${_('Stop following this repository')}"
52 <span id="follow_toggle" class="following" title="${_('Stop following this repository')}"
53 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
53 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
54 </span>
54 </span>
55 %else:
55 %else:
56 <span id="follow_toggle" class="follow" title="${_('Start following this repository')}"
56 <span id="follow_toggle" class="follow" title="${_('Start following this repository')}"
57 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
57 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
58 </span>
58 </span>
59 %endif
59 %endif
60 %endif:
60 %endif:
61 ##REPO TYPE
61 ##REPO TYPE
62 %if h.is_hg(c.dbrepo):
62 %if h.is_hg(c.dbrepo):
63 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
63 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
64 %endif
64 %endif
65 %if h.is_git(c.dbrepo):
65 %if h.is_git(c.dbrepo):
66 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
66 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
67 %endif
67 %endif
68
68
69 ##PUBLIC/PRIVATE
69 ##PUBLIC/PRIVATE
70 %if c.dbrepo.private:
70 %if c.dbrepo.private:
71 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
71 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
72 %else:
72 %else:
73 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
73 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
74 %endif
74 %endif
75
75
76 ##REPO NAME
76 ##REPO NAME
77 <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
77 <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
78
78
79 ##FORK
79 ##FORK
80 %if c.dbrepo.fork:
80 %if c.dbrepo.fork:
81 <div style="margin-top:5px;clear:both"">
81 <div style="margin-top:5px;clear:both"">
82 <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')}"/>
82 <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')}"/>
83 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
83 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
84 </a>
84 </a>
85 </div>
85 </div>
86 %endif
86 %endif
87 ##REMOTE
87 ##REMOTE
88 %if c.dbrepo.clone_uri:
88 %if c.dbrepo.clone_uri:
89 <div style="margin-top:5px;clear:both">
89 <div style="margin-top:5px;clear:both">
90 <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')}"/>
90 <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')}"/>
91 ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}
91 ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}
92 </a>
92 </a>
93 </div>
93 </div>
94 %endif
94 %endif
95 </div>
95 </div>
96 </div>
96 </div>
97
97
98 <div class="field">
98 <div class="field">
99 <div class="label-summary">
99 <div class="label-summary">
100 <label>${_('Description')}:</label>
100 <label>${_('Description')}:</label>
101 </div>
101 </div>
102 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div>
102 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div>
103 </div>
103 </div>
104
104
105 <div class="field">
105 <div class="field">
106 <div class="label-summary">
106 <div class="label-summary">
107 <label>${_('Contact')}:</label>
107 <label>${_('Contact')}:</label>
108 </div>
108 </div>
109 <div class="input ${summary(c.show_stats)}">
109 <div class="input ${summary(c.show_stats)}">
110 <div class="gravatar">
110 <div class="gravatar">
111 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
111 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
112 </div>
112 </div>
113 ${_('Username')}: ${c.dbrepo.user.username}<br/>
113 ${_('Username')}: ${c.dbrepo.user.username}<br/>
114 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
114 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
115 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
115 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
116 </div>
116 </div>
117 </div>
117 </div>
118
118
119 <div class="field">
119 <div class="field">
120 <div class="label-summary">
120 <div class="label-summary">
121 <label>${_('Clone url')}:</label>
121 <label>${_('Clone url')}:</label>
122 </div>
122 </div>
123 <div class="input ${summary(c.show_stats)}">
123 <div class="input ${summary(c.show_stats)}">
124 <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div>
124 <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div>
125 <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div>
125 <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div>
126 <input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
126 <input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
127 <input style="display:none;width:80%;margin-left:105px" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
127 <input style="display:none;width:80%;margin-left:105px" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
128 </div>
128 </div>
129 </div>
129 </div>
130
130
131 <div class="field">
131 <div class="field">
132 <div class="label-summary">
132 <div class="label-summary">
133 <label>${_('Trending files')}:</label>
133 <label>${_('Trending files')}:</label>
134 </div>
134 </div>
135 <div class="input ${summary(c.show_stats)}">
135 <div class="input ${summary(c.show_stats)}">
136 %if c.show_stats:
136 %if c.show_stats:
137 <div id="lang_stats"></div>
137 <div id="lang_stats"></div>
138 %else:
138 %else:
139 ${_('Statistics are disabled for this repository')}
139 ${_('Statistics are disabled for this repository')}
140 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
140 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
141 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
141 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
142 %endif
142 %endif
143 %endif
143 %endif
144 </div>
144 </div>
145 </div>
145 </div>
146
146
147 <div class="field">
147 <div class="field">
148 <div class="label-summary">
148 <div class="label-summary">
149 <label>${_('Download')}:</label>
149 <label>${_('Download')}:</label>
150 </div>
150 </div>
151 <div class="input ${summary(c.show_stats)}">
151 <div class="input ${summary(c.show_stats)}">
152 %if len(c.rhodecode_repo.revisions) == 0:
152 %if len(c.rhodecode_repo.revisions) == 0:
153 ${_('There are no downloads yet')}
153 ${_('There are no downloads yet')}
154 %elif c.enable_downloads is False:
154 %elif c.enable_downloads is False:
155 ${_('Downloads are disabled for this repository')}
155 ${_('Downloads are disabled for this repository')}
156 %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'):
156 %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'):
157 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
157 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
158 %endif
158 %endif
159 %else:
159 %else:
160 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
160 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
161 <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>
161 <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>
162 <span style="vertical-align: bottom">
162 <span style="vertical-align: bottom">
163 <input id="archive_subrepos" type="checkbox" name="subrepos" />
163 <input id="archive_subrepos" type="checkbox" name="subrepos" />
164 <label for="archive_subrepos" class="tooltip" title="${_('Check this to download archive with subrepos')}" >${_('with subrepos')}</label>
164 <label for="archive_subrepos" class="tooltip" title="${_('Check this to download archive with subrepos')}" >${_('with subrepos')}</label>
165 </span>
165 </span>
166 %endif
166 %endif
167 </div>
167 </div>
168 </div>
168 </div>
169 </div>
169 </div>
170 </div>
170 </div>
171 </div>
171 </div>
172
172
173 %if c.show_stats:
173 %if c.show_stats:
174 <div class="box box-right" style="min-height:455px">
174 <div class="box box-right" style="min-height:455px">
175 <!-- box / title -->
175 <!-- box / title -->
176 <div class="title">
176 <div class="title">
177 <h5>${_('Commit activity by day / author')}</h5>
177 <h5>${_('Commit activity by day / author')}</h5>
178 </div>
178 </div>
179
179
180 <div class="graph">
180 <div class="graph">
181 <div style="padding:0 10px 10px 17px;">
181 <div style="padding:0 10px 10px 17px;">
182 %if c.no_data:
182 %if c.no_data:
183 ${c.no_data_msg}
183 ${c.no_data_msg}
184 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
184 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
185 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
185 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
186 %endif
186 %endif
187 %else:
187 %else:
188 ${_('Stats gathered: ')} ${c.stats_percentage}%
188 ${_('Stats gathered: ')} ${c.stats_percentage}%
189 %endif
189 %endif
190 </div>
190 </div>
191 <div id="commit_history" style="width:450px;height:300px;float:left"></div>
191 <div id="commit_history" style="width:450px;height:300px;float:left"></div>
192 <div style="clear: both;height: 10px"></div>
192 <div style="clear: both;height: 10px"></div>
193 <div id="overview" style="width:450px;height:100px;float:left"></div>
193 <div id="overview" style="width:450px;height:100px;float:left"></div>
194
194
195 <div id="legend_data" style="clear:both;margin-top:10px;">
195 <div id="legend_data" style="clear:both;margin-top:10px;">
196 <div id="legend_container"></div>
196 <div id="legend_container"></div>
197 <div id="legend_choices">
197 <div id="legend_choices">
198 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
198 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
199 </div>
199 </div>
200 </div>
200 </div>
201 </div>
201 </div>
202 </div>
202 </div>
203 %endif
203 %endif
204
204
205 <div class="box">
205 <div class="box">
206 <div class="title">
206 <div class="title">
207 <div class="breadcrumbs">
207 <div class="breadcrumbs">
208 %if c.repo_changesets:
208 %if c.repo_changesets:
209 ${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}
209 ${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}
210 %else:
210 %else:
211 ${_('Quick start')}
211 ${_('Quick start')}
212 %endif
212 %endif
213 </div>
213 </div>
214 </div>
214 </div>
215 <div class="table">
215 <div class="table">
216 <div id="shortlog_data">
216 <div id="shortlog_data">
217 <%include file='../shortlog/shortlog_data.html'/>
217 <%include file='../shortlog/shortlog_data.html'/>
218 </div>
218 </div>
219 </div>
219 </div>
220 </div>
220 </div>
221
221
222 %if c.readme_data:
222 %if c.readme_data:
223 <div id="readme" class="box header-pos-fix" style="background-color: #FAFAFA">
223 <div id="readme" class="box header-pos-fix" style="background-color: #FAFAFA">
224 <div id="readme" class="title">
224 <div id="readme" class="title">
225 <div class="breadcrumbs"><a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a></div>
225 <div class="breadcrumbs"><a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a></div>
226 </div>
226 </div>
227 <div id="readme" class="readme">
227 <div id="readme" class="readme">
228 <div class="readme_box">
228 <div class="readme_box">
229 ${c.readme_data|n}
229 ${c.readme_data|n}
230 </div>
230 </div>
231 </div>
231 </div>
232 </div>
232 </div>
233 %endif
233 %endif
234
234
235 <script type="text/javascript">
235 <script type="text/javascript">
236 var clone_url = 'clone_url';
236 var clone_url = 'clone_url';
237 YUE.on(clone_url,'click',function(e){
237 YUE.on(clone_url,'click',function(e){
238 if(YUD.hasClass(clone_url,'selected')){
238 if(YUD.hasClass(clone_url,'selected')){
239 return
239 return
240 }
240 }
241 else{
241 else{
242 YUD.addClass(clone_url,'selected');
242 YUD.addClass(clone_url,'selected');
243 YUD.get(clone_url).select();
243 YUD.get(clone_url).select();
244 }
244 }
245 })
245 })
246
246
247 YUE.on('clone_by_name','click',function(e){
247 YUE.on('clone_by_name','click',function(e){
248 // show url by name and hide name button
248 // show url by name and hide name button
249 YUD.setStyle('clone_url','display','');
249 YUD.setStyle('clone_url','display','');
250 YUD.setStyle('clone_by_name','display','none');
250 YUD.setStyle('clone_by_name','display','none');
251
251
252 // hide url by id and show name button
252 // hide url by id and show name button
253 YUD.setStyle('clone_by_id','display','');
253 YUD.setStyle('clone_by_id','display','');
254 YUD.setStyle('clone_url_id','display','none');
254 YUD.setStyle('clone_url_id','display','none');
255
255
256 })
256 })
257 YUE.on('clone_by_id','click',function(e){
257 YUE.on('clone_by_id','click',function(e){
258
258
259 // show url by id and hide id button
259 // show url by id and hide id button
260 YUD.setStyle('clone_by_id','display','none');
260 YUD.setStyle('clone_by_id','display','none');
261 YUD.setStyle('clone_url_id','display','');
261 YUD.setStyle('clone_url_id','display','');
262
262
263 // hide url by name and show id button
263 // hide url by name and show id button
264 YUD.setStyle('clone_by_name','display','');
264 YUD.setStyle('clone_by_name','display','');
265 YUD.setStyle('clone_url','display','none');
265 YUD.setStyle('clone_url','display','none');
266 })
266 })
267
267
268
268
269 var tmpl_links = {};
269 var tmpl_links = {};
270 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
270 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
271 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')}';
271 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')}';
272 %endfor
272 %endfor
273
273
274 YUE.on(['download_options','archive_subrepos'],'change',function(e){
274 YUE.on(['download_options','archive_subrepos'],'change',function(e){
275 var sm = YUD.get('download_options');
275 var sm = YUD.get('download_options');
276 var new_cs = sm.options[sm.selectedIndex];
276 var new_cs = sm.options[sm.selectedIndex];
277
277
278 for(k in tmpl_links){
278 for(k in tmpl_links){
279 var s = YUD.get(k+'_link');
279 var s = YUD.get(k+'_link');
280 if(s){
280 if(s){
281 var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
281 var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
282 title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text);
282 title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text);
283 title_tmpl = title_tmpl.replace('__CS_EXT__',k);
283 title_tmpl = title_tmpl.replace('__CS_EXT__',k);
284
284
285 var url = tmpl_links[k].replace('__CS__',new_cs.value);
285 var url = tmpl_links[k].replace('__CS__',new_cs.value);
286 var subrepos = YUD.get('archive_subrepos').checked;
286 var subrepos = YUD.get('archive_subrepos').checked;
287 url = url.replace('__SUB__',subrepos);
287 url = url.replace('__SUB__',subrepos);
288 url = url.replace('__NAME__',title_tmpl);
288 url = url.replace('__NAME__',title_tmpl);
289 s.innerHTML = url
289 s.innerHTML = url
290 }
290 }
291 }
291 }
292 });
292 });
293 </script>
293 </script>
294 %if c.show_stats:
294 %if c.show_stats:
295 <script type="text/javascript">
295 <script type="text/javascript">
296 var data = ${c.trending_languages|n};
296 var data = ${c.trending_languages|n};
297 var total = 0;
297 var total = 0;
298 var no_data = true;
298 var no_data = true;
299 var tbl = document.createElement('table');
299 var tbl = document.createElement('table');
300 tbl.setAttribute('class','trending_language_tbl');
300 tbl.setAttribute('class','trending_language_tbl');
301 var cnt = 0;
301 var cnt = 0;
302 for (var i=0;i<data.length;i++){
302 for (var i=0;i<data.length;i++){
303 total+= data[i][1].count;
303 total+= data[i][1].count;
304 }
304 }
305 for (var i=0;i<data.length;i++){
305 for (var i=0;i<data.length;i++){
306 cnt += 1;
306 cnt += 1;
307 no_data = false;
307 no_data = false;
308
308
309 var hide = cnt>2;
309 var hide = cnt>2;
310 var tr = document.createElement('tr');
310 var tr = document.createElement('tr');
311 if (hide){
311 if (hide){
312 tr.setAttribute('style','display:none');
312 tr.setAttribute('style','display:none');
313 tr.setAttribute('class','stats_hidden');
313 tr.setAttribute('class','stats_hidden');
314 }
314 }
315 var k = data[i][0];
315 var k = data[i][0];
316 var obj = data[i][1];
316 var obj = data[i][1];
317 var percentage = Math.round((obj.count/total*100),2);
317 var percentage = Math.round((obj.count/total*100),2);
318
318
319 var td1 = document.createElement('td');
319 var td1 = document.createElement('td');
320 td1.width = 150;
320 td1.width = 150;
321 var trending_language_label = document.createElement('div');
321 var trending_language_label = document.createElement('div');
322 trending_language_label.innerHTML = obj.desc+" ("+k+")";
322 trending_language_label.innerHTML = obj.desc+" ("+k+")";
323 td1.appendChild(trending_language_label);
323 td1.appendChild(trending_language_label);
324
324
325 var td2 = document.createElement('td');
325 var td2 = document.createElement('td');
326 td2.setAttribute('style','padding-right:14px !important');
326 td2.setAttribute('style','padding-right:14px !important');
327 var trending_language = document.createElement('div');
327 var trending_language = document.createElement('div');
328 var nr_files = obj.count+" ${_('files')}";
328 var nr_files = obj.count+" ${_('files')}";
329
329
330 trending_language.title = k+" "+nr_files;
330 trending_language.title = k+" "+nr_files;
331
331
332 if (percentage>22){
332 if (percentage>22){
333 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
333 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
334 }
334 }
335 else{
335 else{
336 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
336 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
337 }
337 }
338
338
339 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
339 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
340 trending_language.style.width=percentage+"%";
340 trending_language.style.width=percentage+"%";
341 td2.appendChild(trending_language);
341 td2.appendChild(trending_language);
342
342
343 tr.appendChild(td1);
343 tr.appendChild(td1);
344 tr.appendChild(td2);
344 tr.appendChild(td2);
345 tbl.appendChild(tr);
345 tbl.appendChild(tr);
346 if(cnt == 3){
346 if(cnt == 3){
347 var show_more = document.createElement('tr');
347 var show_more = document.createElement('tr');
348 var td = document.createElement('td');
348 var td = document.createElement('td');
349 lnk = document.createElement('a');
349 lnk = document.createElement('a');
350
350
351 lnk.href='#';
351 lnk.href='#';
352 lnk.innerHTML = "${_('show more')}";
352 lnk.innerHTML = "${_('show more')}";
353 lnk.id='code_stats_show_more';
353 lnk.id='code_stats_show_more';
354 td.appendChild(lnk);
354 td.appendChild(lnk);
355
355
356 show_more.appendChild(td);
356 show_more.appendChild(td);
357 show_more.appendChild(document.createElement('td'));
357 show_more.appendChild(document.createElement('td'));
358 tbl.appendChild(show_more);
358 tbl.appendChild(show_more);
359 }
359 }
360
360
361 }
361 }
362
362
363 YUD.get('lang_stats').appendChild(tbl);
363 YUD.get('lang_stats').appendChild(tbl);
364 YUE.on('code_stats_show_more','click',function(){
364 YUE.on('code_stats_show_more','click',function(){
365 l = YUD.getElementsByClassName('stats_hidden')
365 l = YUD.getElementsByClassName('stats_hidden')
366 for (e in l){
366 for (e in l){
367 YUD.setStyle(l[e],'display','');
367 YUD.setStyle(l[e],'display','');
368 };
368 };
369 YUD.setStyle(YUD.get('code_stats_show_more'),
369 YUD.setStyle(YUD.get('code_stats_show_more'),
370 'display','none');
370 'display','none');
371 });
371 });
372 </script>
372 </script>
373 <script type="text/javascript">
373 <script type="text/javascript">
374 /**
374 /**
375 * Plots summary graph
375 * Plots summary graph
376 *
376 *
377 * @class SummaryPlot
377 * @class SummaryPlot
378 * @param {from} initial from for detailed graph
378 * @param {from} initial from for detailed graph
379 * @param {to} initial to for detailed graph
379 * @param {to} initial to for detailed graph
380 * @param {dataset}
380 * @param {dataset}
381 * @param {overview_dataset}
381 * @param {overview_dataset}
382 */
382 */
383 function SummaryPlot(from,to,dataset,overview_dataset) {
383 function SummaryPlot(from,to,dataset,overview_dataset) {
384 var initial_ranges = {
384 var initial_ranges = {
385 "xaxis":{
385 "xaxis":{
386 "from":from,
386 "from":from,
387 "to":to,
387 "to":to,
388 },
388 },
389 };
389 };
390 var dataset = dataset;
390 var dataset = dataset;
391 var overview_dataset = [overview_dataset];
391 var overview_dataset = [overview_dataset];
392 var choiceContainer = YUD.get("legend_choices");
392 var choiceContainer = YUD.get("legend_choices");
393 var choiceContainerTable = YUD.get("legend_choices_tables");
393 var choiceContainerTable = YUD.get("legend_choices_tables");
394 var plotContainer = YUD.get('commit_history');
394 var plotContainer = YUD.get('commit_history');
395 var overviewContainer = YUD.get('overview');
395 var overviewContainer = YUD.get('overview');
396
396
397 var plot_options = {
397 var plot_options = {
398 bars: {show:true,align:'center',lineWidth:4},
398 bars: {show:true,align:'center',lineWidth:4},
399 legend: {show:true, container:"legend_container"},
399 legend: {show:true, container:"legend_container"},
400 points: {show:true,radius:0,fill:false},
400 points: {show:true,radius:0,fill:false},
401 yaxis: {tickDecimals:0,},
401 yaxis: {tickDecimals:0,},
402 xaxis: {
402 xaxis: {
403 mode: "time",
403 mode: "time",
404 timeformat: "%d/%m",
404 timeformat: "%d/%m",
405 min:from,
405 min:from,
406 max:to,
406 max:to,
407 },
407 },
408 grid: {
408 grid: {
409 hoverable: true,
409 hoverable: true,
410 clickable: true,
410 clickable: true,
411 autoHighlight:true,
411 autoHighlight:true,
412 color: "#999"
412 color: "#999"
413 },
413 },
414 //selection: {mode: "x"}
414 //selection: {mode: "x"}
415 };
415 };
416 var overview_options = {
416 var overview_options = {
417 legend:{show:false},
417 legend:{show:false},
418 bars: {show:true,barWidth: 2,},
418 bars: {show:true,barWidth: 2,},
419 shadowSize: 0,
419 shadowSize: 0,
420 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
420 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
421 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
421 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
422 grid: {color: "#999",},
422 grid: {color: "#999",},
423 selection: {mode: "x"}
423 selection: {mode: "x"}
424 };
424 };
425
425
426 /**
426 /**
427 *get dummy data needed in few places
427 *get dummy data needed in few places
428 */
428 */
429 function getDummyData(label){
429 function getDummyData(label){
430 return {"label":label,
430 return {"label":label,
431 "data":[{"time":0,
431 "data":[{"time":0,
432 "commits":0,
432 "commits":0,
433 "added":0,
433 "added":0,
434 "changed":0,
434 "changed":0,
435 "removed":0,
435 "removed":0,
436 }],
436 }],
437 "schema":["commits"],
437 "schema":["commits"],
438 "color":'#ffffff',
438 "color":'#ffffff',
439 }
439 }
440 }
440 }
441
441
442 /**
442 /**
443 * generate checkboxes accordindly to data
443 * generate checkboxes accordindly to data
444 * @param keys
444 * @param keys
445 * @returns
445 * @returns
446 */
446 */
447 function generateCheckboxes(data) {
447 function generateCheckboxes(data) {
448 //append checkboxes
448 //append checkboxes
449 var i = 0;
449 var i = 0;
450 choiceContainerTable.innerHTML = '';
450 choiceContainerTable.innerHTML = '';
451 for(var pos in data) {
451 for(var pos in data) {
452
452
453 data[pos].color = i;
453 data[pos].color = i;
454 i++;
454 i++;
455 if(data[pos].label != ''){
455 if(data[pos].label != ''){
456 choiceContainerTable.innerHTML +=
456 choiceContainerTable.innerHTML +=
457 '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \
457 '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \
458 <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label);
458 <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label);
459 }
459 }
460 }
460 }
461 }
461 }
462
462
463 /**
463 /**
464 * ToolTip show
464 * ToolTip show
465 */
465 */
466 function showTooltip(x, y, contents) {
466 function showTooltip(x, y, contents) {
467 var div=document.getElementById('tooltip');
467 var div=document.getElementById('tooltip');
468 if(!div) {
468 if(!div) {
469 div = document.createElement('div');
469 div = document.createElement('div');
470 div.id="tooltip";
470 div.id="tooltip";
471 div.style.position="absolute";
471 div.style.position="absolute";
472 div.style.border='1px solid #fdd';
472 div.style.border='1px solid #fdd';
473 div.style.padding='2px';
473 div.style.padding='2px';
474 div.style.backgroundColor='#fee';
474 div.style.backgroundColor='#fee';
475 document.body.appendChild(div);
475 document.body.appendChild(div);
476 }
476 }
477 YUD.setStyle(div, 'opacity', 0);
477 YUD.setStyle(div, 'opacity', 0);
478 div.innerHTML = contents;
478 div.innerHTML = contents;
479 div.style.top=(y + 5) + "px";
479 div.style.top=(y + 5) + "px";
480 div.style.left=(x + 5) + "px";
480 div.style.left=(x + 5) + "px";
481
481
482 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
482 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
483 anim.animate();
483 anim.animate();
484 }
484 }
485
485
486 /**
486 /**
487 * This function will detect if selected period has some changesets
487 * This function will detect if selected period has some changesets
488 for this user if it does this data is then pushed for displaying
488 for this user if it does this data is then pushed for displaying
489 Additionally it will only display users that are selected by the checkbox
489 Additionally it will only display users that are selected by the checkbox
490 */
490 */
491 function getDataAccordingToRanges(ranges) {
491 function getDataAccordingToRanges(ranges) {
492
492
493 var data = [];
493 var data = [];
494 var new_dataset = {};
494 var new_dataset = {};
495 var keys = [];
495 var keys = [];
496 var max_commits = 0;
496 var max_commits = 0;
497 for(var key in dataset){
497 for(var key in dataset){
498
498
499 for(var ds in dataset[key].data){
499 for(var ds in dataset[key].data){
500 commit_data = dataset[key].data[ds];
500 commit_data = dataset[key].data[ds];
501 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
501 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
502
502
503 if(new_dataset[key] === undefined){
503 if(new_dataset[key] === undefined){
504 new_dataset[key] = {data:[],schema:["commits"],label:key};
504 new_dataset[key] = {data:[],schema:["commits"],label:key};
505 }
505 }
506 new_dataset[key].data.push(commit_data);
506 new_dataset[key].data.push(commit_data);
507 }
507 }
508 }
508 }
509 if (new_dataset[key] !== undefined){
509 if (new_dataset[key] !== undefined){
510 data.push(new_dataset[key]);
510 data.push(new_dataset[key]);
511 }
511 }
512 }
512 }
513
513
514 if (data.length > 0){
514 if (data.length > 0){
515 return data;
515 return data;
516 }
516 }
517 else{
517 else{
518 //just return dummy data for graph to plot itself
518 //just return dummy data for graph to plot itself
519 return [getDummyData('')];
519 return [getDummyData('')];
520 }
520 }
521 }
521 }
522
522
523 /**
523 /**
524 * redraw using new checkbox data
524 * redraw using new checkbox data
525 */
525 */
526 function plotchoiced(e,args){
526 function plotchoiced(e,args){
527 var cur_data = args[0];
527 var cur_data = args[0];
528 var cur_ranges = args[1];
528 var cur_ranges = args[1];
529
529
530 var new_data = [];
530 var new_data = [];
531 var inputs = choiceContainer.getElementsByTagName("input");
531 var inputs = choiceContainer.getElementsByTagName("input");
532
532
533 //show only checked labels
533 //show only checked labels
534 for(var i=0; i<inputs.length; i++) {
534 for(var i=0; i<inputs.length; i++) {
535 var checkbox_key = inputs[i].name;
535 var checkbox_key = inputs[i].name;
536
536
537 if(inputs[i].checked){
537 if(inputs[i].checked){
538 for(var d in cur_data){
538 for(var d in cur_data){
539 if(cur_data[d].label == checkbox_key){
539 if(cur_data[d].label == checkbox_key){
540 new_data.push(cur_data[d]);
540 new_data.push(cur_data[d]);
541 }
541 }
542 }
542 }
543 }
543 }
544 else{
544 else{
545 //push dummy data to not hide the label
545 //push dummy data to not hide the label
546 new_data.push(getDummyData(checkbox_key));
546 new_data.push(getDummyData(checkbox_key));
547 }
547 }
548 }
548 }
549
549
550 var new_options = YAHOO.lang.merge(plot_options, {
550 var new_options = YAHOO.lang.merge(plot_options, {
551 xaxis: {
551 xaxis: {
552 min: cur_ranges.xaxis.from,
552 min: cur_ranges.xaxis.from,
553 max: cur_ranges.xaxis.to,
553 max: cur_ranges.xaxis.to,
554 mode:"time",
554 mode:"time",
555 timeformat: "%d/%m",
555 timeformat: "%d/%m",
556 },
556 },
557 });
557 });
558 if (!new_data){
558 if (!new_data){
559 new_data = [[0,1]];
559 new_data = [[0,1]];
560 }
560 }
561 // do the zooming
561 // do the zooming
562 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
562 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
563
563
564 plot.subscribe("plotselected", plotselected);
564 plot.subscribe("plotselected", plotselected);
565
565
566 //resubscribe plothover
566 //resubscribe plothover
567 plot.subscribe("plothover", plothover);
567 plot.subscribe("plothover", plothover);
568
568
569 // don't fire event on the overview to prevent eternal loop
569 // don't fire event on the overview to prevent eternal loop
570 overview.setSelection(cur_ranges, true);
570 overview.setSelection(cur_ranges, true);
571
571
572 }
572 }
573
573
574 /**
574 /**
575 * plot only selected items from overview
575 * plot only selected items from overview
576 * @param ranges
576 * @param ranges
577 * @returns
577 * @returns
578 */
578 */
579 function plotselected(ranges,cur_data) {
579 function plotselected(ranges,cur_data) {
580 //updates the data for new plot
580 //updates the data for new plot
581 var data = getDataAccordingToRanges(ranges);
581 var data = getDataAccordingToRanges(ranges);
582 generateCheckboxes(data);
582 generateCheckboxes(data);
583
583
584 var new_options = YAHOO.lang.merge(plot_options, {
584 var new_options = YAHOO.lang.merge(plot_options, {
585 xaxis: {
585 xaxis: {
586 min: ranges.xaxis.from,
586 min: ranges.xaxis.from,
587 max: ranges.xaxis.to,
587 max: ranges.xaxis.to,
588 mode:"time",
588 mode:"time",
589 timeformat: "%d/%m",
589 timeformat: "%d/%m",
590 },
590 },
591 });
591 });
592 // do the zooming
592 // do the zooming
593 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
593 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
594
594
595 plot.subscribe("plotselected", plotselected);
595 plot.subscribe("plotselected", plotselected);
596
596
597 //resubscribe plothover
597 //resubscribe plothover
598 plot.subscribe("plothover", plothover);
598 plot.subscribe("plothover", plothover);
599
599
600 // don't fire event on the overview to prevent eternal loop
600 // don't fire event on the overview to prevent eternal loop
601 overview.setSelection(ranges, true);
601 overview.setSelection(ranges, true);
602
602
603 //resubscribe choiced
603 //resubscribe choiced
604 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
604 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
605 }
605 }
606
606
607 var previousPoint = null;
607 var previousPoint = null;
608
608
609 function plothover(o) {
609 function plothover(o) {
610 var pos = o.pos;
610 var pos = o.pos;
611 var item = o.item;
611 var item = o.item;
612
612
613 //YUD.get("x").innerHTML = pos.x.toFixed(2);
613 //YUD.get("x").innerHTML = pos.x.toFixed(2);
614 //YUD.get("y").innerHTML = pos.y.toFixed(2);
614 //YUD.get("y").innerHTML = pos.y.toFixed(2);
615 if (item) {
615 if (item) {
616 if (previousPoint != item.datapoint) {
616 if (previousPoint != item.datapoint) {
617 previousPoint = item.datapoint;
617 previousPoint = item.datapoint;
618
618
619 var tooltip = YUD.get("tooltip");
619 var tooltip = YUD.get("tooltip");
620 if(tooltip) {
620 if(tooltip) {
621 tooltip.parentNode.removeChild(tooltip);
621 tooltip.parentNode.removeChild(tooltip);
622 }
622 }
623 var x = item.datapoint.x.toFixed(2);
623 var x = item.datapoint.x.toFixed(2);
624 var y = item.datapoint.y.toFixed(2);
624 var y = item.datapoint.y.toFixed(2);
625
625
626 if (!item.series.label){
626 if (!item.series.label){
627 item.series.label = 'commits';
627 item.series.label = 'commits';
628 }
628 }
629 var d = new Date(x*1000);
629 var d = new Date(x*1000);
630 var fd = d.toDateString()
630 var fd = d.toDateString()
631 var nr_commits = parseInt(y);
631 var nr_commits = parseInt(y);
632
632
633 var cur_data = dataset[item.series.label].data[item.dataIndex];
633 var cur_data = dataset[item.series.label].data[item.dataIndex];
634 var added = cur_data.added;
634 var added = cur_data.added;
635 var changed = cur_data.changed;
635 var changed = cur_data.changed;
636 var removed = cur_data.removed;
636 var removed = cur_data.removed;
637
637
638 var nr_commits_suffix = " ${_('commits')} ";
638 var nr_commits_suffix = " ${_('commits')} ";
639 var added_suffix = " ${_('files added')} ";
639 var added_suffix = " ${_('files added')} ";
640 var changed_suffix = " ${_('files changed')} ";
640 var changed_suffix = " ${_('files changed')} ";
641 var removed_suffix = " ${_('files removed')} ";
641 var removed_suffix = " ${_('files removed')} ";
642
642
643
643
644 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
644 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
645 if(added==1){added_suffix=" ${_('file added')} ";}
645 if(added==1){added_suffix=" ${_('file added')} ";}
646 if(changed==1){changed_suffix=" ${_('file changed')} ";}
646 if(changed==1){changed_suffix=" ${_('file changed')} ";}
647 if(removed==1){removed_suffix=" ${_('file removed')} ";}
647 if(removed==1){removed_suffix=" ${_('file removed')} ";}
648
648
649 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
649 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
650 +'<br/>'+
650 +'<br/>'+
651 nr_commits + nr_commits_suffix+'<br/>'+
651 nr_commits + nr_commits_suffix+'<br/>'+
652 added + added_suffix +'<br/>'+
652 added + added_suffix +'<br/>'+
653 changed + changed_suffix + '<br/>'+
653 changed + changed_suffix + '<br/>'+
654 removed + removed_suffix + '<br/>');
654 removed + removed_suffix + '<br/>');
655 }
655 }
656 }
656 }
657 else {
657 else {
658 var tooltip = YUD.get("tooltip");
658 var tooltip = YUD.get("tooltip");
659
659
660 if(tooltip) {
660 if(tooltip) {
661 tooltip.parentNode.removeChild(tooltip);
661 tooltip.parentNode.removeChild(tooltip);
662 }
662 }
663 previousPoint = null;
663 previousPoint = null;
664 }
664 }
665 }
665 }
666
666
667 /**
667 /**
668 * MAIN EXECUTION
668 * MAIN EXECUTION
669 */
669 */
670
670
671 var data = getDataAccordingToRanges(initial_ranges);
671 var data = getDataAccordingToRanges(initial_ranges);
672 generateCheckboxes(data);
672 generateCheckboxes(data);
673
673
674 //main plot
674 //main plot
675 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
675 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
676
676
677 //overview
677 //overview
678 var overview = YAHOO.widget.Flot(overviewContainer,
678 var overview = YAHOO.widget.Flot(overviewContainer,
679 overview_dataset, overview_options);
679 overview_dataset, overview_options);
680
680
681 //show initial selection on overview
681 //show initial selection on overview
682 overview.setSelection(initial_ranges);
682 overview.setSelection(initial_ranges);
683
683
684 plot.subscribe("plotselected", plotselected);
684 plot.subscribe("plotselected", plotselected);
685 plot.subscribe("plothover", plothover)
685 plot.subscribe("plothover", plothover)
686
686
687 overview.subscribe("plotselected", function (ranges) {
687 overview.subscribe("plotselected", function (ranges) {
688 plot.setSelection(ranges);
688 plot.setSelection(ranges);
689 });
689 });
690
690
691 // user choices on overview
691 // user choices on overview
692 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
692 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
693 }
693 }
694 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
694 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
695 </script>
695 </script>
696 %endif
696 %endif
697
697
698 </%def>
698 </%def>
@@ -1,76 +1,76
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 ${c.repo_name} ${_('Tags')} - ${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 &raquo;
12 &raquo;
13 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
13 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
14 &raquo;
14 &raquo;
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 <div class="table">
28 <div class="table">
29 <%include file='tags_data.html'/>
29 <%include file='tags_data.html'/>
30 </div>
30 </div>
31 </div>
31 </div>
32 <script type="text/javascript">
32 <script type="text/javascript">
33
33
34 // main table sorting
34 // main table sorting
35 var myColumnDefs = [
35 var myColumnDefs = [
36 {key:"name",label:"${_('Name')}",sortable:true},
36 {key:"name",label:"${_('Name')}",sortable:true},
37 {key:"date",label:"${_('Date')}",sortable:true,
37 {key:"date",label:"${_('Date')}",sortable:true,
38 sortOptions: { sortFunction: dateSort }},
38 sortOptions: { sortFunction: dateSort }},
39 {key:"author",label:"${_('Author')}",sortable:true},
39 {key:"author",label:"${_('Author')}",sortable:true},
40 {key:"revision",label:"${_('Revision')}",sortable:true,
40 {key:"revision",label:"${_('Revision')}",sortable:true,
41 sortOptions: { sortFunction: revisionSort }},
41 sortOptions: { sortFunction: revisionSort }},
42 ];
42 ];
43
43
44 var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data"));
44 var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data"));
45
45
46 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
46 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
47
47
48 myDataSource.responseSchema = {
48 myDataSource.responseSchema = {
49 fields: [
49 fields: [
50 {key:"name"},
50 {key:"name"},
51 {key:"date"},
51 {key:"date"},
52 {key:"author"},
52 {key:"author"},
53 {key:"revision"},
53 {key:"revision"},
54 ]
54 ]
55 };
55 };
56
56
57 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
57 var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource,
58 {
58 {
59 sortedBy:{key:"name",dir:"asc"},
59 sortedBy:{key:"name",dir:"asc"},
60 MSG_SORTASC:"${_('Click to sort ascending')}",
60 MSG_SORTASC:"${_('Click to sort ascending')}",
61 MSG_SORTDESC:"${_('Click to sort descending')}",
61 MSG_SORTDESC:"${_('Click to sort descending')}",
62 MSG_EMPTY:"${_('No records found.')}",
62 MSG_EMPTY:"${_('No records found.')}",
63 MSG_ERROR:"${_('Data error.')}",
63 MSG_ERROR:"${_('Data error.')}",
64 MSG_LOADING:"${_('Loading...')}",
64 MSG_LOADING:"${_('Loading...')}",
65 }
65 }
66 );
66 );
67 myDataTable.subscribe('postRenderEvent',function(oArgs) {
67 myDataTable.subscribe('postRenderEvent',function(oArgs) {
68 tooltip_activate();
68 tooltip_activate();
69 var func = function(node){
69 var func = function(node){
70 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
70 return node.parentNode.parentNode.parentNode.parentNode.parentNode;
71 }
71 }
72 q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func);
72 q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func);
73 });
73 });
74
74
75 </script>
75 </script>
76 </%def>
76 </%def>
General Comments 0
You need to be logged in to leave comments. Login now