public List<String> postReceiveScripts;\r
public List<String> mailingLists;\r
\r
+ private String displayName;\r
+ \r
public RepositoryModel() {\r
this("", "", "", new Date(0));\r
}\r
\r
@Override\r
public String toString() {\r
- return name;\r
+ if (displayName == null) {\r
+ displayName = StringUtils.stripDotGit(name);\r
+ }\r
+ return displayName;\r
}\r
\r
@Override\r
String bs = Integer.toHexString((int) (b * 256));\r
return "#" + rs + gs + bs;\r
}\r
+ \r
+ public static String stripDotGit(String value) {\r
+ if (value.toLowerCase().endsWith(".git")) {\r
+ return value.substring(0, value.length() - 4);\r
+ }\r
+ return value;\r
+ }\r
}
\ No newline at end of file
}\r
\r
@Override\r
- protected void setupPage(String repositoryName, String pageName) {\r
- add(new LinkPanel("repositoryName", null, repositoryName, SummaryPage.class,\r
+ protected void setupPage(String repositoryName, String pageName) { \r
+ add(new LinkPanel("repositoryName", null, StringUtils.stripDotGit(repositoryName), SummaryPage.class,\r
WicketUtils.newRepositoryParameter(repositoryName)));\r
add(new Label("pageName", pageName));\r
\r
fragment.add(authorLink);\r
\r
// repository\r
+ String repoName = StringUtils.stripDotGit(commit.repository);\r
LinkPanel repositoryLink = new LinkPanel("repository", null,\r
- commit.repository, SummaryPage.class,\r
+ repoName, SummaryPage.class,\r
WicketUtils.newRepositoryParameter(commit.repository), true);\r
WicketUtils.setCssBackground(repositoryLink, commit.repository);\r
fragment.add(repositoryLink);\r
item.add(row);\r
\r
// try to strip group name for less cluttered list\r
- String repoName = entry.name;\r
+ String repoName = entry.toString();\r
if (!StringUtils.isEmpty(currGroupName) && (repoName.indexOf('/') > -1)) {\r
repoName = repoName.substring(currGroupName.length() + 1);\r
}\r