Show More
@@ -1,275 +1,275 b'' | |||||
1 | <%inherit file="/base/base.html"/> |
|
1 | <%inherit file="/base/base.html"/> | |
2 |
|
2 | |||
3 | <%def name="title()"> |
|
3 | <%def name="title()"> | |
4 | ${_('Mercurial Repository Overview')} |
|
4 | ${_('Mercurial Repository Overview')} | |
5 | </%def> |
|
5 | </%def> | |
6 |
|
6 | |||
7 | <%def name="breadcrumbs_links()"> |
|
7 | <%def name="breadcrumbs_links()"> | |
8 | ${h.link_to(u'Home',h.url('/'))} |
|
8 | ${h.link_to(u'Home',h.url('/'))} | |
9 | » |
|
9 | » | |
10 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
10 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
11 | » |
|
11 | » | |
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 | <script type="text/javascript"> |
|
20 | <script type="text/javascript"> | |
21 | var E = YAHOO.util.Event; |
|
21 | var E = YAHOO.util.Event; | |
22 | var D = YAHOO.util.Dom; |
|
22 | var D = YAHOO.util.Dom; | |
23 |
|
23 | |||
24 | E.onDOMReady(function(e){ |
|
24 | E.onDOMReady(function(e){ | |
25 | id = 'clone_url'; |
|
25 | id = 'clone_url'; | |
26 | E.addListener(id,'click',function(e){ |
|
26 | E.addListener(id,'click',function(e){ | |
27 | D.get('clone_url').select(); |
|
27 | D.get('clone_url').select(); | |
28 | }) |
|
28 | }) | |
29 | }) |
|
29 | }) | |
30 | </script> |
|
30 | </script> | |
31 | <div class="box box-left"> |
|
31 | <div class="box box-left"> | |
32 | <!-- box / title --> |
|
32 | <!-- box / title --> | |
33 | <div class="title"> |
|
33 | <div class="title"> | |
34 | ${self.breadcrumbs()} |
|
34 | ${self.breadcrumbs()} | |
35 | </div> |
|
35 | </div> | |
36 | <!-- end box / title --> |
|
36 | <!-- end box / title --> | |
37 | <div class="form"> |
|
37 | <div class="form"> | |
38 | <div class="fields"> |
|
38 | <div class="fields"> | |
39 |
|
39 | |||
40 | <div class="field"> |
|
40 | <div class="field"> | |
41 | <div class="label"> |
|
41 | <div class="label"> | |
42 | <label>${_('Name')}:</label> |
|
42 | <label>${_('Name')}:</label> | |
43 | </div> |
|
43 | </div> | |
44 | <div class="input-short"> |
|
44 | <div class="input-short"> | |
45 | ${c.repo_info.name} |
|
45 | ${c.repo_info.name} | |
46 | </div> |
|
46 | </div> | |
47 | </div> |
|
47 | </div> | |
48 |
|
48 | |||
49 |
|
49 | |||
50 | <div class="field"> |
|
50 | <div class="field"> | |
51 | <div class="label"> |
|
51 | <div class="label"> | |
52 | <label>${_('Description')}:</label> |
|
52 | <label>${_('Description')}:</label> | |
53 | </div> |
|
53 | </div> | |
54 | <div class="input-short"> |
|
54 | <div class="input-short"> | |
55 | ${c.repo_info.description} |
|
55 | ${c.repo_info.description} | |
56 | </div> |
|
56 | </div> | |
57 | </div> |
|
57 | </div> | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | <div class="field"> |
|
60 | <div class="field"> | |
61 | <div class="label"> |
|
61 | <div class="label"> | |
62 | <label>${_('Contact')}:</label> |
|
62 | <label>${_('Contact')}:</label> | |
63 | </div> |
|
63 | </div> | |
64 | <div class="input-short"> |
|
64 | <div class="input-short"> | |
65 | <div class="gravatar"> |
|
65 | <div class="gravatar"> | |
66 | <img alt="gravatar" src="${h.gravatar_url(c.repo_info.dbrepo.user.email)}"/> |
|
66 | <img alt="gravatar" src="${h.gravatar_url(c.repo_info.dbrepo.user.email)}"/> | |
67 | </div> |
|
67 | </div> | |
68 | ${_('Username')}: ${c.repo_info.dbrepo.user.username}<br/> |
|
68 | ${_('Username')}: ${c.repo_info.dbrepo.user.username}<br/> | |
69 | ${_('Name')}: ${c.repo_info.dbrepo.user.name} ${c.repo_info.dbrepo.user.lastname}<br/> |
|
69 | ${_('Name')}: ${c.repo_info.dbrepo.user.name} ${c.repo_info.dbrepo.user.lastname}<br/> | |
70 | ${_('Email')}: <a href="mailto:${c.repo_info.dbrepo.user.email}">${c.repo_info.dbrepo.user.email}</a> |
|
70 | ${_('Email')}: <a href="mailto:${c.repo_info.dbrepo.user.email}">${c.repo_info.dbrepo.user.email}</a> | |
71 | </div> |
|
71 | </div> | |
72 | </div> |
|
72 | </div> | |
73 |
|
73 | |||
74 | <div class="field"> |
|
74 | <div class="field"> | |
75 | <div class="label"> |
|
75 | <div class="label"> | |
76 | <label>${_('Last change')}:</label> |
|
76 | <label>${_('Last change')}:</label> | |
77 | </div> |
|
77 | </div> | |
78 | <div class="input-short"> |
|
78 | <div class="input-short"> | |
79 | ${h.age(c.repo_info.last_change)} - ${h.rfc822date(c.repo_info.last_change)} |
|
79 | ${h.age(c.repo_info.last_change)} - ${h.rfc822date(c.repo_info.last_change)} | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 |
|
82 | |||
83 | <div class="field"> |
|
83 | <div class="field"> | |
84 | <div class="label"> |
|
84 | <div class="label"> | |
85 | <label>${_('Clone url')}:</label> |
|
85 | <label>${_('Clone url')}:</label> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="input-short"> |
|
87 | <div class="input-short"> | |
88 | <input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/> |
|
88 | <input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/> | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 |
|
91 | |||
92 | <div class="field"> |
|
92 | <div class="field"> | |
93 | <div class="label"> |
|
93 | <div class="label"> | |
94 | <label>${_('Download')}:</label> |
|
94 | <label>${_('Download')}:</label> | |
95 | </div> |
|
95 | </div> | |
96 | <div class="input-short"> |
|
96 | <div class="input-short"> | |
97 | %for cnt,archive in enumerate(c.repo_info._get_archives()): |
|
97 | %for cnt,archive in enumerate(c.repo_info._get_archives()): | |
98 | %if cnt >=1: |
|
98 | %if cnt >=1: | |
99 | | |
|
99 | | | |
100 | %endif |
|
100 | %endif | |
101 | ${h.link_to(c.repo_info.name+'.'+archive['type'], |
|
101 | ${h.link_to(c.repo_info.name+'.'+archive['type'], | |
102 | h.url('files_archive_home',repo_name=c.repo_info.name, |
|
102 | h.url('files_archive_home',repo_name=c.repo_info.name, | |
103 | revision='tip',fileformat=archive['extension']),class_="archive_icon")} |
|
103 | revision='tip',fileformat=archive['extension']),class_="archive_icon")} | |
104 | %endfor |
|
104 | %endfor | |
105 | </div> |
|
105 | </div> | |
106 | </div> |
|
106 | </div> | |
107 |
|
107 | |||
108 | <div class="field"> |
|
108 | <div class="field"> | |
109 | <div class="label"> |
|
109 | <div class="label"> | |
110 | <label>${_('Feeds')}:</label> |
|
110 | <label>${_('Feeds')}:</label> | |
111 | </div> |
|
111 | </div> | |
112 | <div class="input-short"> |
|
112 | <div class="input-short"> | |
113 | ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo_info.name),class_='rss_icon')} |
|
113 | ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo_info.name),class_='rss_icon')} | |
114 | ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo_info.name),class_='atom_icon')} |
|
114 | ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo_info.name),class_='atom_icon')} | |
115 | </div> |
|
115 | </div> | |
116 | </div> |
|
116 | </div> | |
117 | </div> |
|
117 | </div> | |
118 | </div> |
|
118 | </div> | |
119 | </div> |
|
119 | </div> | |
120 |
|
120 | |||
121 | <div class="box box-right"> |
|
121 | <div class="box box-right"> | |
122 | <!-- box / title --> |
|
122 | <!-- box / title --> | |
123 | <div class="title"> |
|
123 | <div class="title"> | |
124 | <h5>${_('Last month commit activity')}</h5> |
|
124 | <h5>${_('Last month commit activity')}</h5> | |
125 | </div> |
|
125 | </div> | |
126 |
|
126 | |||
127 | <div class="table"> |
|
127 | <div class="table"> | |
128 | <div id="commit_history" style="width:460px;height:370px;float:left"></div> |
|
128 | <div id="commit_history" style="width:460px;height:370px;float:left"></div> | |
129 | <div id="legend_data"> |
|
129 | <div id="legend_data"> | |
130 | <div id="legend_container"></div> |
|
130 | <div id="legend_container"></div> | |
131 | <div id="legend_choices"> |
|
131 | <div id="legend_choices"> | |
132 | <table id="legend_choices_tables" style="font-size:smaller;color:#545454"></table> |
|
132 | <table id="legend_choices_tables" style="font-size:smaller;color:#545454"></table> | |
133 | </div> |
|
133 | </div> | |
134 | </div> |
|
134 | </div> | |
135 | <script type="text/javascript"> |
|
135 | <script type="text/javascript"> | |
136 |
|
136 | |||
137 | (function () { |
|
137 | (function () { | |
138 | var datasets = {${c.commit_data|n}}; |
|
138 | var datasets = {${c.commit_data|n}}; | |
139 | var i = 0; |
|
139 | var i = 0; | |
140 | var choiceContainer = YAHOO.util.Dom.get("legend_choices"); |
|
140 | var choiceContainer = YAHOO.util.Dom.get("legend_choices"); | |
141 | var choiceContainerTable = YAHOO.util.Dom.get("legend_choices_tables"); |
|
141 | var choiceContainerTable = YAHOO.util.Dom.get("legend_choices_tables"); | |
142 | for(var key in datasets) { |
|
142 | for(var key in datasets) { | |
143 | datasets[key].color = i; |
|
143 | datasets[key].color = i; | |
144 | i++; |
|
144 | i++; | |
145 | choiceContainerTable.innerHTML += '<tr>'+ |
|
145 | choiceContainerTable.innerHTML += '<tr>'+ | |
146 | '<td>'+ |
|
146 | '<td>'+ | |
147 | '<input type="checkbox" name="' + key +'" checked="checked" />'+datasets[key].label+ |
|
147 | '<input type="checkbox" name="' + key +'" checked="checked" />'+datasets[key].label+ | |
148 | '</td>'+ |
|
148 | '</td>'+ | |
149 | '</tr>'; |
|
149 | '</tr>'; | |
150 | }; |
|
150 | }; | |
151 |
|
151 | |||
152 |
|
152 | |||
153 | function plotAccordingToChoices() { |
|
153 | function plotAccordingToChoices() { | |
154 | var data = []; |
|
154 | var data = []; | |
155 |
|
155 | |||
156 | var inputs = choiceContainer.getElementsByTagName("input"); |
|
156 | var inputs = choiceContainer.getElementsByTagName("input"); | |
157 | for(var i=0; i<inputs.length; i++) { |
|
157 | for(var i=0; i<inputs.length; i++) { | |
158 | if(!inputs[i].checked) |
|
158 | if(!inputs[i].checked) | |
159 | continue; |
|
159 | continue; | |
160 |
|
160 | |||
161 | var key = inputs[i].name; |
|
161 | var key = inputs[i].name; | |
162 | if (key && datasets[key]) |
|
162 | if (key && datasets[key]) | |
163 | data.push(datasets[key]); |
|
163 | data.push(datasets[key]); | |
164 | }; |
|
164 | }; | |
165 |
|
165 | |||
166 | if (data.length > 0){ |
|
166 | if (data.length > 0){ | |
167 | var plot = YAHOO.widget.Flot("commit_history", data, |
|
167 | var plot = YAHOO.widget.Flot("commit_history", data, | |
168 | { bars: { show: true, align:'center',lineWidth:4 }, |
|
168 | { bars: { show: true, align:'center',lineWidth:4 }, | |
169 | points: { show: true, radius:0,fill:true }, |
|
169 | points: { show: true, radius:0,fill:true }, | |
170 | legend:{show:true, container:"legend_container"}, |
|
170 | legend:{show:true, container:"legend_container"}, | |
171 | selection: { mode: "xy" }, |
|
171 | selection: { mode: "xy" }, | |
172 |
yaxis:{tick |
|
172 | yaxis: {tickDecimals:0}, | |
173 | xaxis: { mode: "time", timeformat: "%d",tickSize:[1, "day"],min:${c.ts_min},max:${c.ts_max} }, |
|
173 | xaxis: { mode: "time", timeformat: "%d",tickSize:[1, "day"],min:${c.ts_min},max:${c.ts_max} }, | |
174 | grid: { hoverable: true, clickable: true,autoHighlight:true }, |
|
174 | grid: { hoverable: true, clickable: true,autoHighlight:true }, | |
175 | }); |
|
175 | }); | |
176 |
|
176 | |||
177 | function showTooltip(x, y, contents) { |
|
177 | function showTooltip(x, y, contents) { | |
178 | var div=document.getElementById('tooltip'); |
|
178 | var div=document.getElementById('tooltip'); | |
179 | if(!div) { |
|
179 | if(!div) { | |
180 | div = document.createElement('div'); |
|
180 | div = document.createElement('div'); | |
181 | div.id="tooltip"; |
|
181 | div.id="tooltip"; | |
182 | div.style.position="absolute"; |
|
182 | div.style.position="absolute"; | |
183 | div.style.border='1px solid #fdd'; |
|
183 | div.style.border='1px solid #fdd'; | |
184 | div.style.padding='2px'; |
|
184 | div.style.padding='2px'; | |
185 | div.style.backgroundColor='#fee'; |
|
185 | div.style.backgroundColor='#fee'; | |
186 | document.body.appendChild(div); |
|
186 | document.body.appendChild(div); | |
187 | } |
|
187 | } | |
188 | YAHOO.util.Dom.setStyle(div, 'opacity', 0); |
|
188 | YAHOO.util.Dom.setStyle(div, 'opacity', 0); | |
189 | div.innerHTML = contents; |
|
189 | div.innerHTML = contents; | |
190 | div.style.top=(y + 5) + "px"; |
|
190 | div.style.top=(y + 5) + "px"; | |
191 | div.style.left=(x + 5) + "px"; |
|
191 | div.style.left=(x + 5) + "px"; | |
192 |
|
192 | |||
193 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); |
|
193 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); | |
194 | anim.animate(); |
|
194 | anim.animate(); | |
195 | } |
|
195 | } | |
196 |
|
196 | |||
197 | var previousPoint = null; |
|
197 | var previousPoint = null; | |
198 | plot.subscribe("plothover", function (o) { |
|
198 | plot.subscribe("plothover", function (o) { | |
199 | var pos = o.pos; |
|
199 | var pos = o.pos; | |
200 | var item = o.item; |
|
200 | var item = o.item; | |
201 |
|
201 | |||
202 | //YAHOO.util.Dom.get("x").innerHTML = pos.x.toFixed(2); |
|
202 | //YAHOO.util.Dom.get("x").innerHTML = pos.x.toFixed(2); | |
203 | //YAHOO.util.Dom.get("y").innerHTML = pos.y.toFixed(2); |
|
203 | //YAHOO.util.Dom.get("y").innerHTML = pos.y.toFixed(2); | |
204 | if (item) { |
|
204 | if (item) { | |
205 | if (previousPoint != item.datapoint) { |
|
205 | if (previousPoint != item.datapoint) { | |
206 | previousPoint = item.datapoint; |
|
206 | previousPoint = item.datapoint; | |
207 |
|
207 | |||
208 | var tooltip = YAHOO.util.Dom.get("tooltip"); |
|
208 | var tooltip = YAHOO.util.Dom.get("tooltip"); | |
209 | if(tooltip) { |
|
209 | if(tooltip) { | |
210 | tooltip.parentNode.removeChild(tooltip); |
|
210 | tooltip.parentNode.removeChild(tooltip); | |
211 | } |
|
211 | } | |
212 | var x = item.datapoint.x.toFixed(2); |
|
212 | var x = item.datapoint.x.toFixed(2); | |
213 | var y = item.datapoint.y.toFixed(2); |
|
213 | var y = item.datapoint.y.toFixed(2); | |
214 |
|
214 | |||
215 | if (!item.series.label){ |
|
215 | if (!item.series.label){ | |
216 | item.series.label = 'commits'; |
|
216 | item.series.label = 'commits'; | |
217 | } |
|
217 | } | |
218 | var d = new Date(x*1000); |
|
218 | var d = new Date(x*1000); | |
219 | var fd = d.getFullYear()+'-'+(d.getMonth()+1)+'-'+d.getDate(); |
|
219 | var fd = d.getFullYear()+'-'+(d.getMonth()+1)+'-'+d.getDate(); | |
220 | var nr_commits = parseInt(y); |
|
220 | var nr_commits = parseInt(y); | |
221 | var suffix = ''; |
|
221 | var suffix = ''; | |
222 | if(nr_commits > 1){ |
|
222 | if(nr_commits > 1){ | |
223 | var suffix = 's'; |
|
223 | var suffix = 's'; | |
224 | } |
|
224 | } | |
225 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd + ": " + nr_commits+" commit" + suffix); |
|
225 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd + ": " + nr_commits+" commit" + suffix); | |
226 | } |
|
226 | } | |
227 | } |
|
227 | } | |
228 | else { |
|
228 | else { | |
229 | var tooltip = YAHOO.util.Dom.get("tooltip"); |
|
229 | var tooltip = YAHOO.util.Dom.get("tooltip"); | |
230 |
|
230 | |||
231 | if(tooltip) { |
|
231 | if(tooltip) { | |
232 | tooltip.parentNode.removeChild(tooltip); |
|
232 | tooltip.parentNode.removeChild(tooltip); | |
233 | } |
|
233 | } | |
234 | previousPoint = null; |
|
234 | previousPoint = null; | |
235 | } |
|
235 | } | |
236 | }); |
|
236 | }); | |
237 |
|
237 | |||
238 | } |
|
238 | } | |
239 | } |
|
239 | } | |
240 |
|
240 | |||
241 | YAHOO.util.Event.on(choiceContainer.getElementsByTagName("input"), "click", plotAccordingToChoices); |
|
241 | YAHOO.util.Event.on(choiceContainer.getElementsByTagName("input"), "click", plotAccordingToChoices); | |
242 |
|
242 | |||
243 | plotAccordingToChoices(); |
|
243 | plotAccordingToChoices(); | |
244 | })(); |
|
244 | })(); | |
245 | </script> |
|
245 | </script> | |
246 |
|
246 | |||
247 | </div> |
|
247 | </div> | |
248 | </div> |
|
248 | </div> | |
249 |
|
249 | |||
250 | <div class="box"> |
|
250 | <div class="box"> | |
251 | <div class="title"> |
|
251 | <div class="title"> | |
252 | <div class="breadcrumbs">${h.link_to(_('Last ten changes'),h.url('changelog_home',repo_name=c.repo_name))}</div> |
|
252 | <div class="breadcrumbs">${h.link_to(_('Last ten changes'),h.url('changelog_home',repo_name=c.repo_name))}</div> | |
253 | </div> |
|
253 | </div> | |
254 | <div class="table"> |
|
254 | <div class="table"> | |
255 | <%include file='../shortlog/shortlog_data.html'/> |
|
255 | <%include file='../shortlog/shortlog_data.html'/> | |
256 | </div> |
|
256 | </div> | |
257 | </div> |
|
257 | </div> | |
258 | <div class="box"> |
|
258 | <div class="box"> | |
259 | <div class="title"> |
|
259 | <div class="title"> | |
260 | <div class="breadcrumbs">${h.link_to(_('Last ten tags'),h.url('tags_home',repo_name=c.repo_name))}</div> |
|
260 | <div class="breadcrumbs">${h.link_to(_('Last ten tags'),h.url('tags_home',repo_name=c.repo_name))}</div> | |
261 | </div> |
|
261 | </div> | |
262 | <div class="table"> |
|
262 | <div class="table"> | |
263 | <%include file='../tags/tags_data.html'/> |
|
263 | <%include file='../tags/tags_data.html'/> | |
264 | </div> |
|
264 | </div> | |
265 | </div> |
|
265 | </div> | |
266 | <div class="box"> |
|
266 | <div class="box"> | |
267 | <div class="title"> |
|
267 | <div class="title"> | |
268 | <div class="breadcrumbs">${h.link_to(_('Last ten branches'),h.url('branches_home',repo_name=c.repo_name))}</div> |
|
268 | <div class="breadcrumbs">${h.link_to(_('Last ten branches'),h.url('branches_home',repo_name=c.repo_name))}</div> | |
269 | </div> |
|
269 | </div> | |
270 | <div class="table"> |
|
270 | <div class="table"> | |
271 | <%include file='../branches/branches_data.html'/> |
|
271 | <%include file='../branches/branches_data.html'/> | |
272 | </div> |
|
272 | </div> | |
273 | </div> |
|
273 | </div> | |
274 |
|
274 | |||
275 | </%def> No newline at end of file |
|
275 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now