James Moger
2011-07-27 f8dc86f1b362c2906ea302eb56928b59156cd484
src/com/gitblit/wicket/panels/RepositoriesPanel.java
@@ -76,9 +76,9 @@
         Map<String, List<RepositoryModel>> groups = new HashMap<String, List<RepositoryModel>>();
         for (RepositoryModel model : models) {
            String rootPath = StringUtils.getRootPath(model.name);
            if (StringUtils.isEmpty(rootPath)) {
            if (StringUtils.isEmpty(rootPath)) {
               // root repository
               rootRepositories.add(model);
               rootRepositories.add(model);
            } else {
               // non-root, grouped repository
               if (!groups.containsKey(rootPath)) {
@@ -89,7 +89,7 @@
         }
         List<String> roots = new ArrayList<String>(groups.keySet());
         Collections.sort(roots);
         if (rootRepositories.size() > 0) {
            // inject the root repositories at the top of the page
            String rootPath = GitBlit.getString(Keys.web.repositoryRootGroupName, " ");
@@ -138,7 +138,8 @@
               row.add(new LinkPanel("repositoryDescription", "list", entry.description,
                     SummaryPage.class, pp));
               if (showSize) {
                  row.add(new Label("repositorySize", byteFormat.format(GitBlit.self().calculateSize(entry))));
                  row.add(new Label("repositorySize", byteFormat.format(GitBlit.self()
                        .calculateSize(entry))));
               } else {
                  row.add(new Label("repositorySize").setVisible(false));
               }
@@ -146,7 +147,8 @@
               // New repository
               row.add(new Label("repositoryName", entry.name));
               row.add(new Label("repositoryDescription", entry.description));
               row.add(new Label("repositorySize", "<span class='empty'>(empty)</span>").setEscapeModelStrings(false));
               row.add(new Label("repositorySize", "<span class='empty'>(empty)</span>")
                     .setEscapeModelStrings(false));
            }
            if (entry.useTickets) {
@@ -191,7 +193,12 @@
            row.add(new Label("repositoryOwner", entry.owner));
            String lastChange = TimeUtils.timeAgo(entry.lastChange);
            String lastChange;
            if (entry.lastChange.getTime() == 0) {
               lastChange = "--";
            } else {
               lastChange = TimeUtils.timeAgo(entry.lastChange);
            }
            Label lastChangeLabel = new Label("repositoryLastChange", lastChange);
            row.add(lastChangeLabel);
            WicketUtils.setCssClass(lastChangeLabel, TimeUtils.timeAgoCss(entry.lastChange));