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