From 716745e2dd9b3925b1229433e7072580206f731e Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 08 Jun 2011 17:38:11 -0400
Subject: [PATCH] Stubbed out Blame. Added Github banner to site. Documentation.

---
 src/com/gitblit/wicket/pages/SummaryPage.java |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/com/gitblit/wicket/pages/SummaryPage.java b/src/com/gitblit/wicket/pages/SummaryPage.java
index a2d36d2..37b0bcf 100644
--- a/src/com/gitblit/wicket/pages/SummaryPage.java
+++ b/src/com/gitblit/wicket/pages/SummaryPage.java
@@ -26,6 +26,7 @@
 
 import org.apache.wicket.PageParameters;
 import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.protocol.http.WebRequest;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.RevCommit;
@@ -77,7 +78,7 @@
 		List<Metric> metrics = null;
 		Metric metricsTotal = null;
 		if (GitBlit.getBoolean(Keys.web.generateActivityGraph, true)) {
-			metrics = MetricUtils.getDateMetrics(r, true, null);
+			metrics = MetricUtils.getDateMetrics(r, null, true, null);
 			metricsTotal = metrics.remove(0);
 		}
 
@@ -88,12 +89,13 @@
 		add(WicketUtils.createTimestampLabel("repositoryLastChange", JGitUtils.getLastChange(r),
 				getTimeZone()));
 		if (metricsTotal == null) {
-			add(new Label("repositoryMetrics", ""));
+			add(new Label("branchStats", ""));			
 		} else {
-			add(new Label("repositoryMetrics", MessageFormat.format(
+			add(new Label("branchStats", MessageFormat.format(
 					"{0} commits and {1} tags in {2}", metricsTotal.count, metricsTotal.tag,
 					TimeUtils.duration(metricsTotal.duration))));
 		}
+		add(new BookmarkablePageLink<Void>("metrics", MetricsPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
 
 		List<String> repositoryUrls = new ArrayList<String>();
 
@@ -141,8 +143,8 @@
 				.setEscapeModelStrings(false));
 
 		add(new LogPanel("commitsPanel", repositoryName, null, r, numberCommits, 0));
-		add(new TagsPanel("tagsPanel", repositoryName, r, numberRefs));
-		add(new BranchesPanel("branchesPanel", getRepositoryModel(), r, numberRefs));
+		add(new TagsPanel("tagsPanel", repositoryName, r, numberRefs).hideIfEmpty());
+		add(new BranchesPanel("branchesPanel", getRepositoryModel(), r, numberRefs).hideIfEmpty());
 
 		if (getRepositoryModel().showReadme) {
 			String htmlText = null;
@@ -167,7 +169,7 @@
 					}
 				}
 				if (!StringUtils.isEmpty(readme)) {
-					String markdownText = JGitUtils.getRawContentAsString(r, head, readme);
+					String markdownText = JGitUtils.getStringContent(r, head.getTree(), readme);
 					htmlText = MarkdownUtils.transformMarkdown(markdownText);
 				}
 			} catch (ParseException p) {
@@ -201,11 +203,10 @@
 					metrics.get(metrics.size() / 2).name, metrics.get(metrics.size() - 1).name });
 			provider.addAxis(dateAxis);
 
-			ChartAxis commitAxis = new ChartAxis(ChartAxisType.LEFT);
+			ChartAxis commitAxis = new ChartAxis(ChartAxisType.LEFT);			
 			commitAxis.setLabels(new String[] { "",
 					String.valueOf((int) WicketUtils.maxValue(metrics)) });
 			provider.addAxis(commitAxis);
-
 			provider.setLineStyles(new LineStyle[] { new LineStyle(2, 4, 0), new LineStyle(0, 4, 1) });
 			provider.addShapeMarker(new ShapeMarker(MarkerType.CIRCLE, Color.BLUE, 1, -1, 5));
 

--
Gitblit v1.9.1