Rafael Cavazin
2013-01-27 11c14e192b907acd3fdc2d6a9bcf4faafc593afe
src/com/gitblit/wicket/panels/RepositoriesPanel.java
@@ -49,6 +49,7 @@
import com.gitblit.models.ProjectModel;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
import com.gitblit.utils.ArrayUtils;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.GitBlitWebSession;
import com.gitblit.wicket.WicketUtils;
@@ -233,6 +234,13 @@
                     .setEscapeModelStrings(false));
            }
            if (entry.isSparkleshared()) {
               row.add(WicketUtils.newImage("sparkleshareIcon", "star_16x16.png",
                     getString("gb.isSparkleshared")));
            } else {
               row.add(WicketUtils.newClearPixel("sparkleshareIcon").setVisible(false));
            }
            if (entry.isFork()) {
               row.add(WicketUtils.newImage("forkIcon", "commit_divide_16x16.png",
                     getString("gb.isFork")));
@@ -287,14 +295,23 @@
               row.add(WicketUtils.newBlankImage("accessRestrictionIcon"));
            }
            String owner = entry.owner;
            if (!StringUtils.isEmpty(owner)) {
               UserModel ownerModel = GitBlit.self().getUserModel(owner);
               if (ownerModel != null) {
                  owner = ownerModel.getDisplayName();
            String owner = "";
            if (!ArrayUtils.isEmpty(entry.owners)) {
               // display first owner
               for (String username : entry.owners) {
                  UserModel ownerModel = GitBlit.self().getUserModel(username);
                  if (ownerModel != null) {
                     owner = ownerModel.getDisplayName();
                     break;
                  }
               }
               if (entry.owners.size() > 1) {
                  owner += ", ...";
               }
            }
            row.add(new Label("repositoryOwner", owner));
            Label ownerLabel = new Label("repositoryOwner", owner);
            WicketUtils.setHtmlTooltip(ownerLabel, ArrayUtils.toString(entry.owners));
            row.add(ownerLabel);
            String lastChange;
            if (entry.lastChange.getTime() == 0) {
@@ -515,10 +532,12 @@
            Collections.sort(list, new Comparator<RepositoryModel>() {
               @Override
               public int compare(RepositoryModel o1, RepositoryModel o2) {
                  String own1 = ArrayUtils.toString(o1.owners);
                  String own2 = ArrayUtils.toString(o2.owners);
                  if (asc) {
                     return o1.owner.compareTo(o2.owner);
                     return own1.compareTo(own2);
                  }
                  return o2.owner.compareTo(o1.owner);
                  return own2.compareTo(own1);
               }
            });
         } else if (prop.equals(SortBy.description.name())) {