]> source.dussan.org Git - gitblit.git/commitdiff
Strip file extension from document index
authorJames Moger <james.moger@gitblit.com>
Fri, 21 Feb 2014 14:24:54 +0000 (09:24 -0500)
committerJames Moger <james.moger@gitblit.com>
Fri, 21 Feb 2014 14:24:54 +0000 (09:24 -0500)
src/main/java/com/gitblit/wicket/pages/DocsPage.java

index 3f9ccdb5a95272e59aa418023e19f9f27c6e0da2..85c19e22a839848750d88ff394a5c52d48f14b6b 100644 (file)
@@ -138,8 +138,8 @@ public class DocsPage extends RepositoryPage {
                                PathModel entry = item.getModelObject();\r
                                item.add(WicketUtils.newImage("docIcon", "file_world_16x16.png"));\r
                                item.add(new Label("docSize", byteFormat.format(entry.size)));\r
-                               item.add(new LinkPanel("docName", "list", entry.name, DocPage.class, WicketUtils\r
-                                               .newPathParameter(repositoryName, id, entry.path)));\r
+                               item.add(new LinkPanel("docName", "list", StringUtils.stripFileExtension(entry.name),\r
+                                               DocPage.class, WicketUtils.newPathParameter(repositoryName, id, entry.path)));\r
 \r
                                // links\r
                                item.add(new BookmarkablePageLink<Void>("view", DocPage.class, WicketUtils\r