From: James Moger Date: Fri, 21 Feb 2014 14:24:54 +0000 (-0500) Subject: Strip file extension from document index X-Git-Tag: v1.4.0~112 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6d29e03364472f8881c120a290546a516f0a8b56;p=gitblit.git Strip file extension from document index --- diff --git a/src/main/java/com/gitblit/wicket/pages/DocsPage.java b/src/main/java/com/gitblit/wicket/pages/DocsPage.java index 3f9ccdb5..85c19e22 100644 --- a/src/main/java/com/gitblit/wicket/pages/DocsPage.java +++ b/src/main/java/com/gitblit/wicket/pages/DocsPage.java @@ -138,8 +138,8 @@ public class DocsPage extends RepositoryPage { 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("view", DocPage.class, WicketUtils