From 988ef6b2f0e39a8f4cbda52bf419578a2675704a Mon Sep 17 00:00:00 2001 From: Florian Zschocke Date: Sat, 15 Jun 2019 21:09:36 +0200 Subject: [PATCH] Remove "folding outlines" and sort repositories before subfolders. Remove guard rails at the left to get a cleaner look. To make it easier to determine which repositories belong to which folder, display the repositories first, then the subfolder. Decreased indentation a little. --- .../panels/NestedRepositoryTreePanel.html | 10 +++---- .../panels/NestedRepositoryTreePanel.java | 30 ++++++++++--------- src/main/resources/gitblit.css | 1 + 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/panels/NestedRepositoryTreePanel.html b/src/main/java/com/gitblit/wicket/panels/NestedRepositoryTreePanel.html index 5f2aba21..5dfd27af 100644 --- a/src/main/java/com/gitblit/wicket/panels/NestedRepositoryTreePanel.html +++ b/src/main/java/com/gitblit/wicket/panels/NestedRepositoryTreePanel.html @@ -6,14 +6,11 @@ - - - -
 
[repository @@ -36,6 +33,9 @@ size]
+ + + @@ -91,7 +91,7 @@ -
 
[group diff --git a/src/main/java/com/gitblit/wicket/panels/NestedRepositoryTreePanel.java b/src/main/java/com/gitblit/wicket/panels/NestedRepositoryTreePanel.java index fbe1991d..cc5df1a1 100644 --- a/src/main/java/com/gitblit/wicket/panels/NestedRepositoryTreePanel.java +++ b/src/main/java/com/gitblit/wicket/panels/NestedRepositoryTreePanel.java @@ -68,20 +68,6 @@ public class NestedRepositoryTreePanel extends BasePanel { } WicketUtils.addCssClass(nodeHeader, "group collapsible tree"); - add(new ListView("subFolders", node.getSubFolders()) { - private static final long serialVersionUID = 1L; - - @Override - protected void populateItem(ListItem item) { - item.add(new NestedRepositoryTreePanel("rowContent", item.getModel(), accessRestrictionTranslations, linksActive)); - } - - @Override - public boolean isVisible() { - return super.isVisible() && !node.getSubFolders().isEmpty(); - } - }); - add(new ListView("repositories", node.getRepositories()) { private static final long serialVersionUID = 1L; @@ -220,6 +206,22 @@ public class NestedRepositoryTreePanel extends BasePanel { } }); + add(new ListView("subFolders", node.getSubFolders()) { + private static final long serialVersionUID = 1L; + + @Override + protected void populateItem(ListItem item) { + item.add(new NestedRepositoryTreePanel("rowContent", item.getModel(), accessRestrictionTranslations, linksActive)); + } + + @Override + public boolean isVisible() { + return super.isVisible() && !node.getSubFolders().isEmpty(); + } + }); + + + } private void addChildOfNodeIdCssClassesToRow(Component row, TreeNodeModel parentNode) { diff --git a/src/main/resources/gitblit.css b/src/main/resources/gitblit.css index 5dabbec2..f7271788 100644 --- a/src/main/resources/gitblit.css +++ b/src/main/resources/gitblit.css @@ -45,6 +45,7 @@ a.bugtraq { .octicon-centered { text-align: center; width: 16px; + padding-left: 17px; } tr:hover .octicon-centered { -- 2.39.5