diff --git a/pylons_app/templates/summary/summary.html b/pylons_app/templates/summary/summary.html --- a/pylons_app/templates/summary/summary.html +++ b/pylons_app/templates/summary/summary.html @@ -118,14 +118,14 @@ E.onDOMReady(function(e){ -
+
${_('Last month commit activity')}
-
+
@@ -142,11 +142,10 @@ E.onDOMReady(function(e){ for(var key in datasets) { datasets[key].color = i; i++; - choiceContainerTable.innerHTML += ''+ - ''+ - ''+datasets[key].label+ - ''+ - ''; + choiceContainerTable.innerHTML += ''+ + '' + +datasets[key].label+ + ''; }; @@ -164,6 +163,7 @@ E.onDOMReady(function(e){ }; if (data.length > 0){ + var plot = YAHOO.widget.Flot("commit_history", data, { bars: { show: true, align:'center',lineWidth:4 }, points: { show: true, radius:0,fill:true }, @@ -211,18 +211,36 @@ E.onDOMReady(function(e){ } var x = item.datapoint.x.toFixed(2); var y = item.datapoint.y.toFixed(2); - + if (!item.series.label){ item.series.label = 'commits'; } var d = new Date(x*1000); var fd = d.getFullYear()+'-'+(d.getMonth()+1)+'-'+d.getDate(); var nr_commits = parseInt(y); - var suffix = ''; - if(nr_commits > 1){ - var suffix = 's'; - } - showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd + ": " + nr_commits+" commit" + suffix); + + var cur_data = datasets[item.series.label].data[item.dataIndex]; + var added = cur_data.added; + var changed = cur_data.changed; + var removed = cur_data.removed; + + var nr_commits_suffix = " ${_('commits')} "; + var added_suffix = " ${_('files added')} "; + var changed_suffix = " ${_('files changed')} "; + var removed_suffix = " ${_('files removed')} "; + + + if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";} + if(added==1){added_suffix=" ${_('file added')} ";} + if(changed==1){changed_suffix=" ${_('file changed')} ";} + if(removed==1){removed_suffix=" ${_('file removed')} ";} + + showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd + +'
'+ + nr_commits + nr_commits_suffix+'
'+ + added + added_suffix +'
'+ + changed + changed_suffix + '
'+ + removed + removed_suffix + '
'); } } else { @@ -253,6 +271,7 @@ E.onDOMReady(function(e){
<%include file='../shortlog/shortlog_data.html'/> + ${h.link_to(_('show more'),h.url('changelog_home',repo_name=c.repo_name))}
@@ -261,6 +280,7 @@ E.onDOMReady(function(e){
<%include file='../tags/tags_data.html'/> + ${h.link_to(_('show more'),h.url('tags_home',repo_name=c.repo_name))}
@@ -269,6 +289,7 @@ E.onDOMReady(function(e){
<%include file='../branches/branches_data.html'/> + ${h.link_to(_('show more'),h.url('branches_home',repo_name=c.repo_name))}