From c5dfd60d174a9841e64e4097cecab5aea5c422d0 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sat, 12 Apr 2014 12:26:17 -0400
Subject: [PATCH] Documentation

---
 src/main/java/com/gitblit/wicket/pages/DocsPage.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/gitblit/wicket/pages/DocsPage.java b/src/main/java/com/gitblit/wicket/pages/DocsPage.java
index 3f9ccdb..907dd6e 100644
--- a/src/main/java/com/gitblit/wicket/pages/DocsPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/DocsPage.java
@@ -59,8 +59,9 @@
 		List<MarkupDocument> roots = processor.getRootDocs(r, repositoryName, commitId);
 		Fragment fragment = null;
 		if (roots.isEmpty()) {
-			// no identified root documents just show the standard document list
+			// no identified root documents
 			fragment = new Fragment("docs", "noIndexFragment", this);
+			setResponsePage(NoDocsPage.class, params);
 		} else {
 			// root documents, use tabbed ui of index/root and document list
 			fragment = new Fragment("docs", "tabsFragment", this);
@@ -138,8 +139,8 @@
 				PathModel entry = item.getModelObject();
 				item.add(WicketUtils.newImage("docIcon", "file_world_16x16.png"));
 				item.add(new Label("docSize", byteFormat.format(entry.size)));
-				item.add(new LinkPanel("docName", "list", entry.name, DocPage.class, WicketUtils
-						.newPathParameter(repositoryName, id, entry.path)));
+				item.add(new LinkPanel("docName", "list", StringUtils.stripFileExtension(entry.name),
+						DocPage.class, WicketUtils.newPathParameter(repositoryName, id, entry.path)));
 
 				// links
 				item.add(new BookmarkablePageLink<Void>("view", DocPage.class, WicketUtils

--
Gitblit v1.9.1